合并代码
This commit is contained in:
parent
ec7d686245
commit
9b9b2a568d
|
@ -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
|
|
@ -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
|
|
@ -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: {
|
||||||
|
|
|
@ -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 事件对象
|
||||||
|
|
|
@ -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
|
||||||
},
|
},
|
||||||
// 菜单底部移动的bar的宽度,单位px
|
},
|
||||||
barWidth: {
|
data() {
|
||||||
type: [String, Number],
|
return {
|
||||||
default: 16
|
scrollLeft: 0,
|
||||||
},
|
componentWidth: 0, // tabs组件宽度,单位为px
|
||||||
// 移动bar的高度
|
parentLeft: 0, // 父元素(tabs组件)到屏幕左边的距离
|
||||||
barHeight: {
|
scrollBarLeft: 0, // 移动bar需要通过translateX()移动的距离
|
||||||
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++) {
|
||||||
// 是否滚动,默认是,否则是不滚动,按个数等分宽度
|
// 只要size和rect两个参数
|
||||||
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-item移动到屏幕正中间,实际上是对scroll-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, // tabs组件宽度,单位为px
|
|
||||||
parentLeft: 0, // 父元素(tabs组件)到屏幕左边的距离
|
|
||||||
scrollBarLeft: 0, // 移动bar需要通过translateX()移动的距离
|
|
||||||
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++) {
|
|
||||||
// 只要size和rect两个参数
|
|
||||||
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-item移动到屏幕正中间,实际上是对scroll-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 */
|
||||||
// 通过样式穿透,隐藏H5下,scroll-view下的滚动条
|
// 通过样式穿透,隐藏H5下,scroll-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>
|
|
@ -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
|
||||||
|
|
|
@ -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>
|
|
@ -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>
|
|
@ -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
|
||||||
|
|
|
@ -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">
|
||||||
|
|
|
@ -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')
|
||||||
|
|
|
@ -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()],
|
||||||
|
|
Loading…
Reference in New Issue