addMem.vue 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  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="mobile" maxlength="30" />
  7. </view>
  8. <view class="blankHeight"></view>
  9. </view>
  10. <view class="btn_submit" @click="submitData">确认添加</view>
  11. <!-- 提示框 -->
  12. <DialogBox ref="DialogBox"></DialogBox>
  13. </view>
  14. </template>
  15. <script>
  16. export default {
  17. components: {},
  18. data() {
  19. return {
  20. title: '',
  21. groupId: '',
  22. mobile: '',
  23. }
  24. },
  25. onLoad(parms) {
  26. this.groupId = parms.groupId || "1"
  27. },
  28. onShow() {},
  29. methods: {
  30. onBack() {},
  31. submitData() {
  32. if (this.mobile == "") {
  33. uni.showToast({
  34. title: "请输入手机号码",
  35. icon: 'none'
  36. });
  37. return;
  38. }
  39. uni.request({
  40. url: this.$apiHost2 + '/Chat/groupActMem', //仅为示例,并非真实接口地址。
  41. data: {
  42. uuid: getApp().globalData.uuid,
  43. groupId: this.groupId,
  44. act: 'addMobile',
  45. mobile: this.mobile
  46. },
  47. header: {
  48. 'content-type': 'application/json'
  49. },
  50. success: (res) => {
  51. uni.showToast({
  52. title: res.data.str,
  53. icon: 'none'
  54. });
  55. if (res.data.success == "yes") {
  56. setTimeout(function() {
  57. uni.navigateBack();
  58. }, 1000);
  59. }
  60. }
  61. });
  62. },
  63. }
  64. }
  65. </script>
  66. <style scoped lang="scss">
  67. @import 'addMem.scss';
  68. </style>