修复bug

This commit is contained in:
weipengfei 2024-03-09 17:11:28 +08:00
parent 89d15488cc
commit a6f33524dc
7 changed files with 97 additions and 101 deletions

View File

@ -162,7 +162,7 @@
uni.navigateBack({ uni.navigateBack({
delta:1 delta:1
}); });
},500) },1500)
}) })
}, },
// //

View File

@ -12,12 +12,17 @@
<view class="content-top_img" v-else @click="login"> <view class="content-top_img" v-else @click="login">
<image src="@/static/images/f.png" mode="aspectFit"></image> <image src="@/static/images/f.png" mode="aspectFit"></image>
</view> </view>
<view class="content-top-title" @click="shopp" v-if="Object.keys(userInfoData).length>0"> <view v-if="Object.keys(userInfoData).length>0">
<view class="top-titlea"> <view class="content-top-title" @click="shopp" v-if="Object.keys(userInfoData).length>0">
{{userInfoData.mer_info.mer_name?userInfoData.mer_info.mer_name:'暂无信息'}} <view class="top-titlea">
{{userInfoData.mer_info.mer_name?userInfoData.mer_info.mer_name:'暂无信息'}}
</view>
<view class="top-titleb">
<image src="@/static/images/you.png" mode=""></image>
</view>
</view> </view>
<view class="top-titleb"> <view class="content-mer-type" v-if="userInfoData.mer_info">
<image src="@/static/images/you.png" mode=""></image> <text>{{userInfoData.mer_info.type_name}}</text>
</view> </view>
</view> </view>
<view class="content-top-title" @click="login" v-else> <view class="content-top-title" @click="login" v-else>
@ -2185,6 +2190,16 @@
} }
} }
.content-mer-type{
font-size: 22rpx;
padding: 0 10rpx;
text{
background-color: $theme-color;
padding: 2rpx 8rpx 0 8rpx;
color: #fff;
border-radius: 8rpx;
}
}
} }
.content-middle { .content-middle {

View File

@ -23,7 +23,7 @@
<view class="tab"> <view class="tab">
<view class="item active" style="margin: 0;">{{merchant_Data.margin}}</view> <view class="item active" style="margin: 0;">{{merchant_Data.margin}}</view>
</view> </view>
<button class="btn" @click="paydecimal">缴纳</button> <button class="btn" :class="{'btn-d': merchant_Data.is_margin != 1}" @click="paydecimal">{{merchant_Data.is_margin != 1?"无需缴纳":"缴纳"}}</button>
</view> </view>
<!-- <view class="tip"> <!-- <view class="tip">
<view class="title">注意事项</view> <view class="title">注意事项</view>
@ -170,28 +170,30 @@
content: '商户' + this.merchant_Data.mer_name + '是否同意缴纳押金', content: '商户' + this.merchant_Data.mer_name + '是否同意缴纳押金',
success: (res) => { success: (res) => {
if (res.confirm) { if (res.confirm) {
// console.log(''); // console.log('');
paymerchant().then((res) => { paymerchant().then((res) => {
console.log(res); try{
uni.requestPayment({ uni.requestPayment({
provider: 'wxpay', provider: 'wxpay',
orderInfo: res.data orderInfo: res.data
.config, // .config, //
success: (res) => { success: (res) => {
this.$util.Tips({ this.$util.Tips({
title: '支付成功' title: '支付成功'
}); });
this.decimal() this.decimal()
this.list(true) this.list(true)
}, },
fail: (err) => { fail: (err) => {
this.$util.Tips({ this.$util.Tips({
title: '支付失败' title: '支付失败'
}); });
console.log('fail:' + JSON.stringify(err)); console.log('fail:' + JSON.stringify(err));
} }
}); });
}catch(err){
Toast('请前往小程序中支付')
}
}).catch((err) => { }).catch((err) => {
this.$util.Tips({ this.$util.Tips({
title: err title: err
@ -225,7 +227,7 @@
if (isPage === true) that.$set(that, 'deductList', []); if (isPage === true) that.$set(that, 'deductList', []);
that.loading2 = true; that.loading2 = true;
that.loadTitle2 = ''; that.loadTitle2 = '';
autoMarginlist(36, that.where2).then(res=>{ autoMarginlist(this.mer_id, that.where2).then(res=>{
let list = res.data; let list = res.data;
let deductList = that.$util.SplitArray(list, that.deductList); let deductList = that.$util.SplitArray(list, that.deductList);
let loadend = list.length < that.where2.limit; let loadend = list.length < that.where2.limit;
@ -405,6 +407,9 @@
font-weight: 400; font-weight: 400;
color: #FFFFFF; color: #FFFFFF;
} }
.btn-d{
background-color: #999;
}
} }
.tip { .tip {

View File

@ -1,39 +1,8 @@
<template> <template>
<view class="content"> <view class="content">
<view class="content-top">
<view class="content-tops">
<view class="content-top_img" v-if="Object.keys(userInfoData).length>0">
<image :src="userInfoData.mer_info.mer_avatar"
v-if="userInfoData.mer_info&&userInfoData.mer_info.mer_avatar" mode="aspectFill"
@click="logout">
</image>
<image src="@/static/images/f.png" v-else mode="aspectFit" @click="logout"></image>
</view>
<view class="content-top_img" v-else @click="login">
<image src="@/static/images/f.png" mode="aspectFit"></image>
</view>
<view class="content-top-title" @click="shopp" v-if="Object.keys(userInfoData).length>0">
<view class="top-titlea">
{{userInfoData.mer_info.mer_name?userInfoData.mer_info.mer_name:'暂无信息'}}
</view>
<view class="top-titleb">
<image src="@/static/images/you.png" mode=""></image>
</view>
</view>
<view class="content-top-title" @click="login" v-else>
<view class="top-titlea">
请登录
</view>
<view class="top-titleb">
<image src="@/static/images/you.png" mode=""></image>
</view>
</view>
</view>
<retuntop style="margin-top: 20rpx; margin-right: 50rpx;" />
</view>
<view class="content-middle"> <view class="content-middle">
<view class="content-middlea" v-for="(item,index) in list" :key='index' @click="handleToWithDraw"> <view class="content-middlea" v-for="(item,index) in list" :key='index' @click="handleToWithDraw(item, index)">
<view class="content-middlea-one"> <view class="content-middlea-one">
{{item.name}} {{item.name}}
</view> </view>
@ -537,12 +506,14 @@
}, },
methods: { methods: {
// //
handleToWithDraw() { handleToWithDraw(item, index) {
uni.navigateTo({ let url;
url: "/pages/users/embody/embody?mer_id=" + this.userInfoData.service.mer_id if(index<2) url = "/pages/users/embody/embody?mer_id=" + this.userInfoData.service.mer_id;
}) else url = `/pages/admin/orderList/index?merId=${this.userInfoData.service.mer_id}&types=2`
uni.navigateTo({
url: url
})
}, },
// //
initTypeLiseMenu() { initTypeLiseMenu() {
@ -1758,7 +1729,7 @@
} }
.content { .content {
padding-top: 80rpx; // padding-top: 80rpx;
.content-top { .content-top {
display: flex; display: flex;
@ -1820,7 +1791,7 @@
// padding: 0 30rpx; // padding: 0 30rpx;
display: flex; display: flex;
justify-content: space-around; justify-content: space-around;
margin-top: 61rpx; margin-top: 21rpx;
.content-middlea { .content-middlea {
// width: 161rpx; // width: 161rpx;

View File

@ -287,12 +287,12 @@
</view> </view>
<view class='item acea-row row-between' v-if="orderInfo.activity_type == 2"> <view class='item acea-row row-between' v-if="orderInfo.activity_type == 2">
<view>实付款</view> <view>实付款</view>
<view class='conter'>{{orderInfo.presell_price}}</view> <view class='conter' style="color: #f45846;">{{orderInfo.presell_price}}</view>
</view> </view>
<view class="settel" v-else> <view class="settel" v-else>
<view class='settel-t'> <view class='settel-t'>
<view>实付款</view> <view>实付款</view>
<view class='conter'>{{orderInfo.pay_price}}</view> <view class='conter' style="color: #f45846;">{{orderInfo.pay_price}}</view>
</view> </view>
<view class="settel-m" v-if="orderInfo.pay_type == 8 && orderInfo.status == 12"> <view class="settel-m" v-if="orderInfo.pay_type == 8 && orderInfo.status == 12">
结算周期到期后付款 100.00 结算周期到期后付款 100.00

View File

@ -235,7 +235,7 @@
} else if (this.product_type == 99) { } else if (this.product_type == 99) {
if(val==1){ if(val==1){
uni.navigateTo({ uni.navigateTo({
url: `/pages/users/order_list/relase?status=1&product_type=${this.product_type}` url: `/pages/users/order_list/relase?status=2&product_type=${this.product_type}`
}) })
}else{ }else{
uni.navigateTo({ uni.navigateTo({
@ -245,9 +245,9 @@
} else { } else {
if(val==1){ if(val==1){
uni.navigateTo({ uni.navigateTo({
url: '/pages/users/order_list/index?status=1&product_type=0' url: '/pages/users/order_list/index?status=2&product_type=0'
}) })
}else{ }else{
uni.navigateTo({ uni.navigateTo({
url: '/pages/users/order_list/index?status=0&product_type=0' url: '/pages/users/order_list/index?status=0&product_type=0'

View File

@ -63,7 +63,7 @@
<view v-if="orderList.length > 0"> <view v-if="orderList.length > 0">
<block v-if="orderStatus == 0"> <block v-if="orderStatus == 0">
<view class='item' v-for="(item,index) in orderList" :key="index"> <view class='item' v-for="(item,index) in orderList" :key="index">
<view @click='goOrderDetails(item.group_order_id)'> <view @click='goOrderDetails(item.group_order_id, item)'>
<view class='title acea-row row-between-wrapper'> <view class='title acea-row row-between-wrapper'>
<view class="acea-row row-middle left-wrapper"> <view class="acea-row row-middle left-wrapper">
{{item.group_order_sn}} {{item.group_order_sn}}
@ -84,8 +84,9 @@
</view> </view>
<view class='text acea-row row-between'> <view class='text acea-row row-between'>
<view class='name line1'> <view class='name line1'>
<text <!-- <text
class="event_name event_bg">预售</text><text>{{goods.cart_info.product.store_name}}</text> class="event_name event_bg">预售</text> -->
<text>{{goods.cart_info.product.store_name}}</text>
<view class="event_ship event_color">发货时间 <view class="event_ship event_color">发货时间
<!--全款预售--> <!--全款预售-->
<text <text
@ -153,7 +154,7 @@
<!-- 待发货 待收货 待评价 已完成 --> <!-- 待发货 待收货 待评价 已完成 -->
<block v-else> <block v-else>
<view class='item' v-for="(item,index) in orderList" :key="index"> <view class='item' v-for="(item,index) in orderList" :key="index">
<view @click='goOrderDetails(item.order_id)'> <view @click='goOrderDetails(item.order_id, item)'>
<view class='title acea-row row-between-wrapper'> <view class='title acea-row row-between-wrapper'>
<view class="acea-row row-middle left-wrapper" @click.stop="goMall(item)"> <view class="acea-row row-middle left-wrapper" @click.stop="goMall(item)">
<text class="iconfont icon-shangjiadingdan"></text> <text class="iconfont icon-shangjiadingdan"></text>
@ -186,8 +187,9 @@
<view class='text acea-row row-between'> <view class='text acea-row row-between'>
<view class='name '> <view class='name '>
<view class='name' :class="item.status === 0 ? 'line1' : 'line2'"> <view class='name' :class="item.status === 0 ? 'line1' : 'line2'">
<text <!-- <text
class="event_name event_bg">预售</text><text>{{goods.cart_info.product.store_name}}</text> class="event_name event_bg">预售</text> -->
<text>{{goods.cart_info.product.store_name}}</text>
<view v-if="item.status == 0" class="event_ship event_color">发货时间 <view v-if="item.status == 0" class="event_ship event_color">发货时间
<!--全款预售--> <!--全款预售-->
<text <text
@ -250,10 +252,10 @@
</view> </view>
</view> </view>
<view class='bottom acea-row row-right row-middle'> <view class='bottom acea-row row-right row-middle'>
<!-- <view v-if="!item.receipt && item.status != -1" class='bnt cancelBnt' <view v-if="!item.receipt && item.status != -1 && (item.status != 0)" class='bnt cancelBnt'
@click.stop='applyInvoice(item.order_id)'>申请开票</view> --> @click.stop='applyInvoice(item.order_id)'>申请开票</view>
<block v-if="item.status == 0 || item.status == 9 || item.status == -1"> <block v-if="item.status == 0 || item.status == 9 || item.status == -1">
<view class='bnt b-color' @click='goOrderDetails(item.order_id)'>查看详情</view> <view class='bnt b-color' @click='goOrderDetails(item.order_id, item)'>查看详情</view>
</block> </block>
<block v-if="item.status == 1"> <block v-if="item.status == 1">
<view class='bnt cancelBnt' <view class='bnt cancelBnt'
@ -269,7 +271,7 @@
<text class="iconfont icon-fabu"></text> <text class="iconfont icon-fabu"></text>
发布种草 发布种草
</navigator> --> </navigator> -->
<view class='bnt b-color' @click='goOrderDetails_Evaluation(item.order_id)'>去评价 <view class='bnt b-color' @click='goOrderDetails_Evaluation(item)'>去评价
</view> </view>
</block> </block>
<block v-if="item.status == 3"> <block v-if="item.status == 3">
@ -343,6 +345,7 @@
import { import {
HTTP_REQUEST_URL HTTP_REQUEST_URL
} from '@/config/app'; } from '@/config/app';
import { Toast } from '../../../libs/uniApi';
export default { export default {
components: { components: {
payment, payment,
@ -500,7 +503,8 @@
getOrderData: function() { getOrderData: function() {
let that = this; let that = this;
orderData({ orderData({
product_type: 0 product_type: 0,
source: 103
}).then(res => { }).then(res => {
that.$set(that, 'orderData', res.data); that.$set(that, 'orderData', res.data);
}) })
@ -564,7 +568,7 @@
/** /**
* 去订单详情 * 去订单详情
*/ */
goOrderDetails: function(order_id) { goOrderDetails: function(order_id, item) {
let self = this let self = this
@ -575,16 +579,13 @@
uni.showLoading({ uni.showLoading({
title: '正在加载', title: '正在加载',
}) })
openOrderSubscribe().then(() => { openOrderSubscribe().then(() => {
uni.hideLoading(); uni.hideLoading();
if (self.orderStatus == 0) { if (self.orderStatus == 0 || (item&&item.order_status==1)) {
uni.navigateTo({ uni.navigateTo({
url: '/pages/order_details/stay?order_id=' + order_id url: '/pages/order_details/stay?order_id=' + order_id
}) })
} else if (self.orderStatus == 1) { } else if (self.orderStatus == 1) {
uni.navigateTo({ uni.navigateTo({
url: `/pages/order_details/stay?order_id=${order_id}&orderStatus=${self.orderStatus}` url: `/pages/order_details/stay?order_id=${order_id}&orderStatus=${self.orderStatus}`
}) })
@ -598,9 +599,9 @@
}) })
// #endif // #endif
// #ifndef MP // #ifndef MP
if (self.orderStatus == 0) { if (self.orderStatus == 0||(item&&item.order_status==1)) {
uni.navigateTo({ uni.navigateTo({
url: '/pages/order_details/stay?order_id=' + order_id url: '/pages/order_details/stay?order_id=' + item.group_order_id
}) })
} else if (self.orderStatus == 1) { } else if (self.orderStatus == 1) {
// uni.navigateTo({ // uni.navigateTo({
@ -619,30 +620,32 @@
/** /**
* 点击去评价 * 点击去评价
*/ */
goOrderDetails_Evaluation: function(order_id) { goOrderDetails_Evaluation: function(item) {
let self = this let self = this
if (!order_id) return that.$util.Tips({ if (!item.order_id) return that.$util.Tips({
title: '缺少订单号无法查看订单详情和评价' title: '缺少订单号无法查看订单详情和评价'
}); });
// #ifdef MP // #ifdef MP
if (self.orderStatus == 0) { if (self.orderStatus == 0) {
uni.navigateTo({ uni.navigateTo({
url: '/pages/order_details/stay?order_id=' + order_id url: '/pages/order_details/stay?order_id=' + item.order_id
}) })
} else { } else {
if(!item.orderProduct[0]?.order_product_id) return Toast('无法评价该商品')
uni.navigateTo({ uni.navigateTo({
url: '/pages/order_details/index?order_id=' + order_id url: `/pages/users/goods_comment_con/index?uni=${item.orderProduct[0].order_product_id}&order_id=${item.order_id}`
}) })
} }
// #endif // #endif
// #ifndef MP // #ifndef MP
if (self.orderStatus == 0) { if (self.orderStatus == 0) {
uni.navigateTo({ uni.navigateTo({
url: '/pages/order_details/stay?order_id=' + order_id url: '/pages/order_details/stay?order_id=' + item.order_id
}) })
} else { } else {
if(!item.orderProduct[0]?.order_product_id) return Toast('无法评价该商品')
uni.navigateTo({ uni.navigateTo({
url: '/pages/order_details/index?order_id=' + order_id url: `/pages/users/goods_comment_con/index?uni=${item.orderProduct[0].order_product_id}&order_id=${item.order_id}`
}) })
} }
// #endif // #endif
@ -652,7 +655,6 @@
*/ */
statusClick: function(status) { statusClick: function(status) {
if (status == this.orderStatus) return; if (status == this.orderStatus) return;
this.orderStatus = status; this.orderStatus = status;
this.loadend = false; this.loadend = false;
this.loading = false; this.loading = false;
@ -675,7 +677,8 @@
groupOrderList({ groupOrderList({
page: that.page, page: that.page,
limit: that.limit, limit: that.limit,
product_type: 0 product_type: 0,
source: 103
}).then(res => { }).then(res => {
that.isReady = true; that.isReady = true;
let list = res.data.list || []; let list = res.data.list || [];
@ -702,7 +705,8 @@
status: arr, status: arr,
page: that.page, page: that.page,
limit: that.limit, limit: that.limit,
product_type: 0 product_type: 0,
source: 103
}).then(res => { }).then(res => {
let list = res.data.list || []; let list = res.data.list || [];
let loadend = list.length < that.limit; let loadend = list.length < that.limit;
@ -731,6 +735,7 @@
status: 10, status: 10,
page: 1, page: 1,
limit: 1, limit: 1,
source: 103
}).then(res => { }).then(res => {
let list = res.data.list || []; let list = res.data.list || [];
that.presellOrderCount = res.data.count; that.presellOrderCount = res.data.count;