工作代码提交

This commit is contained in:
sx 2025-04-23 08:54:23 +08:00
parent 81d7c5c5f3
commit 4ebbbd8b29
8 changed files with 159 additions and 58 deletions

View File

@ -316,6 +316,7 @@ const shop = {
return util.request({ return util.request({
url: `/shopify/appProductionApi/getProductionListByUserId`, url: `/shopify/appProductionApi/getProductionListByUserId`,
data: param.data, data: param.data,
query: param.query,
method: 'GET', method: 'GET',
load: true, load: true,
}) })
@ -537,6 +538,32 @@ const shop = {
load: true, load: true,
}) })
}, },
/**
* 商家拒绝售后
* @param {Object} param
*/
setShopOrderUnrefund(param) {
return util.request({
url: `/shopify/refundOrder/dealRefundOrderNo`,
method: 'POST',
data: param.data,
load: true,
})
},
/**
* 商家同意售后
* @param {Object} param
*/
setShopOrderRefund(param) {
return util.request({
url: `/shopify/refundOrder/dealRefundOrderYes`,
method: 'POST',
data: param.data,
load: true,
})
},
} }
export default shop export default shop

View File

@ -6,9 +6,9 @@ const config = {
// host: 'h5api', // host: 'h5api',
// #endif // #endif
// #ifndef H5 // #ifndef H5
host: 'http://91f.xyz:8080', // host: 'http://91f.xyz:8080',
// host: 'http://liuyd.cpolar.top', // host: 'http://liuyd.cpolar.top',
// host: 'http://5vpc5z.natappfree.cc', host: 'http://heucy7.natappfree.cc',
// #endif // #endif
// 是否vivo显示 // 是否vivo显示
showVivo: true, showVivo: true,

View File

@ -3,7 +3,8 @@
import { import {
reactive, reactive,
ref ref,
getCurrentInstance,
} from 'vue'; } from 'vue';
import { import {
onLoad, onLoad,
@ -14,7 +15,12 @@
import util from '@/common/js/util'; import util from '@/common/js/util';
// //
import api from '@/api/index.js'; import api from '@/api/index.js';
//
import secondPwd from '@/components/mine/payPwd.vue'
const {
proxy
} = getCurrentInstance()
// //
const form = reactive({ const form = reactive({
withdrawAmount: '', withdrawAmount: '',
@ -123,7 +129,7 @@
} }
// //
function handleSubmit() { function handleShowPwd() {
if (!form.withdrawAmount) { if (!form.withdrawAmount) {
util.alert('提现金额不能为空') util.alert('提现金额不能为空')
return return
@ -132,8 +138,8 @@
util.alert(`提现金额不能小于${config.minWithdrawalAmount}`) util.alert(`提现金额不能小于${config.minWithdrawalAmount}`)
return return
} }
//
typeList[typeIndex.value].confirm() proxy.$refs.secondPwdRef.open()
} }
// //
@ -189,6 +195,12 @@
// //
util.getPurse() util.getPurse()
} }
//
function handleSubmit() {
//
typeList[typeIndex.value].confirm()
}
</script> </script>
<template> <template>
@ -266,12 +278,16 @@
</view> </view>
<view class="line"> <view class="line">
<view class="btn pro black" @click="handleSubmit">提现</view> <view class="btn pro black" @click="handleShowPwd">提现</view>
</view> </view>
</view> </view>
<!-- --> <!-- -->
<view class="fill"></view> <view class="fill"></view>
<!-- 二级密码 -->
<secondPwd ref="secondPwdRef" :check="true" @confirm="handleSubmit" :unitKey="'balance'"
:price="form.withdrawAmount" />
</view> </view>
</template> </template>

View File

@ -423,7 +423,8 @@
// //
function getProductList() { function getProductList() {
api.shop.getProductionListByUserId({ api.shop.getProductionListByUserId({
data: { query: {
code: 'GIFT_PACK',
pageNum: product.pageNum, pageNum: product.pageNum,
pageSize: product.pageSize, pageSize: product.pageSize,
} }

View File

@ -278,7 +278,7 @@
<orderItem :item="item" mode="mine" @item="handleItem"> <orderItem :item="item" mode="mine" @item="handleItem">
<!-- 操作按钮 --> <!-- 操作按钮 -->
<template #menu="scope"> <template #menu="scope">
<view class="menu ptb20 df jcr" v-if="[0,1,4,5,6].includes(scope.item.status)"> <view class="menu ptb20 df jcr" v-if="[0,1,4,5,6].includes(scope.item.status) || scope.item.refundStatus == 1">
<!-- 售后中 --> <!-- 售后中 -->
<template v-if="scope.item.refundStatus == 1"> <template v-if="scope.item.refundStatus == 1">
<template v-if="scope.item.refundStatus == 4"> <template v-if="scope.item.refundStatus == 4">
@ -316,10 +316,10 @@
<!-- 已收货 --> <!-- 已收货 -->
<template v-else-if="scope.item.status == 5"> <template v-else-if="scope.item.status == 5">
<view class="btn bar closeHollow plr30" <view class="btn bar closeHollow plr30"
v-if="scope.item.afterSaleStatus === 1 && scope.item.isGiftPack != 1"> v-if="scope.item.afterSaleStatus === 1 && scope.item.isGiftPack != 1 && 0">
申请平台介入</view> 申请平台介入</view>
<view class="btn bar closeHollow plr30" <view class="btn bar closeHollow plr30"
@click.stop="order.orderAfterSales(scope.item)">申请退款</view> @click.stop="order.orderAfterSales(scope.item)" v-if="scope.item.isGiftPack != 1">申请退款</view>
<view class="btn bar warmHollow plr30" <view class="btn bar warmHollow plr30"
@click.stop="order.orderComment(scope.item)">评价</view> @click.stop="order.orderComment(scope.item)">评价</view>
</template> </template>

View File

@ -30,12 +30,12 @@
// //
addListener() addListener()
}) })
onUnload(() => { onUnload(() => {
// //
removeListener() removeListener()
}) })
onReachBottom(() => { onReachBottom(() => {
// //
getMoreList() getMoreList()
@ -77,7 +77,7 @@
function getList() { function getList() {
// //
api.shop.getProductionListByUserId({ api.shop.getProductionListByUserId({
data: { query: {
pageSize: product.pageSize, pageSize: product.pageSize,
pageNum: product.pageNum, pageNum: product.pageNum,
} }
@ -161,7 +161,10 @@
</view> </view>
<view class="info df fdc jcsb f1 ml20"> <view class="info df fdc jcsb f1 ml20">
<view class="name t2hd c333 f28">{{item.name}}</view> <view class="rows">
<view class="name t2hd c333 f28">{{item.name}}</view>
<view class="giftLogo wsn b ml10" v-if="item.categoryCode == 'GIFT_PACK'">礼包专区</view>
</view>
<view class="count fs0 c999 f24">销量{{item.sales}}</view> <view class="count fs0 c999 f24">销量{{item.sales}}</view>
@ -191,4 +194,7 @@
<style lang="scss" scoped> <style lang="scss" scoped>
// //
.giftLogo {
color: rgba(246, 160, 60);
}
</style> </style>

View File

@ -118,7 +118,7 @@
// //
if (item.refundStatus != 0) { if (item.refundStatus != 0) {
item.status_text = { item.status_text = {
'0': '待审核', '0': '待商家审核',
'1': '商家拒绝', '1': '商家拒绝',
'2': '退款中', '2': '退款中',
'3': '已退款', '3': '已退款',
@ -244,6 +244,45 @@
}) })
}) })
} }
/**
* 商家拒绝售后
* @param {Object} item 订单项
*/
function handleUnrefund(item) {
api.shop.setShopOrderUnrefund({
data: {
// id
id: item.refundOrder.id,
//
refundOrderNo: item.orderNo,
//
refundPrice: item.totalPrice,
},
}).then(res => {
if (res.code === 200) {
//
refreshList()
return
}
util.alert({
content: res.msg,
showCancel: false
})
})
}
/**
* 预览图片
* @param {Array} urls
* @param {Number} current
*/
function viewImage(urls, current) {
uni.previewImage({
urls,
current,
})
}
</script> </script>
<template> <template>
@ -271,54 +310,66 @@
<view class="mtb30"> <view class="mtb30">
<orderItem :item="item" mode="shop" @item="handleItem"> <orderItem :item="item" mode="shop" @item="handleItem">
<template #menu="scope"> <template #menu="scope">
<!-- 收货地址 --> <!-- 售后流程 -->
<view class="menu rows ptb20" v-if="[2,3,4,5,6].includes(scope.item.status)"> <template v-if="scope.item.refundStatus == 1">
<view class="key fs0 c333">收货地址</view> <!-- 退款原因 -->
<view class="value f1 ml20"> <view class="menu rows ptb20">
<view class="c333 f28"> <view class="key fs0 c333">退款原因</view>
{{scope.item.address.province}}{{scope.item.address.city}}{{scope.item.address.country}}{{scope.item.address.detail}} <view class="value f1 ml20">
</view> <view class="c333 f28">{{item.refundOrder.refundReasonWap}}</view>
<view class="mt10 c666 f24"> <view class="c333 f28">{{item.refundOrder.refundReasonContent}}</view>
<text>{{scope.item.address.name}}</text> <view class="imgList mt10 c666 f24">
<text>{{scope.item.address.mobile}}</text> <template
v-for="(secItem,secIndex) in item.refundOrder.refundReasonWapImg.split(',')"
:key="secIndex">
<image class="imgs wh80 br10" :src="secItem" mode="aspectFill"
@click.stop="viewImage(item.refundOrder.refundReasonWapImg.split(','),secIndex)" />
</template>
</view>
</view> </view>
</view> </view>
</view>
<!-- 退款原因 --> <view class="menu ptb20 df jcr">
<view class="menu rows ptb20" v-if="[6].includes(scope.item.status)"> <view class="btn bar closeHollow plr30"
<view class="key fs0 c333">退款原因</view> @click.stop="handleUnrefund(scope.item)">
<view class="value f1 ml20"> 拒绝退款</view>
<view class="c333 f28">不想要了</view>
<view class="imgList mt10 c666 f24">
<template v-for="(item,index) in 3" :key="index">
<image class="imgs wh80 br10" src="/static/logo.png"
mode="aspectFill" />
</template>
</view>
</view>
</view>
<!-- 操作按钮 -->
<view class="menu ptb20 df jcr" v-if="[0,1,6].includes(scope.item.status)">
<template v-if="scope.item.status == 0">
<view class="btn bar warmHollow plr30" @click="handlePriceChange(scope.item)">
修改价格</view>
</template>
<template v-if="scope.item.status == 1">
<view class="btn bar warmHollow plr30" @click.stop="handleExpress(scope.item)">
发货</view>
</template>
<template v-if="scope.item.status == 6">
<view class="btn bar closeHollow plr30">拒绝退款</view>
<view class="btn bar closeHollow plr30">同意退款</view> <view class="btn bar closeHollow plr30">同意退款</view>
<view class="btn bar warmHollow plr30">联系用户</view> <!-- <view class="btn bar warmHollow plr30">联系用户</view> -->
</template> </view>
</view> </template>
<template v-else>
<!-- 收货地址 -->
<view class="menu rows ptb20" v-if="[2,3,4,5,6].includes(scope.item.status)">
<view class="key fs0 c333">收货地址</view>
<view class="value f1 ml20">
<view class="c333 f28">
{{scope.item.address.province}}{{scope.item.address.city}}{{scope.item.address.country}}{{scope.item.address.detail}}
</view>
<view class="mt10 c666 f24">
<text>{{scope.item.address.name}}</text>
<text>{{scope.item.address.mobile}}</text>
</view>
</view>
</view>
<!-- 操作按钮 -->
<view class="menu ptb20 df jcr" v-if="[0,1,6].includes(scope.item.status)">
<template v-if="scope.item.status == 0">
<view class="btn bar warmHollow plr30"
@click="handlePriceChange(scope.item)">
修改价格</view>
</template>
<template v-if="scope.item.status == 1">
<view class="btn bar warmHollow plr30"
@click.stop="handleExpress(scope.item)">
发货</view>
</template>
</view>
</template>
</template> </template>
</orderItem> </orderItem>
</view> </view>
</template> </template>
</view> </view>
<!-- <JyOrderCard v-for="(item, index) in 10" type="user_order"></JyOrderCard> -->
</view> </view>
<!-- 填充 --> <!-- 填充 -->

View File

@ -3,9 +3,9 @@ import {
} from 'vite'; } from 'vite';
import uni from '@dcloudio/vite-plugin-uni'; import uni from '@dcloudio/vite-plugin-uni';
let target = 'http://91f.xyz:8080' // let target = 'http://91f.xyz:8080'
// let target = 'http://liuyd.cpolar.top' // let target = 'http://liuyd.cpolar.top'
// let target = 'http://e7dtri.natappfree.cc' let target = 'http://yjggbt.natappfree.cc'
export default defineConfig({ export default defineConfig({
plugins: [uni()], plugins: [uni()],