Commit 8806fba4 by 谢中龙

提交代码

parent 860a385d
...@@ -501,7 +501,7 @@ ...@@ -501,7 +501,7 @@
"scene": null "scene": null
}, },
{ {
"id": -1, "id": 69,
"name": "开卡页", "name": "开卡页",
"pathName": "shoppingGuid/page/pages/openCard/openCard", "pathName": "shoppingGuid/page/pages/openCard/openCard",
"query": "", "query": "",
......
...@@ -11,27 +11,40 @@ wxService.page({ ...@@ -11,27 +11,40 @@ wxService.page({
*/ */
data: { data: {
showOpenCardModal : false, showOpenCardModal : false,
imageUrl: 'https://img3.bigaka.com/test/1001/201912/20191202/1001854598a6-67dd-4b3e-9a02-934c1b28a295.jpg' imageUrl: 'https://bigaka-xie.oss-cn-shanghai.aliyuncs.com/7_3_0/icon_u_open_card_small.png'
}, },
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad: function (options) { onLoad: function (options) {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
//判断用户是不是已经登录了 //判断用户是不是已经登录了
let userInfo = wx.getStorageSync('_baseUserInfo'); let userInfo = wx.getStorageSync('_baseUserInfo');
if(userInfo){ // if (userInfo) {
wx.reLaunch({ // wx.reLaunch({
url: '/pages/userCenter/userCenter', // url: '/pages/userCenter/userCenter',
}); // });
return; // return;
} // }
//未登录 需要授权登录 弹出设置的开卡图片 //未登录 需要授权登录 弹出设置的开卡图片
this.setData({ this.setData({
showOpenCardModal : true, showOpenCardModal: true,
}); });
},
//进入首页
onTapToMall(){
wx.reLaunch({
url: '/pages/userCenter/userCenter',
});
}, },
//授权回调 //授权回调
...@@ -82,10 +95,4 @@ wxService.page({ ...@@ -82,10 +95,4 @@ wxService.page({
}); });
}, },
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
}); });
\ No newline at end of file
...@@ -20,5 +20,8 @@ ...@@ -20,5 +20,8 @@
<button bindgetuserinfo="userAuthBtnCallBack" open-type='getUserInfo'> <button bindgetuserinfo="userAuthBtnCallBack" open-type='getUserInfo'>
<image src='{{imageUrl}}' mode='widthFix'></image> <image src='{{imageUrl}}' mode='widthFix'></image>
</button> </button>
<view class='enter-mall'>
<view class='enter' bindtap='onTapToMall'>进入商城</view>
</view>
</view> </view>
</view> </view>
...@@ -54,6 +54,29 @@ view{ ...@@ -54,6 +54,29 @@ view{
border: none; border: none;
} }
.enter-mall{
width: 100%;
height: auto;
display: flex;
align-items: center;
justify-content: center;
}
.enter-mall .enter{
width: 220rpx;
height: 70rpx;
border: solid 1px #ffffff;
color: #ffffff;
display: flex;
align-items: center;
justify-content: center;
border-radius: 35rpx;
}
.enter-mall .enter:active{
opacity: 0.7;
}
/* 加载 */ /* 加载 */
/*动画一:单个渐变 */ /*动画一:单个渐变 */
.circle-line{ .circle-line{
......
...@@ -9,12 +9,12 @@ wxService.page({ ...@@ -9,12 +9,12 @@ wxService.page({
// https://bigaka-xie.oss-cn-shanghai.aliyuncs.com/demo_qrcode.png // https://bigaka-xie.oss-cn-shanghai.aliyuncs.com/demo_qrcode.png
// https://bigaka-xie.oss-cn-shanghai.aliyuncs.com/biaka_default_u_logo.png // https://bigaka-xie.oss-cn-shanghai.aliyuncs.com/biaka_default_u_logo.png
data: { data: {
codeImg: 'https://bigaka-xie.oss-cn-shanghai.aliyuncs.com/demo_qrcode.png', codeImg: '',
avator: 'https://bigaka-xie.oss-cn-shanghai.aliyuncs.com/biaka_default_u_logo.png', avator: '',
name :'谢中龙', name :'',
template : {}, template : {},
cardImg : '', cardImg : '',
companyName: '上海舞象', companyName: '',
bottomTypeArr : [ bottomTypeArr : [
{ {
name: "关注公众号", name: "关注公众号",
......
...@@ -142,7 +142,8 @@ class WXService extends Http { ...@@ -142,7 +142,8 @@ class WXService extends Http {
let dataResp = response.data.data let dataResp = response.data.data
wx.setStorageSync('token', dataResp.token) wx.setStorageSync('token', dataResp.token)
wx.setStorageSync('_baseUserInfo', dataResp) wx.setStorageSync('_baseUserInfo', dataResp)
_this.currentPage.onLoad && _this.currentPage.onLoad(_this.currentPage.options);
_this.currentPage.onShow && _this.currentPage.onShow();
return Promise.resolve({ return Promise.resolve({
response response
}) })
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment