合并代码

This commit is contained in:
sx 2025-01-23 21:29:16 +08:00
parent ec7d686245
commit 9b9b2a568d
12 changed files with 536 additions and 362 deletions

View File

@ -190,6 +190,19 @@ const mine = {
load: true, load: true,
}) })
}, },
/**
* 获取收益列表
* @param {Object} param
*/
getGetList(param) {
return util.request({
url: '/user/profitSharingRecord/find',
data: param.data,
query: param.query,
method: 'POST',
})
},
} }
export default mine export default mine

View File

@ -357,6 +357,19 @@ const shop = {
load: true, load: true,
}) })
}, },
/**
* 订单确认收货
* @param {Object} param
*/
orderReceived(param) {
return util.request({
url: `/shopify/appOrder/receivedOrder`,
query: param.query,
method: 'PUT',
load: true,
})
},
} }
export default shop export default shop

View File

@ -6,7 +6,7 @@ const config = {
// #endif // #endif
// #ifndef H5 // #ifndef H5
// host: 'http://91f.xyz:8080', // host: 'http://91f.xyz:8080',
host: 'http://ugcege.natappfree.cc', host: 'http://yz78nt.natappfree.cc',
// #endif // #endif
// 支付方式配置 // 支付方式配置
payType: { payType: {

View File

@ -45,6 +45,41 @@ const order = {
}) })
}, },
/**
* 查看物流
* @param {Object} event 事件对象
*/
logistics(event) {
uni.navigateTo({
url: util.setUrl('/pages/shop/order/logistics', {
orderId: event.id,
})
})
},
/**
* 订单确认收货
* @param {Object} event 事件对象
*/
orderReceived: (event) => {
return new Promise((resolve, reject) => {
api.shop.orderReceived({
query: {
id: event.orderId,
},
}).then(res => {
if (res.code == 200) {
resolve(res.data)
return
}
util.alert({
content: res.msg,
showCancel: false,
})
})
})
},
/** /**
* 申请售后 * 申请售后
* @param {Object} event 事件对象 * @param {Object} event 事件对象

View File

@ -1,280 +1,180 @@
<template> <template>
<view class="tab" :style="{ background }"> <view class="tab">
<scroll-view class="scroll-view-content" scroll-x scroll-with-animation :show-scrollbar="false" <scroll-view class="scroll" scroll-x scroll-with-animation :show-scrollbar="false" :scroll-left="scrollLeft">
:scroll-left="scrollLeft"> <view class="list" :class="scroll ? '' : 'flex-row-left'" id="tab">
<view class="scroll-item-view" :class="scroll ? '' : 'flex-row-left'" id="tab"> <view class="item fmid ptb10 plr20" :class="{'active': index === currentIndex}" :id="'tab-item-' + index"
<view class="scroll-item" :class="[index == list.length - 1 ? 'no-right' : '']" v-for="(item, index) in list" :key="index" @click="clickTab(item, index)">
:style="{ color: currentIndex == index ? activeColor : '', height: tabHeight, 'line-height': tabHeight, 'font-size': fontSize, width: !scroll ? (100 / list.length) + '%' : '', 'margin-right': scroll ? marright : '', 'font-weight': currentIndex == index ? activeWeight : '' }" {{ item[titalName] }}
:id="'tab-item-' + index" v-for="(item, index) in list" :key="index" @click="clickTab(item, index)"> </view>
{{ item[titalName] }} </view>
</view> </scroll-view>
<view class="scroll-tab-bar" :style="[tabBarStyle]"></view> </view>
</view>
</scroll-view>
</view>
</template> </template>
<script> <script>
export default { export default {
props: { props: {
list: { list: {
type: Array, type: Array,
default: () => { default: () => {
return [] return []
} }
}, },
// tab titalName: {
current: { type: String,
type: [Number, String], default: 'name'
default: 0 },
}, //
titalName: { scroll: {
type: String, type: Boolean,
default: 'name' default: true
}, },
// barpx },
barWidth: { data() {
type: [String, Number], return {
default: 16 scrollLeft: 0,
}, componentWidth: 0, // tabspx
// bar parentLeft: 0, // (tabs)
barHeight: { scrollBarLeft: 0, // bartranslateX()
type: [String, Number], tabItemRectInfo: [],
default: 2 currentIndex: 0,
}, barFirstTimeMove: true
barStyle: { }
type: Object, },
default() { watch: {
return {} list(n, o) {
} // list
}, if (n.length !== o.length) this.currentIndex = 0;
// bar this.$nextTick(() => {
activeBarColor: { this.init();
type: String, });
default: '#4990F9' },
}, },
// mounted() {
activeColor: { this.init()
type: String, },
default: '#4990F9' methods: {
}, init() {
// , ms this.$nextTick(() => {
duration: { uni.createSelectorQuery().in(this).select(`#tab`).fields({
type: [String, Number], size: true,
default: 0.5 rect: true
}, }, data => {
// tab this.parentLeft = data.left;
height: { // tabs
type: Number, this.componentWidth = data.width;
default: 34 }).exec();
}, this.getTabItemRect()
// })
fontSize: { },
type: String, getTabItemRect() {
default: '16px' let query = uni.createSelectorQuery().in(this);
}, for (let i = 0; i < this.list.length; i++) {
// // sizerect
scroll: { query.select(`#tab-item-${i}`).fields({
type: Boolean, size: true,
default: true rect: true
}, });
// margin-right }
marright: { query.exec((data) => {
type: String, this.tabItemRectInfo = data
default: '38px' this.scrollByIndex()
}, })
// font-weight },
activeWeight: { scrollByIndex() {
type: String, let tabInfo = this.tabItemRectInfo[this.currentIndex]
default: 'normal' if (!tabInfo) return
}, // tab
background: { let tabWidth = tabInfo.width
type: String, let offsetLeft = tabInfo.left - this.parentLeft
default: '' // tabs-itemscroll-view
} let scrollLeft = offsetLeft - (this.componentWidth - tabWidth) / 2
}, this.scrollLeft = scrollLeft < 0 ? 0 : scrollLeft;
watch: { // item
list(n, o) { let left = tabInfo.left + tabInfo.width / 2 - this.parentLeft
// list this.scrollBarLeft = left - this.barWidth / 2;
if (n.length !== o.length) this.currentIndex = 0; if (this.barFirstTimeMove == true) {
this.$nextTick(() => { setTimeout(() => {
this.init(); this.barFirstTimeMove = false;
}); }, 100)
}, }
current: { },
immediate: true,
handler(nVal, oVal) { clickTab(item, index) {
// // tab
this.$nextTick(() => { if (index === this.currentIndex) return
this.currentIndex = nVal; this.currentIndex = index
this.scrollByIndex(); this.$emit('tabItemClick', item, index)
}); this.scrollByIndex()
} }
} }
}, }
computed: {
tabBarStyle: function () {
let style = {
width: this.barWidth + 'px',
height: this.barHeight + 'px',
transform: `translateX(${this.scrollBarLeft}px)`,
'transition-duration': `${this.barFirstTimeMove ? 0 : this.duration}s`,
'border-radius': `${this.barHeight / 2}px`,
'background-color': this.activeBarColor
}
Object.assign(style, this.barStyle)
return style
},
tabHeight() {
return this.height + 'px'
}
},
data() {
return {
scrollLeft: 0,
componentWidth: 0, // tabspx
parentLeft: 0, // (tabs)
scrollBarLeft: 0, // bartranslateX()
tabItemRectInfo: [],
currentIndex: 0,
barFirstTimeMove: true
};
},
mounted() {
this.init()
},
methods: {
init() {
this.$nextTick(() => {
uni.createSelectorQuery().in(this).select(`#tab`).fields({
size: true,
rect: true
}, data => {
this.parentLeft = data.left;
// tabs
this.componentWidth = data.width;
}).exec();
this.getTabItemRect()
})
},
getTabItemRect() {
let query = uni.createSelectorQuery().in(this);
for (let i = 0; i < this.list.length; i++) {
// sizerect
query.select(`#tab-item-${i}`).fields({
size: true,
rect: true
});
}
query.exec((data) => {
this.tabItemRectInfo = data
this.scrollByIndex()
})
},
scrollByIndex() {
let tabInfo = this.tabItemRectInfo[this.currentIndex]
if (!tabInfo) return
// tab
let tabWidth = tabInfo.width
let offsetLeft = tabInfo.left - this.parentLeft
// tabs-itemscroll-view
let scrollLeft = offsetLeft - (this.componentWidth - tabWidth) / 2
this.scrollLeft = scrollLeft < 0 ? 0 : scrollLeft;
// item
let left = tabInfo.left + tabInfo.width / 2 - this.parentLeft
this.scrollBarLeft = left - this.barWidth / 2;
if (this.barFirstTimeMove == true) {
setTimeout(() => {
this.barFirstTimeMove = false;
}, 100)
}
},
clickTab(item, index) {
// tab
if (index == this.currentIndex) return
this.currentIndex = index
this.$emit('tabItemClick', item, index)
this.scrollByIndex()
}
}
}
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.tab { .tab {
position: sticky; position: sticky;
top: 88rpx; top: 88rpx;
left: 0; left: 0;
width: 100%; width: 100%;
z-index: 9; z-index: 9;
height: 88rpx; }
}
scroll-view { scroll-view {
box-sizing: border-box; box-sizing: border-box;
height: 100%; height: 100%;
} }
::v-deep ::-webkit-scrollbar { ::v-deep ::-webkit-scrollbar {
display: none display: none
} }
/* #ifndef APP-NVUE */ /* #ifndef APP-NVUE */
::-webkit-scrollbar, ::-webkit-scrollbar,
::-webkit-scrollbar, ::-webkit-scrollbar,
::-webkit-scrollbar { ::-webkit-scrollbar {
display: none; display: none;
width: 0 !important; width: 0 !important;
height: 0 !important; height: 0 !important;
-webkit-appearance: none; -webkit-appearance: none;
background: transparent; background: transparent;
} }
/* #endif */ /* #endif */
/* #ifdef H5 */ /* #ifdef H5 */
// 穿H5scroll-view // 穿H5scroll-view
scroll-view ::v-deep ::-webkit-scrollbar { scroll-view ::v-deep ::-webkit-scrollbar {
display: none; display: none;
width: 0 !important; width: 0 !important;
height: 0 !important; height: 0 !important;
-webkit-appearance: none; -webkit-appearance: none;
background: transparent; background: transparent;
} }
/* #endif */ /* #endif */
.scroll-view-content { .scroll {
white-space: nowrap; position: relative;
width: 100%; white-space: nowrap;
position: relative; width: 100%;
.scroll-item-view { .list {
width: 100%; position: relative;
white-space: nowrap; width: 100%;
position: relative; white-space: nowrap;
margin-bottom: 20rpx; }
}
.scroll-item { .item {
position: relative; position: relative;
padding: 0 20rpx; display: inline-block;
display: inline-block; color: #8C8C8C;
text-align: center;
color: #8C8C8C;
}
.mar-r-38 { //
margin-right: 76rpx; &.active {
} color: #333;
font-weight: bold;
.no-right { transform: scale(1.1);
margin: 0; }
} }
}
.scroll-tab-bar {
position: absolute;
bottom: 0;
z-index: 10;
}
}
</style> </style>

