锶源昆仑商城
This commit is contained in:
99
pages/member/cause/cause.js
Normal file
99
pages/member/cause/cause.js
Normal file
@@ -0,0 +1,99 @@
|
||||
/*
|
||||
* 手太欠
|
||||
* 愿这世界都如故事里一样 美好而动人~
|
||||
*/
|
||||
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
service : '',
|
||||
orderId : '',
|
||||
identityId : '',
|
||||
username : '', //用户
|
||||
price : '', //打款金额
|
||||
name : '',
|
||||
card_no : '',
|
||||
//打款凭证
|
||||
showpath : '',
|
||||
path : '',
|
||||
disabled : false ,// 提交按钮状态
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
this.setData({
|
||||
orderId : options.order_id,
|
||||
identityId : options.identity_id
|
||||
})
|
||||
|
||||
// 获取银行+账号
|
||||
wx.$api.member.identitieSee(options.identity_id).then(res => {
|
||||
this.setData({
|
||||
service: res.data.identity.service,
|
||||
price : res.data.identity.price
|
||||
})
|
||||
}).catch(err => {})
|
||||
|
||||
// 获取账户+凭证
|
||||
wx.$api.member.orderSee(options.order_id).then(res => {
|
||||
this.setData({
|
||||
username : res.data.name,
|
||||
showpath : res.data.cover,
|
||||
path : res.data.cover,
|
||||
})
|
||||
}).catch(err => {})
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow() {
|
||||
},
|
||||
|
||||
// 上传图片
|
||||
openImg(){
|
||||
wx.chooseMedia({
|
||||
count : 1,
|
||||
success : path => {
|
||||
// 上传图片
|
||||
wx.$api.file.uploadImg(path.tempFiles[0].tempFilePath, {}).then(res=>{
|
||||
this.setData({
|
||||
showpath: res.url,
|
||||
path : res.path
|
||||
})
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 提交表单
|
||||
issueForm(e) {
|
||||
let value = e.detail.value;
|
||||
let data = {
|
||||
name : value.name,
|
||||
price : value.price,
|
||||
cover : this.data.path
|
||||
}
|
||||
wx.$api.member.orderSubmit(this.data.orderId, data).then(res => {
|
||||
wx.showToast({
|
||||
title: '提交成功',
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
})
|
||||
setTimeout(()=>{
|
||||
wx.redirectTo({
|
||||
url: '/pages/member/examine/examine'
|
||||
})
|
||||
},3000)
|
||||
this.setData({
|
||||
disabled: true
|
||||
})
|
||||
|
||||
}).catch(err => {})
|
||||
}
|
||||
})
|
||||
Reference in New Issue
Block a user