Commit 00df751b by 梁建民

bug

parent 917d15da
......@@ -17,7 +17,46 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
var token = wx.getStorageSync('access_token');
if (options.from == 'share') {
//判断页面是从分享页面过来的
//已登录
if (token) {
//已登录状态回调分享接口
http.getData(apis.shareAdd, 'GET', {
user_id: options.user_id
}, (res) => {
wx.switchTab({
url: '/pages/tab/home/home'
})
}, false, false, true);
} else {
//未登录情况下 记录分享者的used_id
wx.setStorage({
key: "share_id",
data: options.user_id
});
}
} else if (options.from == 'invites') {
//判断页面是从邀请好友页面过来的
//只需要判断未登录者的情况
if (!token) {
//未登录情况下 记录邀请者的used_id
wx.setStorage({
key: "invites_id",
data: options.user_id
});
}
}
},
......
This diff could not be displayed because it is too large.
......@@ -9,7 +9,7 @@
<view class="content">
<text class="time">更新时间:{{authInfo.update_time}}</text>
<view class="status row verCenter rowCenter">
<cover-image src="{{authInfo.auth_img}}" class="img"></cover-image>
<image src="{{authInfo.auth_img}}" class="img"></image>
<block wx:if="{{authInfo.status === 1}}">
<text class="a"></text>
</block>
......@@ -41,16 +41,14 @@
</view>
</view>
<block wx:if="{{authInfo.status === 1}}">
<button class="btn" data-type="1" data-id="{{authInfo.id}}" data-url='/pages/person/certification/addcertification/index' bind:tap="toUrl">
更新认证信息
</button>
<button class="btn opac" data-id="{{authInfo.id}}">资料审核中</button>
</block>
<block wx:elif="{{authInfo.status === 3}}">
<button class="btn" data-type="3" data-id="{{authInfo.id}}" data-url='/pages/tab/me/me' bind:tap="toUrl">
返回会员中心
<button class="btn" data-type="1" data-id="{{authInfo.id}}" data-url='/pages/person/certification/addcertification/index' bind:tap="toUrl">
更新认证信息
</button>
</block>
<block wx:elif="{{authInfo.status === 2}}">
<block wx:elif="{{authInfo.status === 1}}">
<button class="btn" data-type="2" data-id="{{authInfo.id}}" data-url='/pages/person/certification/addcertification/index' bind:tap="toUrl">
重新提交信息
</button>
......
This diff could not be displayed because it is too large.
......@@ -79,12 +79,36 @@ Page({
data: res.data.access_token
});
let share_id = wx.getStorageSync('share_id'); //记录分享者的user_id
let invites_id = wx.getStorageSync('invites_id'); //记录邀请者的user_id
if (share_id) {
http.getData(apis.shareAdd, 'GET', {
user_id: share_id
}, (res) => {}, false, false, true);
}
if (invites_id) {
http.getData(apis.invitesAdd, 'GET', {
user_id: invites_id
}, (res) => {}, false, false, true);
}
//登录环信帐号
getApp().getImUser();
wx.switchTab({
url: '/pages/tab/home/home'
});
}
}, true);
......
......@@ -67,20 +67,11 @@ Page({
*/
onShareAppMessage: function (res) {
let user_id = wx.getStorageSync('user_id');
return {
title: '邀请好友',
success: function (res) {
if (res.errMsg == 'shareAppMessage:ok') {
http.getData(apis.invitesAdd, 'GET', {
user_id: this.data.invitesInfo.user_id
}, (res) => {
if (res.errcode === 0) {
}
}, false, false, true);
}
},
path: "/pages/person/invitation/index",
path: "/pages/person/auth/index?from=share&user_id=" + user_id
}
},
......
......@@ -65,9 +65,9 @@ Page({
*/
toUrl: function (e) {
if (e.target.dataset.url) {
if (e.currentTarget.dataset.url) {
wx.navigateTo({
url: e.target.dataset.url
url: e.currentTarget.dataset.url
})
}
......
......@@ -68,23 +68,14 @@ Page({
*/
onShareAppMessage: function (res) {
let user_id = wx.getStorageSync('user_id');
return {
title: '每日分享',
imageUrl: '/res/images/imgs/re.png',
path: "/pages/person/invitation/index",
success: function (res) {
if (res.errMsg == 'shareAppMessage:ok') {
http.getData(apis.shareAdd, 'GET', {
user_id: wx.getStorageSync('user_id')
}, (res) => {
if (res.errcode === 0) {
}
}, true, false, true);
}
}
path: "/pages/person/auth/index?from=share&user_id=" + user_id
}
},
/**
* 获取数据
......
......@@ -32,7 +32,7 @@ Page({
// wx.setStorageSync('homeToken', 1)
// };
getApp().globalData.bus.on('addXj', () => {
if(me.data.xb == 1){
if (me.data.xb == 1) {
me.getData();
}
})
......@@ -201,13 +201,19 @@ Page({
url: '/pages/search/index/index',
})
},
toWelfare: function () {
if (judgeToken(true)) {
wx.navigateTo({
url: "/pages/person/welfare/index"
})
}
},
toXj: function () {
if (judgeToken(true)) {
wx.navigateTo({
url: "/pages/form/xj/index"
})
}
},
fbGood: function () {
if (judgeToken(true)) {
......
......@@ -18,7 +18,7 @@
<image src="/res/images/icons/home-s-3.png" class="img"></image>
<text class="text">发布商品</text>
</view>
<view class="function-item column verCenter">
<view class="function-item column verCenter" bindtap="toWelfare">
<image src="/res/images/icons/home-s-4.png" class="img"></image>
<text class="text">福利中心</text>
</view>
......
......@@ -108,17 +108,18 @@ Page({
if (e.currentTarget.dataset.type == 'certification') {
if (this.data.userInfo.auth_status == null) {
wx.navigateTo({
url: "/pages/person/certification/addcertification/index"
});
} else if (this.data.userInfo.auth_status == -1) {
//取消认证
wx.navigateTo({
url: "/pages/person/certification/addcertification/index"
});
} else {
wx.navigateTo({
url: "/pages/person/certification/certificationmanage/index"
});
}
}
......
......@@ -219,6 +219,49 @@
"id": -1,
"name": "pages/person/helpfriend/index",
"pathName": "pages/person/helpfriend/index",
"query": "",
"scene": null
},
{
"id": -1,
"name": "pages/person/auth/index",
"pathName": "pages/person/auth/index",
"query": "",
"scene": null
},
{
"id": -1,
"name": "pages/person/welfare/index",
"pathName": "pages/person/welfare/index",
"query": "",
"scene": null
},
{
"id": -1,
"name": "pages/person/auth/index",
"pathName": "pages/person/auth/index",
"query": "from=share&user_id=123",
"scene": null
},
{
"id": -1,
"name": "pages/tab/home/home",
"pathName": "pages/tab/home/home",
"query": "from=share&user_id=123",
"scene": null
},
{
"id": -1,
"name": "pages/person/auth/index",
"pathName": "pages/person/auth/index",
"query": "from=share&user_id=123",
"scene": null
},
{
"id": -1,
"name": "pages/person/certification/certificationmanage/index",
"pathName": "pages/person/certification/certificationmanage/index",
"query": "from=share&user_id=123",
"scene": null
}
]
......
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 sign in to comment