read.vue 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323
  1. <template>
  2. <view class="container">
  3. <!-- 标题区域 -->
  4. <view class="title">
  5. <view class="">新生报到安全须知</view>
  6. <view class="">请仔细阅读以下内容,确保平安顺利报到</view>
  7. </view>
  8. <!-- 内容区域 -->
  9. <view class="body">
  10. <view class="body_title">
  11. <view class="title_dot"></view>
  12. <view class="title_text">来校前准备</view>
  13. </view>
  14. <view class="prepare_box">
  15. <view class="box_title">形成规划</view>
  16. <view class="box_text">选择正规交通工具,避开深夜抵达车次,严禁乘坐"黑车"或私下拼车</view>
  17. </view>
  18. <view class="prepare_box">
  19. <view class="box_title">报到准备</view>
  20. <view class="box_text">提前完成线上流程:信息填报 → 缴费认证 → 宿舍选择 → 车牌预约</view>
  21. </view>
  22. <view class="prepare_box">
  23. <view class="box_title">物品保管</view>
  24. <view class="box_text">重要证件单独存放,行李标注姓名电话,随身现金不超过500元</view>
  25. </view>
  26. <view class="body_title">
  27. <view class="title_dot"></view>
  28. <view class="title_text">到校途中安全</view>
  29. </view>
  30. <view class="safe_box">
  31. <view class="box_top">
  32. <image class="top_img" src="/static/1.png" mode="aspectFill"></image>
  33. <view class="top_text">交通风险</view>
  34. </view>
  35. <view class="box_bottom">遵守交规,避开车辆盲区,不追逐打闹</view>
  36. </view>
  37. <view class="safe_box">
  38. <view class="box_top">
  39. <image class="top_img" src="/static/1.png" mode="aspectFill"></image>
  40. <view class="top_text">诈骗风险</view>
  41. </view>
  42. <view class="box_bottom">警惕"代缴学费"电话,不扫陌生二维码</view>
  43. </view>
  44. <view class="safe_box">
  45. <view class="box_top">
  46. <image class="top_img" src="/static/1.png" mode="aspectFill"></image>
  47. <view class="top_text">盗窃风险</view>
  48. </view>
  49. <view class="box_bottom">背包前置,手机握持,休息时固定行李</view>
  50. </view>
  51. <view class="body_title">
  52. <view class="title_dot"></view>
  53. <view class="title_text">紧急情况处理</view>
  54. </view>
  55. <view class="instancy_box">
  56. <view class="box_item">
  57. <view class="item_title">物品遗失</view>
  58. <view class="item_text">联系车站广播/警方(110)</view>
  59. </view>
  60. <view class="box_item">
  61. <view class="item_title">遭遇诈骗</view>
  62. <view class="item_text">校保卫处: 020-12345678</view>
  63. </view>
  64. <view class="box_item">
  65. <view class="item_title">身体不适</view>
  66. <view class="item_text">途中: 求助乘务员/拨打120</view>
  67. </view>
  68. <view class="box_item">
  69. <view class="item_title">校内急诊</view>
  70. <view class="item_text">校医院: 第一教学楼东侧</view>
  71. </view>
  72. </view>
  73. <view class="body_title">
  74. <view class="title_dot"></view>
  75. <view class="title_text">重要安全提醒</view>
  76. </view>
  77. <view class="import_box">
  78. <view class="">1. 所有缴费仅通过学校官方平台操作</view>
  79. <view class="">2. 宿舍分配以"我的报到单"为准</view>
  80. <image class="box_img" src="/static/2.png" mode="aspectFill"></image>
  81. </view>
  82. <!-- <uv-parse :content="safetyNotice"></uv-parse> -->
  83. <!-- 安全须知勾选区域 -->
  84. <view class="check">
  85. <checkbox :checked="isCheck" @click="handleCheck" />
  86. 我已阅读并理解以上安全须知
  87. </view>
  88. <!-- 下一步按钮区域 -->
  89. <view class="btn" :class="{ active: isCheck }" @click="handleNext">下一步</view>
  90. </view>
  91. </view>
  92. </template>
  93. <script setup>
  94. import { onLoad } from '@dcloudio/uni-app'
  95. import { ref } from 'vue'
  96. import { getInfoByTokenReq, getSettingsInfoReq } from '@/api/index.js'
  97. // 是否勾选安全须知
  98. const isCheck = ref(false)
  99. // 安全须知内容
  100. const safetyNotice = ref()
  101. onLoad(() => {
  102. // 获取用户信息
  103. getInfoByToken()
  104. // 获取设置数据
  105. getSettingsInfo()
  106. })
  107. // 获取用户信息
  108. const getInfoByToken = async () => {
  109. const res = await getInfoByTokenReq()
  110. // console.log(res)
  111. if (res.code == 200) {
  112. uni.setStorageSync('studentInfo', res.data)
  113. // uni.setStorageSync('TOKEN', res.data.token)
  114. }
  115. }
  116. // 获取设置数据
  117. const getSettingsInfo = async () => {
  118. const res = await getSettingsInfoReq()
  119. // console.log(res)
  120. if (res.code == 200) {
  121. safetyNotice.value = res.data.safetyNotice
  122. }
  123. }
  124. // 勾选框切换回调
  125. const handleCheck = () => {
  126. isCheck.value = !isCheck.value
  127. }
  128. // 点击下一步按钮回调
  129. const handleNext = () => {
  130. if (isCheck.value) {
  131. uni.navigateTo({
  132. url: '/pages/info/info'
  133. })
  134. } else {
  135. uni.showToast({
  136. title: '请先勾选安全须知',
  137. icon: 'none',
  138. mask: true
  139. })
  140. }
  141. }
  142. </script>
  143. <style lang="scss" scoped>
  144. .container {
  145. min-height: 100vh;
  146. background-color: #f5f9ff;
  147. .title {
  148. padding: 20rpx 30rpx 20rpx;
  149. font-size: 32rpx;
  150. font-weight: bold;
  151. text-align: center;
  152. line-height: 46rpx;
  153. background-color: #fff;
  154. }
  155. .body {
  156. padding: 30rpx;
  157. margin-top: 10rpx;
  158. background-color: #fff;
  159. .body_title {
  160. display: flex;
  161. align-items: center;
  162. margin-bottom: 30rpx;
  163. .title_dot {
  164. width: 32rpx;
  165. height: 32rpx;
  166. border-radius: 50%;
  167. background-color: #0061ff;
  168. }
  169. .title_text {
  170. margin-left: 15rpx;
  171. font-size: 32rpx;
  172. font-weight: bold;
  173. }
  174. }
  175. .prepare_box {
  176. margin-bottom: 16rpx;
  177. padding-left: 55rpx;
  178. .box_title {
  179. font-size: 28rpx;
  180. font-weight: bold;
  181. }
  182. .box_text {
  183. margin-top: 8rpx;
  184. font-size: 24rpx;
  185. color: #333333;
  186. line-height: 38rpx;
  187. }
  188. }
  189. .safe_box {
  190. margin-bottom: 24rpx;
  191. .box_top {
  192. display: flex;
  193. align-items: center;
  194. .top_img {
  195. width: 47rpx;
  196. height: 47rpx;
  197. }
  198. .top_text {
  199. margin-left: 14rpx;
  200. font-size: 28rpx;
  201. font-weight: bold;
  202. }
  203. }
  204. .box_bottom {
  205. padding-left: 55rpx;
  206. margin-top: 8rpx;
  207. font-size: 24rpx;
  208. color: #333333;
  209. line-height: 38rpx;
  210. }
  211. }
  212. .instancy_box {
  213. display: grid;
  214. grid-template-columns: repeat(2, 1fr);
  215. grid-template-rows: repeat(2, 1fr);
  216. gap: 20rpx 40rpx;
  217. margin-bottom: 32rpx;
  218. .box_item {
  219. display: flex;
  220. flex-direction: column;
  221. align-items: center;
  222. justify-content: center;
  223. width: 325rpx;
  224. height: 170rpx;
  225. border-radius: 4rpx;
  226. background-color: #f5f9ff;
  227. .item_title {
  228. font-size: 28rpx;
  229. font-weight: bold;
  230. }
  231. .item_text {
  232. margin-top: 15rpx;
  233. font-size: 24rpx;
  234. color: #333333;
  235. }
  236. }
  237. }
  238. .import_box {
  239. position: relative;
  240. display: flex;
  241. flex-direction: column;
  242. justify-content: center;
  243. padding-left: 32rpx;
  244. height: 152rpx;
  245. font-size: 28rpx;
  246. line-height: 48rpx;
  247. background-color: #fff2f2;
  248. .box_img {
  249. position: absolute;
  250. top: 35rpx;
  251. right: -7rpx;
  252. width: 156rpx;
  253. height: 156rpx;
  254. }
  255. }
  256. .check {
  257. margin-top: 32rpx;
  258. font-size: 28rpx;
  259. }
  260. .btn {
  261. margin-top: 55rpx;
  262. margin-bottom: 70rpx;
  263. display: flex;
  264. justify-content: center;
  265. align-items: center;
  266. height: 100rpx;
  267. color: #fff;
  268. border-radius: 8rpx;
  269. background-color: #ccc;
  270. }
  271. .active {
  272. background-color: #0061ff;
  273. }
  274. }
  275. }
  276. </style>