index.vue 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723
  1. <template>
  2. <view class="login-register" v-if="userStore.showLoginModal">
  3. <!-- 注册步骤1:用户信息 -->
  4. <view class="lr-box" v-if="!userStore.isRegister && userStore.registerStep === 1">
  5. <image src="https://oss.familydaf.cn/sxsnfile/20251218/8814a4934a77448086318c3bba9e9286.png" class="lr-box-topbg" mode="widthFix"></image>
  6. <view class="lr-box-top adfacjb">
  7. <image class="lr-box-top-left" src="https://oss.familydaf.cn/sxsnfile/20251218/0868874c940144e5b3e79dba08a9d9ff.png"></image>
  8. <image class="lr-box-top-right" src="https://oss.familydaf.cn/sxsnfile/20251218/ec7dbd753ab044e18abc0eedf3540fad.png" @click="close"></image>
  9. </view>
  10. <view class="lr-box-title">
  11. <p class="p">欢迎来到善行少年</p>
  12. <p class="p tip">首次登录需要简单填写信息即可进入</p>
  13. </view>
  14. <view class="lr-box-form">
  15. <view class="lr-box-form-item adfacjb">
  16. <view class="lr-box-form-item-left adfac">
  17. <view class="text"><span style="color: #F4657A;">*</span>手机号码</view>
  18. <input v-model="register.phone" border="none" placeholder="请输入手机号码" style="margin-left: 32rpx; flex: 1;"></input>
  19. </view>
  20. <view class="lr-box-form-item-right">
  21. <button class="yjsq" open-type="getPhoneNumber" @getphonenumber="decryptPhoneNumber" privacy-desc="用于获取您的手机号码,方便您快速注册。">一键授权</button>
  22. </view>
  23. </view>
  24. <view class="lr-box-form-item adfacjb">
  25. <view class="lr-box-form-item-left adfac">
  26. <view class="text"><span style="color: #F4657A;">*</span>头像</view>
  27. <up-upload
  28. :fileList="fileList"
  29. @afterRead="afterRead"
  30. @delete="deletePic"
  31. :maxCount="1"
  32. width="80rpx"
  33. height="80rpx"
  34. >
  35. <image src="https://oss.familydaf.cn/sxsnfile/20251218/d43706a3b02a439b8c9981db87912c1f.png"
  36. mode="widthFix" style="width: 80rpx;height: 80rpx;"></image>
  37. </up-upload>
  38. </view>
  39. <view class="lr-box-form-item-right">
  40. <button class="yjsq" open-type="chooseAvatar" @chooseavatar="onChooseAvatar">设置</button>
  41. </view>
  42. </view>
  43. <view class="lr-box-form-item adfacjb">
  44. <view class="lr-box-form-item-left">
  45. <view class="text"><span style="color: #F4657A;">*</span>用户名</view>
  46. </view>
  47. <view class="lr-box-form-item-right">
  48. <input v-model="register.nickName" border="none" inputAlign="right" placeholder="请输入真实姓名"></input>
  49. </view>
  50. </view>
  51. <view class="lr-box-form-item adfacjb">
  52. <view class="lr-box-form-item-left">
  53. <view class="text">家庭公益名称</view>
  54. </view>
  55. <view class="lr-box-form-item-right">
  56. <input v-model="register.welfareName" border="none" inputAlign="right" placeholder="请输入至少三个字"></input>
  57. </view>
  58. </view>
  59. <view class="lr-box-form-item adfacjb">
  60. <view class="lr-box-form-item-left">
  61. <view class="text">家庭公益口号</view>
  62. </view>
  63. <view class="lr-box-form-item-right">
  64. <input v-model="register.welfareSlogan" border="none" inputAlign="right" placeholder="家庭公益口号"></input>
  65. </view>
  66. </view>
  67. </view>
  68. <view class="lr-box-btns">
  69. <view class="btn" @click="toNextStep">下一步</view>
  70. </view>
  71. </view>
  72. <!-- 注册步骤2:添加孩子信息 -->
  73. <view class="lr-box step2" v-else-if="!userStore.isRegister && userStore.registerStep === 2">
  74. <image src="https://oss.familydaf.cn/sxsnfile/20251218/8814a4934a77448086318c3bba9e9286.png" class="lr-box-topbg" mode="widthFix"></image>
  75. <view class="lr-box-top adfacjb">
  76. <image class="lr-box-top-left" src="https://oss.familydaf.cn/sxsnfile/20251218/0868874c940144e5b3e79dba08a9d9ff.png"></image>
  77. <image class="lr-box-top-right" src="https://oss.familydaf.cn/sxsnfile/20251218/ec7dbd753ab044e18abc0eedf3540fad.png" @click="close"></image>
  78. </view>
  79. <view class="lr-box-title">
  80. <p class="p">添加孩子信息</p>
  81. <p class="p tip">请填写孩子的基本信息完成注册</p>
  82. </view>
  83. <scroll-view scroll-y class="lr-box-scroll">
  84. <view class="member-form">
  85. <view class="member-avatar">
  86. <view class="member-avatar-title"><span style="color: #F4657A;">*</span>头像</view>
  87. <view class="adfac" style="margin: 24rpx 0 32rpx;">
  88. <view class="member-avatar-imgbox" @click="changeMemberAvatar">
  89. <image class="member-avatar-imgbox-img" :src="memberInfo.avatarPath||defaultAvatar"></image>
  90. </view>
  91. <image class="member-avatar-add" src="https://oss.familydaf.cn/sxsnfile/20251219/0b4d0f26464945dbae17491f1b529229.png" @click="changeMemberAvatar"></image>
  92. </view>
  93. </view>
  94. <view class="member-item adfacjb">
  95. <view class="member-item-left">个人公益名称</view>
  96. <view class="member-item-right">
  97. <input v-model="memberInfo.welfareName" placeholder-style="color: #A1A4A9;font-size: 28rpx;" placeholder="请输入最少三个字"></input>
  98. </view>
  99. </view>
  100. <view class="member-item adfacjb">
  101. <view class="member-item-left">个人公益口号</view>
  102. <view class="member-item-right">
  103. <input v-model="memberInfo.welfareSlogan" placeholder-style="color: #A1A4A9;font-size: 28rpx;" placeholder="请输入个人公益口号"></input>
  104. </view>
  105. </view>
  106. <view class="member-section-title">成员信息</view>
  107. <view class="member-pre adfac">
  108. <view class="member-pre-title"><span style="color: #F4657A;">*</span>人员类型</view>
  109. <view class="member-pre-content">
  110. <view style="font-size: 30rpx;color: #252525;text-align: right;">{{memberInfo.personnelType===2?'学生':'成人'}}</view>
  111. </view>
  112. </view>
  113. <view class="member-pre adfac">
  114. <view class="member-pre-title"><span style="color: #F4657A;">*</span>姓名</view>
  115. <view class="member-pre-content">
  116. <input v-model="memberInfo.name" style="font-size: 30rpx;color: #252525;text-align: right;" placeholder-style="color: #A1A4A9;font-size: 28rpx;" placeholder="请输入姓名"></input>
  117. </view>
  118. </view>
  119. <view class="member-pre adfac">
  120. <view class="member-pre-title"><span style="color: #F4657A;">*</span>身份证</view>
  121. <view class="member-pre-content">
  122. <input v-model="memberInfo.idCard" style="font-size: 30rpx;color: #252525;text-align: right;" placeholder-style="color: #A1A4A9;font-size: 28rpx;" placeholder="请输入身份证"></input>
  123. </view>
  124. </view>
  125. <view class="member-pre adfac">
  126. <view class="member-pre-title">义工号</view>
  127. <view class="member-pre-content">
  128. <input v-model="memberInfo.volunteerNo" style="font-size: 30rpx;color: #252525;text-align: right;" placeholder-style="color: #A1A4A9;font-size: 28rpx;" placeholder="请输入义工号"></input>
  129. </view>
  130. </view>
  131. <view class="member-pre adfac">
  132. <view class="member-pre-title"><span style="color: #F4657A;">*</span>性别</view>
  133. <view class="member-pre-content adfac">
  134. <view class="member-pre-content-box adfac" @click="memberInfo.gender=0">
  135. <image v-if="memberInfo.gender==0" src="https://oss.familydaf.cn/sxsnfile/20251218/ef2d43944c7e4cea8c6ebe0b4179f0fc.png"></image>
  136. <image v-else src="https://oss.familydaf.cn/sxsnfile/20251218/a27c9b23939d4d5085ff790ed4bd2d6a.png"></image>
  137. <text>男</text>
  138. </view>
  139. <view class="member-pre-content-box adfac" style="margin-left: 114rpx;" @click="memberInfo.gender=1">
  140. <image v-if="memberInfo.gender==1" src="https://oss.familydaf.cn/sxsnfile/20251218/ef2d43944c7e4cea8c6ebe0b4179f0fc.png"></image>
  141. <image v-else src="https://oss.familydaf.cn/sxsnfile/20251218/a27c9b23939d4d5085ff790ed4bd2d6a.png"></image>
  142. <text>女</text>
  143. </view>
  144. </view>
  145. </view>
  146. <view class="member-pre adfac" v-if="memberInfo.personnelType==2">
  147. <view class="member-pre-title"><span style="color: #F4657A;">*</span>就读学校</view>
  148. <view class="member-pre-content">
  149. <input v-model="memberInfo.currentSchool" style="font-size: 30rpx;color: #252525;text-align: right;" placeholder-style="color: #A1A4A9;font-size: 28rpx;" placeholder="请输入就读学校"></input>
  150. </view>
  151. </view>
  152. <view class="member-pre adfac">
  153. <view class="member-pre-title">会员渠道</view>
  154. <view class="member-pre-content">
  155. <picker v-if="channelList.length > 0" :range="channelList" range-key="channelName" :value="selectedChannelIndex" @change="onChannelChange">
  156. <view style="font-size: 30rpx;color: #252525;text-align: right;">
  157. {{ selectedChannelIndex >= 0 ? channelList[selectedChannelIndex].channelName : '请选择渠道' }}
  158. </view>
  159. </picker>
  160. <view v-else style="font-size: 30rpx;color: #A1A4A9;text-align: right;">暂无可用渠道</view>
  161. </view>
  162. </view>
  163. </view>
  164. </scroll-view>
  165. <view class="lr-box-btns">
  166. <view class="btn" @click="toAddChild">完成注册</view>
  167. </view>
  168. </view>
  169. <!-- 登录面板 -->
  170. <view class="lr-box login" v-else-if="userStore.isRegister">
  171. <image src="https://oss.familydaf.cn/sxsnfile/20251218/8814a4934a77448086318c3bba9e9286.png" class="lr-box-topbg" mode="widthFix"></image>
  172. <view class="lr-box-top login adfacjb">
  173. <image class="lr-box-top-left login" src="https://oss.familydaf.cn/sxsnfile/20251218/78c8c9fba0eb45d2ad8ed365c96988ee.png"></image>
  174. <image class="lr-box-top-right" src="https://oss.familydaf.cn/sxsnfile/20251218/ec7dbd753ab044e18abc0eedf3540fad.png" @click="close"></image>
  175. </view>
  176. <view class="lr-box-memo">公益献爱心 真情暖人心!</view>
  177. <view class="lr-box-login">
  178. <button class="phone-login" open-type="getPhoneNumber" @getphonenumber="decryptPhoneNumberLogin" privacy-desc="用于获取您的手机号码,方便您进行登录。">手机号登录</button>
  179. </view>
  180. </view>
  181. <qf-image-cropper :width="500" :height="500" :radius="30" @crop="handleMemberCrop" ref="qicRef" v-if="qicShow"></qf-image-cropper>
  182. </view>
  183. </template>
  184. <script setup name="">
  185. import { ref, getCurrentInstance, nextTick, watch } from 'vue'
  186. import { BaseApi2 } from '@/common/api/baseApi.js'
  187. const { proxy } = getCurrentInstance()
  188. import { useUserStore } from '@/common/stores/user.js';
  189. const userStore = useUserStore();
  190. const register = ref({
  191. phone:null,
  192. avatarPath:null,
  193. nickName:null,
  194. welfareName:null,
  195. welfareSlogan:null,
  196. })
  197. const fileList = ref([])
  198. // 孩子信息
  199. const defaultAvatar = ref('https://oss.familydaf.cn/sxsnfile/20251218/3821654e080945998d464f3c3aa64122.png')
  200. const memberInfo = ref({
  201. userId:'',
  202. personnelType: 2,
  203. name:'',
  204. idCard:'',
  205. volunteerNo:'',
  206. gender: 0,
  207. currentSchool:'',
  208. avatarPath:'',
  209. welfareName:'',
  210. welfareSlogan:''
  211. })
  212. const channelList = ref([])
  213. const selectedChannelId = ref('')
  214. const selectedChannelIndex = ref(-1)
  215. const hasSelectedChannel = ref(false)
  216. const qicShow = ref(false)
  217. const calcAge = (idCard) => {
  218. if (!idCard || !proxy.$reg.idCard(idCard)) return -1
  219. const birthStr = idCard.substring(6, 14)
  220. const birth = new Date(
  221. parseInt(birthStr.substring(0, 4)),
  222. parseInt(birthStr.substring(4, 6)) - 1,
  223. parseInt(birthStr.substring(6, 8))
  224. )
  225. const today = new Date()
  226. let age = today.getFullYear() - birth.getFullYear()
  227. const m = today.getMonth() - birth.getMonth()
  228. if (m < 0 || (m === 0 && today.getDate() < birth.getDate())) age--
  229. return age
  230. }
  231. // 监听身份证变化,自动设置人员类型(>=18 为成人,<18 为学生)
  232. watch(() => memberInfo.value.idCard, (val) => {
  233. const age = calcAge(val)
  234. if (age >= 0) {
  235. memberInfo.value.personnelType = age >= 18 ? 1 : 2
  236. }
  237. })
  238. const close = () => {
  239. userStore.closeLoginModal();
  240. }
  241. const decryptPhoneNumber = e => {
  242. if(e.detail.code) getPhone(e.detail.code);
  243. }
  244. const userAvatarUploading = ref(false)
  245. const onChooseAvatar = e => {
  246. const avatarUrl = e.detail.avatarUrl;
  247. // 内容安全检测
  248. userAvatarUploading.value = true;
  249. proxy.$api.detectionContent(avatarUrl, 2).then(res => {
  250. if(res.code !== 0) {
  251. userAvatarUploading.value = false;
  252. return proxy.$showToast(res.msg)
  253. }
  254. // 上传到OSS
  255. uni.uploadFile({
  256. url: BaseApi2 + '/sys/oss/upload',
  257. filePath: avatarUrl,
  258. name: 'file',
  259. success: (uploadRes) => {
  260. setTimeout(() => {
  261. userAvatarUploading.value = false;
  262. let data = JSON.parse(uploadRes.data)
  263. if(data && data.code === 0){
  264. register.value.avatarPath = data.data;
  265. // 更新 fileList 以显示头像
  266. fileList.value = [{
  267. url: data.data,
  268. status: 'success'
  269. }];
  270. } else {
  271. proxy.$showToast(data?.msg || '上传失败')
  272. }
  273. }, 1000);
  274. },
  275. fail: () => {
  276. userAvatarUploading.value = false;
  277. proxy.$showToast('上传失败');
  278. }
  279. });
  280. }).catch(() => {
  281. userAvatarUploading.value = false;
  282. })
  283. }
  284. const getPhone = code => {
  285. proxy.$api.get(`/wx/getPhone/${code}`).then(({data:res})=>{
  286. if(res.code !== 0) return proxy.$showToast(res.msg)
  287. register.value.phone = res.data;
  288. })
  289. }
  290. // 第一步:用户信息校验并注册,成功后进入第二步
  291. const toNextStep = async () => {
  292. if(!proxy.$reg.mobile(register.value.phone)) return proxy.$showToast('请输入正确的手机号码')
  293. if(!register.value.avatarPath) return proxy.$showToast('请设置头像')
  294. if(!register.value.nickName) return proxy.$showToast('请输入真实姓名')
  295. const success = await userStore.register(register.value);
  296. if(success) {
  297. loadChannelList()
  298. }
  299. }
  300. // 第二步:添加孩子信息
  301. const toAddChild = async () => {
  302. if(!memberInfo.value.avatarPath) return proxy.$showToast('请上传头像')
  303. if(memberInfo.value.welfareName && memberInfo.value.welfareName.length < 3) return proxy.$showToast('个人公益名称至少三个字')
  304. if(!memberInfo.value.name) return proxy.$showToast('请输入姓名')
  305. if(!proxy.$reg.idCard(memberInfo.value.idCard)) return proxy.$showToast('请输入正确的身份证号')
  306. if(!memberInfo.value.currentSchool && memberInfo.value.personnelType == 2) return proxy.$showToast('请输入就读学校')
  307. // 内容安全检测
  308. const checkMsgs = ['welfareName','welfareSlogan','name']
  309. .filter(k => memberInfo.value[k])
  310. .map(k => checkMsg(k));
  311. if(checkMsgs.length) {
  312. const tipRes = (await Promise.all(checkMsgs)).filter(item => item !== 'ok');
  313. if(tipRes && tipRes.length) return proxy.$showModal(tipRes.join('、'))
  314. }
  315. // 设置userId
  316. const userInfo = JSON.parse(uni.getStorageSync('userInfo'))
  317. memberInfo.value.userId = userInfo.id
  318. proxy.$api.post('/core/family/member', memberInfo.value).then(({data:res}) => {
  319. if(res.code !== 0) return proxy.$showToast(res.msg)
  320. const memberId = res.data?.id
  321. if(memberId && hasSelectedChannel.value) {
  322. setMemberChannel(memberId)
  323. }
  324. userStore.completeRegister()
  325. })
  326. }
  327. const checkMsg = async (key) => {
  328. const msgAlert = {
  329. welfareName:'个人公益名称',
  330. welfareSlogan:'个人公益口号',
  331. name:'姓名'
  332. }
  333. return new Promise((resolve) => {
  334. proxy.$api.detectionContent(memberInfo.value[key]).then(res => {
  335. resolve(res.code !== 0 ? (`${msgAlert[key]}:` + res.msg) : 'ok')
  336. })
  337. })
  338. }
  339. // 渠道相关
  340. const loadChannelList = () => {
  341. proxy.$api.get('/channel/list', {}).then(({ data: res }) => {
  342. if (res.code !== 0) return
  343. channelList.value = res.data || []
  344. })
  345. }
  346. const onChannelChange = (e) => {
  347. const idx = e.detail.value
  348. selectedChannelIndex.value = idx
  349. selectedChannelId.value = String(channelList.value[idx].id)
  350. hasSelectedChannel.value = true
  351. }
  352. const setMemberChannel = (memberId) => {
  353. proxy.$api.post(`/member/setChannels?memberId=${memberId}&channelIds=${selectedChannelId.value}`, {}).catch(() => {})
  354. }
  355. // 孩子头像选择
  356. const changeMemberAvatar = () => {
  357. uni.showActionSheet({
  358. itemList: ['从手机相册选择'],
  359. success: (res) => {
  360. if (res.tapIndex === 0) {
  361. uni.chooseImage({
  362. count: 1,
  363. sizeType: ['compressed'],
  364. sourceType: ['album', 'camera'],
  365. success: (imgRes) => {
  366. const tempFilePaths = imgRes.tempFilePaths;
  367. if (tempFilePaths && tempFilePaths.length > 0) {
  368. proxy.$api.detectionContent(tempFilePaths[0], 2).then(res => {
  369. if(res.code !== 0) return proxy.$showToast(res.msg)
  370. qicShow.value = true;
  371. nextTick(() => {
  372. proxy.$refs.qicRef.initImage(tempFilePaths[0], true)
  373. })
  374. })
  375. }
  376. }
  377. });
  378. }
  379. }
  380. });
  381. }
  382. const handleMemberCrop = async (e) => {
  383. const result = await uploadFilePromise(e.tempFilePath);
  384. memberInfo.value.avatarPath = result || '';
  385. qicShow.value = false;
  386. }
  387. const uploadFilePromise = (url) => {
  388. return new Promise((resolve) => {
  389. uni.uploadFile({
  390. url: BaseApi2 + '/sys/oss/upload',
  391. filePath: url,
  392. name: 'file',
  393. success: (res) => {
  394. setTimeout(() => {
  395. let data = JSON.parse(res.data)
  396. if(data && data.code === 0){
  397. resolve(data.data);
  398. } else {
  399. proxy.$showToast(data?.msg)
  400. resolve('')
  401. }
  402. }, 1000);
  403. },
  404. fail: () => { resolve(''); }
  405. });
  406. });
  407. };
  408. const afterRead = e => {}
  409. const deletePic = event => {
  410. fileList.value.splice(event.index, 1);
  411. register.value.avatarPath = '';
  412. }
  413. // 登录
  414. const decryptPhoneNumberLogin = e => {
  415. if(e.detail.code) toPhoneLogin(e.detail.code);
  416. }
  417. const toPhoneLogin = code => {
  418. wx.login({
  419. success(res){
  420. userStore.login({code:res.code,phoneCode:code});
  421. }
  422. })
  423. }
  424. </script>
  425. <style scoped lang="scss">
  426. .login-register{
  427. position: fixed;
  428. top: 0;
  429. left: 0;
  430. right: 0;
  431. bottom: 0;
  432. background: rgba(0, 0, 0, .4);
  433. z-index: 9999;
  434. display: flex;
  435. flex-direction: column;
  436. justify-content: flex-end;
  437. .lr-box{
  438. background: #F7F7F7;
  439. border-radius: 24rpx 24rpx 0rpx 0rpx;
  440. padding: 58rpx 30rpx 68rpx;
  441. position: relative;
  442. &.login{
  443. padding: 32rpx 40rpx 128rpx;
  444. }
  445. &.step2{
  446. padding: 58rpx 30rpx 68rpx;
  447. max-height: 85vh;
  448. display: flex;
  449. flex-direction: column;
  450. }
  451. &-topbg{
  452. width: 100%;
  453. position: absolute;
  454. left: 0;
  455. top: 0;
  456. }
  457. &-top{
  458. position: relative;
  459. padding: 0 10rpx 0 34rpx;
  460. &.login{
  461. padding: 0;
  462. }
  463. &-left{
  464. width: 158rpx;
  465. height: 88rpx;
  466. &.login{
  467. width: 224rpx;
  468. height: 48rpx;
  469. }
  470. }
  471. &-right{
  472. width: 28rpx;
  473. height: 28rpx;
  474. }
  475. }
  476. &-title{
  477. position: relative;
  478. margin-top: 18rpx;
  479. padding-left: 34rpx;
  480. .p{
  481. font-family: PingFangSC, PingFang SC;
  482. font-weight: 600;
  483. font-size: 44rpx;
  484. color: #151B29;
  485. line-height: 62rpx;
  486. &.tip{
  487. font-weight: 400;
  488. font-size: 26rpx;
  489. color: rgba(21,27,41,0.61);
  490. line-height: 37rpx;
  491. margin-top: 10rpx;
  492. }
  493. }
  494. }
  495. &-form{
  496. position: relative;
  497. margin-top: 10rpx;
  498. &-item{
  499. height: 120rpx;
  500. background: #FFFFFF;
  501. border-radius: 16rpx;
  502. border: 1rpx solid #E0E1E4;
  503. padding: 0 30rpx;
  504. margin-top: 20rpx;
  505. &-left{
  506. flex: 1;
  507. min-width: 0;
  508. .text{
  509. font-family: PingFangSC, PingFang SC;
  510. font-weight: 400;
  511. font-size: 30rpx;
  512. color: #151B29;
  513. line-height: 42rpx;
  514. white-space: nowrap;
  515. }
  516. image{
  517. width: 60rpx;
  518. height: 60rpx;
  519. border-radius: 50%;
  520. margin-left: 28rpx;
  521. }
  522. }
  523. &-right{
  524. flex-shrink: 0;
  525. padding-left: 20rpx;
  526. box-sizing: border-box;
  527. .yjsq{
  528. font-family: PingFangSC, PingFang SC;
  529. font-weight: 400;
  530. font-size: 28rpx;
  531. color: #0593FE;
  532. line-height: 40rpx;
  533. background-color: transparent;
  534. text-align: right;
  535. padding: 0;
  536. &::after{
  537. width: auto;
  538. border: none;
  539. }
  540. }
  541. }
  542. }
  543. }
  544. &-scroll{
  545. flex: 1;
  546. overflow: hidden;
  547. }
  548. &-btns{
  549. margin-top: 20rpx;
  550. padding: 0 10rpx;
  551. overflow: hidden;
  552. .btn{
  553. width: 100%;
  554. height: 90rpx;
  555. background: #B7F358;
  556. border-radius: 45rpx;
  557. font-family: PingFang-SC, PingFang-SC;
  558. font-weight: bold;
  559. font-size: 32rpx;
  560. color: #151B29;
  561. line-height: 90rpx;
  562. text-align: center;
  563. letter-spacing: 2rpx;
  564. margin-top: 20rpx;
  565. &.login{
  566. background: #ECEEF5;
  567. }
  568. }
  569. }
  570. &-memo{
  571. position: relative;
  572. font-family: PingFangSC, PingFang SC;
  573. font-weight: 400;
  574. font-size: 26rpx;
  575. color: #151B29;
  576. line-height: 36rpx;
  577. letter-spacing: 4rpx;
  578. margin-top: 41rpx;
  579. }
  580. &-login{
  581. margin-top: 82rpx;
  582. .phone-login{
  583. width: 100%;
  584. height: 90rpx;
  585. background: #B7F358;
  586. border-radius: 45rpx;
  587. font-family: PingFang-SC, PingFang-SC;
  588. font-weight: bold;
  589. font-size: 32rpx;
  590. color: #151B29;
  591. line-height: 90rpx;
  592. text-align: center;
  593. letter-spacing: 2rpx;
  594. &::after{
  595. border: none;
  596. }
  597. }
  598. }
  599. }
  600. }
  601. // 孩子信息表单样式
  602. .member-form{
  603. padding: 0 10rpx;
  604. .member-avatar{
  605. border-bottom: 1rpx solid #E6E6E6;
  606. padding-bottom: 24rpx;
  607. &-title{
  608. font-family: PingFang-SC, PingFang-SC;
  609. font-weight: bold;
  610. font-size: 30rpx;
  611. color: #252525;
  612. line-height: 42rpx;
  613. span{ color: #F4657A; }
  614. }
  615. &-imgbox{
  616. width: 122rpx;
  617. height: 122rpx;
  618. &-img{
  619. width: 100%;
  620. height: 100%;
  621. border-radius: 50%;
  622. }
  623. }
  624. &-add{
  625. margin-left: 40rpx;
  626. width: 122rpx;
  627. height: 122rpx;
  628. border-radius: 50%;
  629. }
  630. }
  631. .member-item{
  632. height: 90rpx;
  633. box-shadow: inset 0rpx -1rpx 0rpx 0rpx #E6E6E6;
  634. &-left{
  635. width: 200rpx;
  636. font-family: PingFangSC, PingFang SC;
  637. font-weight: 400;
  638. font-size: 28rpx;
  639. color: #676775;
  640. line-height: 40rpx;
  641. }
  642. &-right{
  643. width: calc(100% - 200rpx);
  644. text-align: right;
  645. }
  646. }
  647. .member-section-title{
  648. font-family: PingFang-SC, PingFang-SC;
  649. font-weight: bold;
  650. font-size: 36rpx;
  651. color: #151B29;
  652. line-height: 48rpx;
  653. margin-top: 40rpx;
  654. }
  655. .member-pre{
  656. padding: 25rpx 0;
  657. box-shadow: inset 0rpx -1rpx 0rpx 0rpx #F2F2F2;
  658. &-title{
  659. width: 209rpx;
  660. font-family: PingFangSC, PingFang SC;
  661. font-weight: 400;
  662. font-size: 28rpx;
  663. color: #676775;
  664. line-height: 40rpx;
  665. span{ color: #F4657A; margin-right: 4rpx; }
  666. }
  667. &-content{
  668. width: calc(100% - 209rpx);
  669. display: flex;
  670. align-items: center;
  671. justify-content: flex-end;
  672. &-box{
  673. margin-left: 80rpx;
  674. image{
  675. width: 28rpx;
  676. height: 28rpx;
  677. }
  678. text{
  679. font-family: PingFangSC, PingFang SC;
  680. font-weight: 400;
  681. font-size: 30rpx;
  682. color: #252525;
  683. line-height: 42rpx;
  684. margin-left: 16rpx;
  685. }
  686. }
  687. }
  688. }
  689. }
  690. </style>