protocal.vue 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. <template>
  2. <view class="page-protocal">
  3. <view class="logs">
  4. <view class="and-home">
  5. <image src="/static/images/log2.png" mode="heightFix" class="img"></image>
  6. </view>
  7. <view class="log">
  8. <image src="/static/images/log1.png" mode="heightFix" class="img"></image>
  9. </view>
  10. </view>
  11. <uni-popup ref="popProtocal" :is-mask-click="false" mask-background-color="rgba(0,0,0,0)">
  12. <view class="protocal-content">
  13. <view class="title">服务协议与隐私政策</view>
  14. <view class="content">
  15. <view class="pro">
  16. <rich-text :nodes="info"></rich-text>
  17. </view>
  18. </view>
  19. <view class="btns">
  20. <view class="btn"><button class="btn-disagree" @click="disagree">不同意</button></view>
  21. <view class="btn" v-if="delay>0"><button class="btn-agree">({{delay}})同意</button></view>
  22. <view class="btn" v-else><button class="btn-agree1" @click="onAgree">同意</button></view>
  23. </view>
  24. </view>
  25. </uni-popup>
  26. </view>
  27. </template>
  28. <script>
  29. export default {
  30. data() {
  31. return {
  32. info:null,
  33. delay:6,
  34. timer:null,
  35. };
  36. },
  37. onReady() {
  38. this.$refs.popProtocal.open("bottom");
  39. this.initProtocal();
  40. this.delay=3;
  41. this.timer=setInterval(()=>{
  42. this.delay--;
  43. if(this.delay<=0){
  44. clearInterval(this.timer);
  45. }
  46. },1000);
  47. },
  48. methods:{
  49. disagree(e){
  50. this.$refs.popProtocal.close();
  51. },
  52. onAgree(e){
  53. uni.setStorageSync("protocal",true);
  54. uni.switchTab({
  55. url:'/pages/theater/index/index'
  56. })
  57. },
  58. initProtocal(e){
  59. let _this=this;
  60. _this.$http.request('system/protocal', {
  61. }, "", "", true).then(res => {
  62. _this.info=res.data.info;
  63. }).catch(err => {})
  64. },
  65. }
  66. }
  67. </script>
  68. <style lang="scss">
  69. @import './protocal.scss'
  70. </style>