xuxueyang
2024-07-30 e4233b5c4e123c4b79a38d0a9b0c8b60631e1683
update
已修改16个文件
已添加1个文件
238 ■■■■ 文件已修改
manifest.json 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/home/components/home-category.vue 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/home/components/home-price.vue 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/home/home.vue 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/notice/list.vue 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/notice/notice.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/user/address/address.vue 62 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/user/supplier-user.vue 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
static/common/icon-sc-fill.png 补丁 | 查看 | 原始文档 | blame | 历史
sub_pages/customer/self/collect.vue 13 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
sub_pages/customer/self/follow.vue 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
sub_pages/customer/shop/shop.vue 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
sub_pages/customer/shopping/confirm.vue 26 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
sub_pages/customer/shopping/shopping.vue 44 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
sub_pages/customer/trade/detail.vue 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
sub_pages/customer/trade/list.vue 25 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
sub_pages/customer/trade/trade.vue 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
manifest.json
@@ -49,7 +49,7 @@
    "quickapp" : {},
    /* 快应用特有相关 */
    "mp-weixin" : {
        "appid" : "wx3203fd935a6ffe09",
        "appid" : "wx1441324401626290",
        "setting" : {
            "urlCheck" : false,
            "es6" : true,
pages/home/components/home-category.vue
@@ -1,7 +1,7 @@
<template>
  <view class="home-category">
    <view class="flex">
      <view class="t1">06-03(今日)第一场交易中</view>
      <view class="t1">{{today}}(今日)第一场交易中</view>
      <view class="t2">当前在售123435扎</view>
    </view>
    <view class="m-t-12 flex">
@@ -16,12 +16,7 @@
<script>
export default {
  beforeMount() {
    // for (var i = 0; i < 10; i++) {
    //     this.list.push({
    //         'url': 'https://hmy-flower.oss-cn-shanghai.aliyuncs.com/e2/e2ee2fa7cdef458ba748261305edc57435549b9113807b6fbbfd4bfa456334d.png',
    //         'name': '玫瑰'
    //     })
    // }
      this.today = this.$util.toDate(new Date())
    this.$http.request('get', '/api/customer/flower/category/tree', {}).then(res => {
      var data = res.data
      this.list = []
@@ -45,6 +40,7 @@
  data() {
    return {
      list: [],
      today:'',
    };
  }
pages/home/components/home-price.vue
@@ -1,7 +1,7 @@
<template>
    <view class="home-price">
        <view class="flex t1">
            <view>2024-06-03 09:20:19 花满芫成交均价</view>
            <view>{{today}} 花满芫成交均价</view>
            <!--            <uni-icons class="m-l-a m-r-0" type="right"></uni-icons>-->
        </view>
        <view class="items" style="border-top: 2rpx solid #EEEEEE;">
@@ -109,10 +109,11 @@
            return {
                list1: [],
                list2: [],
                today: ''
            };
        },
        async mounted() {
            this.today = this.$util.toDateSec(new Date())
            const {
                data
            } = await this.$http.request('get', '/api/pub/customer/home/category/price/ave', {
pages/home/home.vue
@@ -226,14 +226,15 @@
                
            },2000)
            //公告
            this.$http.request('get', '/api/announcement/page', {
            this.$http.request('get', '/api/pub/announcement/list', {
                params: {
                    size: 5,
                    status: 'A'
                    // status: 'A'
                }
            }).then(res => {
                if (res.code === 0) {
                    this.noticeList = (res.data && res.data.records || [])
                    // (res.data && res.data.records || [])
                    this.noticeList =  res.data || []
                    console.log('this.noticeList', this.noticeList)
                    if (this.noticeList.length > 0) {
                        this.currentNotice = this.noticeList[0]
pages/notice/list.vue
@@ -20,12 +20,14 @@
    export default {
        data() {
            return {
                query: {
                    status: 'A'
                }
            }
        },
        onLoad() {
            // this.list = [{},{}]
            this.listApi = '/api/announcement/page'
            this.listApi = '/api/pub/announcement/list'
            this.getList()
        },
@@ -54,6 +56,7 @@
        font-size: 28rpx;
        font-weight: 600;
        background-color: #fff;
        .time{
            font-size: 24rpx;
            color: darkgray;
pages/notice/notice.vue
@@ -45,7 +45,7 @@
                this.$message.showLoading()
                const {
                    data
                } = await this.$http.request('get', '/api/announcement/page/view?id=' + this.id, {
                } = await this.$http.request('get', '/api/pub/announcement/page/view?id=' + this.id, {
                })
pages/user/address/address.vue
@@ -1,5 +1,5 @@
<template>
  <!-- 收获地址列表 -->
    <!-- 收货地址列表 -->
  <view class="p15 container-address">
    <no-data v-if="!list||list.length==0" style="width: 100%;"></no-data>
@@ -12,8 +12,12 @@
            <view class="tel">{{ item.tel || '-' }}</view>
          </view>
          <view class="address">
                        {{ item['province'] || '' }}{{ item['city'] && ('/' + item['city']) || '' }}{{
                          item['region'] && ('/' + item['region']) || ''
                        }}
                    </view>
                    <view class="address">
            {{ item.address }}
          </view>
        </view>
        <!-- <view class="h-line"></view> -->
@@ -49,15 +53,8 @@
    <view style="height: 92rpx;width: 690rpx;">
      &nbsp;
    </view>
    <view class="button-green button-fixed-bottom" style="width: 690rpx;line-height: 92rpx;height: 92rpx;" @click=" ()=>{
                delete this.submitForm.id
                this.submitForm['name'] = ''
                this.submitForm['tel'] = ''
                this.submitForm['tel'] = ''
                this.submitForm['area'] = ''
                openAddressForm()
            }">添加收货地址
        <view class="button-green button-fixed-bottom" style="width: 690rpx;line-height: 92rpx;height: 92rpx;"
            @click="addAddress">添加收货地址
    </view>
    <uni-popup ref="popup_form" type="top" :mask-click="false">
@@ -78,7 +75,15 @@
          </view>
          <view class="form-item">
            <view class="form-item-label require">
              收获地址
                            手机号
                        </view>
                        <view class="form-item-value">
                            <input v-model="submitForm.tel" placeholder="请输入收货人手机号" class="form-input"></input>
                        </view>
                    </view>
                    <view class="form-item">
                        <view class="form-item-label require">
                            收货地址
            </view>
            <view class="m-l-a m-r-0 flex " :class="[!dto['province']?'desc-gray':'']">
              <uni-data-picker :area="true" @change="(e)=>{PickArea(submitForm,e)}" placeholder=""
@@ -90,10 +95,7 @@
              <u-icon class="m-l-a" name="arrow-right"></u-icon>
            </view>
            <!--            <view class="form-item-value" @click="chooseLocation">-->
            <!--              <input v-model="submitForm.room" placeholder="请选择收获地址" disabled class="form-input"></input>-->
            <!--              &lt;!&ndash;  点击定位 &ndash;&gt;-->
            <!--            </view>-->
          </view>
          <view class="form-item">
            <view class="form-item-label require">
@@ -159,6 +161,17 @@
    };
  },
  methods: {
            addAddress() {
                delete this.submitForm.id
                this.submitForm['name'] = ''
                this.submitForm['tel'] = ''
                this.submitForm['address'] = ''
                this.submitForm['province'] = ''
                this.submitForm['city'] = ''
                this.submitForm['region'] = ''
                this.submitForm['isDefault'] = false
                this.openAddressForm()
            },
    PickArea(item, e) {
      console.log('PickArea', item, e)
      if (e.detail.value) {
@@ -249,7 +262,8 @@
          this.$message.showLoading()
          var {
            code
          } = await this.$http.request('post', '/api/address/set/default/'+item.id, {
                        } = await this.$http.request('post', '/api/address/set/default/' + item
                            .id, {
              data:{
                  id:item.id
              },
@@ -271,7 +285,7 @@
          }
        }, err => {
          this.$nextTick(() => {
            this.list[index].defaulted = false
                            this.list[index].isDefault = false
            this.$forceUpdate()
            console.log('err', err, this.list[index])
          })
@@ -281,7 +295,7 @@
      })
    },
    async selectAddress(item) {
      await this.$message.confirm('确定选择此地址作为收获地址吗')
                await this.$message.confirm('确定选择此地址作为收货地址吗')
      //携带,然后返回
      this.$store.commit('setDefaultAddress', {
        ...item
@@ -297,6 +311,10 @@
      this.$message.hideLoading()
      if (code === 0) {
        this.$message.showToast('删除成功')
                    if (item.isDefault) {
                        //要清空地址了
                        this.$store.commit('setDefaultAddress', {})
                    }
        setTimeout(() => {
          this.page.current = 1
          this.getList()
@@ -354,10 +372,10 @@
      if (code === 0) {
        this.$refs.popup_form.close()
        this.$message.showToast(this.submitForm.id ? '修改成功' : '新增成功')
                    let tmp = this
        setTimeout(() => {
          this.page.current = 1
          this.getList()
                        tmp.page.current = 1
                        tmp.refreshList()
        }, 300)
      }
    },
pages/user/supplier-user.vue
@@ -44,18 +44,20 @@
                    <!-- getUserProfile -->
                    {{ '点击登陆' }}
                </view>
                <image class="icon-setting" @click="toInfo"
                src="../../static/common/icon-setting.png" mode="aspectFit"></image>
                <image class="icon-setting" @click="toInfo" src="../../static/common/icon-setting.png" mode="aspectFit">
                </image>
            </view>
            <!-- #ifdef PUB_CUSTOMER -->
            <view class="customer-info-records">
                <view class="item">
                    <view class="num">{{ tj.collectNum || 0 }}</view>
                    <view class="num" @click="goto('/sub_pages/customer/self/collect',true)">{{ tj.collectNum || 0 }}
                    </view>
                    <view class="name">我的收藏</view>
                </view>
                <view class="line"></view>
                <view class="item">
                    <view class="num">{{ tj.followNum || 0 }}</view>
                    <view class="num" @click="goto('/sub_pages/customer/self/follow',true)">{{ tj.followNum || 0 }}
                    </view>
                    <view class="name">关注店铺</view>
                </view>
                <view class="line"></view>
static/common/icon-sc-fill.png
sub_pages/customer/self/collect.vue
@@ -56,6 +56,12 @@
        },
        methods: {
            toDetail(item) {
                if(item.status=='UP'){
                }else{
                    this.$message.showToast('已失效,无法查看详情')
                    return
                }
                uni.navigateTo({
                    url: `/sub_pages/customer/trade/detail?id=${item.id}`
                })
@@ -117,7 +123,8 @@
            @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" @click.stop="toDetail(dto)">
            <view class="trade-info-container flex" v-for="(dto,index) of list" :key="index"
                @click.stop="toDetail(dto)">
                <image class="img img100 br-4 m-r-10" :src="dto.url||dto.cover"></image>
                <view class="flex1">
                    <view class="flex">
@@ -137,7 +144,7 @@
                            <view class="m-r-15">剩余:{{ dto.stock || 0 }}</view>
                            <view class="m-r-15">颜色:{{ dto.color || '-' }}</view>
                        </view>
                        <view class="button-icons flex m-l-a m-r-0 m-t-20">
                        <view class="button-icons flex m-l-a m-r-0 m-t-20" v-if="dto.status=='UP'">
                            <view class="m-r-0 gwc" @click.stop="submitShopping(dto)">
                                + 购物车
                            </view>
@@ -153,6 +160,8 @@
<style lang="scss" scoped>
    .page-collect {
        min-height: 99vh;
        .search-container {
            display: flex;
            margin: 12rpx 0rpx 20rpx 0rpx;
sub_pages/customer/self/follow.vue
@@ -70,6 +70,8 @@
<style lang="scss" scoped>
    .follow-page {
        min-height: 99vh;
        .follow-item {
            padding: 30rpx;
            background-color: #FFFFFF;
sub_pages/customer/shop/shop.vue
@@ -316,6 +316,13 @@
                if (!item.shopnum) {
                    item.shopnum = 0
                }
                if (!item.stock) {
                    item.stock = 0
                }
                if (item.shopnum + addnum > item.stock) {
                    this.$message.showToast('库存不足,无法添加')
                    return
                }
                if (item.shopnum + addnum >= 0) {
                } else {
sub_pages/customer/shopping/confirm.vue
@@ -74,6 +74,12 @@
                    this.loadTransportList()
                    this.cacheAddressId = nv.id
                } else if (!nv.id) {
                    //说明id清空了
                    if (!this.cacheAddressId) {
                        transportList = []
                        this.cacheAddressId = ''
                    }
                }
            }
        },
@@ -84,8 +90,11 @@
                this.dto.specialNeeds = e.value[0].value
            },
            async loadTransportList() {
                if (this.currentInfo.customerDTO && this.currentInfo.customerDTO.partnerId) {
                    return
                }
                let that = this;
                console.log('address', that.address, that.cacheAddressId)
                // console.log('address', that.address, that.cacheAddressId)
                if (that.address && that.address.id && that.cacheAddressId !== that.address.id) {
                    that.$message.showLoading()
                    const {
@@ -107,10 +116,15 @@
            },
            async submitOrder() {
                console.log('submitOrder', this.dto)
                if (this.currentInfo.customerDTO && this.currentInfo.customerDTO.partnerId) {
                } else {
                if (!this.dto.transportId) {
                    this.$message.showToast('请选择配送方式')
                    return
                }
                }
                if (!this.address.id) {
                    this.$message.showToast('请选择收货地址')
                    return
@@ -217,7 +231,8 @@
                </view>
            </view>
            <!--    查看商品列表,和选择运费 -->
            <view class="br-4 transform-container m-t-12 p10">
            <view class="br-4 transform-container m-t-12 p10"
                v-if="!currentInfo.customerDTO||!currentInfo.customerDTO.partnerId">
                <view class="title">
                    <view>运输方式:</view>
                    <view class="flex transform-list flex-wrap-normal">
@@ -452,12 +467,9 @@
                margin-right: 0;
            }
            
            .desc-red{
            .desc-red {}
                
            }
            .desc{
            }
            .desc {}
        }
    }
sub_pages/customer/shopping/shopping.vue
@@ -1,6 +1,6 @@
<template>
    <view class="shopping-container">
        <view class="top-title"><span class="t-red">*</span> 苏州市一价全含,市区内包邮派送到店
        <view class="top-title"><span class="t-red">*</span> 花满芫报价已包含打包材料费、交易佣金
        </view>
        <view class="top-desc">
            全程鲜花冷链专线,时效快,损耗小
@@ -29,24 +29,25 @@
                                <radio :checked="ids.indexOf(dto.id)>=0" @click="changeItem(dto,'flower')"></radio>
                                <image class="img img100 m-r-6 br-4" :src="dto.url||dto.cover"></image>
                                <view class="flex1">
                                    <view class="title"><span class="m-r-5"
                                    <view class="title" @click.stop="toDetail(dto)"><span class="m-r-5"
                                            style="display: inline-block;">{{dto.categoryStr||''}}</span><span
                                            v-if="dto.levelStr" class="m-r-5"
                                            style="display: inline-block;">{{ dto.levelStr || '' }}</span>{{ dto.name || '-' }}
                                    </view>
                                    <view class="price">
                                    <view class="price" @click.stop="toDetail(dto)">
                                        {{ dto.price || '-' }}元/扎
                                    </view>
                                    <view class="flex">
                                        <view class="desc m-t-12 flex">
                                        <view class="desc  flex p-t-5" @click.stop="toDetail(dto)">
                                            <view class="m-r-15">剩余:{{ dto.stock || 0 }}</view>
                                            <view class="m-r-15">颜色:{{ dto.color || '-' }}</view>
                                        </view>
                                        <view class="button-icons flex m-l-a m-r-0">
                                            <uni-icons v-if="dto.num&&dto.num>=1" type="minus" size="32"
                                                @click="addnum(dto,-1)"></uni-icons>
                                                @click.stop="addnum(dto,-1)"></uni-icons>
                                            <view class="curnums" v-if="dto.num&&dto.num>=1">{{ dto.num }}</view>
                                            <uni-icons type="plus-filled" size="32" @click="addnum(dto,1)"></uni-icons>
                                            <uni-icons type="plus-filled" size="32"
                                                @click.stop="addnum(dto,1)"></uni-icons>
                                        </view>
                                    </view>
                                </view>
@@ -244,6 +245,25 @@
                    //更换个人的
                    if (this.ids.indexOf(dto.id) < 0) {
                        this.ids.push(dto.id)
                        var has = true
                        //判断如果都有,那么顶部的按钮也勾选上
                        for (var i = 0; i < this.list.length; i++) {
                            if (this.list[i].supplierId === dto.supplierId) {
                                for (var j = 0; j < this.list[i].flowerList.length; j++) {
                                    if (this.ids.indexOf(this.list[i].flowerList[j].id) < 0) {
                                        has = false
                                        break
                                    }
                                }
                                break
                            }
                        }
                        if (has) {
                            this.ids.push(dto.supplierId)
                        }
                    } else {
                        this.checkall = false
@@ -258,6 +278,13 @@
                if (dto.num + addnum >= 0) {
                } else {
                    return
                }
                if (!dto.stock) {
                    dto.stock = 0
                }
                if (dto.num + addnum > dto.stock) {
                    this.$message.showToast('库存不足,无法添加')
                    return
                }
                this.$message.showLoading()
@@ -300,6 +327,11 @@
                    this.list = data || []
                }
            },
            toDetail(dto) {
                uni.navigateTo({
                    url: '/sub_pages/customer/trade/detail?id=' + dto.id
                })
            }
        }
    }
sub_pages/customer/trade/detail.vue
@@ -5,14 +5,14 @@
            <view class="icon-container">
                <image v-if="!dto.collection" src="../../../static/common/icon-sc.png" @click="collectItem(dto)"
                    class="icon-sc"></image>
                <image v-if="dto.collection" src="../../../static/common/icon-sc.png" @click="collectItem(dto)"
                <image v-if="dto.collection" src="../../../static/common/icon-sc-fill.png" @click="collectItem(dto)"
                    class="icon-sc"></image>
                <!--        <view class="num">12</view>-->
            </view>
            <view class="icon-container">
                <image src="../../../static/common/icon-shop.png" @click="submitShopping(dto)" class="icon-shop">
                <image src="../../../static/common/icon-shop.png" @click="toShopping(dto)" class="icon-shop">
                </image>
            </view>
@@ -186,6 +186,11 @@
                this.$message.hideLoading()
            },
            toShopping() {
                uni.navigateTo({
                    url: '/sub_pages/customer/shopping/shopping'
                })
            },
            openbrand() {
                uni.navigateTo({
                    url: '/sub_pages/customer/shop/shop?id=' + (this.dto.id || '')
sub_pages/customer/trade/list.vue
@@ -21,8 +21,12 @@
                <view class="title">当日均价</view>
                <view class="price">{{categoryInfo.avePrice||'暂无'}}</view>
                <view class="flex desc">
                    <view class="m-l-a m-r-5">{{categoryInfo.avePriceDifference&&categoryInfo.avePriceDifference>=0?'+':''}}{{categoryInfo.avePriceDifference||0}}</view>
                    <view class="m-r-a m-l-5">{{categoryInfo.avePriceDifferenceRate&&categoryInfo.avePriceDifferenceRate>=0?'+':''}}{{categoryInfo.avePriceDifferenceRate||0}}%</view>
                    <view class="m-l-a m-r-5">
                        {{categoryInfo.avePriceDifference&&categoryInfo.avePriceDifference>=0?'+':''}}{{categoryInfo.avePriceDifference||0}}
                    </view>
                    <view class="m-r-a m-l-5">
                        {{categoryInfo.avePriceDifferenceRate&&categoryInfo.avePriceDifferenceRate>=0?'+':''}}{{categoryInfo.avePriceDifferenceRate||0}}%
                    </view>
                </view>
            </view>
        </view>
@@ -55,8 +59,7 @@
            <view class="component-shop-item flex" v-for="(item,index) of list" :key="index">
                <view class="img" @click.stop="toDetail(item)">
                    <image class="img img100"
                        :src="item.cover">
                    <image class="img img100" :src="item.cover">
                    </image>
                    <view class="level">
                        {{item.levelStr||''}}
@@ -134,12 +137,14 @@
                </view>
                <view class="button-space"></view>
                <view>
                    <view class="button-green" style="background-color: #fff;border: 2rpx solid #666; color: #666;width: 200rpx;left: 40rpx;right: unset;"
                    <view class="button-green"
                        style="background-color: #fff;border: 2rpx solid #666; color: #666;width: 200rpx;left: 40rpx;right: unset;"
                        @click="closeParamPopAndQuery">
                        查询
                    </view>
                    
                    <view class="button-green"  style="width: 200rpx;right: 40rpx;left: unset;" @click="closeParamPop">关闭</view>
                    <view class="button-green" style="width: 200rpx;right: 40rpx;left: unset;" @click="closeParamPop">关闭
                    </view>
                </view>
            </view>
        </uni-popup>
@@ -323,9 +328,17 @@
                    })
                    return
                }
                if (!item.stock) {
                    item.stock = 0
                }
                if (!item.shopnum) {
                    item.shopnum = 0
                }
                if (item.shopnum + addnum > item.stock) {
                    this.$message.showToast('库存不足,无法添加')
                    return
                }
                if (item.shopnum + addnum >= 0) {
                } else {
sub_pages/customer/trade/trade.vue
@@ -47,12 +47,7 @@
                                <view class="price">¥29.01-30.01</view>
                                <view class="desc">在售14410扎</view>
                                <!--                                 <view class="icons flex">
                                        <uni-icons v-if="item.shopnum&&item.shopnum>=1" type="minus" size="32"
                                            @click="mulnum(item)"></uni-icons>
                                        <view class="curnums" v-if="item.shopnum&&item.shopnum>=1">{{item.shopnum}}</view>
                                        <uni-icons type="plus-filled" size="32" @click="addnum(item)"></uni-icons>
                                    </view> -->
                            </view>
                        </view>