index.vue 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146
  1. <template>
  2. <view class="flex-common-css">
  3. <Nav :leftShow='false' :customNav='true' title="" bgckgroundBox='rgba(51,51,51,0.6)'></Nav>
  4. <view class="bgc-3-6 flex-1 flex-direction authorization iPhone-bottom">
  5. <view
  6. class="authorization-box flex-direction flex-justify-end bgc-f b-rad-20-20-0-0 p-40-32 box-border-box">
  7. <view class="text-align-center fs-36 fc-3 mb-30 fw-500">
  8. 服务协议与隱私政策概
  9. </view>
  10. <view class="authorization-text mb-24 fs-28 fc-6">
  11. 感谢您使用喜茶小程序。我们非常重视您的个人信息和隐私保护,我们深知个人信息对您的重要性,因此,我们将竭尽全力保障您的隐私信息安全。我们承诺,未经您的同意,不会从第三方获取,共享或向第三方提供您的隐私信息。我们致力于维护您对我们的信任,将按业界成熟的安全标准,采取各种安全保护措施及配套的管理体制来保护您的个人信息。所提供的产品及服务分为基础业务和拓展业务。我们产品及服务中关于点单、外卖配送的功能为基础业务,即通过喜茶GO
  12. App或小程序完成点 二、我们产品或服务中一部分的拓展业务是基于手机账号实现.当您使用点单、外卖基础业务及除点单、外卖以外的坏屏防能叶面西林但你的垣和土林收佳个人信自
  13. </view>
  14. <view class="but-box mb-8 ptb-22 text-align-center but-c fs-32 fc-f b-rad-200" @click="login">
  15. 同意
  16. </view>
  17. <view class="but-box ptb-22 text-align-center fs-32 fc-6" @click="refuse">
  18. 不同意
  19. </view>
  20. </view>
  21. </view>
  22. </view>
  23. </template>
  24. <script>
  25. import tools from "@/service/tools";
  26. import {
  27. appletLogin
  28. } from "@/api/member";
  29. export default {
  30. data() {
  31. return {
  32. isFlag: false,
  33. isAjax: false,
  34. from: {
  35. code: "",
  36. system_type: '',
  37. phone: '',
  38. sms_code: '',
  39. invite_code: ''
  40. },
  41. isCode: false,
  42. codeText: '获取验证码',
  43. codeNUm: 0,
  44. isPop: false,
  45. html: '',
  46. agreementData: []
  47. };
  48. },
  49. onShow() {},
  50. onLoad(data) {
  51. console.log('00000');
  52. uni.setStorageSync('shop_id', 111)
  53. uni.setStorageSync('table_number', 1)
  54. this.firstLogin()
  55. },
  56. mounted() {},
  57. methods: {
  58. firstLogin() {
  59. tools.showLoading()
  60. uni.login({
  61. provider: "weixin",
  62. success: (loginRes) => {
  63. this.appletLogin(loginRes.code);
  64. },
  65. fail: (loginRes) => {
  66. this.isAjax = false;
  67. tools.error("获取授权信息失败");
  68. },
  69. });
  70. },
  71. appletLogin(code) {
  72. appletLogin({
  73. 'code': code
  74. }).then(res => {
  75. if (res.code === 1) {
  76. uni.setStorageSync('token', res.data.token)
  77. uni.setStorageSync('m_id', res.data.m_id)
  78. tools.hideLoading()
  79. // this.goToUrl()
  80. }
  81. })
  82. },
  83. refuse() {
  84. // #ifdef MP-WEIXIN
  85. // 微信小程序平台
  86. wx.exitMiniProgram({
  87. success: (res) => {}
  88. });
  89. // #endif
  90. // #ifdef MP-ALIPAY
  91. // 支付宝小程序
  92. my.exitMiniProgram({
  93. success: (res) => {}
  94. });
  95. // #endif
  96. },
  97. login() {
  98. // uni.setStorageSync('token', 165165165156)
  99. // uni.setStorageSync('m_id', 88)
  100. // uni.reLaunch({
  101. // url: "/pages/index/index",
  102. // });
  103. // return
  104. console.log('11111111111111');
  105. if (this.isAjax) {
  106. return false;
  107. }
  108. this.isAjax = false;
  109. uni.reLaunch({
  110. url: "/pages/index/index",
  111. });
  112. }
  113. },
  114. };
  115. </script>
  116. <style scoped lang="scss">
  117. .authorization {
  118. position: relative;
  119. }
  120. .authorization-box {
  121. width: 100%;
  122. height: auto;
  123. max-height: 69%;
  124. position: absolute;
  125. left: 0;
  126. bottom: 0;
  127. }
  128. .authorization-text {
  129. width: 100%;
  130. max-height: 62%;
  131. overflow: auto;
  132. }
  133. .but-box {
  134. width: 100%;
  135. }
  136. .but-c {
  137. background: linear-gradient(270deg, #FF3333 0%, #FE6122 100%);
  138. }
  139. </style>