From 7acafdbcc2e78acf67bc046b31dbf131782df19a Mon Sep 17 00:00:00 2001
From: YWQ HK IX <568170040@qq.com>
Date: Mon, 19 Sep 2022 15:27:37 +0800
Subject: [PATCH] =?UTF-8?q?=E8=8E=B7=E5=8F=96=E9=AA=8C=E8=AF=81=E7=A0=81?=
=?UTF-8?q?=E9=A1=B5=E9=9D=A2=E4=BF=AE=E5=A4=8D?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
ext.json | 31 ++++--------
index/index.js | 3 +-
index/user.js | 4 +-
pages/coupon/confirmation/confirmation.js | 56 ++++++++++++++++++---
pages/coupon/confirmation/confirmation.json | 2 +-
pages/coupon/confirmation/confirmation.ttml | 1 +
project.config.json | 52 ++++++++++++++++++-
7 files changed, 118 insertions(+), 31 deletions(-)
diff --git a/ext.json b/ext.json
index 38a9f64..82d0f4c 100644
--- a/ext.json
+++ b/ext.json
@@ -1,30 +1,21 @@
{
- "extEnable": true,
- "extAppid": "ttef6599d8705b49b101",
- "window": {
- "backgroundTextStyle": "light",
- "navigationBarBackgroundColor": "#fff",
- "navigationBarTextStyle": "black"
- },
- "ttPlugins": {
- "dependencies": {
- "microapp-trade-plugin": {
- "version": "1.1.2",
- "isDynamic": true
- }
- }
- },
"ext": {
- "weappId": "ttef6599d8705b49b101",
- "name": "富茂券模板",
"attr": {
- "configUrl": "https://ctest.malls.iformall.com/C/api"
- }
+ "configUrl": "https://c.malls.iformall.com/C/api"
+ },
+ "name": "精选常德",
+ "weappId": "tt1e4668fb8178581401"
},
+ "window": {
+ "backgroundTextStyle": "light",
+ "navigationBarTextStyle": "black",
+ "navigationBarBackgroundColor": "#fff"
+ },
+ "extAppid": "tt1e4668fb8178581401",
+ "extEnable": true,
"directCommit": false,
"networkTimeout": {
"request": 30000,
"downloadFile": 10000
}
-
}
\ No newline at end of file
diff --git a/index/index.js b/index/index.js
index b14f135..1840d7f 100644
--- a/index/index.js
+++ b/index/index.js
@@ -1008,7 +1008,8 @@ Page({
url: config.api.bannerlist,
data: {
pageNum: 1,
- pageSize: 7
+ pageSize: 7,
+ plat:3
}
}).then(res => {
that.getmemberId(app.globalData.token);
diff --git a/index/user.js b/index/user.js
index 627668a..62841c3 100644
--- a/index/user.js
+++ b/index/user.js
@@ -48,7 +48,8 @@ Page({
},
- setPhone(paramData) {//子组件调用这个方法说明手机号已经授权成功
+ setPhone(paramData) {
+ //子组件调用这个方法说明手机号已经授权成功
this.setData({
showPhoem: paramData.detail,
})
@@ -124,7 +125,6 @@ Page({
}).then(res => {
Http.get({
url: config.api.checkPhoneStatus,
-
}).then(res => {
this.setData({
text:res.data.phone
diff --git a/pages/coupon/confirmation/confirmation.js b/pages/coupon/confirmation/confirmation.js
index 7778598..4f4cbbf 100644
--- a/pages/coupon/confirmation/confirmation.js
+++ b/pages/coupon/confirmation/confirmation.js
@@ -7,6 +7,7 @@ const imgurl = require("../../../utils/imgurl");
Page({
data: {
couponIds: "",
+ showPhoem: false,
couponChannelId: "",
showPage: false,
data: {},
@@ -70,6 +71,49 @@ Page({
})
},
+ setPhone(paramData) {
+ //子组件调用这个方法说明手机号已经授权成功
+ this.setData({
+ showPhoem: paramData.detail,
+ })
+ tt.showToast({
+ title: '授权成功', // 内容
+ icon: 'none', // 图标
+ success: (res) => {
+
+ },
+ fail: (res) => {
+
+ },
+ });
+ },
+
+ setBox(paramData) {
+ this.setData({
+ showPhoem: paramData.detail
+ })
+ tt.showToast({
+ title: '取消授权', // 内容
+ icon: 'none', // 图标
+ success: (res) => {
+ tt.reLaunch({
+ url: "/index/index",
+ success(res) {
+ console.log(`${res}`);
+ app.globalData.selected = 0
+ },
+ fail(err) {
+ console.log(`navigateTo调用失败`,err);
+ },
+ });
+
+ },
+ fail: (res) => {
+
+ },
+ });
+ },
+
getCouponPriceAndStock(couponChannelId) {//获取券价格与库存
Http.get({
url: config.api.couponPriceAndStock,
@@ -809,9 +853,12 @@ Page({
* 将值传到用户手机号授权的页面
*
*/
- tt.navigateTo({
- url: `/pages/getPhone/getPhone?couponChannelId=${that.data.couponChannelId}&path=qr`
- });
+ // tt.navigateTo({
+ // url: `/pages/getPhone/getPhone?couponChannelId=${that.data.couponChannelId}&path=qr`
+ // });
+ this.setData({
+ showPhoem:true
+ })
} else if (err.code == 11006) {
// 用户手机已加密
tt.navigateTo({
@@ -837,7 +884,6 @@ Page({
url: `/pages/getuserinfo/getuserinfo?fromflag=confirmation&confirmationFlag=${that.data.couponChannelId}`,
})
} else {
-
tt.showToast({
title: err.message,
icon: "none",
@@ -846,6 +892,4 @@ Page({
}
})
},
-
-
})
\ No newline at end of file
diff --git a/pages/coupon/confirmation/confirmation.json b/pages/coupon/confirmation/confirmation.json
index 93198cb..437f1ce 100644
--- a/pages/coupon/confirmation/confirmation.json
+++ b/pages/coupon/confirmation/confirmation.json
@@ -3,7 +3,7 @@
"navbar": "../../../components/navbar/navbar",
"store": "../../../components/store/index",
"c-coupons": "../../../components/coupons/index",
- "phoen":"../../../components/getPhoen/getPhoen"
+ "phoem":"../../../components/getPhoen/getPhoen"
},
"navigationBarTitleText": "确认订单",
"backgroundColor":"#f4f4f4",
diff --git a/pages/coupon/confirmation/confirmation.ttml b/pages/coupon/confirmation/confirmation.ttml
index f655611..07d62b5 100644
--- a/pages/coupon/confirmation/confirmation.ttml
+++ b/pages/coupon/confirmation/confirmation.ttml
@@ -16,6 +16,7 @@
{{data.type==50?priceAndStockObj.creditPrice+'积分':priceAndStockObj.salePrice/100}}
{{data.type==50?'立即换购':'提交订单'}}
+
使用须知
diff --git a/project.config.json b/project.config.json
index 5e39e6b..765075c 100644
--- a/project.config.json
+++ b/project.config.json
@@ -1 +1,51 @@
-{"setting":{"urlCheck":false,"es6":true,"newFeature":false,"postcss":false,"mockUpdate":true,"minified":false,"autoPush":false,"scripts":false,"mockLogin":false,"autoCompile":true,"localPlugins":false},"appid":"ttde7ca8c141425a2301","projectname":"tt富茂C","condition":{"miniprogram":{"current":-1,"list":[{"id":1650610427387,"name":"华莱士","pathName":"pages/main/index?type=cd&couponChannelId=123467","query":"couponChannelId=676951389111508992","scene":"990001","launchFrom":"scan","location":"qr_code"},{"id":1649905362371,"name":"add","pathName":"pages/main/index","query":"couponChannelId=702061614111186944&type=orderAffirm","scene":"990001","launchFrom":"scan","location":"qr_code"},{"id":1657681080086,"name":"手机号授权","pathName":"pages/main/index","query":"couponChannelId=710372266050117632&type=cd","scene":"990001","launchFrom":"scan","location":"qr_code"}]}}}
+{
+ "setting": {
+ "urlCheck": true,
+ "es6": true,
+ "newFeature": false,
+ "postcss": false,
+ "mockUpdate": true,
+ "minified": false,
+ "autoPush": false,
+ "scripts": false,
+ "mockLogin": false,
+ "autoCompile": true,
+ "localPlugins": false
+ },
+ "appid": "ttde7ca8c141425a2301",
+ "projectname": "tt富茂C",
+ "condition": {
+ "miniprogram": {
+ "current": -1,
+ "list": [
+ {
+ "id": 1650610427387,
+ "name": "华莱士",
+ "pathName": "pages/main/index?type=cd&couponChannelId=123467",
+ "query": "couponChannelId=676951389111508992",
+ "scene": "990001",
+ "launchFrom": "scan",
+ "location": "qr_code"
+ },
+ {
+ "id": 1649905362371,
+ "name": "add",
+ "pathName": "pages/main/index",
+ "query": "couponChannelId=702061614111186944&type=orderAffirm",
+ "scene": "990001",
+ "launchFrom": "scan",
+ "location": "qr_code"
+ },
+ {
+ "id": 1657681080086,
+ "name": "手机号授权",
+ "pathName": "pages/main/index",
+ "query": "couponChannelId=710372266050117632&type=cd",
+ "scene": "990001",
+ "launchFrom": "scan",
+ "location": "qr_code"
+ }
+ ]
+ }
+ }
+}
\ No newline at end of file