提交 694323b8 编写于 作者: 乄&失落迷迭ヅ's avatar 乄&失落迷迭ヅ 🎨

提交

上级 0dde27d2
......@@ -293,117 +293,132 @@ export default {
}
});
},
go(){},
paymoney() {
let money=0
if (this.num == 1) {
money=19
}
if (this.num == 2) {
money=35
}
if (this.num == 3) {
money=57
}
if (this.num == 4) {
money=69
}
console.log('当前价格',money);
uni.request({
url: 'http://www.gyuantecdg.cn:1515/data/test/insert/numtest',
method: 'POST',
data: {
paymuch: 18,
province:this.chosesf
},
success: res => {
console.log('提交信息成功', this.getimg);
}
});
let useridgo = uni.getStorageSync('userid');
console.log('提交的', this.imageValues);
for (var i = 0; i < this.imageValues.length; i++) {
console.log(i,'当前');
const uploadTask = uni.uploadFile({
url: 'http://www.gyuantecdg.cn:1515/data/test/file/upload/remix/' + useridgo , //仅为示例,非真实的接口地址
filePath: this.imageValues[i],
name: 'file',
success: uploadFileRes => {
uni.showToast({
title:'成功提交第'+i+''
})
this.lookimg()
uni.hideLoading();
this.ispost = true;
setTimeout(() => {
this.ispost = false;
this.current = 1;
console.log(this.current);
}, 2000);
},
fail: error => {
console.log('失败啦', error);
}
});
}
uni.showToast({
title: '支付成功',
icon: 'success',
duration: 1000
});
// uni.request({
// url: 'http://www.gyuantecdg.cn:1515/payment/createorder?amount='+3+'&desc='+'灰机',
// method: 'POST',
// data:{
// "amount": 3,
// "desc": "灰机",
// },
// header: {
// 'contentType': 'application/x-www-form-urlencoded' //自定义请求头信息
// },
// method: 'POST',
// success: res => {
// console.log('付费啦A', res);
// this.paymoneys=res.data
// console.log('付费啦Art', this.paymoneys);
// console.log(this.imageValues);
// let order=[
// {
// "appid": "wx1773a03e19c7f1ad", // 微信开放平台 - 应用 - AppId,注意和微信小程序、公众号 AppId 可能不一致
// "noncestr": this.paymoneys.noncestr, // 随机字符串
// "package": "Sign=WXPay", // 固定值
// "partnerid": "1605853086", // 微信支付商户号
// "prepayid": 'wx2717170354460316eb340c50471c4d0000', // 统一下单订单号
// "timestamp": this.paymoneys.timestamp, // 时间戳(单位:秒)
// "sign": this.paymoneys.sign // 签名,这里用的 MD5/RSA 签名
// },
// ]
// console.log('看看准备的',order);
// uni.requestPayment({
// "provider": "wxpay",
// "orderInfo": {
// "appid": "wx1773a03e19c7f1ad", // 微信开放平台 - 应用 - AppId,注意和微信小程序、公众号 AppId 可能不一致
// "noncestr": this.paymoneys.noncestr, // 随机字符串
// "package": "Sign=WXPay", // 固定值
// "partnerid": "1605853086", // 微信支付商户号
// "prepayid": 'wx2717170354460316eb340c50471c4d0000', // 统一下单订单号
// "timestamp": this.paymoneys.timestamp, // 时间戳(单位:秒)
// "sign": '39C979719391482BB4B6798CC6F74C155D183B99' // 签名,这里用的 MD5/RSA 签名
// },
// success(res) {
// console.log('成功',res);
// },
// fail(e) {
// console.log('失败',e);
// }
// })
if (this.num!=0) {
if (this.chosesf!='请选择所属的省份') {
let money=0
if (this.num == 1) {
money=19
}
if (this.num == 2) {
money=35
}
if (this.num == 3) {
money=57
}
if (this.num == 4) {
money=69
}
console.log('当前价格',money);
uni.request({
url: 'http://www.gyuantecdg.cn:1515/data/test/insert/numtest',
method: 'POST',
data: {
paymuch: 18,
province:this.chosesf
},
success: res => {
}
});
let useridgo = uni.getStorageSync('userid');
console.log('提交的', this.imageValues);
uni.showToast({
title:'成功提交!'
})
for (var i = 0; i < this.imageValues.length; i++) {
const uploadTask = uni.uploadFile({
url: 'http://www.gyuantecdg.cn:1515/data/test/file/upload/remix/' + useridgo , //仅为示例,非真实的接口地址
filePath: this.imageValues[i],
name: 'file',
success: uploadFileRes => {
this.lookimg()
uni.hideLoading();
this.ispost = true;
setTimeout(() => {
this.ispost = false;
this.current = 1;
}, 2000);
},
fail: error => {
console.log('失败啦', error);
}
});
}
uni.showToast({
title: '支付成功',
icon: 'success',
duration: 1000
});
// uni.request({
// url: 'http://www.gyuantecdg.cn:1515/payment/createorder?amount='+3+'&desc='+'灰机',
// method: 'POST',
// data:{
// "amount": 3,
// "desc": "灰机",
// },
// header: {
// 'contentType': 'application/x-www-form-urlencoded' //自定义请求头信息
// },
// method: 'POST',
// success: res => {
// console.log('付费啦A', res);
// this.paymoneys=res.data
// console.log('付费啦Art', this.paymoneys);
// console.log(this.imageValues);
// let order=[
// {
// "appid": "wx1773a03e19c7f1ad", // 微信开放平台 - 应用 - AppId,注意和微信小程序、公众号 AppId 可能不一致
// "noncestr": this.paymoneys.noncestr, // 随机字符串
// "package": "Sign=WXPay", // 固定值
// "partnerid": "1605853086", // 微信支付商户号
// "prepayid": 'wx2717170354460316eb340c50471c4d0000', // 统一下单订单号
// "timestamp": this.paymoneys.timestamp, // 时间戳(单位:秒)
// "sign": this.paymoneys.sign // 签名,这里用的 MD5/RSA 签名
// },
// ]
// console.log('看看准备的',order);
// uni.requestPayment({
// "provider": "wxpay",
// "orderInfo": {
// "appid": "wx1773a03e19c7f1ad", // 微信开放平台 - 应用 - AppId,注意和微信小程序、公众号 AppId 可能不一致
// "noncestr": this.paymoneys.noncestr, // 随机字符串
// "package": "Sign=WXPay", // 固定值
// "partnerid": "1605853086", // 微信支付商户号
// "prepayid": 'wx2717170354460316eb340c50471c4d0000', // 统一下单订单号
// "timestamp": this.paymoneys.timestamp, // 时间戳(单位:秒)
// "sign": '39C979719391482BB4B6798CC6F74C155D183B99' // 签名,这里用的 MD5/RSA 签名
// },
// success(res) {
// console.log('成功',res);
// },
// fail(e) {
// console.log('失败',e);
// }
// })
// setTimeout(() => {}, 1000);
// setTimeout(() => {}, 2000);
// }
// });
// setTimeout(() => {}, 1000);
// setTimeout(() => {}, 2000);
// }
// });
}else{
uni.showToast({
title:'请选择城市!'
})
}
}else{
uni.showToast({
title:'请选择图片!'
})
}
},
// 选中
chose(index) {},
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册