xuxueyang
2024-07-25 e998d551df1c96572838bbf661be938aa79d1be8
fix bug
已修改11个文件
209 ■■■■■ 文件已修改
environments/index.js 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
manifest.json 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/home/components/home-category.vue 28 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/home/components/home-price.vue 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/home/components/home-zones.vue 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/home/home.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/user/supplier-user.vue 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
sub_pages/customer/self/follow.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
sub_pages/customer/shopping/shopping.vue 38 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
sub_pages/customer/trade/list.vue 65 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
sub_pages/customer/trade/trade.vue 26 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
environments/index.js
@@ -1,7 +1,8 @@
export default {
    
    httpBaseUri: 'https://www.hmyxianhua.com/flower',
    // httpBaseUri: 'https://www.hmyxianhua.com/flower',
    // httpBaseUri: 'http://47.99.58.211/flower',
    httpBaseUri: 'http://localhost:8080/flower',
    clientId: '',
    secret: '',
manifest.json
@@ -49,22 +49,19 @@
    "quickapp" : {},
    /* 快应用特有相关 */
    "mp-weixin" : {
        "appid" : "wx6d0ecc4e18710458",
        "appid" : "wx1441324401626290",
        "setting" : {
            "urlCheck" : false,
            "es6" : true,
            "minified" : true
        },
        "usingComponents" : true,
        "permission" : {
        "permission" : {},
        "plugins" : {}
        },
        "plugins" : {
            "chooseLocation" : {
                "version" : "1.0.10",
                "provider" : "wx76a9a06e5b4e693e"
            }
        }
    },
    // "chooseLocation" : {
    //     "version" : "1.0.10",
    //     "provider" : "wx76a9a06e5b4e693e"
    // }
    "vueVersion" : "2"
}
pages/home/components/home-category.vue
@@ -5,7 +5,7 @@
            <view class="t2">当前在售123435扎</view>
        </view>
        <view class="m-t-12 flex">
            <view class="item" v-for="(item,index) of list" :key="index">
      <view class="item" v-for="(item,index) of list" :key="index" @click.stop="toList(item)">
                <image class="icon img100" :src="item.url"></image>
                <view>{{item.name || '-'}}</view>
            </view>
