register-member.vue 29 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018
  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.trim="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.trim="params.bindMobile" placeholder="请输入联系人手机号" maxlength="11"/>
  11. <view class="form-btn" @click.stop="CheckMobile()">检测</view>
  12. </view>
  13. <view class="main-form-item">
  14. <view class="form-label">邮箱</view>
  15. <input class="form-input" type="text" name="input" v-model.trim="params.contractEmail" placeholder="请输入机构邮箱地址" maxlength="30"/>
  16. </view>
  17. <view class="main-form-item">
  18. <view class="form-label">机构名称</view>
  19. <input class="form-input" type="text" name="input" v-model.trim="params.name" placeholder="请输入机构名称" maxlength="30"/>
  20. </view>
  21. <view class="main-form-item">
  22. <view class="form-label">机构简称</view>
  23. <input class="form-input" type="text" name="input" v-model.trim="params.shortName" placeholder="请输入机构简称" maxlength="10"/>
  24. </view>
  25. <view class="main-form-item" @click="showMulLinkageThreePicker">
  26. <view class="form-label">机构地址</view>
  27. <view class="form-input"
  28. :class="addressText === '请选择机构所在地区' ? 'none' : ''">
  29. {{addressText}}
  30. </view>
  31. <view class="iconfont icon-xiayibu"></view>
  32. </view>
  33. <view class="main-form-item textarea">
  34. <view class="textarea show" v-if="isShowInput" @click="showTextareaFocus">{{params.address ? params.address :'详细地址:如道路、门牌号、小区等'}}</view>
  35. <textarea v-else
  36. class="textarea"
  37. type="text"
  38. v-model="params.address"
  39. placeholder="详细地址:如道路、门牌号、小区等"
  40. placeholder-class="placeholder"
  41. maxlength="35"
  42. @input="onTextareaInput"
  43. @blur="hideTextareaFocus"
  44. :class="isShowInput ? '':''"
  45. />
  46. </view>
  47. <view class="main-form-item">
  48. <view class="form-label lang">营业执照编号</view>
  49. <input class="form-input lang" type="text" name="input" v-model="params.socialCreditCode" placeholder="请输入社会信用统一代码" maxlength="18"/>
  50. </view>
  51. <view class="main-form-item file">
  52. <view class="main-form-upload">
  53. <view class="label">营业执照</view>
  54. <view class="upload-picture">
  55. <view class="upload-none" v-if="params.businessLicense === ''" @click="UploadPicture(1)">
  56. <text class="iconfont icon-jiahao"></text><text class="upload-text">营业执照</text>
  57. </view>
  58. <view class="upload-image" v-else>
  59. <image :src="params.businessLicense" mode="" @click="ShowPreviewImage(1)"></image>
  60. <view class="upload-del" @click="DeletePicture(1)">
  61. <text class='iconfont icon-shanchu1'></text>
  62. </view>
  63. </view>
  64. </view>
  65. </view>
  66. <view class="main-form-upload">
  67. <view class="label">门头照</view>
  68. <view class="upload-picture">
  69. <view class="upload-none" v-if="params.shopPhoto === ''" @click="UploadPicture(2)">
  70. <text class="iconfont icon-jiahao"></text><text class="upload-text">门头照</text>
  71. </view>
  72. <view class="upload-image" v-else>
  73. <image :src="params.shopPhoto" mode="" @click="ShowPreviewImage(2)"></image>
  74. <view class="upload-del" @click="DeletePicture(2)">
  75. <text class='iconfont icon-shanchu1'></text>
  76. </view>
  77. </view>
  78. </view>
  79. </view>
  80. </view>
  81. <view class="main-form-item picker">
  82. <view class="form-label">机构类型</view>
  83. <radio-group @change="bindPickerChange">
  84. <label class="label-radio" v-for="(item, index) in radioGroup1" :key="item.value">
  85. <radio class="row-radio" :value="item.value" :checked="index === current" color='#E15616'/>
  86. <view class="row-text">{{item.name}}</view>
  87. </label>
  88. </radio-group>
  89. </view>
  90. <view class="main-form-item picker" v-if="params.firstClubType == 1">
  91. <view class="picker-radio">
  92. <view class="secondTyperadio" v-for="(item,index) in beautyList" :key="item.value" @click="radioChange(item)" :class="item.value==params.secondClubType?'active':''">
  93. <view class="secondRadio" >{{item.name}}</view>
  94. </view>
  95. </view>
  96. </view>
  97. <view class="main-form-item file" v-if="params.firstClubType == 1">
  98. <view class="main-form-upload">
  99. <view class="label">资质</view>
  100. <view class="upload-picture">
  101. <view class="upload-none" v-if="params.medicalPracticeLicense === ''" @click="UploadPicture(3)">
  102. <text class="iconfont icon-jiahao"></text><text class="upload-text">医疗执业许可证</text>
  103. </view>
  104. <view class="upload-image" v-else>
  105. <image :src="params.medicalPracticeLicense" mode="" @click="ShowPreviewImage(3)"></image>
  106. <view class="upload-del" @click="DeletePicture(3)">
  107. <text class='iconfont icon-shanchu1'></text>
  108. </view>
  109. </view>
  110. </view>
  111. </view>
  112. </view>
  113. <view class="main-form-item none" v-if="params.secondClubType == 2 || params.secondClubType == 3">
  114. <view class="form-label none">科室</view>
  115. <textarea class="textarea-ke" placeholder="请填写经营的科室,至少三个,用逗号隔开" placeholder-style="placeholder" v-model="params.department" maxlength="16"></textarea>
  116. </view>
  117. <view class="main-form-item none" v-if="params.firstClubType == 1">
  118. <view class="form-label none">主营内容</view>
  119. <view class="form-checkbox-group">
  120. <checkbox-group @change="ChooseMaleLike" >
  121. <label class="item" v-for="(item, index) in mentuzCampList" :key="index" :class="{on: item.checked}">
  122. <checkbox class="item-checkbox" :value="item.value" color="#E15616" style="transform:scale(0.7)" :checked="item.checked"></checkbox>
  123. <text class="item-text">{{item.name}}</text>
  124. </label>
  125. </checkbox-group>
  126. </view>
  127. <view class="form-checkbox-input">
  128. <input class="checkbox-input" type="text" v-model="customItemValue" placeholder="请输入其他自定义品项目" maxlength="5"/>
  129. <view class="checkbox-btn" @click.stop="addCustomItem">确认添加</view>
  130. </view>
  131. </view>
  132. <view class="main-form-item none" v-if="params.firstClubType == 2">
  133. <view class="form-label none">主营内容</view>
  134. <view class="form-checkbox-group">
  135. <checkbox-group @change="ChooseMaleLike">
  136. <label class="item" v-for="(item, index) in medicaCampList" :key="index" :class="{on: item.checked}">
  137. <checkbox class="item-checkbox" :value="item.value" color="#E15616" style="transform:scale(0.7)" :checked="item.checked"></checkbox>
  138. <text class="item-text">{{item.name}}</text>
  139. </label>
  140. </checkbox-group>
  141. </view>
  142. <view class="form-checkbox-input">
  143. <input class="checkbox-input" type="text" v-model="customItemValue" placeholder="请输入其他自定义品项目" maxlength="5"/>
  144. <view class="checkbox-btn" @click.stop="addCustomItem">确认添加</view>
  145. </view>
  146. </view>
  147. <view class="register-fiexd clearfix" :style="{paddingBottom:isIphoneX ? '68rpx':''}">
  148. <view class="register-agree">
  149. <view class="agree-text" @tap.stop="agreeCheck()">
  150. <button class="checkbox iconfont" :class="[isCheck ?'icon-gouxuan':'icon-weigouxuan']"></button>
  151. 我已阅读并同意
  152. <text @click.stop="this.$api.navigateTo('/pages/service/organagree')">《机构协议》</text>
  153. <text @click.stop="this.$api.navigateTo('/pages/service/useragree')">《用户协议》</text>及
  154. <text @click.stop="this.$api.navigateTo('/pages/service/privacyagree')">《隐私权政策》</text>
  155. </view>
  156. </view>
  157. <view class="register-row">
  158. <view class="register-btn sub" :class="isSubLoading ? 'disabled' : ''" @click.stop="SubmitRegister">确定</view>
  159. </view>
  160. </view>
  161. </view>
  162. <view class="register-main" v-else>
  163. <view class="main-form-item">
  164. <view class="form-label">联系人</view>
  165. <view class="form-text"> {{ clubInfo.linkMan }} </view>
  166. </view>
  167. <view class="main-form-item">
  168. <view class="form-label">手机号</view>
  169. <view class="form-text">{{ clubInfo.bindMobile }}</view>
  170. </view>
  171. <view class="main-form-item">
  172. <view class="form-label">邮箱</view>
  173. <view class="form-text">{{ clubInfo.contractEmail }}</view>
  174. </view>
  175. <view class="main-form-item">
  176. <view class="form-label">机构名称</view>
  177. <view class="form-text">{{ clubInfo.name }}</view>
  178. </view>
  179. <view class="main-form-item">
  180. <view class="form-label">机构简称</view>
  181. <view class="form-text">{{ clubInfo.shortName }}</view>
  182. </view>
  183. <view class="main-form-item">
  184. <view class="form-label">机构地址</view>
  185. <view class="form-input">{{ clubInfo.provincialAddress }}</view>
  186. </view>
  187. <view class="main-form-item">
  188. <view class="form-textarea">{{ clubInfo.address }}</view>
  189. </view>
  190. <view class="main-form-item">
  191. <view class="form-label lang">营业执照编号</view>
  192. <view class="form-input lang">{{ clubInfo.socialCreditCode }}</view>
  193. </view>
  194. <view class="main-form-item file">
  195. <view class="main-form-upload">
  196. <view class="label">营业执照</view>
  197. <view class="upload-picture">
  198. <view class="upload-image"><image :src="clubInfo.businessLicense" mode="" @click="ShowPreviewImage(1)"></image></view>
  199. </view>
  200. </view>
  201. <view class="main-form-upload">
  202. <view class="label">门头照</view>
  203. <view class="upload-picture">
  204. <view class="upload-image"><image :src="clubInfo.shopPhoto" mode="" @click="ShowPreviewImage(2)"></image></view>
  205. </view>
  206. </view>
  207. </view>
  208. <view class="main-form-item">
  209. <view class="form-label">机构类型</view>
  210. <view class="form-text">
  211. {{ clubInfo.firstClubType | FirstFormat }}
  212. -
  213. {{ clubInfo.secondClubType | TwoFormat }}
  214. </view>
  215. </view>
  216. <view class="main-form-item file" v-if="clubInfo.firstClubType == 1">
  217. <view class="main-form-upload">
  218. <view class="label">资质</view>
  219. <view class="upload-picture">
  220. <view class="upload-image"><image :src="clubInfo.medicalPracticeLicense" mode="" @click="ShowPreviewImage(2)"></image></view>
  221. </view>
  222. </view>
  223. </view>
  224. <view class="main-form-item" v-if="clubInfo.secondClubType == 2 || clubInfo.secondClubType == 3">
  225. <view class="form-label">科室</view>
  226. <view class="form-text">{{ clubInfo.department }}</view>
  227. </view>
  228. <view class="main-form-item none">
  229. <view class="form-label none">主营内容</view>
  230. <view class="form-checkbox-group">
  231. <view class="form-table-item" v-for="(item, index) in showMainProductList" :key="index">
  232. {{ item.name }}
  233. </view>
  234. </view>
  235. </view>
  236. <view class="register-fiexd clearfix" :style="{paddingBottom:isIphoneX ? '68rpx':''}">
  237. <view class="register-row">
  238. <button class="register-btn sub" @tap="ShareRegister">分享</button>
  239. </view>
  240. </view>
  241. </view>
  242. <!-- 地址Pciker -->
  243. <city-Picker :themeColor="themeColor"
  244. ref="CityPicker"
  245. :pickerValueDefault="cityPickerValueDefault"
  246. @onCancel="onCancel"
  247. @onConfirm="onConfirm">
  248. </city-Picker>
  249. <!-- 分享弹窗 -->
  250. <shareModel v-if="isShareModal" :bindId="bindId" @shareConfirm ='onShareAppMessage'></shareModel>
  251. </view>
  252. </template>
  253. <script>
  254. import { beautyList,mentuzCampNullList,medicaCampNullList } from '@/common/json/data.json.js' //本地数据
  255. import shareModel from '@/components/cm-module/modelAlert/shareModel.vue' //分享弹窗
  256. import { uploadFileImage } from "@/services/public.js"
  257. export default{
  258. components:{
  259. shareModel
  260. },
  261. data() {
  262. return{
  263. isRegisterStep:true,
  264. isSubLoading:false,
  265. isIphoneX:this.$store.state.isIphone,
  266. isCheck:false,
  267. clubUserId:0,
  268. isShowInput:true,
  269. isShareModal:false,
  270. isDepartment:false,
  271. textareaFocus:false,
  272. beautyList:beautyList,
  273. mentuzCampList:mentuzCampNullList,
  274. medicaCampList:medicaCampNullList,
  275. addressText:'请选择机构所在地区',
  276. params:{
  277. userId:0,
  278. name:'',
  279. shortName:'',
  280. linkMan:'',
  281. bindMobile:'',
  282. contractEmail:'',
  283. socialCreditCode:'',
  284. isAgreed:0,
  285. townId:'', //区ID
  286. cityId:'', //区ID
  287. provinceId:'', //区ID
  288. addressDetail: '', //地址
  289. businessLicense:'', //营业执照
  290. shopPhoto:'', //门头照
  291. medicalPracticeLicense:'',//资质
  292. firstClubType:1, //1医美;2生美
  293. secondClubType:1, //1诊所;2门诊;3医院
  294. department:'',//科室
  295. mainProduct:'',
  296. },
  297. clubInfo:{
  298. linkMan:'',
  299. bindMobile:'',
  300. userId:0,
  301. },
  302. radioGroup1:[
  303. {name:'医美',value:1},
  304. {name:'生美',value:2}
  305. ],
  306. current:0,
  307. bindId:0,
  308. customItemValue:'', //自定义项目
  309. showMainProductList:[]
  310. }
  311. },
  312. filters: {
  313. FirstFormat:function(type) {//处理金额
  314. let name='';
  315. switch(type){
  316. case 1: name = '医美'; break;
  317. case 2: name = '生美'; break;
  318. }
  319. return name;
  320. },
  321. TwoFormat:function(type) {//处理金额
  322. let text='';
  323. switch(type){
  324. case 1: text = '诊所'; break;
  325. case 2: text = '门诊'; break;
  326. case 3: text = '医院'; break;
  327. }
  328. return text;
  329. },
  330. },
  331. onLoad(option) {
  332. this.$api.getStorage().then((resolve) =>{
  333. this.params.userId = resolve.userId ? resolve.userId : 0
  334. })
  335. },
  336. computed: {
  337. },
  338. methods:{
  339. CheckMobile(){//检测手机是否能注册
  340. if( this.params.bindMobile == ''){
  341. this.$util.msg('请输入手机号',2000);
  342. return
  343. }
  344. if(!this.$reg.isMobile(this.params.bindMobile)){
  345. this.$util.msg('请输入正确的手机号',2000);
  346. return
  347. }
  348. this.SellerService.SellerClubCheck({bindMobile:this.params.bindMobile})
  349. .then(response =>{
  350. this.$util.msg(response.data,2000);
  351. })
  352. .catch(error =>{
  353. this.$util.msg(error.msg,2000);
  354. })
  355. },
  356. SubmitRegister(){//提交注册
  357. if(this.isSubLoading){ return; }
  358. if( this.params.linkMan == ''){
  359. this.$util.msg('请输入联系人姓名',2000);
  360. return
  361. }
  362. if( this.params.bindMobile == ''){
  363. this.$util.msg('请输入联系人手机号',2000);
  364. return
  365. }
  366. if(!this.$reg.isMobile(this.params.bindMobile)){
  367. this.$util.msg('手机格式不正确',2000);
  368. return
  369. }
  370. if( this.params.contractEmail == ''){
  371. this.$util.msg('请输入邮箱地址',2000);
  372. return
  373. }
  374. if(!this.$reg.isEmail(this.params.contractEmail)){
  375. this.$util.msg('请输入正确的邮箱地址',2000);
  376. return
  377. }
  378. if( this.params.name == ''){
  379. this.$util.msg('请输入机构名称',2000);
  380. return
  381. }
  382. if( this.params.townId == ''){
  383. this.$util.msg('请选择机构地址',2000);
  384. return
  385. }
  386. if( this.params.address == ''){
  387. this.$util.msg('请填写机构详细地址',2000);
  388. return
  389. }
  390. if( this.params.businessLicense == ''){
  391. this.$util.msg('请上传您的营业执照',2000);
  392. return
  393. }
  394. if( this.params.firstClubType == 1){
  395. if( this.params.medicalPracticeLicense == ''){
  396. this.$util.msg('请上传您的医疗资质',2000);
  397. return
  398. }
  399. }
  400. if(this.params.firstClubType!=0){
  401. console.log(this.params.mainProduct)
  402. if(this.params.mainProduct == ''){
  403. this.$util.msg('请选择住机构主营内容',2000);
  404. return
  405. }
  406. }
  407. const mainproList = []
  408. if(this.params.firstClubType == 1){
  409. this.mentuzCampList.forEach(item =>{
  410. mainproList.push(item.name)
  411. })
  412. }else{
  413. this.medicaCampList.forEach(item =>{
  414. mainproList.push(item.name)
  415. })
  416. }
  417. this.params.mainProduct = mainproList.join('/')
  418. if(this.params.isAgreed == 0){
  419. this.$util.msg('请勾选同意协议',2000);
  420. return
  421. }
  422. this.isSubLoading = true;
  423. this.SellerService.SellerClubTemporary(this.params).then(response =>{
  424. this.bindId = response.data
  425. setTimeout(()=>{
  426. this.isRegisterStep = false
  427. this.GetClubUserInfo(this.bindId)
  428. },2000)
  429. }).catch(error =>{
  430. this.$util.msg(error.msg,2000);
  431. })
  432. },
  433. GetClubUserInfo(id){
  434. this.UserService.UseRregisterTemporaryInfo({id:id})
  435. .then(response =>{
  436. this.clubInfo = response.data
  437. this.isSubLoading = false;
  438. this.showMainProductList = this.setNewMainpro(this.clubInfo.mainProduct)
  439. })
  440. .catch(error =>{
  441. this.isSubLoading = false;
  442. this.$util.msg(error.msg,2000)
  443. })
  444. },
  445. ShareRegister(){//点击分享
  446. this.isShareModal = true
  447. },
  448. agreeCheck() {//勾选协议
  449. this.isCheck = !this.isCheck
  450. if(this.isCheck){
  451. this.params.isAgreed = 1
  452. }else{
  453. this.params.isAgreed = 0
  454. }
  455. },
  456. showMulLinkageThreePicker() {//三级地址联动
  457. this.isShowInput = true
  458. this.$refs.CityPicker.show()
  459. },
  460. showTextareaFocus(){//文本框获取焦点
  461. this.isShowInput = false
  462. this.textareaFocus = true
  463. },
  464. hideTextareaFocus(){//文本框失去焦点
  465. this.isShowInput = true
  466. this.textareaFocus = false
  467. },
  468. onTextareaInput(e){//地址详细信息
  469. this.params.address = e.detail.value;
  470. },
  471. onConfirm(e) {//获取选择的地址信息
  472. console.log('地址',e);
  473. this.addressText = e.name;
  474. this.params.townId = e.townCode;
  475. this.params.cityId = e.cityCode;
  476. this.params.provinceId = e.provinceCode;
  477. },
  478. UploadPicture(NUM) {//图片上传
  479. uploadFileImage().then(res =>{
  480. switch(NUM){
  481. case 1:
  482. this.params.businessLicense = JSON.parse(res.data).data
  483. break;
  484. case 2:
  485. this.params.shopPhoto = JSON.parse(res.data).data
  486. break;
  487. case 3:
  488. this.params.medicalPracticeLicense = JSON.parse(res.data).data
  489. break;
  490. }
  491. })
  492. },
  493. DeletePicture(NUM){//删除照片
  494. switch(NUM){
  495. case 1:
  496. this.$util.modal('','确定删除营业执照图片吗?','确定','取消',true,() =>{
  497. this.params.businessLicense = ''
  498. })
  499. break;
  500. case 2:
  501. this.$util.modal('','确定删除门头照图片吗?','确定','取消',true,() =>{
  502. this.params.shopPhoto = ''
  503. })
  504. break;
  505. case 3:
  506. this.$util.modal('','确定删除资质图片吗?','确定','取消',true,() =>{
  507. this.params.medicalPracticeLicense = ''
  508. })
  509. break;
  510. }
  511. },
  512. ShowPreviewImage(NUM) {//预览照片
  513. switch(NUM){
  514. case 1:
  515. this.myPreviewImageFn(this.businessLicense)
  516. break;
  517. case 2:
  518. this.myPreviewImageFn(this.shopPhoto)
  519. break;
  520. case 3:
  521. this.myPreviewImageFn(this.medicalPracticeLicense)
  522. break;
  523. }
  524. },
  525. myPreviewImageFn(url){//预览证件照
  526. this.isPreviewImage = true
  527. let mentuzArray = []
  528. mentuzArray.push(url)
  529. uni.previewImage({
  530. urls: mentuzArray,
  531. current: 0
  532. });
  533. },
  534. setNewMainpro(arr){//回显处理主营内容
  535. let _ARRAY = []
  536. arr.split('/').forEach((item,index) =>{
  537. let _OBJ = {value:(index+1).toString(),name:item,checked:true}
  538. _ARRAY.push(_OBJ)
  539. })
  540. return _ARRAY
  541. },
  542. bindPickerChange(e) {//选择机构类型
  543. this.params.firstClubType = Number(e.target.value);
  544. },
  545. radioChange(item) {//选择
  546. this.params.secondClubType = item.value;
  547. if( this.params.secondClubType == 2 || this.params.secondClubType == 3){
  548. this.isDepartment = true
  549. }else{
  550. this.isDepartment = false
  551. }
  552. for (let i = 0; i < this.beautyList.length; i++) {
  553. if (this.beautyList[i].value === this.params.secondClubType) {
  554. break;
  555. }
  556. }
  557. },
  558. ChooseMaleLike(e){
  559. switch(this.params.firstClubType){
  560. case 1:
  561. this.params.mainProduct = this.CheckLikes(e,this.mentuzCampList)
  562. console.log(this.params.mainProduct)
  563. break;
  564. case 2:
  565. this.params.mainProduct = this.CheckLikes(e,this.medicaCampList)
  566. console.log(this.params.mainProduct)
  567. break;
  568. }
  569. },
  570. CheckLikes(e,list){
  571. let values = e.detail.value
  572. let arr = []
  573. list.forEach(item => {
  574. if(values.indexOf(item.value) >= 0){
  575. this.$set(item,'checked',true)
  576. arr.push(item.name)
  577. }else{
  578. this.$set(item,'checked',false)
  579. }
  580. })
  581. return arr.join('/')
  582. },
  583. addCustomItem(){
  584. if(this.customItemValue==''){
  585. this.$util.msg('请输入自定义主营内容',2000);
  586. }else{
  587. if(this.params.firstClubType == 1){
  588. let item = {value:`${this.mentuzCampList.length+1}`,name:this.customItemValue,checked:true}
  589. if(this.CheckedArray(this.customItemValue,this.mentuzCampList)){
  590. this.$util.msg('主营内容已存在!',2000)
  591. }else{
  592. this.mentuzCampList.push(item)
  593. }
  594. }else{
  595. let item = {value:`${this.medicaCampList.length+1}`,name:this.customItemValue,checked:true}
  596. if(this.CheckedArray(this.customItemValue,this.medicaCampList)){
  597. this.$util.msg('主营内容已存在!',2000)
  598. }else{
  599. this.medicaCampList.push(item)
  600. }
  601. }
  602. }
  603. },
  604. CheckedArray(content,arr){//判断主营内容是否已存在
  605. console.log(content,arr)
  606. for(var i in arr){
  607. if(arr[i].name == content){
  608. return true;
  609. }
  610. }
  611. return false;
  612. },
  613. },
  614. onShareAppMessage(res){//分享转发
  615. this.isShareModal = false
  616. if (res.from === 'button') { // 来自页面内转发按钮
  617. }
  618. return {
  619. title: '您已注册采美365网,请点击登录',
  620. path: `/pages/login/binding?bindId=${this.bindId}&Identity=2`,
  621. imageUrl:'https://static.caimei365.com/app/img/icon/icon-addShare@3x.png'
  622. }
  623. },
  624. onShow() {
  625. }
  626. }
  627. </script>
  628. <style lang="scss">
  629. page{
  630. height: auto;
  631. }
  632. .register{
  633. width: 100%;
  634. position: relative;
  635. box-sizing: border-box;
  636. padding-bottom: 332rpx;
  637. .register-main{
  638. width: 100%;
  639. height: auto;
  640. box-sizing: border-box;
  641. padding: 0 24rpx;
  642. margin-top: 24rpx;
  643. .main-form-item{
  644. width: 100%;
  645. height: 88rpx;
  646. box-sizing: border-box;
  647. padding: 13rpx 0;
  648. border-bottom: 1px solid #e1e1e1;
  649. margin-top: 10rpx;
  650. position: relative;
  651. &.none{
  652. border-bottom: none;
  653. height: auto;
  654. }
  655. &.file{
  656. height: 273rpx;
  657. border-bottom: none;
  658. .main-form-upload{
  659. width: 50%;
  660. height: 100%;
  661. float: left;
  662. .label{
  663. width: 100%;
  664. float: left;
  665. height: 56rpx;
  666. line-height: 56rpx;
  667. font-size: $font-size-28;
  668. text-align: left;
  669. color: #999999;
  670. }
  671. .upload-picture{
  672. width: 100%;
  673. height: 180rpx;
  674. float: left;
  675. margin-top: 17rpx;
  676. .upload-none{
  677. width: 200rpx;
  678. height: 180rpx;
  679. border-radius: 6rpx;
  680. border:1px solid #e1e1e1;
  681. box-sizing: border-box;
  682. padding-top: 64rpx;
  683. .icon-jiahao{
  684. display: inline-block;
  685. width: 100%;
  686. text-align: center;
  687. line-height: 48rpx;
  688. font-size: 40rpx;
  689. color: #b2b2b2;
  690. }
  691. .upload-text{
  692. display: inline-block;
  693. width: 100%;
  694. text-align: center;
  695. line-height: 40rpx;
  696. font-size: $font-size-24;
  697. color: #b2b2b2;
  698. }
  699. }
  700. .upload-image{
  701. width: 200rpx;
  702. height: 180rpx;
  703. border-radius: 6rpx;
  704. border:1px solid #e1e1e1;
  705. box-sizing: border-box;
  706. position: relative;
  707. image{
  708. width: 200rpx;
  709. height: 180rpx;
  710. display: block;
  711. }
  712. .upload-del{
  713. width: 40rpx;
  714. height: 40rpx;
  715. position: absolute;
  716. top: -20rpx;
  717. right: -20rpx;
  718. line-height: 40rpx;
  719. text-align: center;
  720. .iconfont{
  721. font-size: $font-size-32;
  722. color: #999999;
  723. }
  724. }
  725. }
  726. }
  727. }
  728. }
  729. &.picker{
  730. border-bottom: none;
  731. .label-radio{
  732. margin-left: 30rpx;
  733. font-size: $font-size-28;
  734. float: left;
  735. }
  736. .row-radio{
  737. float: left;
  738. transform: scale(0.7);
  739. }
  740. .row-text{
  741. text-align: center;
  742. float: left;
  743. font-size: $font-size-28;
  744. }
  745. .picker-radio{
  746. box-sizing: border-box;
  747. padding-left: 180rpx;
  748. .secondTyperadio{
  749. border: 2rpx solid #e1e1e1;
  750. display: inline-block;
  751. font-size: 26rpx;
  752. color: #999999;
  753. padding: 0 24rpx;
  754. border-radius: 22rpx;
  755. line-height: 42rpx;
  756. margin-right: 56rpx;
  757. float: left;
  758. &.active{
  759. border: 2rpx solid #ffe6dc;
  760. color: $color-system;
  761. }
  762. }
  763. }
  764. }
  765. &.textarea{
  766. height: 142rpx;
  767. .textarea{
  768. width: 100%;
  769. height: 142rpx;
  770. box-sizing: border-box;
  771. font-size: $font-size-28;
  772. color: $text-color;
  773. z-index: 1;
  774. }
  775. .textarea.hide{
  776. opacity: 0;
  777. }
  778. .textarea.show{
  779. color: #999999;
  780. }
  781. }
  782. .textarea-ke{
  783. width: 100%;
  784. height: 160rpx;
  785. border-radius: 6rpx;
  786. border: 1px solid #e1e1e1;
  787. font-size: $font-size-28;
  788. box-sizing: border-box;
  789. padding: 15rpx 20rpx;
  790. }
  791. .form-textarea{
  792. font-size: $font-size-28;
  793. color: #333333;
  794. }
  795. .form-label{
  796. width: 148rpx;
  797. float: left;
  798. height: 100%;
  799. line-height: 56rpx;
  800. font-size: $font-size-28;
  801. text-align: left;
  802. color: #999999;
  803. &.lang{
  804. width: 188rpx;
  805. }
  806. &.none{
  807. width: 100%;
  808. }
  809. }
  810. .form-input{
  811. width: 554rpx;
  812. height: 56rpx;
  813. line-height: 56rpx;
  814. font-size: $font-size-28;
  815. text-align: left;
  816. color: #333333;
  817. float: left;
  818. &.lang{
  819. width: 514rpx;
  820. }
  821. &.phone{
  822. width: 418rpx;
  823. }
  824. &.none{
  825. color: #999999;
  826. }
  827. }
  828. .form-text{
  829. width: 554rpx;
  830. height: 56rpx;
  831. line-height: 56rpx;
  832. font-size: $font-size-28;
  833. text-align: left;
  834. color: #333333;
  835. float: left;
  836. }
  837. .form-btn{
  838. width: 136rpx;
  839. height: 56rpx;
  840. background: $btn-confirm;
  841. color: #FFFFFF;
  842. font-size: $font-size-28;
  843. text-align: center;
  844. border-radius: 28rpx;
  845. line-height: 56rpx;
  846. float: left;
  847. }
  848. .icon-xiayibu{
  849. width: 80rpx;
  850. height: 80rpx;
  851. position: absolute;
  852. right: 0;
  853. top: 0;
  854. line-height: 80rpx;
  855. text-align: center;
  856. color: #b2b2b2;
  857. }
  858. .form-checkbox-group {
  859. width: 100%;
  860. display: flex;
  861. flex-flow: row wrap;
  862. justify-content: space-between;
  863. align-items: center;
  864. &.btn{
  865. margin: 0 auto;
  866. margin-left: 116rpx;
  867. }
  868. .row-input{
  869. display: flex;
  870. width: 220rpx;
  871. height: 40rpx;
  872. padding: 24rpx;
  873. text-align: left;
  874. border-radius: 10rpx;
  875. font-size: $font-size-28;
  876. color: $text-color;
  877. }
  878. .confirm-btn{
  879. width: 160rpx;
  880. height: 64rpx;
  881. border-radius: 45rpx;
  882. line-height: 64rpx;
  883. text-align: center;
  884. background:#ffe6dc;
  885. color: $color-system;
  886. &.other{
  887. width: 213rpx;
  888. }
  889. }
  890. .item {
  891. height: 60rpx;
  892. font-size:$font-size-28;
  893. line-height: 60rpx;
  894. border-radius:10rpx;
  895. margin-right: 20rpx;
  896. margin-bottom: 10rpx;
  897. box-sizing: border-box;
  898. float: left;
  899. }
  900. .item-text{
  901. display: inline-block;
  902. font-size: 26rpx;
  903. color: #999999;
  904. border-radius: 28rpx;
  905. line-height: 50rpx;
  906. }
  907. .on {
  908. .item-text{
  909. border-color: $color-system;
  910. color:$color-system;
  911. }
  912. }
  913. .form-table-item{
  914. height: 48rpx;
  915. padding: 0 32rpx;
  916. border: 1px solid #b2b2b2;
  917. text-align: center;
  918. font-size: $font-size-28;
  919. color: #333333;
  920. float: left;
  921. line-height: 48rpx;
  922. border-radius: 26rpx;
  923. margin-right: 12rpx;
  924. margin-top: 20rpx;
  925. }
  926. }
  927. .form-checkbox-input{
  928. width: 100%;
  929. height: 64rpx;
  930. margin-top: 20rpx;
  931. .checkbox-input{
  932. width: 518rpx;
  933. height: 64rpx;
  934. box-sizing: border-box;
  935. text-align: left;
  936. font-size: $font-size-26;
  937. color: #333333;
  938. line-height: 64rpx;
  939. float: left;
  940. border: 1px solid #e1e1e1;
  941. border-radius: 32rpx;
  942. padding: 0 20rpx;
  943. }
  944. .checkbox-btn{
  945. width: 160rpx;
  946. height: 64rpx;
  947. border-radius: 32rpx;
  948. background-color: #ffe6dc;
  949. line-height: 64rpx;
  950. text-align: center;
  951. color: #e15616;
  952. font-size: $font-size-28;
  953. float: right;
  954. }
  955. }
  956. }
  957. .register-fiexd{
  958. width: 100%;
  959. height: auto;
  960. padding: 20rpx 0;
  961. position: fixed;
  962. bottom: 0;
  963. left: 0;
  964. z-index: 888;
  965. background: #FFFFFF;
  966. .register-agree{
  967. display: flex;
  968. flex-direction: column;
  969. align-items: center;
  970. margin:0 0 32rpx 0;
  971. .agree-text{
  972. .checkbox{
  973. float: left;
  974. margin: 4rpx 6rpx 0 0;
  975. color: #999999;
  976. font-size: $font-size-32;
  977. &.icon-gouxuan{
  978. color: $color-system;
  979. }
  980. }
  981. font-size: 20rpx;
  982. line-height: 44rpx;
  983. color: #999999;
  984. text{
  985. color:#0091FF;
  986. }
  987. }
  988. }
  989. }
  990. .register-btn{
  991. width: 702rpx;
  992. height: 88rpx;
  993. border-radius: 44rpx;
  994. font-size: $font-size-28;
  995. line-height: 88rpx;
  996. color: #FFFFFF;
  997. margin: 0 auto;
  998. text-align: center;
  999. background: $btn-confirm;
  1000. margin-top: 96rpx;
  1001. &.none{
  1002. background: #FFFFFF;
  1003. color: $text-color;
  1004. margin-top: 0;
  1005. }
  1006. &.sub{
  1007. margin-top: 0;
  1008. }
  1009. }
  1010. }
  1011. }
  1012. </style>