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({
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 @
030cbc5
...
...
@@ -75,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
...
...
@@ -93,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
(
'接口异常'
)
}
})
}
})
...
...
pages/checkProduct/checkProduct.scss
View file @
030cbc5
...
...
@@ -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 @
030cbc5
...
...
@@ -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 @
030cbc5
...
...
@@ -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 @
030cbc5
...
...
@@ -301,6 +301,15 @@
.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%
;
...
...
pages/tab/discovery/components/product/product.wxml
View file @
030cbc5
...
...
@@ -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 @
030cbc5
...
...
@@ -30,22 +30,19 @@ page{
width
:
64px
;
height
:
64px
;
border-radius
:
50%
;
z-index
:
1
;
z-index
:
3
;
right
:
15rpx
;
}
.chat
{
top
:
650rpx
;
width
:
80px
;
height
:
80px
;
right
:
0
;
top
:
750rpx
;
}
/* 测算 */
.calculate
{
position
:
fixed
;
right
:
0
;
top
:
1100rpx
;
top
:
1050rpx
;
z-index
:
3
;
}
.icon-calculate
{
...
...
@@ -62,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 @
030cbc5
...
...
@@ -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