From edf50893285f13c7c975b376a70ac3b164f48a13 Mon Sep 17 00:00:00 2001
From: xuxueyang <xuxy@fengyuntec.com>
Date: 星期一, 02 九月 2024 18:02:54 +0800
Subject: [PATCH] update 购物车加载速度
---
sub_pages/customer/shopping/shopping.vue | 27 ++++++++++++++-------------
static/images/customer/service/service-icon-8.png | 0
manifest.json | 2 +-
package.json | 12 ++++++++++++
static/images/customer/service/service-icon-9.png | 0
pages/user/supplier-user.vue | 15 +++++++++++----
6 files changed, 38 insertions(+), 18 deletions(-)
diff --git a/manifest.json b/manifest.json
index 782394c..2848179 100644
--- a/manifest.json
+++ b/manifest.json
@@ -49,7 +49,7 @@
"quickapp" : {},
/* 快应用特有相关 */
"mp-weixin" : {
- "appid" : "wx6d0ecc4e18710458",
+ "appid" : "wx1441324401626290",
"setting" : {
"urlCheck" : false,
"es6" : true,
diff --git a/package.json b/package.json
index 5b4330c..192b117 100644
--- a/package.json
+++ b/package.json
@@ -33,6 +33,18 @@
"define": {
"PUB_CUSTOMER": true
}
+ },
+ "customer-v2":{
+ "title": "花店/用户端-小程序-开发",
+ "BROWSER": "Chrome",
+ "env": {
+ "UNI_PLATFORM": "mp-weixin",
+ "PUB_TYPE": "customer"
+ },
+ "define": {
+ "PUB_CUSTOMER": true,
+ "PUB_CUSTOMER_DEV": true
+ }
}
}
diff --git a/pages/user/supplier-user.vue b/pages/user/supplier-user.vue
index b2354d5..6359687 100644
--- a/pages/user/supplier-user.vue
+++ b/pages/user/supplier-user.vue
@@ -176,11 +176,18 @@
</image>
<view>投诉反馈</view>
</view>
+<!--
+ <view class="service-icons" @click="goto('/sub_pages/customer/self/coupon',true)">
+ <image src="../../static/images/customer/service/service-icon-8.png" class="t2 service-icon ">
+ </image>
+ <view>优惠券</view>
+ </view>
- <view class="service-icons"></view>
-
- <view class="service-icons"></view>
- <view class="service-icons"></view>
+ <view class="service-icons" @click="goto('/sub_pages/customer/self/feedback',true)">
+ <image src="../../static/images/customer/service/service-icon-9.png" class="t2 service-icon ">
+ </image>
+ <view>兑换券</view>
+ </view> -->
</view>
</view>
</view>
diff --git a/static/images/customer/service/service-icon-8.png b/static/images/customer/service/service-icon-8.png
new file mode 100644
index 0000000..ca6ec54
--- /dev/null
+++ b/static/images/customer/service/service-icon-8.png
Binary files differ
diff --git a/static/images/customer/service/service-icon-9.png b/static/images/customer/service/service-icon-9.png
new file mode 100644
index 0000000..5d2015f
--- /dev/null
+++ b/static/images/customer/service/service-icon-9.png
Binary files differ
diff --git a/sub_pages/customer/shopping/shopping.vue b/sub_pages/customer/shopping/shopping.vue
index a512018..7b36437 100644
--- a/sub_pages/customer/shopping/shopping.vue
+++ b/sub_pages/customer/shopping/shopping.vue
@@ -16,10 +16,7 @@
</view>
<view class="">
<no-data v-if="!list||list.length===0" style="width: 100%;"></no-data>
-
<view class="shopping-item m-t-20" v-for="(item,index) of list" :key="index">
-
-
<view class="sup-title">
<radio :checked="ids.indexOf('supplier@'+item.supplierId)>=0" @click="changeItem(item,'supplier')">
</radio>
@@ -32,8 +29,8 @@
<u-swipe-action-item :options="options1" @click="(e)=>{clickSwipeButton(dto,true)}">
<view class="item-each flex">
<radio :checked="ids.indexOf(dto.id)>=0" @click="changeItem(dto,'flower')"></radio>
- <image class="img img100 m-r-6 br-4" :class="[!dto.stock?'component-stock-zero':'']"
- :src="dto.url||dto.cover"></image>
+ <image class="img img100 m-r-6 br-4" :lazy-load="true"
+ :class="[!dto.stock?'component-stock-zero':'']" :src="dto.url||dto.cover"></image>
<view class="flex1">
<view class="title" @click.stop="toDetail(dto)"><span class="m-r-5"
style="display: inline-block;">{{dto.categoryStr||''}}</span><span
@@ -119,13 +116,16 @@
totalprice() {
let totalprice = 0
- this.list && this.list.forEach(dto => {
- dto.flowerList && dto.flowerList.forEach(item => {
- if (this.ids.indexOf(item.id) >= 0) {
- totalprice += item.price * item.num
- }
+ if (this.ids.length > 0) {
+ this.list && this.list.forEach(dto => {
+ dto.flowerList && dto.flowerList.forEach(item => {
+ if (this.ids.indexOf(item.id) >= 0) {
+ totalprice += item.price * item.num
+ }
+ })
})
- })
+ }
+
return totalprice.toFixed(2)
},
},
@@ -464,8 +464,9 @@
this.$message.showToast('请先前往个人中心补充个人信息')
return
}
+ this.$store.dispatch('sign_clear', 'shopping');
+
this.$message.showLoading()
- await this.$store.dispatch('sign_clear', 'shopping');
const {
code,
data
@@ -474,7 +475,7 @@
this.list = []
if (code === 0) {
this.list = data || []
-
+ this.$forceUpdate()
}
},
toDetail(dto) {
--
Gitblit v1.9.3