recruit.vue 8.1 KB

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