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

View File

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

View File

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

View File

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

View File

@ -133,12 +133,12 @@
</view> </view>
<block v-if="cartInfo.length>0"> <block v-if="cartInfo.length>0">
<orderGoods :orderData='orderInfo' :pay_type="orderInfo.pay_type" :status="orderInfo.status" :evaluate='orderInfo.status' <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> </orderGoods>
<block <block
v-if="orderInfo.order_type == 1 && orderInfo.takeOrderList && orderInfo.takeOrderList.length > 0" v-if="orderInfo.order_type == 1 && orderInfo.takeOrderList && orderInfo.takeOrderList.length > 0"
v-for="(item,index) in orderInfo.takeOrderList" :key="index"> 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> :orderId="item.order_id" :cartInfo="item.orderProduct" :jump="true"></orderGoods>
</block> </block>
</block> </block>
@ -510,7 +510,8 @@
invoice: { invoice: {
invoice: false, invoice: false,
add: false, add: false,
} },
sale_type: 1
}; };
}, },
computed: { computed: {
@ -533,6 +534,7 @@
onLoad: function(options) { onLoad: function(options) {
if (options.order_id) { if (options.order_id) {
this.$set(this, 'order_id', options.order_id); this.$set(this, 'order_id', options.order_id);
options.sale_type ? this.sale_type = options.sale_type : null;
} }
}, },
onShow() { onShow() {
@ -611,7 +613,7 @@
goStore(mer_id) { goStore(mer_id) {
if (this.hide_mer_status != 1) { if (this.hide_mer_status != 1) {
uni.navigateTo({ 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 <view class="title" @click="goStore(item)">{{item.merchant.mer_name}}<text
class="iconfont icon-xiangyou"></text> class="iconfont icon-xiangyou"></text>
</view> </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" <view v-for="(goods,j) in item.orderProduct" :key="goods.order_product_id"
@click="goProduct(goods)"> @click="goProduct(goods)">
<view v-if="item.activity_type === 2"> <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 && orderInfo.orderList[0].order_extend " class='wrapper'>
<view v-if="orderInfo.orderList[0].order_extend.bank_info" <view v-if="orderInfo.orderList[0].order_extend.bank_info"
class='item acea-row row-between'> 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"> <view class="conter-item">
<text class="conter-item-name">公司名称:</text> <text class="conter-item-name">公司名称:</text>
<text>{{orderInfo.orderList[0].order_extend.bank_info.company_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> <text>{{orderInfo.orderList[0].order_extend.bank_info.corporate_bank_address}}</text>
</view> </view>
</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> </view>
<view class='wrapper'> <view class='wrapper'>
@ -315,7 +311,8 @@
invoice: { invoice: {
invoice: false, invoice: false,
add: false, add: false,
} },
sale_type: 1
}; };
}, },
watch: { watch: {
@ -335,6 +332,7 @@
onLoad: function(options) { onLoad: function(options) {
if (options.order_id) { if (options.order_id) {
this.$set(this, 'order_id', options.order_id); this.$set(this, 'order_id', options.order_id);
options.sale_type ? this.sale_type = options.sale_type : null;
} }
}, },
onShow() { onShow() {
@ -392,7 +390,7 @@
goStore(item) { goStore(item) {
if (this.hide_mer_status != 1) { if (this.hide_mer_status != 1) {
uni.navigateTo({ 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) { goProduct(goods) {
goods.activity_id = goods.cart_info && goods.cart_info.activeSku && goods.cart_info.activeSku goods.activity_id = goods.cart_info && goods.cart_info.activeSku && goods.cart_info.activeSku
.product_group_id .product_group_id
goShopDetail(goods, '').then(res => { goShopDetail(goods, '', this.sale_type).then(res => {
uni.navigateTo({ 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="{ active: navActive === 2 }" class="item" @click="set_where(2,0)">
<view class="cont"> 价格 <view class="cont"> 价格
<image <image v-if="navActive === 2"
:src="sortPrice ? domain+'/static/diy/up'+keyColor+'.png' : domain+'/static/diy/down'+keyColor+'.png'"> :src="!sortPrice ? domain+'/static/diy/up'+keyColor+'.png' : domain+'/static/diy/down'+keyColor+'.png'">
</image> </image>
</view> </view>
</view> </view>

View File

@ -730,11 +730,11 @@
uni.hideLoading(); uni.hideLoading();
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=' + order_id + '&sale_type=' + this.sale_type
}) })
} else { } else {
uni.navigateTo({ 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(() => { }).catch(() => {
@ -744,11 +744,11 @@
// #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=' + order_id + '&sale_type=' + this.sale_type
}) })
} else { } else {
uni.navigateTo({ 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 // #endif
@ -764,18 +764,18 @@
// #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=' + order_id + '&sale_type=' + this.sale_type
}) })
} else { } else {
uni.navigateTo({ 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 // #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=' + order_id + '&sale_type=' + this.sale_type
}) })
} else { } else {
uni.navigateTo({ uni.navigateTo({

View File

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