Commit f93671f4 by chenwq

微信授权

1 parent 4efa607d
......@@ -6,6 +6,7 @@ Page({
* 页面的初始数据
*/
data: {
routeObj: {}
},
/**
......@@ -13,11 +14,28 @@ Page({
*/
onShow(options) {
// this.init()
// console.log(options);
},
onLoad(options) {
console.log(options, '-------');
this.setData({
routeObj: options
})
this.login()
},
jumpH5(target) {
const url = 'http://scrm.dev.glsx.com.cn/dj-scrm-wx-work-main-cwq/#/group?roleType=99&authPhone=' + target.phone
const { routeObj } = this.data
routeObj.authphone = target.phone
let str = ''
Object.keys(routeObj).forEach((item, index) => {
if (!['page', 'h5Page'].includes(item)) {
str = str + (str ? '&' : '?') + item + '=' + routeObj[item]
}
})
// const url = 'http://scrm.dev.glsx.com.cn/dj-scrm-wx-work-main-cwq/#/' + routeObj.h5Page + str
const url = 'https://scrm.test.glsx.com.cn/glsx-bi-report/#/' + routeObj.h5Page + str
console.log(url, 'url')
wx.navigateTo({
url: `/pages/webView/webView?url=${encodeURIComponent(url)}`
})
......
......@@ -269,7 +269,7 @@ export const checkScene = options => {
console.log(options.path, 'options.path')
// wx.$SCENE = options
if (!userInfo && !['pages/accountItems/accountItems', 'pages/wxLogin/wxLogin', 'tabWorkOrder/pages/staffDaily/staffDaily', 'tabWorkOrder/pages/upgradeStaffDaily/upgradeStaffDaily', 'packageEquity/pages/trainingMaterials/pages/playVideo/index', 'packageEquity/pages/deliveryTarget/deliveryTarget'].includes(options.path)) {
if (!userInfo && !['pages/accountItems/accountItems', 'pages/wxLogin/wxLogin', 'tabWorkOrder/pages/staffDaily/staffDaily', 'tabWorkOrder/pages/upgradeStaffDaily/upgradeStaffDaily', 'packageEquity/pages/trainingMaterials/pages/playVideo/index', 'packageEquity/pages/deliveryTarget/deliveryTarget', 'pages/h5AuthPhone/h5AuthPhone'].includes(options.path)) {
// if (!userInfo) {
// console.log(userInfo);
console.log('未登录,请登录。')
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!