Commit 44452f99 by 匡雅琴

看产值紧急需求

1 parent d65c9f1e
...@@ -20,5 +20,8 @@ module.exports = { ...@@ -20,5 +20,8 @@ module.exports = {
getMockConfig() { getMockConfig() {
return api.getMock() return api.getMock()
}, },
getBaseDataConfig() {
return api.getBaseDataByMock()
}
} }
} }
\ No newline at end of file \ No newline at end of file
...@@ -139,5 +139,23 @@ class Request { ...@@ -139,5 +139,23 @@ class Request {
}) })
}) })
} }
getBaseDataByMock() {
let url = 'https://oss-config.dev.glsx.com.cn/mock/6264ff4760f415276f6dfe62/base-data'
// if (index == 4 || index == 3) url = 'https://oss-config.test.glsx.com.cn/mock/6274e3050da5034a58680aa6/aicard-config'
return new Promise((resolve) => {
wx.request({
url,
data: {},
method: 'GET',
header: {},
dataType: 'json',
responseType: 'text',
success(response) {
resolve(response.data)
}
})
})
}
} }
export default new Request() export default new Request()
\ No newline at end of file \ No newline at end of file
...@@ -11,7 +11,7 @@ env.includes(accountInfo.miniProgram.envVersion) && ...@@ -11,7 +11,7 @@ env.includes(accountInfo.miniProgram.envVersion) &&
import router from './router/index.js' import router from './router/index.js'
import util from './utils/util.js' import util from './utils/util.js'
import './utils/Track' import './utils/Track'
import { ssoApi, wechatApi } from './api/api' import { ssoApi, wechatApi, commonApi } from './api/api'
import { trackData } from './utils/data' import { trackData } from './utils/data'
// import eventbus from './utils/evenbus' // import eventbus from './utils/evenbus'
// 实例化对象存储 // 实例化对象存储
...@@ -42,6 +42,8 @@ App({ ...@@ -42,6 +42,8 @@ App({
wx.showMeasure = !!(options.query && options.query.scene) wx.showMeasure = !!(options.query && options.query.scene)
wx.onMemoryWarning(function () { wx.onMemoryWarning(function () {
}) })
// 获取mock数据
// this.getBaseData()
}, },
login(returnResponse) { login(returnResponse) {
let _this = this let _this = this
...@@ -141,6 +143,17 @@ App({ ...@@ -141,6 +143,17 @@ App({
}) })
}) })
}, },
// 获取公共数据
getBaseData() {
console.log("method")
var that = this;
return new Promise((resolve, reject) => {
commonApi.getBaseDataConfig().then(res => {
console.log(res, '555');
resolve(res.data)
})
})
},
/** /**
* 下载小程序新版本并重启应用 * 下载小程序新版本并重启应用
......
// packagesList/pages/productDetail/components/proDetail/proDetail.js // packagesList/pages/productDetail/components/proDetail/proDetail.js
import { senceData, productData1 } from '~/pages/tab/index/constant/senceData' // import { senceData, productData1 } from '~/pages/tab/index/constant/senceData'
const norTabList = ['海报案例', '测算营销', '产品介绍', '项目亮点'] const norTabList = ['海报案例', '测算营销', '产品介绍', '项目亮点']
import { componentsMixin } from "../../mixins/index"; import { componentsMixin } from "../../mixins/index";
Component({ Component({
...@@ -38,6 +38,10 @@ Component({ ...@@ -38,6 +38,10 @@ Component({
detailType: { detailType: {
type: String, type: String,
value: 'pro' value: 'pro'
},
productData: {
type: Object,
value: {}
} }
}, },
...@@ -47,7 +51,7 @@ Component({ ...@@ -47,7 +51,7 @@ Component({
data: { data: {
IMG_URL: 'https://img02.glsx.com.cn/weapp/resource/saas/business-assistant/', IMG_URL: 'https://img02.glsx.com.cn/weapp/resource/saas/business-assistant/',
videoBaseUrl: 'https://img02.glsx.com.cn/weapp/resource/saas/business-assistant/index/', videoBaseUrl: 'https://img02.glsx.com.cn/weapp/resource/saas/business-assistant/index/',
productData: productData1, // productData: productData1,
proInfo: {}, proInfo: {},
prodItemVideo: '', //选中的场景下的video的第一个 prodItemVideo: '', //选中的场景下的video的第一个
tabAct: 0, tabAct: 0,
...@@ -82,7 +86,7 @@ Component({ ...@@ -82,7 +86,7 @@ Component({
getInfo() { getInfo() {
let { activeNavIdx, actNum } = this.data let { activeNavIdx, actNum } = this.data
const spcList = [99] // 订阅模块需要特殊处理 const spcList = [99] // 订阅模块需要特殊处理
const senceList = productData1[actNum].filter(item => item.name != '全部') const senceList = this.properties.productData[actNum].filter(item => item.name != '全部')
for (let i = 0; i < senceList.length; i++) { for (let i = 0; i < senceList.length; i++) {
let item = senceList[i] let item = senceList[i]
let proIdList = item?.productList.map(k => k.id) let proIdList = item?.productList.map(k => k.id)
......
...@@ -10,9 +10,9 @@ ...@@ -10,9 +10,9 @@
"integrity": "sha512-hFJ48SCSvRgcwT/9TcxwNnNnWSpy2BpaBfwQwVdU6uwgFH+2OqGL435VQN7EDpIMH8YjHbiM84hueTyxAzIPqQ==" "integrity": "sha512-hFJ48SCSvRgcwT/9TcxwNnNnWSpy2BpaBfwQwVdU6uwgFH+2OqGL435VQN7EDpIMH8YjHbiM84hueTyxAzIPqQ=="
}, },
"glsx-applet-component": { "glsx-applet-component": {
"version": "1.0.50", "version": "1.0.51",
"resolved": "https://registry.npmjs.org/glsx-applet-component/-/glsx-applet-component-1.0.50.tgz", "resolved": "https://registry.npmjs.org/glsx-applet-component/-/glsx-applet-component-1.0.51.tgz",
"integrity": "sha512-SQJAWt9wrbBSvZ1Agk6v7YziXxe/WjYqnHj9SQ/TWbwZCCRIFRexiohX5SqJ0cMltQME8lxj8zqQpJe2XNysCA==" "integrity": "sha512-2o5Q8i/gts/pkUMCOkWjq0ZqElnfF8ELZAigW4Duar3sxGUyvgHOuHcQXYBagSNPSlFluDtG/9gaIa7PBEkWnw=="
} }
} }
} }
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
"main": "app.js", "main": "app.js",
"dependencies": { "dependencies": {
"@vant/weapp": "^1.10.9", "@vant/weapp": "^1.10.9",
"glsx-applet-component": "^1.0.50" "glsx-applet-component": "^1.0.51"
}, },
"devDependencies": {}, "devDependencies": {},
"scripts": { "scripts": {
......
...@@ -5,10 +5,10 @@ import { ...@@ -5,10 +5,10 @@ import {
import { import {
IMG_URL IMG_URL
} from "~/utils/constantData.js"; } from "~/utils/constantData.js";
import { // import {
senceData, // senceData,
productData // productData
} from "~/pages/tab/index/constant/senceData" // } from "~/pages/tab/index/constant/senceData"
// import USERAPI from '~/api/usersApi/index' // import USERAPI from '~/api/usersApi/index'
import utils from '~/utils/util' import utils from '~/utils/util'
import {entmicroApi} from "~/api/api" import {entmicroApi} from "~/api/api"
...@@ -22,8 +22,8 @@ Page({ ...@@ -22,8 +22,8 @@ Page({
behaviors: [computedBehavior], behaviors: [computedBehavior],
data: { data: {
IMG_URL, IMG_URL,
senceData, // senceData,
productData, productData: {},
proInfo: {}, proInfo: {},
isShare: false, //是否是分享出去的 isShare: false, //是否是分享出去的
actNum: -1, actNum: -1,
...@@ -80,7 +80,7 @@ Page({ ...@@ -80,7 +80,7 @@ Page({
onRoute(options) { onRoute(options) {
if (!options || utils.isEmptyObj(options)) return if (!options || utils.isEmptyObj(options)) return
let { let {
actNum = 0, activeNavIdx = 0, phone, hasPhoneNumber, name, proName actNum = 0, activeNavIdx = 0, phone, hasPhoneNumber, name, proName, productData
} = options } = options
this.setData({ this.setData({
actNum, //选中的场景下标 actNum, //选中的场景下标
...@@ -88,7 +88,8 @@ Page({ ...@@ -88,7 +88,8 @@ Page({
sharephone: phone, //联系电话 (登陆的用户) sharephone: phone, //联系电话 (登陆的用户)
hasPhoneNumber:hasPhoneNumber, hasPhoneNumber:hasPhoneNumber,
pageName: name, pageName: name,
proName proName,
productData
}) })
if (name == '营销增值服务') { if (name == '营销增值服务') {
wx.$Track.sendTrack(this.data.trackList[actNum][activeNavIdx]) wx.$Track.sendTrack(this.data.trackList[actNum][activeNavIdx])
......
<!--packagesList/pages/productDetail/productDetail.wxml--> <!--packagesList/pages/productDetail/productDetail.wxml-->
<loadding wx:if="{{isLoadding}}"></loadding> <loadding wx:if="{{isLoadding}}"></loadding>
<view wx:if="{{!isLoadding}}"> <view wx:if="{{!isLoadding}}">
<pro-detail id="pro-detail" custom-class="{{!hasPhoneNumber?'max_page_height':''}}" activeUrl="{{activeUrl}}" actNum="{{actNum}}" cardInfo="{{cardInfo}}" activeNavIdx="{{activeNavIdx}}" currentIndex="{{currentIndex}}"></pro-detail> <pro-detail id="pro-detail" custom-class="{{!hasPhoneNumber?'max_page_height':''}}" activeUrl="{{activeUrl}}" actNum="{{actNum}}" cardInfo="{{cardInfo}}" activeNavIdx="{{activeNavIdx}}" currentIndex="{{currentIndex}}" productData="{{productData}}"></pro-detail>
<pro-phone-number custom-class="pro_phone_number" type="product" hasPhoneNumber="{{hasPhoneNumber}}" bind:updatePhoneNumber="updatePhoneNumber"></pro-phone-number> <pro-phone-number custom-class="pro_phone_number" type="product" hasPhoneNumber="{{hasPhoneNumber}}" bind:updatePhoneNumber="updatePhoneNumber"></pro-phone-number>
</view> </view>
\ No newline at end of file \ No newline at end of file
...@@ -10,9 +10,9 @@ import Draw from '../../../utils/Draw' ...@@ -10,9 +10,9 @@ import Draw from '../../../utils/Draw'
import { entmicroApi } from '../../../api/api' import { entmicroApi } from '../../../api/api'
import { commonMixin } from '../../../mixins/index' import { commonMixin } from '../../../mixins/index'
import { trackData } from '../../../utils/data' import { trackData } from '../../../utils/data'
import { senceData, productData } from './constant/senceData' // import { senceData, productData } from './constant/senceData'
import { subscriptionBannerUrl, subscriptionSystemData } from './constant/systemData' // import { subscriptionBannerUrl, subscriptionSystemData } from './constant/systemData'
import {scenceList} from "./constant/data" // import {scenceList} from "./constant/data"
let leftMenuIndex = 0 let leftMenuIndex = 0
Page({ Page({
behaviors: [commonMixin], behaviors: [commonMixin],
...@@ -61,15 +61,19 @@ Page({ ...@@ -61,15 +61,19 @@ Page({
shareDisabled: true, shareDisabled: true,
autoplay: true, autoplay: true,
// 增值转化模块 // 增值转化模块
senceData, // senceData,
productData, // productData,
activityList: [], activityList: [],
subscriptionBannerUrl: Object.freeze(subscriptionBannerUrl), // subscriptionBannerUrl: Object.freeze(subscriptionBannerUrl),
subscriptionSystemData: Object.freeze(subscriptionSystemData), // subscriptionSystemData: Object.freeze(subscriptionSystemData),
showCooperate: false, showCooperate: false,
scenceList: scenceList, // scenceList: scenceList,
// bannerUrl:'https://img02.glsx.com.cn/weapp/resource/saas/business-assistant/index/banner/banner0.png' // bannerUrl:'https://img02.glsx.com.cn/weapp/resource/saas/business-assistant/index/banner/banner0.png'
subscriptionSystemData: [],
subscriptionBannerUrl: '',
scenceList: [],
productData: {}
}, },
// 一级菜单 // 一级菜单
introduce(e) { introduce(e) {
...@@ -153,7 +157,8 @@ Page({ ...@@ -153,7 +157,8 @@ Page({
actNum: isNaN(detail.scenIndex) ? 99 : detail.scenIndex, //选中的场景 没有就是订阅系统的 actNum: isNaN(detail.scenIndex) ? 99 : detail.scenIndex, //选中的场景 没有就是订阅系统的
activeNavIdx: detail.id, //选中的产品, activeNavIdx: detail.id, //选中的产品,
hasPhoneNumber: this.data.hasPhoneNumber, hasPhoneNumber: this.data.hasPhoneNumber,
proName: detail.proName proName: detail.proName,
productData: this.data.productData
} }
wx.$router.go('/packagesList/pages/productDetail/productDetail', obj) wx.$router.go('/packagesList/pages/productDetail/productDetail', obj)
}, },
...@@ -215,7 +220,8 @@ Page({ ...@@ -215,7 +220,8 @@ Page({
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad(options) { onLoad(options) {
getApp() const app = getApp()
app
.login() .login()
.then(({ data }) => { .then(({ data }) => {
if (data && data.phone) { if (data && data.phone) {
...@@ -231,6 +237,20 @@ Page({ ...@@ -231,6 +237,20 @@ Page({
wx.hideShareMenu({ wx.hideShareMenu({
menus: ['shareAppMessage'] menus: ['shareAppMessage']
}) })
app.getBaseData().then(res => {
console.log(res, '999');
const {subscriptionSystemData,
subscriptionBannerUrl,
scenceList,
productData} = res
this.setData({
subscriptionSystemData,
subscriptionBannerUrl,
scenceList,
productData
})
})
// this.setData({ // this.setData({
// productData: this.addAll(this.data.productData) // productData: this.addAll(this.data.productData)
// }) // })
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
<block wx:if="{{curTabIndex == 0}}"> <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 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="{{scenceList}}" bindactivityClick="activityClick" bindproClick="proClick" bind:videoClick="videoClick" bindsenceClick="senceClick" activityList="{{activityList}}" bindleftClick="leftClick" bindcurrentScen="getCurrentScen"></gl-scenario>
</block> </block>
<block wx:if="{{curTabIndex == 1}}"> <block wx:if="{{curTabIndex == 1}}">
<gl-subscription list="{{subscriptionSystemData}}" bindmenuClick="sysMenuClick" bannerUrl="{{subscriptionBannerUrl}}" bind:proClick="proClick" data-name="客户数字化" bind:videoClick="videoClick" /> <gl-subscription list="{{subscriptionSystemData}}" bindmenuClick="sysMenuClick" bannerUrl="{{subscriptionBannerUrl}}" bind:proClick="proClick" data-name="客户数字化" bind:videoClick="videoClick" />
......
...@@ -11,6 +11,7 @@ const emojiReg = /([^\u0020-\u007E\u00A0-\u00BE\u2E80-\uA4CF\uF900-\uFAFF\uFE30- ...@@ -11,6 +11,7 @@ const emojiReg = /([^\u0020-\u007E\u00A0-\u00BE\u2E80-\uA4CF\uF900-\uFAFF\uFE30-
const getMockConfig = () => { const getMockConfig = () => {
return commonApi.getMockConfig() return commonApi.getMockConfig()
} }
Date.prototype.format = function (fmt) { Date.prototype.format = function (fmt) {
let o = { let o = {
"M+": this.getMonth() + 1, //月份 "M+": this.getMonth() + 1, //月份
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!