register-member.vue 29 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013
  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" @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.contractMobile }}</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" :orderID="clubInfo.userId" @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 "@/api/utils.js"
  257. export default{
  258. components:{
  259. shareModel
  260. },
  261. data() {
  262. return{
  263. isRegisterStep:true,
  264. isIphoneX:this.$store.state.isIphone,
  265. isCheck:false,
  266. clubUserId:0,
  267. isShowInput:true,
  268. isShareModal:false,
  269. isDepartment:false,
  270. textareaFocus:false,
  271. beautyList:beautyList,
  272. mentuzCampList:mentuzCampNullList,
  273. medicaCampList:medicaCampNullList,
  274. addressText:'请选择机构所在地区',
  275. params:{
  276. userId:0,
  277. name:'',
  278. shortName:'',
  279. linkMan:'',
  280. bindMobile:'',
  281. contractEmail:'',
  282. socialCreditCode:'',
  283. isAgreed:0,
  284. townId:'', //区ID
  285. cityId:'', //区ID
  286. provinceId:'', //区ID
  287. addressDetail: '', //地址
  288. businessLicense:'', //营业执照
  289. shopPhoto:'', //门头照
  290. medicalPracticeLicense:'',//资质
  291. firstClubType:1, //1医美;2生美
  292. secondClubType:1, //1诊所;2门诊;3医院
  293. department:'',//科室
  294. mainProduct:'',
  295. },
  296. clubInfo:{
  297. linkMan:'',
  298. bindMobile:'',
  299. userId:0
  300. },
  301. radioGroup1:[
  302. {name:'医美',value:1},
  303. {name:'生美',value:2}
  304. ],
  305. current:0,
  306. customItemValue:'', //自定义项目
  307. showMainProductList:[]
  308. }
  309. },
  310. filters: {
  311. FirstFormat:function(type) {//处理金额
  312. let name='';
  313. switch(type){
  314. case 1: name = '医美'; break;
  315. case 2: name = '生美'; break;
  316. }
  317. return name;
  318. },
  319. TwoFormat:function(type) {//处理金额
  320. let text='';
  321. switch(type){
  322. case 1: text = '诊所'; break;
  323. case 2: text = '门诊'; break;
  324. case 3: text = '医院'; break;
  325. }
  326. return text;
  327. },
  328. },
  329. onLoad(option) {
  330. this.$api.getStorage().then((resolve) =>{
  331. this.params.userId = resolve.userId ? resolve.userId : 0
  332. })
  333. },
  334. computed: {
  335. },
  336. methods:{
  337. CheckMobile(){//检测手机是否能注册
  338. if( this.params.bindMobile == ''){
  339. this.$util.msg('请输入手机号',2000);
  340. return
  341. }
  342. if(!this.$reg.isMobile(this.params.bindMobile)){
  343. this.$util.msg('请输入正确的手机号',2000);
  344. return
  345. }
  346. this.SellerService.SellerClubCheck({bindMobile:this.params.bindMobile})
  347. .then(response =>{
  348. this.$util.msg(response.data,2000);
  349. })
  350. .catch(error =>{
  351. this.$util.msg(error.msg,2000);
  352. })
  353. },
  354. SubmitRegister(){//提交注册
  355. if( this.params.linkMan == ''){
  356. this.$util.msg('请输入联系人姓名',2000);
  357. return
  358. }
  359. if( this.params.bindMobile == ''){
  360. this.$util.msg('请输入联系人手机号',2000);
  361. return
  362. }
  363. if(!this.$reg.isMobile(this.params.bindMobile)){
  364. this.$util.msg('手机格式不正确',2000);
  365. return
  366. }
  367. if( this.params.contractEmail == ''){
  368. this.$util.msg('请输入邮箱地址',2000);
  369. return
  370. }
  371. if(!this.$reg.isEmail(this.params.contractEmail)){
  372. this.$util.msg('请输入正确的邮箱地址',2000);
  373. return
  374. }
  375. if( this.params.name == ''){
  376. this.$util.msg('请输入机构名称',2000);
  377. return
  378. }
  379. if( this.params.townId == ''){
  380. this.$util.msg('请选择机构地址',2000);
  381. return
  382. }
  383. if( this.params.address == ''){
  384. this.$util.msg('请填写机构详细地址',2000);
  385. return
  386. }
  387. if( this.params.businessLicense == ''){
  388. this.$util.msg('请上传您的营业执照',2000);
  389. return
  390. }
  391. if( this.params.firstClubType == 1){
  392. if( this.params.medicalPracticeLicense == ''){
  393. this.$util.msg('请上传您的医疗资质',2000);
  394. return
  395. }
  396. }
  397. if(this.params.firstClubType!=0){
  398. console.log(this.params.mainProduct)
  399. if(this.params.mainProduct == ''){
  400. this.$util.msg('请选择住机构主营内容',2000);
  401. return
  402. }
  403. }
  404. const mainproList = []
  405. if(this.params.firstClubType == 1){
  406. this.mentuzCampList.forEach(item =>{
  407. mainproList.push(item.name)
  408. })
  409. }else{
  410. this.medicaCampList.forEach(item =>{
  411. mainproList.push(item.name)
  412. })
  413. }
  414. this.params.mainProduct = mainproList.join('/')
  415. if(this.params.isAgreed == 0){
  416. this.$util.msg('请勾选同意协议',2000);
  417. return
  418. }
  419. this.SellerService.SellerClubRegister(this.params).then(response =>{
  420. this.$util.msg('提交成功',2000);
  421. this.clubInfo.userId = response.data
  422. setTimeout(()=>{
  423. this.isRegisterStep = false
  424. this.GetClubUserInfo(this.clubInfo.userId)
  425. },2000)
  426. }).catch(error =>{
  427. this.$util.msg(error.msg,2000);
  428. })
  429. },
  430. GetClubUserInfo(userId){
  431. this.UserService.OrganizationUpdateModifyInfo({userId:userId})
  432. .then(response =>{
  433. this.clubInfo = response.data.club
  434. this.showMainProductList = this.setNewMainpro(this.clubInfo.mainProduct)
  435. })
  436. .catch(error =>{
  437. this.$util.msg(error.msg,2000)
  438. })
  439. },
  440. ShareRegister(){//点击分享
  441. this.isShareModal = true
  442. },
  443. agreeCheck() {//勾选协议
  444. this.isCheck = !this.isCheck
  445. if(this.isCheck){
  446. this.params.isAgreed = 1
  447. }else{
  448. this.params.isAgreed = 0
  449. }
  450. },
  451. showMulLinkageThreePicker() {//三级地址联动
  452. this.isShowInput = true
  453. this.$refs.CityPicker.show()
  454. },
  455. showTextareaFocus(){//文本框获取焦点
  456. this.isShowInput = false
  457. this.textareaFocus = true
  458. },
  459. hideTextareaFocus(){//文本框失去焦点
  460. this.isShowInput = true
  461. this.textareaFocus = false
  462. },
  463. onTextareaInput(e){//地址详细信息
  464. this.params.address = e.detail.value;
  465. },
  466. onConfirm(e) {//获取选择的地址信息
  467. console.log('地址',e);
  468. this.addressText = e.name;
  469. this.params.townId = e.townCode;
  470. this.params.cityId = e.cityCode;
  471. this.params.provinceId = e.provinceCode;
  472. },
  473. UploadPicture(NUM) {//图片上传
  474. uploadFileImage().then(res =>{
  475. switch(NUM){
  476. case 1:
  477. this.params.businessLicense = JSON.parse(res.data).data
  478. break;
  479. case 2:
  480. this.params.shopPhoto = JSON.parse(res.data).data
  481. break;
  482. case 3:
  483. this.params.medicalPracticeLicense = JSON.parse(res.data).data
  484. break;
  485. }
  486. })
  487. },
  488. DeletePicture(NUM){//删除照片
  489. switch(NUM){
  490. case 1:
  491. this.$util.modal('','确定删除营业执照图片吗?','确定','取消',true,() =>{
  492. this.params.businessLicense = ''
  493. })
  494. break;
  495. case 2:
  496. this.$util.modal('','确定删除门头照图片吗?','确定','取消',true,() =>{
  497. this.params.shopPhoto = ''
  498. })
  499. break;
  500. case 3:
  501. this.$util.modal('','确定删除资质图片吗?','确定','取消',true,() =>{
  502. this.params.medicalPracticeLicense = ''
  503. })
  504. break;
  505. }
  506. },
  507. ShowPreviewImage(NUM) {//预览照片
  508. switch(NUM){
  509. case 1:
  510. this.myPreviewImageFn(this.businessLicense)
  511. break;
  512. case 2:
  513. this.myPreviewImageFn(this.shopPhoto)
  514. break;
  515. case 3:
  516. this.myPreviewImageFn(this.medicalPracticeLicense)
  517. break;
  518. }
  519. },
  520. myPreviewImageFn(url){//预览证件照
  521. this.isPreviewImage = true
  522. let mentuzArray = []
  523. mentuzArray.push(url)
  524. uni.previewImage({
  525. urls: mentuzArray,
  526. current: 0
  527. });
  528. },
  529. setNewMainpro(arr){//回显处理主营内容
  530. let _ARRAY = []
  531. arr.split('/').forEach((item,index) =>{
  532. let _OBJ = {value:(index+1).toString(),name:item,checked:true}
  533. _ARRAY.push(_OBJ)
  534. })
  535. return _ARRAY
  536. },
  537. bindPickerChange(e) {//选择机构类型
  538. this.params.firstClubType = Number(e.target.value);
  539. },
  540. radioChange(item) {//选择
  541. this.params.secondClubType = item.value;
  542. if( this.params.secondClubType == 2 || this.params.secondClubType == 3){
  543. this.isDepartment = true
  544. }else{
  545. this.isDepartment = false
  546. }
  547. for (let i = 0; i < this.beautyList.length; i++) {
  548. if (this.beautyList[i].value === this.params.secondClubType) {
  549. break;
  550. }
  551. }
  552. },
  553. ChooseMaleLike(e){
  554. switch(this.params.firstClubType){
  555. case 1:
  556. this.params.mainProduct = this.CheckLikes(e,this.mentuzCampList)
  557. console.log(this.params.mainProduct)
  558. break;
  559. case 2:
  560. this.params.mainProduct = this.CheckLikes(e,this.medicaCampList)
  561. console.log(this.params.mainProduct)
  562. break;
  563. }
  564. },
  565. CheckLikes(e,list){
  566. let values = e.detail.value
  567. let arr = []
  568. list.forEach(item => {
  569. if(values.indexOf(item.value) >= 0){
  570. this.$set(item,'checked',true)
  571. arr.push(item.name)
  572. }else{
  573. this.$set(item,'checked',false)
  574. }
  575. })
  576. return arr.join('/')
  577. },
  578. addCustomItem(){
  579. if(this.customItemValue==''){
  580. this.$util.msg('请输入自定义主营内容',2000);
  581. }else{
  582. if(this.params.firstClubType == 1){
  583. let item = {value:`${this.mentuzCampList.length+1}`,name:this.customItemValue,checked:true}
  584. if(this.CheckedArray(this.customItemValue,this.mentuzCampList)){
  585. this.$util.msg('主营内容已存在!',2000)
  586. }else{
  587. this.mentuzCampList.push(item)
  588. }
  589. }else{
  590. let item = {value:`${this.medicaCampList.length+1}`,name:this.customItemValue,checked:true}
  591. if(this.CheckedArray(this.customItemValue,this.medicaCampList)){
  592. this.$util.msg('主营内容已存在!',2000)
  593. }else{
  594. this.medicaCampList.push(item)
  595. }
  596. }
  597. }
  598. },
  599. CheckedArray(content,arr){//判断主营内容是否已存在
  600. console.log(content,arr)
  601. for(var i in arr){
  602. if(arr[i].name == content){
  603. return true;
  604. }
  605. }
  606. return false;
  607. },
  608. },
  609. onShareAppMessage(res){//分享转发
  610. this.isShareModal = false
  611. if (res.from === 'button') { // 来自页面内转发按钮
  612. }
  613. return {
  614. title: '您已注册采美365网,请点击登录',
  615. path: `/pages/login/binding?userId=${this.clubInfo.userId}`,
  616. imageUrl:'https://static.caimei365.com/app/img/icon/icon-addShare@3x.png'
  617. }
  618. },
  619. onShow() {
  620. }
  621. }
  622. </script>
  623. <style lang="scss">
  624. page{
  625. height: auto;
  626. }
  627. .register{
  628. width: 100%;
  629. position: relative;
  630. box-sizing: border-box;
  631. padding-bottom: 332rpx;
  632. .register-main{
  633. width: 100%;
  634. height: auto;
  635. box-sizing: border-box;
  636. padding: 0 24rpx;
  637. margin-top: 24rpx;
  638. .main-form-item{
  639. width: 100%;
  640. height: 88rpx;
  641. box-sizing: border-box;
  642. padding: 13rpx 0;
  643. border-bottom: 1px solid #e1e1e1;
  644. margin-top: 10rpx;
  645. position: relative;
  646. &.none{
  647. border-bottom: none;
  648. height: auto;
  649. }
  650. &.file{
  651. height: 273rpx;
  652. border-bottom: none;
  653. .main-form-upload{
  654. width: 50%;
  655. height: 100%;
  656. float: left;
  657. .label{
  658. width: 100%;
  659. float: left;
  660. height: 56rpx;
  661. line-height: 56rpx;
  662. font-size: $font-size-28;
  663. text-align: left;
  664. color: #999999;
  665. }
  666. .upload-picture{
  667. width: 100%;
  668. height: 180rpx;
  669. float: left;
  670. margin-top: 17rpx;
  671. .upload-none{
  672. width: 200rpx;
  673. height: 180rpx;
  674. border-radius: 6rpx;
  675. border:1px solid #e1e1e1;
  676. box-sizing: border-box;
  677. padding-top: 64rpx;
  678. .icon-jiahao{
  679. display: inline-block;
  680. width: 100%;
  681. text-align: center;
  682. line-height: 48rpx;
  683. font-size: 40rpx;
  684. color: #b2b2b2;
  685. }
  686. .upload-text{
  687. display: inline-block;
  688. width: 100%;
  689. text-align: center;
  690. line-height: 40rpx;
  691. font-size: $font-size-24;
  692. color: #b2b2b2;
  693. }
  694. }
  695. .upload-image{
  696. width: 200rpx;
  697. height: 180rpx;
  698. border-radius: 6rpx;
  699. border:1px solid #e1e1e1;
  700. box-sizing: border-box;
  701. position: relative;
  702. image{
  703. width: 200rpx;
  704. height: 180rpx;
  705. display: block;
  706. }
  707. .upload-del{
  708. width: 40rpx;
  709. height: 40rpx;
  710. position: absolute;
  711. top: -20rpx;
  712. right: -20rpx;
  713. line-height: 40rpx;
  714. text-align: center;
  715. .iconfont{
  716. font-size: $font-size-32;
  717. color: #999999;
  718. }
  719. }
  720. }
  721. }
  722. }
  723. }
  724. &.picker{
  725. border-bottom: none;
  726. .label-radio{
  727. margin-left: 30rpx;
  728. font-size: $font-size-28;
  729. float: left;
  730. }
  731. .row-radio{
  732. float: left;
  733. transform: scale(0.7);
  734. }
  735. .row-text{
  736. text-align: center;
  737. float: left;
  738. font-size: $font-size-28;
  739. }
  740. .picker-radio{
  741. box-sizing: border-box;
  742. padding-left: 180rpx;
  743. .secondTyperadio{
  744. border: 2rpx solid #e1e1e1;
  745. display: inline-block;
  746. font-size: 26rpx;
  747. color: #999999;
  748. padding: 0 24rpx;
  749. border-radius: 22rpx;
  750. line-height: 42rpx;
  751. margin-right: 56rpx;
  752. float: left;
  753. &.active{
  754. border: 2rpx solid #ffe6dc;
  755. color: $color-system;
  756. }
  757. }
  758. }
  759. }
  760. &.textarea{
  761. height: 142rpx;
  762. .textarea{
  763. width: 100%;
  764. height: 142rpx;
  765. box-sizing: border-box;
  766. font-size: $font-size-28;
  767. color: $text-color;
  768. z-index: 1;
  769. }
  770. .textarea.hide{
  771. opacity: 0;
  772. }
  773. .textarea.show{
  774. color: #999999;
  775. }
  776. }
  777. .textarea-ke{
  778. width: 100%;
  779. height: 160rpx;
  780. border-radius: 6rpx;
  781. border: 1px solid #e1e1e1;
  782. font-size: $font-size-28;
  783. box-sizing: border-box;
  784. padding: 15rpx 20rpx;
  785. }
  786. .form-textarea{
  787. font-size: $font-size-28;
  788. color: #333333;
  789. }
  790. .form-label{
  791. width: 148rpx;
  792. float: left;
  793. height: 100%;
  794. line-height: 56rpx;
  795. font-size: $font-size-28;
  796. text-align: left;
  797. color: #999999;
  798. &.lang{
  799. width: 188rpx;
  800. }
  801. &.none{
  802. width: 100%;
  803. }
  804. }
  805. .form-input{
  806. width: 554rpx;
  807. height: 56rpx;
  808. line-height: 56rpx;
  809. font-size: $font-size-28;
  810. text-align: left;
  811. color: #333333;
  812. float: left;
  813. &.lang{
  814. width: 514rpx;
  815. }
  816. &.phone{
  817. width: 418rpx;
  818. }
  819. &.none{
  820. color: #999999;
  821. }
  822. }
  823. .form-text{
  824. width: 554rpx;
  825. height: 56rpx;
  826. line-height: 56rpx;
  827. font-size: $font-size-28;
  828. text-align: left;
  829. color: #333333;
  830. float: left;
  831. }
  832. .form-btn{
  833. width: 136rpx;
  834. height: 56rpx;
  835. background: $btn-confirm;
  836. color: #FFFFFF;
  837. font-size: $font-size-28;
  838. text-align: center;
  839. border-radius: 28rpx;
  840. line-height: 56rpx;
  841. float: left;
  842. }
  843. .icon-xiayibu{
  844. width: 80rpx;
  845. height: 80rpx;
  846. position: absolute;
  847. right: 0;
  848. top: 0;
  849. line-height: 80rpx;
  850. text-align: center;
  851. color: #b2b2b2;
  852. }
  853. .form-checkbox-group {
  854. width: 100%;
  855. display: flex;
  856. flex-flow: row wrap;
  857. justify-content: space-between;
  858. align-items: center;
  859. &.btn{
  860. margin: 0 auto;
  861. margin-left: 116rpx;
  862. }
  863. .row-input{
  864. display: flex;
  865. width: 220rpx;
  866. height: 40rpx;
  867. padding: 24rpx;
  868. text-align: left;
  869. border-radius: 10rpx;
  870. font-size: $font-size-28;
  871. color: $text-color;
  872. }
  873. .confirm-btn{
  874. width: 160rpx;
  875. height: 64rpx;
  876. border-radius: 45rpx;
  877. line-height: 64rpx;
  878. text-align: center;
  879. background:#ffe6dc;
  880. color: $color-system;
  881. &.other{
  882. width: 213rpx;
  883. }
  884. }
  885. .item {
  886. height: 60rpx;
  887. font-size:$font-size-28;
  888. line-height: 60rpx;
  889. border-radius:10rpx;
  890. margin-right: 20rpx;
  891. margin-bottom: 10rpx;
  892. box-sizing: border-box;
  893. float: left;
  894. }
  895. .item-text{
  896. display: inline-block;
  897. font-size: 26rpx;
  898. color: #999999;
  899. border-radius: 28rpx;
  900. line-height: 50rpx;
  901. }
  902. .on {
  903. .item-text{
  904. border-color: $color-system;
  905. color:$color-system;
  906. }
  907. }
  908. .form-table-item{
  909. height: 48rpx;
  910. padding: 0 32rpx;
  911. border: 1px solid #b2b2b2;
  912. text-align: center;
  913. font-size: $font-size-28;
  914. color: #333333;
  915. float: left;
  916. line-height: 48rpx;
  917. border-radius: 26rpx;
  918. margin-right: 12rpx;
  919. margin-top: 20rpx;
  920. }
  921. }
  922. .form-checkbox-input{
  923. width: 100%;
  924. height: 64rpx;
  925. margin-top: 20rpx;
  926. .checkbox-input{
  927. width: 518rpx;
  928. height: 64rpx;
  929. box-sizing: border-box;
  930. text-align: left;
  931. font-size: $font-size-26;
  932. color: #333333;
  933. line-height: 64rpx;
  934. float: left;
  935. border: 1px solid #e1e1e1;
  936. border-radius: 32rpx;
  937. padding: 0 20rpx;
  938. }
  939. .checkbox-btn{
  940. width: 160rpx;
  941. height: 64rpx;
  942. border-radius: 32rpx;
  943. background-color: #ffe6dc;
  944. line-height: 64rpx;
  945. text-align: center;
  946. color: #e15616;
  947. font-size: $font-size-28;
  948. float: right;
  949. }
  950. }
  951. }
  952. .register-fiexd{
  953. width: 100%;
  954. height: auto;
  955. padding: 20rpx 0;
  956. position: fixed;
  957. bottom: 0;
  958. left: 0;
  959. z-index: 888;
  960. background: #FFFFFF;
  961. .register-agree{
  962. display: flex;
  963. flex-direction: column;
  964. align-items: center;
  965. margin:0 0 32rpx 0;
  966. .agree-text{
  967. .checkbox{
  968. float: left;
  969. margin: 4rpx 6rpx 0 0;
  970. color: #999999;
  971. font-size: $font-size-32;
  972. &.icon-gouxuan{
  973. color: $color-system;
  974. }
  975. }
  976. font-size: 20rpx;
  977. line-height: 44rpx;
  978. color: #999999;
  979. text{
  980. color:#0091FF;
  981. }
  982. }
  983. }
  984. }
  985. .register-btn{
  986. width: 702rpx;
  987. height: 88rpx;
  988. border-radius: 44rpx;
  989. font-size: $font-size-28;
  990. line-height: 88rpx;
  991. color: #FFFFFF;
  992. margin: 0 auto;
  993. text-align: center;
  994. background: $btn-confirm;
  995. margin-top: 96rpx;
  996. &.none{
  997. background: #FFFFFF;
  998. color: $text-color;
  999. margin-top: 0;
  1000. }
  1001. &.sub{
  1002. margin-top: 0;
  1003. }
  1004. }
  1005. }
  1006. }
  1007. </style>