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 96b7f10c
authored
Oct 26, 2022
by
wuwx
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'develop' of 192.168.3.233:saas_plus/business-assistant into develop
2 parents
f7f72493
dc017aff
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
21 changed files
with
401 additions
and
250 deletions
login/loading/loading.js
packageOutput/pages/summary/components/outputCrowdfund/outputCrowdfund.js
packageOutput/pages/summary/components/outputCrowdfund/outputCrowdfund.scss
packageOutput/pages/summary/components/outputCrowdfund/outputCrowdfund.wxml
packageOutput/pages/summary/components/outputTransform/outputTransform.wxml
packageOutput/pages/summary/summary.js
packageOutput/pages/summary/summary.wxml
pages/checkProduct/checkProduct.js
pages/checkProduct/checkProduct.scss
pages/checkProduct/checkProduct.wxml
pages/mineDetail/messageBox/messageBox.js
pages/mineDetail/messageBox/messageBox.wxml
pages/tab/index/components/product/product.js
pages/tab/index/components/product/product.scss
pages/tab/index/components/product/product.wxml
pages/tab/index/constant/data.js
pages/tab/index/index.js
pages/tab/index/index.scss
pages/tab/index/index.wxml
utils/network.js
utils/share.js
login/loading/loading.js
View file @
96b7f10
...
@@ -66,12 +66,12 @@ Page({
...
@@ -66,12 +66,12 @@ Page({
},
},
init
()
{
init
()
{
const
sessionId
=
getSessionId
(),
wx
.
nextTick
(()
=>
{
const
sessionId
=
getSessionId
(),
{
{
url
,
url
,
targetPath
=
url
?
decodeURIComponent
(
url
)
:
''
targetPath
=
url
?
decodeURIComponent
(
url
)
:
''
}
=
this
.
options
}
=
this
.
options
wx
.
nextTick
(()
=>
{
let
path
=
'pages.index'
,
let
path
=
'pages.index'
,
obj
=
{}
obj
=
{}
if
(
targetPath
)
obj
.
targetPath
=
targetPath
if
(
targetPath
)
obj
.
targetPath
=
targetPath
...
@@ -84,7 +84,7 @@ Page({
...
@@ -84,7 +84,7 @@ Page({
path
=
setRouteData
(
targetPath
).
url
path
=
setRouteData
(
targetPath
).
url
obj
=
setRouteData
(
targetPath
).
obj
obj
=
setRouteData
(
targetPath
).
obj
}
}
wx
.
$router
.
re
Launch
(
path
,
obj
)
wx
.
$router
.
re
directTo
(
path
,
obj
)
}
else
this
.
autoLogin
(
obj
)
}
else
this
.
autoLogin
(
obj
)
})
})
}
else
this
.
autoLogin
(
obj
)
}
else
this
.
autoLogin
(
obj
)
...
...
packageOutput/pages/summary/components/outputCrowdfund/outputCrowdfund.js
View file @
96b7f10
...
@@ -8,7 +8,10 @@ Component({
...
@@ -8,7 +8,10 @@ Component({
properties
:
{
properties
:
{
orderObj
:
{
orderObj
:
{
type
:
Object
,
type
:
Object
,
value
:
()
=>
{
}
value
:
()
=>
{
},
observer
(
n
)
{
this
.
dealStaffList
()
}
},
},
},
},
...
@@ -68,12 +71,6 @@ Component({
...
@@ -68,12 +71,6 @@ Component({
}]
}]
},
},
lifetimes
:
{
attached
()
{
this
.
dealStaffList
()
},
},
/**
/**
* 组件的方法列表
* 组件的方法列表
*/
*/
...
@@ -81,8 +78,10 @@ Component({
...
@@ -81,8 +78,10 @@ Component({
dealStaffList
()
{
dealStaffList
()
{
var
list
=
this
.
data
.
orderObj
var
list
=
this
.
data
.
orderObj
list
&&
list
.
activityList
.
forEach
(
item
=>
{
list
&&
list
.
activityList
.
forEach
(
item
=>
{
item
.
showStaffList
=
item
.
staffList
.
length
>
10
?
item
.
staffList
.
slice
(
0
,
10
)
:
item
.
staffList
// 0-未开始;1-活动中;2-已结束
item
.
staffList
=
item
.
staffList
.
length
>
10
?
item
.
staffList
.
slice
(
10
)
:
[]
let
sliceNum
=
item
.
actStatus
==
2
?
3
:
10
item
.
showStaffList
=
item
.
staffList
.
length
>
sliceNum
?
item
.
staffList
.
slice
(
0
,
sliceNum
)
:
item
.
staffList
item
.
staffList
=
item
.
staffList
.
length
>
sliceNum
?
item
.
staffList
.
slice
(
sliceNum
)
:
[]
})
})
this
.
setData
({
this
.
setData
({
orderObj
:
list
orderObj
:
list
...
...
packageOutput/pages/summary/components/outputCrowdfund/outputCrowdfund.scss
View file @
96b7f10
...
@@ -128,6 +128,7 @@
...
@@ -128,6 +128,7 @@
.th
,
.th
,
.td
{
.td
{
width
:
calc
((
100%
-
116rpx
)
/
4
);
width
:
calc
((
100%
-
116rpx
)
/
4
);
.icon-rank
{
.icon-rank
{
width
:
24rpx
;
width
:
24rpx
;
height
:
24rpx
;
height
:
24rpx
;
...
@@ -137,6 +138,13 @@
...
@@ -137,6 +138,13 @@
}
}
}
}
.tr-no-data
{
text-align
:
center
;
height
:
32rpx
;
line-height
:
32rpx
;
padding-bottom
:
16rpx
;
}
.btn-more
{
.btn-more
{
height
:
56rpx
;
height
:
56rpx
;
line-height
:
56rpx
;
line-height
:
56rpx
;
...
...
packageOutput/pages/summary/components/outputCrowdfund/outputCrowdfund.wxml
View file @
96b7f10
...
@@ -48,9 +48,7 @@
...
@@ -48,9 +48,7 @@
</block>
</block>
<view wx:if="{{item.staffList.length}}" class="btn-more" bindtap="handleMore" data-idx="{{index}}">查看更多</view>
<view wx:if="{{item.staffList.length}}" class="btn-more" bindtap="handleMore" data-idx="{{index}}">查看更多</view>
</view>
</view>
<view class="tr" wx:else>
<view class="tr-no-data" wx:else>暂无数据</view>
<view>暂无数据</view>
</view>
</view>
</view>
</view>
</view>
<!-- 诊断 -->
<!-- 诊断 -->
...
@@ -65,10 +63,6 @@
...
@@ -65,10 +63,6 @@
<view class="step-label">建议{{idx + 1}}</view>
<view class="step-label">建议{{idx + 1}}</view>
<view class="step-txt">{{subItem}}</view>
<view class="step-txt">{{subItem}}</view>
</view>
</view>
<!-- <view class="suggest-step">
<view class="step-label">建议2</view>
<view class="step-txt">触达车主人数太少,建议与4S店关键人沟通注册员工的转发执行情况。</view>
</view> -->
</view>
</view>
</view>
</view>
</view>
</view>
...
...
packageOutput/pages/summary/components/outputTransform/outputTransform.wxml
View file @
96b7f10
<!--
packageOutput/pages/summary/components/outputTransform/outputTransform.wxml
-->
<!--
packageOutput/pages/summary/components/outputTransform/outputTransform.wxml
-->
<view class="layout">
<view class="layout">
<view class="block" wx:for="{{formDataList}}" wx:key="index">
<view class="block" wx:for="{{formDataList}}" wx:key="index">
<view>
<view>
<text wx:if="{{item.prefix}}">{{item.prefix}}</text>
<text wx:if="{{item.prefix}}">{{item.prefix}}</text>
{{formData[item.name] || 0}}
{{formData[item.name] || 0}}
<text wx:if="{{item.suffix}}">{{item.suffix}}</text>
<text wx:if="{{item.suffix}}">{{item.suffix}}</text>
</view>
</view>
<view class="label">{{item.label}}</view>
<view class="label">{{item.label}}</view>
</view>
</view>
</view>
</view>
<navigator class="link" target="miniProgram" open-type="navigate" app-id="wx570d9331f9ace0bd" version="release">
<image class="icon-link" src="{{IMGURL}}output/icon-link.png?v={{img_version}}"></image>
查看订单详情</navigator>
\ No newline at end of file
\ No newline at end of file
<navigator
version="trial"
class="link"
target="miniProgram"
open-type="navigate"
app-id="wx570d9331f9ace0bd"
version="release">
<image class="icon-link" src="{{IMGURL}}output/icon-link.png?v={{img_version}}" />
查看订单详情
</navigator>
packageOutput/pages/summary/summary.js
View file @
96b7f10
...
@@ -228,7 +228,6 @@ Page({
...
@@ -228,7 +228,6 @@ Page({
actList
.
forEach
((
item
,
idx
)
=>
{
actList
.
forEach
((
item
,
idx
)
=>
{
var
curItem
=
res
.
find
(
k
=>
k
.
goodsCategoryCode
==
item
.
productCode
)
var
curItem
=
res
.
find
(
k
=>
k
.
goodsCategoryCode
==
item
.
productCode
)
if
(
curItem
)
{
if
(
curItem
)
{
console
.
log
(
curItem
)
curItem
.
totalNum
=
curItem
.
activityList
.
length
curItem
.
totalNum
=
curItem
.
activityList
.
length
curItem
.
activityList
.
forEach
(
k
=>
{
curItem
.
activityList
.
forEach
(
k
=>
{
// 删---
// 删---
...
@@ -241,14 +240,14 @@ Page({
...
@@ -241,14 +240,14 @@ Page({
// 0-未开始;1-活动中;2-已结束
// 0-未开始;1-活动中;2-已结束
if
(
new
Date
(
k
.
startTime
)
>
new
Date
())
{
if
(
new
Date
(
k
.
startTime
)
>
new
Date
())
{
k
.
actStatus
=
0
k
.
actStatus
=
0
k
.
interDays
=
parseInt
((
new
Date
(
).
getTime
(
k
.
startTime
)
-
new
Date
().
getTime
())
/
(
1000
*
60
*
60
*
24
))
+
1
k
.
interDays
=
parseInt
((
new
Date
(
k
.
startTime
).
getTime
(
)
-
new
Date
().
getTime
())
/
(
1000
*
60
*
60
*
24
))
+
1
}
else
if
(
new
Date
(
k
.
startTime
)
<
new
Date
()
<
new
Date
(
k
.
endTime
))
{
}
else
if
(
new
Date
(
k
.
startTime
)
<
new
Date
()
<
new
Date
(
k
.
endTime
))
{
k
.
actStatus
=
1
k
.
actStatus
=
1
k
.
interDays
=
parseInt
((
new
Date
().
getTime
()
-
new
Date
(
k
.
startTime
).
getTime
())
/
(
1000
*
60
*
60
*
24
))
+
1
k
.
interDays
=
parseInt
((
new
Date
().
getTime
()
-
new
Date
(
k
.
startTime
).
getTime
())
/
(
1000
*
60
*
60
*
24
))
+
1
k
.
toEndDays
=
parseInt
((
new
Date
(
k
.
endTime
).
getTime
()
-
new
Date
().
getTime
())
/
(
1000
*
60
*
60
*
24
))
+
1
k
.
toEndDays
=
parseInt
((
new
Date
(
k
.
endTime
).
getTime
()
-
new
Date
().
getTime
())
/
(
1000
*
60
*
60
*
24
))
+
1
}
else
if
(
new
Date
(
k
.
endTime
)
<
new
Date
())
{
}
else
if
(
new
Date
(
k
.
endTime
)
<
new
Date
())
{
k
.
actStatus
=
2
k
.
actStatus
=
2
k
.
interDays
=
parseInt
((
new
Date
(
).
getTime
(
k
.
endTime
)
-
new
Date
().
getTime
())
/
(
1000
*
60
*
60
*
24
))
+
1
k
.
interDays
=
parseInt
((
new
Date
(
k
.
endTime
).
getTime
(
)
-
new
Date
().
getTime
())
/
(
1000
*
60
*
60
*
24
))
+
1
}
}
k
.
suggestTxtList
=
[]
k
.
suggestTxtList
=
[]
k
.
suggestList
=
[]
k
.
suggestList
=
[]
...
@@ -299,7 +298,6 @@ Page({
...
@@ -299,7 +298,6 @@ Page({
this
.
getSceneProStatus
(
this
.
data
.
sceneCodeList
[
this
.
data
.
sceneActive
-
1
])
this
.
getSceneProStatus
(
this
.
data
.
sceneCodeList
[
this
.
data
.
sceneActive
-
1
])
wx
.
$router
.
getData
(
obj
=>
{
wx
.
$router
.
getData
(
obj
=>
{
console
.
log
(
obj
)
var
scene
=
{}
var
scene
=
{}
Object
.
keys
(
this
.
data
.
sceneObj
).
forEach
(
item
=>
{
Object
.
keys
(
this
.
data
.
sceneObj
).
forEach
(
item
=>
{
scene
[
item
]
=
obj
[
item
]
scene
[
item
]
=
obj
[
item
]
...
@@ -311,8 +309,6 @@ Page({
...
@@ -311,8 +309,6 @@ Page({
})
})
this
.
getSceneProStatus
(
this
.
data
.
sceneCodeList
[
this
.
data
.
sceneActive
-
1
])
this
.
getSceneProStatus
(
this
.
data
.
sceneCodeList
[
this
.
data
.
sceneActive
-
1
])
// this.getCustomerDetail()
// this.setCurActivity()
})
})
},
},
...
@@ -323,47 +319,5 @@ Page({
...
@@ -323,47 +319,5 @@ Page({
wx
.
setNavigationBarTitle
({
wx
.
setNavigationBarTitle
({
title
:
this
.
data
.
merchantInfo
.
merchantName
,
title
:
this
.
data
.
merchantInfo
.
merchantName
,
})
})
},
/**
* 生命周期函数--监听页面显示
*/
onShow
()
{
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide
()
{
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload
()
{
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh
()
{
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom
()
{
},
/**
* 用户点击右上角分享
*/
onShareAppMessage
()
{
}
}
})
})
\ No newline at end of file
\ No newline at end of file
packageOutput/pages/summary/summary.wxml
View file @
96b7f10
...
@@ -36,10 +36,12 @@
...
@@ -36,10 +36,12 @@
</view>
</view>
</view>
</view>
</view>
</view>
<view class="isFullSucreen btn" wx:if="{{sceneActive != 1}}">
<view wx:if="{{sceneActive != 1}}">
<view wx:if="{{ activityList[activityActive].productStatus != 2 && !merchantInfo.isSuper}}" class="btn-blue" bindtap="handleJump">点击开通</view>
<view class="isFullSucreen btn" wx:if="{{ activityList[activityActive].productStatus != 2 && !merchantInfo.isSuper}}">
<view class="btn-blue" bindtap="handleJump">点击开通</view>
</view>
</view>
</view>
<view class="isFullSucreen btn" wx:
else
>
<view class="isFullSucreen btn" wx:
if="{{sceneActive == 1}}"
>
<view class="btn-disabled">点击开通</view>
<view class="btn-disabled">点击开通</view>
</view>
</view>
</view>
</view>
\ No newline at end of file
\ No newline at end of file
pages/checkProduct/checkProduct.js
View file @
96b7f10
...
@@ -22,17 +22,18 @@ Page({
...
@@ -22,17 +22,18 @@ Page({
// IMG_URL: `${IMG_URL}index`,
// IMG_URL: `${IMG_URL}index`,
btnList
:
[
btnList
:
[
{
{
src
:
`
${
IMG_URL
}
index/down.png`
,
name
:
"下载海报"
,
},
{
src
:
`
${
IMG_URL
}
index/wechat.png`
,
src
:
`
${
IMG_URL
}
index/wechat.png`
,
name
:
"
微信转发
"
,
name
:
"
转发给好友
"
,
},
},
// {
// {
// src: `${IMG_URL}index/moments.png`,
// src: `${IMG_URL}index/moments.png`,
// name: "朋友圈分享",
// name: "朋友圈分享",
// },
// },
{
src
:
`
${
IMG_URL
}
index/down.png`
,
name
:
"下载为海报"
,
},
],
],
// 4种场景下图片所有的高 (单位 rpx)
// 4种场景下图片所有的高 (单位 rpx)
imgHeightArr
:
[
imgHeightArr
:
[
...
@@ -151,7 +152,19 @@ Page({
...
@@ -151,7 +152,19 @@ Page({
// if(actNum&&activeNavIdx)return
// if(actNum&&activeNavIdx)return
// 设置标题
// 设置标题
this
.
shareTitle
=
`给你分享一个
${
senceData
[
actNum
]?.
productList
[
activeNavIdx
].
proName
}
~
`;
let
userInfoObj
=
wx
.
$storage
.
get
(
'userInfo'
)
// #服务商账号#取该分享者商户的联系人字段,无则取商户简称,无则取商户全称
let
name
if
(
userInfoObj
.
name
)
{
name
=
userInfoObj
.
name
}
else
if
(
userInfoObj
.
merchantName
){
name
=
userInfoObj
.
merchantName
}
else
if
(
userInfoObj
.
merchantName
){
//全称
name
=
userInfoObj
.
merchantName
}
this
.
shareTitle
=
`
${
name
}
给你分享一个活动
${
senceData
[
actNum
]?.
productList
[
activeNavIdx
].
proName
}
,戳我参与
~
`;
this.getImgInfo(actNum)
this.getImgInfo(actNum)
this.setData({
this.setData({
...
@@ -185,10 +198,10 @@ Page({
...
@@ -185,10 +198,10 @@ Page({
let { index } = e.currentTarget.dataset;
let { index } = e.currentTarget.dataset;
switch (index) {
switch (index) {
case 0:
case 0:
this.
wechatFn
();
this.
download
();
break;
break;
case 1:
case 1:
this.
download
();
this.
wechatFn
();
break;
break;
}
}
},
},
...
@@ -204,7 +217,7 @@ Page({
...
@@ -204,7 +217,7 @@ Page({
// let wx_user_info = wx.$storage.get("wx_user_info");
// let wx_user_info = wx.$storage.get("wx_user_info");
// console.log('wx_user_info: ', wx_user_info.appId);
// console.log('wx_user_info: ', wx_user_info.appId);
wx.showLoading({
wx.showLoading({
title: "
下载中
",
title: "
海报生成中...
",
});
});
let params = {
let params = {
actNum,
actNum,
...
@@ -412,6 +425,7 @@ Page({
...
@@ -412,6 +425,7 @@ Page({
this.setData({
this.setData({
hasUserInfo: true,
hasUserInfo: true,
});
});
let _this = this;
// 推荐使用 wx.getUserProfile 获取用户信息,开发者每次通过该接口获取用户个人信息均需用户确认
// 推荐使用 wx.getUserProfile 获取用户信息,开发者每次通过该接口获取用户个人信息均需用户确认
// 开发者妥善保管用户快速填写的头像昵称,避免重复弹窗
// 开发者妥善保管用户快速填写的头像昵称,避免重复弹窗
wx.getUserProfile({
wx.getUserProfile({
...
@@ -431,10 +445,23 @@ Page({
...
@@ -431,10 +445,23 @@ Page({
};
};
// console.log('obj',obj)
// console.log('obj',obj)
wx.$storage.set("wx_user_info", obj);
wx.$storage.set("wx_user_info", obj);
// this.onLoad(null);
_this.onLoad(null);
},
},
});
});
},
},
onPageScroll: (function () {
let timer = null;
return function (e) {
// console.log("在滚动");
// 监听页面的滚动开始和结束
clearTimeout(timer);
timer = setTimeout(() => {
// console.log("滚动结束");
wx.$eventbus.emit('evt_page_scroll',{scrollTop:e.scrollTop})
}, 500);
};
})(),
/**
/**
* 生命周期函数--监听页面初次渲染完成
* 生命周期函数--监听页面初次渲染完成
...
...
pages/checkProduct/checkProduct.scss
View file @
96b7f10
...
@@ -15,14 +15,15 @@
...
@@ -15,14 +15,15 @@
z-index
:
2
;
z-index
:
2
;
.img-wrap
{
.img-wrap
{
position
:
absolute
;
position
:
absolute
;
top
:
20
%
;
top
:
15
%
;
left
:
50%
;
left
:
50%
;
transform
:
translateX
(
-50%
);
transform
:
translateX
(
-50%
);
// width: 225px;
// width: 225px;
width
:
60%
;
width
:
60%
;
height
:
311px
;
height
:
54%
;
// background-color: red;
// background-color: red;
overflow
:
auto
;
overflow
:
auto
;
border-radius
:
16rpx
;
.prod-item
{
.prod-item
{
background-color
:
#f5f7fb
;
background-color
:
#f5f7fb
;
.prod-item
{
.prod-item
{
...
@@ -105,48 +106,69 @@
...
@@ -105,48 +106,69 @@
background-color
:
#fff
;
background-color
:
#fff
;
}
}
}
}
.btns
{
}
position
:
absolute
;
.btns-wrap
{
left
:
0
;
padding-bottom
:
84rpx
;
bottom
:
0
;
position
:
fixed
;
width
:
100%
;
left
:
0
;
height
:
154px
;
bottom
:
0
;
background
:
#ffffff
;
width
:
100%
;
border-radius
:
8px
8px
0
0
;
height
:
120rpx
;
.top
{
background
:
#ffffff
;
display
:
flex
;
z-index
:
1
;
justify-content
:
space-around
;
// border-radius: 8px 8px 0 0;
.btn
{
.top
{
padding-top
:
16px
;
display
:
flex
;
}
justify-content
:
space-around
;
.img
{
.btn
{
display
:
block
;
padding-top
:
16px
;
margin
:
0
auto
8px
;
width
:
40px
;
height
:
40px
;
}
.name
{
font-size
:
12px
;
color
:
#323436
;
text-align
:
center
;
}
.btn-wechat
{
width
:
auto
;
margin
:
0
;
padding
:
0
;
background-color
:
#fff
;
}
}
}
.btom
{
.img
{
margin
:
18px
auto
0
;
display
:
block
;
width
:
343px
;
margin
:
0
auto
8px
;
height
:
44px
;
width
:
40px
;
line-height
:
44px
;
height
:
40px
;
border
:
1px
solid
#eeeeee
;
}
border-radius
:
4px
;
// .name {
// font-size: 12px;
// color: #323436;
// text-align: center;
// }
.name0
{
width
:
256rpx
;
height
:
88rpx
;
border
:
1px
solid
#EEEEEE
;
border-radius
:
8rpx
;
font-size
:
28rpx
;
color
:
#8A8C90
;
text-align
:
center
;
text-align
:
center
;
line-height
:
88rpx
;
}
.name1
{
width
:
414rpx
;
height
:
88rpx
;
background
:
#3666FE
;
border-radius
:
8rpx
;
font-size
:
28rpx
;
color
:
#FFFFFF
;
line-height
:
88rpx
;
}
.btn-wechat
{
width
:
auto
;
margin
:
0
;
padding
:
0
;
background-color
:
#fff
;
}
}
}
}
.btom
{
margin
:
18px
auto
0
;
width
:
343px
;
height
:
44px
;
line-height
:
44px
;
border
:
1px
solid
#eeeeee
;
border-radius
:
4px
;
text-align
:
center
;
}
}
}
/* 用户授权 */
/* 用户授权 */
...
@@ -156,6 +178,6 @@
...
@@ -156,6 +178,6 @@
left
:
0
;
left
:
0
;
right
:
0
;
right
:
0
;
bottom
:
0
;
bottom
:
0
;
z-index
:
2
;
z-index
:
3
;
background-color
:
transparent
;
background-color
:
transparent
;
}
}
pages/checkProduct/checkProduct.wxml
View file @
96b7f10
<!--pages/checkProduct/checkProduct.wxml-->
<!-- pages/checkProduct/checkProduct.wxml -->
<navigation-bar showBack="{{true}}" bindnavbarReady="navbarReady" navStyle="{{navStyle}}">{{senceData[actNum].productList[activeNavIdx].proName}}</navigation-bar>
<navigation-bar showBack="{{true}}" bindnavbarReady="navbarReady" navStyle="{{navStyle}}">
{{senceData[actNum].productList[activeNavIdx].proName}}
</navigation-bar>
<!-- <view style="height:{{headerHeight}}px">
<!-- <view style="height:{{headerHeight}}px">
</view> -->
</view> -->
<!-- style="padding-top:{{headerHeight}}px" -->
<product stickyTop="{{headerHeight}}" class="productCon"
style="padding-top:{{headerHeight}}px" isAuthphone="{{isAuthphone}}" actNum="{{actNum}}" wrapactiveNavIdx="{{activeNavIdx}}" senceData="{{senceData}}" outshowVideo="{{outshowVideo}}" isShare="{{isShare}}"
bindauthorized="authorizedFn" />
<product stickyTop="{{headerHeight}}" class="productCon"
isAuthphone="{{isAuthphone}}" actNum="{{actNum}}" wrapactiveNavIdx="{{activeNavIdx}}" senceData="{{senceData}}" outshowVideo="{{outshowVideo}}" isShare="{{isShare}}"
bindauthorized="authorizedFn" />
<!-- 分享弹框 -->
<!-- 分享弹框 -->
<!-- <shareModel actNum="{{actNum}}" isShow="{{isShow}}" bindmodelclose="modelcloseFn" /> -->
<!-- <view class="share-wrap" wx:if="{{isShow}}">
<view class="share-wrap" wx:if="{{isShow}}">
{{IMG_URL}}
<view class="img-wrap">
<view class="img-wrap">
<view class="prod-item">
<view class="prod-item">
<view class="prod-card">
<view class="prod-card">
<view class="card-img">
<view class="card-img">
<!-- <text class="img-desc">轻改类</text>
<image src="{{IMG_URL}}index/prod/{{senceData[actNum].productList[activeNavIdx].img}}.png" />
<image src="{{IMGURL}}discovery_prod1.png" /> -->
</view>
<image src="{{IMG_URL}}index/prod/{{senceData[actNum].productList[activeNavIdx].img}}.png" />
<view class="prod-info">
</view>
<view class="prod-info">
<text class="title">{{senceData[actNum].productList[activeNavIdx].proName}}</text>
<text class="title">{{senceData[actNum].productList[activeNavIdx].proName}}</text>
<!-- senceData[actNum]['productList'][activeNavIdx].changeSale || -->
<text class="sale" decode="{{true}}">
<text class="sale" decode="{{true}}">{{senceData[actNum]['productList'][activeNavIdx].varType == 1 ? '三年售后存量数':'新车销量'}} <text class="sale-num">{{senceData[actNum]['productList'][activeNavIdx].varType == 1? senceData[actNum]['productList'][activeNavIdx].flow : senceData[actNum]['productList'][activeNavIdx].sale}}</text>
{{senceData[actNum]['productList'][activeNavIdx].varType == 1 ? '三年售后存量数':'新车销量'}}
<text class="sale-num">
{{senceData[actNum]['productList'][activeNavIdx].varType == 1? senceData[actNum]['productList'][activeNavIdx].flow : senceData[actNum]['productList'][activeNavIdx].sale}}
</text>
</text>
</text>
<text class="earnings" decode="{{true}}">预估收益 <text class="earnings-num">{{senceData[actNum]['productList'][activeNavIdx].profit}}</text>
<text class="earnings" decode="{{true}}">
预估收益
<text class="earnings-num">
{{senceData[actNum]['productList'][activeNavIdx].profit}}
</text>
</text>
</text>
</view>
</view>
<!-- <view class="" bindtap="downVideo" data-src="https://img02.glsx.com.cn/weapp/resource/miniprogram/ai-card/video/360_AR.mp4?v=" hover-class="none" hover-stop-propagation="false">
</view>
视频下载
</view>
</view> -->
</view>
</view>
<image class="img" style="height:{{imgHeight}}px" src="{{IMG_URL}}index/longpic{{actNum+1}}.png" bindload="onloadFn" />
<!-- <block wx:for="{{imgList}}" wx:key="*this">
<image mode="widthFix" class="img" src="{{item}}"/>
</block> -->
</view>
</view>
<button></button>
<button></button>
<view class="btns"
>
</view> --
>
<view class="top"
>
<!-- 用于图片加载事件 --
>
<view class="btn" wx:for="{{btnList}}" wx:key="name" bindtap="handleClick" data-index="{{index}}"
>
<image class="img" src="{{IMG_URL}}index/longpic{{actNum+1}}.png" bindload="onloadFn" /
>
<block wx:if="{{index == 0
}}">
<view class="btns-wrap" wx:if="{{isShow
}}">
<button open-type="share" class="btn-wechat
">
<view class="top
">
<image class="img" src="{{item.src}}" /
>
<view class="btn" wx:for="{{btnList}}" wx:key="name" bindtap="handleClick" data-index="{{index}}"
>
<view class="name">{{item.name}}</view
>
<block wx:if="{{index == 1}}"
>
</button
>
<button open-type="share" class="btn-wechat"
>
</block
>
<view class="name{{index}}">{{item.name}}</view
>
<
block wx:else
>
<
/button
>
<image class="img" src="{{item.src}}" /
>
</block
>
<view class="name">{{item.name}}</view
>
<block wx:else
>
<
/block
>
<
view class="name{{index}}">{{item.name}}</view
>
</
view
>
</
block
>
</view>
</view>
<view class="btom" bindtap="modelcloseFn">取消</view>
</view>
</view>
<!-- <view class="btom" bindtap="modelcloseFn">取消</view> -->
</view>
</view>
<!-- 授权昵称 -->
<!-- 授权昵称 -->
<!-- !hasUserInfo && !isShow -->
<!-- !hasUserInfo && !isShow -->
<view wx:if="{{!hasUserInfo && isShare && isAuthphone}}" class="user-profile" bindtap="getUserProfile"></view>
<view wx:if="{{!hasUserInfo && isShare && isAuthphone}}" class="user-profile" bindtap="getUserProfile"></view>
\ No newline at end of file
\ No newline at end of file
pages/mineDetail/messageBox/messageBox.js
View file @
96b7f10
...
@@ -49,9 +49,19 @@ Component({
...
@@ -49,9 +49,19 @@ Component({
* 组件的方法列表
* 组件的方法列表
*/
*/
methods
:
{
methods
:
{
navWebView
(
e
)
{
preView
(
e
)
{
let
{
valueUrl
}
=
e
.
currentTarget
.
dataset
let
{
valueurl
}
=
e
.
currentTarget
.
dataset
wx
.
$router
.
jumpH5
(
valueUrl
)
// console.log(e)
// console.log(valueUrl)
// let urls = []
// urls.push(valueUrl)
// // wx.$router.jumpH5(valueUrl)
// console.log(urls)
// console.log([valueUrl])
wx
.
$api
.
previewImage
({
urls
:
[
valueurl
],
current
:
valueurl
})
},
},
copyLink
(
e
)
{
copyLink
(
e
)
{
console
.
log
(
e
)
console
.
log
(
e
)
...
...
pages/mineDetail/messageBox/messageBox.wxml
View file @
96b7f10
...
@@ -37,7 +37,7 @@
...
@@ -37,7 +37,7 @@
<view class="warReportBox" wx:if="{{item.messageType == 2}}">
<view class="warReportBox" wx:if="{{item.messageType == 2}}">
<view class="item">
<view class="item">
<view class="label">当前产值</view>
<view class="label">当前产值</view>
<view class="num">{{item.currentValue}}元</view>
<view class="num">{{item.currentValue
||'0.0'
}}元</view>
</view>
</view>
</view>
</view>
<view class="warReportBox" wx:if="{{item.messageType == 3}}">
<view class="warReportBox" wx:if="{{item.messageType == 3}}">
...
@@ -47,12 +47,18 @@
...
@@ -47,12 +47,18 @@
</view>
</view>
<view class="item">
<view class="item">
<view class="label">完成目标</view>
<view class="label">完成目标</view>
<view class="num">{{item.completeRate}}
%
</view>
<view class="num">{{item.completeRate}}</view>
</view>
</view>
</view>
</view>
<view class="warReportLink">
<view class="warReportLink">
<view class="label">点击了解详情:</view>
<view class="label">点击了解详情:</view>
<view class="link" data-valueUrl="{{item.valueUrl}}" bind:tap="navWebView">战报详情</view>
<view
class="link"
wx:if="{{item.valueUrl}}"
data-valueurl="{{item.valueUrl}}"
bind:tap="preView">
战报详情
</view>
</view>
</view>
</msg-box>
</msg-box>
</scroll-view>
</scroll-view>
...
@@ -83,15 +89,21 @@
...
@@ -83,15 +89,21 @@
</view>
</view>
<view class="cell" wx:if="{{item.messageType == 1}}">
<view class="cell" wx:if="{{item.messageType == 1}}">
<view class="label">开始时间:</view>
<view class="label">开始时间:</view>
<view class="value">{{item.activityStartTime}}</view>
<view class="value">{{item.activityStartTime
||'-'
}}</view>
</view>
</view>
<view class="cell" wx:if="{{item.messageType == 1}}">
<view class="cell" wx:if="{{item.messageType == 1}}">
<view class="label">结算时间:</view>
<view class="label">结算时间:</view>
<view class="value">{{item.activityEndTime}}</view>
<view class="value">{{item.activityEndTime
||'-'
}}</view>
</view>
</view>
<view class="cell" wx:if="{{item.messageType == 1}}">
<view class="cell" wx:if="{{item.messageType == 1}}">
<view class="label">活动链接:</view>
<view class="label">活动链接:</view>
<view class="link" bind:tap="copyLink" data-url="{{item.activityUrl}}">点击复制活动链接</view>
<view
class="link"
wx:if="{{item.activityUrl}}"
bind:tap="copyLink"
data-url="{{item.activityUrl}}">
点击下载活动二维码
</view>
</view>
</view>
<view class="cell" wx:if="{{item.messageType == 4}}">
<view class="cell" wx:if="{{item.messageType == 4}}">
<view class="label">产品名称:</view>
<view class="label">产品名称:</view>
...
...
pages/tab/index/components/product/product.js
View file @
96b7f10
...
@@ -49,25 +49,64 @@ Component({
...
@@ -49,25 +49,64 @@ Component({
IMGURL
:
`
${
IMG_URL
}
index/`
,
IMGURL
:
`
${
IMG_URL
}
index/`
,
videoBaseUrl
,
videoBaseUrl
,
getMoreBtn
:
false
,
getMoreBtn
:
false
,
showVideo
:
true
//显示视频列表
showVideo
:
true
,
//显示视频列表
imgTopArr
:[]
},
},
lifetimes
:
{
lifetimes
:
{
ready
:
function
()
{
ready
:
function
()
{
if
(
!
this
.
data
.
outshowVideo
){
this
.
init
();
this
.
getImgHeight
();
console
.
log
(
'ready'
)
//获取当前路径
let
currentUrl
=
this
.
getCurrentPageUrl
()
// console.log('currentUrl: ', currentUrl);
if
(
currentUrl
==
'/pages/tab/index/index'
){
this
.
setData
({
currentUrl
:
false
})
}
//监听页面滚动的距离
wx
.
$eventbus
.
on
(
'evt_page_scroll'
,
async
(
e
)
=>
{
console
.
log
(
e
)
// let heightTop = this.data.stickyTop// 90 场景高度,8 场景margin-bottom
// let prodArr = await this.getHeight('.prod-wrap')
// // console.log('prodArr: ', prodArr);
// heightTop += prodArr[0].height
// let imgArr = await this.getHeight('.img-item')
// // console.log('imgArr: ', imgArr);
// let imgHeightArr = []
// imgArr.reduce((pre,cur,index)=>{
// imgHeightArr.push(pre+cur.height)
// return pre+cur.height
// },heightTop)
let
imgTopArr
=
this
.
data
.
imgTopArr
console
.
log
(
'imgTopArr: '
,
imgTopArr
);
if
(
imgTopArr
.
length
==
0
)
return
wx
.
nextTick
(()
=>
{
let
idx
=
imgTopArr
.
findIndex
(
item
=>
item
>
e
.
scrollTop
)
if
(
idx
>-
1
){
this
.
setData
({
curTabIdx
:
idx
})
}
})
})
if
(
!
this
.
data
.
outshowVideo
){
this
.
setData
({
this
.
setData
({
showVideo
:
false
showVideo
:
false
})
})
}
}
this
.
init
();
this
.
getImgHeight
();
//如果不是分享,初始化的时候调用函数
//如果不是分享,初始化的时候调用函数
if
(
!
this
.
data
.
isShare
)
{
if
(
!
this
.
data
.
isShare
)
{
// console.log(131546)
// console.log(131546)
this
.
getMoreFn
();
this
.
getMoreFn
();
}
}
},
},
},
},
observers
:
{
observers
:
{
actNum
:
function
(
newval
,
oldval
)
{
actNum
:
function
(
newval
,
oldval
)
{
...
@@ -112,7 +151,7 @@ Component({
...
@@ -112,7 +151,7 @@ Component({
activeNavIdx
:
0
,
activeNavIdx
:
0
,
});
});
// 每次切换场景,重新获取流程图高度
// 每次切换场景,重新获取流程图高度
this
.
getImgHeight
();
//
this.getImgHeight();
this
.
getMoreFn
();
this
.
getMoreFn
();
// this
// this
if
(
this
.
data
.
wrapactiveNavIdx
){
if
(
this
.
data
.
wrapactiveNavIdx
){
...
@@ -122,11 +161,16 @@ Component({
...
@@ -122,11 +161,16 @@ Component({
}
}
},
},
},
},
/**
/**
* 组件的方法列表
* 组件的方法列表
*/
*/
methods
:
{
methods
:
{
getCurrentPageUrl
()
{
const
pages
=
getCurrentPages
()
const
currentPage
=
pages
[
pages
.
length
-
1
]
const
url
=
`/
${
currentPage
.
route
}
`
return
url
},
async
init
()
{
async
init
()
{
try
{
try
{
const
{
data
,
code
,
message
}
=
await
USERAPI
.
wxCodeLogin
();
const
{
data
,
code
,
message
}
=
await
USERAPI
.
wxCodeLogin
();
...
@@ -175,58 +219,98 @@ Component({
...
@@ -175,58 +219,98 @@ Component({
saleTextChange
(
e
)
{},
saleTextChange
(
e
)
{},
changeTab
(
e
)
{
changeTab
(
e
)
{
let
idx
=
e
.
detail
;
let
idx
=
e
.
detail
;
this
.
setData
({
let
{
imgTopArr
,
stickyTop
}
=
this
.
data
intoViewId
:
`to-
${
idx
}
`
,
console
.
log
(
'idx: '
,
imgTopArr
[
idx
],
stickyTop
);
});
// this.setData({
// intoViewId: `to-${idx}`,
// });
// wx.$eventbus.emit('evt_page_index',idx)
//判断当前路径
let
currentUrl
=
this
.
getCurrentPageUrl
()
if
(
currentUrl
==
'/pages/tab/index/index'
){
wx
.
pageScrollTo
({
scrollTop
:
imgTopArr
[
idx
]
-
stickyTop
+
88
+
34
})
}
else
{
wx
.
pageScrollTo
({
scrollTop
:
(
imgTopArr
[
idx
]
-
stickyTop
)})
}
},
// async changeTab(e){
// let idx = e.detail
// this.setData({
// intoViewId: `to-${idx}`
// })
// let heightTop = this.data.headerHeight + 90 - 16 - 46 // 90 场景高度,16 可能是误差 , 46 tab高度
// let prodArr = await this.getHeight('.prod-wrap')
// heightTop += prodArr[0].height
// let imgArr = await this.getHeight('.img-item')
// for(let i=0;i<idx;i++){
// heightTop += imgArr[i].height
// }
// wx.pageScrollTo({
// scrollTop: heightTop,
// duration: 0
// })
// },
getHeight
(
cla
){
return
new
Promise
((
resolve
,
reject
)
=>
{
let
query
=
wx
.
createSelectorQuery
().
in
(
this
)
query
.
selectAll
(
cla
).
boundingClientRect
((
rect
)
=>
{
resolve
(
rect
)
}).
exec
()
})
},
},
changeNav
(
event
)
{
changeNav
(
event
)
{
this
.
setData
({
this
.
setData
({
activeNavIdx
:
event
.
target
.
dataset
.
index
,
activeNavIdx
:
event
.
target
.
dataset
.
index
,
});
});
},
},
scrolltoupper
(
event
)
{
//
scrolltoupper(event) {
console
.
log
(
event
.
detail
.
scrollHeight
,
event
.
detail
.
scrollTop
)
//
console.log(event.detail.scrollHeight,event.detail.scrollTop)
const
idx
=
this
.
data
.
heightArr
.
findIndex
(
//
const idx = this.data.heightArr.findIndex(
(
item
)
=>
item
>
event
.
detail
.
scrollHeight
//
(item) => item > event.detail.scrollHeight
);
//
);
console
.
log
(
'idx'
,
idx
)
//
console.log('idx',idx)
this
.
setData
({
//
this.setData({
curTabIdx
:
idx
,
//
curTabIdx: idx,
});
//
});
// console.log(this.data.curTabIdx1)
//
// console.log(this.data.curTabIdx1)
},
//
},
getImgHeight
()
{
getImgHeight
()
{
let
query
=
wx
.
createSelectorQuery
().
in
(
this
);
let
query
=
wx
.
createSelectorQuery
().
in
(
this
);
let
heightArr
=
[];
let
heightArr
=
[];
let
imgTopArr
=
[]
let
s
=
0
;
let
s
=
0
;
let
top
let
_this
=
this
query
query
.
selectAll
(
".img-item"
)
.
selectAll
(
".img-item"
)
.
boundingClientRect
((
react
)
=>
{
.
boundingClientRect
((
react
)
=>
{
react
.
forEach
((
item
)
=>
{
react
.
forEach
((
item
,
index
)
=>
{
s
+=
item
.
height
;
console
.
log
(
'item: '
,
item
);
heightArr
.
push
(
s
);
// if(index == 0){
// console.log('item top: ', item);
// top = item.top
// }
// s = s +item.height;
s
=
item
.
top
// heightArr.push(s);
imgTopArr
.
push
(
s
)
});
});
this
.
data
.
heightArr
=
heightArr
;
// console.log(heightArr[heightArr.length-1])
// heightArr = heightArr.map((item)=>{
this
.
data
.
allHeight
=
heightArr
[
heightArr
.
length
-
1
];
// item += top
// return item
// })
// this.data.heightArr = heightArr;
// // console.log(heightArr[heightArr.length-1])
// this.data.allHeight = heightArr[heightArr.length - 1];
// console.log('imgTopArr',imgTopArr)
_this
.
setData
({
imgTopArr
})
})
})
.
exec
();
.
exec
();
// let query = wx.createSelectorQuery().in(this);
// let heightArr = [];
// let s = 0;
// query
// .selectAll(".img-item")
// .boundingClientRect((react) => {
// react.forEach((item) => {
// // s += item.height;
// heightArr.push(item.top);
// });
// this.data.heightArr = heightArr;
// // console.log(heightArr[heightArr.length-1])
// this.data.allHeight = heightArr[heightArr.length - 1];
// })
// .exec();
},
},
// 获取用户信息
// 获取用户信息
getUserInfo
({
detail
})
{
getUserInfo
({
detail
})
{
...
...
pages/tab/index/components/product/product.scss
View file @
96b7f10
...
@@ -348,9 +348,12 @@
...
@@ -348,9 +348,12 @@
.video-list
{
.video-list
{
display
:
flex
;
display
:
flex
;
flex-wrap
:
wrap
;
flex-wrap
:
wrap
;
padding
:
0
32rpx
;
padding
:
0
rpx
32rpx
;
font-size
:
0
;
font-size
:
0
;
}
}
.check-prod
.video-list
{
padding-bottom
:
140rpx
;
}
.video-item
{
.video-item
{
position
:
relative
;
position
:
relative
;
width
:
calc
(
50%
-
12rpx
);
width
:
calc
(
50%
-
12rpx
);
...
...
pages/tab/index/components/product/product.wxml
View file @
96b7f10
<!-- pages/tab/discovery/components/product/product.wxml -->
<!-- pages/tab/discovery/components/product/product.wxml -->
<view class="prod-wrap">
<view class="prod-wrap"
>
<view class="big-title">特色产品</view>
<view class="big-title">特色产品</view>
<scroll-view class="nav-wrap" scroll-x="{{true}}" wx:if="{{!isShare && origin =='home'}}">
<scroll-view class="nav-wrap" scroll-x="{{true}}" wx:if="{{!isShare && origin =='home'}}">
<block wx:for="{{navList}}" wx:key="index">
<block wx:for="{{navList}}" wx:key="index">
...
@@ -28,7 +28,7 @@
...
@@ -28,7 +28,7 @@
</view>
</view>
</view>
</view>
</view>
</view>
<view class="project-wrap">
<view class="project-wrap
{{currentUrl == ''? '':'check-prod'}}
">
<!-- -->
<!-- -->
<view class="stickyTab" style="top:{{isShare ? stickyTop+88 : stickyTop}}rpx">
<view class="stickyTab" style="top:{{isShare ? stickyTop+88 : stickyTop}}rpx">
<tab
<tab
...
@@ -40,12 +40,11 @@
...
@@ -40,12 +40,11 @@
productHeight
productHeight
/>
/>
</view>
</view>
<!-- style="{height:{{allHeight}}px}" -->
<!-- style="{height:{{allHeight}}px}" scroll-y="{{true}}" bindscroll="scrolltoupper"-->
<scroll-view
<scroll-view
class="project-img"
class="project-img"
scroll-into-view="{{intoViewId}}"
scroll-into-view="{{intoViewId}}"
bindscroll="scrolltoupper"
scroll-y="{{true}}"
>
>
<block wx:for="{{tab}}" wx:key="index">
<block wx:for="{{tab}}" wx:key="index">
<!-- wx:if="{{showVideo && index==5 && tab.length < 5}}" -->
<!-- wx:if="{{showVideo && index==5 && tab.length < 5}}" -->
...
...
pages/tab/index/constant/data.js
View file @
96b7f10
...
@@ -247,7 +247,7 @@ var senceData = [
...
@@ -247,7 +247,7 @@ var senceData = [
"sceneCode"
:
"SC001"
,
"sceneCode"
:
"SC001"
,
productList
:
[
productList
:
[
{
{
img
:
'product-img
1
'
,
img
:
'product-img
9
'
,
proName
:
'新能源0元换购'
,
proName
:
'新能源0元换购'
,
price
:
'100'
,
price
:
'100'
,
// profit: '92.4万',
// profit: '92.4万',
...
...
pages/tab/index/index.js
View file @
96b7f10
const
navStyle
=
'background-color: transparent;'
const
navStyle
=
'background-color: transparent;'
import
{
IMG_URL
}
from
'~/utils/constantData.js'
import
{
IMG_URL
}
from
'~/utils/constantData.js'
import
{
senceData
}
from
'./constant/data'
import
{
senceData
}
from
'./constant/data'
const
IMAGES
=
Object
.
freeze
({
arrow
:
`
${
IMG_URL
}
/index/point.png`
,
actArrow
:
`
${
IMG_URL
}
/index/actArrow.png`
})
// `${IMG_URL}index/car2.png`,
// `${IMG_URL}index/car2.png`,
//本地图片路径
//本地图片路径
let
IMG_URLLocal
=
'../../../images/'
let
IMG_URLLocal
=
'../../../images/'
...
@@ -13,6 +16,7 @@ Page({
...
@@ -13,6 +16,7 @@ Page({
* 页面的初始数据
* 页面的初始数据
*/
*/
data
:
{
data
:
{
IMAGES
,
navStyle
,
navStyle
,
IMG_URL
,
IMG_URL
,
IMG_URLLocal
,
IMG_URLLocal
,
...
@@ -307,17 +311,17 @@ Page({
...
@@ -307,17 +311,17 @@ Page({
visible
:
false
visible
:
false
})
})
// this.showCase();
// this.showCase();
if
(
!
this
.
data
.
isFirst
)
{
//
if (!this.data.isFirst) {
wx
.
showToast
({
wx
.
showToast
({
title
:
'测算结果已在页面内同步展示'
,
title
:
'测算结果已在页面内同步展示'
,
icon
:
'none'
,
icon
:
'none'
,
duration
:
2000
duration
:
2000
})
})
}
else
{
//
} else {
this
.
setData
({
//
this.setData({
isFirst
:
false
//
isFirst: false
})
//
})
}
//
}
},
},
// // 获取场景下的产品类型
// // 获取场景下的产品类型
// getProductType(sceneIndex, tabIndex) {
// getProductType(sceneIndex, tabIndex) {
...
@@ -631,7 +635,18 @@ Page({
...
@@ -631,7 +635,18 @@ Page({
// console.log('this.data.tabBarStyle',this.data.tabBarStyle,this.data.headerHeight)
// console.log('this.data.tabBarStyle',this.data.tabBarStyle,this.data.headerHeight)
// })
// })
},
},
onPageScroll
:
(
function
()
{
let
timer
=
null
;
return
function
(
e
)
{
// console.log("在滚动");
// 监听页面的滚动开始和结束
clearTimeout
(
timer
);
timer
=
setTimeout
(()
=>
{
// console.log("滚动结束");
wx
.
$eventbus
.
emit
(
'evt_page_scroll'
,{
scrollTop
:
e
.
scrollTop
})
},
500
);
};
})(),
/**
/**
* 生命周期函数--监听页面隐藏
* 生命周期函数--监听页面隐藏
*/
*/
...
...
pages/tab/index/index.scss
View file @
96b7f10
...
@@ -386,18 +386,18 @@ page {
...
@@ -386,18 +386,18 @@ page {
position
:
fixed
;
position
:
fixed
;
right
:
-4px
;
right
:
-4px
;
top
:
60%
;
top
:
60%
;
width
:
6
0
px
;
width
:
6
4
px
;
height
:
6
0
px
;
height
:
6
4
px
;
border-radius
:
50%
;
border-radius
:
50%
;
z-index
:
2
;
z-index
:
2
;
}
}
.output-value
{
.output-value
{
position
:
fixed
;
position
:
fixed
;
right
:
5
px
;
right
:
-2
px
;
top
:
70%
;
top
:
70%
;
width
:
40
px
;
width
:
64
px
;
height
:
50
px
;
height
:
64
px
;
// border-radius: 50%;
// border-radius: 50%;
z-index
:
2
;
z-index
:
2
;
}
}
...
...
pages/tab/index/index.wxml
View file @
96b7f10
This diff is collapsed.
Click to expand it.
utils/network.js
View file @
96b7f10
...
@@ -21,9 +21,25 @@ class NetWork {
...
@@ -21,9 +21,25 @@ class NetWork {
})
})
}
else
{
}
else
{
if
(
this
[
ISCOMMECTED
])
{
if
(
this
[
ISCOMMECTED
])
{
const
thisPage
=
wx
.
$router
.
getPageInstance
(),
options
=
Object
.
keys
(
thisPage
.
options
)
this
[
ISCOMMECTED
]
=
false
this
[
ISCOMMECTED
]
=
false
wx
.
showLoading
()
if
(
thisPage
.
noPageAuth
)
{
this
.
refreshPage
()
wx
.
showLoading
()
this
.
refreshPage
()
}
else
{
let
url
=
`/
${
thisPage
.
route
}
`
if
(
options
.
length
)
{
let
query
=
[]
options
.
map
(
key
=>
{
query
.
push
(
`
${
key
}
=
${
thisPage
.
options
[
key
]}
`
)
})
url
+=
`?
${
query
.
join
(
'&'
)}
`
}
wx
.
$router
.
redirectTo
(
'login.loading'
,
{
url
})
}
}
}
}
}
})
})
...
...
utils/share.js
View file @
96b7f10
...
@@ -115,7 +115,7 @@ class Share {
...
@@ -115,7 +115,7 @@ class Share {
WXUSERINFO
,
WXUSERINFO
,
USERINFO
USERINFO
}
=
this
.
getCommonData
(),
}
=
this
.
getCommonData
(),
thisPage
=
wx
.
$router
.
getPageInstance
()
thisPage
=
wx
.
$router
.
getPageInstance
()
.
options
query
=
`
${
query
?
`?
${
query
}
&`
:
'?'
}
merchantId=
${
thisPage
.
merchantId
||
USERINFO
.
merchantId
||
''
}
&shareOpenId=
${
thisPage
.
shareOpenId
||
WXUSERINFO
.
openId
||
''
}
&sharePhone=
${
thisPage
.
sharePhone
||
USERINFO
.
phone
||
''
}
`
query
=
`
${
query
?
`?
${
query
}
&`
:
'?'
}
merchantId=
${
thisPage
.
merchantId
||
USERINFO
.
merchantId
||
''
}
&shareOpenId=
${
thisPage
.
shareOpenId
||
WXUSERINFO
.
openId
||
''
}
&sharePhone=
${
thisPage
.
sharePhone
||
USERINFO
.
phone
||
''
}
`
return
query
return
query
}
}
...
...
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