| | |
| | | <template>
|
| | | <!-- 列表页面 -->
|
| | | <view class="trade-list">
|
| | | <view class="category-detail flex">
|
| | | <view class="category-detail flex" v-if="query.category">
|
| | | <view class="flex1 info">
|
| | | <view class="title flex">
|
| | | <view>牛油果泡泡</view>
|
| | | <view>{{categoryInfo.name||'-'}}</view>
|
| | | <view>
|
| | | <image src="../../../static/common/icon-kf.png" class="icon-kf m-l-15 img100"></image>
|
| | |
|
| | | </view>
|
| | | </view>
|
| | | <view class="desc">
|
| | | 规格:10支/扎
|
| | | 规格:{{categoryInfo.unit}}
|
| | | </view>
|
| | | <view class="desc">
|
| | | 估重:1.3kg/扎
|
| | | 颜色:{{categoryInfo.color}}
|
| | | </view>
|
| | | <view class="desc">
|
| | | <!-- <view class="desc">
|
| | | 包袋:棉袋
|
| | | </view>
|
| | | </view> -->
|
| | | </view>
|
| | | <view class="info-price">
|
| | | <view class="title">当日均价</view>
|
| | |
| | | </view>
|
| | | <view class="flex1" @click.stop="level_show=true">
|
| | | {{ this.query.levelStr || '级别' }}
|
| | | <image src="../../../static/common/icon-arrow-down.png" class="icon-arrow-down"
|
| | | ></image>
|
| | | <image src="../../../static/common/icon-arrow-down.png" class="icon-arrow-down"></image>
|
| | | </view>
|
| | |
|
| | | <!-- <view class="flex1">-->
|
| | |
| | | </view>
|
| | | </view>
|
| | |
|
| | | <view class="component-shop-item flex" v-for="(item,index) of list" :key="index"
|
| | | >
|
| | | <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="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>
|
| | | <view class="level">
|
| | | A级
|
| | | {{levelStr||''}}
|
| | | </view>
|
| | | </view>
|
| | |
|
| | | <view class="m-l-12 info-container flex1">
|
| | | <view @click.stop="toDetail(item)">
|
| | | <view class="title">
|
| | | 橙色芭比
|
| | | {{item.name||'-'}}
|
| | | <view class="price">
|
| | | ¥6.60/扎
|
| | | ¥{{item.price||0}}元/扎
|
| | | </view>
|
| | | </view>
|
| | | <view class="shop-name">
|
| | | 牛油果泡泡·白色
|
| | | {{item.supplierName}}
|
| | | </view>
|
| | | <view class="other-info flex">
|
| | | <view class="m-r-15">
|
| | | 已售:7
|
| | | 已售:{{item.sales}}
|
| | | </view>
|
| | | <view class="m-r-15">
|
| | | 剩余:13
|
| | | 剩余:{{item.stock}}
|
| | | </view>
|
| | | <view class="m-r-15">
|
| | | 1支/扎
|
| | | {{item.unit}}
|
| | | </view>
|
| | | </view>
|
| | | </view>
|
| | |
| | | </view>
|
| | |
|
| | |
|
| | | <view class="icon-shop" v-if="list&&list.length>0" @click="goto('/sub_pages/customer/shopping/shopping',true)">
|
| | | <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">
|
| | |
| | | params: [],
|
| | | columnStr: '',
|
| | | },
|
| | | categoryInfo: {},
|
| | | params: [],
|
| | |
|
| | | shoptotal: 0,
|
| | | list: [],
|
| | | level_show: false,
|
| | | level_columns: [[]],
|
| | | level_columns: [
|
| | | []
|
| | | ],
|
| | |
|
| | | order_show: false,
|
| | | order_columns: [[]]
|
| | | order_columns: [
|
| | | []
|
| | | ]
|
| | | }
|
| | | },
|
| | | async onLoad(options) {
|
| | |
| | | value: ''
|
| | | })
|
| | | })
|
| | | if (this.query.category) {
|
| | | await this.getDetail()
|
| | | }
|
| | |
|
| | | // await this.getList('post')
|
| | | // this.
|
| | |
| | | uni.stopPullDownRefresh()
|
| | | },
|
| | | methods: {
|
| | | async getDetail() {
|
| | | this.$message.showLoading()
|
| | | //获取到分类的详情信息
|
| | | const {
|
| | | code,
|
| | | data
|
| | | } = await this.$http.request('get', '/api/customer/flower/category/tree/view', {
|
| | | params: {
|
| | | id: this.query.category
|
| | | }
|
| | | })
|
| | | this.$message.hideLoading()
|
| | | if (code == 0) {
|
| | | this.categoryInfo = data || {}
|
| | | }
|
| | | },
|
| | | updateValue(item, value) {
|
| | | item.value = value
|
| | | this.$set(item, 'value', value)
|
| | |
| | | this.$message.showLoading()
|
| | | const res = await this.$http.request('get', '/api/supplier/flower/params', {
|
| | | params: {
|
| | | categoryId: this.dto.category
|
| | | categoryId: this.query.category
|
| | | }
|
| | | })
|
| | | this.$message.hideLoading()
|
| | | if (res.code === 0) {
|
| | | // this.columns_params = res.data || []
|
| | | this.dto.params = res.data || []
|
| | | this.params = res.data || []
|
| | | this.$refs.popup_param.open()
|
| | | }
|
| | |
|
| | |
| | | return
|
| | | }
|
| | | this.$message.showLoading()
|
| | | const {code} = await http.request('post', '/api/customer/flower/cart/change-num', {
|
| | | const {
|
| | | code
|
| | | } = await http.request('post', '/api/customer/flower/cart/change-num', {
|
| | | data: {
|
| | | id: item.id,
|
| | | num: addnum
|
| | | }
|
| | | }
|
| | | )
|
| | | })
|
| | | this.$message.hideLoading()
|
| | | if (code === 0) {
|
| | | item.shopnum += addnum
|