Commit 92f19d3c by 高淑倩

集点列表

parent 3835e746
......@@ -117,9 +117,9 @@ App({
imageUrl: envInfo.imgCtx, //图片地址
isFullSucreen: false, // 当前设备是否为 FullSucreen
commonFunc: commonFunc,
brandId: 2711,
// brandId: 2711,
// brandId: 2005,
// brandId: 1001,
// brandId: 1002,
brandId: 1002,
}
})
const PROJECT_ENV = 'prod' // 生产 prod, 开发1 dev,开发2 dev2, 测试 test, 预生产 pre
const PROJECT_ENV = 'test' // 生产 prod, 开发1 dev,开发2 dev2, 测试 test, 预生产 pre
const needMock = '' //
// appid_dev_wx wxc3b64b09b1d3dfc2
......
......@@ -286,51 +286,7 @@ wxService.page({
* 生命周期函数--监听页面显示
*/
onShow: function () {
// const { experAccessible } = this.data
// if (experAccessible) {
// // 登录接口返回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
// })
// }
// } else {
// // 去别的页面
// wxService.router(`/subPackage/page/pages/goToHome/goToHome`).replace()
// }
},
/**
......
......@@ -12,6 +12,8 @@ wxService.page({
pointList: [],
currentStatus: 2, // 活动状态 1 未生效 2 生效中 3 已失效 0 已删除
currentTimeStatus: 1, // 1 进行中 2 已结束 3 未开始
isAuthorization: false,
hasUserInfo: false
},
/**
......@@ -22,13 +24,36 @@ wxService.page({
},
watch: {
experAccessible(newVal, oldVal) {
if(newVal) {
this.getPointList()
} else {
// 去别的页面
wxService.router(`/subPackage/page/pages/goToHome/goToHome`).replace()
// 登录接口返回err
const reLoginErrFlag = wx.getStorageSync('reLoginErr')
const baseUserInfo = wx.getStorageSync('_baseUserInfo')
let id
if (baseUserInfo && !reLoginErrFlag) {
this.setData({
isAuthorization: false,
hasUserInfo: true
}, () => {
if(newVal) {
this.getPointList()
} else {
// 去别的页面
wxService.router(`/subPackage/page/pages/goToHome/goToHome`).replace()
}
})
}
else if (!baseUserInfo && reLoginErrFlag) {
this.setData({
isAuthorization: true,
hasUserInfo: false
})
}
else {
this.setData({
isAuthorization: true,
hasUserInfo: false
})
}
}
}
},
/**
* 生命周期函数--监听页面初次渲染完成
......@@ -39,18 +64,6 @@ wxService.page({
* 生命周期函数--监听页面显示
*/
onShow() {
// const { experAccessible } = this.data
// console.log('experAccessible', experAccessible)
// wxService.nextTick(() => {
// const { experAccessible } = this.data
// console.log('experAccessible', experAccessible)
// if (experAccessible) {
// this.getPointList()
// } else {
// // 去别的页面
// // wxService.router(`/subPackage/page/pages/goToHome/goToHome`).replace()
// }
// })
},
getPointList() {
wx.showLoading({
......
{
"navigationBarTitleText": "集点列表",
"usingComponents": {
"status-img": "/component/statusPoint/statusPoint"
"status-img": "/component/statusPoint/statusPoint",
"authorization-modal-point": "/component/authorization-modal-point/authorization-modal-point"
}
}
\ No newline at end of file
<!--pages/pointList/pointList.wxml-->
<wxs src="./tools.wxs" module="tools" />
<view class="point--no-list border_box" wx:if="{{!pointList.length}}">
<view class="point--no-list border_box" wx:if="{{!pointList.length && hasUserInfo}}">
<text>您当前暂无集点活动</text>
</view>
<view class="point-list border_box" wx:if="{{pointList.length}}">
......@@ -26,3 +26,4 @@
</block>
</view>
<authorization-modal-point isAuthorization='{{isAuthorization}}'/>
......@@ -13,7 +13,7 @@
},
"compileType": "miniprogram",
"libVersion": "2.8.2",
"appid": "wx700028bf32a3be66",
"appid": "wxac09792264c49b5c",
"projectname": "7-Eleven",
"debugOptions": {
"hidedInDevtools": []
......
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