Commit 6cbaa5b2 by zhangxw

1

1 parent f304da25
// 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,
......
...@@ -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--> <!--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">
......
...@@ -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}`
}) })
}, },
......
...@@ -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>
......
...@@ -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++
}) })
......
...@@ -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++
}) })
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!