xuxueyang
2024-07-31 af2a86dbbe05d74b00a6e7bdc426e26bb0453654
fix bug
已修改16个文件
359 ■■■■■ 文件已修改
components/footer/customer-footer.vue 31 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/home/home.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/notice/list.vue 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/notice/notice.vue 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/order/order-detail.vue 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/order/order.vue 27 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/user/supplier-user.vue 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
plugins/storage.js 13 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
store/index.js 134 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
sub_pages/customer/self/collect.vue 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
sub_pages/customer/self/history.vue 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
sub_pages/customer/shop/shop.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
sub_pages/customer/shopping/confirm.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
sub_pages/customer/trade/detail.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
sub_pages/customer/trade/list.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
sub_pages/partner/order-manage/order-manage.vue 53 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
components/footer/customer-footer.vue
@@ -84,19 +84,26 @@
                if (this.flg == index) {
                    return
                }
                if (index===1||index===2) {
                    //交易大厅和购物车,这2个可以用跳转方式
                    uni.navigateTo({
                        url:item.pagePath
                    })
                }else{
                    uni.redirectTo({
                        url: item.pagePath
                    });
                if (index === 1 || index === 2) {
                    //交易大厅和购物车,这2个可以用跳转方式
                    if (index === 2) {
                        if (!this.currentInfo.id) {
                            this.$message.showToast('请先登录')
                            return
                        }
                    }
                    uni.navigateTo({
                        url: item.pagePath
                    })
                } else {
                    uni.redirectTo({
                        url: item.pagePath
                    });
                }
            },
        }
    }
pages/home/home.vue
@@ -63,7 +63,7 @@
        <!-- 特别的几个公告图片 -->
        <home-banner-imgs></home-banner-imgs>
        <!-- 均价情况 -->
        <home-price></home-price>
        <!-- <home-price></home-price> -->
        <!-- 几个专区 -->
        <home-zones></home-zones>
        <!-- 置顶的花列表 -->
pages/notice/list.vue
@@ -7,6 +7,8 @@
                <view @click.stop="toDetail(item)" class="notice-item">
                    <view>{{item.title}}</view>
                    <view class="time">{{item.publishDate}}</view>
                    <image :src="item.cover" style="display: block;margin: 0 auto;" @click="previewImg(dto.cover)"
                        v-if="item.cover" mode="aspectFit" class="m-t-8"></image>
                </view>
            </view>
        </view>
pages/notice/notice.vue
@@ -8,10 +8,20 @@
            <view style="background: #F5F5F5;height: 24rpx;">
            </view>
            <view class="bg-white p10">
                <image :src="dto.cover" v-if="dto.cover" mode="aspectFit" class="m-t-8"
                    style="display: block;margin: 0 auto;" @click="previewImg(dto.cover)"></image>
            </view>
            <view style="background: #F5F5F5;height: 24rpx;">
            </view>
            <!-- 活动描述 -->
            <view class="info-desc">
                <view class="title">公告描述</view>
                <view v-html="dto.content||'暂无'" class="rich"  style="overflow: scroll;">
                <view v-html="dto.content||'暂无'" class="rich" style="overflow: scroll;">
                </view>
            </view>
@@ -53,8 +63,8 @@
                this.dto = {
                    ...data
                }
                this.dto.content = this.$util.formatRichText(this.dto.content||'')
                this.dto.content = this.$util.formatRichText(this.dto.content || '')
            },
        }
    }
