recruit.vue 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285
  1. <template>
  2. <view class="recruit-container">
  3. <JHeader title="分销员招募令" width="50" height="50" style="padding: 24upx 0 0;"></JHeader>
  4. <!-- 申请分销员 -->
  5. <view class="topBackImg flex-items flex-column">
  6. <view class="content mar-top-36">
  7. <view class="topColor"></view>
  8. <view class="text-box mar-left-30">
  9. <label class="fs-bold">分销员是什么?</label>
  10. <view class="fs24 font-color-656 mar-top-20">分销员是我们为拥有推广能力的用户推出的运营计划。你只需将高品质商品分享推荐给他人,收获他人的感谢的同时,挣得属于自己的利润。</view>
  11. </view>
  12. <view class="text-box mar-top-20 mar-left-30">
  13. <label class="fs-bold">我该怎么成为分销员?</label>
  14. <view class="fs24 font-color-656 mar-top-20">
  15. <view>
  16. <label class="fs-bold"> · </label>
  17. <label class="mar-left-20">点击本页面的【我要成为分销员】,即可完成申请。</label>
  18. </view>
  19. <view class="flex-row-plus mar-top-20">
  20. <label class="fs-bold"> · </label>
  21. <label class="mar-left-20 textDes">点击拥有分销员活动标识的分享按钮,将商品分享给好友或朋友圈。</label>
  22. </view>
  23. <view class="mar-top-20">
  24. <label class="fs-bold"> · </label>
  25. <label class="mar-left-20">朋友通过您的链接进入并购买一件商品。</label>
  26. </view>
  27. <view class="flex-row-plus textDes mar-top-20">
  28. <label class="fs-bold"> · </label>
  29. <label class="mar-left-20">我们收到已完成的订单时,会将本订单的佣金结算给您。</label>
  30. </view>
  31. <view class="mar-top-20">
  32. <label class="fs-bold"> · </label>
  33. <label class="mar-left-20">返回个人中心-分销中心,查看您的。</label>
  34. </view>
  35. </view>
  36. </view>
  37. <view class="text-box mar-top-20 mar-left-30">
  38. <label class="fs-bold">其他说明</label>
  39. <view class="fs24 font-color-656 mar-top-20">
  40. <view>
  41. <label class="fs-bold"> · </label>
  42. <label class="mar-left-20">客户只有通过您的链接成交,才能返佣给您。</label>
  43. </view>
  44. <view class="flex-row-plus mar-top-20">
  45. <label class="fs-bold"> · </label>
  46. <label class="mar-left-20 textDes"> 若订单发生退款,我们将去除本订单的佣金。</label>
  47. </view>
  48. <view class="mar-top-20">
  49. <label class="fs-bold"> · </label>
  50. <label class="mar-left-20">商品的售后问题,由本商店处理。</label>
  51. </view>
  52. <view class="flex-row-plus textDes mar-top-20">
  53. <label class="fs-bold"> · </label>
  54. <label class="mar-left-20">不传播任何违法违规信息,一经发现,即被清退,本商城不负任何责任。</label>
  55. </view>
  56. <view class="mar-top-20">
  57. <label class="fs-bold"> · </label>
  58. <label class="mar-left-20">以上内容解释权归本商城所有。</label>
  59. </view>
  60. </view>
  61. </view>
  62. </view>
  63. </view>
  64. <view class="butBox flex-items-plus" :style="{ 'padding-bottom': (isIphone === true ? 20 : 0) + 'rpx' }" @click="informationShowClick">
  65. <view class="submitbut">我要成为分销员</view>
  66. </view>
  67. <!-- 填写信息弹窗 -->
  68. <tui-popup :show="informationShowFalg" mode="fade" style="background-color: rgba(0,0,0,0.4);">
  69. <view class="informationShow-box">
  70. <view class="flex-items flex-column informationShow-centent">
  71. <view class="mar-top-60">
  72. <label class="fs-bold fs36">请填写相关信息</label>
  73. </view>
  74. <view class="flex-items flex-row mar-top-60">
  75. <view class="fs26 font-color-656">真实姓名<label class="font-color-red">*</label></view>
  76. <input v-model="userName" class="recruitName mar-left-20 fs26" maxlength="20" />
  77. </view>
  78. <view class="flex-items flex-row mar-top-30 phoneStyle">
  79. <label class="fs26 font-color-656">联系电话<label class="font-color-red">*</label></label>
  80. <input v-model="mobile" class="recruitIphone mar-left-20 fs26" disabled="disabled" type="number" maxlength="11" />
  81. </view>
  82. <view class="flex-items flex-row mar-top-30 mar-left-40">
  83. <label class="fs26 font-color-656">邀请码</label>
  84. <input v-model="inviteId" class="recruitIphone mar-left-20 fs26" maxlength="6" />
  85. </view>
  86. <view class="flex-row-plus massageDes-but fs28">
  87. <view class="exitBut" @click="exitButClick">取消</view>
  88. <view class="submitbut" @click="submitbut">提交</view>
  89. </view>
  90. </view>
  91. </view>
  92. </tui-popup>
  93. </view>
  94. </template>
  95. <script>
  96. import { T_STORAGE_KEY } from '../../../constant'
  97. import { addDistributorApplyApi } from '../../../api/anotherTFInterface'
  98. export default {
  99. name: 'Recruit',
  100. data() {
  101. return {
  102. informationShowFalg: false,
  103. item: '',
  104. userName: '',
  105. mobile: '',
  106. inviteId: '',
  107. shopId: 0,
  108. isIphone: false
  109. }
  110. },
  111. onLoad(options) {
  112. this.isIphone = getApp().globalData.isIphone
  113. this.shopId = parseInt(options.shopId)
  114. },
  115. methods: {
  116. informationShowClick() {
  117. this.informationShowFalg = true
  118. const res = uni.getStorageSync(T_STORAGE_KEY)
  119. this.mobile = res.phone
  120. if (!this.mobile) {
  121. uni.showToast({
  122. title: '请先绑定手机号!',
  123. icon: 'none'
  124. })
  125. this.$switchTab('/')
  126. }
  127. },
  128. exitButClick() {
  129. this.informationShowFalg = false
  130. },
  131. submitbut() {
  132. this.applyForRecruit()
  133. },
  134. // 申请为分销员
  135. applyForRecruit() {
  136. var regphone = /^1(3\d|4[5-9]|5[0-35-9]|6[2567]|7[0-8]|8\d|9[0-35-9])\d{8}$/
  137. if (this.userName == '') {
  138. uni.showToast({
  139. title: '真实姓名不能为空',
  140. icon: 'none'
  141. })
  142. } else if (this.mobile == '') {
  143. uni.showToast({
  144. title: '手机号不能为空',
  145. icon: 'none'
  146. })
  147. } else if (!regphone.test(this.mobile)) {
  148. uni.showToast({
  149. title: '手机格式不正确',
  150. icon: 'none'
  151. })
  152. } else {
  153. addDistributorApplyApi({
  154. shopId: this.shopId,
  155. distributorPhone: this.mobile,
  156. distributorName: this.userName,
  157. invitationCode: this.inviteId
  158. }).then((res) => {
  159. this.informationShowFalg = false
  160. uni.showToast({
  161. title: '请等候审核...'
  162. })
  163. setTimeout(() => {
  164. uni.navigateBack({
  165. delta: 1
  166. })
  167. }, 1500)
  168. })
  169. .catch((res) => {
  170. uni.showToast({
  171. title: '申请失败',
  172. icon: 'none'
  173. })
  174. })
  175. }
  176. }
  177. }
  178. }
  179. </script>
  180. <style lang="scss">
  181. .recruit-container {
  182. .topBackImg {
  183. width: 100%;
  184. height: 260upx;
  185. background-color: #373737;
  186. background-size: 100% 260upx;
  187. .content {
  188. width: 690upx;
  189. background-color: #FFFFFF;
  190. .topColor {
  191. height: 60upx;
  192. }
  193. .text-box {
  194. width: 622upx;
  195. .textDes {
  196. width: 598upx;
  197. line-height: 40upx;
  198. }
  199. }
  200. }
  201. }
  202. .butBox {
  203. height: 130upx;
  204. width: 100%;
  205. position: absolute;
  206. bottom: 0upx;
  207. left: 0upx;
  208. background-color: #FFFFFF;
  209. box-shadow: 0upx 3upx 12upx #999999;
  210. .submitbut {
  211. height: 80upx;
  212. width: 690upx;
  213. background: #333333;
  214. font-size: 28upx;
  215. text-align: center;
  216. line-height: 80upx;
  217. color: #FFEBC4;
  218. }
  219. }
  220. .informationShow-box {
  221. position: relative;
  222. background-color: #ffffff;
  223. border-radius: 14upx;
  224. .flex-items {
  225. input {
  226. padding-left: 16upx;
  227. }
  228. }
  229. .phoneStyle {
  230. input {
  231. background: #EEEEEE;
  232. color: #999999;
  233. }
  234. }
  235. .informationShow-centent {
  236. width: 520upx;
  237. height: 550upx;
  238. .recruitName {
  239. border: 2upx solid #DDDDDD;
  240. width: 300upx;
  241. height: 48upx;
  242. }
  243. .recruitIphone {
  244. border: 2upx solid #DDDDDD;
  245. width: 300upx;
  246. height: 48upx;
  247. }
  248. .massageDes-but {
  249. position: absolute;
  250. bottom: 0;
  251. }
  252. .exitBut {
  253. border: 1upx solid #E5E5E5;
  254. width: 260upx;
  255. height: 90upx;
  256. text-align: center;
  257. line-height: 90upx;
  258. }
  259. .submitbut {
  260. background-color: #333333;
  261. width: 260upx;
  262. height: 90upx;
  263. text-align: center;
  264. line-height: 90upx;
  265. color: #FFFFFF;
  266. }
  267. }
  268. }
  269. }
  270. </style>