launch.vue 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257
  1. <template>
  2. <view class="content">
  3. <image src="../../static/img/banner1.png" mode="widthFix" />
  4. <view class="img-skip" @tap="goindex()" v-if="showtime">
  5. 跳过{{time}}
  6. </view>
  7. <view class="modalhtml" v-if="showModal">
  8. <!-- <view class="modalhtml"> -->
  9. <view class="modal">
  10. <view class="title">
  11. 个人信息保护指南
  12. </view>
  13. <view class="content">
  14. 请充分阅读并理解<br> 《<view class="rule" @tap="go_rule(0)">用户协议</view>》及《<view class="rule"
  15. @tap="go_rule(1)">隐私条款</view>》<br>
  16. <view>
  17. 1.在您使用本应用时,我们可能会申请系统设备权限收集设备信息、日志信息,用于推送和安全风控,并申请存储权限,用于下载及缓存相关文件<br>
  18. 2.您使用发布视频、语音、图片等功能时候,我们会请求您授权相机、照片、麦克风的权限。您如果拒绝授权提供,将无法使用此功能,但不影响您使用本应用的其他功能。 <br>
  19. 3.在您使用本应用网络服务,本应用自动接收并记录您的设备信息,包括但不限于您的IP地址、使用的语言、访问日期和时间、软硬件特征信息等数据;
  20. </view>
  21. </view>
  22. <view class="btns" style="display: flex;">
  23. <view class="" @tap="jujue()">
  24. 不同意
  25. </view>
  26. <view class="" @tap="readrule()">
  27. 同意并继续
  28. </view>
  29. </view>
  30. </view>
  31. </view>
  32. </view>
  33. </template>
  34. <script>
  35. export default {
  36. data(){
  37. return {
  38. time:5,
  39. timer:null,
  40. showtime:false,
  41. showModal: false,
  42. }
  43. },
  44. methods: {
  45. readrule() {
  46. try{
  47. uni.setStorageSync('readrule', 1);
  48. this.showModal = false;
  49. this.goindex()
  50. }catch(e){
  51. console.log(e,'eeee');
  52. }
  53. },
  54. go_rule(type) {
  55. console.log(type)
  56. uni.navigateTo({
  57. url: '/pages/login/rule?type=' + type
  58. })
  59. },
  60. jujue() {
  61. if (uni.getSystemInfoSync().platform === 'ios') {
  62. plus.runtime.launchApplication({ action: 'QUIT' });
  63. }else {
  64. plus.runtime.quit();
  65. }
  66. },
  67. daojishi(){
  68. var that=this
  69. this.timer= setInterval(function(){
  70. that.time--;
  71. if(that.time<=0){
  72. clearInterval(that.timer);
  73. // that.goindex();
  74. }
  75. },1000)
  76. } ,
  77. goindex(){
  78. clearInterval(this.timer);
  79. var userid=uni.getStorageSync('access_token');
  80. if(userid>0){
  81. uni.reLaunch({
  82. url:'/pages/index/index'
  83. })
  84. }
  85. else{
  86. uni.reLaunch({
  87. url:'/pages/login/index'
  88. })
  89. }
  90. }
  91. },
  92. onLoad() {
  93. // #ifdef APP-PLUS
  94. this.$action.bindcid();
  95. if (!uni.getStorageSync('readrule')) {
  96. this.showModal = true;
  97. }else {
  98. // uni.removeStorageSync('readrule')
  99. this.goindex()
  100. }
  101. console.log(this.showModal,'this.showModal');
  102. // #endif
  103. // #ifdef H5
  104. this.goindex()
  105. // #endif
  106. },
  107. onShow() {
  108. this.$action.init();
  109. // this.goindex();
  110. // // #ifdef APP-PLUS
  111. // var that=this;
  112. // plus.runtime.getProperty(plus.runtime.appid, function(info) {
  113. // if(uni.getStorageSync('app_version')==info.version){
  114. // that.goindex();
  115. // }else{
  116. // that.showtime=true;
  117. // that.daojishi();
  118. // uni.setStorageSync('app_version', info.version);
  119. // if( uni.getStorageSync('access_token')){
  120. // uni.setStorageSync('shownote',true);
  121. // }
  122. // }
  123. // });
  124. // // #endif
  125. // // #ifndef APP-PLUS
  126. // this.goindex()
  127. // // #endif
  128. },
  129. }
  130. </script>
  131. <style lang="scss" scoped>
  132. @import '../../static/css/uni.css';
  133. .rule {
  134. color: #2da2fd;
  135. display: inline-block;
  136. }
  137. .img-skip{
  138. position: absolute;
  139. width: 60px;
  140. height: 30px;
  141. padding: 5px 5px;
  142. background-color: rgba(0,0,0,0.6);
  143. color:#fff;
  144. border-radius:5px;
  145. z-index: 100;
  146. top:30px;
  147. right: 10px;;
  148. text-align: center;
  149. line-height: 30px;
  150. font-size: 14px;
  151. }
  152. .img-skip > .title {
  153. color: #666;
  154. height: 18px;
  155. }
  156. .img-skip > .title2{
  157. color: #999;
  158. height: 18px;
  159. }
  160. .content,,image {
  161. overflow: hidden;
  162. width: 100vw;
  163. vertical-align: middle;
  164. }
  165. .modalhtml {
  166. position: fixed;
  167. z-index: 999;
  168. top: 0px;
  169. width: 100%;
  170. left: 0px;
  171. height: 100vh;
  172. background-color: rgba(0, 0, 0, 0.7);
  173. }
  174. .modalhtml .modal {
  175. background-color: #fff;
  176. border-radius: 10px;
  177. ;
  178. top: 30vh;
  179. width: 80vw;
  180. left: 10vw;
  181. position: fixed;
  182. border: 1px #ddd solid;
  183. }
  184. .modalhtml .modal .title {
  185. text-align: center;
  186. height: 35px;
  187. line-height: 35px;
  188. color: #000;
  189. font-size: 16px;
  190. font-weight: 600;
  191. margin-top: 5px;
  192. }
  193. .modalhtml .modal .content {
  194. padding: 5px 10px;
  195. max-height: 160px;
  196. min-height: 65px;
  197. line-height: 30px;
  198. overflow-y: scroll;
  199. font-size: 14px;
  200. // color: red;
  201. width: 90%;
  202. }
  203. .modalhtml .modal .btns {
  204. text-align: center;
  205. height: 35px;
  206. line-height: 35px;
  207. color: #000;
  208. font-size: 16px;
  209. font-weight: 600;
  210. border-top: #eee 1px solid;
  211. width: 100%;
  212. view {
  213. flex-grow: 1;
  214. width: 50%;
  215. }
  216. }
  217. .notehtml {
  218. position: fixed;
  219. z-index: 999;
  220. top: 0px;
  221. width: 100%;
  222. left: 0px;
  223. height: 100vh;
  224. background-color: rgba(0, 0, 0, 0.7);
  225. }
  226. </style>