View File

@ -122,12 +122,17 @@
util.alert('请选择收货地址') util.alert('请选择收货地址')
return return
} }
//
emit('confirm', { let param = {
spec: currentSpec.value, spec: currentSpec.value,
spaceIndex: spaceIndex.value, spaceIndex: spaceIndex.value,
payNum: payNum.value, payNum: payNum.value,
}) }
//
if (address.id) param.address = address
emit('confirm', param)
// //
spaceIndexLast.value = spaceIndex.value spaceIndexLast.value = spaceIndex.value
payNumLast.value = payNum.value payNumLast.value = payNum.value

View File

@ -0,0 +1,79 @@
<script setup>
//
import {
ref,
reactive,
getCurrentInstance,
defineExpose,
} from 'vue'
//
import util from '@/common/js/util';
// api
import api from '@/api/index.js';
const {
proxy
} = getCurrentInstance()
//
const form = reactive({
//
expressName: '',
//
trackingNumber: '',
})
//
function getExpressList() {
api.getDict({
path: ['express_company'],
}).then(rs => {
if (rs.code == 200) {
return
}
util.alert({
content: rs.msg,
showCancel: false,
})
})
}
//
function open() {
proxy.$refs.express.open()
}
//
function close() {
proxy.$refs.express.close()
}
defineExpose({
open,
close
})
</script>
<template>
<uni-popup ref="express" type="center">
<view class="expressAlt">
<view class="header rows">
<view>填写快递单号</view>
<uni-icons type="closeempty" />
</view>
<view class="form">
<view class="line df aic">
<view class="">快递公司</view>
<input type="text" placeholder="输入快递公司" />
</view>
<view class="line df aic">
<view class="">快递单号</view>
<input type="text" placeholder="输入快递公司" />
</view>
</view>
</view>
</uni-popup>
</template>
<style>
</style>

