feat: move project
This commit is contained in:
commit
4a940f28ba
97 changed files with 5047 additions and 0 deletions
39
pages/pay/pay.js
Normal file
39
pages/pay/pay.js
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
import R from '../../utils/request';
|
||||
import C from '../../utils/constant';
|
||||
import * as F from '../../utils/func';
|
||||
Page({
|
||||
data: {
|
||||
|
||||
},
|
||||
onLoad(options) {
|
||||
const { order_no, redirect_url } = options;
|
||||
|
||||
R.post('/index.php/api/v1/pay_order_shop', { order_no }).then(({ model }) => {
|
||||
wx.requestPayment({
|
||||
...model,
|
||||
success(res) {
|
||||
wx.showToast({
|
||||
title: '支付成功',
|
||||
icon: 'success',
|
||||
duration: 2000,
|
||||
success() {
|
||||
wx.redirectTo({
|
||||
url: '/pages/shop/shop?path=user',
|
||||
});
|
||||
}
|
||||
})
|
||||
},
|
||||
fail(res) {
|
||||
wx.showToast({
|
||||
title: '支付失败',
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
})
|
||||
wx.redirectTo({
|
||||
url: '/pages/shop/shop?path=user',
|
||||
});
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
})
|
||||
5
pages/pay/pay.json
Normal file
5
pages/pay/pay.json
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"navigationBarTitleText": "支付",
|
||||
"backgroundTextStyle": "light",
|
||||
"usingComponents": {}
|
||||
}
|
||||
1
pages/pay/pay.wxml
Normal file
1
pages/pay/pay.wxml
Normal file
|
|
@ -0,0 +1 @@
|
|||
<view class="tip">支付中...</view>
|
||||
4
pages/pay/pay.wxss
Normal file
4
pages/pay/pay.wxss
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
.tip {
|
||||
text-align: center;
|
||||
margin-top: 20px;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue