zrjf.vue 1.8 KB

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