rechargesuccess.vue 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. <template>
  2. <view class="pages">
  3. <view class="icon-wrap u-flex u-row-center">
  4. <u-icon name="checkmark" color="#fff" size="80"></u-icon>
  5. </view>
  6. <view class="title">{{title}}</view>
  7. <view class="" v-if="noPaypass==true">
  8. <view class="tip">为了您的支付安全,请务必设置支付密码</view>
  9. <view class="full-btn" @click="goSetPaypass">设置支付密码</view>
  10. </view>
  11. <view v-else class="full-btn" @click="btnClick">完成</view>
  12. </view>
  13. </template>
  14. <script>
  15. export default {
  16. data() {
  17. return {
  18. noPaypass:true,
  19. title:'恭喜你您,充值成功'
  20. }
  21. },
  22. onShow() {
  23. this.checkPaypass();
  24. },
  25. onLoad() {
  26. },
  27. methods: {
  28. btnClick(){
  29. uni.reLaunch({url: '/center/center'});
  30. },
  31. goSetPaypass(){
  32. uni.reLaunch({url: '/center/setPaypass'});
  33. },
  34. checkPaypass(){
  35. this.$u.api.getExistPayPassword().then(res=>{
  36. // console.log('res',res.data);
  37. if(res.data==0){
  38. this.noPaypass = true
  39. }else{
  40. this.noPaypass = false
  41. }
  42. console.log('this.noPaypass',this.noPaypass);
  43. }).catch(err=>{
  44. console.log('checkPaypass',err);
  45. })
  46. }
  47. }
  48. }
  49. </script>
  50. <style>
  51. page{
  52. background-color: #F5F5F5;
  53. }
  54. </style>
  55. <style lang="scss" scoped>
  56. .pages{
  57. text-align: center;
  58. }
  59. .icon-wrap{
  60. width: 180rpx;
  61. height: 180rpx;
  62. margin: 120rpx auto 20rpx;
  63. padding: 20rpx;
  64. background-color: #00A447;
  65. border-radius: 50%;
  66. }
  67. .title{
  68. font-size: 32rpx;
  69. font-weight: 600;
  70. color: #333333;
  71. line-height: 40rpx;
  72. margin-bottom: 120rpx;
  73. }
  74. .full-btn{
  75. margin: 20rpx 10%;
  76. }
  77. </style>