Commit 5a75068b authored by 潘永坪's avatar 潘永坪

支付联调

parent cf0a1f06
...@@ -53,12 +53,12 @@ ...@@ -53,12 +53,12 @@
<!-- <button @click="getUserInfo()"> 授权获取头像昵称 </button> --> <!-- <button @click="getUserInfo()"> 授权获取头像昵称 </button> -->
<view class="bottom"> <view class="bottom">
<!--#ifdef MP-WEIXIN --> <!--#ifdef MP-WEIXIN -->
<web-view src="https://wx.pangdly.com"></web-view> <!-- <web-view src="https://wx.pangdly.com"></web-view> -->
<!--#endif--> <!--#endif-->
<!--#ifdef MP-ALIPAY --> <!--#ifdef MP-ALIPAY -->
<web-view src="https://wx.pangdly.com?appId=2021001194629244&ticket=123456"></web-view> <!-- <web-view src="https://wx.pangdly.com?appId=2021001194629244&ticket=123456"></web-view> -->
<!--#endif--> <!--#endif-->
<button @click="aaa()">456</button>
</view> </view>
</view> </view>
</template> </template>
...@@ -116,6 +116,11 @@ ...@@ -116,6 +116,11 @@
} }
}) })
}, },
aaa(){
uni.navigateTo({
url:'../payment/payment'
});
}
} }
} }
......
<template> <template>
<view> <view>
<div class="middle" v-show="bodyShow">
<div class="main">
<!-- --------------------------------------复票----------------------------------------------- -->
<div v-if="orderList!=''" v-for="item of orderList" :key="item.id" class="product">
<p>
<span>
{{item.merchantName}}{{item.productName}}
</span>
<span>
<small style="font-size: 0.24rem;">¥</small>{{item.unitPrice}}
<i>x</i>
{{item.orderNum}}<br />
<small style="margin-top: 0.15rem;font-size: 0.22rem;display: inline-block;color:#f45803;" v-if="item.depositReceived">押金:{{item.depositReceived}}</small>
</span>
</p>
<p class="coupon" v-if="item.pdDiscountMoney">
<span>
</span>
<i>
<small style="font-size: 0.24rem;"></small>{{item.pdDiscountMoney}}
</i>
</p>
</div>
<!-- --------------------------------------单票----------------------------------------------- -->
<div v-if="orderList==''" class="product">
<p>
<span>
{{merchantName}}{{productName}}
</span>
<span style="text-align: right;">
<small style="font-size: 0.24rem;">¥</small>{{unitPrice}}
<i>x</i>
{{orderNum}}<br />
<small style="margin-top: 0.15rem;font-size: 0.22rem;display: inline-block;color:#f45803;" v-if="depositReceived">押金:{{depositReceived}}</small>
</span>
</p>
<p class="coupon" v-if="pdDiscountMoney">
<span>
</span>
<i>
<small style="font-size: 0.24rem;"></small>{{pdDiscountMoney}}
</i>
</p>
</div>
<p class="mainP3">
<span>
实际支付
</span>
<span>
<!--<i>
¥{{totalMoney}}
</i>-->
<i>
<small style="font-size: 0.28rem;">¥</small>{{pdOrderMoney}}
</i>
</span>
</p>
<div class="mainDiv">
<span>
<img src="@/assets/img/common/weixin.png" style="width: 0.7rem;" />
</span>
<div>
<p>微信支付</p>
</div>
<span>
<img src="@/assets/img/common/input.png" style="width: 0.32rem;" />
</span>
</div>
</div>
</div>
<div class="bottom" v-show="bodyShow">
<p>
<span>
实付款
</span>
<span>
<i>¥</i>{{pdOrderMoney}}
</span>
</p>
<p>
<a href="tel:400-072-0368">
<img src="@/assets/img/combination/kefu11.png" style="width: 0.31rem;" />
</a>
<a @click="weChatPay()">去支付</a>
</p>
</div>
</view> </view>
</template> </template>
...@@ -12,22 +111,40 @@ ...@@ -12,22 +111,40 @@
} }
}, },
onLoad(option){ onLoad(option){
let data = {
orderId:"z001622021317935817023873227d6b1", //订单Id
userId:"oh2UV1lyYABHMZ1rMlgjhVHyyYDQ", //用户Id
payType:42, //支付类型
}
this.$request("orderc/order/findOrderInfo?debug=true", data).then((res) => {
if (res.code == "00") {
uni.requestPayment({ uni.requestPayment({
provider: 'wxpay', provider: 'wxpay',
timeStamp:option.timeStamp, timeStamp:res.data.timestamp,
nonceStr:option.nonceStr, nonceStr:res.data.noncestr,
package:option.package, package:res.data.package,
signType:option.signType, signType:res.data.signType,
paySign:option.paySign, paySign:res.data.sign,
success: function (res) { success: function (res) {
uni.redirectTo({ uni.redirectTo({
url: 'paySuccess?orderId=123456' url: 'paySuccess?orderId=123456'
}) })
}, },
fail: function (err) { fail: function (err) {
uni.showToast(err) uni.showToast({
title:err.errMsg,
duration:2000
})
} }
}) })
}else{
uni.showToast({
title:res.message
})
}
})
}, },
......
<view class="bottom"><web-view src="https://wx.pangdly.com?appId=2021001194629244&ticket=123456"></web-view></view> <view class="bottom"><button data-event-opts="{{[['tap',[['aaa']]]]}}" onTap="__e">456</button></view>
\ No newline at end of file \ No newline at end of file
...@@ -253,6 +253,11 @@ var _default = ...@@ -253,6 +253,11 @@ var _default =
console.log(res); console.log(res);
} }); } });
},
aaa: function aaa() {
uni.navigateTo({
url: '../payment/payment' });
} } };exports.default = _default; } } };exports.default = _default;
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-alipay/dist/index.js */ 1)["default"])) /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-alipay/dist/index.js */ 1)["default"]))
......
<view></view> <view><view hidden="{{!(bodyShow)}}" class="middle _div"><view class="main _div"><block a:for="{{orderList}}" a:for-item="item" a:for-index="__i0__" a:key="id"><block a:if="{{orderList!=''}}"><view class="product _div"><view class="_p"><label class="_span">{{''+item.merchantName+"("+item.productName+')'}}</label><label class="_span"><view style="font-size:0.24rem;" class="_small">¥</view>{{item.unitPrice+''}}<view class="_i">x</view>{{''+item.orderNum}}<view class="_br"></view><block a:if="{{item.depositReceived}}"><view style="margin-top:0.15rem;font-size:0.22rem;display:inline-block;color:#f45803;" class="_small">{{"押金:"+item.depositReceived}}</view></block></label></view><block a:if="{{item.pdDiscountMoney}}"><view class="coupon _p"><label class="_span">券</label><view class="_i"><view style="font-size:0.24rem;" class="_small">-¥</view>{{item.pdDiscountMoney+''}}</view></view></block></view></block></block><block a:if="{{orderList==''}}"><view class="product _div"><view class="_p"><label class="_span">{{''+merchantName+"("+productName+')'}}</label><label style="text-align:right;" class="_span"><view style="font-size:0.24rem;" class="_small">¥</view>{{unitPrice+''}}<view class="_i">x</view>{{''+orderNum}}<view class="_br"></view><block a:if="{{depositReceived}}"><view style="margin-top:0.15rem;font-size:0.22rem;display:inline-block;color:#f45803;" class="_small">{{"押金:"+depositReceived}}</view></block></label></view><block a:if="{{pdDiscountMoney}}"><view class="coupon _p"><label class="_span">券</label><view class="_i"><view style="font-size:0.24rem;" class="_small">-¥</view>{{pdDiscountMoney+''}}</view></view></block></view></block><view class="mainP3 _p"><label class="_span">实际支付</label><label class="_span"><view class="_i"><view style="font-size:0.28rem;" class="_small">¥</view>{{pdOrderMoney+''}}</view></label></view><view class="mainDiv _div"><label class="_span"><image style="width:0.7rem;" src="{{$root.m0}}" class="_img"></image></label><view class="_div"><view class="_p">微信支付</view></view><label class="_span"><image style="width:0.32rem;" src="{{$root.m1}}" class="_img"></image></label></view></view></view><view hidden="{{!(bodyShow)}}" class="bottom _div"><view class="_p"><label class="_span">实付款</label><label class="_span"><view class="_i">¥</view>{{pdOrderMoney+''}}</label></view><view class="_p"><navigator href="tel:400-072-0368" class="_a"><image style="width:0.31rem;" src="{{$root.m2}}" class="_img"></image></navigator><navigator data-event-opts="{{[['tap',[['weChatPay']]]]}}" onTap="__e" class="_a">去支付</navigator></view></view></view>
\ No newline at end of file \ No newline at end of file
...@@ -95,6 +95,22 @@ var render = function() { ...@@ -95,6 +95,22 @@ var render = function() {
var _vm = this var _vm = this
var _h = _vm.$createElement var _h = _vm.$createElement
var _c = _vm._self._c || _h var _c = _vm._self._c || _h
var m0 = __webpack_require__(!(function webpackMissingModule() { var e = new Error("Cannot find module '@/assets/img/common/weixin.png'"); e.code = 'MODULE_NOT_FOUND'; throw e; }()))
var m1 = __webpack_require__(!(function webpackMissingModule() { var e = new Error("Cannot find module '@/assets/img/common/input.png'"); e.code = 'MODULE_NOT_FOUND'; throw e; }()))
var m2 = __webpack_require__(!(function webpackMissingModule() { var e = new Error("Cannot find module '@/assets/img/combination/kefu11.png'"); e.code = 'MODULE_NOT_FOUND'; throw e; }()))
_vm.$mp.data = Object.assign(
{},
{
$root: {
m0: m0,
m1: m1,
m2: m2
}
}
)
} }
var recyclableRender = false var recyclableRender = false
var staticRenderFns = [] var staticRenderFns = []
...@@ -134,6 +150,105 @@ __webpack_require__.r(__webpack_exports__); ...@@ -134,6 +150,105 @@ __webpack_require__.r(__webpack_exports__);
// //
// //
// //
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
var _default = var _default =
{ {
data: function data() { data: function data() {
...@@ -142,22 +257,40 @@ var _default = ...@@ -142,22 +257,40 @@ var _default =
}, },
onLoad: function onLoad(option) { onLoad: function onLoad(option) {
var data = {
orderId: "z001622021317935817023873227d6b1", //订单Id
userId: "oh2UV1lyYABHMZ1rMlgjhVHyyYDQ", //用户Id
payType: 42 //支付类型
};
this.$request("orderc/order/findOrderInfo?debug=true", data).then(function (res) {
if (res.code == "00") {
uni.requestPayment({ uni.requestPayment({
provider: 'wxpay', provider: 'wxpay',
timeStamp: option.timeStamp, timeStamp: res.data.timestamp,
nonceStr: option.nonceStr, nonceStr: res.data.noncestr,
package: option.package, package: res.data.package,
signType: option.signType, signType: res.data.signType,
paySign: option.paySign, paySign: res.data.sign,
success: function success(res) { success: function success(res) {
uni.redirectTo({ uni.redirectTo({
url: 'paySuccess?orderId=123456' }); url: 'paySuccess?orderId=123456' });
}, },
fail: function fail(err) { fail: function fail(err) {
uni.showToast(err); uni.showToast({
title: err.errMsg,
duration: 2000 });
} }); } });
} else {
uni.showToast({
title: res.message });
}
});
} };exports.default = _default; } };exports.default = _default;
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-alipay/dist/index.js */ 1)["default"])) /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-alipay/dist/index.js */ 1)["default"]))
......
...@@ -15,5 +15,6 @@ ...@@ -15,5 +15,6 @@
"desc": "请点击确定" "desc": "请点击确定"
} }
}, },
"usingComponents": {} "usingComponents": {},
"sitemapLocation": "sitemap.json"
} }
\ No newline at end of file
...@@ -253,6 +253,11 @@ var _default = ...@@ -253,6 +253,11 @@ var _default =
console.log(res); console.log(res);
} }); } });
},
aaa: function aaa() {
uni.navigateTo({
url: '../payment/payment' });
} } };exports.default = _default; } } };exports.default = _default;
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 1)["default"])) /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 1)["default"]))
......
<view class="bottom"><web-view src="https://wx.pangdly.com"></web-view></view> <view class="bottom"><button data-event-opts="{{[['tap',[['aaa']]]]}}" bindtap="__e">456</button></view>
\ No newline at end of file \ No newline at end of file
<view></view> <view><view hidden="{{!(bodyShow)}}" class="middle _div"><view class="main _div"><block wx:for="{{orderList}}" wx:for-item="item" wx:for-index="__i0__" wx:key="id"><block wx:if="{{orderList!=''}}"><view class="product _div"><view class="_p"><label class="_span">{{''+item.merchantName+"("+item.productName+')'}}</label><label class="_span"><view style="font-size:0.24rem;" class="_small">¥</view>{{item.unitPrice+''}}<view class="_i">x</view>{{''+item.orderNum}}<view class="_br"></view><block wx:if="{{item.depositReceived}}"><view style="margin-top:0.15rem;font-size:0.22rem;display:inline-block;color:#f45803;" class="_small">{{"押金:"+item.depositReceived}}</view></block></label></view><block wx:if="{{item.pdDiscountMoney}}"><view class="coupon _p"><label class="_span">券</label><view class="_i"><view style="font-size:0.24rem;" class="_small">-¥</view>{{item.pdDiscountMoney+''}}</view></view></block></view></block></block><block wx:if="{{orderList==''}}"><view class="product _div"><view class="_p"><label class="_span">{{''+merchantName+"("+productName+')'}}</label><label style="text-align:right;" class="_span"><view style="font-size:0.24rem;" class="_small">¥</view>{{unitPrice+''}}<view class="_i">x</view>{{''+orderNum}}<view class="_br"></view><block wx:if="{{depositReceived}}"><view style="margin-top:0.15rem;font-size:0.22rem;display:inline-block;color:#f45803;" class="_small">{{"押金:"+depositReceived}}</view></block></label></view><block wx:if="{{pdDiscountMoney}}"><view class="coupon _p"><label class="_span">券</label><view class="_i"><view style="font-size:0.24rem;" class="_small">-¥</view>{{pdDiscountMoney+''}}</view></view></block></view></block><view class="mainP3 _p"><label class="_span">实际支付</label><label class="_span"><view class="_i"><view style="font-size:0.28rem;" class="_small">¥</view>{{pdOrderMoney+''}}</view></label></view><view class="mainDiv _div"><label class="_span"><image style="width:0.7rem;" src="{{$root.m0}}" class="_img"></image></label><view class="_div"><view class="_p">微信支付</view></view><label class="_span"><image style="width:0.32rem;" src="{{$root.m1}}" class="_img"></image></label></view></view></view><view hidden="{{!(bodyShow)}}" class="bottom _div"><view class="_p"><label class="_span">实付款</label><label class="_span"><view class="_i">¥</view>{{pdOrderMoney+''}}</label></view><view class="_p"><navigator href="tel:400-072-0368" class="_a"><image style="width:0.31rem;" src="{{$root.m2}}" class="_img"></image></navigator><navigator data-event-opts="{{[['tap',[['weChatPay']]]]}}" bindtap="__e" class="_a">去支付</navigator></view></view></view>
\ No newline at end of file \ No newline at end of file
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
"ignore": [] "ignore": []
}, },
"setting": { "setting": {
"urlCheck": true, "urlCheck": false,
"es6": true, "es6": true,
"enhance": false, "enhance": false,
"postcss": true, "postcss": true,
......
{
"setting": {},
"condition": {
"plugin": {
"list": []
},
"game": {
"list": []
},
"gamePlugin": {
"list": []
},
"miniprogram": {
"list": [
{
"name": "pages/payment/payment",
"pathName": "pages/payment/payment",
"query": "",
"scene": null
}
]
}
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment