From 8dec48f7486c3edc888c1fa8a3fd7523b22da9ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=94=90=E6=98=8E=E6=98=8E?= <970899069@qq.com> Date: Thu, 11 Nov 2021 16:40:19 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E8=B4=AD=E7=89=A9=E5=95=86?= =?UTF-8?q?=E5=93=81=E5=85=91=E6=8D=A2=EF=BC=8C=E8=8A=82=E7=82=B9=E4=B8=AD?= =?UTF-8?q?=E5=BF=83=E8=B0=83=E6=95=B4=EF=BC=8C=E6=9D=83=E8=AF=81=E8=BD=AC?= =?UTF-8?q?=E8=AE=A9=E7=AE=A1=E7=90=86=E5=A2=9E=E5=8A=A0=E7=AD=9B=E9=80=89?= =?UTF-8?q?=EF=BC=8C=E8=B0=83=E6=95=B4=E4=BA=A4=E6=98=93=E5=B8=82=E5=9C=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../number-weight-template.vue | 312 ++-- pages/company/approve.vue | 8 + pages/goods/confirmOrder.vue | 35 +- pages/market/goods.vue | 6 +- pages/market/management.vue | 102 +- pages/user/index.vue | 115 +- pages/user/order/numberWeight.vue | 7 +- pages/user/order/numberWeightInfo.vue | 6 +- unpackage/dist/dev/app-plus/app-service.js | 1550 +++++++++-------- 9 files changed, 1144 insertions(+), 997 deletions(-) diff --git a/components/number-weight-template/number-weight-template.vue b/components/number-weight-template/number-weight-template.vue index 3b19482..5bf2861 100644 --- a/components/number-weight-template/number-weight-template.vue +++ b/components/number-weight-template/number-weight-template.vue @@ -1,178 +1,182 @@ diff --git a/pages/company/approve.vue b/pages/company/approve.vue index b9748ba..a902622 100644 --- a/pages/company/approve.vue +++ b/pages/company/approve.vue @@ -292,9 +292,17 @@ line-height: 90rpx; font-size: $title-size; } + textarea{ + width: 100%; + padding: 20rpx 0; + line-height: 50rpx; + font-size: $title-size; + } .picker-text { position: relative; padding-right: 90rpx; + line-height: 90rpx; + font-size: $title-size; .picker-icon { position: absolute; right: 0; diff --git a/pages/goods/confirmOrder.vue b/pages/goods/confirmOrder.vue index 36d7b4b..85bdb91 100644 --- a/pages/goods/confirmOrder.vue +++ b/pages/goods/confirmOrder.vue @@ -73,8 +73,7 @@ 可用优惠券列表 - + @@ -168,7 +167,6 @@ }, // 触发支付 nowPay() { - this.canPay = false let apiUrl = '' let data = {} if (this.selectTypeId === '2') { @@ -183,13 +181,26 @@ order_no: this.order_no, type: 'app' } - } else { - apiUrl = ebPay - data = { - order_no: this.order_no - } } apiUrl(data).then(res => { + // 不需要支付 + + console.log(res.canPay) + + if(!res.canPay){ + uni.showModal({ + title : '提示', + content : '商品兑换成功', + showCancel : false, + success () { + uni.reLaunch({ + url: '/pages/goods/payStatus?success=true' + }) + } + }) + return + } + // 微信支付 if (this.selectTypeId === '2') { let payInfo = JSON.parse(res) @@ -200,7 +211,6 @@ uni.reLaunch({ url: '/pages/goods/payStatus?success=true' }) - this.canPay = true }, fail: (err) => { uni.showToast({ @@ -220,7 +230,6 @@ uni.reLaunch({ url: '/pages/goods/payStatus?success=true' }) - this.canPay = true }, fail: (err) => { uni.showToast({ @@ -235,13 +244,9 @@ }).catch(err => { uni.showToast({ title: err.message, - duration: 3000, mask: true, icon: 'none' }) - setTimeout(res => { - this.canPay = true - }, 2000) }) }, @@ -249,10 +254,8 @@ selectCoupon(item) { if (this.coupon_grant_id === item.coupon_grant_id) { this.coupon_grant_id = '' - // this.coupon_price = '' } else { this.coupon_grant_id = item.coupon_grant_id - // this.coupon_price = item.price } this.mallBuyGoods(this.params, 'get') this.showCouponList = false diff --git a/pages/market/goods.vue b/pages/market/goods.vue index 71dd130..f49ebe7 100644 --- a/pages/market/goods.vue +++ b/pages/market/goods.vue @@ -19,13 +19,9 @@ {{info.skusUnit}} - + {{info.companyName}} - - - {{info.integrity}} - {{info.sales}} diff --git a/pages/market/management.vue b/pages/market/management.vue index 7c41bca..401f15d 100644 --- a/pages/market/management.vue +++ b/pages/market/management.vue @@ -1,5 +1,10 @@ @@ -30,47 +35,45 @@ import { marketsMag, marketsCancel } from '@/apis/interfaces/market'; export default { data() { return { - lists: [], - page: 1, - total: 0 + lists : [], + page : 1, + status : '', + total : 0, + pageMore: 'more' }; }, onLoad() { this.getList(); }, onReachBottom() { - if (this.total > this.lists.length) { + if (this.pageMore) { this.page = this.page + 1; this.getList(); - } else { - this.$refs.uToast.show({ - title: '吼吼吼~我是有底的~', - type: 'error', - icon: false, - duration: 3000 - }); } }, methods: { + onTabs(status){ + this.status = status + this.page = 1 + this.getList() + }, getList() { - let data = { - perPage: 10, - page: this.page - }; - marketsMag(data) - .then(res => { - console.log(res.markets.data); - this.lists = this.lists.concat(res.markets.data); - this.total = res.markets.page.total; + if(this.page === 1){ + this.lists = [] + } + marketsMag({ + status : this.status, + page : this.page + }).then(res => { + this.lists = this.lists.concat(res.markets.data); + this.total = res.markets.page.current; + this.pageMore = res.markets.page.has_more ? 'more' : 'noMore'; + }).catch(err => { + uni.showToast({ + title: err.message, + icon : 'none' }) - .catch(err => { - this.$refs.uToast.show({ - title: err.message, - type: 'error', - icon: false, - duration: 3000 - }); - }); + }); }, // 取消转让 removeGoods(id, index) { @@ -79,12 +82,20 @@ export default { icon : 'none', title: res }) - let statusObj = this.lists[index] - statusObj.status = { - value: 2, - text : '已取消', + + if(this.status === ''){ + let statusObj = this.lists[index] + statusObj.status = { + value: 2, + text : '已取消', + } + this.$set(this.lists, index, statusObj) + return + } + + if(this.status === 1 || this.status === 2){ + this.lists.splice(index, 1) } - this.$set(this.lists, index, statusObj) }).catch(err => { uni.showToast({ icon : 'none', @@ -102,6 +113,29 @@ export default {