login.vue 21 KB

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