View File

@ -27,13 +27,35 @@
proxy proxy
} = getCurrentInstance() } = getCurrentInstance()
const store = useStore() const store = useStore()
// //
const scrollLog = reactive({ const scrollLog = reactive({
data: [], data: [],
pageNum: 1, pageNum: 1,
pageSize: 30, pageSize: 30,
total: 0, total: 0,
}) })
//
const getLog = reactive({
data: [],
pageNum: 1,
pageSize: 30,
total: 0,
})
//
const getTypeList = reactive([{
type: 0,
name: '待结算',
}, {
type: 1,
name: '待入账',
}, {
type: 2,
name: '已入账',
}])
//
const getTypeListIndex = ref(0)
//
const releasedLst = ref([])
// //
const userinfo = computed(() => { const userinfo = computed(() => {
let result = store.state.userinfo || {} let result = store.state.userinfo || {}
@ -44,16 +66,57 @@
let result = store.state.purse || {} let result = store.state.purse || {}
return result return result
}) })
//
const releasedList = ref([])
onLoad(() => { onLoad(() => {
// //
getReleased() getReleased()
//
getGetList()
// //
util.getPurse() util.getPurse()
}) })
//
function refreshMoreGetList() {
getLog.pageNum = 1
//
getGetList()
}
//
function getMoreGetList() {
if (getLog.total <= getLog.data.length) return
getLog.pageNum++
//
getGetList()
}
//
function getGetList() {
api.mine.getGetList({
query: {
pageSize: getLog.pageSize,
pageNum: getLog.pageNum,
},
data: {
status: getTypeList[getTypeListIndex.value].type,
},
}).then(rs => {
if (rs.code == 200) {
if (getLog.pageNum === 1) getLog.data.length = 0
//
getLog.data.push(...rs.rows)
//
getLog.total = rs.total
return
}
util.alert({
content: rs.msg,
showCancel: false,
})
})
}
// //
function getReleased() { function getReleased() {
api.mine.releasedList({}).then(rs => { api.mine.releasedList({}).then(rs => {
@ -68,6 +131,18 @@
}) })
} }
/**
* 收益类型下标
* @param {Object} index
*/
function handleGetTypeIndex(index) {
if (getTypeListIndex.value === index) return
getTypeListIndex.value = index
getLog.data.length = 0
//
refreshMoreGetList()
}
/** /**
* 跳转 * 跳转
* @param {Object} url 路径 * @param {Object} url 路径
@ -113,19 +188,19 @@
<uni-icons type="right" color="" /> <uni-icons type="right" color="" />
</view> </view>
<view class="rows mtb30 ptb20 plr30 cfff f34 b000 br10" @click="link('/pages/index/wallet/merchantBill')"> <view class="rows mtb30 ptb20 plr30 cfff f34 b000 br10">
<text>商家账单</text> <text>商家明细</text>
<uni-icons type="right" color="" /> <uni-icons type="right" color="" />
</view> </view>
<view class="rows mtb30 ptb20 plr30 cfff f34 b000 br10" @click="link('/pages/index/wallet/merchantBill')"> <view class="rows mtb30 ptb20 plr30 cfff f34 b000 br10" @click="$refs.get.open()">
<text>我的收益</text> <text>我的收益</text>
<uni-icons type="right" color="" /> <uni-icons type="right" color="" />
</view> </view>
<!-- 待释放 --> <!-- 待释放 -->
<uni-popup ref="released" type="center"> <uni-popup ref="released" type="center">
<view class="releasedAlt oh popMid bfff br20"> <view class="releasedAlt alertContainer oh popMid bfff br20">
<view class="header rows ptb20 plr20 c333 f34 b"> <view class="header rows ptb20 plr20 c333 f34 b">
<view class="title">待入账列表</view> <view class="title">待入账列表</view>
<uni-icons type="closeempty" @click="$refs.released.close()" /> <uni-icons type="closeempty" @click="$refs.released.close()" />
@ -146,6 +221,36 @@
</view> </view>
</view> </view>
</uni-popup> </uni-popup>
<!-- 收益 -->
<uni-popup ref="get" type="center">
<view class="getAlt alertContainer oh popMid bfff br20">
<view class="header rows ptb20 plr20 c333 f34 b">
<view class="title">我的收益</view>
<uni-icons type="closeempty" @click="$refs.get.close()" />
</view>
<view class="tab">
<view class="item fmid fdc ptb10" :class="{'active':index === getTypeListIndex}"
v-for="(item,index) in getTypeList" :key="index" @click="handleGetTypeIndex(index)">
<view>{{item.name}}</view>
</view>
</view>
<view class="main mtb20 plr30">
<scroll-view scroll-y="true" class="scroll" @scrolltolower="getMoreGetList">
<view class="list c333 f30">
<view class="item mtb30 f32" v-for="(item,index) in getLog.data" :key="index">
<view>{{item.typeName}}{{item.amount}}</view>
<view class="time mt10 c999 f28 ">{{item.createTime}}</view>
</view>
</view>
<view class="nomore" v-if="!getLog.data[0]">暂无内容~</view>
<view class="nomore" v-else-if="getLog.data.length === getLog.total">暂无更多~</view>
</scroll-view>
</view>
</view>
</uni-popup>
</view> </view>
</template> </template>
@ -156,62 +261,29 @@
} }
// //
.releasedAlt { .alertContainer {
.header { .header {
border-bottom: 2rpx solid #ddd; border-bottom: 2rpx solid #ddd;
} }
// tab
.tab {
display: flex;
//
.item {
flex: 1;
color: #999;
&.active {
font-weight: 600;
color: #333;
}
}
}
.scroll { .scroll {
height: 50vh; height: 50vh;
} }
} }
//
.setted {
width: 562rpx;
height: 516rpx;
background-image: linear-gradient(143deg, #27EFE2 0%, #A45EFF 43%, #FF004F 100%);
box-shadow: 0 8rpx 20rpx rgba(0, 0, 0, 0.3);
border-radius: 20rpx;
//
.title {
top: 80rpx;
left: 30rpx;
}
//
.cartoon {
top: 20rpx;
right: -50rpx;
width: 280rpx;
height: 400rpx;
}
//
.weal {
width: 562rpx;
height: 268rpx;
//
.bg {
border-radius: 20rpx;
}
}
}
//
.button {
box-shadow: 0 8rpx 20rpx rgba(0, 0, 0, .3);
}
//
.close {
width: 86rpx;
height: 86rpx;
margin: 0 auto;
border-radius: 50%;
background-color: #999999;
box-shadow: 0 8rpx 20rpx rgba(0, 0, 0, 0.3);
}
</style> </style>

View File

@ -114,7 +114,7 @@
api.shop.addOrder({ api.shop.addOrder({
data: [{ data: [{
// id // id
addressId: address.id, addressId: event.address.id,
// id // id
productId: props.detail.id, productId: props.detail.id,
// id // id

View File

@ -2,7 +2,8 @@
// //
import { import {
ref, ref,
reactive reactive,
getCurrentInstance
} from 'vue' } from 'vue'
import { import {
onLoad, onLoad,
@ -11,18 +12,23 @@
onPullDownRefresh, onPullDownRefresh,
onPageScroll onPageScroll
} from '@dcloudio/uni-app'; } from '@dcloudio/uni-app';
//
import apex from '@/components/header/apex.vue'
//
import JyShopNavigation from '@/components/public/jy-shop-navigation'
//
import orderItem from '@/components/shop/order/item.vue';
// //
import util from '@/common/js/util'; import util from '@/common/js/util';
// api // api
import api from '@/api/index.js'; import api from '@/api/index.js';
// //
import order from '@/common/js/order.js' import order from '@/common/js/order.js'
//
import apex from '@/components/header/apex.vue'
//
import JyShopNavigation from '@/components/public/jy-shop-navigation'
//
import orderItem from '@/components/shop/order/item.vue';
//
import expressVue from '@/components/shop/order/express.vue';
const {
proxy
} = getCurrentInstance()
// tabs // tabs
const tabs = reactive([{ const tabs = reactive([{
@ -132,16 +138,32 @@
if (res.code == 200) { if (res.code == 200) {
if (list.pageNum == 1) list.data.length = 0 if (list.pageNum == 1) list.data.length = 0
list.data.push(...res.rows.map(item => { list.data.push(...res.rows.map(item => {
//
item.status = Number(item.status) item.status = Number(item.status)
if(item.refundStatus != 0) item.status_text = '售后' item.refundStatus = Number(item.refundStatus)
// item.status_text = //
if (item.refundStatus != 0) {
item.status_text = {
'1': '售后中',
'3': '售后完成',
} [item.refundStatus]
} else {
item.status_text = {
'0': '待支付',
'1': '待发货',
'4': '待收货',
'5': '已收货',
'6': '已完成',
'9': '已取消',
} [item.status]
}
return item return item
})) }))
list.total = res.total list.total = res.total
return return
} }
util.alert({ util.alert({
content: rs.msg, content: res.msg,
showCancel: false showCancel: false
}) })
}) })
@ -164,6 +186,7 @@
* @param {Object} ev * @param {Object} ev
*/ */
function itemClick(ev) { function itemClick(ev) {
list.status = ev.id
// //
refreshList() refreshList()
} }
@ -180,6 +203,19 @@
refreshList() refreshList()
}) })
} }
/**
* 确认收货
* @param {Object} item
*/
function handleReceived(item) {
order.orderReceived({
orderId: item.id,
}).then(res => {
//
refreshList()
})
}
</script> </script>
<template> <template>
@ -196,8 +232,7 @@
<view class="shopHeaderBg bgColor"></view> <view class="shopHeaderBg bgColor"></view>
<view class="f1 pr"> <view class="f1 pr">
<JyShopNavigation :current="list.status" :list="tabs" @tabItemClick="itemClick" marright="25px" <JyShopNavigation :list="tabs" @tabItemClick="itemClick" />
activeWeight='600' activeColor="#333333" activeBarColor="initial" />
</view> </view>
<view class="product mlr20 pr"> <view class="product mlr20 pr">
@ -206,28 +241,38 @@
<template v-for="(item,index) in list.data" :key="index"> <template v-for="(item,index) in list.data" :key="index">
<view class="mtb30"> <view class="mtb30">
<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)">
<template v-if="scope.item.status == 0"> <template v-if="scope.item.refundStatus == 1">
<view class="btn bar warmHollow plr30" @click.stop="handleCancel(scope.item)">
填写退货物流信息</view>
</template>
<template v-else-if="scope.item.status == 0">
<view class="btn bar closeHollow plr30" @click.stop="handleCancel(scope.item)"> <view class="btn bar closeHollow plr30" @click.stop="handleCancel(scope.item)">
取消订单</view> 取消订单</view>
<view class="btn bar warmHollow plr30" @click.stop="order.orderPay(item)">继续付款 <view class="btn bar warmHollow plr30" @click.stop="order.orderPay(item)">继续付款
</view> </view>
</template> </template>
<template v-if="scope.item.status == 1"> <template v-else-if="scope.item.status == 1">
<!-- <view class="btn bar closeHollow plr30" @click.stop="order.orderAfterSales(item)">申请退款</view> --> <view class="btn bar closeHollow plr30"
@click.stop="order.orderAfterSales(item)">申请退款</view>
<!-- <view class="btn bar warmHollow plr30">催发货</view> --> <!-- <view class="btn bar warmHollow plr30">催发货</view> -->
</template> </template>
<template v-if="scope.item.status == 4"> <template v-else-if="scope.item.status == 4">
<!-- <view class="btn bar closeHollow plr30">申请退款</view> --> <view class="btn bar closeHollow plr30"
<view class="btn bar closeHollow plr30">查看物流</view> @click.stop="order.orderAfterSales(item)">申请退款</view>
<view class="btn bar warmHollow plr30">确认收货</view> <view class="btn bar closeHollow plr30" @click.stop="order.logistics(item)">查看物流
</view>
<view class="btn bar warmHollow plr30" @click.stop="handleReceived(item)">确认收货
</view>
</template> </template>
<template v-if="scope.item.status == 5"> <template v-else-if="scope.item.status == 5">
<view class="btn bar closeHollow plr30" @click.stop="order.orderAfterSales(item)">申请退款</view> <view class="btn bar closeHollow plr30"
@click.stop="order.orderAfterSales(item)">申请退款</view>
<view class="btn bar warmHollow plr30">评价</view> <view class="btn bar warmHollow plr30">评价</view>
</template> </template>
<template v-if="scope.item.status == 6"> <template v-else-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 closeHollow plr30">钱款去向</view>
<view class="btn bar warmHollow plr30">平台介入</view> <view class="btn bar warmHollow plr30">平台介入</view>
@ -238,9 +283,11 @@
</view> </view>
</template> </template>
</view> </view>
<!-- <JyOrderCard v-for="(item, index) in 10" type="user_order"></JyOrderCard> -->
</view> </view>
</view> </view>
<!-- 物流弹窗 -->
<expressVue ref="expressRef" />
</template> </template>
<style scoped lang="scss"> <style scoped lang="scss">

