login.vue 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850
  1. <template>
  2. <view>
  3. <!-- 状态栏 -->
  4. <!-- 公共组件-每个页面必须引入 -->
  5. <public-module></public-module>
  6. <app-update ref="app_update"></app-update>
  7. <!-- 欢迎语 -->
  8. <view class="dis j-end a-c">
  9. <image src="../../static/image/login/2.png" mode=""
  10. style="height: 280px;width: calc(100% - 16px);margin-top: 25%;">
  11. </image>
  12. </view>
  13. <view class="" style="margin-top: -120px;">
  14. <u-tabs :list="list" :is-scroll="true" :current="current" @change="change"
  15. style="background: transparent;margin-bottom: 30px;"></u-tabs>
  16. <!-- 登录区域Start -->
  17. <view class="mx-3">
  18. <!-- 账号密码登录 false代表账号密码登录 -->
  19. <template v-if="current==0">
  20. <view class="mt-2 position-relative border-bottom">
  21. <view class="position-absolute d-flex a-center j-center left-0 top-0 font-weight"
  22. style="height: 100%;">
  23. <image src="../../static/image/login/zhanghao.png" mode=""
  24. style="width: 18px;height: 18px;">
  25. </image>
  26. </view>
  27. <input type="text" v-model="username" class="uni-input common-input" maxlength="17"
  28. placeholder="请输入会员号" style="padding-left: 56rpx;background: transparent;" />
  29. </view>
  30. <view class="mt-2 position-relative border-bottom">
  31. <view class="position-absolute d-flex a-center j-center left-0 top-0 font-weight"
  32. style="height: 100%;">
  33. <image src="../../static/image/login/mima.png" mode="" style="width: 18px;height: 18px;">
  34. </image>
  35. </view>
  36. <input type="text" :password="isHidePassword" v-model="password" class="uni-input common-input"
  37. placeholder="请输入密码" style="padding-right: 200rpx;padding-left: 56rpx;" maxlength="15" />
  38. <view class=" position-absolute top-0 right-0 d-flex a-center j-center"
  39. style="width: 200rpx;height: 100%;">
  40. <image
  41. :src="isHidePassword?'../../static/image/login/biyan.png':'../../static/image/login/zhengyan.png'"
  42. @tap="isHidePassword = !isHidePassword" mode="" style="width: 18px;height: 18px;">
  43. </view>
  44. </view>
  45. <view class="mt-2 position-relative border-bottom">
  46. <view class="position-absolute d-flex a-center j-center left-0 top-0 font-weight"
  47. style="height: 100%;">
  48. <image src="../../static/image/login/yanzhengma.png" mode=""
  49. style="width: 18px;height: 18px;">
  50. </image>
  51. </view>
  52. <input type="text" v-model="imgcode" class="uni-input common-input" maxlength="5"
  53. placeholder="请输入验证码" style="padding-right: 200rpx;padding-left: 56rpx;" />
  54. <image style="height: 80%;padding-top: 4rpx;width: 200rpx;" mode="aspectFill"
  55. class="position-absolute top-0 right-0 d-flex a-center j-center text-light-muted"
  56. :src="imgcodesrc" @tap="refreshCaptcha"></image>
  57. </view>
  58. </template>
  59. <!-- 手机验证码登录 true代表手机验证码登录 -->
  60. <template v-else>
  61. <view class="mt-2 position-relative border-bottom">
  62. <view class="position-absolute d-flex a-center j-center left-0 top-0 font-weight"
  63. style="height: 100%;">
  64. <image src="../../static/image/login/shoujihao.png" mode=""
  65. style="width: 18px;height: 18px;">
  66. </image>
  67. </view>
  68. <input type="text" v-model="phone" class="uni-input common-input" style="padding-left: 56rpx;"
  69. placeholder="手机号" />
  70. </view>
  71. <view class="mt-2 position-relative border-bottom">
  72. <view class="position-absolute d-flex a-center j-center left-0 top-0 font-weight"
  73. style="height: 100%;">
  74. <image src="../../static/image/login/yanzhengma.png" mode=""
  75. style="width: 18px;height: 18px;">
  76. </image>
  77. </view>
  78. <input type="text" v-model="checknum" class="uni-input common-input" maxlength="4"
  79. style="padding-right:120px;padding-left: 56rpx;" placeholder="请输入验证码" />
  80. <view class="position-absolute top-0 right-0 d-flex a-center j-center text-light-muted"
  81. style="width: 240rpx;height: 100%;" @tap="getCheckNum">
  82. <view class="d-flex a-center j-center "
  83. :class="!codetime?'yanzhengmaView1 text-color':'yanzhengmaView2'">
  84. {{!codetime?'获取验证码':codetime+' S'+'后重新获取'}}
  85. </view>
  86. </view>
  87. </view>
  88. </template>
  89. <button class="my-3 mt-4 d-flex a-center j-center font-weight bg-color" :loading="loading"
  90. :class="{'bg-hover-color':disabled}" type="primary" @tap="submit" :disabled="disabled"
  91. style="letter-spacing: 20rpx;">登录</button>
  92. <view class=" left-0 right-0 dis a-c j-start text-light-muted" style="bottom:30rpx">
  93. <u-checkbox v-model="checked"></u-checkbox>
  94. 我已确认并同意<view> <text @tap="nav('/pages/login/xieyi')" class="text-color">平台协议</text>及<text
  95. class="text-color" @tap="nav('/pages/login/mimi')">隐私协议</text>政策</view>
  96. </view>
  97. <!-- #ifdef APP -->
  98. <view class="third_party_login_box">
  99. <view class="third_party_title"><text>第三方登录</text></view>
  100. <view class="third_party_content flex-wrap">
  101. <image src="../../static/image/login/wx.png" @click="onWxAppLogin" mode="aspectFit"></image>
  102. <image src="../../static/image/login/zf.png" @click="onzfbAppLogin" mode="aspectFit"></image>
  103. </view>
  104. </view>
  105. <!-- #endif -->
  106. </view>
  107. </view>
  108. <u-toast ref="uToast" />
  109. <u-popup v-model="show" border-radius="14" mode="center" width="70%">
  110. <view class="shu1 shili">
  111. <text>温馨提示</text>
  112. <text>是否更新账号密码?</text>
  113. </view>
  114. <view class="heng shili_btn">
  115. <view class="heng1" @click="quxiao">取消</view>
  116. <view class="heng1" @click="queren" style="background-color: orangered;">确认</view>
  117. </view>
  118. </u-popup>
  119. </view>
  120. </template>
  121. <script>
  122. import appUpdate from "@/components/yzhua006-update/app-update.vue"; //app更新组件
  123. import md5 from '@/plugins/md5';
  124. let clear;
  125. import {
  126. mapState,
  127. mapMutations
  128. } from 'vuex';
  129. import socket from '@/config/socket';
  130. import DB from "@/common/sqlite";
  131. export default {
  132. components: {
  133. appUpdate
  134. },
  135. data() {
  136. return {
  137. checked: false,
  138. list: [{
  139. name: '账号登录'
  140. }, {
  141. name: '短信登录'
  142. }],
  143. current: 0,
  144. isLoading: false,
  145. show: false,
  146. contentSlot: true,
  147. status: false, //false代表账号密码登录,true代表手机验证码登录
  148. disabled: true, //登录按钮是否可用
  149. loading: false, //是否显示按钮加载状态
  150. username: "", //登录用户名
  151. password: "", //登录密码
  152. imgcode: "", //图片验证码0
  153. imgcodesrc: "", //验证码图片
  154. isHidePassword: true, //是否隐藏密码
  155. phone: "", //登录手机号
  156. checknum: "", //登录验证码
  157. captchaId: "",
  158. codetime: 0, //验证码获取倒计时
  159. code: "", //用户code
  160. listData: [],
  161. };
  162. },
  163. onReady() {
  164. this.isLoading = true;
  165. },
  166. beforeCreate() {
  167. setTimeout(() => {
  168. this.$refs.app_update.update(); //调用子组件检查更新方法
  169. setTimeout(() => {
  170. if (this.$refs.app_update.popup_show == true && this.$refs.app_update.force == true) {}
  171. }, 100)
  172. }, 500)
  173. },
  174. //第一次加载
  175. async onLoad(e) {
  176. // #ifdef APP-PLUS
  177. this.openSQL();
  178. this.selectTableData();
  179. // this.deleteTableData();
  180. // #endif
  181. },
  182. watch: {
  183. username(val) {
  184. this.username = this.username.toUpperCase();
  185. this.OnBtnChange();
  186. },
  187. password(val) {
  188. this.OnBtnChange();
  189. },
  190. imgcode(val) {
  191. this.OnBtnChange();
  192. },
  193. phone(val) {
  194. this.OnBtnChange();
  195. },
  196. checknum(val) {
  197. this.OnBtnChange();
  198. }
  199. },
  200. mounted() {
  201. // //取出缓存中的账号、密码
  202. const HBusername = uni.getStorageSync('username');
  203. const HBpassword = uni.getStorageSync('password');
  204. // //有账号、密码就赋值给文本,没有就清空
  205. this.username = HBusername;
  206. this.password = HBpassword;
  207. },
  208. onShow() {
  209. this.refreshCaptcha();
  210. uni.getClipboardData({
  211. success: (res) => {
  212. let id = (res.data.replace(/(^\s*)|(\s*$)/g, "")).toUpperCase();
  213. if ((id.length == 17) && (id.indexOf('99') == 0) && (id.indexOf('D') >
  214. 0) && (id.indexOf(
  215. 'M') > 0) && (id !== this.username)) {
  216. uni.showModal({
  217. content: '是否自动填充会员号',
  218. cancelText: '否',
  219. confirmText: '是',
  220. success: (res1) => {
  221. if (res1.confirm) {
  222. this.username = id;
  223. }
  224. }
  225. });
  226. }
  227. }
  228. })
  229. //#ifdef APP-PLUS
  230. let args = plus.runtime.arguments;
  231. if (args) {
  232. plus.runtime.arguments = null; //进入之后就把urlscheme清空要不然下一次oushow时还会执行
  233. // 处理args参数,如直达到某新页面等
  234. //通过code请求获取user_id
  235. var authCode = args.split("=")[1];
  236. if (authCode != undefined && authCode != "" && authCode != null) {
  237. this.$login({
  238. url: "/alipay/login",
  239. data: {
  240. code: authCode,
  241. }
  242. }).then(res => {
  243. return uni.showToast({
  244. title: res.msg,
  245. icon: 'none'
  246. });
  247. socket.init();
  248. return;
  249. })
  250. }
  251. }
  252. //#endif
  253. },
  254. onUnload() {
  255. this.closeSQL();
  256. },
  257. computed: {
  258. ...mapState(["userLoginId", "loginStatus"])
  259. },
  260. //方法
  261. methods: {
  262. ...mapMutations(['setUserInfo']),
  263. // 跳转页面
  264. change(index) {
  265. this.current = index;
  266. },
  267. nav(url) {
  268. uni.navigateTo({
  269. url: url
  270. });
  271. },
  272. // 图片验证码
  273. refreshCaptcha() {
  274. let randnum = Math.floor(Math.random() * (1000000 - 1 + 1)) + 1
  275. this.imgcodesrc = this.$base.baseUrl + "/captchaById?t=" + new Date().getTime() +
  276. '&captchaId=' + randnum;
  277. this.captchaId = randnum;
  278. },
  279. // 切换登录状态
  280. changeStatus() {
  281. uni.hideKeyboard();
  282. this.initInput();
  283. this.status = !this.status;
  284. this.refreshCaptcha();
  285. },
  286. // 初始化表单
  287. initInput() {
  288. this.username = '';
  289. this.password = '';
  290. this.phone = '';
  291. this.checknum = '';
  292. this.imgcode = "";
  293. },
  294. // 改变按钮状态
  295. OnBtnChange() {
  296. if ((this.username && this.password && this.imgcode) || (this.phone && this.checknum)) {
  297. this.disabled = false;
  298. return;
  299. }
  300. this.disabled = true;
  301. },
  302. // 获取验证码
  303. async getCheckNum() {
  304. uni.hideKeyboard();
  305. if (this.codetime > 0) return;
  306. // 验证手机号合法性
  307. if (!this.phone) {
  308. return uni.showToast({
  309. title: '请输入手机号',
  310. icon: 'none'
  311. });
  312. }
  313. if (!this.$base.phoneRegular.test(this.phone)) {
  314. return uni.showToast({
  315. title: '请输入正确的手机号码',
  316. icon: 'none'
  317. });
  318. }
  319. // 请求服务器,发送验证码
  320. let res = await this.$http.get('/sendMsg', {
  321. phone: this.phone,
  322. type: "0"
  323. });
  324. // 请求失败处理
  325. if (res.code != 200) {
  326. return uni.showToast({
  327. title: res.data.msg,
  328. icon: "none"
  329. });
  330. } else {
  331. uni.showToast({
  332. title: "发送成功",
  333. icon: "none"
  334. });
  335. }
  336. // 发送成功,开启倒计时
  337. this.codetime = 60;
  338. let timer = setInterval(() => {
  339. this.codetime--;
  340. if (this.codetime < 1) {
  341. clearInterval(timer);
  342. this.codetime = 0;
  343. }
  344. }, 1000);
  345. },
  346. //#ifdef APP-PLUS
  347. quxiao() {
  348. this.show = false;
  349. this.$login({
  350. url: "/login2",
  351. data: {
  352. account: this.username,
  353. password: this.password,
  354. captcha: this.imgcode.toLowerCase(),
  355. captchaId: this.captchaId,
  356. }
  357. }).then(res => {
  358. if (res) {
  359. return uni.showToast({
  360. title: res.msg,
  361. icon: 'none'
  362. });
  363. } else {
  364. socket.init();
  365. }
  366. })
  367. },
  368. queren() {
  369. this.show = false;
  370. this.$login({
  371. url: "/login2",
  372. data: {
  373. account: this.username,
  374. password: this.password,
  375. captcha: this.imgcode.toLowerCase(),
  376. captchaId: this.captchaId,
  377. }
  378. }).then(async res => {
  379. if (res) {
  380. return uni.showToast({
  381. title: res.msg,
  382. icon: 'none'
  383. });
  384. } else {
  385. this.deleteTableData();
  386. this.openSQL();
  387. this.createTable(); //创建表
  388. this.insertTableData(this.username, this.password); //新增表数据
  389. socket.init();
  390. }
  391. })
  392. },
  393. //#endif
  394. // 提交登录
  395. submit() {
  396. if (!this.checked) {
  397. return this.$refs.uToast.show({
  398. title: '请阅读后勾选并同意《平台协议》及《隐私协议》政策',
  399. type: 'default',
  400. })
  401. }
  402. // // 账号密码登录
  403. uni.hideKeyboard();
  404. if (this.current == 0) {
  405. //#ifdef H5
  406. this.$login({
  407. url: "/login2",
  408. data: {
  409. account: this.username,
  410. password: this.password,
  411. captcha: this.imgcode.toLowerCase(),
  412. captchaId: this.captchaId,
  413. }
  414. }).then(res => {
  415. if (res) {
  416. return uni.showToast({
  417. title: res.msg,
  418. icon: 'none'
  419. });
  420. } else {
  421. socket.init();
  422. }
  423. })
  424. // }
  425. //#endif
  426. //#ifdef APP-PLUS
  427. if (this.listData.length > 0) {
  428. this.listData.map(ele => {
  429. if (this.username == ele.username && this.password == ele.password) {
  430. this.$login({
  431. url: "/login2",
  432. data: {
  433. account: this.username,
  434. password: this.password,
  435. captcha: this.imgcode.toLowerCase(),
  436. captchaId: this.captchaId,
  437. }
  438. }).then(res => {
  439. if (res) {
  440. return uni.showToast({
  441. title: res.msg,
  442. icon: 'none'
  443. });
  444. } else {
  445. socket.init();
  446. }
  447. })
  448. } else {
  449. this.show = true;
  450. }
  451. })
  452. } else {
  453. this.$login({
  454. url: "/login2",
  455. data: {
  456. account: this.username,
  457. password: this.password,
  458. captcha: this.imgcode.toLowerCase(),
  459. captchaId: this.captchaId,
  460. }
  461. }).then(res => {
  462. if (res) {
  463. return uni.showToast({
  464. title: res.msg,
  465. icon: 'none'
  466. });
  467. } else {
  468. this.openSQL(); //打开数据库
  469. this.createTable(); //创建表
  470. this.insertTableData(this.username, this.password); //新增表数据
  471. socket.init();
  472. }
  473. })
  474. }
  475. //#endif
  476. } else {
  477. // 验证码登录
  478. // 验证手机号合法性
  479. if (!this.$base.phoneRegular.test(this.phone)) {
  480. return uni.showToast({
  481. title: '请输入正确的手机号码',
  482. icon: 'none'
  483. });
  484. }
  485. this.$login({
  486. url: "/loginByPhone",
  487. data: {
  488. phone: this.phone,
  489. phoneMsg: this.checknum
  490. }
  491. }).then(res => {
  492. if (res) {
  493. return uni.showToast({
  494. title: res.msg,
  495. icon: 'none'
  496. });
  497. }
  498. // socket.init();
  499. return;
  500. })
  501. }
  502. },
  503. // 微信APP登录
  504. onWxAppLogin() {
  505. var that = this;
  506. uni.login({
  507. provider: 'weixin',
  508. onlyAuthorize: true,
  509. success: function(loginRes) {
  510. that.codeRes(loginRes.code);
  511. },
  512. fail: (err) => {
  513. uni.showToast({
  514. title: '绑定失败',
  515. icon: "none"
  516. });
  517. console.log('login fail:', err);
  518. }
  519. });
  520. },
  521. onzfbAppLogin() {
  522. let urls =
  523. 'https://openauth.alipay.com/oauth2/publicAppAuthorize.htm?app_id=2021004153668213&scope=auth_user&redirect_uri=https://test.baoxianzhanggui.com/pay/';
  524. urls = encodeURIComponent(urls); //将地址编码成浏览器访问的格式
  525. plus.runtime.openURL(
  526. 'alipays://platformapi/startapp?appId=20000067&url=' + urls,
  527. res => {
  528. //这里写打开URL地址失败后的处理0
  529. uni.showModal({
  530. content: '本机未检测到对应客户端,是否打开浏览器访问页面?',
  531. success: function(res) {
  532. if (res.confirm) {
  533. //plus.runtime.openURL();
  534. }
  535. }
  536. });
  537. },
  538. 'com.eg.android.AlipayGphone'
  539. );
  540. },
  541. codeRes(code) {
  542. this.$login({
  543. url: "/wechat/login",
  544. data: {
  545. code: code,
  546. }
  547. }).then(res => {
  548. return uni.showToast({
  549. title: res.msg,
  550. icon: 'none'
  551. });
  552. socket.init();
  553. return;
  554. })
  555. },
  556. // 打开数据库
  557. openSQL() {
  558. // 这个是查询有没有打开数据库
  559. let open = DB.isOpen();
  560. DB.openSqlite()
  561. .then(res => {})
  562. .catch(error => {});
  563. },
  564. // 关闭数据库
  565. closeSQL() {
  566. // 这个是查询有没有打开数据库
  567. let open = DB.isOpen();
  568. if (open) {
  569. DB.closeSqlite()
  570. .then(res => {
  571. // this.showToast("数据库已关闭");
  572. })
  573. .catch(error => {
  574. // this.showToast("数据库关闭失败");
  575. });
  576. }
  577. },
  578. // 创建表
  579. createTable() {
  580. let open = DB.isOpen();
  581. if (open) {
  582. this.openSQL();
  583. let sql =
  584. '"id" INTEGER PRIMARY KEY AUTOINCREMENT,"username" text,"password" text,"time" text';
  585. // 创建表 DB.createTable(表名, 表的列)
  586. DB.createTable("chat", sql)
  587. .then(res => {
  588. // this.showToast("创建chat表成功");
  589. })
  590. .catch(error => {});
  591. } else {}
  592. },
  593. // 新增表数据
  594. insertTableData(user, word) {
  595. let open = DB.isOpen();
  596. if (open) {
  597. let arr = [{
  598. username: user,
  599. password: word,
  600. }]
  601. arr.map(item => {
  602. let time = this.formatDate(new Date().getTime());
  603. let sql =
  604. `'${item.username}','${item.password}','${time}'`;
  605. let condition = "'username','password','time'";
  606. // 新增 DB.insertTableData(表名, 对应表头列的数据)
  607. DB.insertTableData("chat", sql, condition)
  608. .then(res => {
  609. this.selectTableData();
  610. })
  611. .catch(error => {});
  612. })
  613. } else {}
  614. },
  615. // 查询表数据
  616. selectTableData() {
  617. let open = DB.isOpen();
  618. if (open) {
  619. // 查询表 DB.selectTableData(表名,查询条件列名,查询条件列值)
  620. DB.selectTableData("chat")
  621. .then(res => {
  622. console.log("contact表数据", res);
  623. this.listData = res;
  624. this.username = res[0].username;
  625. this.password = res[0].password;
  626. })
  627. .catch(error => {});
  628. } else {}
  629. },
  630. // 修改表数据
  631. updateTableData() {
  632. let open = DB.isOpen();
  633. if (open) {
  634. let time = this.formatDate(new Date().getTime());
  635. let data =
  636. `username ='${this.username}',password ='${this.password}'`;
  637. // 修改表数据 DB.updateTableData(表名, 要修改的列名=修改后列值, 修改条件的列名, 修改条件的列值)
  638. DB.updateTableData("chat", data)
  639. .then(res => {
  640. console.log('修改后的数据', res)
  641. this.showToast("保存成功");
  642. this.selectTableData();
  643. })
  644. .catch(error => {
  645. console.log(error)
  646. });
  647. } else {}
  648. },
  649. // 删除表
  650. deleteTableData() {
  651. let open = DB.isOpen();
  652. if (open) {
  653. // 删除表 DB.deleteTableData(表名,查询条件列名,查询条件列值)
  654. DB.dropTable("chat")
  655. .then(res => {})
  656. .catch(error => {});
  657. } else {}
  658. },
  659. // 提示框
  660. showToast: function(str) {
  661. uni.showToast({
  662. icon: "none",
  663. title: str,
  664. mask: true
  665. });
  666. },
  667. // 时间戳转年月日
  668. formatDate(data) {
  669. let now = new Date(data);
  670. var year = now.getFullYear(); //取得4位数的年份
  671. var month =
  672. now.getMonth() + 1 < 10 ?
  673. "0" + (now.getMonth() + 1) :
  674. now.getMonth() + 1;
  675. var date = now.getDate() < 10 ? "0" + now.getDate() : now.getDate();
  676. var hour = now.getHours() < 10 ? "0" + now.getHours() : now.getHours();
  677. var minute =
  678. now.getMinutes() < 10 ? "0" + now.getMinutes() : now.getMinutes();
  679. var second =
  680. now.getSeconds() < 10 ? "0" + now.getSeconds() : now.getSeconds();
  681. return (
  682. year +
  683. "-" +
  684. month +
  685. "-" +
  686. date +
  687. " " +
  688. hour +
  689. ":" +
  690. minute +
  691. ":" +
  692. second
  693. );
  694. }
  695. },
  696. //页面隐藏
  697. onHide() {},
  698. //页面卸载
  699. onUnload() {},
  700. //页面下来刷新
  701. onPullDownRefresh() {},
  702. //页面上拉触底
  703. onReachBottom() {},
  704. };
  705. </script>
  706. <style lang="scss" scoped>
  707. /deep/ {
  708. .u-tab-bar {
  709. background: linear-gradient(90deg, #0052FF 0%, rgba(0, 82, 255, 0) 100%) !important;
  710. border-radius: 4px 4px 4px 4px;
  711. }
  712. }
  713. .shu1 {
  714. display: flex;
  715. flex-direction: column;
  716. justify-content: space-between;
  717. align-items: center;
  718. }
  719. .shili_btn {
  720. width: 100%;
  721. height: 90rpx;
  722. border-top: 2rpx solid #F2F2F2;
  723. }
  724. .shili_btn>view {
  725. width: 50%;
  726. height: 100%;
  727. background-color: #ffffff;
  728. cursor: pointer;
  729. }
  730. .shili_btn>view:nth-child(2) {
  731. color: #FFFFFF;
  732. background-color: #007BFF;
  733. }
  734. .shili>text:nth-child(1) {
  735. font-weight: bold;
  736. }
  737. .shili {
  738. padding: 40rpx;
  739. box-sizing: border-box;
  740. }
  741. .heng {
  742. display: flex;
  743. justify-content: space-between;
  744. align-items: center;
  745. }
  746. .heng1 {
  747. display: flex;
  748. justify-content: center;
  749. align-items: center;
  750. }
  751. /* 第三方登录Start */
  752. .third_party_login_box {
  753. position: fixed;
  754. bottom: 50rpx;
  755. left: 0;
  756. right: 0;
  757. height: 170rpx;
  758. padding: 0 30rpx;
  759. }
  760. .third_party_login_box .third_party_title {
  761. display: flex;
  762. align-items: center;
  763. }
  764. .third_party_login_box .third_party_title:before,
  765. .third_party_login_box .third_party_title:after {
  766. content: "";
  767. flex: 1;
  768. height: 2rpx;
  769. background-color: #f5f5f5;
  770. }
  771. .third_party_login_box .third_party_title text {
  772. font-size: 24rpx;
  773. color: #999999;
  774. flex-shrink: 0;
  775. padding: 0 20rpx;
  776. }
  777. .third_party_login_box .third_party_content {
  778. height: 140rpx;
  779. display: flex;
  780. justify-content: center;
  781. align-items: center;
  782. }
  783. .third_party_login_box .third_party_content image {
  784. margin: 0rpx 20rpx;
  785. width: 80rpx;
  786. height: 80rpx;
  787. }
  788. /* 第三方登录End */
  789. .yanzhengmaView1 {
  790. background: #FFFFFF;
  791. border-radius: 10rpx;
  792. width: 150rpx;
  793. padding: 5rpx 0;
  794. }
  795. .yanzhengmaView2 {
  796. background: #FFFFFF;
  797. border-radius: 10rpx;
  798. width: 220rpx;
  799. padding: 5rpx 0;
  800. }
  801. .bg-color {
  802. background-color: #0052FF;
  803. border-radius: 20px;
  804. }
  805. .bg-hover-color {
  806. background-color: #0052FF;
  807. opacity: 0.65;
  808. border-radius: 20px;
  809. }
  810. .text-color {
  811. color: #0052FF;
  812. }
  813. </style>