addoperator.vue 3.9 KB

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