|
@@ -32,13 +32,13 @@
|
|
|
<button style="margin: 20px;" type="primary"
|
|
|
@tap="sheep.$router.go('/pages/user/address/edit')">修改地址</button>
|
|
|
</view> -->
|
|
|
- <view style="height: 90vh;">
|
|
|
+ <view style="height: 80vh;">
|
|
|
<view class="cu-bar bg-white ">
|
|
|
<view class="action">
|
|
|
<text class="cuIcon-titles text-orange"></text> 购物车
|
|
|
</view>
|
|
|
</view>
|
|
|
- <view style="height: 80vh;overflow-y: auto;background-color: #fff;">
|
|
|
+ <view style="height: 70vh;overflow-y: auto;background-color: #fff;">
|
|
|
<view v-for="(i, j) in nowCartList" :key="j" class="minmi" style="width: 100vw;">
|
|
|
<image class="imgPic" :src="i.url" mode=""></image>
|
|
|
<view class="rightContainer">
|
|
@@ -103,7 +103,41 @@ const handleOk= async () =>{
|
|
|
}
|
|
|
console.log('pamser',formData)
|
|
|
await goodsApi.createOrder(formData).then(res => {
|
|
|
- console.log(res)
|
|
|
+ // console.log(res)
|
|
|
+ let data = JSON.stringify(res.data)
|
|
|
+ console.log("res.data:"+JSON.stringify(res.data))
|
|
|
+ console.log("data.appId:"+data.appId)
|
|
|
+ let appId = res.data.appId;
|
|
|
+ let timeStamp = res.data.timeStamp;
|
|
|
+ let nonceStr = res.data.nonceStr;
|
|
|
+ let packageX = res.data.packageX;
|
|
|
+ let signType = res.data.signType;
|
|
|
+ let paySign = res.data.paySign;
|
|
|
+ console.log(appId, "appId")
|
|
|
+ console.log(timeStamp, "timeStamp")
|
|
|
+ console.log(nonceStr, "nonceStr")
|
|
|
+ console.log(packageX, "package")
|
|
|
+ console.log(signType, "signType")
|
|
|
+ console.log(paySign, "paySign")
|
|
|
+ uni.requestPayment({
|
|
|
+ provider: "wxpay",
|
|
|
+ timeStamp: timeStamp, // 时间戳(单位:秒)
|
|
|
+ nonceStr: nonceStr, // 随机字符串
|
|
|
+ package: packageX, // 固定值
|
|
|
+ signType: signType,
|
|
|
+ paySign: paySign, // 签名,这里用的 MD5/RSA 签名
|
|
|
+ success(res) {
|
|
|
+ console.log("success" + JSON.stringify(res))
|
|
|
+ uni.reLaunch({
|
|
|
+ url: 'pages/order/list'
|
|
|
+ });
|
|
|
+ sheep.$helper.toast('支付成功')
|
|
|
+ },
|
|
|
+ fail(res) {
|
|
|
+ console.log("fail" + JSON.stringify(res))
|
|
|
+ sheep.$helper.toast('支付失败')
|
|
|
+ }
|
|
|
+ });
|
|
|
})
|
|
|
|
|
|
|