|
@@ -256,45 +256,13 @@ Page({
|
|
|
}, 2800)
|
|
|
},
|
|
|
onLoad: function(options) {
|
|
|
- this.setData({
|
|
|
- isIos: app.globalData.isIOS
|
|
|
- })
|
|
|
- if (options.tabbarIndx) {
|
|
|
- this.updateData(options.tabbarIndx);
|
|
|
- }
|
|
|
- if (options.scene) {
|
|
|
- let optionsStr = decodeURIComponent(options.scene);
|
|
|
- let optionsArr = optionsStr.split('&');
|
|
|
-
|
|
|
- if (optionsArr[0].split("=")[0] === "type") {
|
|
|
- console.log('我是团购分享')
|
|
|
- options.type = optionsArr[0].split("=")[1];
|
|
|
- options.sid = optionsArr[1].split("=")[1];
|
|
|
- } else {
|
|
|
- options.readId = optionsArr[0];
|
|
|
- options.activity = optionsArr[1];
|
|
|
- }
|
|
|
- }
|
|
|
- if (options.readId) {
|
|
|
+ if (wx.getStorageSync('uid')) {
|
|
|
this.setData({
|
|
|
- workId: options.readId
|
|
|
+ isLogin: true
|
|
|
})
|
|
|
}
|
|
|
-
|
|
|
- * 活动统计
|
|
|
- */
|
|
|
- if (options.activity) {
|
|
|
- httpRequestApi.shareAddHotAmount(options.readId).success(res => {
|
|
|
- console.log(res)
|
|
|
- })
|
|
|
- }
|
|
|
-
|
|
|
- this.setData({
|
|
|
- iphoneType: options.type || ''
|
|
|
- })
|
|
|
- console.log('onload', options);
|
|
|
- let shareUid = options.uid
|
|
|
- getOpenidNoLogin((res) => {
|
|
|
+
|
|
|
+ getApp().callBack = (res) => {
|
|
|
|
|
|
|
|
|
httpRequestApi.getProductActivity().success(res => {
|
|
@@ -311,16 +279,6 @@ Page({
|
|
|
|
|
|
this.getHelpAuth()
|
|
|
if (!res.data.data.grade) {
|
|
|
-
|
|
|
- if (res.data.data.nickName) {
|
|
|
- this.setData({
|
|
|
- isGradeShow: true,
|
|
|
- options,
|
|
|
- isLogin: true,
|
|
|
- oldUser: true
|
|
|
- })
|
|
|
- return;
|
|
|
- } */
|
|
|
this.setData({
|
|
|
isGradeShow: true,
|
|
|
options,
|
|
@@ -329,16 +287,11 @@ Page({
|
|
|
})
|
|
|
return
|
|
|
} else {
|
|
|
- if (res.data.data.nickName) {
|
|
|
- this.setData({
|
|
|
- isLogin: true
|
|
|
- }, () => {
|
|
|
- this.showPage();
|
|
|
- })
|
|
|
- } else {
|
|
|
- console.log('游客未登录有年纪')
|
|
|
+ this.setData({
|
|
|
+ isLogin: true
|
|
|
+ }, () => {
|
|
|
this.showPage();
|
|
|
- }
|
|
|
+ })
|
|
|
}
|
|
|
|
|
|
httpRequestApi.getProductActivity().success(res => {
|
|
@@ -354,7 +307,45 @@ Page({
|
|
|
})
|
|
|
|
|
|
this.getHelpAuth()
|
|
|
- }, () => {}, shareUid);
|
|
|
+ }
|
|
|
+ this.setData({
|
|
|
+ isIos: app.globalData.isIOS
|
|
|
+ })
|
|
|
+ if (options.scene) {
|
|
|
+ let optionsStr = decodeURIComponent(options.scene);
|
|
|
+ let optionsArr = optionsStr.split('&');
|
|
|
+
|
|
|
+ if (optionsArr[0].split("=")[0] === "type") {
|
|
|
+ console.log('我是团购分享')
|
|
|
+ options.type = optionsArr[0].split("=")[1];
|
|
|
+ options.sid = optionsArr[1].split("=")[1];
|
|
|
+ } else {
|
|
|
+ options.readId = optionsArr[0];
|
|
|
+ options.activity = optionsArr[1];
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (options.readId) {
|
|
|
+ this.setData({
|
|
|
+ workId: options.readId
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
+ * 活动统计
|
|
|
+ */
|
|
|
+ if (options.activity) {
|
|
|
+ httpRequestApi.shareAddHotAmount(options.readId).success(res => {
|
|
|
+ console.log(res)
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
+ this.setData({
|
|
|
+ iphoneType: options.type || ''
|
|
|
+ })
|
|
|
+ console.log('onload', options);
|
|
|
+
|
|
|
+ if (options.tabbarIndx) {
|
|
|
+ this.updateData(options.tabbarIndx);
|
|
|
+ }
|
|
|
this.uid = wx.getStorageSync('uid');
|
|
|
if (options.sid) {
|
|
|
httpRequestApi.getUserRec(options.sid).success(res => {
|
|
@@ -941,26 +932,7 @@ Page({
|
|
|
this.showPage()
|
|
|
})
|
|
|
return;
|
|
|
-
|
|
|
- console.log('getOpenidNoLogin', res)
|
|
|
-
|
|
|
- if (res.data.data.nickName) {
|
|
|
- this.setData({
|
|
|
- isLogin: true
|
|
|
- })
|
|
|
- } else {
|
|
|
- this.setData({
|
|
|
- isLogin: false
|
|
|
- })
|
|
|
- }
|
|
|
- this.showPage()
|
|
|
- }, (error) => {
|
|
|
- console.log('获取失败')
|
|
|
- wx.setStorageSync('userSourseType', 'normal')
|
|
|
- this.setData({
|
|
|
- hide: !this.data.hide
|
|
|
- })
|
|
|
- }, grade); */
|
|
|
+
|
|
|
},
|
|
|
|
|
|
getFollowData: function() {
|