Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas_plus
/
business-assistant
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 27be333c
authored
Dec 20, 2022
by
chenwq
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
滚动条
1 parent
62c7e9fc
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
249 additions
and
7 deletions
api/index.js
app.json
package-lock.json
package.json
packagesList/activityDetail/activityDetail.js
packagesList/activityDetail/activityDetail.json
packagesList/activityDetail/activityDetail.scss
packagesList/activityDetail/activityDetail.wxml
pages/tab/index/components/indexProduct/indexProduct.js
pages/tab/index/components/indexProduct/indexProduct.json
pages/tab/index/components/indexProduct/indexProduct.wxml
utils/request/environment.js
utils/request/request.js
api/index.js
View file @
27be333
...
...
@@ -70,6 +70,24 @@ const battleMessageApi = data => {
})
}
// 获取活动记录全集
const
getActivityRecordApi
=
data
=>
{
return
api
.
post
({
method
:
`entmicro.api.business.activityRecord.list`
,
apiProjectName
:
'drac'
,
...
data
},
true
)
}
// 根据id查询
const
getActivityDetailApi
=
data
=>
{
return
api
.
post
({
method
:
`entmicro.api.business.activityRecord.detail`
,
apiProjectName
:
'drac'
,
...
data
})
}
module
.
exports
=
{
/** 线索埋点数据上报
* operationType 操作类型(0:分享 1:浏览 2:申请活动)
...
...
@@ -87,5 +105,7 @@ module.exports = {
pageApi
,
readApi
,
tagApi
,
battleMessageApi
battleMessageApi
,
getActivityRecordApi
,
getActivityDetailApi
}
app.json
View file @
27be333
...
...
@@ -11,7 +11,8 @@
"pages/viewProd/index"
,
"pages/viewProdBanner/index"
,
"pages/measure/measure/measure"
,
"pages/measure/measureResult/measureResult"
"pages/measure/measureResult/measureResult"
,
"packagesList/activityDetail/activityDetail"
],
"requiredPrivateInfos"
:
[
"getLocation"
...
...
package-lock.json
View file @
27be333
...
...
@@ -8,6 +8,11 @@
"version"
:
"1.10.7"
,
"resolved"
:
"https://registry.npmmirror.com/@vant/weapp/-/weapp-1.10.7.tgz"
,
"integrity"
:
"sha512-R2FyCk0mK2xvUX2dMgVZjVG512RKBj7ELMDxjRJjhQWtw4495WBgbl5Yb4v2A6d4vWJe6z9toKgDJTciN0Bo9A=="
},
"glsx-applet-component"
:
{
"version"
:
"1.0.26"
,
"resolved"
:
"https://registry.npmjs.org/glsx-applet-component/-/glsx-applet-component-1.0.26.tgz"
,
"integrity"
:
"sha512-piMTmDIUq4x7fpE3/GgZI1pIFV6SlmsJdtm/TxBqM5VG4i38+7bXZSkjqvu3xdb2TIXw6FuA4lq6I/QfVVX7LQ=="
}
}
}
package.json
View file @
27be333
...
...
@@ -4,7 +4,8 @@
"description"
:
""
,
"main"
:
"app.js"
,
"dependencies"
:
{
"@vant/weapp"
:
"^1.10.7"
"@vant/weapp"
:
"^1.10.7"
,
"glsx-applet-component"
:
"^1.0.26"
},
"devDependencies"
:
{},
"scripts"
:
{
...
...
packagesList/activityDetail/activityDetail.js
0 → 100644
View file @
27be333
// packagesList/pages/activityDetail/activityDetail.js
import
{
getActivityDetailApi
}
from
'~/api/index.js'
Page
({
/**
* 页面的初始数据
*/
data
:
{
activityInfo
:
{}
},
toActivity
(){
},
/**
* 生命周期函数--监听页面加载
*/
onLoad
(
options
)
{
console
.
log
(
options
)
wx
.
$router
.
getData
(
res
=>
{
console
.
log
(
res
)
this
.
getActivityDetail
(
res
.
id
)
// this.setData({
// hasPhoneNumber: res.hasPhoneNumber
// })
})
},
getActivityDetail
(
id
)
{
getActivityDetailApi
({
id
}).
then
(
res
=>
{
res
.
beginTime
=
new
Date
(
res
.
beginTime
).
format
(
'yyyy年MM月dd日'
)
res
.
endTime
=
new
Date
(
res
.
endTime
).
format
(
'yyyy年MM月dd日'
)
this
.
setData
({
activityInfo
:
res
})
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady
()
{
},
/**
* 生命周期函数--监听页面显示
*/
onShow
()
{
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide
()
{
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload
()
{
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh
()
{
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom
()
{
},
/**
* 用户点击右上角分享
*/
onShareAppMessage
()
{
}
})
\ No newline at end of file
packagesList/activityDetail/activityDetail.json
0 → 100644
View file @
27be333
{
"usingComponents"
:
{}
}
\ No newline at end of file
packagesList/activityDetail/activityDetail.scss
0 → 100644
View file @
27be333
/* packagesList/pages/activityDetail/activityDetail.wxss */
.activity-detail
{
background-color
:
#F5F5F7
;
.swiper
{
height
:
422rpx
;
}
.swiper-img
{
width
:
100%
;
height
:
422rpx
;
}
}
.activity-introduction
{
margin-top
:
20rpx
;
background-color
:
#fff
;
padding
:
24rpx
32rpx
;
.activity-title
{
font-weight
:
500
;
font-size
:
36rpx
;
color
:
#2D2D33
;
}
.activity-content
{
margin
:
16rpx
0
48rpx
;
font-weight
:
400
;
font-size
:
28rpx
;
color
:
#444444
;
line-height
:
52rpx
;
}
.activity-info
{
margin-top
:
16rpx
;
.activity-item
{
display
:
flex
;
align-items
:
center
;
margin-bottom
:
8rpx
;
.activity-icon
{
width
:
40rpx
;
height
:
40rpx
;
margin-right
:
16rpx
;
}
.text
{
font-weight
:
400
;
font-size
:
28rpx
;
color
:
#444444
;
}
}
}
.activity-btn
{
margin-top
:
48rpx
;
margin-bottom
:
136rpx
;
font-weight
:
500
;
font-size
:
32rpx
;
color
:
#5850FF
;
text-align
:
center
;
line-height
:
48rpx
;
}
}
\ No newline at end of file
packagesList/activityDetail/activityDetail.wxml
0 → 100644
View file @
27be333
<!--packagesList/pages/activityDetail/activityDetail.wxml-->
<view class="activity-detail">
<swiper class="swiper" autoplay circular="true" current="{{current}}" interval="5000">
<swiper-item class="swiper-item">
<video class="swiper-img" src="{{IMGURL}}video/solar.mp4?v={{img_version}}"></video>
</swiper-item>
<swiper-item class="swiper-item">
<image class="swiper-img" webp src="{{IMGURL}}video/solar_bitmap.png?v={{img_version}}"></image>
</swiper-item>
</swiper>
<view class="activity-introduction">
<view class="activity-title">活动介绍</view>
<view class="activity-content">
{{activityInfo.activityEvent}}
</view>
<view class="activity-title">活动举办方</view>
<view class="activity-info">
<view class="activity-item">
<glsx-image custom-class="activity-icon" webp src="image/activity/icon-company.png"></glsx-image>
<view class="text">{{activityInfo.merchantName}}</view>
</view>
<view class="activity-item">
<glsx-image custom-class="activity-icon" webp src="image/activity/icon-address.png"></glsx-image>
<view class="text">兰州鑫通汽车销售有限公司</view>
</view>
<view class="activity-item">
<glsx-image custom-class="activity-icon" webp src="image/activity/icon-time.png"></glsx-image>
<view class="text">{{activityInfo.beginTime + ' - ' + activityInfo.endTime}}</view>
</view>
</view>
<view class="activity-btn" bindtap="toActivity">查看活动详情页面</view>
</view>
</view>
<!-- <phone-number type="{{'scenario'}}" bindtoApplication="toApplication" bindupdatePhoneNumber="updatePhoneNumber" hasPhoneNumber="{{hasPhoneNumber}}"></phone-number> -->
pages/tab/index/components/indexProduct/indexProduct.js
View file @
27be333
...
...
@@ -3,6 +3,8 @@ import { IMG_URL } from "~/utils/constantData.js";
// 导入方法
import
{
behavior
as
computedBehavior
}
from
"~/utils/lib/miniprogram-computed"
;
import
{
getActivityRecordApi
}
from
'~/api/index.js'
const
videoBaseUrl
=
"https://img02.glsx.com.cn/weapp/resource/miniprogram/ai-card/"
;
...
...
@@ -72,6 +74,8 @@ Component({
],
mainActiveIndex
:
0
,
contentHeight
:
0
,
// 滚动条
activityList
:
[],
// 视频海报
videoActive
:
0
,
overlayShow
:
false
,
...
...
@@ -83,6 +87,7 @@ Component({
lifetimes
:
{
attached
()
{
this
.
setProType
();
this
.
getActivityRecord
()
},
ready
()
{
// console.log('lifetimes',this)
...
...
@@ -152,6 +157,30 @@ Component({
return
res
;
},
// 获取全部活动列表
getActivityRecord
()
{
getActivityRecordApi
({}).
then
(({
data
,
code
,
message
})
=>
{
if
(
code
==
-
1
)
{
wx
.
showToast
({
title
:
message
,
icon
:
"none"
,
duration
:
2000
,
});
}
this
.
setData
({
activityList
:
data
})
})
},
// 跳转活动页
activityClick
(
e
)
{
// const {hasPhoneNumber} = this.data
const
id
=
e
.
detail
console
.
log
(
e
)
wx
.
$router
.
go
(
'/packagesList/activityDetail/activityDetail'
,
{
id
})
},
// 开通
openPro
()
{
let
obj
=
{
...
...
pages/tab/index/components/indexProduct/indexProduct.json
View file @
27be333
...
...
@@ -7,7 +7,8 @@
"van-tree-select"
:
"@vant/weapp/tree-select/index"
,
"video-item"
:
"../video-item/index"
,
"poster-item"
:
"../poster-item/index"
,
"van-overlay"
:
"@vant/weapp/overlay/index"
"van-overlay"
:
"@vant/weapp/overlay/index"
,
"activity-swiper"
:
"glsx-applet-component/activity-swiper/index"
},
"styleIsolation"
:
"shared"
}
\ No newline at end of file
pages/tab/index/components/indexProduct/indexProduct.wxml
View file @
27be333
...
...
@@ -7,7 +7,9 @@
</van-tabs>
</view>
<view>
<van-notice-bar custom-class="dy-notice" left-icon="{{IMG_URL}}index/ad.png" speed="{{20}}" text="{{scrollText}}" />
<!-- <van-notice-bar custom-class="dy-notice" left-icon="{{IMG_URL}}index/ad.png" speed="{{20}}" text="{{scrollText}}" /> -->
<!-- 滚动条 -->
<activity-swiper activityList="{{activityList}}" bindactivityClick="activityClick"></activity-swiper>
</view>
<view class="pro-cont" id="pro-cont">
<van-tree-select items="{{ items }}" height="{{contentHeight}}" main-active-index="{{ mainActiveIndex }}" bind:click-nav="onClickNav">
...
...
utils/request/environment.js
View file @
27be333
...
...
@@ -17,7 +17,7 @@ const systemInfo = wx.getSystemInfoSync()
const
manual
=
false
const
release
=
false
let
index
=
2
let
index
=
1
// 判断小程序环境
// develop:开发版(正常开发工具,测试时)
...
...
utils/request/request.js
View file @
27be333
...
...
@@ -20,7 +20,7 @@ class Request {
'content-type'
:
'application/x-www-form-urlencoded'
}
:
{}
let
projectName
=
this
.
getRopProject
(
params
.
method
)
let
projectName
=
params
.
apiProjectName
||
this
.
getRopProject
(
params
.
method
)
if
(
!
projectName
)
projectName
=
this
.
getRopProject
(
params
.
method
)
let
path
=
pathEnum
[
projectName
]
if
(
!
path
)
path
=
`/rop-scrm-
${
projectName
}
/`
...
...
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