Showing
2 changed files
with
39 additions
and
7 deletions
| ... | @@ -14,14 +14,24 @@ | ... | @@ -14,14 +14,24 @@ |
| 14 | </van-col> | 14 | </van-col> |
| 15 | </van-row> | 15 | </van-row> |
| 16 | </div> | 16 | </div> |
| 17 | + | ||
| 18 | + <van-overlay :show="show" z-index="9999"> | ||
| 19 | + <div class="overlay-wrapper" @click.stop> | ||
| 20 | + <van-loading size="24px">跳转中...</van-loading> | ||
| 21 | + </div> | ||
| 22 | + </van-overlay> | ||
| 17 | </template> | 23 | </template> |
| 18 | 24 | ||
| 19 | <script setup> | 25 | <script setup> |
| 20 | import icon_video from '@images/video.png' | 26 | import icon_video from '@images/video.png' |
| 27 | + | ||
| 21 | import { ref, reactive, onMounted } from 'vue' | 28 | import { ref, reactive, onMounted } from 'vue' |
| 29 | +import { useRoute, useRouter, onBeforeRouteLeave } from 'vue-router' | ||
| 30 | + | ||
| 22 | const props = defineProps({ | 31 | const props = defineProps({ |
| 23 | item: Object, | 32 | item: Object, |
| 24 | - type: String | 33 | + type: String, |
| 34 | + user_id: Number | ||
| 25 | }) | 35 | }) |
| 26 | const emit = defineEmits(['on-click']); | 36 | const emit = defineEmits(['on-click']); |
| 27 | const handle = () => { | 37 | const handle = () => { |
| ... | @@ -31,12 +41,16 @@ const handle = () => { | ... | @@ -31,12 +41,16 @@ const handle = () => { |
| 31 | } | 41 | } |
| 32 | 42 | ||
| 33 | // 上传视频 | 43 | // 上传视频 |
| 44 | +const show = ref(false); | ||
| 34 | const onUpload = (v) => { | 45 | const onUpload = (v) => { |
| 35 | - // x_field_1是金数据表单传入的参数,老师上传的格式为:book_id | 46 | + show.value = true; |
| 36 | - location.href = 'http://jsj.onwall.cn/f/g7D0MT?x_field_1=' + v.id; | 47 | + // x_field_1是金数据表单传入的参数,老师上传的格式为:user_id-book_id-perf_id,perf_id 为 0 |
| 48 | + let str = `${props.user_id}-${v.id}-0`; | ||
| 49 | + location.href = `http://jsj.onwall.cn/f/g7D0MT?x_field_1=${str}`; | ||
| 37 | } | 50 | } |
| 38 | -onMounted(() => { | ||
| 39 | 51 | ||
| 52 | +onBeforeRouteLeave(() => { | ||
| 53 | + show.value = false; | ||
| 40 | }) | 54 | }) |
| 41 | </script> | 55 | </script> |
| 42 | 56 | ||
| ... | @@ -95,4 +109,13 @@ export default { | ... | @@ -95,4 +109,13 @@ export default { |
| 95 | } | 109 | } |
| 96 | } | 110 | } |
| 97 | } | 111 | } |
| 112 | +.overlay-wrapper { | ||
| 113 | + display: flex; | ||
| 114 | + align-items: center; | ||
| 115 | + justify-content: center; | ||
| 116 | + height: 100%; | ||
| 117 | + width: auto; | ||
| 118 | + text-align: center; | ||
| 119 | +} | ||
| 120 | + | ||
| 98 | </style> | 121 | </style> | ... | ... |
| ... | @@ -94,6 +94,11 @@ | ... | @@ -94,6 +94,11 @@ |
| 94 | 94 | ||
| 95 | <donate-book :showPopup="showDonate" :item="donateItem" @on-close="closeDonate"></donate-book> | 95 | <donate-book :showPopup="showDonate" :item="donateItem" @on-close="closeDonate"></donate-book> |
| 96 | 96 | ||
| 97 | + <van-overlay :show="show" z-index="9999"> | ||
| 98 | + <div class="wrapper" @click.stop> | ||
| 99 | + <van-loading size="24px">跳转中...</van-loading> | ||
| 100 | + </div> | ||
| 101 | + </van-overlay> | ||
| 97 | </template> | 102 | </template> |
| 98 | 103 | ||
| 99 | <script setup> | 104 | <script setup> |
| ... | @@ -216,6 +221,7 @@ const onClose = () => { // 关闭提示框回调 | ... | @@ -216,6 +221,7 @@ const onClose = () => { // 关闭提示框回调 |
| 216 | showNotice.value = false; | 221 | showNotice.value = false; |
| 217 | } | 222 | } |
| 218 | 223 | ||
| 224 | +const show = ref(false); // 跳转等待提示 | ||
| 219 | const uploadVideo = () => { | 225 | const uploadVideo = () => { |
| 220 | axios.get('/srv/?a=can_upload') | 226 | axios.get('/srv/?a=can_upload') |
| 221 | .then(res => { | 227 | .then(res => { |
| ... | @@ -224,10 +230,11 @@ const uploadVideo = () => { | ... | @@ -224,10 +230,11 @@ const uploadVideo = () => { |
| 224 | if (res.data.data.can_upload) { | 230 | if (res.data.data.can_upload) { |
| 225 | // 已读隐私条例,直接跳转上传页面 | 231 | // 已读隐私条例,直接跳转上传页面 |
| 226 | if (Cookies.get('privacy_notice')) { | 232 | if (Cookies.get('privacy_notice')) { |
| 227 | - // x_field_1是金数据表单传入的参数,家长上传的格式为:book_id-perf_id,perf_id是当前缺省的儿童id | 233 | + show.value = true; |
| 234 | + // x_field_1 是金数据表单传入的参数,家长上传的格式为:user_id-book_id-perf_id,perf_id是当前缺省的儿童id | ||
| 228 | let default_perf = Cookies.get('default_perf') ? JSON.parse(Cookies.get('default_perf')) : ''; | 235 | let default_perf = Cookies.get('default_perf') ? JSON.parse(Cookies.get('default_perf')) : ''; |
| 229 | - let str = `${$route.query.id}-${default_perf.perf_id}` | 236 | + let str = `${$route.query.user_id}-${$route.query.id}-${default_perf.perf_id}` |
| 230 | - location.href = `https://jinshuju.net/f/NAGn1D?x_field_1=${str}`; | 237 | + location.href = `https://jsjs.onwall.cn/f/NAGn1D?x_field_1=${str}`; |
| 231 | } else { | 238 | } else { |
| 232 | $router.push({ | 239 | $router.push({ |
| 233 | path: '/client/privacyNotice' | 240 | path: '/client/privacyNotice' |
| ... | @@ -283,6 +290,8 @@ onActivated(() => { // keepAlive 重置后执行回调 | ... | @@ -283,6 +290,8 @@ onActivated(() => { // keepAlive 重置后执行回调 |
| 283 | } | 290 | } |
| 284 | }); | 291 | }); |
| 285 | } | 292 | } |
| 293 | + // 关闭等待提示 | ||
| 294 | + show.value = false; | ||
| 286 | }); | 295 | }); |
| 287 | 296 | ||
| 288 | const changeRouterKeepAlive = (path, keepAlive) => { | 297 | const changeRouterKeepAlive = (path, keepAlive) => { | ... | ... |
-
Please register or login to post a comment