多租户商城-商户小程序端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

297 lines
8.7 KiB

2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
  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 fs28 font-color-252744">分销员是什么</label>
  9. <view class="fs24 font-color-252744 mar-top-20">分销员是我们为拥有推广能力的用户推出的运营计划你只需将高品质商品分享推荐给他人收获他人的感谢的同时挣得属于自己的利润</view>
  10. </view>
  11. <view class="text-box mar-top-40 mar-left-30">
  12. <label class="fs-bold fs28 font-color-252744">我该怎么成为分销员</label>
  13. <view class="fs24 font-color-252744 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-40 mar-left-30">
  37. <label class="fs-bold fs28 font-color-252744">其他说明</label>
  38. <view class="fs24 font-color-252744 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 fs32 font-color-252744">请填写相关信息</label>
  72. </view>
  73. <view class="flex-items flex-row mar-top-60">
  74. <view class="fs28 font-color-252744">{{$t('common.realname')}}<label class="font-color-red">*</label></view>
  75. <input class="recruitName mar-left-20 fs26" maxlength="20" v-model="userName"/>
  76. </view>
  77. <view class="flex-items flex-row mar-top-30 phoneStyle">
  78. <label class="fs28 font-color-252744">{{$t('common.contactPhone')}}<label class="font-color-red">*</label></label>
  79. <input class="recruitIphone mar-left-20 fs26" disabled="disabled" type="number" v-model="mobile" maxlength="11"/>
  80. </view>
  81. <view class="flex-items flex-row mar-top-30 mar-left-40">
  82. <label class="fs28 font-color-2527446">邀请码</label>
  83. <input class="recruitIphone mar-left-20 fs26" v-model="inviteId" maxlength="6"/>
  84. </view>
  85. <view class="flex-row-plus massageDes-but fs28">
  86. <view class="exitBut" @click="exitButClick">{{$t('common.cancel')}}</view>
  87. <view class="submitbut" @click="submitbut">{{$t('common.submit')}}</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. }).catch(res => {
  176. uni.showToast({
  177. title:'申请失败',
  178. icon:'none'
  179. })
  180. })
  181. }
  182. }
  183. }
  184. }
  185. </script>
  186. <style lang="scss">
  187. .container {
  188. .topBackImg {
  189. width: 100%;
  190. height: 260upx;
  191. //background: url(https://ceres.zkthink.com/static/images/storeTop_Img.png) no-repeat;
  192. background: linear-gradient(0deg, #FAFAFA, #E5E6F6);
  193. background-size: 100% 260upx;
  194. .content {
  195. width: 690upx;
  196. background-color: #FFFFFF;
  197. padding-bottom: 30rpx;
  198. border-radius: 30rpx;
  199. .topColor {
  200. height: 30upx;
  201. }
  202. .text-box {
  203. width: 622upx;
  204. .textDes {
  205. width: 598upx;
  206. line-height: 40upx;
  207. }
  208. }
  209. }
  210. }
  211. .butBox {
  212. height: 130upx;
  213. width: 100%;
  214. position: absolute;
  215. bottom: 0upx;
  216. left: 0upx;
  217. background-color: #FFFFFF;
  218. //box-shadow: 0upx 3upx 12upx #999999;
  219. .submitbut {
  220. height: 98upx;
  221. width: 690upx;
  222. background: #252744;
  223. font-size: 32rpx;
  224. text-align: center;
  225. line-height: 98upx;
  226. border-radius: 50rpx;
  227. color: #FFFFFF;
  228. }
  229. }
  230. .informationShow-box {
  231. .flex-items {
  232. input {
  233. padding-left: 16upx;
  234. }
  235. }
  236. .phoneStyle {
  237. input {
  238. background: #EEEEEE;
  239. color: #999999;
  240. }
  241. }
  242. .informationShow-centent {
  243. width: 520upx;
  244. height: 550upx;
  245. .recruitName {
  246. border: 1rpx solid #D3D4DE;
  247. width: 300upx;
  248. height: 48upx;
  249. }
  250. .recruitIphone {
  251. border: 1rpx solid #D3D4DE;
  252. width: 300upx;
  253. height: 48upx;
  254. }
  255. .massageDes-but {
  256. position: absolute;
  257. bottom: 0;
  258. }
  259. .exitBut {
  260. border: 1rpx solid #D3D4DE;
  261. width: 260upx;
  262. height: 90upx;
  263. text-align: center;
  264. line-height: 90upx;
  265. }
  266. .submitbut {
  267. background-color: #252744;
  268. width: 260upx;
  269. height: 90upx;
  270. text-align: center;
  271. line-height: 90upx;
  272. color: #FFFFFF;
  273. }
  274. }
  275. }
  276. }
  277. </style>
  278. <style>
  279. page {
  280. background: #FAFAFA;
  281. }
  282. </style>