reset.vue 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818
  1. <template>
  2. <view class="container">
  3. <view class="back-btn cuIcon-back" @click="navBack"></view>
  4. <!-- 设置白色背景防止软键盘把下部绝对定位元素顶上来盖住输入框等 -->
  5. <view class="wrapper">
  6. <h2>重置密码</h2>
  7. <view style='width:100%;margin-top:50px;border-bottom:1px solid #E8E9ED;padding:10px;' class="flex">
  8. <view style='width:15%;border-right:1px solid #E8E9ED;'>+86</view>
  9. <view style='width:85%;'><input maxlength="11" @input='phoneinput' style='padding-left:10px;' v-model='phone' placeholder="请输入手机号码" type="text"></view>
  10. </view>
  11. <view style='width:100%;border-bottom:1px solid #E8E9ED;position:relative;padding:10px;' class="flex">
  12. <view style='width:85%;'><input v-model='verifyCode' placeholder="请输入验证码" type="text"></view>
  13. <button @click='getcode' :class='status&&!sendDisabled?"active":""' class='getcode'>{{sendText}}</button>
  14. </view>
  15. <view style='border-bottom:1px solid #E8E9ED;padding:10px;position:relative;'>
  16. <input class='password' style='height:30px;' v-model='password' placeholder="请输入新密码,6-16位字符" :type="type" value="" />
  17. <view @click='switchover' style='position:absolute;right:0;top:38%;z-index:10;cursor:pointer;' class="iconfont " :class='type=="password"?"icon-yanjing-biyan":"icon-yanjing-zhengyan"'></view>
  18. </view>
  19. <button :class='phone!=""&&verifyCode!=""&&password!=""?"active":""' @click='reset' class='verificationCode'>重置密码</button>
  20. </view>
  21. </view>
  22. </template>
  23. <script>
  24. import {
  25. mapMutations
  26. } from 'vuex';
  27. import { openFSqlite, createFSQL, selectFSQL, addFSQL } from '../../util/f.js'
  28. import { queryData, upData, initData } from '../../util/dbUtil.js'
  29. export default {
  30. data() {
  31. return {
  32. inputContent: null,
  33. loginType: "wechat",
  34. phone: '',
  35. password: '',
  36. logining: false,
  37. isPhone: false,
  38. isApple: true,
  39. accessToken:'',
  40. params:{
  41. encryptedData:'',
  42. session_key:'',
  43. iv:'',
  44. },
  45. status:false,
  46. userInfo:{
  47. nickName:'',
  48. avatarUrl:'',
  49. gender:'',
  50. phone:''
  51. },
  52. consentStatus:false,
  53. type:'password',
  54. inputStatus:'none',
  55. verifyCode:null,
  56. sendText:'获取验证码',
  57. sendDisabled: false,
  58. system:'',
  59. platform:'',
  60. userData:undefined,
  61. canIUseProfile:false
  62. }
  63. },
  64. onShow() {
  65. // this.loginType = "wechat"
  66. this.$api.logout()
  67. },
  68. onLoad(options) {
  69. if( wx.getUserProfile ){
  70. console.log('--check getUserProfile--OK');
  71. this.canIUseProfile = true;
  72. }
  73. console.log("login on load")
  74. var that = this
  75. that.$api.request('user', 'sendIsApple', {
  76. }).then(res => {
  77. that.isApple = res.data
  78. })
  79. uni.getSystemInfo({
  80. success:(res) => {
  81. // console.log(res)
  82. this.system = res.system // ios
  83. this.platform = res.platform // 14.3
  84. }
  85. })
  86. },
  87. methods: {
  88. phoneinput(e){
  89. if(e.detail.value.length==11){
  90. this.status=true
  91. }
  92. },
  93. getcode(e){
  94. if(this.phone.length!=11){
  95. uni.showToast({
  96. title: '请输入正确的手机号',
  97. icon:'none',
  98. duration: 2000
  99. })
  100. return
  101. }
  102. if(/^0?1[3|4|5|6|7|8][0-9]\d{8}$/.test(this.phone)){
  103. var that=this
  104. this.$api.doRequest('get','/commonUser/sendVerifyCode',{phone:this.phone}).then(res => {
  105. that.sendDisabled = true
  106. let sec = 60
  107. let interval = setInterval(() => {
  108. sec--;
  109. that.sendText = sec + 's后重发'
  110. if (sec <= 0) {
  111. that.sendDisabled = false
  112. that.sendText = "获取验证码"
  113. clearInterval(interval)
  114. }
  115. }, 1000)
  116. })
  117. .catch(res => {
  118. uni.showToast({
  119. title: res.errMsg,
  120. icon:'none',
  121. duration: 2000
  122. })
  123. });
  124. }else{
  125. uni.showToast({
  126. title: '请输入正确的手机号',
  127. icon:'none',
  128. duration: 2000
  129. })
  130. }
  131. },
  132. reset(){
  133. var that = this
  134. this.$api.doRequest('post','/commonUser/resetPassword',{phone:this.phone,password:this.password,verifyCode:this.verifyCode}).then(res => {
  135. // 获得数据
  136. if(res.data.code==200){
  137. var that=this
  138. uni.showLoading({
  139. title: '登录中',
  140. mask:true
  141. })
  142. this.$api.doRequest('get','/commonUser/login',{phone:this.phone,password:this.password}).then(req => {
  143. if(res.data.code==200){
  144. uni.setStorageSync('userInfo', req.data.data)
  145. that.$store.commit('login', req.data.data)
  146. that.liangxinLogin()
  147. uni.switchTab({
  148. url: '/pages/sale/information'
  149. });
  150. uni.hideLoading()
  151. }else{
  152. uni.showToast({
  153. title: res.data.message,
  154. icon:'none',
  155. duration: 2000
  156. })
  157. }
  158. })
  159. .catch(res => {
  160. uni.showToast({
  161. title: res.data.message,
  162. icon:'none',
  163. duration: 2000
  164. })
  165. });
  166. }else{
  167. uni.showToast({
  168. title: res.data.message,
  169. icon:'none',
  170. duration: 2000
  171. })
  172. }
  173. uni.showLoading({
  174. title: '登录中',
  175. mask:true
  176. })
  177. })
  178. .catch(res => {
  179. uni.showToast({
  180. title: res.data.message,
  181. icon:'none',
  182. duration: 2000
  183. })
  184. });
  185. },
  186. consent(){
  187. this.consentStatus=!this.consentStatus
  188. uni.setStorage({
  189. key: 'policyStorageKey',
  190. data: this.consentStatus
  191. });
  192. },
  193. switchover(){
  194. if(this.type=='password'){
  195. this.type='text'
  196. }else{
  197. this.type='password'
  198. }
  199. },
  200. gocode(){
  201. uni.navigateTo({
  202. url:'/pages/public/login'
  203. })
  204. },
  205. forgetpass(){
  206. uni.navigateTo({
  207. url:'/pages/public/reset'
  208. })
  209. },
  210. cancel() {
  211. this.inputShow = false
  212. this.inputStatus = 'none'
  213. this.isPhone = false
  214. },
  215. ...mapMutations(['login']),
  216. inputChange(e) {
  217. const key = e.currentTarget.dataset.key;
  218. this[key] = e.detail.value;
  219. },
  220. chooseLoginType(type) {
  221. this.loginType = type
  222. },
  223. navBack() {
  224. uni.navigateBack();
  225. },
  226. toRegist() {
  227. uni.redirectTo({
  228. url: '/pages/public/register'
  229. })
  230. },
  231. ///发起消息订阅
  232. requestSubscribe(){
  233. const that = this
  234. wx.requestSubscribeMessage({
  235. tmplIds: ['xL_uZEqJz4QP1FbnlzQWAiO2zVBn3Qeu8JwLVOU3hU0','8cVkckXi_8zfHeScXRHhjN6cgZFYYCWIMPDTiPWagXY','IE7WxBsv-fDvPWSrng-97lGWtvZf9rHuECBlhRLlWxI'],//
  236. success :(res)=>{
  237. console.log("订阅消息 成功 "+res);
  238. },
  239. fail :(errMsg) =>{
  240. console.log("订阅消息 失败 "+errMsg.errMsg);
  241. },
  242. complete:(errMsg)=>{
  243. console.log("订阅消息 完成 "+errMsg);
  244. }
  245. });
  246. },
  247. getPhoneNumber(e) {
  248. console.log(e)
  249. if (e.mp.detail.errMsg==="getPhoneNumber:ok") {
  250. this.isPhone = false
  251. this.params.iv = e.mp.detail.iv
  252. this.params.encryptedData = e.mp.detail.encryptedData
  253. this.params.session_key = this.accessToken
  254. console.log(this.params)
  255. this.getTokenAsync(this.params)
  256. }
  257. },
  258. // 请求后获取token
  259. async getTokenAsync(params) {
  260. let that = this
  261. this.$api.request('user', 'getPhoneNumber', params).then(res => {
  262. if(res.data.phoneNumber){
  263. that.userInfo.phone = res.data.phoneNumber
  264. }
  265. if(res.data.unionId){
  266. that.userInfo.unionId = res.data.unionId
  267. }
  268. that.userInfo.cid = uni.getStorageSync("clientId")
  269. console.log(that.userInfo)
  270. that.$api.request('user', 'syncUserInfo', that.userInfo).then(syncRes => {
  271. uni.setStorageSync('userInfo', that.userInfo)
  272. that.$store.commit('login', that.userInfo)
  273. that.$api.setUserInfo(that.userInfo)
  274. uni.hideLoading()
  275. that.liangxinLogin()
  276. })
  277. if(res.data.phoneNumber){
  278. uni.switchTab({
  279. url: '/pages/sale/information'
  280. });
  281. }
  282. })
  283. },
  284. async toLogin() {
  285. this.verifyCode = ''
  286. const that = this
  287. if (that.phone.length !== 11) {
  288. that.$api.msg('请输入11位中国手机号')
  289. } else if (that.password.length < 8) {
  290. that.$api.msg('密码至少8位')
  291. } else {
  292. that.logining = true;
  293. //#ifdef MP-WEIXIN
  294. //若是小程序平台,则获取到openId。整个过程是静默完成的
  295. uni.login({
  296. provider: 'weixin',
  297. success: (wxres => {
  298. that.$api.request('user', 'login', {
  299. phone: that.phone,
  300. password: that.password,
  301. loginType: 1,
  302. raw: JSON.stringify(wxres)
  303. }, failres => {
  304. that.logining = false
  305. uni.showToast({
  306. title: failres.errmsg,
  307. icon: "none"
  308. });
  309. }).then(res => {
  310. that.logining = false
  311. that.$store.commit('login', res.data)
  312. uni.setStorageSync('userInfo', res.data)
  313. if (that.$api.prePage().lodaData) {
  314. that.$api.prePage().loadData()
  315. }
  316. uni.navigateBack()
  317. })
  318. })
  319. })
  320. //#endif
  321. //#ifdef APP-PLUS || H5
  322. //若是App登录,则不需要保存OpenId。可直接登录
  323. that.$api.request('user', 'login', {
  324. phone: that.phone,
  325. password: that.password,
  326. }, failres => {
  327. that.logining = false
  328. uni.showToast({
  329. title: failres.errmsg,
  330. icon: "none"
  331. });
  332. }).then(res => {
  333. that.logining = false
  334. that.$store.commit('login', res.data)
  335. uni.setStorageSync('userInfo', res.data)
  336. if (that.$api.prePage().lodaData) {
  337. that.$api.prePage().loadData()
  338. }
  339. uni.navigateBack()
  340. })
  341. //#endif
  342. }
  343. },
  344. miniWechatLogin(e) {
  345. const that = this
  346. //旧版本方式
  347. if( this.canIUseProfile == false ){
  348. console.log("旧版本方式")
  349. //获取授权信息
  350. if(e.detail.userInfo){
  351. console.log('用户允许了授权')
  352. console.log( e.detail.userInfo ); //1.拿到基本的微信信息!!
  353. uni.showLoading({
  354. title: '加载中',
  355. mask:true
  356. })
  357. that.logining = true
  358. let loginType = 1
  359. let userInfo = e.detail.userInfo
  360. uni.login({
  361. provider: 'weixin',
  362. success: (wxres => {
  363. that.logining = false
  364. that.$api.request('user', 'thirdPartLogin', {
  365. loginType: loginType,
  366. raw: JSON.stringify(wxres)
  367. }, failres => {
  368. that.$api.msg(failres.errmsg)
  369. uni.hideLoading()
  370. }).then(res => {
  371. that.accessToken = res.data.accessToken
  372. that.$api.setUserInfo(res.data)
  373. that.userInfo = res.data
  374. uni.getUserInfo({
  375. lang: 'zh_CN',
  376. provider: 'weixin',
  377. withCredentials:true,
  378. success: (e) => {
  379. that.params.iv = e.iv
  380. that.params.encryptedData = e.encryptedData
  381. that.params.session_key = that.accessToken
  382. console.log(this.params)
  383. that.getTokenAsync(this.params)
  384. uni.setStorageSync('userInfo', res.data)
  385. that.$store.commit('login', res.data)
  386. e.userInfo.nickname = e.userInfo.nickName
  387. if(e.userInfo.phone == undefined){
  388. e.userInfo.phone = ''
  389. }
  390. e.userInfo.cid = uni.getStorageSync("clientId")
  391. console.log(e.userInfo)
  392. that.$api.request('user', 'syncUserInfo', e.userInfo).then(syncRes => {
  393. //同步过后
  394. res.data.nickname = userInfo.nickName
  395. res.data.avatarUrl = userInfo.avatarUrl
  396. res.data.gender = userInfo.gender
  397. if(userInfo.phone){
  398. res.data.phone = userInfo.phone
  399. that.liangxinLogin()
  400. }
  401. uni.setStorageSync('userInfo', res.data)
  402. that.$store.commit('login', res.data)
  403. that.$api.setUserInfo(res.data)
  404. uni.hideLoading()
  405. // uni.navigateBack()
  406. })
  407. },
  408. complete: (e) => {
  409. uni.hideLoading()
  410. if(!res.data.phone||res.data.phone==""||res.data.phone ==undefined){
  411. that.isPhone = true//显示自定义的获取手机权限提示框
  412. that.inputStatus = 'inline'
  413. that.inputContent = ''
  414. }
  415. else{
  416. uni.setStorageSync('PageCur', "sale");
  417. // uni.switchTab({
  418. // url: '/pages/sale/sale'
  419. // });
  420. uni.switchTab({
  421. url: '/pages/sale/information'
  422. });
  423. console.log("complete")
  424. }
  425. }
  426. })
  427. })
  428. }),
  429. })
  430. }
  431. //新版本方式
  432. }else{
  433. console.log("新版本方式")
  434. uni.showLoading({
  435. title: '加载中',
  436. mask:true
  437. })
  438. that.logining = true
  439. let loginType = 1
  440. wx.getUserProfile({
  441. desc : '用于完善用户资料',
  442. lang : 'zh_CN',
  443. success : function( proRes ){
  444. console.log('proRes.userInfo',proRes.userInfo)
  445. uni.login({
  446. provider: 'weixin',
  447. success: (wxres => {
  448. that.logining = false
  449. that.$api.request('user', 'thirdPartLogin', {
  450. loginType: loginType,
  451. raw: JSON.stringify(wxres)
  452. }, failres => {
  453. that.$api.msg(failres.errmsg)
  454. uni.hideLoading()
  455. }).then(res => {
  456. console.log('res+++++',res)
  457. that.accessToken = res.data.accessToken
  458. that.$api.setUserInfo(res.data)
  459. that.userInfo = res.data
  460. // that.params.iv = proRes.iv
  461. // that.params.encryptedData = proRes.encryptedData
  462. // that.params.session_key = that.accessToken
  463. // console.log(that.params)
  464. // that.getTokenAsync(that.params)
  465. uni.setStorageSync('userInfo', res.data)
  466. that.$store.commit('login', res.data)
  467. if(proRes.userInfo.phone == undefined){
  468. proRes.userInfo.phone = ''
  469. }
  470. res.data.cid = uni.getStorageSync("clientId")
  471. that.$api.request('user', 'syncUserInfo', res.data).then(syncRes => {
  472. //同步过后
  473. res.data.nickname = proRes.userInfo.nickName
  474. res.data.avatarUrl = proRes.userInfo.avatarUrl
  475. res.data.gender = proRes.userInfo.gender
  476. if(proRes.userInfo.phone){
  477. res.data.phone = proRes.userInfo.phone
  478. }
  479. uni.setStorageSync('userInfo', res.data)
  480. that.$store.commit('login', res.data)
  481. that.$api.setUserInfo(res.data)
  482. uni.hideLoading()
  483. if(!that.userInfo.phone||that.userInfo.phone==""||that.userInfo.phone ==undefined){
  484. that.isPhone = true//显示自定义的获取手机权限提示框
  485. that.inputStatus = 'inline'
  486. that.inputContent = ''
  487. }
  488. else{
  489. uni.setStorageSync('PageCur', "sale");
  490. // uni.switchTab({
  491. // url: '/pages/sale/sale'
  492. // });
  493. uni.reLaunch({
  494. url: '/pages/sale/information'
  495. });
  496. console.log("complete")
  497. that.liangxinLogin()
  498. }
  499. })
  500. console.log( 'wx.getUserProfile=>用户允许了授权' );
  501. })
  502. })
  503. })
  504. },
  505. fail : function( res ){
  506. console.log('wx.getUserProfile=>用户拒绝了授权');
  507. console.log( res );
  508. }
  509. });
  510. }
  511. // 获取用户的当前设置,判断是否点击了“总是保持以上,不在询问”
  512. // wx.getSetting({
  513. // withSubscriptions: true,//是否获取用户订阅消息的订阅状态,默认false不返回
  514. // success(res){
  515. // debugger
  516. // if(res.subscriptionsSetting.mainSwitch){
  517. // }else{
  518. // }
  519. // }
  520. // })
  521. // uni.showModal({
  522. // title: '温馨提示',
  523. // content: '为更好的与您沟通,小程序需要向您发送通知消息',
  524. // confirmText:"同意",
  525. // cancelText:"拒绝",
  526. // showCancel: false,
  527. // success: function (res) {
  528. // if (res.confirm) {
  529. // //调用订阅消息
  530. // that.requestSubscribe();
  531. // } else if (res.cancel) {
  532. // ///显示第二个弹说明一下
  533. // wx.showModal({
  534. // title: '温馨提示',
  535. // content: '拒绝后您将无法获取实时的交易、物流消息',
  536. // confirmText:"知道了",
  537. // showCancel:false,
  538. // success: function (res) {
  539. // uni.openSetting({ // 打开设置页
  540. // success(res) {
  541. // console.log(res.authSetting)
  542. // }
  543. // });
  544. // }
  545. // });
  546. // }
  547. // }
  548. // });
  549. },
  550. wechatLogin() {
  551. const that = this
  552. that.logining = true
  553. let loginType = 2
  554. uni.showLoading({
  555. title: '正在同步消息',
  556. mask:true
  557. })
  558. uni.login({
  559. provider: 'weixin',
  560. success: (wxres => {
  561. that.$api.request('user', 'thirdPartLogin', {
  562. loginType: loginType,
  563. raw: JSON.stringify(wxres)
  564. }, failres => {
  565. that.$api.msg(failres.errmsg)
  566. uni.hideLoading()
  567. }).then(res => {
  568. console.log("thirdPartLogin:"+res.data.phone)
  569. that.accessToken = res.data.accessToken
  570. that.logining = false
  571. uni.getUserInfo({
  572. lang: 'zh_CN',
  573. success: (e) => {
  574. uni.setStorageSync('userInfo', res.data)
  575. that.$store.commit('login', res.data)
  576. e.userInfo.nickname = e.userInfo.nickName
  577. e.userInfo.cid = uni.getStorageSync("clientId")
  578. console.log(e.userInfo)
  579. that.$api.request('user', 'syncUserInfo', e.userInfo).then(syncRes => {
  580. //同步过后
  581. res.data.nickname = e.userInfo.nickName
  582. res.data.avatarUrl = e.userInfo.avatarUrl
  583. res.data.gender = e.userInfo.gender
  584. if(res.data.phone){
  585. res.data.phone = e.userInfo.phone
  586. that.liangxinLogin()
  587. }
  588. uni.setStorageSync('userInfo', res.data)
  589. that.$store.commit('login', res.data)
  590. })
  591. },
  592. complete: (e) => {
  593. uni.hideLoading()
  594. if(!res.data.phone||res.data.phone==""||res.data.phone ==undefined){
  595. that.isPhone = true//显示自定义的获取手机权限提示框
  596. that.inputStatus = 'inline'
  597. that.inputContent = ''
  598. }
  599. else{
  600. // uni.switchTab({
  601. // url: '/pages/sale/sale'
  602. // });
  603. uni.switchTab({
  604. url: '/pages/sale/information'
  605. });
  606. console.log("complete")
  607. }
  608. }
  609. })
  610. })
  611. })
  612. })
  613. },
  614. wechatH5Login() {
  615. const that = this
  616. let href = window.location.origin
  617. let page = that.$api.prePage()
  618. let prePath = '/pages/index/index'
  619. if (page) {
  620. prePath = page.__page__.path
  621. }
  622. window.location = 'https://open.weixin.qq.com/connect/oauth2/authorize?'
  623. + 'appid=' + that.$api.defConfig().h5Appid + '&redirect_uri=' + escape(href) + '&response_type=code&scope=snsapi_userinfo&state=' + escape(prePath) + '#wechat_redirect'
  624. },
  625. liangxinLogin(){
  626. const that = this
  627. var userInfoTmp = uni.getStorageSync("userInfo")
  628. console.log('userInfoTmp',userInfoTmp)
  629. that.$socket.login(userInfoTmp.phone, "123456", null, res=>{
  630. console.log('粮信登录',res)
  631. if (res.success) {
  632. that.$socket.showLoginDialog = false
  633. // 缓存用户
  634. that.userData = res.response.data
  635. console.log('userData',that.userData)
  636. that.$u.vuex("userData", that.userData);
  637. // 缓存通讯录
  638. that.$socket.listGuests(that.userData.user.operId, res => {
  639. // #ifdef APP-PLUS
  640. createFSQL(that.userData.user.operId).then();
  641. let contact = res.response.data;
  642. contact.forEach(c=>{
  643. c.members.forEach(m=>{
  644. m.name = c.name;
  645. addFSQL(m, that.userData.user.operId).then();
  646. })
  647. })
  648. // #endif
  649. that.$u.vuex('firendItem', res.response.data)
  650. });
  651. // 缓存消息列表
  652. that.$socket.queryOnlineMessage(that.userData.user.operId,q =>{
  653. let data = q.response.data;
  654. for(var i in data){
  655. initData(data[i].groupMsg.list, data[i].groupInfo.chatId);
  656. }
  657. })
  658. // 缓存链接
  659. that.$socket.getLinks(that.userData.user.operId, res=>{
  660. that.$u.vuex('linkItem',res.response.data)
  661. });
  662. // // 跳转到消息列表
  663. // that.$u.route({
  664. // url: 'pages/home/home',
  665. // type: 'switchTab'
  666. // });
  667. } else {
  668. uni.showModal({
  669. title:res.reason + ",请稍后再试",
  670. showCancel:false
  671. })
  672. }
  673. });
  674. }
  675. },
  676. }
  677. </script>
  678. <style lang='scss' scoped>
  679. .apple{
  680. background: #000;
  681. width: 35px;
  682. height: 35px;
  683. padding: 8px;
  684. border-radius: 50%;
  685. vertical-align: middle;
  686. }
  687. page {
  688. background: #fff;
  689. }
  690. .cuIcon-weixin{
  691. background: #39b54a;
  692. color: #fff;
  693. font-size: 18px;
  694. padding: 9px;
  695. border-radius: 50%;
  696. vertical-align: middle;
  697. margin-right:5px;
  698. }
  699. .container {
  700. padding-top: 85px;
  701. position: relative;
  702. width: 100vw;
  703. height: 100vh;
  704. overflow: hidden;
  705. background: url('~@/static/img/login/bg.png');
  706. background-size:100%;
  707. }
  708. .wrapper {
  709. position: relative;
  710. z-index: 90;
  711. padding-bottom: 40upx;
  712. height:100%;
  713. padding:0 30px;
  714. }
  715. .back-btn {
  716. position: absolute;
  717. left: 40upx;
  718. z-index: 9999;
  719. padding-top: var(--status-bar-height);
  720. top: 40upx;
  721. font-size: 40upx;
  722. color: $font-color-dark;
  723. }
  724. .verificationCode{
  725. margin-top:20px;
  726. background:#F5F6F9;
  727. color:#AFB3BF;
  728. }
  729. .verificationCode:after{
  730. border:none;
  731. }
  732. .verificationCode.active{
  733. background:#22C572;
  734. color:#fff;
  735. }
  736. .register{
  737. position:absolute;
  738. bottom:20px;
  739. left:50%;
  740. transform: translateX(-50%);
  741. color:#333333;
  742. height:50px;
  743. line-height:50px;
  744. border-radius:30px;border: 1px solid #444444;
  745. }
  746. .register:after{
  747. border:none;
  748. }
  749. .getcode{
  750. font-size:14px;
  751. position:absolute;
  752. right:0;
  753. top:50%;
  754. transform: translateY(-50%);
  755. color:#AFB3BF;
  756. background:#F5F6F9;
  757. height:30px;
  758. line-height:30px;
  759. }
  760. .password{
  761. border:none;
  762. outline: none;
  763. }
  764. .getcode:after{
  765. border:none;
  766. }
  767. .getcode.active{
  768. background:#22C572;
  769. color:#fff;
  770. }
  771. uni-navigator{
  772. display:inline-block;
  773. color:#22C572;
  774. }
  775. </style>