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 1e56a612
authored
Oct 28, 2022
by
zhangxw
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
优化
1 parent
d7df9bce
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
45 additions
and
153 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/bookingOrder/bookingOrder.wxml
pages/tab/index/index.js
components/sharePopup/sharePopup.js
View file @
1e56a61
...
@@ -17,24 +17,17 @@ Component({
...
@@ -17,24 +17,17 @@ Component({
navHeight
:
thisPage
.
data
.
navHeight
navHeight
:
thisPage
.
data
.
navHeight
})
})
if
(
val
.
showSharePopup
)
{
if
(
val
.
showSharePopup
)
{
wx
.
$util
.
getViewInfo
(
'.user-box'
,
res
=>
{
val
.
boxImageHeight
=
66
this
.
setData
({
boxImageHeight
:
res
.
height
,
})
val
.
boxImageHeight
=
res
.
height
// 计算弹窗图片区域最大高度
// 计算弹窗图片区域最大高度
wx
.
$util
.
getViewInfo
(
'.layout'
,
res
=>
{
wx
.
$util
.
getViewInfo
(
'.layout'
,
res
=>
{
this
.
setData
({
this
.
setData
({
postersBoxHeight
:
res
.
height
*
0.7
,
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
.
postersBoxHeight
=
res
.
height
*
0.7
,
val
.
postersImageHeight
=
res
.
height
*
0.7
-
this
.
data
.
boxImageHeight
-
20
val
.
postersImageHeight
=
(
res
.
height
/
res
.
width
)
*
247
this
.
init
(
val
)
this
.
init
(
val
)
// this.init(val)
})
})
},
this
)
}
}
}
}
...
@@ -57,7 +50,8 @@ Component({
...
@@ -57,7 +50,8 @@ Component({
wx
.
$api
.
showLoading
()
wx
.
$api
.
showLoading
()
const
drawfun
=
new
Draw
({
const
drawfun
=
new
Draw
({
width
:
280
,
width
:
280
,
height
:
560
+
n
.
boxImageHeight
height
:
n
.
postersImageHeight
+
80
,
borderRadius
:
8
},
this
),
},
this
),
{
{
userInfo
userInfo
...
@@ -70,27 +64,22 @@ Component({
...
@@ -70,27 +64,22 @@ Component({
height
:
n
.
boxImageHeight
,
height
:
n
.
boxImageHeight
,
url
:
`
${
this
.
data
.
IMGURL
}
taskDetail_bg.png`
url
:
`
${
this
.
data
.
IMGURL
}
taskDetail_bg.png`
},
},
// {
{
// x: 12,
x
:
12
,
// y: 12,
y
:
12
,
// width: 20,
width
:
20
,
// height: 20,
height
:
20
,
// url: `${userInfo.weChatAvatarUrl ? userInfo.weChatAvatarUrl : this.data.IMGURL}order_person_default.png`
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
,
x
:
16
,
y
:
n
.
boxImageHeight
+
10
,
y
:
n
.
boxImageHeight
+
10
,
width
:
247
,
width
:
247
,
height
:
500
,
height
:
n
.
postersImageHeight
,
url
:
n
.
posterImg
url
:
n
.
posterImg
},
},
// {
// x: 204,
// y: n.postersImageHeight / 2 + boxImageHeight + 20,
// width: 60,
// height: 60,
// url: n.imagePath
// }
],
],
textList
:
[{
textList
:
[{
x
:
44
,
x
:
44
,
...
@@ -130,22 +119,6 @@ Component({
...
@@ -130,22 +119,6 @@ Component({
padding
:
[
5
,
5
]
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
()
wx
.
hideLoading
()
...
@@ -179,7 +152,6 @@ Component({
...
@@ -179,7 +152,6 @@ Component({
}
}
)
)
},
},
noScroll
()
{},
authFail
(
e
)
{
authFail
(
e
)
{
this
.
setData
({
this
.
setData
({
showAuth
:
true
showAuth
:
true
...
...
components/sharePopup/sharePopup.scss
View file @
1e56a61
...
@@ -35,85 +35,15 @@
...
@@ -35,85 +35,15 @@
}
}
.share-popup-content
{
.share-popup-content
{
position
:
relative
;
//
position: relative;
background
:
#FFFFFF
;
background
:
#FFFFFF
;
border-radius
:
16rpx
;
border-radius
:
16rpx
;
box-shadow
:
0
4rpx
20rpx
0
rgba
(
0
,
0
,
0
,
0
.10
);
box-shadow
:
0
4rpx
20rpx
0
rgba
(
0
,
0
,
0
,
0
.10
);
overflow
-y
:
auto
;
overflow
:
auto
;
.bg
{
.bg
{
width
:
100%
;
width
:
100%
;
height
:
132rpx
;
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
{
.btn-box
{
display
:
flex
;
display
:
flex
;
...
...
components/sharePopup/sharePopup.wxml
View file @
1e56a61
<!--components/sharePopup/sharePopup.wxml-->
<!--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-popup-bg" />
<view class="share-box" style="transform: translate(-50%, calc(-50% + {{navHeight / 2}}px));">
<view class="share-box" style="transform: translate(-50%, calc(-50% + {{navHeight / 2}}px));">
<view class="close-box">
<view class="close-box">
...
@@ -7,34 +7,8 @@
...
@@ -7,34 +7,8 @@
<image webp src="{{IMGURL}}popup_close_btn.png"></image>
<image webp src="{{IMGURL}}popup_close_btn.png"></image>
</view>
</view>
</view>
</view>
<view class="share-popup-content" style="height: {{postersBoxHeight}}px;">
<view class="share-popup-content" style="max-height: {{postersBoxHeight}}px;">
<!-- 用户活动信息 -->
<image style="height: {{postersImageHeight + 80}}px;" mode="widthFix" src="{{poster}}"></image>
<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>
</view>
<view class="btn-box">
<view class="btn-box">
<view class="btn" bind:tap="saveImage">保存至相册</view>
<view class="btn" bind:tap="saveImage">保存至相册</view>
...
@@ -45,4 +19,3 @@
...
@@ -45,4 +19,3 @@
<canvas style="width:355px;height:370px; margin:0 auto;" canvas-id="mycanvas" />
<canvas style="width:355px;height:370px; margin:0 auto;" canvas-id="mycanvas" />
</view>
</view>
</view>
</view>
<!-- <authorize scopeType="writePhotosAlbum" bindfail="authFail" show="{{showAuth}}" id="auth"></authorize> -->
packageActivity/pages/applyActivity/applyActivity.js
View file @
1e56a61
...
@@ -39,8 +39,7 @@ Page({
...
@@ -39,8 +39,7 @@ Page({
ActivityApi
.
getNotOpenProductsList
({
merchantId
:
USERINFO
.
merchantId
,
sceneCode
:
code
}).
then
(
res
=>
{
// 默认选中第一个业务场景 获取可用产品/活动
ActivityApi
.
getNotOpenProductsList
({
merchantId
:
USERINFO
.
merchantId
,
sceneCode
:
code
}).
then
(
res
=>
{
// 默认选中第一个业务场景 获取可用产品/活动
res
.
forEach
(
item
=>
{
res
.
forEach
(
item
=>
{
item
.
isSelect
=
false
item
.
isSelect
=
false
console
.
log
(
this
.
data
.
currentSceneCode
)
if
(
item
.
sceneCode
==
this
.
data
.
currentSceneCode
)
arr
.
push
(
item
)
if
(
item
.
status
==
0
&&
item
.
sceneCode
==
this
.
data
.
currentSceneCode
)
arr
.
push
(
item
)
})
})
this
.
setData
({
this
.
setData
({
product
:
arr
product
:
arr
...
...
packageActivity/pages/order/order.wxml
View file @
1e56a61
...
@@ -13,7 +13,7 @@
...
@@ -13,7 +13,7 @@
<view class="list-item" style="background-image: {{statusBackgroundColor[item.orderStatus]}};">
<view class="list-item" style="background-image: {{statusBackgroundColor[item.orderStatus]}};">
<view class="top">
<view class="top">
<view class="top-left">
<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-mobile">
<view class="name">
<view class="name">
{{item.customerNickName || ""}}
{{item.customerNickName || ""}}
...
...
packageActivity/pages/shareTaskDetail/shareTaskDetail.wxml
View file @
1e56a61
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
<view class="share-box">
<view class="share-box">
<image class="bg" webp src="{{IMGURL}}taskDetail_bg.png"></image>
<image class="bg" webp src="{{IMGURL}}taskDetail_bg.png"></image>
<view class="user-box">
<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="message">
<view class="name">{{detailInfo.staffName || ""}}<text>邀请你参加</text></view>
<view class="name">{{detailInfo.staffName || ""}}<text>邀请你参加</text></view>
<view class="activity">{{detailInfo.merchantName || ""}}{{detailInfo.activityName || ""}}<text>{{activityTypList[0]}}</text></view>
<view class="activity">{{detailInfo.merchantName || ""}}{{detailInfo.activityName || ""}}<text>{{activityTypList[0]}}</text></view>
...
...
packageActivity/pages/taskDetail/taskDetail.wxml
View file @
1e56a61
...
@@ -25,7 +25,7 @@
...
@@ -25,7 +25,7 @@
<view class="share-box" wx:if="{{detailInfo.missonType == 2}}">
<view class="share-box" wx:if="{{detailInfo.missonType == 2}}">
<image class="bg" style="height: {{boxImageHeight}}px;" webp src="{{IMGURL}}taskDetail_bg.png"></image>
<image class="bg" style="height: {{boxImageHeight}}px;" webp src="{{IMGURL}}taskDetail_bg.png"></image>
<view class="user-box">
<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="message">
<view class="name">{{userStorage.weChatNickName || userStorage.name || ""}}<text>邀请你参加</text></view>
<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>
<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 @
1e56a61
...
@@ -13,7 +13,7 @@
...
@@ -13,7 +13,7 @@
<view class="list-item {{item.orderStatus == 0 ? '' : 'orderde'}}">
<view class="list-item {{item.orderStatus == 0 ? '' : 'orderde'}}">
<view class="top">
<view class="top">
<view class="top-left">
<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-mobile">
<view class="name">
<view class="name">
{{item.customerNickName || ""}}
{{item.customerNickName || ""}}
...
...
pages/authentication/loading/loading.js
View file @
1e56a61
...
@@ -166,7 +166,7 @@ Page({
...
@@ -166,7 +166,7 @@ Page({
loginUserInfoList
,
loginUserInfoList
,
sessionId
sessionId
})
{
})
{
if
(
loginUserInfoList
.
length
>
1
)
wx
.
$router
.
go
(
'/pages/authentication/accountItems/accountItems'
,
{
if
(
loginUserInfoList
.
length
>
1
)
wx
.
$router
.
reLaunch
(
'/pages/authentication/accountItems/accountItems'
,
{
sessionId
,
sessionId
,
...
this
.
options
...
this
.
options
})
})
...
...
pages/tab/index/components/bookingOrder/bookingOrder.wxml
View file @
1e56a61
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
<view class="item-content">
<view class="item-content">
<view class="top">
<view class="top">
<view class="top-left">
<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="user-message">
<view class="name">{{item.customerNickName || ""}}</view>
<view class="name">{{item.customerNickName || ""}}</view>
<view class="mobile">{{item.customerPhone || ""}}</view>
<view class="mobile">{{item.customerPhone || ""}}</view>
...
...
pages/tab/index/index.js
View file @
1e56a61
import
ActivityApi
from
"~/api/activityApi/index"
import
ActivityApi
from
"~/api/activityApi/index"
import
MineApi
from
"~/api/mineApi/index"
const
navStyle
=
'background-color: transparent;'
const
navStyle
=
'background-color: transparent;'
import
{
setUserInfo
}
from
'~/utils/cache/storageApi'
Page
({
Page
({
// behaviors: [kfMixin],
// behaviors: [kfMixin],
/**
/**
...
@@ -46,6 +50,20 @@ Page({
...
@@ -46,6 +50,20 @@ Page({
getData
()
{
getData
()
{
this
.
getActivityList
(
1
)
this
.
getActivityList
(
1
)
this
.
getActivityList
(
2
)
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
)
})
},
},
// 计算文本宽度
// 计算文本宽度
...
...
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