register-general.vue 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283
  1. <template>
  2. <view class="register">
  3. <view class="register-main" v-if="isRegisterStep">
  4. <view class="main-form-item">
  5. <view class="form-label">联系人</view>
  6. <input class="form-input" type="text" name="input" v-model="params.linkMan" placeholder="请输入联系姓名" maxlength="6"/>
  7. </view>
  8. <view class="main-form-item">
  9. <view class="form-label">手机号</view>
  10. <input class="form-input phone" type="text" v-model="params.bindMobile" placeholder="请输入联系人手机号" maxlength="11"/>
  11. <view class="form-btn" @click.stop="CheckMobile()">检测</view>
  12. </view>
  13. <view class="register-fiexd clearfix" :style="{paddingBottom:isIphoneX ? '68rpx':''}">
  14. <view class="register-agree">
  15. <view class="agree-text" @tap.stop="agreeCheck()">
  16. <button class="checkbox iconfont" :class="[isCheck ?'icon-gouxuan':'icon-weigouxuan']"></button>
  17. 我已阅读并同意
  18. <text @click.stop="this.$api.navigateTo('/pages/service/organagree')">《机构协议》</text>
  19. <text @click.stop="this.$api.navigateTo('/pages/service/useragree')">《用户协议》</text>及
  20. <text @click.stop="this.$api.navigateTo('/pages/service/privacyagree')">《隐私权政策》</text>
  21. </view>
  22. </view>
  23. <view class="register-row">
  24. <view class="register-btn sub" @click.stop="SubmitRegister">确定</view>
  25. </view>
  26. </view>
  27. </view>
  28. <view class="register-main" v-else>
  29. <view class="main-form-item">
  30. <view class="form-label">联系人</view>
  31. <view class="form-text"> {{ clubInfo.linkMan }} </view>
  32. </view>
  33. <view class="main-form-item">
  34. <view class="form-label">手机号</view>
  35. <view class="form-text">{{ clubInfo.bindMobile }}</view>
  36. </view>
  37. <view class="register-fiexd clearfix" :style="{paddingBottom:isIphoneX ? '68rpx':''}">
  38. <view class="register-row">
  39. <button class="register-btn sub" @tap="ShareRegister">分享</button>
  40. </view>
  41. </view>
  42. </view>
  43. <!-- 分享弹窗 -->
  44. <shareModel v-if="isShareModal" :orderID="clubInfo.userId" @shareConfirm ='onShareAppMessage'></shareModel>
  45. </view>
  46. </template>
  47. <script>
  48. import shareModel from '@/components/cm-module/modelAlert/shareModel.vue' //分享弹窗
  49. export default{
  50. components:{
  51. shareModel
  52. },
  53. data() {
  54. return{
  55. isRegisterStep:true,
  56. isIphoneX:this.$store.state.isIphone,
  57. isCheck:false,
  58. clubUserId:0,
  59. isShareModal:false,
  60. params:{
  61. linkMan:'',
  62. bindMobile:'',
  63. isAgreed:0,
  64. userId:0
  65. },
  66. clubInfo:{
  67. linkMan:'',
  68. bindMobile:'',
  69. userId:0
  70. }
  71. }
  72. },
  73. onLoad(option) {
  74. this.$api.getStorage().then((resolve) =>{
  75. this.params.userId = resolve.userId ? resolve.userId : 0
  76. })
  77. },
  78. computed: {
  79. },
  80. methods:{
  81. CheckMobile(){//检测手机是否能注册
  82. if( this.params.bindMobile == ''){
  83. this.$util.msg('请输入手机号',2000);
  84. return
  85. }
  86. if(!this.$reg.isMobile(this.params.bindMobile)){
  87. this.$util.msg('请输入正确的手机号',2000);
  88. return
  89. }
  90. this.SellerService.SellerClubCheck({bindMobile:this.params.bindMobile})
  91. .then(response =>{
  92. this.$util.msg(response.data,2000);
  93. })
  94. .catch(error =>{
  95. this.$util.msg(error.msg,2000);
  96. })
  97. },
  98. SubmitRegister(){//提交注册
  99. if( this.params.linkMan == ''){
  100. this.$util.msg('请输入联系人姓名',2000);
  101. return
  102. }
  103. if( this.params.bindMobile == ''){
  104. this.$util.msg('请输入联系人手机号',2000);
  105. return
  106. }
  107. if(!this.$reg.isMobile(this.params.bindMobile)){
  108. this.$util.msg('手机格式不正确',2000);
  109. return
  110. }
  111. if(this.params.isAgreed == 0){
  112. this.$util.msg('请勾选同意协议',2000);
  113. return
  114. }
  115. this.SellerService.SellerClubTemporary(this.params).then(response =>{
  116. this.clubInfo.userId = response.data
  117. setTimeout(()=>{
  118. this.isRegisterStep = false
  119. this.GetClubUserInfo(this.clubInfo.userId)
  120. },1500)
  121. }).catch(error =>{
  122. this.$util.msg(error.msg,2000);
  123. })
  124. },
  125. GetClubUserInfo(id){//回显数据
  126. this.UserService.UseRregisterTemporaryInfo({id:id})
  127. .then(response =>{
  128. this.clubInfo = response.data
  129. })
  130. .catch(error =>{
  131. this.$util.msg(error.msg,2000)
  132. })
  133. },
  134. ShareRegister(){//点击分享
  135. this.isShareModal = true
  136. },
  137. agreeCheck() {//勾选协议
  138. this.isCheck = !this.isCheck
  139. if(this.isCheck){
  140. this.params.isAgreed = 1
  141. }else{
  142. this.params.isAgreed = 0
  143. }
  144. },
  145. },
  146. onShareAppMessage(res){//分享转发
  147. this.isShareModal = false
  148. if (res.from === 'button') {
  149. // 来自页面内转发按钮
  150. }
  151. return {
  152. title: '您已注册采美365网,请点击登录',
  153. path: `/pages/login/binding?bindId=${this.clubInfo.userId}&Identity=4`,
  154. imageUrl:'https://static.caimei365.com/app/img/icon/icon-addShare@3x.png'
  155. }
  156. },
  157. }
  158. </script>
  159. <style lang="scss">
  160. page{
  161. height: auto;
  162. }
  163. .register{
  164. width: 100%;
  165. position: relative;
  166. box-sizing: border-box;
  167. .register-main{
  168. width: 100%;
  169. height: auto;
  170. box-sizing: border-box;
  171. padding: 0 24rpx;
  172. margin-top: 24rpx;
  173. .main-form-item{
  174. width: 100%;
  175. height: 82rpx;
  176. box-sizing: border-box;
  177. padding: 13rpx 0;
  178. border-bottom: 1px solid #e1e1e1;
  179. margin-top: 10rpx;
  180. position: relative;
  181. .form-label{
  182. width: 148rpx;
  183. float: left;
  184. height: 100%;
  185. line-height: 56rpx;
  186. font-size: $font-size-28;
  187. text-align: left;
  188. color: #999999;
  189. }
  190. .form-input{
  191. width: 554rpx;
  192. height: 56rpx;
  193. line-height: 56rpx;
  194. font-size: $font-size-28;
  195. text-align: left;
  196. color: #333333;
  197. float: left;
  198. &.phone{
  199. width: 418rpx;
  200. }
  201. }
  202. .form-text{
  203. width: 554rpx;
  204. height: 56rpx;
  205. line-height: 56rpx;
  206. font-size: $font-size-28;
  207. text-align: left;
  208. color: #333333;
  209. float: left;
  210. }
  211. .form-btn{
  212. width: 136rpx;
  213. height: 56rpx;
  214. background: $btn-confirm;
  215. color: #FFFFFF;
  216. font-size: $font-size-28;
  217. text-align: center;
  218. border-radius: 28rpx;
  219. line-height: 56rpx;
  220. float: left;
  221. }
  222. }
  223. .register-fiexd{
  224. width: 100%;
  225. height: auto;
  226. padding: 20rpx 0;
  227. position: fixed;
  228. bottom: 0;
  229. left: 0;
  230. z-index: 9999;
  231. background: #FFFFFF;
  232. .register-agree{
  233. display: flex;
  234. flex-direction: column;
  235. align-items: center;
  236. margin: 32rpx 0;
  237. .agree-text{
  238. .checkbox{
  239. float: left;
  240. margin: 4rpx 6rpx 0 0;
  241. color: #999999;
  242. font-size: $font-size-32;
  243. &.icon-gouxuan{
  244. color: $color-system;
  245. }
  246. }
  247. font-size: 20rpx;
  248. line-height: 44rpx;
  249. color: #999999;
  250. text{
  251. color:#0091FF;
  252. }
  253. }
  254. }
  255. }
  256. .register-btn{
  257. width: 702rpx;
  258. height: 88rpx;
  259. border-radius: 44rpx;
  260. font-size: $font-size-28;
  261. line-height: 88rpx;
  262. color: #FFFFFF;
  263. margin: 0 auto;
  264. text-align: center;
  265. background: $btn-confirm;
  266. margin-top: 96rpx;
  267. &.none{
  268. background: #FFFFFF;
  269. color: $text-color;
  270. margin-top: 0;
  271. }
  272. &.sub{
  273. margin-top: 0;
  274. }
  275. }
  276. }
  277. }
  278. </style>