register.vue 31 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077
  1. <template>
  2. <view class="container register">
  3. <view class="register-tab">
  4. <view class="nav-item" :class="{ current: tabCurrentIndex === 1 }" >
  5. 账户信息<view class="line"></view>
  6. </view>
  7. <view class="nav-item" :class="{ current: tabCurrentIndex === 2 }" >
  8. 基本信息<view class="line"></view>
  9. </view>
  10. <view class="nav-item" :class="{ current: tabCurrentIndex === 3 }" >
  11. 详细信息
  12. </view>
  13. </view>
  14. <view class="register-main clearfix" v-if="tabCurrentIndex === 1">
  15. <view class="register-row clearfix">
  16. <view class="register-from">
  17. <view class="label">邮箱:</view>
  18. <input class="row-input" type="text" v-model="registerEmail" @input="registerEmailInput" placeholder="请输入您的常用邮箱" maxlength="30"/>
  19. </view>
  20. </view>
  21. <view class="register-row clearfix">
  22. <view class="register-from code">
  23. <view class="label">邮箱验证码:</view>
  24. <input class="row-input" type="text" v-model="regEmailCode" placeholder="请输入邮箱验证码" maxlength="6"/>
  25. </view>
  26. <view class="register-from btn" :class="[isEmialDisabled === true ? 'disabled' : 'none']">
  27. <button class="row-input" type="button" @click.stop="getEmailCode" :disabled="isEmialDisabled">{{emialCodecount}}</button>
  28. </view>
  29. </view>
  30. <view class="register-row clearfix">
  31. <view class="register-from">
  32. <view class="label">登录密码:</view>
  33. <input class="row-input" type="password" v-model="password" placeholder="密码必须为8-16位字母数字组合" maxlength="20"/>
  34. </view>
  35. </view>
  36. <view class="register-row clearfix">
  37. <view class="register-from">
  38. <view class="label">确认密码:</view>
  39. <input class="row-input" type="password" v-model="passwordCheck" placeholder="请确认密码" maxlength="20"/>
  40. </view>
  41. </view>
  42. <view class="register-row clearfix">
  43. <view class="register-btn" @click="registerStepsfirst()">下一步</view>
  44. </view>
  45. </view>
  46. <view class="register-main clearfix" v-if="tabCurrentIndex === 2">
  47. <view class="register-row clearfix">
  48. <view class="register-from">
  49. <view class="label">机构名称:</view>
  50. <input class="row-input" type="text" v-model="clubName" placeholder="请输入您的机构名称" maxlength="30"/>
  51. </view>
  52. </view>
  53. <view class="register-row clearfix">
  54. <view class="register-from">
  55. <view class="label">联系人:</view>
  56. <input class="row-input" type="text" v-model="clubContact" placeholder="请输入联系姓名" maxlength="6"/>
  57. </view>
  58. </view>
  59. <view class="register-row clearfix">
  60. <view class="register-from">
  61. <view class="label">手机号:</view>
  62. <input class="row-input" type="number" v-model="registerEmail" placeholder="请输入手机号" maxlength="11"/>
  63. </view>
  64. </view>
  65. <view class="register-row clearfix">
  66. <view class="register-from imgcode">
  67. <view class="label">图形验证码:</view>
  68. <input class="row-input" type="text" v-model="regEmailCode" placeholder="请输入图形验证码" maxlength="6"/>
  69. </view>
  70. <view class="register-from img-btn">
  71. <view class="vscodeimg">
  72. <image src="https://ss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=2158189919,2752757953&fm=26&gp=0.jpg" mode=""></image>
  73. </view>
  74. <view class="vscod-refresh">
  75. <text class="iconfont icon-shuaxin"></text>
  76. <text class="ref-text">刷新</text>
  77. </view>
  78. </view>
  79. </view>
  80. <view class="register-row clearfix">
  81. <view class="register-from code">
  82. <view class="label">短信验证码:</view>
  83. <input class="row-input" type="text" v-model="regEmailCode" placeholder="请输入短信验证码" maxlength="6"/>
  84. </view>
  85. <view class="register-from btn" :class="[isDisabled === true ? 'disabled' : 'none']">
  86. <button class="row-input" type="button" @click.stop="getEmailCode" :disabled="isDisabled">获取验证码</button>
  87. </view>
  88. </view>
  89. <view class="register-row clearfix">
  90. <view class="register-btn" @click="steps(3)">下一步</view>
  91. </view>
  92. <view class="register-row clearfix">
  93. <view class="register-btn none" @click="steps(1)">上一步</view>
  94. </view>
  95. </view>
  96. <view class="register-main detailed clearfix" v-if="tabCurrentIndex === 3">
  97. <view class="register-tips"><text class="iconfont icon-gantanhao-yuankuang">详细信息请尽量填写,有利于快速审核通过</text></view>
  98. <view class="register-row clearfix">
  99. <view class="register-from">
  100. <view class="label">机构简称:</view>
  101. <input class="row-input" type="text" v-model="clubContact" placeholder="请输入您的机构简称" maxlength="16"/>
  102. </view>
  103. </view>
  104. <view class="register-row clearfix">
  105. <view class="register-from" @click="showMulLinkageThreePicker">
  106. <view class="label">机构地址:</view>
  107. <text class="row-input" :class="addressData.address === '请选择机构所在地区' ? 'none' : ''">
  108. {{addressData.address}}
  109. </text>
  110. <text class="iconfont icon-xiayibu"></text>
  111. </view>
  112. </view>
  113. <view class="register-row text-textarea clearfix">
  114. <view class="textarea show" v-if="isShowInput">{{addressData.addressDetail ? addressData.addressDetail :'详细地址:如道路、门牌号、小区等'}}</view>
  115. <textarea v-else
  116. class="textarea"
  117. type="text"
  118. v-model="addressData.addressDetail"
  119. placeholder="详细地址:如道路、门牌号、小区等"
  120. placeholder-class="placeholder"
  121. maxlength="50"
  122. @input="onTextareaInput"
  123. :class="isShowInput ? '':''"
  124. />
  125. </view>
  126. <view class="register-row clearfix">
  127. <view class="register-from">
  128. <view class="label">营业执照编号:</view>
  129. <input class="row-input" type="text" v-model="clubContact" placeholder="请填写社会统一信用代码" maxlength="16"/>
  130. </view>
  131. </view>
  132. <view class="register-row clearfix">
  133. <view class="register-picture">
  134. <view class="label">营业执照:</view>
  135. <view class="upload-picture">
  136. <view class="upload-none" v-if="uploadBusinessImage === ''" @click="chooseBusinessImage"><text class="iconfont icon-jiahao"></text></view>
  137. <view class="upload-image" v-else>
  138. <image :src="uploadBusinessImage" mode="" @click="viewBusinessImage"></image>
  139. <view class="upload-del" @click="delBusinessImage">
  140. <text class='iconfont icon-shanchu1'></text>
  141. </view>
  142. </view>
  143. </view>
  144. </view>
  145. </view>
  146. <view class="register-row clearfix">
  147. <view class="register-picture">
  148. <view class="label">门头照:</view>
  149. <view class="upload-picture">
  150. <view class="upload-none" v-if="uploadMentuzImage === ''" @click="chooseMentuzImage"><text class="iconfont icon-jiahao"></text></view>
  151. <view class="upload-image" v-else>
  152. <image :src="uploadMentuzImage" mode="" @click="viewMentuzImage"></image>
  153. <view class="upload-del" @click="delMentuzImage">
  154. <text class='iconfont icon-shanchu1'></text>
  155. </view>
  156. </view>
  157. </view>
  158. </view>
  159. </view>
  160. <view class="register-row clearfix">
  161. <view class="register-from picker">
  162. <view class="label">机构类型:</view>
  163. <picker @change="bindPickerChange" :value="index" :range="organizationTypeList" range-key="name">
  164. <view class="row-input" :class="[isOrganizationType == 0 ? 'none' : '']">{{organizationTypeList[typtIndex].name}}</view>
  165. </picker>
  166. <text class="iconfont icon-xiayibu"></text>
  167. </view>
  168. </view>
  169. <view class="register-row clearfix" v-if="isOrganizationType == 1">
  170. <view class="register-from radio">
  171. <radio-group @change="radioChange">
  172. <label class="row-input" v-for="(item, index) in beautyList" :key="item.value">
  173. <radio class="row-radio" :value="item.value" :checked="index === current" color="#E15616"/>
  174. <view class="row-text">{{item.name}}</view>
  175. </label>
  176. </radio-group>
  177. </view>
  178. </view>
  179. <view class="register-row clearfix" v-show="isDepartment">
  180. <view class="register-from">
  181. <view class="label">科室:</view>
  182. <input class="row-input keshi" type="text" v-model="clubContact" placeholder="请填写经营的科室,至少三个,用逗号隔开" maxlength="16"/>
  183. </view>
  184. </view>
  185. <view class="register-row clearfix" v-if="isOrganizationType == 1">
  186. <view class="register-picture">
  187. <view class="label zz">医疗执业许可证:</view>
  188. <view class="upload-picture">
  189. <view class="upload-none" v-if="uploadMedicalImage === ''" @click="chooseMedicalImage"><text class="iconfont icon-jiahao"></text></view>
  190. <view class="upload-image" v-else>
  191. <image :src="uploadMedicalImage" mode="" @click="viewMedicalImage"></image>
  192. <view class="upload-del" @click="delMedicalImage">
  193. <text class='iconfont icon-shanchu1'></text>
  194. </view>
  195. </view>
  196. </view>
  197. </view>
  198. </view>
  199. <view class="register-row clearfix" v-if="isOrganizationType == 1">
  200. <view class="register-from group">
  201. <view class="label">主营内容:</view>
  202. <checkbox-group class="content-class" @change="chooseMaleLike" >
  203. <label class="item" v-for="(item, index) in mentuzCampList" :key="index" :class="{on: item.checked}">
  204. <checkbox :value="item.value"></checkbox>
  205. <text class="item-text">{{item.name}}</text>
  206. </label>
  207. </checkbox-group>
  208. </view>
  209. <view class="register-from group btn">
  210. <view class="content-class btn">
  211. <view class="item" @click="showAustomItem">
  212. <text class="item-text">其他</text>
  213. </view>
  214. </view>
  215. </view>
  216. <view class="register-from group btn" v-show="isShowAustomItem">
  217. <view class="content-class btn">
  218. <input class="row-input" type="text" v-model="customItemValue" placeholder="请输入自定义项目" @blur="onBlurInput" maxlength="5"/>
  219. <button type="default"
  220. class="confirm-btn"
  221. :class="[isDisabled === true ? 'disabled' : 'none']"
  222. :disabled="isDisabled"
  223. @click.stop="addCustomItem"
  224. >确认添加</button>
  225. </view>
  226. </view>
  227. </view>
  228. <view class="register-row clearfix" v-if="isOrganizationType == 2">
  229. <view class="register-from group">
  230. <view class="label">主营内容:</view>
  231. <checkbox-group class="content-class" @change="chooseMaleLikes">
  232. <label class="item" v-for="(item, index) in medicaCampList" :key="index" :class="{on: item.checked}">
  233. <checkbox :value="item.value"></checkbox>
  234. <text class="item-text">{{item.name}}</text>
  235. </label>
  236. </checkbox-group>
  237. </view>
  238. <view class="register-from group btn">
  239. <view class="content-class btn">
  240. <view class="item" @click="showAustomItem">
  241. <text class="item-text">其他</text>
  242. </view>
  243. </view>
  244. </view>
  245. <view class="register-from group btn" v-show="isShowAustomItem">
  246. <view class="content-class btn">
  247. <input class="row-input" type="text" v-model="customItemValue" placeholder="请输入自定义项目" @blur="onBlurInput" maxlength="5"/>
  248. <button type="default"
  249. class="confirm-btn"
  250. :class="[isDisabled === true ? 'disabled' : 'none']"
  251. :disabled="isDisabled"
  252. @click.stop="addCustomItem"
  253. >确认添加</button>
  254. </view>
  255. </view>
  256. </view>
  257. <view class="register-fiexd clearfix">
  258. <view class="register-agree">
  259. <view class="agree-text" @tap.stop="agreeCheck()">
  260. <button class="checkbox iconfont" :class="[isCheck?'icon-gouxuan':'icon-weigouxuan']"></button>
  261. 我已阅读并同意
  262. <text @click.stop="this.$api.navigateTo('/pages/service/organagree')">《机构协议》</text>
  263. <text @click.stop="this.$api.navigateTo('/pages/service/useragree')">《用户协议》</text>及
  264. <text @click.stop="this.$api.navigateTo('/pages/service/privacyagree')">《隐私权政策》</text>
  265. </view>
  266. </view>
  267. <view class="register-row ">
  268. <view class="register-btn sub">提交审核</view>
  269. </view>
  270. <view class="register-row clearfix">
  271. <view class="register-btn none" @click="steps(2)">上一步</view>
  272. </view>
  273. </view>
  274. <mpvue-city-picker :themeColor="themeColor"
  275. ref="mpvueCityPicker"
  276. :pickerValueDefault="cityPickerValueDefault"
  277. @onCancel="onCancel"
  278. @onConfirm="onConfirm">
  279. </mpvue-city-picker>
  280. </view>
  281. </view>
  282. </template>
  283. <script>
  284. import { mapMutations } from 'vuex';
  285. import mpvueCityPicker from '@/components/mpvue-citypicker/mpvueCityPicker.vue'
  286. import uniTag from '@/components/uni-tag/uni-tag.vue';
  287. import authorize from '@/common/config/authorize.js'
  288. import URLCONFIG from '@/common/config/config.js'
  289. import { getEmailCode } from "@/api/utils.js";
  290. var self;
  291. export default{
  292. components:{
  293. uniTag,
  294. mpvueCityPicker
  295. },
  296. data() {
  297. return{
  298. registerEmail:'', //注册邮箱
  299. regEmailCode:'', //邮箱验证码
  300. isEmialDisabled: true,
  301. count: '',
  302. emialCodecount: '获取验证码',
  303. emialTimer: null,
  304. isDisabled:true,
  305. tabCurrentIndex:1,
  306. isShowInput:false,
  307. isCheck:false, //是否全选
  308. uploadBusinessImage:'',
  309. uploadMentuzImage:'https://ss0.bdstatic.com/70cFuHSh_Q1YnxGkpoWK1HF6hhy/it/u=1431188283,1203112303&fm=26&gp=0.jpg',
  310. uploadMedicalImage:'https://ss0.bdstatic.com/70cFuHSh_Q1YnxGkpoWK1HF6hhy/it/u=1431188283,1203112303&fm=26&gp=0.jpg',
  311. isOrganizationType:0,
  312. organizationTypeList:[
  313. {name:'请选择机构类型',value:0},
  314. {name:'医美',value:1},
  315. {name:'生美',value:2}
  316. ],
  317. beautyList:[{value:'1',name:'诊所'},{value:'2',name:'门诊'},{value:'3',name:'医院'}],
  318. mentuzCampList:[{value:'1',name:'整形'},{value:'2',name:'轻医美'},{value:'3',name:'皮肤科'}],
  319. medicaCampList:[
  320. {value:'1',name:'美容'},
  321. {value:'2',name:'美体'},
  322. {value:'3',name:'美发'},
  323. {value:'4',name:'皮肤管理'},
  324. {value:'5',name:'光电'},
  325. {value:'6',name:'综合类'},
  326. {value:'7',name:'中医养生'},
  327. {value:'8',name:'spa'}
  328. ],
  329. typtIndex:0,
  330. organizationType:0,
  331. current:0,
  332. isDepartment:false, //是否显示科室
  333. isShowAustomItem:false, //是否显示其他添加
  334. customItemValue:'', //自定义项目
  335. addressData:{
  336. addressID:'',
  337. address:'请选择机构所在地区',
  338. userID: '', //用户id ,只在新增收货地址时传
  339. shouHuoRen: '', //收货人
  340. mobile:'', //收货人手机
  341. townID:'', //区ID
  342. addressDetail: '', //地址
  343. defaultFlag:0, //是否默认收货地址(0 不是默认,1 默认)
  344. },
  345. }
  346. },
  347. onLoad(option) {
  348. console.log(option)
  349. self = this;
  350. self.registerType = option.type;
  351. self.id = option.id
  352. if(option.listType) {
  353. self.listType = option.listType;
  354. self.listVal = option.listVal;
  355. }
  356. },
  357. methods:{
  358. registerStepsfirst(){
  359. if( this.registerEmail == ''){
  360. this.$util.msg('请输入邮箱地址',3000);
  361. return
  362. }
  363. },
  364. getEmailCode(){
  365. if(!this.$reg.isEmail(this.registerEmail)){
  366. this.$util.msg('请输入正确的邮箱地址',3000);
  367. console.log(this.$reg.isEmail(this.registerEmail))
  368. return
  369. }
  370. this.$api.get(getEmailCode,{email:this.registerEmail,status:2}, res => {
  371. console.log(res)
  372. })
  373. const TIME_COUNT = 120;
  374.       if (!this.emialTimer) {
  375.         this.count = TIME_COUNT;
  376.         this.isEmialDisabled = false;
  377.         this.emialTimer = setInterval(() => {
  378.         if (this.count > 1 && this.count <= TIME_COUNT) {
  379.           this.count--
  380.           this.emialCodecount = this.count +'s'
  381.          } else {
  382.           this.isEmialDisabled = true;
  383.           clearInterval(this.emialTimer)
  384.           this.emialTimer = null
  385. this.emialCodecount = '获取验证码'
  386.          }
  387.         },1000)
  388.        }
  389. this.isEmialDisabled = true;
  390. },
  391. registerEmailInput(e){
  392. console.log(this.$reg.isEmail(e.detail.value))
  393. this.registerEmail = e.detail.value;
  394. if(!this.registerEmail){
  395. this.isEmialDisabled = true
  396. }else{
  397. this.isEmialDisabled = false
  398. }
  399. },
  400. goregister() {
  401. self.$api.get('/register/isEnabled',{userOrganizeID:self.userOrganizeID,invitationCode:self.invitationCode}, res => {
  402. if (res.code == "1") {
  403. //查看此微信用户是否已经授权过
  404. authorize.getSetting().then(res =>{
  405. // console.log('是否已授权',res);//0:为取消授权 1:为已授权 2:为未操作
  406. if(res == 2){
  407. self.isUserInfo = true
  408. }else{
  409. self.isUserInfo = false
  410. self.wxGetUserInfo()
  411. }
  412. })
  413. }else if(res.code =='0'){
  414. self.toestText ='请输入邀请码';
  415. self.alertText ='邀请码';
  416. self.telPhone = res.msg;
  417. self.isToast = true;
  418. }else if(res.code =='-2'){
  419. self.toestText ='邀请码已失效';
  420. self.alertText ='新邀请码';
  421. self.telPhone = res.msg;
  422. self.isToast = true;
  423. }else if(res.code =='-3'){
  424. self.toestText ='邀请码已被使用';
  425. self.alertText ='新邀请码';
  426. self.telPhone = res.msg;
  427. self.isToast = true;
  428. }else{
  429. uni.showToast({icon:'none', title: res.msg, duration: 3000});
  430. self.isUserInfo = false
  431. }
  432. })
  433. },
  434. // 三级联动选择
  435. showMulLinkageThreePicker() {
  436. this.isShowInput = true
  437. this.$refs.mpvueCityPicker.show()
  438. },
  439. onConfirm(e) {
  440. // console.log('地址',e);
  441. this.addressData.address = e.name;
  442. this.addressData.townID = e.cityCode;
  443. },
  444. bindPickerChange(e) {
  445. console.log('picker发送选择改变,携带值为:' + e.target)
  446. this.typtIndex = e.target.value
  447. this.isOrganizationType = e.target.value
  448. },
  449. radioChange(e) {
  450. let _value = e.target.value
  451. if( _value == '2' || _value == '3'){
  452. this.isDepartment = true
  453. }else{
  454. this.isDepartment = false
  455. }
  456. for (let i = 0; i < this.beautyList.length; i++) {
  457. if (this.beautyList[i].value === _value) {
  458. this.current = i;
  459. break;
  460. }
  461. }
  462. },
  463. chooseMaleLike(e){
  464. let items = this.mentuzCampList
  465. let values = e.detail.value
  466. for (var i = 0, lenI = items.length; i < lenI; ++i) {
  467. const item = items[i]
  468. if(values.indexOf(item.value) >= 0){
  469. this.$set(item,'checked',true)
  470. }else{
  471. this.$set(item,'checked',false)
  472. }
  473. }
  474. },
  475. chooseMaleLikes(e){
  476. let items = this.medicaCampList
  477. let values = e.detail.value
  478. for (var i = 0, lenI = items.length; i < lenI; ++i) {
  479. const item = items[i]
  480. if(values.indexOf(item.value) >= 0){
  481. this.$set(item,'checked',true)
  482. }else{
  483. this.$set(item,'checked',false)
  484. }
  485. }
  486. },
  487. onTextareaInput(e){
  488. this.addressData.addressDetail = e.detail.value;
  489. // console.log(this.addressData.addressDetail)
  490. },
  491. chooseBusinessImage() {
  492. let self = this;
  493. uni.chooseImage({
  494. count: 1, //默认1
  495. sizeType: ['compressed'], //可以指定是原图还是压缩图,默认二者都有
  496. sourceType: ['album','camera'], //从相册选择
  497. success: (res) => {
  498. const tempFilePaths = res.tempFilePaths;
  499. const uploadTask = uni.uploadFile({
  500. url : 'https://mall-b.caimei365.com/formData/MultiPictareaddData',
  501. filePath: tempFilePaths[0],
  502. name: 'file',
  503. formData: {
  504. 'user': 'test'
  505. },
  506. success: function (data) {
  507. console.log(data.data);
  508. self.uploadBusinessImage = res.tempFilePaths
  509. },
  510. error : function(e){
  511. console.log(e);
  512. }
  513. })
  514. },
  515. })
  516. },
  517. chooseMentuzImage() {
  518. let self = this;
  519. uni.chooseImage({
  520. count: 1, //默认1
  521. sizeType: ['compressed'], //可以指定是原图还是压缩图,默认二者都有
  522. sourceType: ['album','camera'], //从相册选择
  523. success: (res) => {
  524. const tempFilePaths = res.tempFilePaths;
  525. const uploadTask = uni.uploadFile({
  526. url : 'https://mall-b.caimei365.com/formData/MultiPictareaddData',
  527. filePath: tempFilePaths[0],
  528. name: 'file',
  529. formData: {
  530. 'user': 'test'
  531. },
  532. success: function (res) {
  533. console.log(res.data);
  534. self.uploadMentuzImage = res.data
  535. },
  536. error : function(e){
  537. console.log(e);
  538. }
  539. })
  540. }
  541. });
  542. },
  543. chooseMedicalImage() {
  544. let self = this;
  545. uni.chooseImage({
  546. count: 1, //默认1
  547. sizeType: ['compressed'], //可以指定是原图还是压缩图,默认二者都有
  548. sourceType: ['album','camera'], //从相册选择
  549. success: (res) => {
  550. const tempFilePaths = res.tempFilePaths;
  551. const uploadTask = uni.uploadFile({
  552. url : 'https://mall-b.caimei365.com/formData/MultiPictareaddData',
  553. filePath: tempFilePaths[0],
  554. name: 'file',
  555. formData: {
  556. 'user': 'test'
  557. },
  558. success: function (res) {
  559. console.log(res.data);
  560. self.uploadMedicalImage = res.data
  561. },
  562. error : function(e){
  563. console.log(e);
  564. }
  565. })
  566. }
  567. });
  568. },
  569. viewMentuzImage(e) {
  570. let self = this
  571. uni.previewImage({
  572. urls: self.uploadMentuzImage,
  573. current: e.currentTarget.dataset.url
  574. });
  575. },
  576. viewBusinessImage(e) {
  577. let self = this
  578. uni.previewImage({
  579. urls: self.uploadBusinessImage,
  580. current: e.currentTarget.dataset.url
  581. });
  582. },
  583. viewMedicalImage(e) {
  584. let self = this
  585. uni.previewImage({
  586. urls: self.uploadMedicalImage,
  587. current: e.currentTarget.dataset.url
  588. });
  589. },
  590. delBusinessImage(){
  591. this.uploadBusinessImage = ''
  592. },
  593. delMentuzImage(){
  594. this.uploadMentuzImage = ''
  595. },
  596. delMedicalImage(){
  597. this.uploadMedicalImage = ''
  598. },
  599. agreeCheck() {
  600. this.isCheck = !this.isCheck
  601. },
  602. onBlurInput(e){//
  603. if(e.detail.value ===''){
  604. this.isDisabled = true
  605. }else{
  606. this.isDisabled = false
  607. }
  608. },
  609. showAustomItem() {
  610. this.isShowAustomItem = !this.isShowAustomItem
  611. },
  612. addCustomItem(){
  613. if(this.isOrganizationType == 1){
  614. let item = {value:`${this.mentuzCampList.length+1}`,name:this.customItemValue}
  615. this.mentuzCampList.push(item)
  616. }else{
  617. let item = {value:`${this.medicaCampList.length+1}`,name:this.customItemValue}
  618. this.medicaCampList.push(item)
  619. }
  620. },
  621. steps(index) {//$attrstab切换
  622. console.log(index)
  623. this.tabCurrentIndex = index;
  624. }
  625. }
  626. }
  627. </script>
  628. <style lang="scss">
  629. .register{
  630. width: 100%;
  631. height: auto;
  632. border-top: 1px solid #F7F7F7;
  633. .model-warp.none{
  634. display: none;
  635. }
  636. .model-warp.show{
  637. display: block;
  638. }
  639. .register-tab{
  640. width: 570rpx;
  641. height: 60rpx;
  642. padding: 60rpx 90rpx;
  643. position: relative;
  644. .nav-item{
  645. width: 142rpx;
  646. background: #FFFFFF;
  647. line-height: 60rpx;
  648. border-radius: 30rpx;
  649. text-align: center;
  650. color: #999999;
  651. font-size:$font-size-26;
  652. float: left;
  653. margin-right: 72rpx;
  654. position: relative;
  655. .line{
  656. height: 3rpx;
  657. width: 50rpx;
  658. background: #999999;
  659. position: absolute;
  660. right: -58rpx;
  661. top: 32rpx;
  662. }
  663. &:last-child{
  664. margin-right: 0;
  665. }
  666. &.current{
  667. color:#FFFFFF;
  668. background: $color-system;
  669. }
  670. }
  671. }
  672. .register-main{
  673. width: 100%;
  674. height: auto;
  675. &.detailed{
  676. padding-bottom: 330rpx;
  677. }
  678. .register-tips{
  679. display: flex;
  680. flex-direction: column;
  681. align-items: center;
  682. line-height: 44rpx;
  683. font-size: $font-size-24;
  684. color: #FF0000;
  685. margin-bottom: 40rpx;
  686. .iconfont{
  687. font-size: $font-size-24;
  688. }
  689. }
  690. .register-row{
  691. width: 702rpx;
  692. height: auto;
  693. padding: 0 24rpx;
  694. margin-bottom: 20rpx;
  695. .register-from{
  696. width: 654rpx;
  697. height: 40rpx;
  698. padding: 24rpx;
  699. background: $sub-bg-color;
  700. border-radius: 14rpx;
  701. position: relative;
  702. .label{
  703. text-align: left;
  704. font-size: $font-size-28;
  705. color: $text-color;
  706. line-height: 40rpx;
  707. float: left;
  708. }
  709. .row-input{
  710. width: 440rpx;
  711. padding-left:10rpx;
  712. font-size: $font-size-28;
  713. color: $text-color;
  714. line-height: 40rpx;
  715. float: left;
  716. height: 40rpx;
  717. &.none{
  718. color: #999999;
  719. }
  720. &.keshi{
  721. width: 550rpx;
  722. }
  723. }
  724. &.img-btn{
  725. width: 220rpx;
  726. height: 88rpx;
  727. padding: 0;
  728. float: left;
  729. background: #FFFFFF;
  730. display: block;
  731. .vscodeimg{
  732. width: 150rpx;
  733. height: 88rpx;
  734. float: left;
  735. display: flex;
  736. flex-direction: column;
  737. align-items: center;
  738. border-radius: 14rpx;
  739. image{
  740. width: 150rpx;
  741. height: 88rpx;
  742. border-radius: 14rpx;
  743. }
  744. }
  745. .vscod-refresh{
  746. width: 70rpx;
  747. float: right;
  748. text-align: right;
  749. display: flex;
  750. flex-direction: column;
  751. align-items: center;
  752. line-height: 44rpx;
  753. .icon-shuaxin{
  754. font-size: 48rpx;
  755. color: #333333;
  756. }
  757. .ref-text{
  758. font-size: 24rpx;
  759. color: #333333;
  760. }
  761. }
  762. }
  763. &.imgcode{
  764. width: 410rpx;
  765. float: left;
  766. margin-right: 20rpx;
  767. .row-input{
  768. width: 230rpx;
  769. }
  770. }
  771. &.code{
  772. width: 410rpx;
  773. float: left;
  774. margin-right: 20rpx;
  775. .row-input{
  776. width: 230rpx;
  777. }
  778. }
  779. &.btn{
  780. width: 176rpx;
  781. float: left;
  782. .row-input{
  783. width: 176rpx;
  784. padding: 0;
  785. background: #F7F7F7;
  786. text-align: center;
  787. }
  788. &.none{
  789. background: $btn-confirm;
  790. .row-input{
  791. color: #FFFFFF;
  792. background: $btn-confirm;
  793. }
  794. }
  795. &.disabled{
  796. .row-input{
  797. color: #999999;
  798. }
  799. }
  800. }
  801. &.picker{
  802. padding: 0 24rpx;
  803. width: 654rpx;
  804. height: 88rpx;
  805. line-height: 88rpx;
  806. .label{
  807. line-height: 88rpx;
  808. }
  809. .row-input{
  810. width: 470rpx;
  811. height: 88rpx;
  812. line-height: 88rpx;
  813. padding-left: 30rpx;
  814. }
  815. }
  816. &.radio{
  817. padding: 0 24rpx;
  818. width: 654rpx;
  819. height: 288rpx;
  820. .row-input{
  821. width: 100%;
  822. height: 88rpx;
  823. line-height: 88rpx;
  824. padding-left: 0;
  825. }
  826. .row-radio{
  827. float: left;
  828. }
  829. .row-text{
  830. width: 100rpx;
  831. text-align: center;
  832. float: left;
  833. }
  834. }
  835. &.group{
  836. padding: 0 24rpx;
  837. width: 654rpx;
  838. height: auto;
  839. background: #FFFFFF;
  840. margin-top: 30rpx;
  841. .row-input{
  842. width: 100%;
  843. height: 88rpx;
  844. line-height: 88rpx;
  845. padding-left: 0;
  846. }
  847. .row-radio{
  848. float: left;
  849. }
  850. .row-text{
  851. width: 100rpx;
  852. text-align: center;
  853. float: left;
  854. }
  855. }
  856. &.btn{
  857. margin-top: 0;
  858. }
  859. .content-class {
  860. width: 520rpx;
  861. margin: 20rpx auto;
  862. display: flex;
  863. flex-flow: row wrap;
  864. justify-content: space-between;
  865. &.btn{
  866. margin: 0 auto;
  867. margin-left: 126rpx;
  868. }
  869. .row-input{
  870. display: flex;
  871. width: 220rpx;
  872. height: 40rpx;
  873. padding: 24rpx;
  874. text-align: left;
  875. border-radius: 10rpx;
  876. font-size: $font-size-28;
  877. color: $text-color;
  878. }
  879. .confirm-btn{
  880. width: 200rpx;
  881. height: 88rpx;
  882. border-radius: 10rpx;
  883. line-height: 88rpx;
  884. text-align: center;
  885. &.none{
  886. color: #FFFFFF;
  887. background: $btn-confirm;
  888. }
  889. &.disabled{
  890. color: #999999;
  891. }
  892. }
  893. .item {
  894. width: 156rpx;
  895. height: 60rpx;
  896. font-size:$font-size-28;
  897. line-height: 60rpx;
  898. border-radius:10rpx;
  899. margin-bottom: 20rpx;
  900. text-align: center;
  901. box-sizing: border-box;
  902. border: 1rpx solid #EFEFEF;
  903. checkbox {
  904. display: none;
  905. }
  906. }
  907. .on {
  908. border-color: $color-system;
  909. color:$color-system;
  910. }
  911. }
  912. }
  913. .icon-xiayibu{
  914. width: 88rpx;
  915. height: 88rpx;
  916. position: absolute;
  917. right: 0;
  918. top: 0;
  919. line-height: 88rpx;
  920. text-align: center;
  921. }
  922. &.text-textarea{
  923. background: #FFFFFF;
  924. .textarea{
  925. width: 654rpx;
  926. height: 180rpx;
  927. background: #F7F7F7;
  928. padding: 24rpx;
  929. font-size: $font-size-28;
  930. color: $text-color;
  931. z-index: 1;
  932. border-radius: 14rpx;
  933. }
  934. .textarea.hide{
  935. opacity: 0;
  936. }
  937. .textarea.show{
  938. color: #999999;
  939. }
  940. }
  941. }
  942. .register-picture{
  943. height: 102rpx;
  944. margin: 40rpx 0 0 0;
  945. .label{
  946. float: left;
  947. font-size: $font-size-28;
  948. color: $text-color;
  949. line-height: 102rpx;
  950. width: 150rpx;
  951. text-align: right;
  952. &.zz{
  953. width: 230rpx;
  954. }
  955. }
  956. .upload-picture{
  957. float: left;
  958. height: 100rpx;
  959. .upload-none{
  960. width: 100rpx;
  961. height: 100rpx;
  962. text-align: center;
  963. line-height: 100rpx;
  964. color: #999999;
  965. border: 1px solid #999999;
  966. border-radius: 10rpx;
  967. margin: 0 20rpx;
  968. .iconfont{
  969. font-size: $font-size-28;
  970. }
  971. }
  972. .upload-image{
  973. width: 100rpx;
  974. height: 100rpx;
  975. border-radius: 10rpx;
  976. margin: 0 20rpx;
  977. position: relative;
  978. image{
  979. width: 100rpx;
  980. height: 100rpx;
  981. border-radius: 10rpx;
  982. }
  983. .upload-del{
  984. width: 40rpx;
  985. height: 40rpx;
  986. position: absolute;
  987. top: -20rpx;
  988. right: -20rpx;
  989. line-height: 40rpx;
  990. text-align: center;
  991. .iconfont{
  992. font-size: $font-size-32;
  993. color: #999999;
  994. }
  995. }
  996. }
  997. }
  998. }
  999. .register-input{
  1000. width: 654rpx;
  1001. height: 40rpx;
  1002. padding: 24rpx;
  1003. margin: 0 auto;
  1004. margin-bottom: 60rpx;
  1005. background: #F7F7F7;
  1006. border-radius: 14rpx;
  1007. .input{
  1008. width: 100%;
  1009. height: 100%;
  1010. background: #F7F7F7;
  1011. font-size: $font-size-28;
  1012. line-height: 40rpx;
  1013. color: #333333;
  1014. border-radius: 14rpx;
  1015. }
  1016. }
  1017. .register-fiexd{
  1018. width: 100%;
  1019. height: auto;
  1020. position: fixed;
  1021. bottom: 0;
  1022. left: 0;
  1023. z-index: 999;
  1024. background: #FFFFFF;
  1025. .register-agree{
  1026. display: flex;
  1027. flex-direction: column;
  1028. align-items: center;
  1029. margin: 32rpx 0;
  1030. .agree-text{
  1031. .checkbox{
  1032. float: left;
  1033. margin: 4rpx 6rpx 0 0;
  1034. color: #999999;
  1035. font-size: $font-size-32;
  1036. &.icon-gouxuan{
  1037. color: $color-system;
  1038. }
  1039. }
  1040. font-size: 20rpx;
  1041. line-height: 44rpx;
  1042. color: #999999;
  1043. text{
  1044. color:#0091FF;
  1045. }
  1046. }
  1047. }
  1048. }
  1049. .register-btn{
  1050. width: 702rpx;
  1051. height: 88rpx;
  1052. border-radius: 14rpx;
  1053. font-size: $font-size-28;
  1054. line-height: 88rpx;
  1055. color: #FFFFFF;
  1056. margin: 0 auto;
  1057. text-align: center;
  1058. background: $btn-confirm;
  1059. margin-top: 96rpx;
  1060. &.none{
  1061. background: #FFFFFF;
  1062. color: $text-color;
  1063. margin-top: 0;
  1064. }
  1065. &.sub{
  1066. margin-top: 0;
  1067. }
  1068. }
  1069. }
  1070. }
  1071. </style>