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 3f853f67
authored
Oct 20, 2022
by
杨北旺
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'v3.0' into ybw_dev_3.0
2 parents
96813cfa
eb03e61d
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
290 additions
and
27 deletions
api/activityApi/ActivityApi.js
common.wxss
packageActivity/pages/shareTaskDetail/shareTaskDetail.scss
packageActivity/pages/taskDetail/taskDetail.js
packageActivity/pages/taskDetail/taskDetail.scss
packageActivity/pages/warReport/warReport.scss
pages/checkProduct/checkProduct.js
pages/checkProduct/checkProduct.json
pages/checkProduct/checkProduct.scss
pages/checkProduct/checkProduct.wxml
pages/tab/index/components/activeBox/activeBox.js
pages/tab/index/components/activeBox/activeBox.wxml
pages/tab/index/components/activityDiagnosis/activityDiagnosis.js
pages/tab/index/components/activityDiagnosis/activityDiagnosis.wxml
pages/tab/index/index.js
pages/tab/index/index.json
pages/tab/index/index.scss
pages/tab/index/index.wxml
api/activityApi/ActivityApi.js
View file @
3f853f6
...
@@ -66,6 +66,12 @@ class ActivityApi {
...
@@ -66,6 +66,12 @@ class ActivityApi {
...
data
...
data
})
})
}
}
getActivityVisitorList
(
data
)
{
return
api
.
post
({
method
:
`scrm.api.busassistant.activity.createQrCode`
,
...
data
})
}
}
}
export
default
ActivityApi
export
default
ActivityApi
\ No newline at end of file
\ No newline at end of file
common.wxss
View file @
3f853f6
...
@@ -83,6 +83,22 @@
...
@@ -83,6 +83,22 @@
color: #C1C2C3;
color: #C1C2C3;
}
}
.list-nothing.to-bottom::after{
content: '- 到 底 了 -'
}
.list-loading{
width: 100%;
padding: 8rpx 0 30rpx;
text-align: center;
font-size: 28rpx;
color: #C1C2C3;
}
.list-loading::after{
content: '正在加载中'
}
.list-nothing .icon {
.list-nothing .icon {
width: 320rpx;
width: 320rpx;
height: 320rpx;
height: 320rpx;
...
...
packageActivity/pages/shareTaskDetail/shareTaskDetail.scss
View file @
3f853f6
...
@@ -90,6 +90,7 @@
...
@@ -90,6 +90,7 @@
padding
:
24rpx
32rpx
;
padding
:
24rpx
32rpx
;
margin
:
20rpx
;
margin
:
20rpx
;
height
:
128rpx
;
height
:
128rpx
;
margin-bottom
:
30rpx
;
image
{
image
{
width
:
128rpx
;
width
:
128rpx
;
height
:
128rpx
;
height
:
128rpx
;
...
...
packageActivity/pages/taskDetail/taskDetail.js
View file @
3f853f6
// packageActivity/pages/taskDetail/taskDetail.js
// packageActivity/pages/taskDetail/taskDetail.js
import
index_const
from
"~/pages/tab/index/index_const"
import
index_const
from
"~/pages/tab/index/index_const"
import
ActivityApi
from
'~/api/activityApi/index'
import
ActivityApi
from
'~/api/activityApi/index'
import
{
IMG_URL
}
from
"~/utils/constantData"
Page
({
Page
({
/**
/**
...
@@ -27,13 +26,15 @@ Page({
...
@@ -27,13 +26,15 @@ Page({
userStorage
userStorage
})
})
if
(
Object
.
keys
(
options
).
length
&&
options
.
missionId
)
{
if
(
Object
.
keys
(
options
).
length
&&
options
.
missionId
)
{
console
.
log
(
options
)
id
=
options
.
missionId
id
=
options
.
missionId
this
.
getActiveTaskDetail
(
id
)
this
.
getActiveTaskDetail
(
id
)
}
else
{
wx
.
$router
.
getData
(
e
=>
{
id
=
e
.
missionId
this
.
getActiveTaskDetail
(
id
)
})
}
}
wx
.
$router
.
getData
(
missionId
=>
{
id
=
missionId
this
.
getActiveTaskDetail
(
id
)
})
this
.
sharePath
=
`packageActivity/pages/shareTaskDetail/shareTaskDetail?missionId=
${
id
}
`
this
.
sharePath
=
`packageActivity/pages/shareTaskDetail/shareTaskDetail?missionId=
${
id
}
`
},
},
...
@@ -61,7 +62,7 @@ Page({
...
@@ -61,7 +62,7 @@ Page({
detailInfo
:
res
,
detailInfo
:
res
,
materialTypeArr
:
typeArr
materialTypeArr
:
typeArr
})
})
this
.
shareImage
=
res
.
imgUrlList
[
0
]
?
res
.
imgUrlList
[
0
].
url
:
`
${
IMGURL
}
share_task_default_img.png`
this
.
shareImage
=
res
.
imgUrlList
[
0
]
?
res
.
imgUrlList
[
0
].
url
:
`
${
this
.
data
.
IMGURL
}
share_task_default_img.png`
this
.
shareTitle
=
res
.
activityName
||
'门店助手'
this
.
shareTitle
=
res
.
activityName
||
'门店助手'
})
})
},
},
...
@@ -211,8 +212,8 @@ Page({
...
@@ -211,8 +212,8 @@ Page({
/**
/**
* 生命周期函数--监听页面显示
* 生命周期函数--监听页面显示
*/
*/
onShow
()
{
onShow
(
options
)
{
console
.
log
(
options
)
},
},
/**
/**
...
...
packageActivity/pages/taskDetail/taskDetail.scss
View file @
3f853f6
...
@@ -21,6 +21,7 @@
...
@@ -21,6 +21,7 @@
border-radius
:
12px
;
border-radius
:
12px
;
padding
:
24rpx
32rpx
;
padding
:
24rpx
32rpx
;
height
:
128rpx
;
height
:
128rpx
;
margin-bottom
:
30rpx
;
image
{
image
{
width
:
128rpx
;
width
:
128rpx
;
height
:
128rpx
;
height
:
128rpx
;
...
...
packageActivity/pages/warReport/warReport.scss
View file @
3f853f6
...
@@ -5,7 +5,6 @@
...
@@ -5,7 +5,6 @@
display
:
flex
;
display
:
flex
;
flex-flow
:
column
;
flex-flow
:
column
;
background
:
#fff
;
background
:
#fff
;
justify-content
:
center
;
align-items
:
center
;
align-items
:
center
;
.time-box
{
.time-box
{
width
:
100%
;
width
:
100%
;
...
...
pages/checkProduct/checkProduct.js
View file @
3f853f6
// pages/checkProduct/checkProduct.js
// const navStyle = "background-color: transparent;";
import
{
IMG_URL
}
from
"~/utils/constantData.js"
;
const
navStyle
=
"background-color: #fff"
;
const
navStyle
=
"background-color: #fff"
;
import
{
senceData
}
from
"~/pages/tab/discovery/constant/data"
;
import
{
senceData
}
from
"~/pages/tab/discovery/constant/data"
;
import
Draw
from
"~/utils/Draw.js"
;
import
{
IMG_URL
}
from
"~/utils/constantData.js"
;
import
ActivityApi
from
'~/api/activityApi/index'
const
IMGURL
=
IMG_URL
Page
({
Page
({
/**
/**
* 页面的初始数据
* 页面的初始数据
...
@@ -12,8 +12,44 @@ Page({
...
@@ -12,8 +12,44 @@ Page({
navStyle
,
navStyle
,
headerHeight
:
0
,
headerHeight
:
0
,
senceData
,
senceData
,
actNum
:
3
,
// 模态框
// 模态框
isShow
:
true
,
isShow
:
true
,
btnList
:
[
{
src
:
`
${
IMGURL
}
wechat.png`
,
name
:
"微信转发"
,
},
{
src
:
`
${
IMGURL
}
down.png`
,
name
:
"下载为海报"
,
},
],
imgHeightArr
:
[
[
1110
,
1290
,
596
,
744
,
490
,
1532
],
[
2168
,
1290
,
596
,
830
,
490
,
752
],
[
1110
,
1290
,
596
,
984
,
490
],
[
678
,
1266
,
1398
,
830
,
490
,
1666
],
],
posterUrl
:
""
,
//海报url
},
observers
:
{
actNum
:
function
(
actNum
)
{
let
imgList
=
[
`
${
IMGURL
}
index/scene
${
actNum
+
1
}
1.png`
,
`
${
IMGURL
}
index/scene
${
actNum
+
1
}
2.png`
,
`
${
IMGURL
}
index/scene
${
actNum
+
1
}
3.png`
,
`
${
IMGURL
}
index/scene
${
actNum
+
1
}
4.png`
,
`
${
IMGURL
}
index/scene
${
actNum
+
1
}
5.png`
,
];
if
(
actNum
!=
2
)
{
imgList
.
push
(
`
${
IMGURL
}
index/scene
${
actNum
+
1
}
6.png`
);
}
this
.
setData
({
imgList
,
});
},
},
},
navbarReady
(
e
)
{
navbarReady
(
e
)
{
let
{
let
{
...
@@ -32,15 +68,52 @@ Page({
...
@@ -32,15 +68,52 @@ Page({
navStyle
:
scrollTop
==
0
?
navStyle
:
`background-color:
${
color
}
;`
navStyle
:
scrollTop
==
0
?
navStyle
:
`background-color:
${
color
}
;`
})
})
},
},
modelcloseFn
(
e
)
{
// 分享按钮
sharehandle
()
{
this
.
setData
({
this
.
setData
({
isShow
:
e
.
detail
,
isShow
:
true
,
});
});
},
},
// 分享按钮
// 分享按钮
sharehandle
()
{
handleClick
(
e
)
{
let
{
index
}
=
e
.
currentTarget
.
dataset
;
switch
(
index
)
{
case
0
:
this
.
wechatFn
();
break
;
case
1
:
this
.
download
();
break
;
}
},
// 微信转发
wechatFn
()
{
// this.data.onShareAppMessage()
this
.
modelClose
();
},
// 下载海报
download
()
{
if
(
this
.
data
.
posterUrl
){
wx
.
saveImageToPhotosAlbum
({
filePath
:
this
.
data
.
posterUrl
,
//仅为示例,并非真实的资源
success
(
res
)
{
console
.
log
(
'res: '
,
res
);
wx
.
$api
.
showToast
(
'图片下载成功!'
)
}
})
}
this
.
modelClose
();
},
//模态框关闭
modelClose
()
{
this
.
setData
({
this
.
setData
({
isShow
:
true
,
isShow
:
false
});
},
// 图片加载事件
onloadFn
(
event
)
{
this
.
setData
({
imgHeight
:
(
event
.
detail
.
height
*
0.2
).
toFixed
(
0
),
});
});
},
},
onRouter
(
options
)
{
onRouter
(
options
)
{
...
@@ -52,7 +125,56 @@ Page({
...
@@ -52,7 +125,56 @@ Page({
* 生命周期函数--监听页面加载
* 生命周期函数--监听页面加载
*/
*/
onLoad
(
options
)
{
onLoad
(
options
)
{
// actNum,activeNavIdx
if
(
this
.
data
.
isShow
){
let
{
actNum
}
=
this
.
data
;
let
img
=
`
${
IMGURL
}
scene/longpic
${
actNum
+
1
}
.png`
wx
.
showLoading
({
title
:
'加载图片中'
,
})
wx
.
getImageInfo
({
src
:
img
,
success
:(
res
)
=>
{
ActivityApi
.
getActivityVisitorList
({
actNum
,
activeNavIdx
:
0
}).
then
(
response
=>
{
let
imgW
=
res
.
width
/
5
,
imgH
=
res
.
height
/
5
;
this
.
setData
({
imgH
:
(
imgH
/
imgW
)
*
450
})
let
drawFun
=
new
Draw
({
width
:
imgW
,
height
:
imgH
});
let
imgList
=
[
{
x
:
0
,
y
:
0
,
width
:
imgW
,
height
:
imgH
,
url
:
img
,
},
{
x
:
imgW
-
64
,
y
:
imgH
-
496
-
64
,
width
:
64
,
height
:
64
,
url
:
response
,
//二维码
},
];
drawFun
.
begin
({
imageList
:
imgList
,
}).
then
(
resp
=>
{
console
.
log
(
'posterUrl.path'
,
resp
)
this
.
setData
({
posterUrl
:
resp
.
path
,
});
wx
.
hideLoading
()
})
console
.
log
(
response
,
'response'
)
})
}
})
}
},
},
/**
/**
...
...
pages/checkProduct/checkProduct.json
View file @
3f853f6
{
{
"usingComponents"
:
{
"usingComponents"
:
{
"product"
:
"../tab/discovery/components/product/product"
,
"product"
:
"../tab/discovery/components/product/product"
"shareModel"
:
"../tab/discovery/components/shareModel/shareModel"
},
},
"navigationBarTitleText"
:
"特色产品"
,
"navigationBarTitleText"
:
"特色产品"
,
"onReachBottomDistance"
:
10
,
"onReachBottomDistance"
:
10
,
...
...
pages/checkProduct/checkProduct.scss
View file @
3f853f6
/* pages/checkProduct/checkProduct.wxss */
/* pages/checkProduct/checkProduct.wxss */
page
{
page
{
background-color
:
#fff
;
background-color
:
#fff
;
}
.share-wrap
{
position
:
fixed
;
top
:
0
;
left
:
0
;
bottom
:
0
;
right
:
0
;
background
:
rgba
(
0
,
0
,
0
,
0
.5
);
z-index
:
1
;
.img-wrap
{
position
:
absolute
;
top
:
20%
;
left
:
50%
;
transform
:
translateX
(
-50%
);
width
:
450rpx
;
height
:
622rpx
;
// background-color: red;
overflow
:
auto
;
.img
{
width
:
100%
;
// height: auto;
height
:
60%
;
background-color
:
#fff
;
}
}
.btns
{
position
:
absolute
;
left
:
0
;
bottom
:
0
;
width
:
100%
;
height
:
308rpx
;
background
:
#ffffff
;
border-radius
:
16rpx
16rpx
0
0
;
.top
{
display
:
flex
;
justify-content
:
space-around
;
.btn
{
padding-top
:
32rpx
;
}
.img
{
display
:
block
;
margin
:
0
auto
16rpx
;
width
:
80rpx
;
height
:
80rpx
;
}
.name
{
font-size
:
24rpx
;
color
:
#323436
;
text-align
:
center
;
line-height
:
32rpx
;
}
.btn-wechat
{
width
:
auto
;
margin
:
0
;
padding
:
0
;
background-color
:
#fff
;
&
:
:
after
{
border
:none
;
}
}
}
.btom
{
margin
:
36rpx
auto
0
;
width
:
686rpx
;
height
:
88rpx
;
line-height
:
88rpx
;
border
:
2rpx
solid
#eeeeee
;
border-radius
:
8rpx
;
text-align
:
center
;
}
}
}
}
\ No newline at end of file
\ No newline at end of file
pages/checkProduct/checkProduct.wxml
View file @
3f853f6
...
@@ -6,4 +6,28 @@
...
@@ -6,4 +6,28 @@
<product actNum="{{actNum}}" senceData="{{senceData}}" isShare="{{true}}"/>
<product actNum="{{actNum}}" senceData="{{senceData}}" isShare="{{true}}"/>
<!-- 分享弹框 -->
<!-- 分享弹框 -->
<shareModel actNum="{{actNum}}" isShow="{{isShow}}" bindmodelclose="modelcloseFn" />
<view class="share-wrap" wx:if="{{isShow}}">
<view class="img-wrap" wx:if="{{posterUrl}}">
<image class="img" style="height:{{imgH}}rpx" src="{{posterUrl}}" bindload="onloadFn" />
<!-- <block wx:for="{{imgList}}" wx:key="*this">
<image class="img" src="{{item}}"/>
</block> -->
</view>
<view class="btns" wx:if="{{posterUrl}}">
<view class="top">
<view class="btn" wx:for="{{btnList}}" wx:key="name" bindtap="handleClick" data-index="{{index}}">
<block wx:if="{{index == 0}}">
<button open-type="share" class="btn-wechat">
<image class="img" src="{{item.src}}" />
<view class="name">{{item.name}}</view>
</button>
</block>
<block wx:else>
<image class="img" src="{{item.src}}" />
<view class="name">{{item.name}}</view>
</block>
</view>
</view>
<view class="btom" bindtap="modelClose">取消</view>
</view>
</view>
pages/tab/index/components/activeBox/activeBox.js
View file @
3f853f6
...
@@ -8,12 +8,18 @@ Component({
...
@@ -8,12 +8,18 @@ Component({
/**
/**
* 组件的属性列表
* 组件的属性列表
*/
*/
options
:
{
addGlobalClass
:
true
},
behaviors
:
[
imgUrlMixin
],
behaviors
:
[
imgUrlMixin
],
properties
:
{
properties
:
{
activeList
:
{
activeList
:
{
type
:
Array
,
type
:
Array
,
observer
(
newVal
)
{
observer
(
newVal
)
{
}
}
},
nothing
:
{
type
:
Boolean
}
}
},
},
...
@@ -106,7 +112,7 @@ Component({
...
@@ -106,7 +112,7 @@ Component({
filterJumpUrl
(
id
)
{
filterJumpUrl
(
id
)
{
const
userStorage
=
wx
.
$storage
.
get
(
'userInfo'
)
const
userStorage
=
wx
.
$storage
.
get
(
'userInfo'
)
return
`
${
domain
}
/scrm-wx-merchant-activity/#/
?id=
${
id
}
&merchantId=
${
userStorage
.
merchantId
}
&shareStaffUuid=
${
userStorage
.
uuid
}
&shareStaffName=
${
this
.
toUnicode
(
userStorage
.
name
)}
&shareStaffType=2&sharedTime=
${
Date
.
now
()}
`
return
`
http://scrm.dev.glsx.com.cn/dj-scrm-wx-work-main-lwk/#/crowdfunding
?id=
${
id
}
&merchantId=
${
userStorage
.
merchantId
}
&shareStaffUuid=
${
userStorage
.
uuid
}
&shareStaffName=
${
this
.
toUnicode
(
userStorage
.
name
)}
&shareStaffType=2&sharedTime=
${
Date
.
now
()}
`
},
},
// 分享活动(复制链接)
// 分享活动(复制链接)
...
...
pages/tab/index/components/activeBox/activeBox.wxml
View file @
3f853f6
...
@@ -33,4 +33,7 @@
...
@@ -33,4 +33,7 @@
</view>
</view>
</view>
</view>
</block>
</block>
<block wx:if="{{nothing}}">
<view class="list-nothing to-bottom"></view>
</block>
</view>
</view>
pages/tab/index/components/activityDiagnosis/activityDiagnosis.js
View file @
3f853f6
...
@@ -8,11 +8,17 @@ Component({
...
@@ -8,11 +8,17 @@ Component({
/**
/**
* 组件的属性列表
* 组件的属性列表
*/
*/
options
:
{
addGlobalClass
:
true
},
behaviors
:
[
imgUrlMixin
],
behaviors
:
[
imgUrlMixin
],
properties
:
{
properties
:
{
activityList
:
{
activityList
:
{
type
:
Array
,
type
:
Array
,
value
:
[]
value
:
[]
},
nothing
:
{
type
:
Boolean
}
}
},
},
...
...
pages/tab/index/components/activityDiagnosis/activityDiagnosis.wxml
View file @
3f853f6
...
@@ -43,4 +43,7 @@
...
@@ -43,4 +43,7 @@
</view>
</view>
</view>
</view>
</block>
</block>
<block wx:if="{{nothing}}">
<view class="list-nothing to-bottom"></view>
</block>
</view>
</view>
pages/tab/index/index.js
View file @
3f853f6
...
@@ -161,6 +161,10 @@ Page({
...
@@ -161,6 +161,10 @@ Page({
* 页面相关事件处理函数--监听用户下拉动作
* 页面相关事件处理函数--监听用户下拉动作
*/
*/
onPullDownRefresh
:
function
()
{
onPullDownRefresh
:
function
()
{
this
.
setData
({
activePageNum
:
1
,
pageNum
:
1
})
this
.
getData
(
true
)
this
.
getData
(
true
)
},
},
...
...
pages/tab/index/index.json
View file @
3f853f6
...
@@ -4,6 +4,6 @@
...
@@ -4,6 +4,6 @@
"activity-diagnosis"
:
"./components/activityDiagnosis/activityDiagnosis"
"activity-diagnosis"
:
"./components/activityDiagnosis/activityDiagnosis"
},
},
"navigationStyle"
:
"custom"
,
"navigationStyle"
:
"custom"
,
"onReachBottomDistance"
:
10
,
"onReachBottomDistance"
:
10
0
,
"enablePullDownRefresh"
:
true
"enablePullDownRefresh"
:
true
}
}
pages/tab/index/index.scss
View file @
3f853f6
...
@@ -10,7 +10,7 @@
...
@@ -10,7 +10,7 @@
}
}
.layout
{
.layout
{
position
:
relative
;
position
:
relative
;
.bg-box
{
.bg-box
{
width
:
100%
;
width
:
100%
;
overflow
:
hidden
;
overflow
:
hidden
;
...
@@ -26,7 +26,8 @@
...
@@ -26,7 +26,8 @@
}
}
}
}
.content
{
.content
{
position
:
relative
;
position
:
relative
;
overflow
:
hidden
;
.tab-box
{
.tab-box
{
display
:
flex
;
display
:
flex
;
height
:
112rpx
;
height
:
112rpx
;
...
...
pages/tab/index/index.wxml
View file @
3f853f6
...
@@ -24,13 +24,13 @@
...
@@ -24,13 +24,13 @@
<!-- 活动中 -->
<!-- 活动中 -->
<view class="active-content" hidden="{{tabIndex != 0}}">
<view class="active-content" hidden="{{tabIndex != 0}}">
<block>
<block>
<active-box activeList="{{activeList}}"></active-box>
<active-box activeList="{{activeList}}"
nothing="{{nothing}}"
></active-box>
</block>
</block>
</view>
</view>
<!-- 活动诊断 -->
<!-- 活动诊断 -->
<view class="activity-diag-content" hidden="{{tabIndex != 1}}">
<view class="activity-diag-content" hidden="{{tabIndex != 1}}">
<block>
<block>
<activity-diagnosis activityList="{{activityEndList}}"></activity-diagnosis>
<activity-diagnosis activityList="{{activityEndList}}"
nothing="{{nothing}}"
></activity-diagnosis>
</block>
</block>
</view>
</view>
</view>
</view>
...
...
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