Commit 65e7cb51 by 高淑倩

集点

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