register.vue 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786
  1. <template>
  2. <view class="setting-page">
  3. <view class="content">
  4. <view class="info-block">
  5. <view class="info-title">组织归属</view>
  6. <view class="info-item">
  7. <view class="title"><text class="required">*</text>公司</view>
  8. <view class="picker" @click="showPicker('company')">
  9. <view class="picker-text">{{ selectedCompanyName || '请选择公司' }}<image class="icon"
  10. src="https://ysrw-1395926010.cos.ap-chengdu.myqcloud.com/image/icon_expand.png"
  11. mode="widthFix"></image>
  12. </view>
  13. </view>
  14. </view>
  15. <view class="info-item">
  16. <view class="title"><text class="required">*</text>部门</view>
  17. <view class="picker" @click="showPicker('dept')">
  18. <view class="picker-text">{{ selectedDeptName || '请选择部门' }}<image class="icon"
  19. src="https://ysrw-1395926010.cos.ap-chengdu.myqcloud.com/image/icon_expand.png"
  20. mode="widthFix"></image>
  21. </view>
  22. </view>
  23. </view>
  24. </view>
  25. <view class="info-block">
  26. <view class="info-title">账号信息</view>
  27. <!-- <view class="info-item">
  28. <view class="title"><text class="required">*</text>用户账号</view>
  29. <input class="input-field code-input" type="text" v-model="formData.userName" placeholder="请输入用户账号(登录名)" />
  30. </view>
  31. <view class="info-item">
  32. <view class="title"><text class="required">*</text>用户名称</view>
  33. <input class="input-field code-input" type="text" v-model="formData.nickName" placeholder="请输入名称" />
  34. </view> -->
  35. <!-- <view class="info-item">
  36. <view class="title"><text class="required">*</text>手机号码</view>
  37. <input class="input-field code-input" type="text" v-model="formData.phonenumber" placeholder="请输入手机号" />
  38. </view> -->
  39. <view class="info-item">
  40. <view class="title"><text class="required"></text>用户邮箱</view>
  41. <input class="input-field code-input" type="text" v-model="formData.email" placeholder="请输入邮箱(可选)" />
  42. </view>
  43. <view class="info-item">
  44. <view class="title"><text class="required">*</text>身份证号</view>
  45. <input class="input-field code-input" type="text" v-model="formData.idCard" placeholder="请输入身份证号" />
  46. </view>
  47. <view class="info-item">
  48. <view class="title"><text class="required">*</text>用户性别</view>
  49. <view class="radio-group">
  50. <radio-group @change="onGenderChange" style="display: flex;">
  51. <view class="radio-item" v-for="(item, index) in genderOptions" :key="index">
  52. <radio :value="item.value" :checked="formData.sex === item.value">{{ item.label }}
  53. </radio>
  54. </view>
  55. </radio-group>
  56. </view>
  57. </view>
  58. <!-- <view class="info-item">
  59. <view class="title"><text class="required">*</text>初始密码</view>
  60. <view class="input-wrapper">
  61. <input class="input-field code-input" type="text" :password="!showPassword" v-model="formData.password"
  62. placeholder="请输入初始密码" />
  63. <view class="img-box" @click="togglePassword">
  64. <image class="icon"
  65. :src="showPassword ? 'https://ysrw-1395926010.cos.ap-chengdu.myqcloud.com/image/icon_visible.png' : 'https://ysrw-1395926010.cos.ap-chengdu.myqcloud.com/image/icon_invisible.png'"
  66. mode="aspectFill"></image>
  67. </view>
  68. </view>
  69. </view>
  70. <view class="info-item">
  71. <view class="title"><text class="required">*</text>确认密码</view>
  72. <view class="input-wrapper">
  73. <input class="input-field code-input" type="text" :password="!showConfirmPassword"
  74. v-model="formData.confirmPassword" placeholder="请再次输入初始密码" />
  75. <view class="img-box" @click="toggleConfirmPassword">
  76. <image class="icon"
  77. :src="showConfirmPassword ? 'https://ysrw-1395926010.cos.ap-chengdu.myqcloud.com/image/icon_visible.png' : 'https://ysrw-1395926010.cos.ap-chengdu.myqcloud.com/image/icon_invisible.png'"
  78. mode="aspectFill"></image>
  79. </view>
  80. </view>
  81. </view> -->
  82. </view>
  83. <view class="info-block">
  84. <view class="info-title">权限与状态</view>
  85. <view class="info-item">
  86. <view class="title"><text class="required">*</text>用户类型</view>
  87. <view class="picker" @click="showPicker('userType')">
  88. <view class="picker-text">{{ formData.userType && userTypeOptions.length > 0 &&
  89. selectedUserTypeIndex < userTypeOptions.length ?
  90. userTypeOptions[selectedUserTypeIndex].label : '请选择用户类型' }}<image class="icon"
  91. src="https://ysrw-1395926010.cos.ap-chengdu.myqcloud.com/image/icon_expand.png"
  92. mode="widthFix">
  93. </image>
  94. </view>
  95. </view>
  96. </view>
  97. <view class="info-item">
  98. <view class="title"><text class="required">*</text>账号状态</view>
  99. <view class="radio-group">
  100. <radio-group @change="onStatusChange" style="display: flex;">
  101. <view class="radio-item" v-for="(item, index) in statusOptions" :key="index">
  102. <radio :value="item.value" :checked="formData.status === item.value">{{ item.label }}
  103. </radio>
  104. </view>
  105. </radio-group>
  106. </view>
  107. </view>
  108. <view class="info-item">
  109. <view class="title"><text class="required">*</text>绑定产品</view>
  110. <view class="picker" @click="showPicker('product')">
  111. <view class="picker-text">{{ selectedProducts.length > 0 ? getSelectedProductNames() : '请选择产品'
  112. }}<image class="icon"
  113. src="https://ysrw-1395926010.cos.ap-chengdu.myqcloud.com/image/icon_expand.png"
  114. mode="widthFix"></image>
  115. </view>
  116. </view>
  117. </view>
  118. <view class="info-item">
  119. <view class="title"><text class="required">*</text>绑定角色</view>
  120. <view class="picker" @click="showPicker('role')">
  121. <view class="picker-text">{{ selectedRoles.length > 0 ? getSelectedRoleNames() : '请选择角色' }}
  122. <image class="icon"
  123. src="https://ysrw-1395926010.cos.ap-chengdu.myqcloud.com/image/icon_expand.png"
  124. mode="widthFix"></image>
  125. </view>
  126. </view>
  127. </view>
  128. <view class="info-item norow">
  129. <view class="title">备注</view>
  130. <textarea class="input-field code-input" type="text" v-model="formData.remark" placeholder="请输入备注" />
  131. </view>
  132. </view>
  133. </view>
  134. <view class="btn-box">
  135. <view class="confirm" @click="confirm">确认</view>
  136. </view>
  137. <!-- 自定义picker组件 -->
  138. <u-picker :title='pickerTitle' :show="showPickerVisible" confirmColor='#576B95' ref="uPicker"
  139. :columns="pickerData" @confirm="handlePickerConfirm" @cancel="handlePickerCancel">
  140. </u-picker>
  141. </view>
  142. </template>
  143. <script>
  144. import { getCompanyUser, deptList, companyList, getCompanyRoleList, getProductList } from '@/api/user.js'
  145. export default {
  146. data() {
  147. return {
  148. userInfo: uni.getStorageSync('userInfo'),
  149. formData: {
  150. companyId: '',//公司id
  151. deptId: '',//部门id
  152. // userName: '',//用户账号
  153. // nickName: '',//用户名称
  154. // phonenumber: '',//手机号
  155. email: '',//邮箱
  156. idCard: '',//身份证号
  157. // password: '',//初始密码
  158. // confirmPassword: '',//确认初始密码
  159. sex: '',//性别
  160. status: '',//账号状态
  161. userType: '',//用户类型
  162. productCode: '',//绑定产品
  163. roleIds: '',//绑定角色
  164. remark: '',//备注
  165. userId: '',//用户id
  166. },
  167. companyList: [],
  168. selectedCompanyIndex: 0,
  169. // 部门选项
  170. deptOptions: [],
  171. selectedDept: '',
  172. selectedDeptIndex: 0,
  173. // picker相关
  174. showPickerVisible: false,
  175. pickerTitle: '默认标题',
  176. pickerData: [],
  177. originalPickerData: null,
  178. currentPickerType: '',
  179. // 组织信息
  180. companyName: '',
  181. // 密码显示状态
  182. showPassword: false,
  183. showConfirmPassword: false,
  184. // 性别选项
  185. genderOptions: [
  186. { value: '0', label: '男' },
  187. { value: '1', label: '女' }
  188. ],
  189. // 状态选项
  190. statusOptions: [
  191. { value: '0', label: '启用' },
  192. { value: '1', label: '禁用' }
  193. ],
  194. // 用户类型选项
  195. userTypeList: [],
  196. selectedUserTypeId: '',
  197. userTypeOptions: [
  198. { value: '0', label: '系统用户' }
  199. ],
  200. selectedUserTypeIndex: 0,
  201. // 产品选项
  202. productOptions: [],
  203. selectedProducts: [],
  204. // 角色选项
  205. roleOptions: [
  206. ],
  207. selectedRoles: [],
  208. // 选中的公司名称
  209. selectedCompanyName: '',
  210. // 选中的部门名称
  211. selectedDeptName: ''
  212. }
  213. },
  214. onLoad(options) {
  215. console.log("跳转注册页面", options)
  216. // this.phone = options.phone || '';
  217. },
  218. onShow() {
  219. // this.getCompanyUserList();
  220. },
  221. methods: {
  222. getProductList() {
  223. return new Promise((resolve, reject) => {
  224. if (!this.formData.companyId) {
  225. uni.showToast({
  226. icon: 'none',
  227. title: "请选择公司",
  228. duration: 2000
  229. });
  230. reject('请选择公司');
  231. return;
  232. }
  233. let params = {
  234. companyId: this.formData.companyId || '',
  235. status: 1,
  236. }
  237. getProductList(params).then(res => {
  238. if (res.code == 200) {
  239. // 处理接口返回的数据结构,使用rows作为数据源
  240. const productData = res.data || [];
  241. // 转换为所需的格式:显示productName,值为productCode
  242. this.productOptions = productData.map(item => ({
  243. value: item.productCode,
  244. label: item.productName
  245. }));
  246. resolve(productData);
  247. } else {
  248. reject(res.msg || '获取产品列表失败');
  249. }
  250. }).catch(error => {
  251. reject('网络错误,请稍后重试');
  252. });
  253. });
  254. },
  255. getCompanyRole() {
  256. return new Promise((resolve, reject) => {
  257. if (!this.formData.companyId) {
  258. uni.showToast({
  259. icon: 'none',
  260. title: "请选择公司",
  261. });
  262. reject('请选择公司');
  263. return;
  264. }
  265. let params = {
  266. companyId: this.formData.companyId || '',
  267. status: 0,
  268. }
  269. getCompanyRoleList(params)
  270. .then(res => {
  271. if (res.code == 200) {
  272. this.userTypeList = res.rows || [];
  273. this.userTypeOptions = this.userTypeList.map(item => ({
  274. value: item.roleId.toString(),
  275. label: item.roleName
  276. }));
  277. // 同时更新roleOptions
  278. this.roleOptions = this.userTypeList.map(item => ({
  279. value: item.roleId.toString(),
  280. label: item.roleName
  281. }));
  282. resolve(res.rows || []);
  283. } else if (res.code == 500) {
  284. // 当接口返回500时,显示错误信息但不可选
  285. this.roleOptions = [{
  286. value: '-1',
  287. label: res.msg || '获取角色失败'
  288. }];
  289. this.selectedRoles = [];
  290. resolve([]);
  291. }
  292. })
  293. .catch(error => {
  294. // 网络错误时也显示错误信息
  295. this.roleOptions = [{
  296. value: '-1',
  297. label: '网络错误,请稍后重试'
  298. }];
  299. this.selectedRoles = [];
  300. resolve([]);
  301. });
  302. });
  303. },deptList() {
  304. return new Promise((resolve, reject) => {
  305. let params = {
  306. companyId: this.formData.companyId || '',
  307. pageNum: 1,
  308. pageSize: 10,
  309. }
  310. deptList(params).then(res => {
  311. if (res.code == 200) {
  312. // 转换部门数据格式
  313. this.deptOptions = (res.rows || []).map(item => ({
  314. value: item.deptId.toString(),
  315. label: item.deptName,
  316. deptId: item.deptId
  317. }));
  318. resolve(this.deptOptions);
  319. } else {
  320. reject(res.msg || '获取部门列表失败');
  321. }
  322. }).catch(error => {
  323. reject('网络错误,请稍后重试');
  324. });
  325. });
  326. },
  327. fetchCompanyList() {
  328. console.log("调用公司数据接口")
  329. return new Promise((resolve, reject) => {
  330. companyList().then(res => {
  331. if (res.code == 200) {
  332. console.log("成功调用公司数据接口")
  333. this.companyList = res.rows || [];
  334. resolve(res.data || []);
  335. } else {
  336. reject(res.msg || '获取公司列表失败');
  337. }
  338. }).catch(error => {
  339. reject('网络错误,请稍后重试');
  340. });
  341. });
  342. },
  343. // 显示自定义picker
  344. async showPicker(type) {
  345. this.currentPickerType = type;
  346. try {
  347. uni.showLoading({ title: '加载中...' });
  348. let data = [];
  349. let title = '';
  350. // 根据不同的类型调用对应的请求方法
  351. if (type === 'company') {
  352. // 加载公司数据
  353. console.log("加载公司数据")
  354. await this.fetchCompanyList();
  355. data = this.companyList;
  356. title = '选择公司';
  357. // 使用 companyName 作为显示值
  358. this.pickerData = [data.map(item => item.companyName || '未知公司')];
  359. } else if (type === 'dept') {
  360. // 检查是否已选择公司
  361. if (!this.formData.companyId) {
  362. uni.hideLoading();
  363. uni.showToast({ title: '请先选择公司', icon: 'none' });
  364. return;
  365. }
  366. // 加载部门数据
  367. await this.deptList();
  368. data = this.deptOptions;
  369. title = '选择部门';
  370. this.pickerData = [data.map(item => item.label)];
  371. } else if (type === 'userType') {
  372. // 用户类型数据
  373. data = this.userTypeOptions;
  374. title = '选择用户类型';
  375. this.pickerData = [data.map(item => item.label)];
  376. } else if (type === 'product') {
  377. // 加载产品数据
  378. await this.getProductList();
  379. data = this.productOptions;
  380. title = '选择产品';
  381. this.pickerData = [data.map(item => item.label)];
  382. } else if (type === 'role') {
  383. // 加载角色数据
  384. await this.getCompanyRole();
  385. data = this.roleOptions;
  386. title = '选择角色';
  387. this.pickerData = [data.map(item => item.label)];
  388. }
  389. // 确保 pickerData 是二维数组
  390. if (!Array.isArray(this.pickerData) || !Array.isArray(this.pickerData[0])) {
  391. uni.hideLoading();
  392. uni.showToast({ title: '数据格式错误', icon: 'none' });
  393. return;
  394. }
  395. // 保存原始数据,用于后续获取详细信息
  396. this.originalPickerData = data;
  397. this.pickerTitle = title;
  398. uni.hideLoading();
  399. this.showPickerVisible = true;
  400. } catch (error) {
  401. uni.hideLoading();
  402. }
  403. },
  404. onGenderChange(e) {
  405. this.formData.sex=e.detail.value;
  406. },
  407. onStatusChange(e) {
  408. this.formData.status= e.detail.value;
  409. },
  410. // 获取选中的产品名称
  411. getSelectedProductNames() {
  412. return this.productOptions
  413. .filter(item => this.selectedProducts.includes(item.value))
  414. .map(item => item.label)
  415. .join(', ');
  416. },
  417. // 获取选中的产品代码,用逗号相连
  418. getSelectedProductCodes() {
  419. return this.selectedProducts.join(', ');
  420. },
  421. // 获取选中的角色名称
  422. getSelectedRoleNames() {
  423. return this.roleOptions
  424. .filter(item => this.selectedRoles.includes(item.value))
  425. .map(item => item.label)
  426. .join(', ');
  427. },
  428. // 切换密码显示状态
  429. togglePassword() {
  430. this.formData.showPassword = !this.formData.showPassword;
  431. },
  432. // 切换确认密码显示状态
  433. toggleConfirmPassword() {
  434. this.formData.showConfirmPassword = !this.formData.showConfirmPassword;
  435. },
  436. // 处理picker确认
  437. handlePickerConfirm(e) {
  438. if (e.value && e.value.length > 0) {
  439. const selectedText = e.value[0];
  440. let selectedItem;
  441. // 根据不同类型处理选中项
  442. switch (this.currentPickerType) {
  443. case 'company':
  444. // 找到选中的公司
  445. selectedItem = this.originalPickerData.find(item =>
  446. item.companyName === selectedText
  447. );
  448. if (selectedItem) {
  449. this.formData.companyId = selectedItem.companyId;
  450. this.selectedCompanyIndex = this.companyList.indexOf(selectedItem);
  451. this.selectedCompanyName = selectedText;
  452. // 重置部门选择
  453. this.formData.deptId = '';
  454. this.selectedDept = '';
  455. this.selectedDeptName = '';
  456. // 清空部门选项,下次选择部门时会重新加载
  457. this.deptOptions = [];
  458. }
  459. break;
  460. case 'dept':
  461. // 找到选中的部门
  462. selectedItem = this.originalPickerData.find(item => item.label === selectedText);
  463. if (selectedItem) {
  464. this.formData.deptId = selectedItem.deptId;
  465. this.selectedDept = selectedItem.value;
  466. this.selectedDeptIndex = this.deptOptions.indexOf(selectedItem);
  467. this.selectedDeptName = selectedText;
  468. }
  469. break;
  470. case 'userType':
  471. // 找到选中的用户类型
  472. selectedItem = this.originalPickerData.find(item => item.label === selectedText);
  473. if (selectedItem) {
  474. this.formData.userType = selectedItem.label;
  475. this.selectedUserTypeIndex = this.userTypeOptions.indexOf(selectedItem);
  476. }
  477. break;
  478. case 'product':
  479. // 找到选中的产品并切换选中状态
  480. selectedItem = this.originalPickerData.find(item => item.label === selectedText);
  481. if (selectedItem) {
  482. const index = this.selectedProducts.indexOf(selectedItem.value);
  483. if (index > -1) {
  484. this.selectedProducts.splice(index, 1);
  485. } else {
  486. this.selectedProducts.push(selectedItem.value);
  487. }
  488. }
  489. break;
  490. case 'role':
  491. // 找到选中的角色并切换选中状态
  492. selectedItem = this.originalPickerData.find(item => item.label === selectedText);
  493. if (selectedItem) {
  494. console.log("选中的角色:",selectedItem);
  495. // 当只有一个选项且值为-1时(错误状态),不允许选择
  496. if (this.roleOptions.length === 1 && this.roleOptions[0].value === '-1') {
  497. return;
  498. }
  499. const index = this.selectedRoles.indexOf(selectedItem.value);
  500. if (index > -1) {
  501. this.selectedRoles.splice(index, 1);
  502. } else {
  503. this.selectedRoles.push(selectedItem.value);
  504. }
  505. }
  506. break;
  507. }
  508. }
  509. this.showPickerVisible = false;
  510. },
  511. // 处理picker取消
  512. handlePickerCancel() {
  513. this.showPickerVisible = false;
  514. },
  515. // 确认提交
  516. async confirm() {
  517. // 表单验证
  518. if (!this.formData.companyId) {
  519. uni.showToast({ title: '请选择公司', icon: 'none' });
  520. return;
  521. }
  522. if (!this.selectedDept) {
  523. uni.showToast({ title: '请选择部门', icon: 'none' });
  524. return;
  525. }
  526. if (!this.formData.idCard) {
  527. uni.showToast({ title: '请输入身份证号', icon: 'none' });
  528. return;
  529. }
  530. // if (!this.formData.userName) {
  531. // uni.showToast({ title: '请输入用户账号', icon: 'none' });
  532. // return;
  533. // }
  534. // if (!this.formData.nickName) {
  535. // uni.showToast({ title: '请输入用户名称', icon: 'none' });
  536. // return;
  537. // }
  538. // if (!this.formData.phonenumber) {
  539. // uni.showToast({ title: '请输入手机号码', icon: 'none' });
  540. // return;
  541. // }
  542. // if (!this.formData.password) {
  543. // uni.showToast({ title: '请输入初始密码', icon: 'none' });
  544. // return;
  545. // }
  546. // if (this.formData.password !== this.formData.confirmPassword) {
  547. // uni.showToast({ title: '两次输入的密码不一致', icon: 'none' });
  548. // return;
  549. // }
  550. if (!this.formData.userType) {
  551. uni.showToast({ title: '请选择用户类型', icon: 'none' });
  552. return;
  553. }
  554. this.formData.productCode = this.getSelectedProductCodes();
  555. console.log("产品代码:", this.formData.productCode);
  556. if (!this.formData.productCode) {
  557. uni.showToast({ title: '请选择绑定产品', icon: 'none' });
  558. return;
  559. }
  560. // 准备提交数据
  561. this.formData.deptId = this.selectedDept;
  562. this.formData.productCode = this.getSelectedProductCodes();
  563. this.formData.roleIds = this.selectedRoles;
  564. this.formData.userType = this.selectedUserType;
  565. // this.formData.sex = this.selectedGender;
  566. this.formData.status = this.selectedStatus;
  567. this.formData.userId = this.userInfo.userId;
  568. // 打印提交数据,检查是否所有字段都已正确设置
  569. console.log('提交数据:', this.formData);
  570. try {
  571. uni.showLoading({ title: '注册中...' });
  572. // 提交数据
  573. const res = await getCompanyUser(this.formData);
  574. uni.hideLoading();
  575. if (res.code == 200) {
  576. uni.showToast({ title: '注册成功', icon: 'success' });
  577. // 注册成功后跳转到首页
  578. console.log('准备跳转到首页');
  579. setTimeout(() => {
  580. uni.reLaunch({
  581. url: '/pages/home/index',
  582. success: function(res) {
  583. console.log('跳转成功:', res);
  584. },
  585. fail: function(err) {
  586. console.log('跳转失败:', err);
  587. }
  588. });
  589. }, 1000);
  590. } else {
  591. uni.showToast({ title: res.msg || '注册失败', icon: 'none' });
  592. }
  593. } catch (error) {
  594. uni.hideLoading();
  595. uni.showToast({ title: '网络错误,请稍后重试', icon: 'none' });
  596. console.error('注册失败:', error);
  597. }
  598. }
  599. }
  600. }
  601. </script>
  602. <style lang="scss" scoped>
  603. .setting-page {
  604. background: #F5F6FA;
  605. min-height: 100vh;
  606. .content {
  607. .info-block {
  608. background: #fff;
  609. margin: 20rpx;
  610. border-radius: 16rpx;
  611. padding: 32rpx;
  612. }
  613. .info-title {
  614. font-size: 32rpx;
  615. font-weight: 600;
  616. color: #333333;
  617. margin-bottom: 24rpx;
  618. padding-left: 8rpx;
  619. border-left: 6rpx solid #388BFF;
  620. margin-top: 32rpx;
  621. }
  622. .info-item {
  623. display: flex;
  624. align-items: center;
  625. justify-content: space-between;
  626. margin-bottom: 32rpx;
  627. padding-bottom: 24rpx;
  628. border-bottom: 1rpx solid #E5E5E5;
  629. &:last-child {
  630. border-bottom: none;
  631. margin-bottom: 0;
  632. }
  633. .title {
  634. width: 200rpx;
  635. font-size: 28rpx;
  636. color: #333333;
  637. display: block;
  638. .required {
  639. color: #FF3B30;
  640. margin-right: 8rpx;
  641. }
  642. }
  643. .icon {
  644. width: 32rpx;
  645. height: 32rpx;
  646. }
  647. .input-field {
  648. height: 80rpx;
  649. font-size: 28rpx;
  650. font-family: PingFang SC;
  651. color: #333333;
  652. padding: 0 20rpx;
  653. border-radius: 8rpx;
  654. box-sizing: border-box;
  655. }
  656. .code-input {
  657. width: 100%;
  658. }
  659. textarea.input-field {
  660. height: 120rpx;
  661. padding: 20rpx;
  662. resize: none;
  663. }
  664. .img-box {
  665. position: absolute;
  666. right: 20rpx;
  667. top: 50%;
  668. transform: translateY(-50%);
  669. .icon {
  670. width: 32rpx;
  671. height: 32rpx;
  672. }
  673. }
  674. .get-code-btn {
  675. position: absolute;
  676. right: 20rpx;
  677. top: 50%;
  678. transform: translateY(-50%);
  679. font-size: 28rpx;
  680. font-weight: 500;
  681. color: #157CF8;
  682. white-space: nowrap;
  683. }
  684. .picker {
  685. width: 100%;
  686. }
  687. .picker-text {
  688. width: 100%;
  689. height: 80rpx;
  690. font-size: 28rpx;
  691. color: #333333;
  692. padding: 0 20rpx;
  693. border-radius: 8rpx;
  694. box-sizing: border-box;
  695. display: flex;
  696. align-items: center;
  697. justify-content: space-between;
  698. }
  699. .radio-group {
  700. display: flex;
  701. margin-top: 8rpx;
  702. .radio-item {
  703. margin-right: 48rpx;
  704. font-size: 28rpx;
  705. color: #333333;
  706. radio {
  707. margin-right: 8rpx;
  708. }
  709. }
  710. }
  711. .input-wrapper {
  712. position: relative;
  713. width: 100%;
  714. }
  715. }
  716. .norow {
  717. flex-direction: column;
  718. align-items: flex-start;
  719. }
  720. }
  721. .btn-box {
  722. padding: 64upx 32upx;
  723. .confirm {
  724. width: 100%;
  725. height: 88upx;
  726. line-height: 88upx;
  727. text-align: center;
  728. font-family: PingFang SC;
  729. font-size: 32upx;
  730. color: #FFFFFF;
  731. background: #388BFF;
  732. border-radius: 44upx;
  733. margin: 0 20rpx;
  734. }
  735. }
  736. }
  737. </style>