syzlp.vue 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. <template>
  2. <view style="padding: 20rpx;font-size: 30rpx;">
  3. <view class="tit">转出金额</view>
  4. <input class="srk" placeholder="输入转出金额" v-model="data.price"/>
  5. <view class="tit">交易密码</view>
  6. <input class="srk" placeholder="输入交易密码确认" password="true" v-model="data.jymm"/>
  7. <button type="warn" style="margin-top: 40rpx;" @click="add">确认转出</button>
  8. </view>
  9. </template>
  10. <script>
  11. export default {
  12. data() {
  13. return {
  14. data: {
  15. 'sjh': '',
  16. 'price': '',
  17. 'jymm':''
  18. },
  19. userinfo:[]
  20. }
  21. },
  22. methods: {
  23. add() {
  24. var data = this.data;
  25. data.uid=this.userinfo.id;
  26. this.$api
  27. .MhGetModel(data, 'user/tjsypay')
  28. .then(res => {
  29. if(res.data.code==1){
  30. uni.redirectTo({
  31. url: 'cg?tel='+this.skr
  32. });
  33. }else{
  34. uni.showModal({
  35. title: '提示',
  36. content: res.data.msg,
  37. showCancel:false,
  38. success: function (res) {
  39. if (res.confirm) {
  40. } else if (res.cancel) {
  41. console.log('用户点击取消');
  42. }
  43. }
  44. });
  45. }
  46. })
  47. .catch(err => {
  48. // console.log('request fail', JSON.stringify(err));
  49. });
  50. }
  51. },
  52. onLoad() {
  53. var user = this.$api.getUserinfo();
  54. this.userinfo = user;
  55. }
  56. }
  57. </script>
  58. <style>
  59. page {
  60. padding: 15rpx;
  61. background: #98a737;
  62. background-attachment: fixed !important;
  63. background-repeat: no-repeat !important;
  64. }
  65. .srk {
  66. color: #000;
  67. height: 60rpx;
  68. line-height: 60rpx;
  69. background: #fff;
  70. border-radius: 10rpx;
  71. padding-left: 20rpx;
  72. font-size: 30rpx;
  73. }
  74. .tit {
  75. color: #fff;
  76. height: 60rpx;
  77. line-height: 60rpx;
  78. margin-top: 10rpx;
  79. }
  80. </style>