Commit 9403cb3a authored by pengguangpu's avatar pengguangpu

完善逻辑;

parent 502425a6
......@@ -17,6 +17,11 @@
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.13.0.tgz",
"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": {
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/weui-miniprogram/-/weui-miniprogram-1.0.5.tgz",
......
......@@ -5,7 +5,8 @@
"main": "app.js",
"dependencies": {
"axios": "^0.20.0",
"weui-miniprogram": "^1.0.5"
"weui-miniprogram": "^1.0.5",
"throttle-debounce":"^2.2.1"
},
"devDependencies": {},
"scripts": {
......
import { throttle } from 'throttle-debounce';
Page({
/**
......@@ -27,10 +29,9 @@ Page({
*/
onLoad: function (options) {
//just for test,delete this code
// options.type = 1
// options.isSuccess = false
options.type = 1
options.isSuccess = false
var payPriceYuan = options.payPriceYuan
var description = options.description
this.setData({
......@@ -51,7 +52,6 @@ Page({
description:"退款失败",
failedReason:options.failedReason,
isShowFailedReason:true
})
}else{
//支付结果
......@@ -108,12 +108,18 @@ Page({
}, 1000);
},
onReRefundClicked:throttle(1000,function(){
wx.navigateTo({
url: '/pages/refund/refund',
})
}),
/**
* 回到首页
*/
backHome(){
wx.navigateBack({
delta: 1
wx.redirectTo({
url: '/pages/home/home',
})
}
......
......@@ -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>
</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>
......
// pages/refund/refund.js
import { throttle } from 'throttle-debounce';
var miyapay = require("../../utils/miyapay4.js");
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