Commit 42c2518b by 赵雅纹

体验者权限

parent b57d5717
...@@ -18,7 +18,9 @@ const prodCtx = 'https://crm-b.bigaka.com/api' // 发生产时解开此注释 ...@@ -18,7 +18,9 @@ const prodCtx = 'https://crm-b.bigaka.com/api' // 发生产时解开此注释
const devImgCtx = 'https://img3.bigaka.com/test' // 开发环境图片地址 const devImgCtx = 'https://img3.bigaka.com/test' // 开发环境图片地址
const testImgCtx = 'https://img3.bigaka.com/test' // 测试环境图片地址 const testImgCtx = 'https://img3.bigaka.com/test' // 测试环境图片地址
const preImgCtx = 'https://img3.bigaka.com/test' // 预生产环境图片地址 const preImgCtx = 'https://img3.bigaka.com/test' // 预生产环境图片地址
const prodImgCtx = 'https://img3.bigaka.com' // 预生产环境图片地址 // const prodImgCtx = 'https://img3.bigaka.com' // 预生产环境图片地址
const prodImgCtx = 'https://img3.bigaka.com/prd' // 预生产环境图片地址
// const prodImgCtx = 'https://img3.bigaka.com' // 生产环境图片地址 // const prodImgCtx = 'https://img3.bigaka.com' // 生产环境图片地址
const config = { const config = {
dev: devCtx, dev: devCtx,
......
...@@ -301,7 +301,10 @@ class WXService extends Http { ...@@ -301,7 +301,10 @@ class WXService extends Http {
} }
trialList() { trialList() {
//
let localPath = this.getAssPath() let localPath = this.getAssPath()
// 如果 localPath 则返回true
wx.showLoading({ wx.showLoading({
title: '加载中' title: '加载中'
}) })
...@@ -446,11 +449,19 @@ class WXService extends Http { ...@@ -446,11 +449,19 @@ class WXService extends Http {
// 获取当前页 // 获取当前页
let router = getCurrentRouter() let router = getCurrentRouter()
const baseUserInfo = _self.getBaseUserInfo() const baseUserInfo = _self.getBaseUserInfo()
// this.setData({
// experAccessible: true
// })
// if (baseUserInfo) { // if (baseUserInfo) {
_self.trialList().then(res => { _self.trialList().then(res => {
if (!res) return false if (!res.length) {
this.setData({
experAccessible: true
})
}
const { currentPaths } = res const { currentPaths } = res
// 有版本号
//有版本号
if (currentPaths.length > 0){ if (currentPaths.length > 0){
// 是体验者 // 是体验者
if (currentPaths.indexOf(router.route) > -1 && isExperiencer) { if (currentPaths.indexOf(router.route) > -1 && isExperiencer) {
...@@ -469,21 +480,18 @@ class WXService extends Http { ...@@ -469,21 +480,18 @@ class WXService extends Http {
}) })
} }
// if (currentPaths.indexOf(router.route) > -1 && isExperiencer || currentPaths.length == 0) { // // if (currentPaths.indexOf(router.route) > -1 && isExperiencer || currentPaths.length == 0) {
// this.setData({ // // this.setData({
// experAccessible: true // // experAccessible: true
// }) // // })
// } else { // // } else {
// this.setData({ // // this.setData({
// experAccessible: false // // experAccessible: false
// }) // // })
// } // // }
}) })
console.log('000',this.data.experAccessible); console.log('000',this.data.experAccessible);
// } // }
......
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