Commit e61ab099 by 匡雅琴

测试提交

1 parent 490eb029
......@@ -20,5 +20,8 @@ module.exports = {
getMockConfig() {
return api.getMock()
},
getBaseDataConfig() {
return api.getBaseDataByMock()
}
}
}
\ No newline at end of file
......@@ -14,7 +14,7 @@ const target = ["ip", "dev", "uat", "beta", "prod"];
3预发布
4生产
*/
const index = 4;
const index = 2;
const secretKey = {
ip: {},
dev: {
......
......@@ -139,5 +139,21 @@ class Request {
})
})
}
getBaseDataByMock() {
let url = 'https://oss-config.dev.glsx.com.cn/mock/6264ff4760f415276f6dfe62/test'
return new Promise((resolve) => {
wx.request({
url,
data: {},
method: 'GET',
header: {},
dataType: 'json',
responseType: 'text',
success(response) {
resolve(response.data)
}
})
})
}
}
export default new Request()
\ No newline at end of file
......@@ -11,7 +11,7 @@ env.includes(accountInfo.miniProgram.envVersion) &&
import router from './router/index.js'
import util from './utils/util.js'
import './utils/Track'
import { ssoApi, wechatApi } from './api/api'
import { ssoApi, wechatApi, commonApi } from './api/api'
import { trackData } from './utils/data'
// import eventbus from './utils/evenbus'
// 实例化对象存储
......@@ -141,6 +141,16 @@ App({
})
})
},
// 获取公共数据
getBaseData() {
console.log("method")
return new Promise((resolve, reject) => {
commonApi.getBaseDataConfig().then(res => {
console.log(res, '555');
resolve(res.data)
})
})
},
/**
* 下载小程序新版本并重启应用
......
......@@ -7,12 +7,12 @@
*/
// pages/tab/index/index.js
import Draw from '../../../utils/Draw'
import { entmicroApi } from '../../../api/api'
import { entmicroApi,commonApi } from '../../../api/api'
import { commonMixin } from '../../../mixins/index'
import { trackData } from '../../../utils/data'
import { senceData, productData } from './constant/senceData'
import { subscriptionBannerUrl, subscriptionSystemData } from './constant/systemData'
import {scenceList} from "./constant/data"
// import { senceData, productData } from './constant/senceData'
// import { subscriptionBannerUrl, subscriptionSystemData } from './constant/systemData'
// import {scenceList} from "./constant/data"
let leftMenuIndex = 0
Page({
behaviors: [commonMixin],
......@@ -61,13 +61,13 @@ Page({
shareDisabled: true,
autoplay: true,
// 增值转化模块
senceData,
productData,
systemData: [],
productData: [],
activityList: [],
subscriptionBannerUrl: Object.freeze(subscriptionBannerUrl),
subscriptionSystemData: Object.freeze(subscriptionSystemData),
// subscriptionBannerUrl: Object.freeze(subscriptionBannerUrl),
// subscriptionSystemData: Object.freeze(subscriptionSystemData),
showCooperate: false,
scenceList: scenceList,
// scenceList: scenceList,
// bannerUrl:'https://img02.glsx.com.cn/weapp/resource/saas/business-assistant/index/banner/banner0.png'
},
......@@ -218,8 +218,8 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad(options) {
getApp()
.login()
const app = getApp()
app.login()
.then(({ data }) => {
if (data && data.phone) {
this.setData({
......@@ -234,9 +234,17 @@ Page({
wx.hideShareMenu({
menus: ['shareAppMessage']
})
// this.setData({
// productData: this.addAll(this.data.productData)
// })
app.getBaseData().then(res => {
console.log(res, '999');
const {
systemData,
productData} = res
this.setData({
systemData,
productData
})
})
},
addAll(data) {
......
......@@ -18,19 +18,21 @@
</view>
</block>
</view>
<view class="main-content">
<block wx:if="{{productData.length}}">
<view class="main-content">
<block wx:if="{{curTabIndex == 0}}">
<!-- 增值转化 -->
<!-- <gl-scenario currentScenIndex="{{1}}" productData="{{productData}}" senceData="{{senceData}}" activityList="{{activityList}}" data-name="增值转化" bindactivityClick="activityClick" bind:proClick="proClick" bind:videoClick="videoClick" bind:senceClick="senceClick" bindcurrentScen="getCurrentScen" /> -->
<gl-scenario discoverIndex="{{2}}" currentScenIndex="{{3}}" productData="{{productData}}" list="{{scenceList}}" senceData="{{senceData}}" activityList="{{activityList}}" bindactivityClick="activityClick" bindproClick="proClick" bind:videoClick="videoClick" bindsenceClick="senceClick" activityList="{{activityList}}" bindleftClick="leftClick" bindcurrentScen="getCurrentScen"></gl-scenario>
<gl-scenario discoverIndex="{{2}}" currentScenIndex="{{3}}" list="{{productData}}" senceData="{{senceData}}" activityList="{{activityList}}" bindactivityClick="activityClick" bindproClick="proClick" bind:videoClick="videoClick" bindsenceClick="senceClick" activityList="{{activityList}}" bindleftClick="leftClick" bindcurrentScen="getCurrentScen"></gl-scenario>
</block>
<block wx:if="{{curTabIndex == 1}}">
<gl-subscription list="{{subscriptionSystemData}}" bindmenuClick="sysMenuClick" bannerUrl="{{subscriptionBannerUrl}}" bind:proClick="proClick" data-name="客户数字化" bind:videoClick="videoClick" />
<gl-subscription list="{{systemData}}" bindmenuClick="sysMenuClick" bannerUrl="{{subscriptionBannerUrl}}" bind:proClick="proClick" data-name="客户数字化" bind:videoClick="videoClick" />
</block>
<block wx-if="{{curTabIndex == 2}}">
<company-introduce autoplay="{{autoplay}}" />
</block>
</view>
</block>
</view>
<!-- 服务咨询 -->
<!-- <view class="floating-box">
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!