Commit 65e7cb51 by 高淑倩

集点

parent 27e00ab0
......@@ -40,6 +40,10 @@ App({
onShow: function (options = {}) {
console.log('app-onshow', options)
const baseUserInfo = wx.getStorageSync('_baseUserInfo')
// 获取当前会员是否是体验者
const { member } = baseUserInfo
const curMemberTrial = member && member.trial || false
wx.setStorageSync('isExperiencer', curMemberTrial)
if (options.referrerInfo && options.referrerInfo.extraData!=null){
const { activate_ticket, card_id, code, errCode, wx_activate_after_submit_url } = options.referrerInfo.extraData
......
......@@ -58,46 +58,46 @@ wxService.page({
},
watch: {
experAccessible(newVal, oldVal) {
if (newVal) {
// 登录接口返回err
const reLoginErrFlag = wx.getStorageSync('reLoginErr')
const baseUserInfo = wx.getStorageSync('_baseUserInfo')
let id
if (baseUserInfo && !reLoginErrFlag) {
this.setData({
isAuthorization: false
}, () => {
const option = this.options || {}
const { scene } = option
if (scene) {
let idParam = decodeURIComponent(scene).split('&')[0]
let shareId = idParam && idParam.split('=')[1] || 0
id = shareId
} else {
id = option.id
}
if(newVal) {
// 登录接口返回err
const reLoginErrFlag = wx.getStorageSync('reLoginErr')
const baseUserInfo = wx.getStorageSync('_baseUserInfo')
let id
if (baseUserInfo && !reLoginErrFlag) {
this.setData({
isAuthorization: false
}, () => {
const option = this.options || {}
const { scene } = option
if (scene) {
let idParam = decodeURIComponent(scene).split('&')[0]
let shareId = idParam && idParam.split('=')[1] || 0
id = shareId
} else {
id = option.id
}
if (id) {
this.setData({
id
}, () => {
this.getPointDetail(id)
})
}
// 隐藏 dialog
this.isShowDialog(false)
})
}
else if (!baseUserInfo && reLoginErrFlag) {
this.setData({
isAuthorization: true
})
}
else {
this.setData({
isAuthorization: true
})
}
if (id) {
this.setData({
id
}, () => {
this.getPointDetail(id)
})
}
// 隐藏 dialog
this.isShowDialog(false)
})
}
else if (!baseUserInfo && reLoginErrFlag) {
this.setData({
isAuthorization: true
})
}
else {
this.setData({
isAuthorization: true
})
}
} else {
// 去别的页面
wxService.router(`/subPackage/page/pages/goToHome/goToHome`).replace()
......
......@@ -5,7 +5,6 @@
"x-dialog":"/component/dialog/dialog",
"x-progress-point":"/component/progressPoint/progressPoint",
"x-progress-image":"/component/progressImage/progressImage",
"authorization-modal-point": "/component/authorization-modal-point/authorization-modal-point",
"go-home": "/component/goHome/goHome"
"authorization-modal-point": "/component/authorization-modal-point/authorization-modal-point"
}
}
\ No newline at end of file
......@@ -70,7 +70,6 @@
bind:_closeDialog="_closeDialog"
show="{{dialog.show}}"
/>
<!--goHome-->
<go-home/>
<authorization-modal-point isAuthorization='{{isAuthorization}}' />
{
"navigationBarTitleText": "集点列表",
"usingComponents": {
"status-img": "/component/statusPoint/statusPoint",
"go-home": "/component/goHome/goHome"
"status-img": "/component/statusPoint/statusPoint"
}
}
\ No newline at end of file
......@@ -30,7 +30,3 @@
</view>
</block>
</view>
<!--goHome-->
<go-home/>
// subPackage/page/pages/goToHome/goToHome.js
Page({
var app = getApp()
const wxService = require('../../../../utils/wxService')
const utils = require('../../../../utils/util')
const envInfo = require('../../../../config/index').envInfo
wxService.page({
/**
* 页面的初始数据
*/
data: {
curHeight: ''
},
/**
......@@ -15,6 +20,10 @@ Page({
},
handelGoHome() {
wxService.router('/pages/userCenter/userCenter').replace()
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
......@@ -26,7 +35,11 @@ Page({
* 生命周期函数--监听页面显示
*/
onShow: function () {
wxService.getSystemInfo().then(res => {
this.setData({
curHeight: res.windowHeight
})
})
},
/**
......
{
"navigationBarTitleText": "回到首页",
"navigationBarTitleText": "敬请期待",
"usingComponents": {}
}
\ No newline at end of file
<!--subPackage/page/pages/goToHome/goToHome.wxml-->
<!-- <view class="bottom-img" bindtap="handelGoHome">
<image class="img-top" mode="widthFix" src="/assets/imgs/7_1_0/go-top.png" bindtap="goTop"></image>
</view> -->
<view class="btn-wrap">
<view class="btn-home">
<button class="btn btn-primary">回到首页</button>
</view>
</view>
<view class="go-home" style="height:{{curHeight}}px" bindtap="handelGoHome"></view>
<!--<view class="go-tips">敬请期待</view>
<view class="btn-wrap">
<view class="btn-home" bindtap="handelGoHome">
<button type='primary' class='btn-primary'>回到首页</button>
</view>
</view-->
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -384,6 +384,7 @@ class WXService extends Http {
trialList() {
let localPath = this.getAssPath()
wx.showLoading({
title: '加载中'
})
......@@ -395,6 +396,8 @@ class WXService extends Http {
// 对应的path
let currentPaths = [];
localPath.forEach(item => {
console.log('---------', item, data)
if (item.hasOwnProperty(data)) {
currentPaths = item[data]
} else {
......@@ -574,6 +577,7 @@ class WXService extends Http {
config.onLoad && config.onLoad.apply(page, args);
},
onShow: function (...args) {
const isExperiencer = wx.getStorageSync('isExperiencer')
const page = this
_self.currentPage = page
config.onShow && config.onShow.apply(page, args)
......
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