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 030cbc5e
authored
Oct 24, 2022
by
zhangquan
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
提交下载
1 parent
c3e2ffb0
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
67 additions
and
48 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 @
030cbc5
...
@@ -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 @
030cbc5
...
@@ -75,12 +75,12 @@ Page({
...
@@ -75,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
...
@@ -93,36 +93,41 @@ Page({
...
@@ -93,36 +93,41 @@ 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
=>
{
let
qrcode
=
response
?.
data
if
(
response
?.
data
){
this
.
setData
({
let
qrcode
=
response
?.
data
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
=>
{
this
.
setData
({
this
.
setData
({
posterUrl
:
resp
.
path
,
imgH
:
(
imgH
/
imgW
)
*
450
});
})
wx
.
hideLoading
()
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
(
'接口异常'
)
}
})
})
}
}
})
})
...
...
pages/checkProduct/checkProduct.scss
View file @
030cbc5
...
@@ -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 @
030cbc5
...
@@ -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 @
030cbc5
...
@@ -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 @
030cbc5
...
@@ -301,6 +301,15 @@
...
@@ -301,6 +301,15 @@
.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%
;
...
...
pages/tab/discovery/components/product/product.wxml
View file @
030cbc5
...
@@ -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 @
030cbc5
...
@@ -30,22 +30,19 @@ page{
...
@@ -30,22 +30,19 @@ page{
width
:
64px
;
width
:
64px
;
height
:
64px
;
height
:
64px
;
border-radius
:
50%
;
border-radius
:
50%
;
z-index
:
1
;
z-index
:
3
;
right
:
15rpx
;
right
:
15rpx
;
}
}
.chat
{
.chat
{
top
:
650rpx
;
top
:
750rpx
;
width
:
80px
;
height
:
80px
;
right
:
0
;
}
}
/* 测算 */
/* 测算 */
.calculate
{
.calculate
{
position
:
fixed
;
position
:
fixed
;
right
:
0
;
right
:
0
;
top
:
1100rpx
;
top
:
1050rpx
;
z-index
:
3
;
}
}
.icon-calculate
{
.icon-calculate
{
...
@@ -62,7 +59,7 @@ page{
...
@@ -62,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 @
030cbc5
...
@@ -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