1
0

add.vue 731 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <template>
  2. <view class="main">
  3. <view class="form_group">
  4. <view class="lable re">手机号</view>
  5. <input type="digit" v-model="item.phone" placeholder="请输入手机号" />
  6. </view>
  7. <button class="btn" @click="add()">确认</button>
  8. </view>
  9. </template>
  10. <script>
  11. export default {
  12. data() {
  13. return {
  14. item: {}
  15. };
  16. },
  17. methods: {
  18. add() {
  19. this.http.request({
  20. url: '/app/user/bind',
  21. method: 'POST',
  22. data: this.item,
  23. success: (res) => {
  24. uni.showModal({
  25. title: '提示',
  26. content: '绑定成功',
  27. showCancel: false,
  28. success: (res) => {
  29. uni.$emit('bind');
  30. uni.navigateBack();
  31. }
  32. });
  33. }
  34. });
  35. }
  36. }
  37. };
  38. </script>
  39. <style lang="scss"></style>