pages/order/order-detail.vue
@@ -86,10 +86,9 @@
                        this.$message.showLoading()
                        const {
                            code
                        } = await this.$http.request('post', '/api/customer/order/refund', {
                            data: {
                        } = await this.$http.request('get', '/api/customer/order/refund', {
                            params: {
                                id: this.id,
                                evaluate: res.content
                            }
                        })
                        this.$message.hideLoading()
pages/order/order.vue
@@ -71,10 +71,9 @@
                        this.$message.showLoading()
                        const {
                            code
                        } = await this.$http.request('post', '/api/customer/order/refund', {
                            data: {
                        } = await this.$http.request('get', '/api/customer/order/refund', {
                            params: {
                                id: item.id,
                                evaluate: res.content
                            }
                        })
                        this.$message.hideLoading()
@@ -225,17 +224,19 @@
                    </view>
                    <view class="value">{{ dto.statusBackendStr }}</view>
                </view>
                <view class="desc flex">
                    <view class="label">
                        收货人:
                <view class="flex">
                    <view class="desc flex flex1">
                        <view class="label">
                            收货人:
                        </view>
                        <view class="value">{{ dto.customer }}</view>
                    </view>
                    <view class="value">{{ dto.customer }}</view>
                </view>
                <view class="desc flex">
                    <view class="label">
                        收货人手机号码:
                    <view class="desc flex flex1">
                        <view class="label">
                            收货人手机号码:
                        </view>
                        <view class="value">{{ dto.customerTel }}</view>
                    </view>
                    <view class="value">{{ dto.customerTel }}</view>
                </view>
                <view class="desc flex">
                    <view class="label">
@@ -249,7 +250,7 @@
                    </view>
                    <view class="value">{{ dto.paymentTime }}</view>
                </view>
                <view class="flower-info m-b-5 m-t-12 br-4" v-for="(item,index) of dto.items" :key="index">
                <view class="flower-info m-b-5 m-t-8 br-4" v-for="(item,index) of dto.items" :key="index">
                    <view class="line-gray"></view>
                    
                    <view class="supplier-name ">
pages/user/supplier-user.vue
@@ -17,12 +17,15 @@
            <view class="flex user-info">
                <!-- 头像 -->
                <image class="user-icon" v-if="currentInfo.picture
                    ||currentInfo.customerDTO&&currentInfo.customerDTO.cover
                <image class="user-icon" v-if="
                    currentInfo.customerDTO&&currentInfo.customerDTO.cover
                    ||currentInfo.supplierDTO&&currentInfo.supplierDTO.cover
                    || currentInfo.picture
                    " :src="
                    currentInfo.customerDTO&&currentInfo.customerDTO.cover
                    ||currentInfo.supplierDTO&&currentInfo.supplierDTO.cover
                    " :src="currentInfo.picture
                    ||currentInfo.customerDTO&&currentInfo.customerDTO.cover
                    ||currentInfo.supplierDTO&&currentInfo.supplierDTO.cover" mode="scaleToFill"></image>
                    || currentInfo.picture
                    " mode="scaleToFill"></image>
                <image class="user-icon" v-else
                    src='https://youzhen123.oss-cn-huhehaote.aliyuncs.com/WechatOwnerProperty/images/mrtx.png'
                    mode="scaleToFill"></image>
@@ -80,10 +83,11 @@
                    </view>
                </view>
                <view class="flex order-icons-container">
                    <view class="order-icons" style="position: relative;" @click="goto('/pages/order/order?status=PENDING',true)">
                    <view class="order-icons" style="position: relative;"
                        @click="goto('/pages/order/order?status=PENDING',true)">
                        <image src="../../static/images/customer/order/order-type-1.png" class="order-icon dfk"
                            style="position: relative;">
                            <view class="image-shop-number" v-if="order_pendding_num">{{order_pendding_num||''}}</view>
                            style="position: relative;">
                            <view class="image-shop-number" v-if="order_pendding_num">{{order_pendding_num||''}}</view>
                        </image>
                        <view>待付款</view>
                    </view>
@@ -355,8 +359,7 @@
                        })
                        //获取待支付数目
                        this.$http.request('get', '/api/customer/order/count/pending', {
                            params: {
                            }
                            params: {}
                        }).then(res => {
                            if (res.code === 0) {
                                that.order_pendding_num = res.data || 0
plugins/storage.js
@@ -1,5 +1,14 @@
// import Vue from 'vue'
const APPID = 'hmy-token' + process.env.PUB_TYPE
let APPID = 'hmy-token' + process.env.PUB_TYPE
// #ifdef PUB_CUSTOMER
APPID = 'hmy-token-customer'
// #endif
// #ifdef PUB_PARTNER
APPID = 'hmy-token-partner'
// #endif
const storage = {
    getItem(key) {
        return uni.getStorageSync(`${APPID}_${key}_${process.env.NODE_ENV}`)
@@ -17,4 +26,4 @@
// Vue.prototype.$storage = storage
export default storage
export default storage
store/index.js
@@ -408,90 +408,92 @@
                return
            }
            //输入要添加多少个
            const res = await message.confirm('', {
                editable: true,
                title: '请输入购买数目'
            })
            if (res.content && res.confirm) {
                var t = res.content
                if (!isNaN(parseInt(t)) && t >= 0) {
                    if ((t) === 0) {
                        message.showLoading()
                        const resp = await http.request('get', '/api/customer/flower/cart/delete', {
                            params: {
                                id: data.id,
                            }
                        })
                        message.hideLoading()
                        if (resp && resp.code === 0) {
                            message.showToast('操作成功')
                            dispatch('sign_add', 'shopping')
                            return {
                                code: 0,
                                data: 0
                            }
            // const res = await message.confirm('', {
            //     editable: true,
            //     title: '请输入购买数目'
            // })
            // if (res.content && res.confirm) {
            // var t = res.content
            var t = 1
            if (!isNaN(parseInt(t)) && t >= 0) {
                if ((t) === 0) {
                    message.showLoading()
                    const resp = await http.request('get', '/api/customer/flower/cart/delete', {
                        params: {
                            id: data.id,
                        }
                    } else {
                        if (parseInt(t) <= 0) {
                    })
                    message.hideLoading()
                    if (resp && resp.code === 0) {
                        message.showToast('操作成功')
                        dispatch('sign_add', 'shopping')
                        return {
                            code: 0,
                            data: 0
                        }
                    }
                } else {
                    if (parseInt(t) <= 0) {
                    } else {
                        //提示没有库存
                        if (!data.stock) {
                            message.showToast('没有库存了,更新失败')
                            return {
                                code: 1,
                                data: parseInt(t)
                            }
                        } else {
                            //提示没有库存
                            if (!data.stock) {
                                message.showToast('没有库存了,更新失败')
                            if (data.stock == 0) {
                                message.showToast('库存为0,更新失败')
                                return {
                                    code: 1,
                                    data: parseInt(t)
                                }
                            } else {
                                if (data.stock == 0) {
                                    message.showToast('库存为0,更新失败')
                            } else if (data.stock > 0 && data.stock < (
                                    parseInt(t))) {
                                message.showToast('超过库存,更新失败')
                                    return {
                                        code: 1,
                                        data: parseInt(t)
                                    }
                                } else if (data.stock > 0 && data.stock < (
                                        parseInt(t))) {
                                    message.showToast('超过库存,更新失败')
                                    return {
                                        code: 1,
                                        data: parseInt(t)
                                    }
                                return {
                                    code: 1,
                                    data: parseInt(t)
                                }
                            }
                            // console.log('data',)
                        }
                        message.showLoading()
                        // console.log('data',)
                    }
                    message.showLoading()
                        const resp = await http.request('post', '/api/customer/flower/cart/change-num', {
                            data: {
                                id: data.id,
                                num: parseInt(t)
                            }
                        })
                        message.hideLoading()
                    const resp = await http.request('post', '/api/customer/flower/cart/change-num', {
                        data: {
                            id: data.id,
                            num: parseInt(t)
                        }
                    })
                    message.hideLoading()
                        if (resp && resp.code === 0) {
                            message.showToast('添加购物车成功')
                            dispatch('sign_add', 'shopping')
                            return {
                                code: 0,
                                data: parseInt(t)
                            }
                    if (resp && resp.code === 0) {
                        message.showToast('添加购物车成功')
                        dispatch('sign_add', 'shopping')
                        return {
                            code: 0,
                            data: parseInt(t)
                        }
                    }
                    // return {
                    //     code: 1,
                    //     data: 0
                    // }
                } else {
                    console.log('res.content', res.content)
                    message.showToast('输入数目需要大于0')
                }
                // return {
                //     code: 1,
                //     data: 0
                // }
            }
            //  else {
            //     console.log('res.content', res.content)
            //     message.showToast('输入数目需要大于0')
            // }
            return {
                code: 1,
sub_pages/customer/self/collect.vue
@@ -59,7 +59,7 @@
                if (item.status == 'UP') {
                } else {
                    this.$message.showToast('已失效,无法查看详情')
                    this.$message.showToast('商品已下架,无法查看详情')
                    return
                }
                uni.navigateTo({
@@ -130,7 +130,7 @@
                if (!item.stock) {
                    item.stock = 0
                }
                if (item.shopnum + addnum > item.stock) {
                if (addnum > 0 & item.shopnum + addnum > item.stock) {
                    this.$message.showToast('库存不足,无法修改')
                    return
                }
@@ -191,7 +191,7 @@
            @cancel="order_show=false"></u-picker>
        <view class="trade-list-container">
            <view class="trade-info-container flex" v-for="(dto,index) of list" :key="index">
            <view class="trade-info-container flex" :class="[dto.status]" v-for="(dto,index) of list" :key="index">
                <image class="img img100 br-4 m-r-10" :src="dto.url||dto.cover" @click.stop="toDetail(dto)"></image>
                <view class="flex1">
                    <view class="flex" @click.stop="toDetail(dto)">
@@ -269,6 +269,12 @@
        }
        .trade-info-container.UP {
            .title {
                color: #000000;
            }
        }
        .trade-info-container {
            background-color: #fff;
            border-radius: 40rpx;
@@ -285,7 +291,7 @@
                font-weight: 600;
                font-size: 28rpx;
                color: #000000;
                color: #333;
                line-height: 40rpx;
                .level {
sub_pages/customer/self/history.vue
@@ -59,7 +59,7 @@
                if (item.status == 'UP') {
                } else {
                    this.$message.showToast('已失效,无法查看详情')
                    this.$message.showToast('商品已下架,无法查看详情')
                    return
                }
                uni.navigateTo({
@@ -70,8 +70,8 @@
                //提交到购物车中
                // this.$message.showLoading()
                const res = await this.$store.dispatch('submitShopping', dto);
                console.log('res',res)
                if (res&&res.code == 0){
                console.log('res', res)
                if (res && res.code == 0) {
                    dto.shopnum = res.data || 0
                    this.$forceUpdate()
                }
@@ -101,14 +101,14 @@
                    var t = parseInt(res.content)
                    if (isNaN(t) || t < 0) {
                        this.$message.showToast('数目需要大于等于0')
                    } else {
                        if(!item.stock || t>item.stock){
                        if (!item.stock || t > item.stock) {
                            this.$message.showToast('库存不足无法修改')
                            return
                        }
                        this.addnum(item, (t - item.shopnum))
                    }
                } else {
@@ -128,7 +128,7 @@
                if (!item.stock) {
                    item.stock = 0
                }
                if (item.shopnum + addnum > item.stock) {
                if (addnum > 0 & item.shopnum + addnum > item.stock) {
                    this.$message.showToast('库存不足,无法修改')
                    return
                }
@@ -189,10 +189,10 @@
            @cancel="order_show=false"></u-picker>
        <view class="trade-list-container">
            <view class="trade-info-container flex" v-for="(dto,index) of list" :key="index"
                >
            <view class="trade-info-container flex"  :class="[dto.status]"
            v-for="(dto,index) of list" :key="index">
                <image class="img img100 br-4 m-r-10" :src="dto.url||dto.cover" @click.stop="toDetail(dto)"></image>
                <view class="flex1" >
                <view class="flex1">
                    <view class="flex" @click.stop="toDetail(dto)">
                        <view class="title">
                            <span class="m-r-5" style="display: inline-block;"
@@ -217,7 +217,8 @@
                            <view class="m-r-0 flex" v-if="dto.shopnum">
                                <uni-icons v-if="dto.shopnum&&dto.shopnum>=1" type="minus" size="32"
                                    @click.stop="addnum(dto,-1)"></uni-icons>
                                <view class="curnums" @click.stop="updateItemNum(dto)" v-if="dto.shopnum&&dto.shopnum>=1">
                                <view class="curnums" @click.stop="updateItemNum(dto)"
                                    v-if="dto.shopnum&&dto.shopnum>=1">
                                    {{ dto.shopnum }}
                                </view>
                                <uni-icons v-if="!dto.shopnum||dto.shopnum<=999" type="plus-filled" size="32"
@@ -268,6 +269,13 @@
        }
        .trade-info-container.UP {
            .title {
                color: #000000;
            }
        }
        .trade-info-container {
            background-color: #fff;
            border-radius: 20rpx;
@@ -286,7 +294,7 @@
                font-weight: 600;
                font-size: 28rpx;
                color: #000000;
                color: #333;
                line-height: 40rpx;
                .level {
sub_pages/customer/shop/shop.vue
@@ -348,7 +348,7 @@
                if (!item.stock) {
                    item.stock = 0
                }
                if (item.shopnum + addnum > item.stock) {
                if (addnum > 0 & item.shopnum + addnum > item.stock) {
                    this.$message.showToast('库存不足,无法修改')
                    return
                }
sub_pages/customer/shopping/confirm.vue
@@ -428,6 +428,7 @@
            background-color: #ffffff;
            .transform-list {
                overflow-x: scroll;
                .transform-item {
                    background: rgba(225, 240, 231, 0.38);
                    border-radius: 8rpx;
sub_pages/customer/trade/detail.vue
@@ -196,7 +196,7 @@
                if (!item.stock) {
                    item.stock = 0
                }
                if (item.shopnum + addnum > item.stock) {
                if (addnum > 0 & item.shopnum + addnum > item.stock) {
                    this.$message.showToast('库存不足,无法修改')
                    return
                }
sub_pages/customer/trade/list.vue
@@ -341,7 +341,7 @@
                if (!item.shopnum) {
                    item.shopnum = 0
                }
                if (item.shopnum + addnum > item.stock) {
                if (addnum > 0 & item.shopnum + addnum > item.stock) {
                    this.$message.showToast('库存不足,无法修改')
                    return
                }
sub_pages/partner/order-manage/order-manage.vue
@@ -18,36 +18,41 @@
            </view>
            <view class="status t-red m-l-a m-r-0">{{ item.paymentAmount }}</view>
          </view>
          <view class="desc flex">
            <view class="label">
              订单状态:
            </view>
            <view class="value">{{ item.statusBackendStr }}</view>
          </view>
          <view class="desc flex">
            <view class="label">
              收货人:
            </view>
            <view class="value">{{ item.customer }}</view>
          </view>
          <view class="desc flex">
            <view class="label">
              收货人手机号码:
            </view>
            <view class="value">{{ item.customerTel }}</view>
          </view>
          <view class="flex">
              <view class="desc flex flex1">
                <view class="label">
                  订单状态:
                </view>
                <view class="value">{{ item.statusBackendStr }}</view>
              </view>
              <view class="desc flex flex1">
                <view class="label">
                  支付时间:
                </view>
                <view class="value">{{ item.paymentTime }}</view>
              </view>
          </view>
          <ivew class="flex">
              <view class="desc flex flex1">
                <view class="label">
                  收货人:
                </view>
                <view class="value">{{ item.customer }}</view>
              </view>
              <view class="desc flex flex1">
                <view class="label">
                  收货人手机号码:
                </view>
                <view class="value">{{ item.customerTel }}</view>
              </view>
          </ivew>
          <view class="desc flex">
            <view class="label">
              收货地址:
            </view>
            <view class="value">{{ item.customerAddress }}</view>
          </view>
          <view class="desc flex">
            <view class="label">
              支付时间:
            </view>
            <view class="value">{{ item.paymentTime }}</view>
          </view>
          <view class="button-green-1" v-if="false">确认配送完成</view>
        </view>