index.vue 3.5 KB

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