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 bb98d689
authored
Feb 15, 2023
by
chenwq
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
系统订阅,跳产品详情
1 parent
eae5f4a7
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
23 additions
and
8 deletions
components/proDetail/proDetail.wxml
packagesList/pages/productDetail/productDetail.js
pages/tab/index/constant/data.js
pages/tab/index/constant/systemData.js
pages/tab/index/index.js
components/proDetail/proDetail.wxml
View file @
bb98d68
...
@@ -42,7 +42,7 @@
...
@@ -42,7 +42,7 @@
</button>
</button>
</block>
</block>
</image>
</image>
<image webp wx:if="{{ index >= 3 && !showLeftFlag}}"
webp class="img-item {{item.className?item.className:''}} img-item{{index}} img-item{{actNum}}{{index
}}" src="{{item.url?item.url:item}}?v={{img_version}}" />
<image webp wx:if="{{ index >= 3 && !showLeftFlag}}"
mode="widthFix" webp class="img-item {{item.className?item.className:''
}}" src="{{item.url?item.url:item}}?v={{img_version}}" />
</block>
</block>
<view class="occupancy" wx:if="{{!isShare}}">
<view class="occupancy" wx:if="{{!isShare}}">
<!-- padding底部 占位元素 -->
<!-- padding底部 占位元素 -->
...
...
packagesList/pages/productDetail/productDetail.js
View file @
bb98d68
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
import
{
behavior
as
computedBehavior
}
from
'~/utils/lib/miniprogram-computed'
import
{
behavior
as
computedBehavior
}
from
'~/utils/lib/miniprogram-computed'
import
{
IMG_URL
}
from
"~/utils/constantData.js"
;
import
{
IMG_URL
}
from
"~/utils/constantData.js"
;
import
{
scenceList
}
from
'~/pages/tab/index/constant/data'
import
{
scenceList
}
from
'~/pages/tab/index/constant/data'
import
{
senceData
,
productData
}
from
'~/pages/tab/index/constant/senceData'
import
USERAPI
from
'~/api/usersApi/index'
import
USERAPI
from
'~/api/usersApi/index'
import
utils
from
'~/utils/util.js'
import
utils
from
'~/utils/util.js'
import
{
getActiveApi
}
from
"~/api/viewprod"
import
{
getActiveApi
}
from
"~/api/viewprod"
...
@@ -59,12 +60,17 @@ Page({
...
@@ -59,12 +60,17 @@ Page({
this
.
isgetAuthphone
()
this
.
isgetAuthphone
()
if
(
!
options
||
utils
.
isEmptyObj
(
options
))
return
if
(
!
options
||
utils
.
isEmptyObj
(
options
))
return
let
{
actNum
,
activeNavIdx
,
isShare
,
sharephone
}
=
options
let
{
actNum
,
activeNavIdx
,
isShare
,
sharephone
,
sceneCode
}
=
options
if
(
isShare
){
if
(
isShare
){
wx
.
hideHomeButton
()
wx
.
hideHomeButton
()
}
}
let
sceneObj
=
scenceList
.
find
(
item
=>
item
.
sceneid
==
actNum
)
let
sceneObj
=
{}
if
(
actNum
!=
99
)
{
sceneObj
=
scenceList
.
find
(
item
=>
item
.
sceneid
==
actNum
)
}
else
{
sceneObj
=
productData
[
99
].
find
(
item
=>
item
.
sceneCode
==
sceneCode
)
}
let
proInfo
=
sceneObj
?.
productList
[
activeNavIdx
]
let
proInfo
=
sceneObj
?.
productList
[
activeNavIdx
]
this
.
setData
({
this
.
setData
({
...
@@ -99,9 +105,11 @@ Page({
...
@@ -99,9 +105,11 @@ Page({
//接受跳转的路由参数(小程序页面跳转)
//接受跳转的路由参数(小程序页面跳转)
onRoute(options) {
onRoute(options) {
if (!options || utils.isEmptyObj(options)) return
if (!options || utils.isEmptyObj(options)) return
let { actNum = 0, activeNavIdx = 0,phone=123 } = options;
let { actNum = 0, activeNavIdx = 0,phone=123, sceneid99=0 } = options;
let sceneObj = scenceList.find(item => item.sceneid == actNum)
let data = actNum != 99 ? scenceList : productData[actNum]
let value = actNum != 99 ? actNum : sceneid99
let sceneObj = data.find(item => item.sceneid == value)
let proInfo = sceneObj?.productList[activeNavIdx]
let proInfo = sceneObj?.productList[activeNavIdx]
this.setData({
this.setData({
...
...
pages/tab/index/constant/data.js
View file @
bb98d68
...
@@ -21,7 +21,6 @@ const videoList0 = [
...
@@ -21,7 +21,6 @@ const videoList0 = [
name
:
'数字无忧卡服务30秒'
,
name
:
'数字无忧卡服务30秒'
,
manufacturer
:
'嘀加智慧'
,
manufacturer
:
'嘀加智慧'
,
view
:
1004
,
view
:
1004
,
},
},
{
{
videoUrl
:
`
${
videoBaseUrl
}
video/digital_card_money3.mp4`
,
videoUrl
:
`
${
videoBaseUrl
}
video/digital_card_money3.mp4`
,
...
...
pages/tab/index/constant/systemData.js
View file @
bb98d68
...
@@ -54,9 +54,11 @@ const subscriptionSystemData = [
...
@@ -54,9 +54,11 @@ const subscriptionSystemData = [
// 产品详情图片
// 产品详情图片
productImgs
:
productImgs0
,
productImgs
:
productImgs0
,
"sceneCode"
:
"SC008"
,
"sceneCode"
:
"SC008"
,
sceneid
:
0
,
productList
:
[
productList
:
[
{
{
id
:
0
,
id
:
0
,
sceneid
:
0
,
currentIndex
:
0
,
currentIndex
:
0
,
img
:
'product-img1'
,
img
:
'product-img1'
,
proName
:
'客户活跃代运营'
,
proName
:
'客户活跃代运营'
,
...
@@ -90,6 +92,7 @@ const subscriptionSystemData = [
...
@@ -90,6 +92,7 @@ const subscriptionSystemData = [
},
},
{
{
id
:
1
,
id
:
1
,
sceneid
:
0
,
currentIndex
:
1
,
currentIndex
:
1
,
img
:
'product-img1'
,
img
:
'product-img1'
,
proName
:
'定保数字化招揽'
,
proName
:
'定保数字化招揽'
,
...
@@ -130,11 +133,13 @@ const subscriptionSystemData = [
...
@@ -130,11 +133,13 @@ const subscriptionSystemData = [
//场景详情图片
//场景详情图片
sceneImgs
:
sceneImgs5
,
sceneImgs
:
sceneImgs5
,
"sceneCode"
:
"SC006"
,
"sceneCode"
:
"SC006"
,
sceneid
:
1
,
// 产品详情图片
// 产品详情图片
productImgs
:
productImgs0
,
productImgs
:
productImgs0
,
productList
:
[
productList
:
[
{
{
id
:
2
,
id
:
2
,
sceneid
:
1
,
currentIndex
:
0
,
currentIndex
:
0
,
img
:
'product-img1'
,
img
:
'product-img1'
,
proName
:
'事故车救援服务'
,
proName
:
'事故车救援服务'
,
...
@@ -173,6 +178,7 @@ const subscriptionSystemData = [
...
@@ -173,6 +178,7 @@ const subscriptionSystemData = [
{
{
name
:
'膨胀金活动'
,
name
:
'膨胀金活动'
,
"sceneCode"
:
"SC005"
,
"sceneCode"
:
"SC005"
,
sceneid
:
2
,
//场景详情图片
//场景详情图片
sceneImgs
:
sceneImgs4
,
sceneImgs
:
sceneImgs4
,
// 产品详情图片
// 产品详情图片
...
@@ -180,6 +186,7 @@ const subscriptionSystemData = [
...
@@ -180,6 +186,7 @@ const subscriptionSystemData = [
productList
:
[
productList
:
[
{
{
id
:
3
,
id
:
3
,
sceneid
:
2
,
currentIndex
:
0
,
currentIndex
:
0
,
proName
:
'膨胀金'
,
proName
:
'膨胀金'
,
price
:
'100'
,
price
:
'100'
,
...
@@ -204,6 +211,7 @@ const subscriptionSystemData = [
...
@@ -204,6 +211,7 @@ const subscriptionSystemData = [
{
{
name
:
'数字化转型案例'
,
name
:
'数字化转型案例'
,
"sceneCode"
:
"SC007"
,
"sceneCode"
:
"SC007"
,
sceneid
:
3
,
productList
:
[],
productList
:
[],
videoList
:
videoList0
.
concat
(
videoList1
).
concat
(
videoList4
)
videoList
:
videoList0
.
concat
(
videoList1
).
concat
(
videoList4
)
}
}
...
...
pages/tab/index/index.js
View file @
bb98d68
...
@@ -91,8 +91,8 @@ Page({
...
@@ -91,8 +91,8 @@ Page({
//登录的用户手机号
//登录的用户手机号
let
userInfo
=
wx
.
$storage
.
get
(
"userInfo"
);
let
userInfo
=
wx
.
$storage
.
get
(
"userInfo"
);
let
obj
=
{
let
obj
=
{
// || 99
actNum
:
isNaN
(
detail
.
scenIndex
)
?
99
:
detail
.
scenIndex
,
//选中的场景 没有就是订阅系统的
actNum
:
isNaN
(
detail
.
scenIndex
)
?
99
:
detail
.
scenIndex
,
//选中的场景 没有就是订阅系统的
sceneid99
:
detail
.
sceneid
,
activeNavIdx
:
detail
.
id
,
//选中的产品,
activeNavIdx
:
detail
.
id
,
//选中的产品,
phone
:
userInfo
.
phone
phone
:
userInfo
.
phone
}
}
...
...
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