工作代码提交

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({
url: `/shopify/appProductionApi/getProductionListByUserId`,
data: param.data,
query: param.query,
method: 'GET',
load: true,
})
@ -537,6 +538,32 @@ const shop = {
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

View File

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

View File

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

View File

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

View File

@ -278,7 +278,7 @@
<orderItem :item="item" mode="mine" @item="handleItem">
<!-- 操作按钮 -->
<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 == 4">
@ -316,10 +316,10 @@
<!-- 已收货 -->
<template v-else-if="scope.item.status == 5">
<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 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"
@click.stop="order.orderComment(scope.item)">评价</view>
</template>

View File

@ -30,12 +30,12 @@
//
addListener()
})
onUnload(() => {
//
removeListener()
})
onReachBottom(() => {
//
getMoreList()
@ -77,7 +77,7 @@
function getList() {
//
api.shop.getProductionListByUserId({
data: {
query: {
pageSize: product.pageSize,
pageNum: product.pageNum,
}
@ -161,7 +161,10 @@
</view>
<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>
@ -191,4 +194,7 @@
<style lang="scss" scoped>
//
.giftLogo {
color: rgba(246, 160, 60);
}
</style>

View File

@ -118,7 +118,7 @@
//
if (item.refundStatus != 0) {
item.status_text = {
'0': '待审核',
'0': '待商家审核',
'1': '商家拒绝',
'2': '退款中',
'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>
<template>
@ -271,54 +310,66 @@
<view class="mtb30">
<orderItem :item="item" mode="shop" @item="handleItem">
<template #menu="scope">
<!-- 收货地址 -->
<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>
<!-- 售后流程 -->
<template v-if="scope.item.refundStatus == 1">
<!-- 退款原因 -->
<view class="menu rows ptb20">
<view class="key fs0 c333">退款原因</view>
<view class="value f1 ml20">
<view class="c333 f28">{{item.refundOrder.refundReasonWap}}</view>
<view class="c333 f28">{{item.refundOrder.refundReasonContent}}</view>
<view class="imgList mt10 c666 f24">
<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 class="menu rows ptb20" v-if="[6].includes(scope.item.status)">
<view class="key fs0 c333">退款原因</view>
<view class="value f1 ml20">
<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="menu ptb20 df jcr">
<view class="btn bar closeHollow plr30"
@click.stop="handleUnrefund(scope.item)">
拒绝退款</view>
<view class="btn bar closeHollow plr30">同意退款</view>
<view class="btn bar warmHollow plr30">联系用户</view>
</template>
</view>
<!-- <view class="btn bar warmHollow plr30">联系用户</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>
</orderItem>
</view>
</template>
</view>
<!-- <JyOrderCard v-for="(item, index) in 10" type="user_order"></JyOrderCard> -->
</view>
<!-- 填充 -->

View File

@ -3,9 +3,9 @@ import {
} from 'vite';
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://e7dtri.natappfree.cc'
let target = 'http://yjggbt.natappfree.cc'
export default defineConfig({
plugins: [uni()],