index.vue 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  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. onLoad(data) {
  50. uni.setStorageSync('shop_id', 111)
  51. uni.setStorageSync('table_number', 1)
  52. this.authorizationLogin()
  53. },
  54. mounted() {},
  55. methods: {
  56. authorizationLogin() {
  57. tools.showLoading()
  58. uni.login({
  59. provider: "weixin",
  60. success: (loginRes) => {
  61. this.appletLogin(loginRes.code);
  62. },
  63. fail: (loginRes) => {
  64. this.isAjax = false;
  65. tools.error("获取授权信息失败");
  66. },
  67. });
  68. },
  69. appletLogin(code) {
  70. appletLogin({
  71. 'code': code
  72. }).then(res => {
  73. if (res.code === 1) {
  74. tools.hideLoading()
  75. uni.setStorageSync('token', res.data.token)
  76. uni.setStorageSync('m_id', res.data.m_id)
  77. // this.goToUrl()
  78. }
  79. })
  80. },
  81. refuse() {
  82. // #ifdef MP-WEIXIN
  83. // 微信小程序平台
  84. wx.exitMiniProgram({
  85. success: (res) => {}
  86. });
  87. // #endif
  88. // #ifdef MP-ALIPAY
  89. // 支付宝小程序
  90. my.exitMiniProgram({
  91. success: (res) => {}
  92. });
  93. // #endif
  94. },
  95. login() {
  96. // uni.setStorageSync('token', 165165165156)
  97. // uni.setStorageSync('m_id', 88)
  98. // uni.reLaunch({
  99. // url: "/pages/index/index",
  100. // });
  101. // return
  102. if (this.isAjax) {
  103. return false;
  104. }
  105. this.isAjax = false;
  106. uni.reLaunch({
  107. url: "/pages/index/index",
  108. });
  109. }
  110. },
  111. };
  112. </script>
  113. <style scoped lang="scss">
  114. .authorization {
  115. position: relative;
  116. }
  117. .authorization-box {
  118. width: 100%;
  119. height: auto;
  120. max-height: 69%;
  121. position: absolute;
  122. left: 0;
  123. bottom: 0;
  124. }
  125. .authorization-text {
  126. width: 100%;
  127. max-height: 62%;
  128. overflow: auto;
  129. }
  130. .but-box {
  131. width: 100%;
  132. }
  133. .but-c {
  134. background: linear-gradient(270deg, #FF3333 0%, #FE6122 100%);
  135. }
  136. </style>