View File

@ -45,17 +45,28 @@
// select form // select form
const mode = ref('select') const mode = ref('select')
// //
const typeList = reactive([{ const typeList = computed(() => {
type: 1, let result = []
name: '我要退款(无需退货)',
text: '未收到货,或与商家协商之后申请', //
}, if ([4].includes(detail.status)) {
{ result.push({
type: 2, type: 1,
name: '已收到货,我要退货退款', name: '我要退款(无需退货)',
text: '已收到货,需要退还已收到的货物', text: '未收到货,或与商家协商之后申请',
}, })
]) }
//
if ([5, 6].includes(detail.status)) {
result.push({
type: 2,
name: '已收到货,我要退货退款',
text: '已收到货,需要退还已收到的货物',
})
}
return result
})
// 退 // 退
const typeIndex = ref('') const typeIndex = ref('')
// //
@ -188,7 +199,7 @@
// //
orderId: detail.id, orderId: detail.id,
// 1-退2-退退 // 1-退2-退退
afterSalesType: typeList[typeIndex.value].type, afterSalesType: typeList.value[typeIndex.value].type,
// 退-refund_reason // 退-refund_reason
refundReasonWap: reasonList[reasonIndex.value].dictLabel, refundReasonWap: reasonList[reasonIndex.value].dictLabel,
// 退 // 退
@ -197,7 +208,6 @@
refundReasonContent: data.refundReasonContent, refundReasonContent: data.refundReasonContent,
}, },
}).then(res => { }).then(res => {
return
if (res.code == 200) { if (res.code == 200) {
// //
uni.$off('updateOrderList') uni.$off('updateOrderList')

View File

@ -5,7 +5,7 @@ import uni from '@dcloudio/vite-plugin-uni';
// //
// let target = 'http://91f.xyz:8080' // let target = 'http://91f.xyz:8080'
let target = 'http://ugcege.natappfree.cc' let target = 'http://yz78nt.natappfree.cc'
export default defineConfig({ export default defineConfig({
plugins: [uni()], plugins: [uni()],