You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
131 lines
2.3 KiB
131 lines
2.3 KiB
// pages/quest/subpage/detail/detail.js
|
|
import {
|
|
http
|
|
} from '../../../../utils/util'
|
|
Page({
|
|
/**
|
|
* 页面的初始数据
|
|
*/
|
|
data: {
|
|
top: [{
|
|
name: "详细信息",
|
|
url_act: "./image/ic_xxxx_sel@2x.png",
|
|
url_non: "./image/ic_xxxx_nor@2x.png"
|
|
}, {
|
|
name: "上传链接",
|
|
url_act: "./image/ic_sclj_sel@2x.png",
|
|
url_non: "./image/ic_sclj_nor@2x.png"
|
|
}, {
|
|
name: "线索收集",
|
|
url_act: "./image/ic_xssj_sel@2x.png",
|
|
url_non: "./image/img_xxsj_nor@2x.png"
|
|
}, {
|
|
name: "传播效果",
|
|
url_act: "./image/ic_cbsg_sel@2x.png",
|
|
url_non: "./image/ic_cbxg_nor@2x.png"
|
|
}, ],
|
|
flag: 0,
|
|
quest: null,
|
|
table: [],
|
|
data: null,
|
|
linkre: null
|
|
},
|
|
change(e) {
|
|
this.setData({
|
|
'flag': e.target.dataset.index
|
|
})
|
|
},
|
|
getdata() {
|
|
http("/task/detail", "post", {
|
|
id: this.data.quest.id
|
|
}).then(res => {
|
|
this.setData({
|
|
data: res.data,
|
|
table: res.data.rewardRuleList
|
|
})
|
|
this.setData({
|
|
'data.start': res.data.start.slice(0, 10),
|
|
'data.end': res.data.end.slice(0, 10)
|
|
})
|
|
})
|
|
http("/video/addedRecord", "post", {
|
|
taskId: this.data.quest.id
|
|
}).then(res => {
|
|
this.setData({
|
|
linkre: res.data.records
|
|
})
|
|
})
|
|
},
|
|
/**
|
|
* 生命周期函数--监听页面加载
|
|
*/
|
|
onLoad(options) {
|
|
let that = this
|
|
wx.setNavigationBarTitle({
|
|
title: '任务详情',
|
|
})
|
|
wx.setNavigationBarColor({
|
|
backgroundColor: '#006BFF',
|
|
frontColor: '#ffffff',
|
|
})
|
|
wx.getStorage({
|
|
key: 'quest',
|
|
success(res) {
|
|
console.log(res)
|
|
that.setData({
|
|
quest: res.data
|
|
})
|
|
that.getdata()
|
|
}
|
|
})
|
|
},
|
|
|
|
/**
|
|
* 生命周期函数--监听页面初次渲染完成
|
|
*/
|
|
onReady() {
|
|
|
|
},
|
|
|
|
/**
|
|
* 生命周期函数--监听页面显示
|
|
*/
|
|
onShow() {
|
|
|
|
},
|
|
|
|
/**
|
|
* 生命周期函数--监听页面隐藏
|
|
*/
|
|
onHide() {
|
|
|
|
},
|
|
|
|
/**
|
|
* 生命周期函数--监听页面卸载
|
|
*/
|
|
onUnload() {
|
|
|
|
},
|
|
|
|
/**
|
|
* 页面相关事件处理函数--监听用户下拉动作
|
|
*/
|
|
onPullDownRefresh() {
|
|
|
|
},
|
|
|
|
/**
|
|
* 页面上拉触底事件的处理函数
|
|
*/
|
|
onReachBottom() {
|
|
|
|
},
|
|
|
|
/**
|
|
* 用户点击右上角分享
|
|
*/
|
|
onShareAppMessage() {
|
|
|
|
}
|
|
}) |