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
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
55 additions
and
36 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({
...
@@ -40,11 +40,11 @@ Page({
errMsg
errMsg
})
{
})
{
console
.
error
(
errMsg
)
console
.
error
(
errMsg
)
this
.
reLogin
()
this
.
reLogin
(
errMsg
)
}
}
},
},
/**获取loginToken */
/**获取loginToken */
reLogin
(
message
)
{
reLogin
(
message
=
''
)
{
wx
.
showModal
({
wx
.
showModal
({
content
:
message
||
'获取loginToken失败'
,
content
:
message
||
'获取loginToken失败'
,
confirmText
:
'重试'
,
confirmText
:
'重试'
,
...
@@ -86,7 +86,7 @@ Page({
...
@@ -86,7 +86,7 @@ Page({
if
(
res
.
code
==
'0'
){
if
(
res
.
code
==
'0'
){
this
.
toLogin
(
detail
)
this
.
toLogin
(
detail
)
}
else
{
}
else
{
wx
.
$api
.
showToast
(
message
||
'系统异常'
)
wx
.
$api
.
showToast
(
res
.
message
||
'系统异常'
)
}
}
})
})
},
},
...
@@ -131,7 +131,9 @@ Page({
...
@@ -131,7 +131,9 @@ Page({
*/
*/
onLoad
(
options
)
{
onLoad
(
options
)
{
let
data
=
JSON
.
parse
(
decodeURIComponent
(
options
.
data
))
let
data
=
JSON
.
parse
(
decodeURIComponent
(
options
.
data
))
console
.
log
(
data
)
let
{
staffName
,
fileUrl
,
merchantId
,
type
}
=
data
let
{
staffName
,
fileUrl
,
merchantId
,
type
}
=
data
// staffName = 'fishing'
let
linkParams
=
{
let
linkParams
=
{
staffName
,
staffName
,
merchantId
,
merchantId
,
...
...
pages/checkProduct/checkProduct.js
View file @
f03d6ae
...
@@ -57,6 +57,12 @@ Page({
...
@@ -57,6 +57,12 @@ Page({
},
},
setRouteParams
(
obj
){
setRouteParams
(
obj
){
const
{
actNum
,
activeNavIdx
,
fromLocal
}
=
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
({
this
.
setData
({
actNum
,
actNum
,
activeNavIdx
,
activeNavIdx
,
...
@@ -69,12 +75,12 @@ Page({
...
@@ -69,12 +75,12 @@ Page({
let
{
actNum
,
activeNavIdx
}
=
this
.
data
;
let
{
actNum
,
activeNavIdx
}
=
this
.
data
;
let
img
=
`
${
IMGURL
}
scene/longpic
${
actNum
+
1
}
.png`
let
img
=
`
${
IMGURL
}
scene/longpic
${
actNum
+
1
}
.png`
wx
.
showLoading
({
wx
.
showLoading
({
title
:
'
图片加载中
'
,
title
:
'
海报生成中...
'
,
})
})
wx
.
getImageInfo
({
wx
.
getImageInfo
({
src
:
img
,
src
:
img
,
success
:(
res
)
=>
{
success
:(
res
)
=>
{
let
imgW
=
res
.
width
/
5
,
imgH
=
res
.
height
/
5
;
let
imgW
=
res
.
width
/
4
,
imgH
=
res
.
height
/
4
;
let
drawFun
=
new
Draw
({
let
drawFun
=
new
Draw
({
width
:
imgW
,
width
:
imgW
,
height
:
imgH
height
:
imgH
...
@@ -87,12 +93,14 @@ Page({
...
@@ -87,12 +93,14 @@ Page({
scene
:
`actNum=
${
actNum
}
&activeNavIdx=
${
activeNavIdx
}
`
,
scene
:
`actNum=
${
actNum
}
&activeNavIdx=
${
activeNavIdx
}
`
,
path
:
'pages/checkProduct/checkProduct'
path
:
'pages/checkProduct/checkProduct'
}
}
let
qrcodeH
=
actNum
==
3
?
68
:
100
commonApi
.
createQrcode
(
params
).
then
(
response
=>
{
commonApi
.
createQrcode
(
params
).
then
(
response
=>
{
if
(
response
?.
data
){
let
qrcode
=
response
?.
data
let
qrcode
=
response
?.
data
this
.
setData
({
this
.
setData
({
imgH
:
(
imgH
/
imgW
)
*
450
imgH
:
(
imgH
/
imgW
)
*
450
})
})
let
arr
=
[
456
,
222
,
0
,
496
]
let
arr
=
[
0
,
0
,
0
,
0
]
let
imgList
=
[
let
imgList
=
[
{
{
x
:
0
,
x
:
0
,
...
@@ -102,10 +110,10 @@ Page({
...
@@ -102,10 +110,10 @@ Page({
url
:
img
,
url
:
img
,
},
},
{
{
x
:
imgW
-
64
,
x
:
imgW
-
qrcodeH
,
y
:
imgH
-
arr
[
actNum
]
-
64
,
y
:
imgH
-
arr
[
actNum
]
-
qrcodeH
,
width
:
64
,
width
:
qrcodeH
,
height
:
64
,
height
:
qrcodeH
,
url
:
qrcode
,
//二维码
url
:
qrcode
,
//二维码
},
},
];
];
...
@@ -117,6 +125,9 @@ Page({
...
@@ -117,6 +125,9 @@ Page({
});
});
wx
.
hideLoading
()
wx
.
hideLoading
()
})
})
}
else
{
wx
.
$api
.
showToast
(
'接口异常'
)
}
})
})
}
}
})
})
...
@@ -177,12 +188,6 @@ Page({
...
@@ -177,12 +188,6 @@ Page({
wx
.
nextTick
(()
=>
{
wx
.
nextTick
(()
=>
{
let
{
actNum
,
activeNavIdx
,
scene
}
=
this
.
options
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('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
){
if
(
scene
){
let
qrcodeQuery
=
decodeURIComponent
(
scene
)
let
qrcodeQuery
=
decodeURIComponent
(
scene
)
let
id
=
qrcodeQuery
.
split
(
'='
).
pop
()
let
id
=
qrcodeQuery
.
split
(
'='
).
pop
()
...
...
pages/checkProduct/checkProduct.scss
View file @
f03d6ae
...
@@ -9,7 +9,7 @@ page{
...
@@ -9,7 +9,7 @@ page{
bottom
:
0
;
bottom
:
0
;
right
:
0
;
right
:
0
;
background
:
rgba
(
0
,
0
,
0
,
0
.5
);
background
:
rgba
(
0
,
0
,
0
,
0
.5
);
z-index
:
1
;
z-index
:
2
;
.img-wrap
{
.img-wrap
{
position
:
absolute
;
position
:
absolute
;
top
:
20%
;
top
:
20%
;
...
...
pages/checkProduct/checkProduct.wxml
View file @
f03d6ae
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
<!-- 分享弹框 -->
<!-- 分享弹框 -->
<view class="share-wrap" wx:if="{{isShow && fromLocal==1}}">
<view class="share-wrap" wx:if="{{isShow && fromLocal==1}}">
<view class="img-wrap" wx:if="{{posterUrl}}">
<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">
<!-- <block wx:for="{{imgList}}" wx:key="*this">
<image class="img" src="{{item}}"/>
<image class="img" src="{{item}}"/>
</block> -->
</block> -->
...
...
pages/tab/discovery/components/product/product.js
View file @
f03d6ae
...
@@ -86,15 +86,20 @@ Component({
...
@@ -86,15 +86,20 @@ Component({
curTabIdx
:
idx
curTabIdx
:
idx
})
})
},
},
download
()
{
downVideo
(
e
)
{
let
{
url
}
=
e
.
target
.
dataset
console
.
log
(
url
)
wx
.
$api
.
showToast
(
'正在下载视频...'
)
wx
.
downloadFile
({
wx
.
downloadFile
({
url
:
'https://img02.glsx.com.cn/weapp/resource/miniprogram/ai-card/video/digital_card_30s.mp4'
,
url
:
url
,
success
(
res
)
{
success
(
res
)
{
console
.
log
(
res
,
111
)
if
(
res
.
statusCode
===
200
)
{
if
(
res
.
statusCode
===
200
)
{
wx
.
saveVideoToPhotosAlbum
({
wx
.
saveVideoToPhotosAlbum
({
filePath
:
res
.
tempFilePath
,
filePath
:
res
.
tempFilePath
,
success
(
res
)
{
success
(
res
)
{
wx
.
$api
.
showToast
(
'
保存
成功!'
)
wx
.
$api
.
showToast
(
'
下载
成功!'
)
}
}
})
})
}
}
...
...
pages/tab/discovery/components/product/product.scss
View file @
f03d6ae
...
@@ -153,7 +153,6 @@
...
@@ -153,7 +153,6 @@
}
}
.project-img
{
.project-img
{
height
:
1200rpx
;
white-space
:
nowrap
;
white-space
:
nowrap
;
.img-item
{
.img-item
{
...
@@ -302,11 +301,19 @@
...
@@ -302,11 +301,19 @@
.video-item
{
.video-item
{
width
:
calc
(
50%
-
12rpx
);
width
:
calc
(
50%
-
12rpx
);
margin-bottom
:
32rpx
;
margin-bottom
:
32rpx
;
position
:
relative
;
}
.download
{
position
:
absolute
;
top
:
8rpx
;
right
:
8rpx
;
z-index
:
1
;
width
:
50rpx
;
height
:
50rpx
;
}
}
.video-item
video
{
.video-item
video
{
width
:
100%
;
width
:
100%
;
height
:
588rpx
;
height
:
590rpx
;
border
:
1rpx
dashed
#AFB0B2
;
}
}
.video-item
:nth-child
(
even
)
{
.video-item
:nth-child
(
even
)
{
margin-left
:
22rpx
;
margin-left
:
22rpx
;
...
...
pages/tab/discovery/components/product/product.wxml
View file @
f03d6ae
...
@@ -16,7 +16,7 @@
...
@@ -16,7 +16,7 @@
<text class="title">{{senceData[actNum].productList[activeNavIdx].proName}}</text>
<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 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>
<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>
</text>
</view>
</view>
...
@@ -28,7 +28,7 @@
...
@@ -28,7 +28,7 @@
</view>
</view>
</view>
</view>
<view class="project-wrap">
<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>
<tab openScroll="{{true}}" tab="{{tab}}" index="{{curTabIdx}}" bindclick="changeTab"></tab>
</view>
</view>
<scroll-view class="project-img" scroll-into-view="{{intoViewId}}" bindscroll="scrolltoupper" scroll-y="{{true}}">
<scroll-view class="project-img" scroll-into-view="{{intoViewId}}" bindscroll="scrolltoupper" scroll-y="{{true}}">
...
@@ -39,6 +39,7 @@
...
@@ -39,6 +39,7 @@
<view class="video-list">
<view class="video-list">
<block wx:for="{{senceData[actNum].videoList}}" wx:key="i">
<block wx:for="{{senceData[actNum].videoList}}" wx:key="i">
<view class="video-item">
<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>
<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 class="video-text">{{item.name}}</view>
</view>
</view>
...
...
pages/tab/discovery/discovery.scss
View file @
f03d6ae
...
@@ -27,23 +27,22 @@ page{
...
@@ -27,23 +27,22 @@ page{
position
:
fixed
;
position
:
fixed
;
right
:
0
;
right
:
0
;
top
:
900rpx
;
top
:
900rpx
;
width
:
80px
;
height
:
80px
;
border-radius
:
50%
;
z-index
:
1
;
}
.applyAct
{
top
:
750rpx
;
width
:
64px
;
width
:
64px
;
height
:
64px
;
height
:
64px
;
border-radius
:
50%
;
z-index
:
3
;
right
:
15rpx
;
right
:
15rpx
;
}
}
.chat
{
top
:
750rpx
;
}
/* 测算 */
/* 测算 */
.calculate
{
.calculate
{
position
:
fixed
;
position
:
fixed
;
right
:
0
;
right
:
0
;
top
:
1100rpx
;
top
:
1050rpx
;
z-index
:
3
;
}
}
.icon-calculate
{
.icon-calculate
{
...
@@ -60,7 +59,7 @@ page{
...
@@ -60,7 +59,7 @@ page{
right
:
0
;
right
:
0
;
bottom
:
0
;
bottom
:
0
;
background-color
:
rgba
(
45
,
45
,
51
,
0
.50
);
background-color
:
rgba
(
45
,
45
,
51
,
0
.50
);
z-index
:
1
;
z-index
:
4
;
.dialog-box
{
.dialog-box
{
position
:
fixed
;
position
:
fixed
;
bottom
:
0
;
bottom
:
0
;
...
...
pages/tab/discovery/discovery.wxml
View file @
f03d6ae
...
@@ -66,6 +66,6 @@
...
@@ -66,6 +66,6 @@
</view>
</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