Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas_plus
/
store-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 f03d6aea
authored
Oct 24, 2022
by
前端
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'zq_dev_3.0' into 'v3.0'
Zq dev 3.0 See merge request
!62
2 parents
c900419c
030cbc5e
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
79 additions
and
60 deletions
pages/authentication/register/register.js
pages/checkProduct/checkProduct.js
pages/checkProduct/checkProduct.scss
pages/checkProduct/checkProduct.wxml
pages/tab/discovery/components/product/product.js
pages/tab/discovery/components/product/product.scss
pages/tab/discovery/components/product/product.wxml
pages/tab/discovery/discovery.scss
pages/tab/discovery/discovery.wxml
pages/authentication/register/register.js
View file @
f03d6ae
...
...
@@ -40,11 +40,11 @@ Page({
errMsg
})
{
console
.
error
(
errMsg
)
this
.
reLogin
()
this
.
reLogin
(
errMsg
)
}
},
/**获取loginToken */
reLogin
(
message
)
{
reLogin
(
message
=
''
)
{
wx
.
showModal
({
content
:
message
||
'获取loginToken失败'
,
confirmText
:
'重试'
,
...
...
@@ -86,7 +86,7 @@ Page({
if
(
res
.
code
==
'0'
){
this
.
toLogin
(
detail
)
}
else
{
wx
.
$api
.
showToast
(
message
||
'系统异常'
)
wx
.
$api
.
showToast
(
res
.
message
||
'系统异常'
)
}
})
},
...
...
@@ -131,7 +131,9 @@ Page({
*/
onLoad
(
options
)
{
let
data
=
JSON
.
parse
(
decodeURIComponent
(
options
.
data
))
console
.
log
(
data
)
let
{
staffName
,
fileUrl
,
merchantId
,
type
}
=
data
// staffName = 'fishing'
let
linkParams
=
{
staffName
,
merchantId
,
...
...
pages/checkProduct/checkProduct.js
View file @
f03d6ae
...
...
@@ -57,6 +57,12 @@ Page({
},
setRouteParams
(
obj
){
const
{
actNum
,
activeNavIdx
,
fromLocal
}
=
obj
let
name
=
wx
.
$storage
.
get
(
'userInfo'
)
?
wx
.
$storage
.
get
(
'userInfo'
).
name
:
''
this
.
shareTitle
=
`
${
name
}
给你分享一个
${
senceData
[
actNum
].
productList
[
activeNavIdx
].
proName
}
~`
this
.
shareQuery
=
`actNum=
${
actNum
}
&activeNavIdx=
${
activeNavIdx
}
`
wx
.
setNavigationBarTitle
({
title
:
senceData
[
actNum
].
name
||
'特色产品'
})
this
.
setData
({
actNum
,
activeNavIdx
,
...
...
@@ -69,12 +75,12 @@ Page({
let
{
actNum
,
activeNavIdx
}
=
this
.
data
;
let
img
=
`
${
IMGURL
}
scene/longpic
${
actNum
+
1
}
.png`
wx
.
showLoading
({
title
:
'
图片加载中
'
,
title
:
'
海报生成中...
'
,
})
wx
.
getImageInfo
({
src
:
img
,
success
:(
res
)
=>
{
let
imgW
=
res
.
width
/
5
,
imgH
=
res
.
height
/
5
;
let
imgW
=
res
.
width
/
4
,
imgH
=
res
.
height
/
4
;
let
drawFun
=
new
Draw
({
width
:
imgW
,
height
:
imgH
...
...
@@ -87,36 +93,41 @@ Page({
scene
:
`actNum=
${
actNum
}
&activeNavIdx=
${
activeNavIdx
}
`
,
path
:
'pages/checkProduct/checkProduct'
}
let
qrcodeH
=
actNum
==
3
?
68
:
100
commonApi
.
createQrcode
(
params
).
then
(
response
=>
{
let
qrcode
=
response
?.
data
this
.
setData
({
imgH
:
(
imgH
/
imgW
)
*
450
})
let
arr
=
[
456
,
222
,
0
,
496
]
let
imgList
=
[
{
x
:
0
,
y
:
0
,
width
:
imgW
,
height
:
imgH
,
url
:
img
,
},
{
x
:
imgW
-
64
,
y
:
imgH
-
arr
[
actNum
]
-
64
,
width
:
64
,
height
:
64
,
url
:
qrcode
,
//二维码
},
];
drawFun
.
begin
({
imageList
:
imgList
,
}).
then
(
resp
=>
{
if
(
response
?.
data
){
let
qrcode
=
response
?.
data
this
.
setData
({
posterUrl
:
resp
.
path
,
});
wx
.
hideLoading
()
})
imgH
:
(
imgH
/
imgW
)
*
450
})
let
arr
=
[
0
,
0
,
0
,
0
]
let
imgList
=
[
{
x
:
0
,
y
:
0
,
width
:
imgW
,
height
:
imgH
,
url
:
img
,
},
{
x
:
imgW
-
qrcodeH
,
y
:
imgH
-
arr
[
actNum
]
-
qrcodeH
,
width
:
qrcodeH
,
height
:
qrcodeH
,
url
:
qrcode
,
//二维码
},
];
drawFun
.
begin
({
imageList
:
imgList
,
}).
then
(
resp
=>
{
this
.
setData
({
posterUrl
:
resp
.
path
,
});
wx
.
hideLoading
()
})
}
else
{
wx
.
$api
.
showToast
(
'接口异常'
)
}
})
}
})
...
...
@@ -177,12 +188,6 @@ Page({
wx
.
nextTick
(()
=>
{
let
{
actNum
,
activeNavIdx
,
scene
}
=
this
.
options
// let name = wx.$storage.get('staff_name') || (wx.$storage.get('userInfo') ? wx.$storage.get('userInfo').name : '')
let
name
=
wx
.
$storage
.
get
(
'userInfo'
)
?
wx
.
$storage
.
get
(
'userInfo'
).
name
:
''
this
.
shareTitle
=
`
${
name
}
给你分享一个
${
senceData
[
actNum
].
productList
[
activeNavIdx
].
proName
}
~`
this
.
shareQuery
=
`actNum=
${
actNum
}
&activeNavIdx=
${
activeNavIdx
}
`
wx
.
setNavigationBarTitle
({
title
:
senceData
[
actNum
].
name
||
'特色产品'
})
if
(
scene
){
let
qrcodeQuery
=
decodeURIComponent
(
scene
)
let
id
=
qrcodeQuery
.
split
(
'='
).
pop
()
...
...
pages/checkProduct/checkProduct.scss
View file @
f03d6ae
...
...
@@ -9,7 +9,7 @@ page{
bottom
:
0
;
right
:
0
;
background
:
rgba
(
0
,
0
,
0
,
0
.5
);
z-index
:
1
;
z-index
:
2
;
.img-wrap
{
position
:
absolute
;
top
:
20%
;
...
...
pages/checkProduct/checkProduct.wxml
View file @
f03d6ae
...
...
@@ -8,7 +8,7 @@
<!-- 分享弹框 -->
<view class="share-wrap" wx:if="{{isShow && fromLocal==1}}">
<view class="img-wrap" wx:if="{{posterUrl}}">
<image class="img" style="height:{{imgH}}rpx" src="{{posterUrl}}"
bindload="onloadFn"
/>
<image class="img" style="height:{{imgH}}rpx" src="{{posterUrl}}" />
<!-- <block wx:for="{{imgList}}" wx:key="*this">
<image class="img" src="{{item}}"/>
</block> -->
...
...
pages/tab/discovery/components/product/product.js
View file @
f03d6ae
...
...
@@ -86,15 +86,20 @@ Component({
curTabIdx
:
idx
})
},
download
()
{
downVideo
(
e
)
{
let
{
url
}
=
e
.
target
.
dataset
console
.
log
(
url
)
wx
.
$api
.
showToast
(
'正在下载视频...'
)
wx
.
downloadFile
({
url
:
'https://img02.glsx.com.cn/weapp/resource/miniprogram/ai-card/video/digital_card_30s.mp4'
,
url
:
url
,
success
(
res
)
{
console
.
log
(
res
,
111
)
if
(
res
.
statusCode
===
200
)
{
wx
.
saveVideoToPhotosAlbum
({
filePath
:
res
.
tempFilePath
,
success
(
res
)
{
wx
.
$api
.
showToast
(
'
保存
成功!'
)
wx
.
$api
.
showToast
(
'
下载
成功!'
)
}
})
}
...
...
pages/tab/discovery/components/product/product.scss
View file @
f03d6ae
...
...
@@ -153,9 +153,8 @@
}
.project-img
{
height
:
1200rpx
;
white-space
:
nowrap
;
.img-item
{
position
:
relative
;
width
:
100%
;
...
...
@@ -302,11 +301,19 @@
.video-item
{
width
:
calc
(
50%
-
12rpx
);
margin-bottom
:
32rpx
;
position
:
relative
;
}
.download
{
position
:
absolute
;
top
:
8rpx
;
right
:
8rpx
;
z-index
:
1
;
width
:
50rpx
;
height
:
50rpx
;
}
.video-item
video
{
width
:
100%
;
height
:
588rpx
;
border
:
1rpx
dashed
#AFB0B2
;
height
:
590rpx
;
}
.video-item
:nth-child
(
even
)
{
margin-left
:
22rpx
;
...
...
pages/tab/discovery/components/product/product.wxml
View file @
f03d6ae
...
...
@@ -16,7 +16,7 @@
<text class="title">{{senceData[actNum].productList[activeNavIdx].proName}}</text>
<text class="sale" decode="{{true}}">{{senceData[actNum]['productList'][activeNavIdx].varType == 1 ? '三年售后存量数':'新车销量'}} <text class="sale-num">{{senceData[actNum]['productList'][activeNavIdx].changeSale || senceData[actNum]['productList'][activeNavIdx].sale}}</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">
<text style="font-size: 24rpx; margin-right: 4rpx;">¥</text>
{{senceData[actNum]['productList'][activeNavIdx].profit}}</text>
</text>
</view>
...
...
@@ -28,7 +28,7 @@
</view>
</view>
<view class="project-wrap">
<view style="position: sticky;top: {{headerHeight}}px ;z-index:
1
;background-color: #F5F7FB;">
<view style="position: sticky;top: {{headerHeight}}px ;z-index:
2
;background-color: #F5F7FB;">
<tab openScroll="{{true}}" tab="{{tab}}" index="{{curTabIdx}}" bindclick="changeTab"></tab>
</view>
<scroll-view class="project-img" scroll-into-view="{{intoViewId}}" bindscroll="scrolltoupper" scroll-y="{{true}}">
...
...
@@ -39,6 +39,7 @@
<view class="video-list">
<block wx:for="{{senceData[actNum].videoList}}" wx:key="i">
<view class="video-item">
<image class="download" mode="widthFix" src="{{IMGURL}}download.png" bindtap="downVideo" data-url="{{videoBaseUrl}}video/{{item.videoUrl}}.mp4?v={{img_version}}"></image>
<video poster="{{videoBaseUrl}}video/{{item.posterUrl}}.png?v={{img_version}}" title="{{item.name}}" src="{{videoBaseUrl}}video/{{item.videoUrl}}.mp4?v={{img_version}}"></video>
<view class="video-text">{{item.name}}</view>
</view>
...
...
pages/tab/discovery/discovery.scss
View file @
f03d6ae
...
...
@@ -27,23 +27,22 @@ page{
position
:
fixed
;
right
:
0
;
top
:
900rpx
;
width
:
80px
;
height
:
80px
;
border-radius
:
50%
;
z-index
:
1
;
}
.applyAct
{
top
:
750rpx
;
width
:
64px
;
height
:
64px
;
border-radius
:
50%
;
z-index
:
3
;
right
:
15rpx
;
}
.chat
{
top
:
750rpx
;
}
/* 测算 */
.calculate
{
position
:
fixed
;
right
:
0
;
top
:
1100rpx
;
top
:
1050rpx
;
z-index
:
3
;
}
.icon-calculate
{
...
...
@@ -60,7 +59,7 @@ page{
right
:
0
;
bottom
:
0
;
background-color
:
rgba
(
45
,
45
,
51
,
0
.50
);
z-index
:
1
;
z-index
:
4
;
.dialog-box
{
position
:
fixed
;
bottom
:
0
;
...
...
pages/tab/discovery/discovery.wxml
View file @
f03d6ae
...
...
@@ -66,6 +66,6 @@
</view>
<!-- 在线客服 -->
<image class="chat" src="{{IMGURL}}customer_service.png" bindtap="goConsult" />
<image
wx:if="{{showPage}}"
class="chat" src="{{IMGURL}}customer_service.png" bindtap="goConsult" />
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