Commit f9b3aea7 authored by zhangjianguo's avatar zhangjianguo

Merge branch 'master' of http://gitlab.oytour.com/viitto/mallapp

parents d21fc2dc 9d93c931
...@@ -57,9 +57,10 @@ ...@@ -57,9 +57,10 @@
"quickapp" : {}, "quickapp" : {},
/* 小程序特有相关 */ /* 小程序特有相关 */
"mp-weixin" : { "mp-weixin" : {
"appid" : "", "appid" : "wxacd9f8cc3480d29e",
"setting" : { "setting" : {
"urlCheck" : false "urlCheck" : false,
"minified" : false
}, },
"usingComponents" : true "usingComponents" : true
}, },
...@@ -72,7 +73,7 @@ ...@@ -72,7 +73,7 @@
"mp-toutiao" : { "mp-toutiao" : {
"usingComponents" : true "usingComponents" : true
}, },
"uniStatistics": { "uniStatistics" : {
"enable": false "enable" : false
} }
} }
...@@ -2,7 +2,11 @@ ...@@ -2,7 +2,11 @@
"easycom": { "easycom": {
"^u-(.*)": "uview-ui/components/u-$1/u-$1.vue" "^u-(.*)": "uview-ui/components/u-$1/u-$1.vue"
}, },
"pages": [{ "pages": [
{
"path" : "pages/pay/pay/pay"
},
{
"path": "pages/user-center/user-center" "path": "pages/user-center/user-center"
}, { }, {
"path": "pages/cart/cart" "path": "pages/cart/cart"
...@@ -74,6 +78,7 @@ ...@@ -74,6 +78,7 @@
,{ ,{
"path" : "pages/coupon/details/details" "path" : "pages/coupon/details/details"
} }
], ],
"globalStyle": { "globalStyle": {
"navigationBarTextStyle": "black", "navigationBarTextStyle": "black",
......
<template>
<view>
<u-button @click="Pay">支付</u-button>
</view>
</template>
<script>
export default {
data() {
return {
payInfo:{},
}
},
created(){
this.getDataInfo();
},
methods: {
getDataInfo() {
let msg={
"OpenId":"ow_7I5XC1-RGwwk8QANBmWKYKmOc",
"OrderId":"1",
"OrderPayType":1,
"GoodsName":"测试商品名称"
}
this.request2(
{
url: '/api/WeChatPay/GetPayInfo',
data: msg
},
res => {
console.log("res",res);
if(res.resultCode==1){
this.payInfo=JSON.parse(res.data);
console.log("getDataInfo",this.payInfo);
}
uni.hideNavigationBarLoading();
}
);
},
Pay(){
let payInfo=this.payInfo;
uni.requestPayment({
provider: 'wxpay',
timeStamp: this.payInfo.timeStamp,
nonceStr: this.payInfo.nonceStr,
package: this.payInfo.package,
signType: this.payInfo.signType,
paySign: '',
success: function (res) {
console.log("success",res)
},
fail: function (err) {
console.log('fail:',err);
}
});
},
}
}
</script>
<style>
</style>
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