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 58baece7
authored
Oct 20, 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
!49
2 parents
06f5891f
6cbaa5b2
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
28 additions
and
10 deletions
packageActivity/pages/order/order.js
packageActivity/pages/shareTaskDetail/shareTaskDetail.js
packageActivity/pages/shareTaskDetail/shareTaskDetail.wxml
packageActivity/pages/taskDetail/taskDetail.js
packageActivity/pages/taskDetail/taskDetail.wxml
pages/tab/index/components/activeBox/activeBox.js
pages/tab/index/index.js
packageActivity/pages/order/order.js
View file @
58baece
// packageActivity/pages/order/order.js
// packageActivity/pages/order/order.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
{
centsToyuan
}
from
'~/utils/format'
Page
({
Page
({
/**
/**
...
@@ -34,8 +35,8 @@ Page({
...
@@ -34,8 +35,8 @@ Page({
}).
then
(
res
=>
{
}).
then
(
res
=>
{
res
.
orderList
&&
res
.
orderList
.
forEach
(
val
=>
{
res
.
orderList
&&
res
.
orderList
.
forEach
(
val
=>
{
val
.
time
=
val
.
payDate
?
new
Date
(
val
.
payDate
).
format
(
'yyyy-MM-dd hh:mm:ss'
)
:
''
val
.
time
=
val
.
payDate
?
new
Date
(
val
.
payDate
).
format
(
'yyyy-MM-dd hh:mm:ss'
)
:
''
val
.
orderPrice
=
centsToyuan
(
val
.
orderPrice
)
})
})
console
.
log
(
res
.
orderTotal
)
this
.
setData
({
this
.
setData
({
allNum
:
res
.
orderTotal
,
allNum
:
res
.
orderTotal
,
todayNum
:
res
.
todayTotal
,
todayNum
:
res
.
todayTotal
,
...
...
packageActivity/pages/shareTaskDetail/shareTaskDetail.js
View file @
58baece
...
@@ -41,6 +41,7 @@ Page({
...
@@ -41,6 +41,7 @@ Page({
res
.
linkUrl
=
val
.
materialContent
res
.
linkUrl
=
val
.
materialContent
}
}
})
})
res
.
staffName
=
this
.
options
.
name
||
''
this
.
setData
({
this
.
setData
({
detailInfo
:
res
,
detailInfo
:
res
,
materialTypeArr
:
typeArr
materialTypeArr
:
typeArr
...
@@ -49,6 +50,12 @@ Page({
...
@@ -49,6 +50,12 @@ Page({
})
})
},
},
// 跳转链接
goShareLink
(
e
)
{
let
{
url
}
=
e
.
currentTarget
.
dataset
wx
.
$router
.
jumpH5
(
url
)
},
// 预览图片/视频
// 预览图片/视频
previewMedia
(
e
)
{
previewMedia
(
e
)
{
let
{
imgUrlList
}
=
this
.
data
.
detailInfo
let
{
imgUrlList
}
=
this
.
data
.
detailInfo
...
...
packageActivity/pages/shareTaskDetail/shareTaskDetail.wxml
View file @
58baece
<!--packageActivity/pages/shareTaskDetail/shareTaskDetail.wxml-->
<!--packageActivity/pages/shareTaskDetail/shareTaskDetail.wxml-->
<wxs module="fn">
var indexOf = function(e, num) {
return e.indexOf(num) > -1
}
module.exports.indexOf = indexOf
</wxs>
<view wx:if="{{fn.indexOf(materialTypeArr, 4)}}">
<view wx:if="{{fn.indexOf(materialTypeArr, 4)}}">
<view class="link-share" bind:tap="goShareLink" data-url="{{detailInfo.linkUrl}}">
<view class="link-share" bind:tap="goShareLink" data-url="{{detailInfo.linkUrl}}">
<image src="{{detailInfo.activityImg ? detailInfo.activityImg
: IMGURL+'share_task_default_img.png'}}"></image>
<image src="{{detailInfo.activityImage ? detailInfo.activityImage
: IMGURL+'share_task_default_img.png'}}"></image>
<view class="right">
<view class="right">
<view>{{detailInfo.activityName}}</view>
<view>{{detailInfo.activityName}}</view>
<view class="type-text">{{activityTypList[0]}}活动</view>
<view class="type-text">{{activityTypList[0]}}活动</view>
</view>
</view>
</view>
</view>
</view>
</view>
<view class="share-box" wx:if="{{!fn.indexOf(materialTypeArr, 4)}}">
<view class="share-box" wx:if="{{!fn.indexOf(materialTypeArr, 4)}}">
<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">
...
...
packageActivity/pages/taskDetail/taskDetail.js
View file @
58baece
...
@@ -29,9 +29,9 @@ Page({
...
@@ -29,9 +29,9 @@ Page({
this
.
setData
({
this
.
setData
({
userStorage
userStorage
})
})
let
id
=
this
.
options
.
missionId
.
split
(
'&'
)[
0
]
let
id
=
this
.
options
.
missionId
.
toString
().
split
(
'&'
)[
0
]
this
.
getActiveTaskDetail
(
id
)
this
.
getActiveTaskDetail
(
id
)
this
.
sharePath
=
`packageActivity/pages/shareTaskDetail/shareTaskDetail?missionId=
${
id
}
`
this
.
sharePath
=
`packageActivity/pages/shareTaskDetail/shareTaskDetail?missionId=
${
id
}
&name=
${
userStorage
.
name
}
`
})
})
},
},
...
...
packageActivity/pages/taskDetail/taskDetail.wxml
View file @
58baece
...
@@ -40,7 +40,7 @@
...
@@ -40,7 +40,7 @@
<view class="activity">{{userStorage.merchantName || ""}}{{detailInfo.activityName || ""}}<text>{{activityTypList[0]}}</text></view>
<view class="activity">{{userStorage.merchantName || ""}}{{detailInfo.activityName || ""}}<text>{{activityTypList[0]}}</text></view>
</view>
</view>
</view>
</view>
<view class="content">
<view class="content"
wx:if="{{detailInfo.platformMerchantMissionMaterialResponseList.length}}"
>
<view class="text-box">
<view class="text-box">
<text>{{detailInfo.textContent}}</text>
<text>{{detailInfo.textContent}}</text>
</view>
</view>
...
...
pages/tab/index/components/activeBox/activeBox.js
View file @
58baece
...
@@ -70,6 +70,8 @@ Component({
...
@@ -70,6 +70,8 @@ Component({
if
(
nowDate
==
k
.
time
)
{
if
(
nowDate
==
k
.
time
)
{
val
.
calenderActiveIndex
=
index
val
.
calenderActiveIndex
=
index
this
.
setData
({
activeDateIndex
:
ind
})
this
.
setData
({
activeDateIndex
:
ind
})
}
else
{
val
.
calenderActiveIndex
=
0
}
}
ind
++
ind
++
})
})
...
@@ -110,16 +112,16 @@ Component({
...
@@ -110,16 +112,16 @@ Component({
return
unicodeStr
return
unicodeStr
},
},
filterJumpUrl
(
id
)
{
filterJumpUrl
(
id
,
num
)
{
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
num
==
2
?
`
${
domain
}
/scrm-wx-merchant-activity/#/?id=
${
id
}
&merchantId=
${
userStorage
.
merchantId
}
&shareStaffUuid=
${
userStorage
.
uuid
}
&shareStaffName=
${
this
.
toUnicode
(
userStorage
.
name
)}
&shareStaffType=2&sharedTime=
${
Date
.
now
()}
`
:
`
${
domain
}
/scrm-wx-merchant-activity/#/?id=
${
id
}
&merchantId=
${
userStorage
.
merchantId
}
&shareStaffUuid=
${
userStorage
.
uuid
}
&shareStaffName=
${
this
.
toUnicode
(
userStorage
.
name
)}
&isExclusive=1&exclusiveUuid=
${
userStorage
.
uuid
}
&shareStaffType=2&sharedTime=
${
Date
.
now
()}
`
},
},
// 分享活动(复制链接)
// 分享活动(复制链接)
copyActivityUrl
(
e
)
{
copyActivityUrl
(
e
)
{
let
{
id
}
=
e
.
currentTarget
.
dataset
let
{
id
}
=
e
.
currentTarget
.
dataset
wx
.
setClipboardData
({
wx
.
setClipboardData
({
data
:
this
.
filterJumpUrl
(
id
),
data
:
this
.
filterJumpUrl
(
id
,
1
),
success
(
res
)
{
success
(
res
)
{
wx
.
showToast
({
wx
.
showToast
({
title
:
'复制成功'
,
title
:
'复制成功'
,
...
@@ -131,7 +133,7 @@ Component({
...
@@ -131,7 +133,7 @@ Component({
// 活动详情
// 活动详情
goToDetail
(
e
)
{
goToDetail
(
e
)
{
let
{
id
}
=
e
.
currentTarget
.
dataset
let
{
id
}
=
e
.
currentTarget
.
dataset
let
h5Url
=
this
.
filterJumpUrl
(
id
)
let
h5Url
=
this
.
filterJumpUrl
(
id
,
2
)
console
.
log
(
h5Url
)
console
.
log
(
h5Url
)
wx
.
$router
.
jumpH5
(
h5Url
)
wx
.
$router
.
jumpH5
(
h5Url
)
},
},
...
...
pages/tab/index/index.js
View file @
58baece
...
@@ -85,6 +85,8 @@ Page({
...
@@ -85,6 +85,8 @@ Page({
if
(
nowDate
==
k
.
time
)
{
if
(
nowDate
==
k
.
time
)
{
val
.
calenderActiveIndex
=
index
val
.
calenderActiveIndex
=
index
this
.
setData
({
activeDateIndex
:
ind
})
this
.
setData
({
activeDateIndex
:
ind
})
}
else
{
val
.
calenderActiveIndex
=
0
}
}
ind
++
ind
++
})
})
...
...
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