giveFamilyCard.vue 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. <template>
  2. <view class="box">
  3. <u--form labelPosition="top" :model="userInfo" ref="form1">
  4. <u-form-item labelWidth="auto" labelAlign="right" label="被赠送会员编号" prop="phone">
  5. <u--input v-model="userInfo.memberNo" placeholder="请输入被赠送会员编号" border="bottom"
  6. ></u--input>
  7. </u-form-item>
  8. <u-form-item labelWidth="auto" labelAlign="right" label="被赠送会员手机号" prop="smsCode" width="120">
  9. <u--input v-model="userInfo.memberPhone" placeholder="请输入被赠送会员手机号" border="bottom"
  10. ></u--input>
  11. </u-form-item>
  12. </u--form>
  13. <view class="op-btn-wrap">
  14. <view class="h-btn" @click="handleGive">
  15. <text>确定</text>
  16. </view>
  17. </view>
  18. </view>
  19. </template>
  20. <script>
  21. export default {
  22. name: "giveFamilyCard",
  23. data() {
  24. return {
  25. userInfo: {},
  26. giveUser: {}
  27. }
  28. },
  29. methods: {
  30. handleGive() {
  31. this.giveUser.memberNo = "Vip." + this.userInfo.memberNo
  32. this.giveUser.memberPhone = this.userInfo.memberPhone
  33. this.$api.giveFamilyCard(this.giveUser).then((res) => {
  34. console.log(res)
  35. uni.showToast({
  36. duration: 2000,
  37. title: '赠送成功'
  38. });
  39. uni.navigateBack({delta : 1})
  40. }
  41. )
  42. }
  43. }
  44. }
  45. </script>
  46. <style scoped>
  47. .box {
  48. padding: 24rpx 32rpx;
  49. }
  50. .h-btn {
  51. margin: 48rpx auto;
  52. text-align: center;
  53. width: 80vw;
  54. height: 42px;
  55. background: #FFE05C;
  56. border-radius: 27px;
  57. line-height: 42px;
  58. }
  59. </style>