From 2a547414d29f5d10c4f3a6e053b459348b246480 Mon Sep 17 00:00:00 2001 From: 18631081161 <2088094923@qq.com> Date: Tue, 9 Jul 2024 14:33:52 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B4=AD=E4=B9=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/mall/index.vue | 46 +++++++++++++++++++++++--------------------- 1 file changed, 24 insertions(+), 22 deletions(-) diff --git a/pages/mall/index.vue b/pages/mall/index.vue index ea6acf8..be49462 100644 --- a/pages/mall/index.vue +++ b/pages/mall/index.vue @@ -12,8 +12,7 @@ - + {{item.title}} @@ -138,10 +137,8 @@ export default { data() { - var goodsList = [1, 2, 3, 4, 5, 6]; return { statusBarHeight: 0, - goodsList, datas: [], sendRuleData: '', goodsId: "", @@ -161,23 +158,13 @@ } }); - let that = this - that.req({ - url: 'goods', - data: { - type: '10', - page: 1 - }, - success(res) { - that.datas = res.data.data - } - }); + this.getData(); this.$c.getRule(10).then(res => { if (res.status == 1) { this.sendRuleData = res.data } - }) + }); }, onShow() { @@ -193,9 +180,23 @@ const systemInfo = uni.getSystemInfoSync(); this.statusBarHeight = systemInfo.statusBarHeight; console.log('statusBarHeight', this.statusBarHeight); - }, + getData() { + let that = this + that.req({ + url: 'goods', + data: { + type: '10', + page: 1 + }, + success(res) { + that.datas = res.data.data + } + }); + }, + + order_money(data) { console.log(234); this.goodsId = data.id; @@ -240,7 +241,8 @@ if (!this.useMoney && !this.isWXPay) { uni.showToast({ - title: '请选择支付方式' + title: '请选择支付方式', + icon: 'none', }); return; } @@ -260,10 +262,10 @@ // is_mibao: this.pageTabCur // ad_id: uni.getStorageSync('_ad_id') } - + if (type == 1) { url = 'infinite_orderbuy' - + // if (this.pageTabCur == 1) { // url = 'infinite_mibao_orderbuy' // data = { @@ -272,13 +274,13 @@ // // is_mibao: this.pageTabCur // } // } - + // if (!uni.getStorageSync('_agree_buy_notice') && !fromNotice) { // this.$refs.buyNotice.getRule(6) // return // } } - + this.req({ url,