register.vue 23 KB

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