|
@@ -77,14 +77,25 @@ Page({
|
|
|
app.location('view/index?id=' + id);
|
|
|
},
|
|
|
|
|
|
+
|
|
|
+ * 微信授权回调, 用于礼品卡兑换按钮
|
|
|
+ */
|
|
|
+ bindGetUserInfo: function (e) {
|
|
|
+ if (e.detail.userInfo) {
|
|
|
+ this.cash();
|
|
|
+ } else {
|
|
|
+
|
|
|
+ }
|
|
|
+ },
|
|
|
+
|
|
|
|
|
|
* 礼品卡兑换
|
|
|
*/
|
|
|
- cash: function(e){
|
|
|
- if(app.isLogin()){
|
|
|
+ cash: function(){
|
|
|
+ if (app.isLogin()) {
|
|
|
this.cashdialog.setErrMsg('');
|
|
|
this.cashdialog.showDialog();
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
app.location('login/index');
|
|
|
}
|
|
|
},
|
|
@@ -142,6 +153,12 @@ Page({
|
|
|
console.log('wx.showShareMenu fail', res.data);
|
|
|
}
|
|
|
})
|
|
|
+
|
|
|
+ return {
|
|
|
+ title: '',
|
|
|
+ desc: '',
|
|
|
+ path: '/template/home/index'
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
})
|