| | |
| | | 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
|
| | |
|
| | | });
|
| | | }
|
| | | |
| | |
|
| | | },
|
| | | }
|
| | | }
|
| | |
| | | <!-- 特别的几个公告图片 -->
|
| | | <home-banner-imgs></home-banner-imgs>
|
| | | <!-- 均价情况 -->
|
| | | <home-price></home-price>
|
| | | <!-- <home-price></home-price> -->
|
| | | <!-- 几个专区 -->
|
| | | <home-zones></home-zones>
|
| | | <!-- 置顶的花列表 -->
|
| | |
| | | <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> |
| | |
| | | <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> |
| | |
| | | this.dto = { |
| | | ...data |
| | | } |
| | | this.dto.content = this.$util.formatRichText(this.dto.content||'') |
| | | |
| | | this.dto.content = this.$util.formatRichText(this.dto.content || '') |
| | | |
| | | }, |
| | | } |
| | | } |
| | |
| | | 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() |
| | |
| | | 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() |
| | |
| | | </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"> |
| | |
| | | </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 "> |
| | |
| | | <view class="flex user-info">
|
| | | <!-- 头像 -->
|
| | |
|
| | | <image class="user-icon" v-if="currentInfo.picture
|
| | | ||currentInfo.customerDTO&¤tInfo.customerDTO.cover
|
| | | <image class="user-icon" v-if="
|
| | | currentInfo.customerDTO&¤tInfo.customerDTO.cover
|
| | | ||currentInfo.supplierDTO&¤tInfo.supplierDTO.cover |
| | | || currentInfo.picture
|
| | | " :src="
|
| | | currentInfo.customerDTO&¤tInfo.customerDTO.cover
|
| | | ||currentInfo.supplierDTO&¤tInfo.supplierDTO.cover
|
| | | " :src="currentInfo.picture
|
| | | ||currentInfo.customerDTO&¤tInfo.customerDTO.cover
|
| | | ||currentInfo.supplierDTO&¤tInfo.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>
|
| | |
| | | </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>
|
| | |
| | | })
|
| | | //获取待支付数目
|
| | | this.$http.request('get', '/api/customer/order/count/pending', {
|
| | | params: {
|
| | | }
|
| | | params: {}
|
| | | }).then(res => {
|
| | | if (res.code === 0) {
|
| | | that.order_pendding_num = res.data || 0
|
| | |
| | | // 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}`) |
| | |
| | | |
| | | // Vue.prototype.$storage = storage |
| | | |
| | | export default storage |
| | | export default storage |
| | |
| | | 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, |
| | |
| | | if (item.status == 'UP') { |
| | | |
| | | } else { |
| | | this.$message.showToast('已失效,无法查看详情') |
| | | this.$message.showToast('商品已下架,无法查看详情') |
| | | return |
| | | } |
| | | uni.navigateTo({ |
| | |
| | | if (!item.stock) { |
| | | item.stock = 0 |
| | | } |
| | | if (item.shopnum + addnum > item.stock) { |
| | | if (addnum > 0 & item.shopnum + addnum > item.stock) { |
| | | this.$message.showToast('库存不足,无法修改') |
| | | return |
| | | } |
| | |
| | | @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)"> |
| | |
| | | |
| | | } |
| | | |
| | | .trade-info-container.UP { |
| | | .title { |
| | | color: #000000; |
| | | } |
| | | } |
| | | |
| | | .trade-info-container { |
| | | background-color: #fff; |
| | | border-radius: 40rpx; |
| | |
| | | font-weight: 600; |
| | | font-size: 28rpx; |
| | | |
| | | color: #000000; |
| | | color: #333; |
| | | line-height: 40rpx; |
| | | |
| | | .level { |
| | |
| | | if (item.status == 'UP') { |
| | | |
| | | } else { |
| | | this.$message.showToast('已失效,无法查看详情') |
| | | this.$message.showToast('商品已下架,无法查看详情') |
| | | return |
| | | } |
| | | uni.navigateTo({ |
| | |
| | | //提交到购物车中 |
| | | // 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() |
| | | } |
| | |
| | | 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 { |
| | | |
| | |
| | | if (!item.stock) { |
| | | item.stock = 0 |
| | | } |
| | | if (item.shopnum + addnum > item.stock) { |
| | | if (addnum > 0 & item.shopnum + addnum > item.stock) { |
| | | this.$message.showToast('库存不足,无法修改') |
| | | return |
| | | } |
| | |
| | | @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;" |
| | |
| | | <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" |
| | |
| | | |
| | | } |
| | | |
| | | .trade-info-container.UP { |
| | | .title { |
| | | color: #000000; |
| | | |
| | | } |
| | | } |
| | | |
| | | .trade-info-container { |
| | | background-color: #fff; |
| | | border-radius: 20rpx; |
| | |
| | | font-weight: 600; |
| | | font-size: 28rpx; |
| | | |
| | | color: #000000; |
| | | color: #333; |
| | | line-height: 40rpx; |
| | | |
| | | .level { |
| | |
| | | if (!item.stock) {
|
| | | item.stock = 0
|
| | | }
|
| | | if (item.shopnum + addnum > item.stock) {
|
| | | if (addnum > 0 & item.shopnum + addnum > item.stock) {
|
| | | this.$message.showToast('库存不足,无法修改')
|
| | | return
|
| | | }
|
| | |
| | | background-color: #ffffff; |
| | | |
| | | .transform-list { |
| | | overflow-x: scroll; |
| | | .transform-item { |
| | | background: rgba(225, 240, 231, 0.38); |
| | | border-radius: 8rpx; |
| | |
| | | if (!item.stock) {
|
| | | item.stock = 0
|
| | | }
|
| | | if (item.shopnum + addnum > item.stock) {
|
| | | if (addnum > 0 & item.shopnum + addnum > item.stock) {
|
| | | this.$message.showToast('库存不足,无法修改')
|
| | | return
|
| | | }
|
| | |
| | | if (!item.shopnum) { |
| | | item.shopnum = 0 |
| | | }
|
| | | if (item.shopnum + addnum > item.stock) {
|
| | | if (addnum > 0 & item.shopnum + addnum > item.stock) {
|
| | | this.$message.showToast('库存不足,无法修改')
|
| | | return
|
| | | }
|
| | |
| | | </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> |