修复bug

This commit is contained in:
weipengfei 2024-04-13 15:40:22 +08:00
parent 25bfd7f387
commit 3df255e805
9 changed files with 728 additions and 721 deletions

View File

@ -186,7 +186,11 @@
default: function() {
return {};
}
}
},
sale_type: {
type: [Number, String],
default: 1,
},
},
computed: mapGetters(['viewColor']),
data() {
@ -216,7 +220,7 @@
methods: {
evaluateTap: function(unique, orderId) {
uni.navigateTo({
url: `/pages/users/goods_comment_con/index?uni=${unique}&order_id=${orderId}`
url: `/pages/users/goods_comment_con/index?uni=${unique}&order_id=${orderId}&sale_type=${this.sale_type}`
})
},
//
@ -236,12 +240,12 @@
.product_group_id
if (item.product_type == 3) item.activity_id = item.cart_info && item.cart_info.productAssistAttr
.product_assist_id
goShopDetail(item).then(res => {
goShopDetail(item, '', this.sale_type).then(res => {
initiateAssistApi(item.activity_id).then(res => {
let id = res.data.product_assist_set_id;
uni.hideLoading();
uni.navigateTo({
url: '/pages/activity/assist_detail/index?id=' + id
url: '/pages/activity/assist_detail/index?id=' + id + '&sale_type=' + this.sale_type
});
}).catch((err) => {
uni.showToast({
@ -260,13 +264,13 @@
uni.navigateTo({
url: '/pages/users/refund/confirm?order_id=' + this.orderId + '&type=1' +
'&ids=' + item.order_product_id + '&refund_type=1&order_type=' + this
.orderData.order_type
.orderData.order_type + '&sale_type=' + this.sale_type
})
} else {
uni.navigateTo({
url: '/pages/users/refund/select?order_id=' + this.orderId +
'&type=1&order_type=' + this.orderData.order_type + '&ids=' + item
.order_product_id
.order_product_id + '&sale_type=' + this.sale_type
})
}
}).catch(() => {
@ -277,12 +281,12 @@
if (this.evaluate == 0 || this.evaluate == 9 || this.orderData.is_virtual != 0) {
uni.navigateTo({
url: '/pages/users/refund/confirm?order_id=' + this.orderId + '&type=1' + '&ids=' + item
.order_product_id + '&refund_type=1&order_type=' + this.orderData.order_type
.order_product_id + '&refund_type=1&order_type=' + this.orderData.order_type + '&sale_type=' + this.sale_type
})
} else {
uni.navigateTo({
url: '/pages/users/refund/select?order_id=' + this.orderId + '&type=1&order_type=' + this
.orderData.order_type + '&ids=' + item.order_product_id
.orderData.order_type + '&ids=' + item.order_product_id + '&sale_type=' + this.sale_type
})
}
// #endif

View File

@ -2,8 +2,8 @@
"name" : "惠农生活",
"appid" : "__UNI__3A527D1",
"description" : "",
"versionName" : "2.0.30",
"versionCode" : 2030,
"versionName" : "2.0.31",
"versionCode" : 2031,
"transformPx" : false,
/* 5+App */
"app-plus" : {

View File

@ -305,7 +305,7 @@
<view style="display: flex;" @click="changeMap">
<view style="width: 250rpx;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;text-align: right;">{{street}}</view>
<u-icon name="arrow-down" size="14"
color="#fff" @click="navBack"></u-icon>
color="#fff"></u-icon>
</view>
</view>
</view>

View File

@ -84,12 +84,14 @@
deliveryInfo: {},
expressList: [],
domain: HTTP_REQUEST_URL,
sale_type: 1
};
},
computed: mapGetters(['isLogin']),
onLoad: function (options) {
if (!options.orderId) return this.$util.Tips({title:'缺少订单号'});
this.orderId = options.orderId;
options.sale_type ? this.sale_type = options.sale_type : null;
if (this.isLogin) {
this.getExpress();
} else {

View File

@ -133,12 +133,12 @@
</view>
<block v-if="cartInfo.length>0">
<orderGoods :orderData='orderInfo' :pay_type="orderInfo.pay_type" :status="orderInfo.status" :evaluate='orderInfo.status'
:activityType='orderInfo.activity_type' :orderId="order_id" :cartInfo="cartInfo" :jump="true">
:activityType='orderInfo.activity_type' :sale_type="sale_type" :orderId="order_id" :cartInfo="cartInfo" :jump="true">
</orderGoods>
<block
v-if="orderInfo.order_type == 1 && orderInfo.takeOrderList && orderInfo.takeOrderList.length > 0"
v-for="(item,index) in orderInfo.takeOrderList" :key="index">
<orderGoods :orderData='item' :pay_type="orderInfo.pay_type" :status="orderInfo.status" :evaluate='item.status' :activityType='item.activity_type'
<orderGoods :orderData='item' :pay_type="orderInfo.pay_type" :status="orderInfo.status" :evaluate='item.status' :activityType='item.activity_type' :sale_type="sale_type"
:orderId="item.order_id" :cartInfo="item.orderProduct" :jump="true"></orderGoods>
</block>
</block>
@ -510,7 +510,8 @@
invoice: {
invoice: false,
add: false,
}
},
sale_type: 1
};
},
computed: {
@ -533,6 +534,7 @@
onLoad: function(options) {
if (options.order_id) {
this.$set(this, 'order_id', options.order_id);
options.sale_type ? this.sale_type = options.sale_type : null;
}
},
onShow() {
@ -611,7 +613,7 @@
goStore(mer_id) {
if (this.hide_mer_status != 1) {
uni.navigateTo({
url: '/pages/store/home/index?id=' + mer_id
url: '/pages/store/home/index?id=' + mer_id + '&sale_type=' + this.sale_type
})
}
},

View File

@ -60,7 +60,7 @@
<view class="title" @click="goStore(item)">{{item.merchant.mer_name}}<text
class="iconfont icon-xiangyou"></text>
</view>
<view class="goods-box">
<view class="goods-box" v-if="item.orderProduct">
<view v-for="(goods,j) in item.orderProduct" :key="goods.order_product_id"
@click="goProduct(goods)">
<view v-if="item.activity_type === 2">
@ -153,7 +153,7 @@
<view v-if="orderInfo.orderList && orderInfo.orderList[0].order_extend " class='wrapper'>
<view v-if="orderInfo.orderList[0].order_extend.bank_info"
class='item acea-row row-between'>
<view v-if="!Array.isArray(item)" class='conter' style="width: 100%;">
<view class='conter' style="width: 100%;">
<view class="conter-item">
<text class="conter-item-name">公司名称:</text>
<text>{{orderInfo.orderList[0].order_extend.bank_info.company_name}}</text>
@ -171,10 +171,6 @@
<text>{{orderInfo.orderList[0].order_extend.bank_info.corporate_bank_address}}</text>
</view>
</view>
<view v-else class='conter virtual_image'>
<image v-for="(pic,i) in item" :key="i" class="picture" :src="pic"
@click="getPhotoClickIdx(item,i)"></image>
</view>
</view>
</view>
<view class='wrapper'>
@ -315,7 +311,8 @@
invoice: {
invoice: false,
add: false,
}
},
sale_type: 1
};
},
watch: {
@ -335,6 +332,7 @@
onLoad: function(options) {
if (options.order_id) {
this.$set(this, 'order_id', options.order_id);
options.sale_type ? this.sale_type = options.sale_type : null;
}
},
onShow() {
@ -392,7 +390,7 @@
goStore(item) {
if (this.hide_mer_status != 1) {
uni.navigateTo({
url: `/pages/store/home/index?id=${item.merchant.mer_id}`
url: `/pages/store/home/index?id=${item.merchant.mer_id}` + '&sale_type=' + this.sale_type
})
}
},
@ -400,9 +398,9 @@
goProduct(goods) {
goods.activity_id = goods.cart_info && goods.cart_info.activeSku && goods.cart_info.activeSku
.product_group_id
goShopDetail(goods, '').then(res => {
goShopDetail(goods, '', this.sale_type).then(res => {
uni.navigateTo({
url: `/pages/goods_details/index?id=${goods.product_id}`
url: `/pages/goods_details/index?id=${goods.product_id}` + '&sale_type=' + this.sale_type
})
})
},

View File

@ -74,8 +74,8 @@
<view :class="{ active: navActive === 2 }" class="item" @click="set_where(2,0)">
<view class="cont"> 价格
<image
:src="sortPrice ? domain+'/static/diy/up'+keyColor+'.png' : domain+'/static/diy/down'+keyColor+'.png'">
<image v-if="navActive === 2"
:src="!sortPrice ? domain+'/static/diy/up'+keyColor+'.png' : domain+'/static/diy/down'+keyColor+'.png'">
</image>
</view>
</view>

View File

@ -730,11 +730,11 @@
uni.hideLoading();
if (self.orderStatus == 0) {
uni.navigateTo({
url: '/pages/order_details/stay?order_id=' + order_id
url: '/pages/order_details/stay?order_id=' + order_id + '&sale_type=' + this.sale_type
})
} else {
uni.navigateTo({
url: '/pages/order_details/index?order_id=' + order_id
url: '/pages/order_details/index?order_id=' + order_id + '&sale_type=' + this.sale_type
})
}
}).catch(() => {
@ -744,11 +744,11 @@
// #ifndef MP
if (self.orderStatus == 0) {
uni.navigateTo({
url: '/pages/order_details/stay?order_id=' + order_id
url: '/pages/order_details/stay?order_id=' + order_id + '&sale_type=' + this.sale_type
})
} else {
uni.navigateTo({
url: '/pages/order_details/index?order_id=' + order_id
url: '/pages/order_details/index?order_id=' + order_id + '&sale_type=' + this.sale_type
})
}
// #endif
@ -764,18 +764,18 @@
// #ifdef MP
if (self.orderStatus == 0) {
uni.navigateTo({
url: '/pages/order_details/stay?order_id=' + order_id
url: '/pages/order_details/stay?order_id=' + order_id + '&sale_type=' + this.sale_type
})
} else {
uni.navigateTo({
url: '/pages/order_details/index?order_id=' + order_id
url: '/pages/order_details/index?order_id=' + order_id + '&sale_type=' + this.sale_type
})
}
// #endif
// #ifndef MP
if (self.orderStatus == 0) {
uni.navigateTo({
url: '/pages/order_details/stay?order_id=' + order_id
url: '/pages/order_details/stay?order_id=' + order_id + '&sale_type=' + this.sale_type
})
} else {
uni.navigateTo({

View File

@ -273,8 +273,8 @@
<scroll-view scroll-x="true" :scroll-top="100" :show-scrollbar="false" scroll-into-view="a1">
<view class="scrollview">
<block v-for="(item,indx) in tabsArr" :key="indx">
<view class="scrollview-item" :id="'a' + indx"
:class="{'scrollview-active':tabsCurr == item.val}" @click="tabsChange(item.val)">
<view class="scrollview-item" :id="'a' + indx" :class="{'scrollview-active':tabsCurr == item.val}"
@click="tabsChange(item.val)">
{{item.name}}
</view>
</block>
@ -295,8 +295,7 @@
hover-class="none" class="search_content flex_a_c_j_sb">
<view class="flex_a_c search_content_wrap">
<view class="iconfont icon-sousuo" style="font-size: 39rpx;"></view>
<input type="text"
:placeholder="subCurr!=1 || (subCurr==1 && tabsCurr!=2) ? '搜索您需要批发进货的产品名称': '搜索店铺名称'"
<input type="text" :placeholder="subCurr!=1 || (subCurr==1 && tabsCurr!=2) ? '搜索您需要批发进货的产品名称': '搜索店铺名称'"
:value="where.keyword" placeholder-style="font-size: 30rpx;color:#999;" disabled
style="pointer-events: none;">
</view>
@ -312,8 +311,7 @@
<view class="category-item" :class="{'category-item-active': index==cate_change}"
@click="changeCate(index)">
<block v-if="subCurr!=1 || (subCurr==1 && tabsCurr!=2)">
<u--image class="category-item-img" width="108rpx" :src="item.pic" height="108rpx"
shape="circle">
<u--image class="category-item-img" width="108rpx" :src="item.pic" height="108rpx" shape="circle">
<template v-slot:loading>
<u-loading-icon color="#999" size="15" />
</template>
@ -321,8 +319,8 @@
<text class="category-item-text">{{item.cate_name}}</text>
</block>
<block v-else>
<u--image class="category-item-img" width="108rpx" :src="item.background"
height="108rpx" shape="circle">
<u--image class="category-item-img" width="108rpx" :src="item.background" height="108rpx"
shape="circle">
<template v-slot:loading>
<u-loading-icon color="#999" size="15" />
</template>
@ -359,8 +357,7 @@
</image>
<view v-else style="width: 15rpx;height: 21rpx;"></view>
</view>
<view class="comprehensive-sales_num" :class="{'comp-color': orderCurr==2}"
@click="toOrder('sales', 2)">
<view class="comprehensive-sales_num" :class="{'comp-color': orderCurr==2}" @click="toOrder('sales', 2)">
<text>销量</text>
</view>
<view class="comprehensive-discount" :class="{'comp-color': orderCurr==3}" v-if="tabsCurr!=1"
@ -416,8 +413,7 @@
<view class="content">
<view class="content-head">
<view class="title">{{item.mer_name}}</view>
<text style="font-size: 21.03rpx;color: #aaa;"
v-if="item.sales>=100">月销{{item.sales}}</text>
<text style="font-size: 21.03rpx;color: #aaa;" v-if="item.sales>=100">月销{{item.sales}}</text>
</view>
<view class="content-two">
<view class="score">
@ -427,8 +423,7 @@
</view>
</view>
</view>
<text
style="margin-left: 20rpx;color: #FF6D20;font-size: 22.78rpx; ">{{item.service_score}}</text>
<text style="margin-left: 20rpx;color: #FF6D20;font-size: 22.78rpx; ">{{item.service_score}}</text>
<text v-if="item.distance"
style="margin-left: 20rpx;font-size: 21.03rpx;color: #aaa;">{{item.distance}}</text>
</view>
@ -579,7 +574,10 @@
this.initData(true);
},
toOrder(type, index = -1) {
this.orderCurr = index;
if (this.where.order == type) {
type = "";
this.orderCurr = -1
} else this.orderCurr = index;
if (type == 'price') {
if (this.where.order == 'price_asc') this.where.order = 'price_desc';
else this.where.order = 'price_asc';
@ -611,12 +609,13 @@
},
tabsChange(e) {
this.tabsCurr = e;
this.orderCurr = -1;
this.where = {
page: 1,
limit: this.where.limit,
sale_type: this.where.sale_type,
keyword: this.where.keyword,
order: this.where.order,
order: '',
rand: this.where.rand,
}
this.cate_change = 0;
@ -688,6 +687,8 @@
}
if (this.isLoading == -1) return;
this.isLoading = 1;
if(this.where.order) this.where.rand=0;
else this.where.rand=1;
getProductslist(this.where, true).then(res => {
this.where.limit = res.data.limit
this.where.page = res.data.page