addoperator.vue 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165
  1. <template>
  2. <view class="container operator clearfix">
  3. <view class="operator-content">
  4. <view class="operator-from">
  5. <view class="from-row">
  6. <input class="input" type="text" v-model="linkman" placeholder="请输入运营人员姓名" maxlength="6"/>
  7. </view>
  8. <view class="from-row">
  9. <input class="input" type="text" v-model="clubMobile" placeholder="请输入运营人员手机号" maxlength="11"/>
  10. </view>
  11. <button class="add-btn" @click="confirm">确定</button>
  12. </view>
  13. <view class="operator-text">
  14. <view class="text-main">
  15. <view>1. 添加运营人员后,运营人员会收到一条邀请码短信</view>
  16. <view>2. 运营人员在微信搜索【采美采购商城】小程序,或者搜索关注【采美365】公众号,从底部菜单进入【采美采购商城】小程序</view>
  17. <view>3. 使用邀请码进行登录并绑定微信</view>
  18. <view>4. 绑定后,运营人员可通过微信直接登录采美365网</view>
  19. </view>
  20. </view>
  21. </view>
  22. </view>
  23. </template>
  24. <script>
  25. import authorize from '@/common/config/authorize.js'
  26. export default {
  27. data() {
  28. return {
  29. clubID:'',
  30. userID:'',
  31. linkman:'',
  32. clubMobile:'',
  33. }
  34. },
  35. onLoad(option){
  36. },
  37. methods: {
  38. //提交
  39. confirm(){
  40. let data = this.addressData;
  41. if(this.linkman== ''){
  42. this.$util.msg('请输入运营人员姓名');
  43. return;
  44. }
  45. if(this.clubMobile == ''){
  46. this.$util.msg('请输入运营人员手机号');
  47. return;
  48. }
  49. if(!/(^1[0-9][0-9]{9}$)/.test(this.clubMobile)){
  50. this.$util.msg('请输入正确的手机号码');
  51. return;
  52. }
  53. let params = {
  54. mobile:this.clubMobile,
  55. linkName:this.linkman,
  56. userID:this.userID,
  57. clubID:this.clubID,
  58. configFlag:2
  59. }
  60. this.UserService.PostAddOperator(params).then(response =>{
  61. this.$util.msg('添加成功',2000,true,'success')
  62. setTimeout(() =>{
  63. uni.navigateBack();
  64. },2000)
  65. }).catch(error =>{
  66. this.$util.msg(error.msg,2000);
  67. })
  68. }
  69. },
  70. onShow() {
  71. this.$api.getStorage().then((resolve) =>{
  72. this.userID = resolve.userID
  73. this.clubID = resolve.clubID
  74. })
  75. }
  76. }
  77. </script>
  78. <style lang="scss">
  79. page{
  80. height: auto;
  81. background: $bg-color;
  82. border-top: 1px solid #EBEBEB;
  83. }
  84. .operator{
  85. padding-top: 160rpx;
  86. .operator-content{
  87. width: 100%;
  88. padding: 0 75rpx;
  89. box-sizing: border-box;
  90. .operator-from{
  91. width: 100%;
  92. height: auto;
  93. .from-row{
  94. height: 40rpx;
  95. padding: 24rpx 0;
  96. background: #FFFFFF;
  97. margin-bottom: 40rpx;
  98. font-size: $font-size-28;
  99. color: $text-color;
  100. border-bottom: 1px solid #E1E1E1;
  101. .input{
  102. width: 100%;
  103. height: 100%;
  104. text-align: left;
  105. }
  106. }
  107. }
  108. .operator-text{
  109. width: 100%;
  110. height: auto;
  111. margin-top: 50rpx;
  112. line-height: 40rpx;
  113. .title{
  114. margin-bottom: 50rpx;
  115. .icon-gantanhao-yuankuang{
  116. font-size: $font-size-32;
  117. color: #166CE1;
  118. margin-right: 10rpx;
  119. }
  120. .text-m{
  121. font-size: $font-size-30;
  122. color: #166CE1;
  123. }
  124. .text-s{
  125. font-size: $font-size-24;
  126. color: #999999;
  127. }
  128. }
  129. .text-main{
  130. width: 100%;
  131. height: auto;
  132. view{
  133. line-height: 40rpx;
  134. font-size: $font-size-28;
  135. color: $text-color;
  136. text-align: justify;
  137. margin-bottom: 10rpx;
  138. }
  139. }
  140. }
  141. }
  142. .add-btn{
  143. width: 600rpx;
  144. height: 88rpx;
  145. font-size: $font-size-28;
  146. line-height: 88rpx;
  147. color: #FFFFFF;
  148. margin: 0 auto;
  149. text-align: center;
  150. background: $btn-confirm;
  151. border-radius: 44rpx;
  152. margin-top: 80rpx;
  153. }
  154. .add-btn.disabled{
  155. background: #F8F8F8;
  156. border-radius: 44rpx;
  157. }
  158. }
  159. </style>