@@ -16,10 +16,29 @@
<script>
    export default {
        beforeMount() {
            for (var i = 0; i < 10; i++) {
    // for (var i = 0; i < 10; i++) {
    //     this.list.push({
    //         'url': 'https://hmy-flower.oss-cn-shanghai.aliyuncs.com/e2/e2ee2fa7cdef458ba748261305edc57435549b9113807b6fbbfd4bfa456334d.png',
    //         'name': '玫瑰'
    //     })
    // }
    this.$http.request('get', '/api/customer/flower/category/tree', {}).then(res => {
      var data = res.data
      this.list = []
      var arr = data || []
      for (let i = 0; i < arr.length && i < 10; i++) {
                this.list.push({
                    'url': 'https://hmy-flower.oss-cn-shanghai.aliyuncs.com/e2/e2ee2fa7cdef458ba748261305edc57435549b9113807b6fbbfd4bfa456334d.png',
                    'name': '玫瑰'
          id: arr[i].id,
          name: arr[i].name,
          url: arr[i].imageUrl
        })
      }
    })
  },
  methods: {
    toList(item){
      uni.navigateTo({
        url:'//sub_pages/customer/trade/list?categoryId='+item.id
                })
            }
        },
@@ -42,6 +61,7 @@
            line-height: 40rpx;
            min-width: 20%;
            margin-bottom: 28rpx;
            .icon {
                width: 94rpx;
                height: 94rpx;
pages/home/components/home-price.vue
@@ -2,7 +2,7 @@
    <view class="home-price">
        <view class="flex t1">
            <view>2024-06-03 09:20:19 花满芫成交均价</view>
            <uni-icons class="m-l-a m-r-0" type="right"></uni-icons>
<!--            <uni-icons class="m-l-a m-r-0" type="right"></uni-icons>-->
        </view>
        <view class="items" style="border-top: 2rpx solid #EEEEEE;">
            <view class="flex" style="border-bottom: 2rpx solid #EEEEEE;padding-top: 24rpx;">
@@ -87,11 +87,11 @@
                list2: [],
            };
        },
        mounted() {
        async mounted() {
            const {
                data
            } = await this.$http.request('get', '/api/pub/customer/home', {
            } = await this.$http.request('get', '/api/pub/customer/home/category/price/ave', {
                size: 6,
            })
            var list = data && data.records || []
pages/home/components/home-zones.vue
@@ -1,7 +1,7 @@
<template>
  <view class="home-zones">
    <view class="c" v-for="(item,index) of list">
      <image class="p1 img100 m-t-12" :lazy-load="true" mode="aspectFit"
      <image class="p1 img100 m-t-12" :lazy-load="true" mode="aspectFill"
             :src="item.bgUrl">
      </image>
      <view class="c-txt-1">
@@ -79,11 +79,15 @@
      })
    },
  },
  onLoad() {
  mounted() {
    console.log('init hone zones')
    this.$http.request('get', '/api/flower/zone/list', {}).then(res => {
      this.list = res.data || []
    })
  },
  onLoad() {
  },
}
</script>
pages/home/home.vue
@@ -183,7 +183,7 @@
            // })
            //获取banner图
            this.$http.request('get', '/api/ua/banner/list', {
            this.$http.request('get', '/api/pub/banner/list', {
            }).then(res => {
                if (res.code == 0) {
@@ -201,7 +201,7 @@
            //公告
            this.$http.request('get', '/api/ua/announcement/list', {
            this.$http.request('get', '/api/announcement/page', {
                params: {
                    size: 5,
                    status: 'A'
pages/user/supplier-user.vue
@@ -64,29 +64,29 @@
      <view class="user-util m-t-12">
        <view class="title flex">
          <view class="flex1">我的订单</view>
          <view class="m-r-a m-r-0 more" @click="goto('/pages/order/order')">全部订单
          <view class="m-r-a m-r-0 more" @click="goto('/pages/order/order',true)">全部订单
            <uni-icons class="" type="right"
                       size="12"></uni-icons>
          </view>
        </view>
        <view class="flex order-icons-container">
          <view class="order-icons" @click="goto('/pages/order/order?status=PENDING')">
          <view class="order-icons" @click="goto('/pages/order/order?status=PENDING',true)">
            <image src="../../static/images/customer/order/order-type-1.png" class="order-icon dfk"></image>
            <view>待付款</view>
          </view>
          <view class="order-icons">
          <view class="order-icons" @click="goto('/pages/order/order?status=SEND',true)">
            <image src="../../static/images/customer/order/order-type-2.png" class="order-icon dfh"></image>
            <view>待发货</view>
          </view>
          <view class="order-icons">
          <view class="order-icons" @click="goto('/pages/order/order?status=RECEIVE',true)">
            <image src="../../static/images/customer/order/order-type-3.png" class="order-icon dsh"></image>
            <view>待收货</view>
          </view>
          <view class="order-icons">
          <view class="order-icons" @click="goto('/pages/order/order?status=EVALUATE',true)">
            <image src="../../static/images/customer/order/order-type-4.png" class="order-icon dpj"></image>
            <view>待评价</view>
          </view>
          <view class="order-icons">
          <view class="order-icons" @click="goto('/pages/order/order?status=COMPLETED',true)">
            <image src="../../static/images/customer/order/order-type-5.png" class="order-icon sh"></image>
            <view>售后</view>
          </view>
sub_pages/customer/self/follow.vue
@@ -110,7 +110,7 @@
    .button-2 {
      border-radius: 34rpx;
      border: 2rpx solid #20613D
      border: 2rpx solid #20613D;
      color: #20613D;
    }
  }
sub_pages/customer/shopping/shopping.vue
@@ -1,14 +1,14 @@
<template>
  <view class="shopping-container">
    <view class="top-title"> 苏州市一价全含,市区内包邮派送到店
    <view class="top-title"><span class="t-red">*</span> 苏州市一价全含,市区内包邮派送到店
    </view>
    <view class="top-desc">
      全程鲜花冷链专线,时效快,损耗小
    </view>
    <view class="flex">
      <image class="icon-clock m-r-6" src="../../../static/common/icon-call.png"></image>
    <view class="flex top-kf">
      <image class="icon-clock m-r-6" src="../../../static/common/icon-kf.png"></image>
      <view class="name">
        客服电话 : &nbsp;&nbsp; <span class="topic-gray">{{ tel }}</span>
        15974805814
      </view>
    </view>
    <view class="">
@@ -54,14 +54,14 @@
    <view style="min-height:200rpx">
    </view>
    <view class="bottom-price flex">
      <view>
        <radio :checked="checkall" @change="selectAll"></radio>
      <view class="m-t-12">
        <radio :checked="checkall" @click="selectAll"></radio>
        全选
      </view>
      <view>
        合计:¥ {{ totalprice }} 元
      <view class="m-t-12 m-l-a m-r-20 text-center">
        合计:<span class="t-red">¥ {{ totalprice || 0 }}</span> 元
      </view>
      <view class="button-green-1">
      <view class="button-green-1 m-l-a m-r-0" style="min-width: 240rpx">
        提交订单
      </view>
    </view>
@@ -97,8 +97,8 @@
    totalprice() {
      let totalprice = 0
      this.list.forEach(dto => {
        dto.flowerList.forEach(item => {
      this.list && this.list.forEach(dto => {
        dto.flowerList && dto.flowerList.forEach(item => {
          if (this.ids.indexOf(item.id) >= 0) {
            totalprice += item.price * item.num
          }
@@ -176,14 +176,16 @@
            }
          }
        }
      }
    },
    selectAll() {
        console.log('selectAll', this.checkall)
      if (this.checkall) {
        this.ids = []
        this.checkall = false
          // this.$forceUpdate()
      } else {
        list.for(dto => {
          this.list.forEach(dto => {
          if (this.ids.indexOf(dto.id) < 0) {
            this.ids.push(dto.id)
          }
@@ -193,6 +195,7 @@
            }
          })
        })
          this.checkall = true
      }
    },
    changeItem(dto, type) {
@@ -257,6 +260,7 @@
      }
    }
    },
  }
}
</script>
@@ -268,6 +272,7 @@
  .bottom-price {
    position: fixed;
    background-color: #ffffff;
    left: 0rpx;
    padding: 20rpx;
    right: 0rpx;
@@ -323,15 +328,15 @@
  }
  .top-title {
    font-size: 28rpx;
    font-size: 32rpx;
    color: #000000;
    line-height: 40rpx;
  }
  .top-desc {
    font-size: 24rpx;
    font-size: 28rpx;
    color: #666666;
    line-height: 34rpx;
    line-height: 40rpx;
  }
  .top-kf {
@@ -339,6 +344,7 @@
    border-radius: 8rpx;
    font-weight: 400;
    font-size: 24rpx;
    margin-top: 10rpx;
    color: #20613D;
    line-height: 52rpx;
    height: 52rpx;
sub_pages/customer/trade/list.vue
@@ -58,8 +58,8 @@
      </view>
      <view class="component-shop-item flex" v-for="(item,index) of list" :key="index"
            @click="toDetail(item)">
        <view class="img">
      >
        <view class="img" @click.stop="toDetail(item)">
          <image class="img img100"
                 src="https://hmy-flower.oss-cn-shanghai.aliyuncs.com/ff/fff3027bd0a146478fd1f0aae816a028%E5%BE%AE%E4%BF%A1%E6%88%AA%E5%9B%BE_20240710224139.png">
          </image>
@@ -69,6 +69,7 @@
        </view>
        <view class="m-l-12 info-container flex1">
          <view @click.stop="toDetail(item)">
          <view class="title">
            橙色芭比
            <view class="price">
@@ -89,21 +90,22 @@
              1支/扎
            </view>
          </view>
          </view>
          <view class="bottom-buttons  flex">
            <view class="icons flex">
              <uni-icons v-if="item.shopnum&&item.shopnum>=1" type="minus" size="32"
                         @click.stop="mulnum(item)"></uni-icons>
                         @click.stop="addnum(item,-1)"></uni-icons>
              <view class="curnums" v-if="item.shopnum&&item.shopnum>=1">{{ item.shopnum }}</view>
              <uni-icons v-if="!item.shopnum||item.shopnum<=99" type="plus-filled" size="32"
                         @click.stop="addnum(item)"></uni-icons>
                         @click.stop="addnum(item,1)"></uni-icons>
            </view>
          </view>
        </view>
      </view>
      <view class="icon-shop" v-if="list&&list.length>0">
      <view class="icon-shop" v-if="list&&list.length>0" @click="goto('/sub_pages/customer/shopping/shopping',true)">
        <!-- 购物图标 -->
        <!-- 如果有购买的东西,就要附带数字了 -->
        <view v-if="shoptotal>0" class="number">
@@ -149,6 +151,8 @@
</template>
<script>
import http from "../../../plugins/http";
export default {
  data() {
    return {
@@ -178,7 +182,7 @@
    this.query.category = options.categoryId || ''
    this.query.zoneId = options.zoneId || ''
    this.listApi = '/api/customer/flower/list'
    this.getList()
    this.getList('post')
    this.$http.request('get', '/api/code/value', {
      params: {
        type: 'FLOWER_LEVEL'
@@ -274,21 +278,48 @@
        url: `/sub_pages/customer/trade/detail?id=${item.id}`
      })
    },
    mulnum(item) {
      if (item.shopnum > 0) {
        item.shopnum -= 1
    // mulnum(item) {
    //   if (item.shopnum > 0) {
    //     item.shopnum -= 1
    //   }
    //   this.shoptotal -= 1
    //   this.$forceUpdate()
    //
    // },
    async addnum(item, addnum) {
      if (!this.currentInfo.id) {
        await this.$message.confirm('请前往登录')
        uni.navigateTo({
          url: '//pages/user/supplier-user'
        })
        return
      }
      this.shoptotal -= 1
      this.$forceUpdate()
      if (!item.shopnum) {
        item.shopnum = 0
      }
      if (item.shopnum + addnum >= 0) {
    },
    addnum(item) {
      if (item.shopnum) {
        item.shopnum += 1
      } else {
        item.shopnum = 1
        return
      }
      this.shoptotal += 1
      this.$message.showLoading()
      const {code} = await http.request('post', '/api/api/customer/flower/cart/change-num', {
            data: {
              id: item.id,
              num: addnum
            }
          }
      )
      this.$message.hideLoading()
      if (code === 0) {
        item.shopnum += addnum
      }
      // if (item.shopnum) {
      //   item.shopnum += 1
      // } else {
      //   item.shopnum = 1
      // }
      // this.shoptotal += 1
      this.$forceUpdate()
    },
  }
sub_pages/customer/trade/trade.vue
@@ -17,23 +17,23 @@
            <view class="" style="display: flex;flex-wrap: inherit;" v-else>
                <view class="type-list">
                    <view v-for="(item,index) of list" @click="changeType(item)"
                        :class="[query.categoryId==item.id?'current':'']" :key="index" class="p10 flex type-item">
                        :class="[query.categoryId===item.id?'current':'']" :key="index" class="p10 flex type-item">
                        {{item.name || '-'}}
                    </view>
                </view>
                <view class="canteen-item-container">
                    <view class="component-filter-container" style="padding-top: 12rpx;">
                        <view class="flex1" @click="openParamPop">
                            筛选
                        </view>
                        <view class="flex1">
                            颜色<image src="../../../static/common/icon-arrow-down.png" class="icon-arrow-down"></image>
                        </view>
                        <view class="flex1">
                            筛选<image src="../../../static/common/icon-arrow-down.png" class="icon-arrow-down"></image>
                        </view>
                    </view>
                    <u-divider></u-divider>
<!--                    <view class="component-filter-container" style="padding-top: 12rpx;">-->
<!--                        <view class="flex1" @click="openParamPop">-->
<!--                            筛选-->
<!--                        </view>-->
<!--                        <view class="flex1">-->
<!--                            颜色<image src="../../../static/common/icon-arrow-down.png" class="icon-arrow-down"></image>-->
<!--                        </view>-->
<!--                        <view class="flex1">-->
<!--                            筛选<image src="../../../static/common/icon-arrow-down.png" class="icon-arrow-down"></image>-->
<!--                        </view>-->
<!--                    </view>-->
<!--                    <u-divider></u-divider>-->
                    <view class="flex">
                        <view v-for="(item,index) of listFilter" :key="item.id" class="canteen-item list"
                            @click.stop="toDetailList(item)">