alipaySet.vue 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. <template>
  2. <view class="page">
  3. <view class="list_info">
  4. <view class="name">支付宝姓名:</view>
  5. <view class="item">
  6. <input type="text" class="input" placeholder="请输入真实姓名" v-model="info.realname" maxlength="30" />
  7. </view>
  8. <view class="name">支付宝收款账户:</view>
  9. <view class="item">
  10. <input type="text" class="input" placeholder="请输入支付宝收款账户" v-model="info.alipay" maxlength="50" />
  11. </view>
  12. <view class="blankHeight"></view>
  13. </view>
  14. <view class="btn_submit" @click="submitData">提交</view>
  15. <!-- 提示框 -->
  16. <DialogBox ref="DialogBox"></DialogBox>
  17. </view>
  18. </template>
  19. <script>
  20. export default {
  21. components: {},
  22. data() {
  23. return {
  24. title: '',
  25. sel: 1,
  26. info: {},
  27. realname: '',
  28. alipay: '',
  29. }
  30. },
  31. onLoad() {
  32. },
  33. onShow() {
  34. this.getInfoData();
  35. },
  36. methods: {
  37. onBack() {},
  38. chkSel() {
  39. if (this.sel == 1) {
  40. this.sel = 0;
  41. } else {
  42. this.sel = 1;
  43. }
  44. },
  45. getInfoData() {
  46. uni.request({
  47. url: this.$apiHost + '/Member/getinfoData', //仅为示例,并非真实接口地址。
  48. data: {
  49. uuid: getApp().globalData.uuid
  50. },
  51. header: {
  52. 'content-type': 'application/json' //自定义请求头信息
  53. },
  54. success: (res) => {
  55. console.log("res", res.data)
  56. this.info = res.data;
  57. }
  58. });
  59. },
  60. submitData() {
  61. if (this.info.realname == "") {
  62. uni.showToast({
  63. title: "请输入支付宝姓名",
  64. icon: 'none'
  65. });
  66. return;
  67. }
  68. if (this.info.alipay == "") {
  69. uni.showToast({
  70. title: "请输入支付宝账户",
  71. icon: 'none'
  72. });
  73. return;
  74. }
  75. uni.request({
  76. url: this.$apiHost + '/Member/alipaySet', //仅为示例,并非真实接口地址。
  77. data: {
  78. uuid: getApp().globalData.uuid,
  79. realname: this.info.realname,
  80. alipay: this.info.alipay
  81. },
  82. header: {
  83. 'content-type': 'application/json' //自定义请求头信息
  84. },
  85. success: (res) => {
  86. console.log("----", res.data);
  87. uni.showToast({
  88. title: res.data.str,
  89. icon: 'none'
  90. });
  91. if (res.data.success == "yes") {
  92. }
  93. }
  94. });
  95. },
  96. }
  97. }
  98. </script>
  99. <style scoped lang="scss">
  100. @import 'normal.scss';
  101. </style>