login.vue 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730
  1. <template>
  2. <view>
  3. <!-- #ifdef MP-WEIXIN -->
  4. <view
  5. style="background-image: url(http://qiniuoss.nauzone.cn/%E7%BC%96%E7%BB%84%202@3x.png);background-repeat: no-repeat;background-size: 750rpx 260rpx;position: absolute;width: 750rpx;height: 260rpx;top: 0;z-index: -1;">
  6. </view>
  7. <!-- #endif -->
  8. <view class="flex align-center justify-center flex-direction" style="z-index: 1;">
  9. <!-- #ifdef MP-WEIXIN -->
  10. <image :src="logo" mode="aspectFit" class=" radius" style="width: 266rpx;height: 266rpx;margin-top: 148rpx;">
  11. </image>
  12. <!-- #endif -->
  13. <!-- #ifdef APP-PLUS -->
  14. <image :src="logo" mode="aspectFit" class="margin-top radius" style="width: 266rpx;height: 266rpx;"></image>
  15. <!-- #endif -->
  16. <!-- <image src="../../static/login/laileme-text.png" mode="aspectFit"
  17. style="width: 130rpx;height: 40rpx;margin-top: 32rpx;"></image> -->
  18. <!-- 兼容小程序端使用手机号登陆 -->
  19. <view v-if="mobileLogin" class="flex align-center justify-center flex-direction">
  20. <view class="padding-tb-sm flex align-center"
  21. style="margin-left: 66rpx;margin-right: 66rpx;width: 616rpx; border-bottom: #eeeeee solid 2rpx;margin-top: 56rpx;">
  22. <image src="../../static/login/mobile.png" mode="aspectFit"
  23. style="margin-left: 26rpx;margin-right: 34rpx;width: 36rpx;height: 40rpx;"></image>
  24. <view style="font-size: 30rpx;color: #bbbbbb;">
  25. <input v-model="phone" type="number" class="text-black lem-text-lg"
  26. placeholder-style="font-size: 30rpx;color: #bbbbbb;" placeholder="请输入手机号码" />
  27. </view>
  28. </view>
  29. <view class="padding-tb flex align-center justify-between"
  30. style="margin-left: 66rpx;margin-right: 66rpx;width: 616rpx; border-bottom: #eeeeee solid 2rpx;">
  31. <view class="flex align-center">
  32. <image src="../../static/login/code.png" mode="aspectFit"
  33. style="margin-left: 26rpx;margin-right: 34rpx;width: 36rpx;height: 40rpx;"></image>
  34. <view style="font-size: 30rpx;color: #bbbbbb;">
  35. <input type="number" v-model="verifyCode" class="text-black lem-text-lg"
  36. placeholder-style="font-size: 30rpx;color: #bbbbbb;" placeholder="请输入验证码" />
  37. </view>
  38. </view>
  39. <button :disabled="sendDisabled" @click="doGetVerify"
  40. :class="[sendDisabled?'bg-gradual-greend':'bg-gradual-green']" class="lem-btn round">{{sendText}}</button>
  41. </view>
  42. <!-- 添加邀请码输入框 -->
  43. <view class="padding-tb-sm flex align-center"
  44. style="margin-left: 66rpx;margin-right: 66rpx;width: 616rpx; border-bottom: #eeeeee solid 2rpx;">
  45. <image src="../../static/login/code.png" mode="aspectFit"
  46. style="margin-left: 26rpx;margin-right: 34rpx;width: 36rpx;height: 40rpx;"></image>
  47. <view style="font-size: 30rpx;color: #bbbbbb;">
  48. <input v-model="inviteCode" type="text" class="text-black lem-text-lg"
  49. placeholder-style="font-size: 30rpx;color: #bbbbbb;" placeholder="邀请码(选填)" />
  50. </view>
  51. </view>
  52. <view class="tip">
  53. 未注册的手机号验证通过后会自动注册
  54. </view>
  55. <button class="round " @click="loginRegis"
  56. :class="[phone.length >= 11 && verifyCode.length>= 6?'bg-gradual-green':'bg-gradual-greend']"
  57. style="height: 96rpx;width: 640rpx;margin-top: 40rpx;line-height: 96rpx;">登录</button>
  58. <view @click="checkOne" style="display: flex; align-items: center;margin-top: 30rpx;color: #bbbbbb;line-height: 22px;font-size: 28rpx;width: 600rpx;">
  59. <radio :value="1" color="#8dc63f" :checked="checkType === 1" />
  60. 是否同意 <text style="color: #1F7AFF;">《用户服务协议》</text> <text style="color: #1F7AFF;">《隐私协议》</text>
  61. </view>
  62. <view class="flex align-center" style="margin-top: 72rpx;" v-if="isWeixin">
  63. <image src="../../static/line.png" mode="aspectFill" style="height: 4rpx;width: 244rpx;"></image>
  64. <view class="lem-text-xl" style="color: #848582;margin-left: 22rpx;margin-right: 22rpx;">快速登录</view>
  65. <image src="../../static/line.png" mode="aspectFill" style="height: 4rpx;width: 244rpx;"></image>
  66. </view>
  67. <view class="flex align-center justify-center" style="margin-top: 50rpx;" v-if="isWeixin">
  68. <view @click="mobileLogin = false" class="flex align-center justify-center flex-direction">
  69. <image @click="wechatH5Login" class="round" src="../../static/login/weixindefuben@3x.png" mode="aspectFit"
  70. style="width: 84rpx;height: 84rpx;margin-bottom: 28rpx;"></image>
  71. <view class="lem-text-xl" style="color: #848582;">微信</view>
  72. </view>
  73. </view>
  74. </view>
  75. <!-- #ifdef MP-WEIXIN -->
  76. <view v-else class="flex align-center justify-center flex-direction">
  77. <button v-if="!puserInfo.phone" open-type="getPhoneNumber" @getphonenumber="miniWechatLogin"
  78. class="round bg-gradual-green"
  79. style="height: 96rpx;width: 640rpx;margin-top: 174rpx;line-height: 96rpx; font-size: 32rpx;font-weight: 600;">一键登录</button>
  80. <button v-else @click="fakeLogin" class="round bg-gradual-green"
  81. style="height: 96rpx;width: 640rpx;margin-top: 174rpx;line-height: 96rpx; font-size: 32rpx;font-weight: 600;">一键登录</button>
  82. <view @click="mobileLogin = true" class="lem-text-xl"
  83. style="margin-top: 60rpx;color: #bbbbbb;line-height: 30rpx;font-weight: 600;">
  84. 手机验证码、注册登录
  85. </view>
  86. <view @click="checkOne" style="display: flex; align-items: center;margin-top: 30rpx;color: #bbbbbb;line-height: 22px;font-size: 28rpx;width: 600rpx;">
  87. <radio :value="1" color="#8dc63f" :checked="checkType === 1" />
  88. 勾选即代表确认 <text style="color: #1F7AFF;">《注册协议》</text> <text style="color: #1F7AFF;">《隐私协议》</text>
  89. </view>
  90. </view>
  91. <!-- #endif -->
  92. </view>
  93. </view>
  94. </template>
  95. <script>
  96. import {
  97. mapState,
  98. mapMutations
  99. } from 'vuex';
  100. export default {
  101. computed: {
  102. ...mapState(['isWeixin'])
  103. },
  104. data() {
  105. return {
  106. checkType: 0,
  107. loginType: '',
  108. phone: '',
  109. password: '',
  110. logining: false,
  111. sessionKey: '',
  112. sendText: '获取验证码',
  113. sendDisabled: false,
  114. verifyCode: '',
  115. puserInfo: {},
  116. mobileLogin: false,
  117. inviteCode: '', // 添加邀请码字段
  118. logo: '../../static/login/logoo.png'
  119. }
  120. },
  121. onShow() {
  122. this.$api.logout()
  123. },
  124. onLoad(options) {
  125. this.$api.request('get', 'system/app/config/configKey/basicinfo').then(({
  126. data
  127. }) => {
  128. const baseInfo = {}
  129. data.forEach(({
  130. configKey,
  131. configValue
  132. }) => {
  133. baseInfo[configKey] = configValue
  134. })
  135. const logo = JSON.parse(baseInfo.logo || '[]')[0]
  136. if (logo) {
  137. this.logo = logo.url
  138. }
  139. })
  140. //#ifdef H5
  141. this.wechatH5LoginCallback(options)
  142. //#endif
  143. // #ifndef MP-WEIXIN
  144. this.mobileLogin = true
  145. // #endif
  146. // #ifdef MP-WEIXIN
  147. uni.showLoading({
  148. })
  149. uni.login({
  150. provider: 'weixin',
  151. success: (wxres => {
  152. this.logining = false
  153. this.$api.request('get', 'miniLogin', {
  154. loginType: 1,
  155. code: wxres.code
  156. }, failres => {
  157. this.$api.msg(failres.msg)
  158. uni.hideLoading()
  159. }).then(res => {
  160. uni.hideLoading()
  161. this.puserInfo = res.data
  162. // this.$api.setUserInfo(res.data)
  163. this.sessionKey = res.data.sessionKey
  164. })
  165. })
  166. })
  167. // #endif
  168. },
  169. methods: {
  170. ...mapMutations(['login']),
  171. inputChange(e) {
  172. const key = e.currentTarget.dataset.key;
  173. this[key] = e.detail.value;
  174. },
  175. chooseLoginType(type) {
  176. this.loginType = type
  177. },
  178. navBack() {
  179. uni.navigateBack();
  180. },
  181. toRegist() {
  182. uni.redirectTo({
  183. url: '/pages/public/register'
  184. })
  185. },
  186. checkOne() {
  187. // 直接切换状态
  188. this.checkType = this.checkType === 1 ? 0 : 1;
  189. },
  190. doGetVerify() {
  191. const that = this
  192. if (!that.phone || that.phone.length != 11) {
  193. uni.showToast({
  194. title: '请输入正确手机号!',
  195. icon: 'none'
  196. })
  197. return
  198. }
  199. that.$api.request('get', 'captchaSms', {
  200. phonenumber: that.phone,
  201. }).then(res => {
  202. //debugger
  203. that.sendDisabled = true
  204. let sec = 60
  205. let interval = setInterval(() => {
  206. sec--;
  207. that.sendText = sec + 's后重发'
  208. if (sec <= 0) {
  209. that.sendDisabled = false
  210. that.sendText = "获取验证码"
  211. clearInterval(interval)
  212. }
  213. }, 1000)
  214. })
  215. },
  216. async toLogin() {
  217. const that = this
  218. if (that.phone.length !== 11) {
  219. that.$api.msg('请输入11位中国手机号')
  220. } else if (that.password.length < 8) {
  221. that.$api.msg('密码至少8位')
  222. } else if (that.checkType === 0) {
  223. that.$api.msg('请勾选注册协议与隐私协议')
  224. } else {
  225. that.logining = true;
  226. //#ifdef MP-WEIXIN
  227. //若是小程序平台,则获取到openId。整个过程是静默完成的
  228. uni.login({
  229. provider: 'weixin',
  230. success: (wxres => {
  231. that.$api.request('get', '/login', {
  232. phone: that.phone,
  233. password: that.password,
  234. loginType: 1,
  235. raw: JSON.stringify(wxres)
  236. }, failres => {
  237. that.logining = false
  238. uni.showToast({
  239. title: failres.msg,
  240. icon: "none"
  241. });
  242. }).then(res => {
  243. that.logining = false
  244. that.$store.commit('login', res.data)
  245. uni.setStorageSync('userInfo', res.data)
  246. if (that.$api.prePage().lodaData) {
  247. that.$api.prePage().loadData()
  248. }
  249. uni.navigateBack()
  250. })
  251. })
  252. })
  253. //#endif
  254. //#ifdef APP-PLUS || H5
  255. //若是App登录,则不需要保存OpenId。可直接登录
  256. that.$api.request('get', 'login', {
  257. phone: that.phone,
  258. password: that.password,
  259. }, failres => {
  260. that.logining = false
  261. uni.showToast({
  262. title: failres.msg,
  263. icon: "none"
  264. });
  265. }).then(res => {
  266. that.logining = false
  267. that.$store.commit('login', res.data)
  268. uni.setStorageSync('userInfo', res.data)
  269. if (that.$api.prePage().lodaData) {
  270. that.$api.prePage().loadData()
  271. }
  272. uni.navigateBack()
  273. })
  274. //#endif
  275. }
  276. },
  277. loginRegis() {
  278. const that = this
  279. if (that.phone.length !== 11) {
  280. that.$api.msg('请输入11位中国手机号')
  281. return
  282. }
  283. if (!that.verifyCode) {
  284. that.$api.msg('请输入验证码')
  285. return
  286. }
  287. if (that.checkType === 0) {
  288. that.$api.msg('请勾选注册协议与隐私协议')
  289. return
  290. }
  291. that.logining = true;
  292. uni.showLoading({
  293. })
  294. var param = {
  295. phone: that.phone,
  296. verifyCode: that.verifyCode,
  297. inviteCode: that.inviteCode, // 添加邀请码参数
  298. }
  299. if (that.$store.state.InvitationCode) {
  300. param.p = that.$store.state.InvitationCode
  301. }
  302. that.$api.request('get', 'phoneLogin', {
  303. phone: that.phone,
  304. verifyCode: that.verifyCode,
  305. openId: that.puserInfo.openId,
  306. }, failres => {
  307. uni.hideLoading()
  308. that.logining = false
  309. uni.showToast({
  310. title: failres.msg,
  311. icon: "none"
  312. });
  313. }).then(res => {
  314. //console.log(res)
  315. uni.hideLoading()
  316. that.logining = false
  317. // uni.navigateBack({
  318. // delta:1
  319. // })
  320. that.$store.commit('login', res.data)
  321. uni.setStorageSync('userInfo', res.data)
  322. that.$api.setUserInfo(res.data)
  323. if (that.$api.prePage() && that.$api.prePage().lodaData) {
  324. that.$api.prePage().loadData()
  325. }
  326. uni.switchTab({
  327. url: "../index/index"
  328. })
  329. })
  330. },
  331. fakeLogin() {
  332. const that = this
  333. if (that.checkType === 0) {
  334. uni.showModal({
  335. title: '提示',
  336. content: '是否同意《注册协议》《隐私协议》',
  337. confirmText: '同意',
  338. cancelText: '取消',
  339. success: (res) => {
  340. if (res.confirm) {
  341. that.checkType = 1 // 自动勾选
  342. that.$nextTick(() => {
  343. that._doFakeLogin() // 继续执行登录
  344. })
  345. }
  346. }
  347. })
  348. return
  349. }
  350. this._doFakeLogin()
  351. },
  352. _doFakeLogin() {
  353. const that = this
  354. uni.showLoading({})
  355. //老用户,活动提醒
  356. setTimeout(function() {
  357. that.$api.setUserInfo(that.puserInfo)
  358. that.$store.commit('login', that.puserInfo)
  359. uni.setStorageSync('userInfo', that.puserInfo)
  360. uni.hideLoading()
  361. uni.navigateBack({
  362. delta: 1
  363. })
  364. }, 800);
  365. },
  366. //授权手机号登录
  367. miniWechatLogin(e) {
  368. const that = this
  369. if (that.checkType === 0) {
  370. uni.showModal({
  371. title: '提示',
  372. content: '是否同意《注册协议》《隐私协议》',
  373. confirmText: '同意',
  374. cancelText: '取消',
  375. success: (res) => {
  376. if (res.confirm) {
  377. that.checkType = 1 // 自动勾选
  378. that.$nextTick(() => {
  379. that._doMiniWechatLogin(e) // 继续执行登录
  380. })
  381. }
  382. }
  383. })
  384. return
  385. }
  386. this._doMiniWechatLogin(e)
  387. },
  388. _doMiniWechatLogin(e) {
  389. const that = this
  390. if (that.checkType === 0) {
  391. that.$api.msg('请勾选注册协议与隐私协议')
  392. return
  393. }
  394. uni.showLoading({})
  395. if (!this.sessionKey || !this.puserInfo.openId) {
  396. console.log('第三方登录异常')
  397. console.log('sessionKEY:' + this.sessionKey)
  398. console.log('openid:' + this.puserInfo.openId)
  399. this.$api.msg('登录异常,请重新点击授权登录')
  400. return
  401. uni.showLoading({})
  402. uni.login({
  403. provider: 'weixin',
  404. success: (wxres => {
  405. this.logining = false
  406. this.$api.request('get', 'miniLogin', {
  407. loginType: 1,
  408. raw: JSON.stringify(wxres)
  409. }, failres => {
  410. this.$api.msg(failres.msg)
  411. uni.hideLoading()
  412. }).then(res => {
  413. uni.hideLoading()
  414. console.log(res)
  415. this.$api.msg('登录异常,请重新点击授权登录')
  416. this.puserInfo = res.data
  417. // this.$api.setUserInfo(res.data)
  418. this.sessionKey = res.data.sessionKey
  419. })
  420. })
  421. })
  422. }
  423. console.log(e.detail.errMsg)
  424. console.log(e.detail.iv)
  425. console.log(this.puserInfo)
  426. var param = {
  427. encryptedData: e.detail.encryptedData,
  428. iv: e.detail.iv,
  429. session_key: that.sessionKey,
  430. openId: that.puserInfo.openId,
  431. loginType: 1,
  432. spread: this.$store.state.spread
  433. }
  434. that.$api.request('get', 'authPhone', param, failres => {
  435. that.$api.msg(failres.msg)
  436. uni.hideLoading()
  437. }).then(res => {
  438. if (res.code === 200) {
  439. uni.setStorageSync('userInfo', res.data)
  440. that.$store.commit('login', res.data)
  441. uni.hideLoading()
  442. uni.navigateBack({
  443. delta: 1
  444. })
  445. }
  446. })
  447. },
  448. wechatLogin() {
  449. const that = this
  450. that.logining = true
  451. let loginType = 2
  452. uni.showLoading({
  453. title: '正在同步消息'
  454. })
  455. uni.login({
  456. provider: 'weixin',
  457. success: (wxres => {
  458. that.$api.request('get', 'appLogin', {
  459. loginType: loginType,
  460. raw: JSON.stringify(wxres)
  461. }, failres => {
  462. that.$api.msg(failres.msg)
  463. uni.hideLoading()
  464. }).then(res => {
  465. that.logining = false
  466. uni.getUserInfo({
  467. lang: 'zh_CN',
  468. success: (e) => {
  469. uni.setStorageSync('userInfo', res.data)
  470. that.$store.commit('login', res.data)
  471. e.userInfo.nickname = e.userInfo.nickName
  472. that.$api.request('post', 'user/app/updateUser', e.userInfo).then(syncRes => {
  473. //同步过后
  474. res.data.nickname = e.userInfo.nickName
  475. res.data.avatar = e.userInfo.avatar
  476. res.data.gender = e.userInfo.gender
  477. uni.setStorageSync('userInfo', res.data)
  478. that.$store.commit('login', res.data)
  479. })
  480. },
  481. complete: (e) => {
  482. if (that.$api.prePage().lodaData) {
  483. that.$api.prePage().loadData()
  484. }
  485. uni.hideLoading()
  486. uni.navigateBack()
  487. }
  488. })
  489. })
  490. })
  491. })
  492. },
  493. wechatH5Login() {
  494. const that = this
  495. const href = window.location.href
  496. const page = that.$api.prePage()
  497. let prePath = '/pages/index/index'
  498. window.location = 'https://open.weixin.qq.com/connect/oauth2/authorize?' +
  499. 'appid=' + that.$api.defConfig().h5Appid + '&redirect_uri=' + escape(href) +
  500. '&response_type=code&scope=snsapi_userinfo&state=' + escape(prePath) + '#wechat_redirect'
  501. },
  502. wechatH5LoginCallback(options) {
  503. // #ifdef H5
  504. // H5进入,有可能是回调进来的
  505. if (options.code && options.state) {
  506. const that = this
  507. that.logining = true
  508. that.$api.request('get', 'h5Login', {
  509. loginType: 3,
  510. code: options.code,
  511. spread: this.$store.state.spread
  512. }, failres => {
  513. that.logining = false
  514. that.$api.msg(failres.msg)
  515. }).then(res => {
  516. // 登录成功,重定向到指定目标
  517. that.logining = false
  518. const loginData = res.data
  519. that.$store.commit('login', loginData)
  520. uni.setStorageSync('userInfo', loginData)
  521. if (loginData.status === 2) {
  522. // 未完善手机号,小程序,要求同步信息
  523. uni.redirectTo({
  524. url: '/pages/public/bind'
  525. })
  526. } else {
  527. // 不能重定向到tabbar页面
  528. if (options.state === '/pages/cart/cart' || options.state === '/pages/user/user' ||
  529. options.state === '/pages/index/index' || options.state === '/pages/category/category') {
  530. uni.switchTab({
  531. url: options.state
  532. })
  533. } else {
  534. uni.redirectTo({
  535. url: options.state
  536. })
  537. }
  538. }
  539. })
  540. }
  541. // #endif
  542. }
  543. },
  544. }
  545. </script>
  546. <style lang='scss'>
  547. page {
  548. background: #fff;
  549. }
  550. .bg-gradual-greend {
  551. background-image: linear-gradient(45deg, rgba(57, 181, 74, 0.5), rgba(141, 198, 63, 0.5));
  552. /* background-color: #ffffff; */
  553. color: #fff;
  554. }
  555. .container {
  556. padding-top: 115px;
  557. position: relative;
  558. width: 100vw;
  559. height: 100vh;
  560. overflow: hidden;
  561. background: #fff;
  562. }
  563. .wrapper {
  564. position: relative;
  565. z-index: 90;
  566. background: #fff;
  567. padding-bottom: 40upx;
  568. }
  569. .back-btn {
  570. position: absolute;
  571. left: 40upx;
  572. z-index: 9999;
  573. padding-top: var(--status-bar-height);
  574. top: 40upx;
  575. font-size: 40upx;
  576. color: $font-color-dark;
  577. }
  578. .left-top-sign {
  579. font-size: 120upx;
  580. color: $page-color-base;
  581. position: relative;
  582. left: -16upx;
  583. }
  584. .right-top-sign {
  585. position: absolute;
  586. top: 80upx;
  587. right: -30upx;
  588. z-index: 95;
  589. &:before,
  590. &:after {
  591. display: block;
  592. content: "";
  593. width: 400upx;
  594. height: 80upx;
  595. background: #b4f3e2;
  596. }
  597. &:before {
  598. transform: rotate(50deg);
  599. border-radius: 0 50px 0 0;
  600. }
  601. &:after {
  602. position: absolute;
  603. right: -198upx;
  604. top: 0;
  605. transform: rotate(-50deg);
  606. border-radius: 50px 0 0 0;
  607. /* background: pink; */
  608. }
  609. }
  610. .left-bottom-sign {
  611. position: absolute;
  612. left: -270upx;
  613. bottom: -320upx;
  614. border: 100upx solid #d0d1fd;
  615. border-radius: 50%;
  616. padding: 180upx;
  617. }
  618. .welcome {
  619. position: relative;
  620. left: 50upx;
  621. top: -90upx;
  622. font-size: 46upx;
  623. color: #555;
  624. text-shadow: 1px 0px 1px rgba(0, 0, 0, .3);
  625. }
  626. .input-content {
  627. padding: 0 60upx;
  628. }
  629. .input-item {
  630. display: flex;
  631. flex-direction: column;
  632. align-items: flex-start;
  633. justify-content: center;
  634. padding: 0 30upx;
  635. background: $page-color-light;
  636. height: 120upx;
  637. border-radius: 4px;
  638. margin-bottom: 50upx;
  639. &:last-child {
  640. margin-bottom: 0;
  641. }
  642. .tit {
  643. height: 50upx;
  644. line-height: 56upx;
  645. font-size: $font-sm+2upx;
  646. color: $font-color-base;
  647. }
  648. input {
  649. height: 60upx;
  650. font-size: $font-base + 2upx;
  651. color: $font-color-dark;
  652. width: 100%;
  653. }
  654. }
  655. .confirm-btn {
  656. width: 630upx;
  657. height: 76upx;
  658. line-height: 76upx;
  659. border-radius: 50px;
  660. margin-top: 70upx;
  661. background: $uni-color-primary;
  662. color: #fff;
  663. font-size: $font-lg;
  664. &:after {
  665. border-radius: 100px;
  666. }
  667. }
  668. .forget-section {
  669. font-size: $font-sm+2upx;
  670. color: $font-color-spec;
  671. text-align: center;
  672. margin-top: 40upx;
  673. }
  674. .register-section {
  675. position: absolute;
  676. left: 0;
  677. bottom: 50upx;
  678. width: 100%;
  679. font-size: $font-sm+2upx;
  680. color: $font-color-base;
  681. text-align: center;
  682. text {
  683. color: $font-color-spec;
  684. margin-left: 10upx;
  685. }
  686. }
  687. .tip {
  688. height: 1.1 * 100rpx;
  689. text-align: center;
  690. line-height: 1.05 * 100rpx;
  691. font-size: 0.3 * 100rpx;
  692. color: #cccccc;
  693. }
  694. </style>