|
|
|
|
// pages/quest/quest.js
|
|
|
|
|
import {http} from '../../../../../utils/util'
|
|
|
|
|
Page({
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 页面的初始数据
|
|
|
|
|
*/
|
|
|
|
|
data: {
|
|
|
|
|
type:0,
|
|
|
|
|
// questes: [
|
|
|
|
|
// {
|
|
|
|
|
// time: '2022-3-18~2022-5-18',
|
|
|
|
|
// title: '星途揽月新款抖音视频需求需要马上贯彻落实',
|
|
|
|
|
// text: '以一流的设计和领先的技术为基础以人工智能为差异化,从外观、性能上以一流的设计和领先的技术为基础以人工智能为差异化,从外观、性能上...',
|
|
|
|
|
// url: 'https://www.oa00.com/#/attendance/index',
|
|
|
|
|
// type: 1,
|
|
|
|
|
// num: '258w',
|
|
|
|
|
// duration: '02:32',
|
|
|
|
|
// },{
|
|
|
|
|
// time: '2022-3-18~2022-5-18',
|
|
|
|
|
// title: '星途揽月新款抖音视频需求需要马上贯彻落实',
|
|
|
|
|
// text: '以一流的设计和领先的技术为基础以人工智能为差异化,从外观、性能上以一流的设计和领先的技术为基础以人工智能为差异化,从外观、性能上...',
|
|
|
|
|
// url: 'https://www.oa00.com/#/attendance/index',
|
|
|
|
|
// type: 1,
|
|
|
|
|
// num: '258w',
|
|
|
|
|
// duration: '02:32',
|
|
|
|
|
// },{
|
|
|
|
|
// time: '2022-3-18~2022-5-18',
|
|
|
|
|
// title: '星途揽月新款抖音视频需求需要马上贯彻落实',
|
|
|
|
|
// text: '以一流的设计和领先的技术为基础以人工智能为差异化,从外观、性能上以一流的设计和领先的技术为基础以人工智能为差异化,从外观、性能上...',
|
|
|
|
|
// url: 'https://www.oa00.com/#/attendance/index',
|
|
|
|
|
// type: 1,
|
|
|
|
|
// num: '258w',
|
|
|
|
|
// duration: '02:32',
|
|
|
|
|
// },{
|
|
|
|
|
// time: '2022-3-18~2022-5-18',
|
|
|
|
|
// title: '星途揽月新款抖音视频需求需要马上贯彻落实',
|
|
|
|
|
// text: '以一流的设计和领先的技术为基础以人工智能为差异化,从外观、性能上以一流的设计和领先的技术为基础以人工智能为差异化,从外观、性能上...',
|
|
|
|
|
// url: 'https://www.oa00.com/#/attendance/index',
|
|
|
|
|
// type: 1,
|
|
|
|
|
// num: '258w',
|
|
|
|
|
// duration: '02:32',
|
|
|
|
|
// },{
|
|
|
|
|
// time: '2022-3-18~2022-5-18',
|
|
|
|
|
// title: '星途揽月新款抖音视频需求需要马上贯彻落实',
|
|
|
|
|
// text: '以一流的设计和领先的技术为基础以人工智能为差异化,从外观、性能上以一流的设计和领先的技术为基础以人工智能为差异化,从外观、性能上...',
|
|
|
|
|
// url: 'https://www.oa00.com/#/attendance/index',
|
|
|
|
|
// type: 1,
|
|
|
|
|
// num: '258w',
|
|
|
|
|
// duration: '02:32',
|
|
|
|
|
// },{
|
|
|
|
|
// time: '2022-3-18~2022-5-18',
|
|
|
|
|
// title: '星途揽月新款抖音视频需求需要马上贯彻落实',
|
|
|
|
|
// text: '以一流的设计和领先的技术为基础以人工智能为差异化,从外观、性能上以一流的设计和领先的技术为基础以人工智能为差异化,从外观、性能上...',
|
|
|
|
|
// url: 'https://www.oa00.com/#/attendance/index',
|
|
|
|
|
// type: 1,
|
|
|
|
|
// num: '258w',
|
|
|
|
|
// duration: '02:32',
|
|
|
|
|
// },{
|
|
|
|
|
// time: '2022-3-18~2022-5-18',
|
|
|
|
|
// title: '星途揽月新款抖音视频需求需要马上贯彻落实',
|
|
|
|
|
// text: '以一流的设计和领先的技术为基础以人工智能为差异化,从外观、性能上以一流的设计和领先的技术为基础以人工智能为差异化,从外观、性能上...',
|
|
|
|
|
// url: 'https://www.oa00.com/#/attendance/index',
|
|
|
|
|
// type: 1,
|
|
|
|
|
// num: '258w',
|
|
|
|
|
// duration: '02:32',
|
|
|
|
|
// },
|
|
|
|
|
// ],
|
|
|
|
|
records:[],
|
|
|
|
|
questes:[],
|
|
|
|
|
infoObject:{},
|
|
|
|
|
isClick:false
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
back(){
|
|
|
|
|
wx.navigateBack({
|
|
|
|
|
delta: 1
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
to(e) {
|
|
|
|
|
console.log(e.target.dataset.url)
|
|
|
|
|
wx.navigateTo({
|
|
|
|
|
url: e.target.dataset.url
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
//跳转详情
|
|
|
|
|
detail(e){
|
|
|
|
|
console.log(e)
|
|
|
|
|
wx.setStorageSync('info', e.currentTarget.dataset.cycle_id)
|
|
|
|
|
wx.navigateTo({
|
|
|
|
|
url:"/pages/index/subpage/brand/brandDetails/brandDetails?type=3"
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
getcollection(){
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
//收藏
|
|
|
|
|
collection(e){
|
|
|
|
|
let userId = this.data.infoObject.id
|
|
|
|
|
let referenceId = this.data.infoObject.id
|
|
|
|
|
console.log(e)
|
|
|
|
|
// wx.navigateTo({
|
|
|
|
|
// url:"/pages/user/subpage/newest/newest"
|
|
|
|
|
// })
|
|
|
|
|
http("/userReference/add", "post", {userId,referenceId
|
|
|
|
|
}).then(res =>{
|
|
|
|
|
this.setData({
|
|
|
|
|
// userId:e.currentTarget.dataset.cycle_id,
|
|
|
|
|
// referenceId:this.id
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 生命周期函数--监听页面加载
|
|
|
|
|
*/
|
|
|
|
|
onLoad: function (options) {
|
|
|
|
|
wx.setNavigationBarTitle({
|
|
|
|
|
title: '任务中心',
|
|
|
|
|
success: function (res) {}
|
|
|
|
|
})
|
|
|
|
|
this.setData({
|
|
|
|
|
type:options.type,
|
|
|
|
|
infoObject:wx.getStorageSync('info')
|
|
|
|
|
})
|
|
|
|
|
this.getrecordslist()
|
|
|
|
|
this.getcollection()
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
getrecordslist(){
|
|
|
|
|
http("/topicActivity/list", "post", {
|
|
|
|
|
}).then(res =>{
|
|
|
|
|
this.setData({
|
|
|
|
|
records: res.data.records,
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 生命周期函数--监听页面初次渲染完成
|
|
|
|
|
*/
|
|
|
|
|
onReady() {
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 生命周期函数--监听页面显示
|
|
|
|
|
*/
|
|
|
|
|
onShow() {
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 生命周期函数--监听页面隐藏
|
|
|
|
|
*/
|
|
|
|
|
onHide() {
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 生命周期函数--监听页面卸载
|
|
|
|
|
*/
|
|
|
|
|
onUnload() {
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 页面相关事件处理函数--监听用户下拉动作
|
|
|
|
|
*/
|
|
|
|
|
onPullDownRefresh() {
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 页面上拉触底事件的处理函数
|
|
|
|
|
*/
|
|
|
|
|
onReachBottom() {
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 用户点击右上角分享
|
|
|
|
|
*/
|
|
|
|
|
onShareAppMessage:function() {
|
|
|
|
|
// if (res.from === 'button') { // 来自页面内分享按钮
|
|
|
|
|
// console.log(e)
|
|
|
|
|
// }
|
|
|
|
|
return {
|
|
|
|
|
title:this.data.infoObject.title,
|
|
|
|
|
path:"pages/index/subpage/brand/brandDetails/brandDetails?type=3",
|
|
|
|
|
imageUrl:"/pages/index/shortimage/img_xingtusi@2x.png",
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
//保存
|
|
|
|
|
preserve(){
|
|
|
|
|
// if(type=1){
|
|
|
|
|
// 视频
|
|
|
|
|
wx.saveVideoToPhotosAlbum({
|
|
|
|
|
filePath: 'wxfile://xxx',
|
|
|
|
|
success (res) {
|
|
|
|
|
console.log(res.errMsg)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
// }else{
|
|
|
|
|
//图片
|
|
|
|
|
wx.saveImageToPhotosAlbum({
|
|
|
|
|
filePath:"../../../shortimage/img_xingtue@2x.png",
|
|
|
|
|
success(res) { }
|
|
|
|
|
})
|
|
|
|
|
// }
|
|
|
|
|
}
|
|
|
|
|
})
|