Commit 9403cb3a authored by pengguangpu's avatar pengguangpu

完善逻辑;

parent 502425a6
...@@ -17,6 +17,11 @@ ...@@ -17,6 +17,11 @@
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.13.0.tgz", "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.13.0.tgz",
"integrity": "sha512-aq6gF1BEKje4a9i9+5jimNFIpq4Q1WiwBToeRK5NvZBd/TRsmW8BsJfOEGkr76TbOyPVD3OVDN910EcUNtRYEA==" "integrity": "sha512-aq6gF1BEKje4a9i9+5jimNFIpq4Q1WiwBToeRK5NvZBd/TRsmW8BsJfOEGkr76TbOyPVD3OVDN910EcUNtRYEA=="
}, },
"throttle-debounce": {
"version": "2.2.1",
"resolved": "https://registry.npmjs.org/throttle-debounce/-/throttle-debounce-2.2.1.tgz",
"integrity": "sha512-i9hAVld1f+woAiyNGqWelpDD5W1tpMroL3NofTz9xzwq6acWBlO2dC8k5EFSZepU6oOINtV5Q3aSPoRg7o4+fA=="
},
"weui-miniprogram": { "weui-miniprogram": {
"version": "1.0.5", "version": "1.0.5",
"resolved": "https://registry.npmjs.org/weui-miniprogram/-/weui-miniprogram-1.0.5.tgz", "resolved": "https://registry.npmjs.org/weui-miniprogram/-/weui-miniprogram-1.0.5.tgz",
......
...@@ -5,7 +5,8 @@ ...@@ -5,7 +5,8 @@
"main": "app.js", "main": "app.js",
"dependencies": { "dependencies": {
"axios": "^0.20.0", "axios": "^0.20.0",
"weui-miniprogram": "^1.0.5" "weui-miniprogram": "^1.0.5",
"throttle-debounce":"^2.2.1"
}, },
"devDependencies": {}, "devDependencies": {},
"scripts": { "scripts": {
......
import { throttle } from 'throttle-debounce';
Page({ Page({
/** /**
...@@ -27,10 +29,9 @@ Page({ ...@@ -27,10 +29,9 @@ Page({
*/ */
onLoad: function (options) { onLoad: function (options) {
//just for test,delete this code //just for test,delete this code
// options.type = 1 options.type = 1
// options.isSuccess = false options.isSuccess = false
var payPriceYuan = options.payPriceYuan var payPriceYuan = options.payPriceYuan
var description = options.description var description = options.description
this.setData({ this.setData({
...@@ -51,7 +52,6 @@ Page({ ...@@ -51,7 +52,6 @@ Page({
description:"退款失败", description:"退款失败",
failedReason:options.failedReason, failedReason:options.failedReason,
isShowFailedReason:true isShowFailedReason:true
}) })
}else{ }else{
//支付结果 //支付结果
...@@ -108,12 +108,18 @@ Page({ ...@@ -108,12 +108,18 @@ Page({
}, 1000); }, 1000);
}, },
onReRefundClicked:throttle(1000,function(){
wx.navigateTo({
url: '/pages/refund/refund',
})
}),
/** /**
* 回到首页 * 回到首页
*/ */
backHome(){ backHome(){
wx.navigateBack({ wx.redirectTo({
delta: 1 url: '/pages/home/home',
}) })
} }
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
<!--重新退款--> <!--重新退款-->
<view style="margin-top:120rpx;" hidden="{{!isShowFailedReason}}"> <view style="margin-top:120rpx;" hidden="{{!isShowFailedReason}}" bindtap="onReRefundClicked">
<text class="btn-re-refund">重新退款</text> <text class="btn-re-refund">重新退款</text>
</view> </view>
<view class="btn-go-home"><button style="width:572rpx;height:114rpx;display:flex; justify-content:center; align-items:center;font-size:40rpx;" type="default" bindtap="backHome" hidden="{{!isShowBackHome}}">回到首页</button> <view class="btn-go-home"><button style="width:572rpx;height:114rpx;display:flex; justify-content:center; align-items:center;font-size:40rpx;" type="default" bindtap="backHome" hidden="{{!isShowBackHome}}">回到首页</button>
......
// pages/refund/refund.js // pages/refund/refund.js
import { throttle } from 'throttle-debounce';
var miyapay = require("../../utils/miyapay4.js"); var miyapay = require("../../utils/miyapay4.js");
Page({ Page({
......
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