|
|
@ -37,6 +37,20 @@ |
|
|
|
</view> |
|
|
|
<uv-radio-group v-model="form.topId"> |
|
|
|
<view class="list"> |
|
|
|
|
|
|
|
<view class="item"> |
|
|
|
<view class="left"> |
|
|
|
不需要置顶 |
|
|
|
</view> |
|
|
|
<view class="right"> |
|
|
|
<uv-radio |
|
|
|
size="35rpx" |
|
|
|
icon-size="35rpx" |
|
|
|
:name="0"> |
|
|
|
</uv-radio> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
|
|
|
|
<view class="item" |
|
|
|
v-for="(item, index) in upTopList" |
|
|
|
:key="index"> |
|
|
@ -70,7 +84,7 @@ |
|
|
|
<confirmationPopup |
|
|
|
ref="confirmationPopup" |
|
|
|
title="提示" |
|
|
|
@confirm="paySuccess" |
|
|
|
@confirm="payOrder" |
|
|
|
confirmText="确认支付"> |
|
|
|
<view class="confirmationPopup"> |
|
|
|
<image src="/static/image/publish/pay.png" |
|
|
@ -85,7 +99,7 @@ |
|
|
|
<confirmationPopup |
|
|
|
ref="confirmationPopupUpload" |
|
|
|
title="提示" |
|
|
|
@confirm="$utils.navigateTo('/index/index')" |
|
|
|
@confirm="$utils.redirectTo('/index/index')" |
|
|
|
confirmText="确认"> |
|
|
|
<view class="confirmationPopup"> |
|
|
|
<image src="/static/image/publish/upload.png" |
|
|
@ -118,7 +132,7 @@ |
|
|
|
form : { |
|
|
|
// image : [], |
|
|
|
content : '', |
|
|
|
// topId : '', |
|
|
|
topId : 0, |
|
|
|
title : '', |
|
|
|
}, |
|
|
|
fileList: [ |
|
|
@ -162,6 +176,8 @@ |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
// 支付成功 |
|
|
|
paySuccess(){ |
|
|
|
|
|
|
|
let data = { |
|
|
@ -178,33 +194,77 @@ |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
// 发起支付 |
|
|
|
payOrder(){ |
|
|
|
let self = this |
|
|
|
this.$api('payOrder', res => { |
|
|
|
console.log(); |
|
|
|
|
|
|
|
let data = { |
|
|
|
...this.form, |
|
|
|
isCard : 1, |
|
|
|
image : this.fileList.map((item) => item.url).join(","), |
|
|
|
isTop : this.form.topId ? 'Y' : 'N', |
|
|
|
} |
|
|
|
|
|
|
|
this.$api('infoReleaseTrends', data, |
|
|
|
res => { |
|
|
|
if(res.code == 200){ |
|
|
|
uni.requestPayment({ |
|
|
|
provider: 'wxpay', // 服务提提供商 |
|
|
|
timeStamp: res.result.timeStamp, // 时间戳 |
|
|
|
nonceStr: res.result.nonceStr, // 随机字符串 |
|
|
|
package: res.result.packageValue, |
|
|
|
signType: res.result.signType, // 签名算法 |
|
|
|
paySign: res.result.paySign, // 签名 |
|
|
|
success: function (res) { |
|
|
|
console.log('支付成功',res); |
|
|
|
self.paySuccess() |
|
|
|
}, |
|
|
|
fail: function (err) { |
|
|
|
console.log('支付失败',err); |
|
|
|
uni.showToast({ |
|
|
|
icon:'none', |
|
|
|
title:"支付失败" |
|
|
|
}) |
|
|
|
} |
|
|
|
}); |
|
|
|
if(self.form.topId){ |
|
|
|
uni.requestPayment({ |
|
|
|
provider: 'wxpay', // 服务提提供商 |
|
|
|
timeStamp: res.result.timeStamp, // 时间戳 |
|
|
|
nonceStr: res.result.nonceStr, // 随机字符串 |
|
|
|
package: res.result.packageValue, |
|
|
|
signType: res.result.signType, // 签名算法 |
|
|
|
paySign: res.result.paySign, // 签名 |
|
|
|
success: function (res) { |
|
|
|
console.log('支付成功',res); |
|
|
|
self.$refs.confirmationPopupUpload.open() |
|
|
|
// self.$refs.confirmationPopup.close() |
|
|
|
}, |
|
|
|
fail: function (err) { |
|
|
|
console.log('支付失败',err); |
|
|
|
self.$refs.confirmationPopup.close() |
|
|
|
uni.showToast({ |
|
|
|
icon:'none', |
|
|
|
title:"支付失败" |
|
|
|
}) |
|
|
|
} |
|
|
|
}); |
|
|
|
}else{ |
|
|
|
self.$refs.confirmationPopupUpload.open() |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
}) |
|
|
|
|
|
|
|
// this.$api('payOrder', res => { |
|
|
|
// console.log(); |
|
|
|
// if(res.code == 200){ |
|
|
|
// uni.requestPayment({ |
|
|
|
// provider: 'wxpay', // 服务提提供商 |
|
|
|
// timeStamp: res.result.timeStamp, // 时间戳 |
|
|
|
// nonceStr: res.result.nonceStr, // 随机字符串 |
|
|
|
// package: res.result.packageValue, |
|
|
|
// signType: res.result.signType, // 签名算法 |
|
|
|
// paySign: res.result.paySign, // 签名 |
|
|
|
// success: function (res) { |
|
|
|
// console.log('支付成功',res); |
|
|
|
// self.paySuccess() |
|
|
|
// }, |
|
|
|
// fail: function (err) { |
|
|
|
// console.log('支付失败',err); |
|
|
|
// uni.showToast({ |
|
|
|
// icon:'none', |
|
|
|
// title:"支付失败" |
|
|
|
// }) |
|
|
|
// } |
|
|
|
// }); |
|
|
|
// } |
|
|
|
// }) |
|
|
|
}, |
|
|
|
|
|
|
|
// 提交 |
|
|
|
submit(){ |
|
|
|
|
|
|
|
if(this.fileList.length == 0){ |
|
|
|