no message
Showing
15 changed files
with
174 additions
and
72 deletions
... | @@ -4,7 +4,7 @@ | ... | @@ -4,7 +4,7 @@ |
4 | * ------------------------------------------------------------------ | 4 | * ------------------------------------------------------------------ |
5 | */ | 5 | */ |
6 | var isFirst = false; | 6 | var isFirst = false; |
7 | isFirst = true; | 7 | // isFirst = true; |
8 | 8 | ||
9 | var path = require('path'); | 9 | var path = require('path'); |
10 | var gulp = require('gulp'); | 10 | var gulp = require('gulp'); | ... | ... |
... | @@ -18,6 +18,7 @@ App({ | ... | @@ -18,6 +18,7 @@ App({ |
18 | router: router, | 18 | router: router, |
19 | store: store, | 19 | store: store, |
20 | globalData: { | 20 | globalData: { |
21 | isTest: false, //是否测试状态 测试状态可触发点击摇一摇 | ||
21 | indexInfo: null, | 22 | indexInfo: null, |
22 | userInfo: null, | 23 | userInfo: null, |
23 | wxcode: store.getItem("wxcode"), | 24 | wxcode: store.getItem("wxcode"), |
... | @@ -28,7 +29,8 @@ App({ | ... | @@ -28,7 +29,8 @@ App({ |
28 | giftData: null, // 实物奖 userTabel prizeDetail用 | 29 | giftData: null, // 实物奖 userTabel prizeDetail用 |
29 | coopOptions: null, // 协作页 onload入参 | 30 | coopOptions: null, // 协作页 onload入参 |
30 | }, | 31 | }, |
31 | onLaunch: function () { | 32 | onLaunch: function (options) { |
33 | console.log("app q:", decodeURIComponent(options.query.q)); | ||
32 | this.share(); | 34 | this.share(); |
33 | }, | 35 | }, |
34 | //重写分享方法 | 36 | //重写分享方法 | ... | ... |
... | @@ -9,7 +9,7 @@ | ... | @@ -9,7 +9,7 @@ |
9 | </view> | 9 | </view> |
10 | </view> | 10 | </view> |
11 | <view class="btn-wrap"> | 11 | <view class="btn-wrap"> |
12 | <view bindtap="onRegisterHandler" class="btn btn1">丸美姐妹,马上注册</view> | 12 | <view bindtap="onRegisterHandler" class="btn btn1">丸美姐妹,马上登陆</view> |
13 | <view bindtap="hideMask" class="btn btn2">塑胶姐妹,残忍拒绝</view> | 13 | <view bindtap="hideMask" class="btn btn2">塑胶姐妹,残忍拒绝</view> |
14 | </view> | 14 | </view> |
15 | </view> | 15 | </view> | ... | ... |
1 | let app = getApp(); | ||
1 | Component({ | 2 | Component({ |
2 | properties: { | 3 | properties: { |
3 | // 这里定义了innerText属性,属性值可以在组件使用时指定 | 4 | // 这里定义了innerText属性,属性值可以在组件使用时指定 |
... | @@ -28,6 +29,15 @@ Component({ | ... | @@ -28,6 +29,15 @@ Component({ |
28 | this.triggerEvent('evtcomp', { | 29 | this.triggerEvent('evtcomp', { |
29 | name: "_evt_shake" | 30 | name: "_evt_shake" |
30 | }); | 31 | }); |
32 | }, | ||
33 | |||
34 | // 触发摇一摇测试入口 | ||
35 | onShakeHandlerTest() { | ||
36 | let isTest = app.globalData.isTest; | ||
37 | if (!isTest) { | ||
38 | return; | ||
39 | } | ||
40 | this.onShakeHandler(); | ||
31 | } | 41 | } |
32 | } | 42 | } |
33 | }) | 43 | }) | ... | ... |
1 | <view class="comp-item"> | 1 | <view class="comp-item"> |
2 | <image bindtap="onShakeHandler" class="bg" src="../../image/oss/tips/tips-shake.png" mode="widthFix" /> | 2 | <image bindtap="onShakeHandlerTest" class="bg" src="../../image/oss/tips/tips-shake.png" mode="widthFix" /> |
3 | <view class="space1"></view> | 3 | <view class="space1"></view> |
4 | <view class="shake"> | 4 | <view class="shake"> |
5 | <image class="image animated tada infinite" src="../../image/oss/tips/shake-c1.png" mode="widthFix" /> | 5 | <image class="image animated tada infinite" src="../../image/oss/tips/shake-c1.png" mode="widthFix" /> | ... | ... |
... | @@ -79,7 +79,6 @@ Page({ | ... | @@ -79,7 +79,6 @@ Page({ |
79 | } | 79 | } |
80 | }) | 80 | }) |
81 | this.initShake(); | 81 | this.initShake(); |
82 | |||
83 | }) | 82 | }) |
84 | }, | 83 | }, |
85 | // 添加摇一摇 | 84 | // 添加摇一摇 |
... | @@ -138,9 +137,9 @@ Page({ | ... | @@ -138,9 +137,9 @@ Page({ |
138 | return; | 137 | return; |
139 | } | 138 | } |
140 | // 已经助力 | 139 | // 已经助力 |
141 | if (wishInfo.isAssist == 1) { | 140 | // if (wishInfo.isAssist == 1) { |
142 | return; | 141 | // return; |
143 | } | 142 | // } |
144 | 143 | ||
145 | this.setData({ | 144 | this.setData({ |
146 | canShake: false | 145 | canShake: false |
... | @@ -191,7 +190,7 @@ Page({ | ... | @@ -191,7 +190,7 @@ Page({ |
191 | // 助力失败 | 190 | // 助力失败 |
192 | this.setData({ | 191 | this.setData({ |
193 | tipsCommonVisible: true, | 192 | tipsCommonVisible: true, |
194 | tipsInnerText: "已经为好友助力过啦~" | 193 | tipsInnerText: `亲爱的女神,您已为${wishInfo.member.nickname}好友助力过,每人只能为一位好友助力噢!` |
195 | }) | 194 | }) |
196 | } else if (status == 3) { | 195 | } else if (status == 3) { |
197 | this.setData({ | 196 | this.setData({ |
... | @@ -245,6 +244,16 @@ Page({ | ... | @@ -245,6 +244,16 @@ Page({ |
245 | }) | 244 | }) |
246 | }); | 245 | }); |
247 | }, | 246 | }, |
247 | |||
248 | // 触发摇一摇测试入口 | ||
249 | queryWishbillAssistTest() { | ||
250 | let isTest = app.globalData.isTest; | ||
251 | if (!isTest) { | ||
252 | return; | ||
253 | } | ||
254 | this.queryWishbillAssist(); | ||
255 | }, | ||
256 | |||
248 | hideMask() { | 257 | hideMask() { |
249 | this.setData({ | 258 | this.setData({ |
250 | groupMemberCoopVisible: false, | 259 | groupMemberCoopVisible: false, |
... | @@ -275,7 +284,7 @@ Page({ | ... | @@ -275,7 +284,7 @@ Page({ |
275 | this.hideMask(); | 284 | this.hideMask(); |
276 | app.globalData.coopOptions = this.data.options; | 285 | app.globalData.coopOptions = this.data.options; |
277 | app.router.push({ | 286 | app.router.push({ |
278 | path: "register", | 287 | path: "login", |
279 | query: { | 288 | query: { |
280 | redirect: "coop" | 289 | redirect: "coop" |
281 | } | 290 | } | ... | ... |
... | @@ -14,7 +14,7 @@ | ... | @@ -14,7 +14,7 @@ |
14 | <!-- 摇一摇 --> | 14 | <!-- 摇一摇 --> |
15 | <!-- bindtap="queryWishbillAssist" --> | 15 | <!-- bindtap="queryWishbillAssist" --> |
16 | <!-- 点自己链接未助力 --> | 16 | <!-- 点自己链接未助力 --> |
17 | <view bindtap="queryWishbillAssist" wx:if="{{wishInfo.isSelfWishBill == 1 || (status != 1 && wishInfo.isAssist != 1)}}" class="shake"> | 17 | <view bindtap="queryWishbillAssistTest" wx:if="{{wishInfo.isSelfWishBill == 1 || wishInfo.isAssistThisBill == 0}}" class="shake"> |
18 | <image class="ebg" mode="widthFix" src="../../image/oss/coop/coop-c2.png" /> | 18 | <image class="ebg" mode="widthFix" src="../../image/oss/coop/coop-c2.png" /> |
19 | <image class="coop-shake animated infinite {{animationPassVisible || !initComplete ?'':'tada'}}" mode="widthFix" src="../../image/oss/coop/coop-shake.png" /> | 19 | <image class="coop-shake animated infinite {{animationPassVisible || !initComplete ?'':'tada'}}" mode="widthFix" src="../../image/oss/coop/coop-shake.png" /> |
20 | <view class="space1"></view> | 20 | <view class="space1"></view> | ... | ... |
1 | import { | ||
2 | getQueryByUrl | ||
3 | } from '../../utils/util'; | ||
4 | |||
1 | let app = getApp(); | 5 | let app = getApp(); |
2 | Page({ | 6 | Page({ |
3 | data: { | 7 | data: { |
... | @@ -13,6 +17,12 @@ Page({ | ... | @@ -13,6 +17,12 @@ Page({ |
13 | }) | 17 | }) |
14 | }, | 18 | }, |
15 | onLoad(options) { | 19 | onLoad(options) { |
20 | // console.log("index q:", decodeURIComponent(options.q)); | ||
21 | let q = decodeURIComponent(options.q); | ||
22 | if (q) { | ||
23 | let m = getQueryByUrl("m", q); | ||
24 | console.log("m:", m); | ||
25 | } | ||
16 | let sessionId = app.store.getItem('sessionId'); | 26 | let sessionId = app.store.getItem('sessionId'); |
17 | if (sessionId) { | 27 | if (sessionId) { |
18 | app.queryIndex({ | 28 | app.queryIndex({ | ... | ... |
... | @@ -72,18 +72,6 @@ Page({ | ... | @@ -72,18 +72,6 @@ Page({ |
72 | data: data | 72 | data: data |
73 | }).then((result) => { | 73 | }).then((result) => { |
74 | if (result.status == 1) { | 74 | if (result.status == 1) { |
75 | // wx.showModal({ | ||
76 | // title: "登陆成功", | ||
77 | // content: "继续生成我的心愿单", | ||
78 | // confirmText: "马上前往", | ||
79 | // showCancel: false, | ||
80 | // success(res) { | ||
81 | // app.router.push({ | ||
82 | // openType: "redirectTo", | ||
83 | // path: _this.data.redirect | ||
84 | // }) | ||
85 | // } | ||
86 | // }) | ||
87 | app.router.push({ | 75 | app.router.push({ |
88 | openType: "redirectTo", | 76 | openType: "redirectTo", |
89 | path: _this.data.redirect | 77 | path: _this.data.redirect |
... | @@ -179,7 +167,10 @@ Page({ | ... | @@ -179,7 +167,10 @@ Page({ |
179 | toRegisterHandler() { | 167 | toRegisterHandler() { |
180 | app.router.push({ | 168 | app.router.push({ |
181 | openType: "redirectTo", | 169 | openType: "redirectTo", |
182 | path: "register" | 170 | path: "register", |
171 | query: { | ||
172 | redirect: this.data.redirect | ||
173 | } | ||
183 | }) | 174 | }) |
184 | }, | 175 | }, |
185 | // 获取验证码 | 176 | // 获取验证码 | ... | ... |
... | @@ -44,7 +44,6 @@ Page({ | ... | @@ -44,7 +44,6 @@ Page({ |
44 | let billCode = app.globalData.indexInfo.wishBillCode; | 44 | let billCode = app.globalData.indexInfo.wishBillCode; |
45 | let wxShareTitle = nickname + `正在参加丸美眼霜节心愿单活动,需要你的倾情相助!`; | 45 | let wxShareTitle = nickname + `正在参加丸美眼霜节心愿单活动,需要你的倾情相助!`; |
46 | let wxCodePath = `pages/coop/coop?code=${billCode}&s=share` | 46 | let wxCodePath = `pages/coop/coop?code=${billCode}&s=share` |
47 | console.log("wxCodePath:", wxCodePath); | ||
48 | this.setData({ | 47 | this.setData({ |
49 | wxCodePath: wxCodePath, | 48 | wxCodePath: wxCodePath, |
50 | wxShareTitle: wxShareTitle | 49 | wxShareTitle: wxShareTitle | ... | ... |
... | @@ -5,6 +5,7 @@ import Date from '../../utils/date'; | ... | @@ -5,6 +5,7 @@ import Date from '../../utils/date'; |
5 | let app = getApp(); | 5 | let app = getApp(); |
6 | Page({ | 6 | Page({ |
7 | data: { | 7 | data: { |
8 | indexInfo: {}, | ||
8 | hadAnswer: false, | 9 | hadAnswer: false, |
9 | questionList: [], // 题目列表 | 10 | questionList: [], // 题目列表 |
10 | questionResult: {}, | 11 | questionResult: {}, |
... | @@ -18,7 +19,15 @@ Page({ | ... | @@ -18,7 +19,15 @@ Page({ |
18 | this.initData(); | 19 | this.initData(); |
19 | }, | 20 | }, |
20 | initData() { | 21 | initData() { |
21 | this.queryQuestionList(); | 22 | app.queryIndex({ |
23 | auth: false | ||
24 | }).then((result) => { | ||
25 | this.setData({ | ||
26 | indexInfo: app.globalData.indexInfo | ||
27 | }) | ||
28 | this.queryQuestionList(); | ||
29 | }) | ||
30 | |||
22 | }, | 31 | }, |
23 | /** | 32 | /** |
24 | * 跳转至创建心愿单 | 33 | * 跳转至创建心愿单 |
... | @@ -114,6 +123,21 @@ Page({ | ... | @@ -114,6 +123,21 @@ Page({ |
114 | }) | 123 | }) |
115 | }); | 124 | }); |
116 | }, | 125 | }, |
126 | /** | ||
127 | * 复制公众号到粘贴板 | ||
128 | */ | ||
129 | onGzhClipboardHandler() { | ||
130 | wx.setClipboardData({ | ||
131 | data: 'MARUBI丸美', | ||
132 | success(res) { | ||
133 | // wx.getClipboardData({ | ||
134 | // success(res) { | ||
135 | // console.log(res.data) // data | ||
136 | // } | ||
137 | // }) | ||
138 | } | ||
139 | }) | ||
140 | }, | ||
117 | // 子组件事件 | 141 | // 子组件事件 |
118 | evtcomp(evt) { | 142 | evtcomp(evt) { |
119 | let { | 143 | let { | ... | ... |
... | @@ -77,7 +77,7 @@ | ... | @@ -77,7 +77,7 @@ |
77 | margin-bottom: 28px; | 77 | margin-bottom: 28px; |
78 | } | 78 | } |
79 | 79 | ||
80 | .no{ | 80 | .no { |
81 | // @extend .bb; | 81 | // @extend .bb; |
82 | // padding-right: 4 | 82 | // padding-right: 4 |
83 | margin-right: 4px; | 83 | margin-right: 4px; |
... | @@ -177,12 +177,18 @@ | ... | @@ -177,12 +177,18 @@ |
177 | 177 | ||
178 | .tips { | 178 | .tips { |
179 | // margin-top: 40px; | 179 | // margin-top: 40px; |
180 | margin:24px 0 12px; | 180 | margin: 24px 0 0px; |
181 | text-align: center; | 181 | text-align: center; |
182 | font-size: 24px; | 182 | font-size: 24px; |
183 | color: #333333; | 183 | color: #333333; |
184 | } | 184 | } |
185 | 185 | ||
186 | .subcribe { | ||
187 | view { | ||
188 | margin-bottom: 12px; | ||
189 | } | ||
190 | } | ||
191 | |||
186 | // 优惠券 | 192 | // 优惠券 |
187 | .coupon { | 193 | .coupon { |
188 | width: 578px; | 194 | width: 578px; |
... | @@ -253,6 +259,17 @@ | ... | @@ -253,6 +259,17 @@ |
253 | } | 259 | } |
254 | } | 260 | } |
255 | } | 261 | } |
262 | |||
263 | .line { | ||
264 | height: 1px; | ||
265 | width: 520px; | ||
266 | margin: 32px auto 48px; | ||
267 | background-color: #eac2c4; | ||
268 | } | ||
269 | |||
270 | .gzh { | ||
271 | color: #ac0521; | ||
272 | } | ||
256 | } | 273 | } |
257 | 274 | ||
258 | .create-wish-btn { | 275 | .create-wish-btn { |
... | @@ -265,6 +282,15 @@ | ... | @@ -265,6 +282,15 @@ |
265 | } | 282 | } |
266 | 283 | ||
267 | } | 284 | } |
285 | |||
286 | .result2 { | ||
287 | height: 826px; | ||
288 | |||
289 | .bg { | ||
290 | height: 826px; | ||
291 | } | ||
292 | } | ||
293 | |||
268 | } | 294 | } |
269 | } | 295 | } |
270 | } | 296 | } | ... | ... |
... | @@ -29,33 +29,64 @@ | ... | @@ -29,33 +29,64 @@ |
29 | 确认提交 | 29 | 确认提交 |
30 | </view> | 30 | </view> |
31 | <!-- 结果 --> | 31 | <!-- 结果 --> |
32 | <view wx:else class="result"> | 32 | <!-- <view wx:else> --> |
33 | <image class="d1" mode="widthFix" src="../../image/oss/question/question-d1.png" /> | 33 | <view> |
34 | <image class="bg" mode="widthFix" src="../../image/oss/question/result-border.png" /> | 34 | <view wx:if="{{indexInfo.isSubcribe == 1}}" class="result"> |
35 | <image class="d2" mode="widthFix" src="../../image/oss/question/question-d2.png" /> | 35 | <!-- 已经注册 --> |
36 | <view class="cont"> | 36 | <image class="d1" mode="widthFix" src="../../image/oss/question/question-d1.png" /> |
37 | <view class="space1"></view> | 37 | <image class="bg" mode="widthFix" src="../../image/oss/question/result-border.png" /> |
38 | <view class="tit">测验结果:答对{{questionResult.right}}题,答错{{questionResult.wrong}}题</view> | 38 | <image class="d2" mode="widthFix" src="../../image/oss/question/question-d2.png" /> |
39 | <view class="ball"> | 39 | <view class="cont"> |
40 | <view class="t1">获得</view> | 40 | <view class="space1"></view> |
41 | <view class="score">{{questionResult.elasticValue}}</view> | 41 | <view class="tit">测验结果:答对{{questionResult.right}}题,答错{{questionResult.wrong}}题</view> |
42 | <view class="t1">弹力值</view> | 42 | <view class="ball"> |
43 | <view class="t1">获得</view> | ||
44 | <view class="score">{{questionResult.elasticValue}}</view> | ||
45 | <view class="t1">弹力值</view> | ||
46 | </view> | ||
47 | <view class="tips">到店购物即可使用,绝不要错过噢~</view> | ||
48 | <view class="coupon"> | ||
49 | <view wx:for="{{questionResult.coupons}}" wx:key="{{index}}" class="coupon-item {{item.type==4?'coupon-item2':''}}"> | ||
50 | <image wx:if="{{item.type==4}}" class="ebg" mode="widthFix" src="../../image/oss/coupon/coupon-2.png" /> | ||
51 | <image wx:else class="ebg" mode="widthFix" src="../../image/oss/coupon/coupon-1.png" /> | ||
52 | <view class="cont"> | ||
53 | <view class="name">{{item.name}}</view> | ||
54 | <!-- <view class="detail">查看详情</view> --> | ||
55 | <view class="card-info card-no">劵码:{{item.couponCode}}</view> | ||
56 | <view class="card-info card-date">有效期:即日起至{{item.endDateStr}}</view> | ||
57 | </view> | ||
58 | </view> | ||
59 | </view> | ||
43 | </view> | 60 | </view> |
44 | <view class="tips">到店购物即可使用,绝不要错过噢~</view> | 61 | <view bindtap="onCreateWishHandler" class="create-wish-btn">马上创建心愿单</view> |
45 | <view class="coupon"> | 62 | </view> |
46 | <view wx:for="{{questionResult.coupons}}" wx:key="{{index}}" class="coupon-item {{item.type==4?'coupon-item2':''}}"> | 63 | <view wx:else class="result result2"> |
47 | <image wx:if="{{item.type==4}}" class="ebg" mode="widthFix" src="../../image/oss/coupon/coupon-2.png" /> | 64 | <image class="d1" mode="widthFix" src="../../image/oss/question/question-d1.png" /> |
48 | <image wx:else class="ebg" mode="widthFix" src="../../image/oss/coupon/coupon-1.png" /> | 65 | <image class="bg" mode="widthFix" src="../../image/oss/tips/tips-border-big.png" /> |
49 | <view class="cont"> | 66 | <image class="d2" mode="widthFix" src="../../image/oss/question/question-d2.png" /> |
50 | <view class="name">{{item.name}}</view> | 67 | <view class="cont"> |
51 | <!-- <view class="detail">查看详情</view> --> | 68 | <view class="space1"></view> |
52 | <view class="card-info card-no">劵码:{{item.couponCode}}</view> | 69 | <view class="tit">测验结果:答对{{questionResult.right}}题,答错{{questionResult.wrong}}题</view> |
53 | <view class="card-info card-date">有效期:即日起至{{item.endDateStr}}</view> | 70 | <view class="ball"> |
71 | <view class="t1">获得</view> | ||
72 | <view class="score">{{questionResult.elasticValue}}</view> | ||
73 | <view class="t1">弹力值</view> | ||
74 | </view> | ||
75 | <view class="line"></view> | ||
76 | <!-- <view class="tips">恭喜获得新人福利</view> --> | ||
77 | <view class="tips subcribe"> | ||
78 | <view>恭喜获得新人福利</view> | ||
79 | <view>20元无门槛代金券及眼部保养券</view> | ||
80 | <view> | ||
81 | 您可 | ||
82 | <span bindtap="onGzhClipboardHandler" class="gzh">【复制公众号】</span> | ||
83 | 搜索并关注丸美公众号 | ||
54 | </view> | 84 | </view> |
85 | <view>即可在“会员中心”中查看及使用卡券</view> | ||
55 | </view> | 86 | </view> |
56 | </view> | 87 | </view> |
88 | <view bindtap="onCreateWishHandler" class="create-wish-btn">马上创建心愿单</view> | ||
57 | </view> | 89 | </view> |
58 | <view bindtap="onCreateWishHandler" class="create-wish-btn">马上创建心愿单</view> | ||
59 | </view> | 90 | </view> |
60 | </view> | 91 | </view> |
61 | </view> | 92 | </view> | ... | ... |
... | @@ -93,22 +93,9 @@ Page({ | ... | @@ -93,22 +93,9 @@ Page({ |
93 | data: data | 93 | data: data |
94 | }).then((result) => { | 94 | }).then((result) => { |
95 | if (result.status == 1) { | 95 | if (result.status == 1) { |
96 | // wx.showModal({ | ||
97 | // title: "注册成功", | ||
98 | // content: "继续创建心愿单", | ||
99 | // confirmText: "马上前往", | ||
100 | // showCancel: false, | ||
101 | // success(res) { | ||
102 | // // 注册成功直接跳回创建心愿单页 | ||
103 | // app.router.push({ | ||
104 | // openType: "redirectTo", | ||
105 | // path: "createWish" | ||
106 | // }) | ||
107 | // } | ||
108 | // }) | ||
109 | app.router.push({ | 96 | app.router.push({ |
110 | openType: "redirectTo", | 97 | openType: "redirectTo", |
111 | path: "createWish" | 98 | path: _this.data.redirect |
112 | }) | 99 | }) |
113 | } else if (result.status == 2) { | 100 | } else if (result.status == 2) { |
114 | this.setData({ | 101 | this.setData({ |
... | @@ -138,15 +125,15 @@ Page({ | ... | @@ -138,15 +125,15 @@ Page({ |
138 | } else if (!this.data.birthday) { | 125 | } else if (!this.data.birthday) { |
139 | this.showLog("请输入生日"); | 126 | this.showLog("请输入生日"); |
140 | reject(); | 127 | reject(); |
141 | // } else if (!this.data.password) { | 128 | // } else if (!this.data.password) { |
142 | // this.showLog("请输入登陆密码"); | 129 | // this.showLog("请输入登陆密码"); |
143 | // reject(); | 130 | // reject(); |
144 | } else if (!this.data.verifyCode) { | 131 | } else if (!this.data.verifyCode) { |
145 | this.showLog("请输入验证码"); | 132 | this.showLog("请输入验证码"); |
146 | reject(); | 133 | reject(); |
147 | // } else if (this.data.sex != 0 && this.data.sex != 1) { | 134 | // } else if (this.data.sex != 0 && this.data.sex != 1) { |
148 | // this.showLog("请选择性别"); | 135 | // this.showLog("请选择性别"); |
149 | // reject(); | 136 | // reject(); |
150 | } else if (!this.data.isPlzAuth) { | 137 | } else if (!this.data.isPlzAuth) { |
151 | this.showLog("请完成拼图验证"); | 138 | this.showLog("请完成拼图验证"); |
152 | reject(); | 139 | reject(); |
... | @@ -171,7 +158,10 @@ Page({ | ... | @@ -171,7 +158,10 @@ Page({ |
171 | toLoginHandler() { | 158 | toLoginHandler() { |
172 | app.router.push({ | 159 | app.router.push({ |
173 | openType: "redirectTo", | 160 | openType: "redirectTo", |
174 | path: "login" | 161 | path: "login", |
162 | query: { | ||
163 | redirect: this.data.redirect | ||
164 | } | ||
175 | }) | 165 | }) |
176 | }, | 166 | }, |
177 | // 获取验证码 | 167 | // 获取验证码 | ... | ... |
... | @@ -127,6 +127,15 @@ function formatWeek(week) { | ... | @@ -127,6 +127,15 @@ function formatWeek(week) { |
127 | return result; | 127 | return result; |
128 | } | 128 | } |
129 | 129 | ||
130 | |||
131 | /** | ||
132 | * 根据url获取参数 | ||
133 | * @param {*} name | ||
134 | */ | ||
135 | function getQueryByUrl(name, url) { | ||
136 | return decodeURIComponent((new RegExp('[?|&]' + name + '=' + '([^&;]+?)(&|#|;|$)').exec(url) || [, ""])[1].replace(/\+/g, '%20')) || null; | ||
137 | } | ||
138 | |||
130 | /** | 139 | /** |
131 | * 获取点击传值 | 140 | * 获取点击传值 |
132 | * @param {*} evt | 141 | * @param {*} evt |
... | @@ -276,5 +285,6 @@ module.exports = { | ... | @@ -276,5 +285,6 @@ module.exports = { |
276 | getBindtapData: getBindtapData, | 285 | getBindtapData: getBindtapData, |
277 | wxacodeGet: wxacodeGet, | 286 | wxacodeGet: wxacodeGet, |
278 | getObjByListKeyValue: getObjByListKeyValue, | 287 | getObjByListKeyValue: getObjByListKeyValue, |
279 | getLocalDistance: getLocalDistance | 288 | getLocalDistance: getLocalDistance, |
289 | getQueryByUrl: getQueryByUrl, | ||
280 | } | 290 | } | ... | ... |
-
Please register or sign in to post a comment