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 f33a0691
authored
Oct 28, 2022
by
张晓玮
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'zhangxw_dev_3.0' into 'v3.0'
Zhangxw dev 3.0 See merge request
!101
2 parents
6f3b82c1
1e56a612
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
78 additions
and
165 deletions
components/sharePopup/sharePopup.js
components/sharePopup/sharePopup.scss
components/sharePopup/sharePopup.wxml
packageActivity/pages/applyActivity/applyActivity.js
packageActivity/pages/order/order.wxml
packageActivity/pages/shareTaskDetail/shareTaskDetail.wxml
packageActivity/pages/taskDetail/taskDetail.wxml
packageActivity/pages/visitor/visitor.wxml
pages/authentication/loading/loading.js
pages/tab/index/components/activeBox/activeBox.js
pages/tab/index/components/activityCalender/activityCalender.wxml
pages/tab/index/components/bookingOrder/bookingOrder.wxml
pages/tab/index/index.js
components/sharePopup/sharePopup.js
View file @
f33a069
...
...
@@ -17,24 +17,17 @@ Component({
navHeight
:
thisPage
.
data
.
navHeight
})
if
(
val
.
showSharePopup
)
{
wx
.
$util
.
getViewInfo
(
'.user-box'
,
res
=>
{
this
.
setData
({
boxImageHeight
:
res
.
height
,
})
val
.
boxImageHeight
=
res
.
height
val
.
boxImageHeight
=
66
// 计算弹窗图片区域最大高度
wx
.
$util
.
getViewInfo
(
'.layout'
,
res
=>
{
this
.
setData
({
postersBoxHeight
:
res
.
height
*
0.7
,
postersImageHeight
:
res
.
height
*
0.7
-
this
.
data
.
boxImageHeight
-
20
postersImageHeight
:
(
res
.
height
/
res
.
width
)
*
247
})
val
.
postersBoxHeight
=
res
.
height
*
0.7
,
val
.
postersImageHeight
=
res
.
height
*
0.7
-
this
.
data
.
boxImageHeight
-
20
this
.
init
(
val
)
// this.init(val)
val
.
postersImageHeight
=
(
res
.
height
/
res
.
width
)
*
247
this
.
init
(
val
)
})
},
this
)
}
}
...
...
@@ -57,7 +50,8 @@ Component({
wx
.
$api
.
showLoading
()
const
drawfun
=
new
Draw
({
width
:
280
,
height
:
560
+
n
.
boxImageHeight
height
:
n
.
postersImageHeight
+
80
,
borderRadius
:
8
},
this
),
{
userInfo
...
...
@@ -70,27 +64,22 @@ Component({
height
:
n
.
boxImageHeight
,
url
:
`
${
this
.
data
.
IMGURL
}
taskDetail_bg.png`
},
// {
// x: 12,
// y: 12,
// width: 20,
// height: 20,
// url: `${userInfo.weChatAvatarUrl ? userInfo.weChatAvatarUrl : this.data.IMGURL}order_person_default.png`
// },
{
x
:
12
,
y
:
12
,
width
:
20
,
height
:
20
,
borderRadius
:
40
,
// url: `${userInfo.sta_avatarUrl && userInfo.sta_avatarUrl.indexOf('https://thirdwx.qlogo.cn') > -1 ? userInfo.sta_avatarUrl : userInfo.weChatAvatarUrl && userInfo.weChatAvatarUrl.indexOf('https://thirdwx.qlogo.cn') > -1 ? userInfo.weChatAvatarUrl : this.data.IMGURL}default_avatar.png`
url
:
`
${
this
.
data
.
IMGURL
}
default_avatar.png`
},
{
x
:
16
,
y
:
n
.
boxImageHeight
+
10
,
width
:
247
,
height
:
500
,
height
:
n
.
postersImageHeight
,
url
:
n
.
posterImg
},
// {
// x: 204,
// y: n.postersImageHeight / 2 + boxImageHeight + 20,
// width: 60,
// height: 60,
// url: n.imagePath
// }
],
textList
:
[{
x
:
44
,
...
...
@@ -130,22 +119,6 @@ Component({
padding
:
[
5
,
5
]
}
},
// {
// x: 16,
// y: (n.postersImageHeight / 2) + boxImageHeight + 30,
// fontSize: 13,
// color: '#1B233D',
// text: userInfo.merchantName
// },
// {
// x: 16,
// y: n.postersImageHeight / 2 + boxImageHeight + 50,
// fontSize: 11,
// color: '#6E6E7A',
// text: n.address,
// lineNum: 3,
// width: 193
// }
],
})
wx
.
hideLoading
()
...
...
@@ -179,7 +152,6 @@ Component({
}
)
},
noScroll
()
{},
authFail
(
e
)
{
this
.
setData
({
showAuth
:
true
...
...
components/sharePopup/sharePopup.scss
View file @
f33a069
...
...
@@ -35,85 +35,15 @@
}
.share-popup-content
{
position
:
relative
;
//
position: relative;
background
:
#FFFFFF
;
border-radius
:
16rpx
;
box-shadow
:
0
4rpx
20rpx
0
rgba
(
0
,
0
,
0
,
0
.10
);
overflow
-y
:
auto
;
overflow
:
auto
;
.bg
{
width
:
100%
;
height
:
132rpx
;
}
.user-box
{
position
:
absolute
;
top
:
0
;
padding
:
24rpx
;
display
:
flex
;
image
{
width
:
40rpx
;
height
:
40rpx
;
margin-right
:
24rpx
;
flex-shrink
:
0
;
border-radius
:
20rpx
;
}
.message
{
display
:
flex
;
flex-flow
:
column
;
justify-content
:
space-between
;
font-size
:
28rpx
;
color
:
#2D2D33
;
.name
{
font-size
:
28rpx
;
text
{
font-size
:
24rpx
;
color
:
#6E6E7A
;
margin-left
:
16rpx
;
}
}
.activity
{
word-break
:
break-all
;
.activity-type-tag
{
font-size
:
20rpx
;
color
:
#4466F0
;
background
:
rgba
(
255
,
255
,
255
,
0
.32
);
border
:
1px
solid
rgba
(
143
,
165
,
255
,
0
.50
);
padding
:
0
12rpx
;
border-radius
:
2px
;
margin-left
:
8rpx
;
white-space
:
nowrap
;
}
}
}
}
.content-box
{
width
:
100%
;
padding
:
32rpx
32rpx
0
32rpx
;
box-sizing
:
border-box
;
.posters_img
{
margin
:
0
auto
;
width
:
100%
;
}
.merchant_box
{
display
:
flex
;
justify-content
:
space-between
;
margin-top
:
16rpx
;
.name
{
font-weight
:
500
;
font-size
:
26rpx
;
color
:
#1B233D
;
}
.address
{
font-weight
:
400
;
font-size
:
22rpx
;
color
:
#6E6E7A
;
}
.qrcode
{
flex-shrink
:
0
;
width
:
120rpx
;
height
:
120rpx
;
}
}
}
}
.btn-box
{
display
:
flex
;
...
...
components/sharePopup/sharePopup.wxml
View file @
f33a069
<!--components/sharePopup/sharePopup.wxml-->
<view class="share-popup" wx:if="{{data.showSharePopup}}"
catchtouchmove="noScroll"
>
<view class="share-popup" wx:if="{{data.showSharePopup}}">
<view class="share-popup-bg" />
<view class="share-box" style="transform: translate(-50%, calc(-50% + {{navHeight / 2}}px));">
<view class="close-box">
...
...
@@ -7,34 +7,8 @@
<image webp src="{{IMGURL}}popup_close_btn.png"></image>
</view>
</view>
<view class="share-popup-content" style="height: {{postersBoxHeight}}px;">
<!-- 用户活动信息 -->
<block>
<image class="bg" style="height: {{boxImageHeight}}px;" webp src="{{IMGURL}}taskDetail_bg.png"></image>
<view class="user-box">
<image webp class="user_image" src="{{USERINFO.weChatAvatarUrl ? USERINFO.weChatAvatarUrl : IMGURL + 'order_person_default.png'}}"></image>
<view class="message">
<view class="name">{{USERINFO.weChatNickName || USERINFO.name || ""}}<text>邀请你参加</text></view>
<view class="activity"><text>{{data.activityName || ""}}</text><text class="activity-type-tag">{{activityTypList[0]}}</text></view>
</view>
</view>
</block>
<!-- 海报 -->
<block>
<view class="content-box">
<image class="posters_img" style="height: {{postersImageHeight}}px;" mode="aspectFit" src="{{data.posterImg}}"></image>
<!-- <view class="merchant_box">
<view class="merchant_message">
<view class="name">{{USERINFO.merchantName}}</view>
<view class="address">{{data.address}}</view>
</view>
<view class="qrcode">
<image src="{{data.imagePath}}"></image>
</view>
</view> -->
</view>
</block>
<!-- 保存 -->
<view class="share-popup-content" style="max-height: {{postersBoxHeight}}px;">
<image style="height: {{postersImageHeight + 80}}px;" mode="widthFix" src="{{poster}}"></image>
</view>
<view class="btn-box">
<view class="btn" bind:tap="saveImage">保存至相册</view>
...
...
@@ -45,4 +19,3 @@
<canvas style="width:355px;height:370px; margin:0 auto;" canvas-id="mycanvas" />
</view>
</view>
<!-- <authorize scopeType="writePhotosAlbum" bindfail="authFail" show="{{showAuth}}" id="auth"></authorize> -->
packageActivity/pages/applyActivity/applyActivity.js
View file @
f33a069
...
...
@@ -39,8 +39,7 @@ Page({
ActivityApi
.
getNotOpenProductsList
({
merchantId
:
USERINFO
.
merchantId
,
sceneCode
:
code
}).
then
(
res
=>
{
// 默认选中第一个业务场景 获取可用产品/活动
res
.
forEach
(
item
=>
{
item
.
isSelect
=
false
console
.
log
(
this
.
data
.
currentSceneCode
)
if
(
item
.
status
==
0
&&
item
.
sceneCode
==
this
.
data
.
currentSceneCode
)
arr
.
push
(
item
)
if
(
item
.
sceneCode
==
this
.
data
.
currentSceneCode
)
arr
.
push
(
item
)
})
this
.
setData
({
product
:
arr
...
...
packageActivity/pages/order/order.wxml
View file @
f33a069
...
...
@@ -13,7 +13,7 @@
<view class="list-item" style="background-image: {{statusBackgroundColor[item.orderStatus]}};">
<view class="top">
<view class="top-left">
<image webp src="{{item.customerImageUrl ? item.customerImageUrl : IMGURL+'
order_person_default
.png'}}"></image>
<image webp src="{{item.customerImageUrl ? item.customerImageUrl : IMGURL+'
default_avatar
.png'}}"></image>
<view class="name-mobile">
<view class="name">
{{item.customerNickName || ""}}
...
...
packageActivity/pages/shareTaskDetail/shareTaskDetail.wxml
View file @
f33a069
...
...
@@ -8,7 +8,7 @@
<view class="share-box">
<image class="bg" webp src="{{IMGURL}}taskDetail_bg.png"></image>
<view class="user-box">
<image webp src="{{detailInfo.weChatAvatarUrl ? detailInfo.weChatAvatarUrl : IMGURL + '
order_person_default
.png'}}"></image>
<image webp src="{{detailInfo.weChatAvatarUrl ? detailInfo.weChatAvatarUrl : IMGURL + '
default_avatar
.png'}}"></image>
<view class="message">
<view class="name">{{detailInfo.staffName || ""}}<text>邀请你参加</text></view>
<view class="activity">{{detailInfo.merchantName || ""}}{{detailInfo.activityName || ""}}<text>{{activityTypList[0]}}</text></view>
...
...
packageActivity/pages/taskDetail/taskDetail.wxml
View file @
f33a069
...
...
@@ -25,7 +25,7 @@
<view class="share-box" wx:if="{{detailInfo.missonType == 2}}">
<image class="bg" style="height: {{boxImageHeight}}px;" webp src="{{IMGURL}}taskDetail_bg.png"></image>
<view class="user-box">
<image webp class="user_image" src="{{userStorage.weChatAvatarUrl ? userStorage.weChatAvatarUrl : IMGURL + '
order_person_default
.png'}}"></image>
<image webp class="user_image" src="{{userStorage.weChatAvatarUrl ? userStorage.weChatAvatarUrl : IMGURL + '
default_avatar
.png'}}"></image>
<view class="message">
<view class="name">{{userStorage.weChatNickName || userStorage.name || ""}}<text>邀请你参加</text></view>
<view class="activity"><text>{{userStorage.merchantName || ""}}{{detailInfo.activityName || ""}}</text><text class="activity-type-tag">{{activityTypList[0]}}</text></view>
...
...
packageActivity/pages/visitor/visitor.wxml
View file @
f33a069
...
...
@@ -13,7 +13,7 @@
<view class="list-item {{item.orderStatus == 0 ? '' : 'orderde'}}">
<view class="top">
<view class="top-left">
<image webp src="{{item.customerImageUrl ? item.customerImageUrl : IMGURL+'
order_person_default
.png'}}"></image>
<image webp src="{{item.customerImageUrl ? item.customerImageUrl : IMGURL+'
default_avatar
.png'}}"></image>
<view class="name-mobile">
<view class="name">
{{item.customerNickName || ""}}
...
...
pages/authentication/loading/loading.js
View file @
f33a069
...
...
@@ -166,7 +166,7 @@ Page({
loginUserInfoList
,
sessionId
})
{
if
(
loginUserInfoList
.
length
>
1
)
wx
.
$router
.
go
(
'/pages/authentication/accountItems/accountItems'
,
{
if
(
loginUserInfoList
.
length
>
1
)
wx
.
$router
.
reLaunch
(
'/pages/authentication/accountItems/accountItems'
,
{
sessionId
,
...
this
.
options
})
...
...
pages/tab/index/components/activeBox/activeBox.js
View file @
f33a069
...
...
@@ -94,12 +94,24 @@ Component({
val
.
newtaskCalenderList
.
forEach
((
v
,
index
)
=>
{
v
.
forEach
(
k
=>
{
k
.
time
=
(
new
Date
(
k
.
activityTime
).
getMonth
()
+
1
).
toString
().
padStart
(
2
,
"0"
)
+
"月"
+
new
Date
(
k
.
activityTime
).
getDate
().
toString
().
padStart
(
2
,
"0"
)
+
"日"
k
.
ind
=
ind
k
.
ind
=
ind
let
completeStatusNum
=
0
k
.
platformMerchantMissionResponseList
.
forEach
(
val
=>
{
if
(
val
.
completeStatus
==
2
)
completeStatusNum
++
})
if
(
d
.
getTime
()
>
new
Date
(
`
${
k
.
activityTime
.
replace
(
/-/g
,
'/'
)}
23:59:59`
).
getTime
())
k
.
status
=
2
if
(
nowDate
==
k
.
time
)
{
val
.
calenderActiveIndex
=
index
this
.
setData
({
activeDateIndex
:
ind
})
}
}
// status 1过去日期任务全部完成 2过去日期任务有未完成的 3当前日期或未来日期
if
(
completeStatusNum
==
v
.
length
&&
d
.
getTime
()
>
new
Date
(
`
${
k
.
activityTime
.
replace
(
/-/g
,
'/'
)}
23:59:59`
).
getTime
())
{
k
.
status
=
1
}
else
if
(
d
.
getTime
()
>
new
Date
(
`
${
k
.
activityTime
.
replace
(
/-/g
,
'/'
)}
23:59:59`
).
getTime
())
{
k
.
status
=
2
}
else
{
k
.
status
=
3
}
ind
++
})
})
...
...
@@ -176,8 +188,6 @@ Component({
},
})
})
},
// 活动详情
goToDetail
(
e
)
{
...
...
pages/tab/index/components/activityCalender/activityCalender.wxml
View file @
f33a069
...
...
@@ -8,9 +8,9 @@
<block wx:for="{{data.newtaskCalenderList}}" wx:for-item="val" wx:for-index="k" wx:key="k">
<swiper-item class='swiper_item'>
<block wx:for="{{val}}" wx:for-item="v" wx:for-index="j" wx:key="j">
<view class="time-box {{v.status ==
2 ? 'completed
' : ''}} {{activeDateIndex == v.ind ? 'active' : ''}}" bind:tap="changeDate" data-dateindex="{{v.ind}}">
<image webp src="{{IMGURL}}{{v.status ==
2 ? 'task_completed
.png' : 'calender_integral_icon.png'}}"></image>
<view class="task-time">{{v.
status == 2 ? '已完成' : v.
time}}</view>
<view class="time-box {{v.status ==
1 ? 'completed' : v.status == 2 ? 'past
' : ''}} {{activeDateIndex == v.ind ? 'active' : ''}}" bind:tap="changeDate" data-dateindex="{{v.ind}}">
<image webp src="{{IMGURL}}{{v.status ==
1 ? 'task_completed.png' : v.status == 2 ? 'calender_past_integral_icon
.png' : 'calender_integral_icon.png'}}"></image>
<view class="task-time">{{v.time}}</view>
</view>
</block>
</swiper-item>
...
...
pages/tab/index/components/bookingOrder/bookingOrder.wxml
View file @
f33a069
...
...
@@ -9,7 +9,7 @@
<view class="item-content">
<view class="top">
<view class="top-left">
<image webp src="{{item.customerImageUrl ? item.customerImageUrl : IMGURL+'
order_person_default
.png'}}"></image>
<image webp src="{{item.customerImageUrl ? item.customerImageUrl : IMGURL+'
default_avatar
.png'}}"></image>
<view class="user-message">
<view class="name">{{item.customerNickName || ""}}</view>
<view class="mobile">{{item.customerPhone || ""}}</view>
...
...
pages/tab/index/index.js
View file @
f33a069
import
ActivityApi
from
"~/api/activityApi/index"
import
MineApi
from
"~/api/mineApi/index"
const
navStyle
=
'background-color: transparent;'
import
{
setUserInfo
}
from
'~/utils/cache/storageApi'
Page
({
// behaviors: [kfMixin],
/**
...
...
@@ -46,6 +50,20 @@ Page({
getData
()
{
this
.
getActivityList
(
1
)
this
.
getActivityList
(
2
)
this
.
getStaffInfo
()
},
getStaffInfo
()
{
const
userStorage
=
wx
.
$storage
.
get
(
'userInfo'
)
let
para
=
{
id
:
userStorage
.
bussinessId
}
MineApi
.
getStaffDetailApi
(
para
).
then
(
res
=>
{
if
(
res
.
merchantFileResponse
){
userStorage
.
sta_avatarUrl
=
res
.
merchantFileResponse
.
fileUrl
}
setUserInfo
(
userStorage
)
})
},
// 计算文本宽度
...
...
@@ -84,14 +102,25 @@ Page({
val
.
newtaskCalenderList
.
forEach
((
v
,
index
)
=>
{
v
.
forEach
(
k
=>
{
k
.
time
=
(
new
Date
(
k
.
activityTime
).
getMonth
()
+
1
).
toString
().
padStart
(
2
,
"0"
)
+
"月"
+
new
Date
(
k
.
activityTime
).
getDate
().
toString
().
padStart
(
2
,
"0"
)
+
"日"
k
.
ind
=
ind
if
(
d
.
getTime
()
>
new
Date
(
`
${
k
.
activityTime
.
replace
(
/-/g
,
'/'
)}
23:59:59`
).
getTime
())
k
.
status
=
2
k
.
ind
=
ind
let
completeStatusNum
=
0
k
.
platformMerchantMissionResponseList
.
forEach
(
val
=>
{
if
(
val
.
completeStatus
==
2
)
completeStatusNum
++
})
if
(
nowDate
==
k
.
time
)
{
val
.
calenderActiveIndex
=
index
this
.
setData
({
activeDateIndex
:
ind
})
}
}
// status 1过去日期任务全部完成 2过去日期任务有未完成的 3当前日期或未来日期
if
(
completeStatusNum
==
v
.
length
&&
d
.
getTime
()
>
new
Date
(
`
${
k
.
activityTime
.
replace
(
/-/g
,
'/'
)}
23:59:59`
).
getTime
())
{
k
.
status
=
1
}
else
if
(
d
.
getTime
()
>
new
Date
(
`
${
k
.
activityTime
.
replace
(
/-/g
,
'/'
)}
23:59:59`
).
getTime
())
{
k
.
status
=
2
}
else
{
k
.
status
=
3
}
ind
++
})
})
})
val
.
isCollapse
=
false
let
itemVal
=
'activeList['
+
index
+
']'
...
...
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