Commit 7161b2be by chenwq

url从配置获取

1 parent 0161f6a9
// pages/h5AuthPhone/h5AuthPhone.js // pages/h5AuthPhone/h5AuthPhone.js
import api from '../../api/api.js' import api from '../../api/api.js'
const IMG_URL = 'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/' const IMG_URL = 'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/'
import {
setConfigInfo
} from '~/store/index'
const app = getApp()
Page({ Page({
/** /**
...@@ -17,7 +21,6 @@ Page({ ...@@ -17,7 +21,6 @@ Page({
onShow(options) { onShow(options) {
// this.init() // this.init()
// console.log(options); // console.log(options);
}, },
onLoad(options) { onLoad(options) {
console.log(options, '-------'); console.log(options, '-------');
...@@ -26,7 +29,7 @@ Page({ ...@@ -26,7 +29,7 @@ Page({
}) })
this.login() this.login()
}, },
jumpH5(target) { async jumpH5(target) {
const { routeObj } = this.data const { routeObj } = this.data
routeObj.authphone = target.phone routeObj.authphone = target.phone
let str = '' let str = ''
...@@ -35,7 +38,9 @@ Page({ ...@@ -35,7 +38,9 @@ Page({
str = str + (str ? '&' : '?') + item + '=' + routeObj[item] str = str + (str ? '&' : '?') + item + '=' + routeObj[item]
} }
}) })
const url = 'https://scrm.glsx.com.cn/glsx-bi-report/#/' + routeObj.h5Page + str // 获取配置服务数据
let baseConfigData = await setConfigInfo(app.globalData)
const url = (baseConfigData.jumpBIUrl || 'https://scrm.glsx.com.cn/glsx-bi-report/#/') + routeObj.h5Page + str
console.log(url, 'url') console.log(url, 'url')
wx.navigateTo({ wx.navigateTo({
url: `/pages/webView/webView?url=${encodeURIComponent(url)}` url: `/pages/webView/webView?url=${encodeURIComponent(url)}`
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!