Commit 33266a7b by 张立顺

bug 修复

1 parent 42e28241
......@@ -36,6 +36,7 @@ Component({
list: 'messageList'
}
},
findKey: '',
warReportList: [],
messageList: [],
serviceMerchantId: ''
......@@ -88,29 +89,21 @@ Component({
showPoster(e) {
const { item } = e.currentTarget.dataset
this.setData({
findKey: 'crowdFundActivityId',
posterItem: {
activityName: item.activityName,
posterUrl: item.valueUrl,
crowdFundActivityId: item.valueUrl
crowdFundActivityId: item.valueUrl,
type: 'warReport'
}
})
},
// copyLink(e) {
// console.log(e)
// let that = this
// let { url } = e.currentTarget.dataset
// this.ewmChange(url)
// setTimeout(() => {
// this.share()
// }, 100)
// },
async copyLink(e) {
const { item } = e.currentTarget.dataset,
posterObj = this.selectComponent('#poster')
// { options } = wx.$router.getPageInstance()
// item.crowdFundActivityId
// console.log(options)
this.setData({
findKey: 'activityId'
})
try {
let flag = await posterObj.check(item)
posterObj.setData({
......
......@@ -118,6 +118,6 @@
</scroll-view>
</view>
</view>
<crowdfund-poster findKey="crowdFundActivityId" id="poster" item="{{posterItem}}" />
<crowdfund-poster findKey="{{findKey}}" id="poster" item="{{posterItem}}" />
<canvas class="erweimaCanvas" style="width: 600rpx; height: 600rpx;" canvas-id="myQrcode" />
const navStyle = 'background-color: transparent;'
import { IMG_URL } from '~/utils/constantData.js'
import Util from '~/utils/util.js'
// import Util from '~/utils/util.js'
import { deleteSecond } from '~/utils/format'
import { senceData } from './constant/data'
const IMAGES = Object.freeze({
arrow: `${IMG_URL}/index/point.png`,
......@@ -329,7 +330,7 @@ Page({
//视频弹窗
wx.$eventbus.on('getvideo', e => {
// console.log('getvideo event bus: ', e);
let url = Util.getCurrentPageUrl()
let url = wx.$util.getCurrentPageUrl()
if (url == '/pages/tab/index/index') {
let obj = {
videoTitle: e.title,
......@@ -430,20 +431,14 @@ Page({
if (posterId == result.valueUrl) return
// 为2是已经展示过了
wx.$storage.set('posterId', result.valueUrl)
let time = result.updatedTime.split(' ')
let moth = time[0].split('-')
let hour = time[1].split(':')
moth.shift()
hour = hour.slice(0, -1)
moth = moth.join('-')
hour = hour.join(':')
let updatedTime = `${moth} ${hour}`
let updatedTime = deleteSecond(result.updatedTime)
console.log(updatedTime)
this.setData({
posterItem: {
activityName: result.activityName,
// posterUrl: 'https://wx.glsx.com.cn/upload/biz/587076735934271488.png'
posterUrl: result.valueUrl,
crowdFundActivityId: item.valueUrl,
updatedTime,
type: 'warReport'
}
......
......@@ -151,3 +151,14 @@ export function setPrice(price) {
if (!decimal) decimal = '00'
return (num || 0).toString().replace(/(\d)(?=(?:\d{3})+$)/g, '$1,') + `.${decimal}`
}
export function deleteSecond(time) {
time = time.split(' ')
let moth = time[0].split('-')
let hour = time[1].split(':')
moth.shift()
hour = hour.slice(0, -1)
moth = moth.join('-')
hour = hour.join(':')
return `${moth} ${hour}`
}
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!