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.
73 lines
1.5 KiB
73 lines
1.5 KiB
2 years ago
|
const axios = require('../../api/index')
|
||
|
|
||
|
Component({
|
||
|
/**
|
||
|
* 组件的属性列表
|
||
|
*/
|
||
|
properties: {
|
||
|
buycar_card_data: {
|
||
|
type: Object,
|
||
|
value: {},
|
||
|
}
|
||
|
},
|
||
|
|
||
|
/**
|
||
|
* 组件的初始数据
|
||
|
*/
|
||
|
data: {
|
||
|
|
||
|
},
|
||
|
/**
|
||
|
* 组件的方法列表
|
||
|
*/
|
||
|
methods: {
|
||
|
// 刷新
|
||
|
refresh() {
|
||
|
this.triggerEvent('refresh', {item:this.data.buycar_card_data})
|
||
|
},
|
||
|
// 置顶
|
||
|
totop() {
|
||
|
this.triggerEvent('totop', {item:this.data.buycar_card_data})
|
||
|
},
|
||
|
// 正在招人
|
||
|
change_status(e) {
|
||
|
console.log(1111)
|
||
|
var data = {
|
||
|
id: this.data.buycar_card_data.id,
|
||
|
value:e.detail.value
|
||
|
}
|
||
|
this.triggerEvent('change_status', data)
|
||
|
|
||
|
},
|
||
|
// 修改
|
||
|
go_edit() {
|
||
|
console.log('修改')
|
||
|
console.log(this.data.buycar_card_data.id)
|
||
|
axios.getEquipmentById(this.data.buycar_card_data.id).then(res => {
|
||
|
console.log(res)
|
||
|
var data = res.data
|
||
|
var url = `/pages/new_show/new_show?data=${escape(JSON.stringify(data))}`
|
||
|
wx.navigateTo({
|
||
|
url,
|
||
|
})
|
||
|
}).catch(err => {
|
||
|
console.log(err)
|
||
|
})
|
||
|
},
|
||
|
|
||
|
go_detail() {
|
||
|
if(this.data.buycar_card_data.state==20||this.data.buycar_card_data.state==30){
|
||
|
wx.navigateTo({
|
||
|
url:'/pages/detail/detail?id='+this.data.buycar_card_data.id,
|
||
|
})
|
||
|
}else{
|
||
|
wx.navigateTo({
|
||
|
url:'/pages/my_release/my_release_detail/my_release_detail?id='+this.data.buycar_card_data.id,
|
||
|
})
|
||
|
}
|
||
|
|
||
|
},
|
||
|
|
||
|
}
|
||
|
})
|