addoperator.vue 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171
  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. 绑定微信后,运营人员可通过微信授权直接登录采美365网</view>
  23. </view>
  24. </view>
  25. </view>
  26. </view>
  27. </template>
  28. <script>
  29. import authorize from '@/common/config/authorize.js'
  30. import { addOperator } from "@/api/operator.js"
  31. export default {
  32. data() {
  33. return {
  34. clubID:'',
  35. userID:'',
  36. linkman:'',
  37. clubMobile:'',
  38. }
  39. },
  40. onLoad(option){
  41. },
  42. methods: {
  43. //提交
  44. confirm(){
  45. let data = this.addressData;
  46. if(this.linkman== ''){
  47. this.$util.msg('请输入运营人员姓名');
  48. return;
  49. }
  50. if(this.clubMobile == ''){
  51. this.$util.msg('请输入运营人员手机号');
  52. return;
  53. }
  54. if(!/(^1[0-9][0-9]{9}$)/.test(this.clubMobile)){
  55. this.$util.msg('请输入正确的手机号码');
  56. return;
  57. }
  58. let params = {
  59. mobile:this.clubMobile,
  60. linkName:this.linkman,
  61. userID:this.userID,
  62. clubID:this.clubID,
  63. configFlag:2
  64. }
  65. addOperator(params).then(response =>{
  66. this.$util.msg('添加成功',2000);
  67. setTimeout(() =>{
  68. uni.navigateBack();
  69. },2000)
  70. }).catch(response =>{
  71. this.$util.msg(response.msg,2000);
  72. })
  73. }
  74. },
  75. onShow() {
  76. this.$api.getStorage().then((resolve) =>{
  77. console.log(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. width: 100%;
  100. height: 40rpx;
  101. padding: 24rpx;
  102. background: #F7F7F7;
  103. border-radius: 14rpx;
  104. margin-bottom: 20rpx;
  105. font-size: $font-size-28;
  106. color: $text-color;
  107. .input{
  108. width: 100%;
  109. height: 100%;
  110. text-align: left;
  111. }
  112. }
  113. }
  114. .operator-text{
  115. width: 100%;
  116. height: auto;
  117. margin-top: 50rpx;
  118. line-height: 40rpx;
  119. .title{
  120. margin-bottom: 50rpx;
  121. .icon-gantanhao-yuankuang{
  122. font-size: $font-size-32;
  123. color: #166CE1;
  124. margin-right: 10rpx;
  125. }
  126. .text-m{
  127. font-size: $font-size-30;
  128. color: #166CE1;
  129. }
  130. .text-s{
  131. font-size: $font-size-24;
  132. color: #999999;
  133. }
  134. }
  135. .text-main{
  136. width: 100%;
  137. height: auto;
  138. view{
  139. line-height: 40rpx;
  140. font-size: $font-size-28;
  141. color: $text-color;
  142. text-align: justify;
  143. margin-bottom: 10rpx;
  144. }
  145. }
  146. }
  147. }
  148. .add-btn{
  149. width: 702rpx;
  150. height: 88rpx;
  151. font-size: $font-size-28;
  152. line-height: 88rpx;
  153. color: #FFFFFF;
  154. margin: 0 auto;
  155. text-align: center;
  156. background: $btn-confirm;
  157. border-radius: 14rpx;
  158. margin-top: 80rpx;
  159. }
  160. .add-btn.disabled{
  161. background: #F8F8F8;
  162. border-radius: 14rpx;
  163. }
  164. }
  165. </style>