Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
mini-program
/
ai-card
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit e61ab099
authored
May 17, 2023
by
匡雅琴
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
测试提交
1 parent
490eb029
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
58 additions
and
19 deletions
api/api.js
api/environment.js
api/request.js
app.js
pages/tab/index/index.js
pages/tab/index/index.wxml
api/api.js
View file @
e61ab09
...
...
@@ -20,5 +20,8 @@ module.exports = {
getMockConfig
()
{
return
api
.
getMock
()
},
getBaseDataConfig
()
{
return
api
.
getBaseDataByMock
()
}
}
}
\ No newline at end of file
api/environment.js
View file @
e61ab09
...
...
@@ -14,7 +14,7 @@ const target = ["ip", "dev", "uat", "beta", "prod"];
3预发布
4生产
*/
const
index
=
4
;
const
index
=
2
;
const
secretKey
=
{
ip
:
{},
dev
:
{
...
...
api/request.js
View file @
e61ab09
...
...
@@ -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
app.js
View file @
e61ab09
...
...
@@ -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
)
})
})
},
/**
* 下载小程序新版本并重启应用
...
...
pages/tab/index/index.js
View file @
e61ab09
...
...
@@ -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
,
// 增值转化模块
s
enceData
,
productData
,
s
ystemData
:
[]
,
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
)
{
...
...
pages/tab/index/index.wxml
View file @
e61ab09
...
...
@@ -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="{{s
ubscriptionS
ystemData}}" 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">
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment