reset.vue 22 KB

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