yong.vue 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159
  1. <template>
  2. <view class="page">
  3. <!-- <view class="code">
  4. <image src="../../static/code.png" mode=""></image>
  5. <text>扫描二维码,您的朋友也可以使用或下载哦~</text>
  6. </view> -->
  7. <view class="xy-list">
  8. <view class="list">
  9. <view class="title"></view>
  10. <view class="content">
  11. <text>
  12. 防沉迷 安全呵护成长
  13. 1.默认每天最多使用时长为40分钟
  14. 2.每日晚上22时至次日上午6时,期间无法使用“本萌创星球”本APP应用
  15. 3.进入青少年模式,需要进行实名认证,认证通过后,若年龄低于18周岁则自
  16. 动进入青少年模式
  17. 4.目前仅支持通过二代身份证认证
  18. 5.若您是未成年人,请先通过您的监护人提供并确认同意收集您的实名信息
  19. </text>
  20. </view>
  21. </view>
  22. </view>
  23. <view class="btn" v-if="showYongMode">您已进入青少年模式</view>
  24. <view class="btn" @click="onGoGoGo()" v-if="showYong">进入青少年模式</view>
  25. <DialogBox ref="DialogBox"></DialogBox>
  26. </view>
  27. </template>
  28. <script>
  29. export default {
  30. data() {
  31. return {
  32. showYong: false,
  33. showYongMode: false,
  34. myinfo: {}
  35. };
  36. },
  37. onLoad() {},
  38. onShow() {
  39. this.loadInfo();
  40. },
  41. methods: {
  42. onBack() {},
  43. loadInfo() {
  44. let that = this;
  45. uni.request({
  46. url: this.$apiHost + '/My/idcheck',
  47. data: {
  48. uuid: getApp().globalData.uuid
  49. },
  50. header: {
  51. "content-type": "application/json",
  52. 'sign': getApp().globalData.headerSign
  53. },
  54. success: (res) => {
  55. console.log("----:", res.data);
  56. that.myinfo = res.data;
  57. if (that.myinfo.step < 9) {
  58. that.showYong = true;
  59. } else {
  60. that.showYong = false;
  61. if (res.data.age < 18) {
  62. that.showYongMode = true;
  63. }
  64. }
  65. },
  66. complete: (com) => {
  67. // uni.hideLoading();
  68. },
  69. fail: (e) => {
  70. console.log("----e:", e);
  71. }
  72. });
  73. },
  74. onGoGoGo() {
  75. let that = this;
  76. that.$refs['DialogBox'].confirm({
  77. title: '提示',
  78. content: '您还没有实名,请先去实名认证',
  79. DialogType: 'inquiry',
  80. btn1: '否',
  81. btn2: '是',
  82. animation: 0
  83. }).then((res) => {
  84. uni.navigateTo({
  85. url: '/pages/my/idcheck'
  86. })
  87. })
  88. }
  89. }
  90. }
  91. </script>
  92. <style scoped lang="scss">
  93. page {
  94. position: absolute;
  95. left: 0;
  96. top: 0;
  97. width: 100%;
  98. height: 100%;
  99. background-color: #fff;
  100. }
  101. .xy-list {
  102. padding: 0 4%;
  103. border-radius: 20rpx;
  104. margin: 20rpx auto;
  105. .list {
  106. display: flex;
  107. align-items: flex-start;
  108. justify-content: space-between;
  109. flex-direction: column;
  110. width: 100%;
  111. padding-bottom: 20rpx;
  112. padding-top: 10rpx;
  113. .title {
  114. color: #333;
  115. width: 100%;
  116. text-align: center;
  117. }
  118. .content {
  119. display: flex;
  120. align-items: center;
  121. padding-left: 20rpx;
  122. color: #333;
  123. text {
  124. font-size: 26rpx;
  125. line-height: 42rpx;
  126. }
  127. }
  128. }
  129. }
  130. .btn {
  131. position: fixed;
  132. bottom: 80rpx;
  133. left: 200rpx;
  134. width: 350rpx;
  135. height: 70rpx;
  136. background-color: #f0f0f0;
  137. border-radius: 70rpx;
  138. text-align: center;
  139. line-height: 70rpx;
  140. }
  141. </style>