xuxueyang
2024-09-02 edf50893285f13c7c975b376a70ac3b164f48a13
update 购物车加载速度
已修改4个文件
已添加2个文件
56 ■■■■■ 文件已修改
manifest.json 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
package.json 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/user/supplier-user.vue 15 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
static/images/customer/service/service-icon-8.png 补丁 | 查看 | 原始文档 | blame | 历史
static/images/customer/service/service-icon-9.png 补丁 | 查看 | 原始文档 | blame | 历史
sub_pages/customer/shopping/shopping.vue 27 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
manifest.json
@@ -49,7 +49,7 @@
    "quickapp" : {},
    /* 快应用特有相关 */
    "mp-weixin" : {
        "appid" : "wx6d0ecc4e18710458",
        "appid" : "wx1441324401626290",
        "setting" : {
            "urlCheck" : false,
            "es6" : true,
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
                }
            }
        }
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>
static/images/customer/service/service-icon-8.png
static/images/customer/service/service-icon-9.png
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) {