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 1ef0d17d
authored
Dec 30, 2022
by
胡悦
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
修复bug
1 parent
e307ba56
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
36 additions
and
16 deletions
components/proDetail/proDetail.js
components/proDetail/proDetail.scss
components/proDetail/proDetail.wxml
packagesList/pages/productDetail/productDetail.js
packagesList/pages/productDetail/productDetail.wxml
pages/tab/index/constant/systemData.js
pages/tab/index/index.js
components/proDetail/proDetail.js
View file @
1ef0d17
...
@@ -23,6 +23,10 @@ Component({
...
@@ -23,6 +23,10 @@ Component({
type
:
Number
,
type
:
Number
,
value
:
0
value
:
0
},
},
currentIndex
:
{
type
:
Number
,
value
:
0
},
cardInfo
:
{
cardInfo
:
{
type
:
Object
,
type
:
Object
,
value
:
{}
value
:
{}
...
@@ -57,9 +61,9 @@ Component({
...
@@ -57,9 +61,9 @@ Component({
*/
*/
methods
:
{
methods
:
{
getInfo
()
{
getInfo
()
{
let
{
activeNavIdx
,
actNum
}
=
this
.
data
let
{
activeNavIdx
,
actNum
,
currentIndex
}
=
this
.
data
//
console.log(actNum)
console
.
log
(
actNum
)
//
console.log(activeNavIdx)
console
.
log
(
activeNavIdx
)
const
spcList
=
[
99
,
4
]
// 订阅模块需要特殊处理
const
spcList
=
[
99
,
4
]
// 订阅模块需要特殊处理
console
.
log
(
productData1
,
'productData'
)
console
.
log
(
productData1
,
'productData'
)
const
senceList
=
productData1
[
actNum
].
filter
(
item
=>
item
.
name
!=
'全部'
)
const
senceList
=
productData1
[
actNum
].
filter
(
item
=>
item
.
name
!=
'全部'
)
...
@@ -68,15 +72,16 @@ Component({
...
@@ -68,15 +72,16 @@ Component({
let
item
=
senceList
[
i
]
let
item
=
senceList
[
i
]
let
proIdList
=
item
?.
productList
.
map
(
k
=>
k
.
id
)
let
proIdList
=
item
?.
productList
.
map
(
k
=>
k
.
id
)
if
(
proIdList
.
includes
(
activeNavIdx
))
{
if
(
proIdList
.
includes
(
activeNavIdx
))
{
//
console.log(item, 'item----')
console
.
log
(
item
,
'item----'
)
//console.log(item.productList.find(k => k.id == activeNavIdx))
//console.log(item.productList.find(k => k.id == activeNavIdx))
let
proInfo
=
item
.
productList
.
find
(
k
=>
k
.
id
==
activeNavIdx
)
let
proInfo
=
item
.
productList
.
find
(
k
=>
k
.
id
==
activeNavIdx
)
this
.
setData
({
this
.
setData
({
proInfo
,
proInfo
,
productImgs
:
spcList
.
includes
(
actNum
)
?
proInfo
.
sceneImgs
:
item
.
productImgs
,
productImgs
:
spcList
.
includes
(
actNum
)
?
proInfo
.
sceneImgs
:
item
.
productImgs
,
tabList
:
spcList
.
includes
(
actNum
)
?
proInfo
.
tabList
:
norTabList
,
tabList
:
spcList
.
includes
(
actNum
)
?
proInfo
.
tabList
:
norTabList
,
prodItemVideo
:
item
.
videoList
.
length
?
item
.
videoList
[
activeNavIdx
]
:
item
.
noVideoPicture
[
0
]
prodItemVideo
:
item
.
videoList
.
length
?
spcList
.
includes
(
actNum
)
?
item
.
videoList
[
currentIndex
]
:
item
.
videoList
[
activeNavIdx
]
:
item
.
noVideoPicture
[
0
]
})
})
console
.
log
(
this
.
data
.
productImgs
,
proInfo
)
// console.log(this.data.prodItemVideo, 'prodItemVideo--------')
// console.log(this.data.prodItemVideo, 'prodItemVideo--------')
break
break
}
}
...
@@ -150,6 +155,14 @@ Component({
...
@@ -150,6 +155,14 @@ Component({
this
.
setData
({
this
.
setData
({
showCard
:
!
this
.
data
.
showCard
showCard
:
!
this
.
data
.
showCard
})
})
},
// 长按图片
handleLongPress
(
e
)
{
let
{
actnum
,
index
}
=
e
.
target
.
dataset
// 膨胀金活动,合作方式
if
(
actnum
==
4
&&
index
==
4
)
{
wx
.
$router
.
jumpH5
(
'https://1064147.ma3you.cn/articles/OdEQmwb/'
);
}
}
}
}
}
})
})
components/proDetail/proDetail.scss
View file @
1ef0d17
...
@@ -269,7 +269,7 @@ page {
...
@@ -269,7 +269,7 @@ page {
.img-item52
{
.img-item52
{
width
:
100%
;
width
:
100%
;
height
:
3534
rpx
;
height
:
4360
rpx
;
}
}
.img-item53
{
.img-item53
{
...
...
components/proDetail/proDetail.wxml
View file @
1ef0d17
...
@@ -49,7 +49,7 @@
...
@@ -49,7 +49,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}}" webp class="img-item {{item.className?item.className:''}} img-item{{index}} img-item{{actNum}}{{index}}" src="{{item.url?item.url:item}}?v={{img_version}}"
bindlongpress="handleLongPress" data-actnum="{{actNum}}" data-index="{{index}}"
/>
</block>
</block>
<view class="occupancy" wx:if="{{!isShare}}">
<view class="occupancy" wx:if="{{!isShare}}">
<!-- padding底部 占位元素 -->
<!-- padding底部 占位元素 -->
...
...
packagesList/pages/productDetail/productDetail.js
View file @
1ef0d17
...
@@ -13,8 +13,6 @@ import {
...
@@ -13,8 +13,6 @@ import {
import
utils
from
'~/utils/util'
import
utils
from
'~/utils/util'
import
{
entmicroApi
}
from
"~/api/api"
import
{
entmicroApi
}
from
"~/api/api"
import
{
trackData
}
from
'../../../utils/data'
import
{
trackData
}
from
'../../../utils/data'
import
Draw
from
'../../../utils/Draw'
Page
({
Page
({
/**
/**
...
@@ -82,16 +80,16 @@ Page({
...
@@ -82,16 +80,16 @@ Page({
console
.
log
(
options
);
console
.
log
(
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
,
currentIndex
=
0
,
phone
,
hasPhoneNumber
,
name
,
proName
}
=
options
}
=
options
console
.
log
(
options
)
this
.
setData
({
this
.
setData
({
actNum
,
//选中的场景下标
actNum
,
//选中的场景下标
activeNavIdx
,
//选中的产品
activeNavIdx
,
//选中的产品
sharephone
:
phone
,
//联系电话 (登陆的用户)
sharephone
:
phone
,
//联系电话 (登陆的用户)
hasPhoneNumber
:
hasPhoneNumber
,
hasPhoneNumber
:
hasPhoneNumber
,
pageName
:
name
,
pageName
:
name
,
proName
proName
,
currentIndex
})
})
if
(
name
==
'增值转化'
)
{
if
(
name
==
'增值转化'
)
{
wx
.
$Track
.
sendTrack
(
this
.
data
.
trackList
[
actNum
][
activeNavIdx
])
wx
.
$Track
.
sendTrack
(
this
.
data
.
trackList
[
actNum
][
activeNavIdx
])
...
@@ -160,18 +158,21 @@ Page({
...
@@ -160,18 +158,21 @@ Page({
this
.
setData
({
this
.
setData
({
actNum
:
options
.
actNum
,
actNum
:
options
.
actNum
,
activeNavIdx
:
options
.
activeNavIdx
,
activeNavIdx
:
options
.
activeNavIdx
,
pageName
:
name
,
proName
proName
})
})
getApp
()
getApp
()
.
login
()
.
login
()
.
then
(({
data
})
=>
{
.
then
(({
data
})
=>
{
console
.
log
(
data
)
console
.
log
(
data
,
'------'
)
if
(
data
&&
data
.
phone
)
{
this
.
setData
({
this
.
setData
({
hasPhoneNumber
:
true
,
isLoadding
:
false
isLoadding
:
false
})
})
if
(
data
&&
data
.
phone
)
{
this
.
setData
({
hasPhoneNumber
:
true
})
}
}
})
})
this
.
getCardDetail
()
this
.
getCardDetail
()
...
...
packagesList/pages/productDetail/productDetail.wxml
View file @
1ef0d17
<!--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}}"></pro-detail>
<pro-detail id="pro-detail" custom-class="{{!hasPhoneNumber?'max_page_height':''}}" activeUrl="{{activeUrl}}" actNum="{{actNum}}" cardInfo="{{cardInfo}}" activeNavIdx="{{activeNavIdx}}"
currentIndex="{{currentIndex}}"
></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
pages/tab/index/constant/systemData.js
View file @
1ef0d17
...
@@ -42,6 +42,7 @@ const subscriptionSystemData = [
...
@@ -42,6 +42,7 @@ const subscriptionSystemData = [
productList
:
[
productList
:
[
{
{
id
:
0
,
id
:
0
,
currentIndex
:
0
,
img
:
'product-img1'
,
img
:
'product-img1'
,
proName
:
'私域用户活跃代运营'
,
proName
:
'私域用户活跃代运营'
,
price
:
'100'
,
price
:
'100'
,
...
@@ -74,6 +75,7 @@ const subscriptionSystemData = [
...
@@ -74,6 +75,7 @@ const subscriptionSystemData = [
},
},
{
{
id
:
1
,
id
:
1
,
currentIndex
:
1
,
img
:
'product-img1'
,
img
:
'product-img1'
,
proName
:
'定保/续保数字化招揽'
,
proName
:
'定保/续保数字化招揽'
,
price
:
'100'
,
price
:
'100'
,
...
@@ -117,6 +119,7 @@ const subscriptionSystemData = [
...
@@ -117,6 +119,7 @@ const subscriptionSystemData = [
productList
:
[
productList
:
[
{
{
id
:
2
,
id
:
2
,
currentIndex
:
0
,
img
:
'product-img1'
,
img
:
'product-img1'
,
proName
:
'事故车救援服务'
,
proName
:
'事故车救援服务'
,
price
:
'100'
,
price
:
'100'
,
...
...
pages/tab/index/index.js
View file @
1ef0d17
...
@@ -144,6 +144,9 @@ Page({
...
@@ -144,6 +144,9 @@ Page({
hasPhoneNumber
:
this
.
data
.
hasPhoneNumber
,
hasPhoneNumber
:
this
.
data
.
hasPhoneNumber
,
proName
:
detail
.
proName
proName
:
detail
.
proName
}
}
if
(
name
==
'系统订阅'
)
{
obj
.
currentIndex
=
detail
.
currentIndex
// 选中的产品再当前分类下的下标
}
wx
.
$router
.
go
(
'/packagesList/pages/productDetail/productDetail'
,
obj
)
wx
.
$router
.
go
(
'/packagesList/pages/productDetail/productDetail'
,
obj
)
},
},
// 跳转视频详情
// 跳转视频详情
...
...
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