diff --git a/App.vue b/App.vue index 03c6c85..5f04f10 100644 --- a/App.vue +++ b/App.vue @@ -11,7 +11,7 @@ export default { console.log('打印options'); console.log(options); if(options && options.referrerInfo.extraData && options.referrerInfo.extraData.token){ - uni.setStorageSync("DEV_AUTH_TOKEN_App", options.referrerInfo.extraData.token); + uni.setStorageSync("AUTH_TOKEN_App", options.referrerInfo.extraData.token); uni.setStorageSync("userInfo", options.referrerInfo.extraData.userInfo); }; if(options && options.referrerInfo.extraData && options.referrerInfo.extraData.targetPath){ @@ -50,7 +50,36 @@ export default { // #ifdef APP + console.log("执行onshow") + let temp_token = uni.getStorageSync('AUTH_TOKEN_App'); + uni.setStorageSync('AUTH_TOKEN_App',''); + console.log("temp_token", temp_token); + uni.sendNativeEvent('checkToken', { + msg: 'checkToken' + }, ret => { + console.log('check回调') + console.log(ret) + if(ret.code==0){ + uni.setStorageSync('AUTH_TOKEN_App','') + uni.sendNativeEvent('goTabbarPage', { + msg: 'home' + },ret => { + console.log(ret); + }) + plus.runtime.quit() + }else{ + uni.setStorageSync('AUTH_TOKEN_App',temp_token); + } + }) + uni.onNativeEventReceive((event,data)=>{ + console.log("event", event); + console.log("data", data); + if (event.indexOf("clearToken") > -1){ + uni.setStorageSync('AUTH_TOKEN_App','') + plus.runtime.quit() + } + }) let main = plus.android.runtimeMainActivity(); //为了防止快速点按返回键导致程序退出重写quit方法改为隐藏至后台 plus.runtime.quit = function(){ @@ -68,6 +97,7 @@ export default { }) } }); + // uni.onNativeEventReceive((event, data) => { // console.log("app传递登录信息onshow-------------------"); // console.log("event", event); @@ -84,7 +114,10 @@ export default { // #endif - } catch (error) {} + } catch (error) { + console.log('error'); + console.log(error) + } }, onHide() {}, methods: {}, diff --git a/pages.json b/pages.json index df77aa7..1bc8774 100644 --- a/pages.json +++ b/pages.json @@ -292,6 +292,37 @@ } } }, + { + "path": "login/login", + "style": { + "navigationStyle": "custom", + "navigationBarRightButton":{ "hide": true}, + "navigationBarTitleText": "uni-app分页", + "app": { + "bounce": "none" + } + } + }, + { + "path": "smsLogin/smsLogin", + "style": { + "navigationStyle": "custom", + "navigationBarTitleText": "uni-app分页", + "app": { + "bounce": "none" + } + } + }, + { + "path": "pwdLogin/pwdLogin", + "style": { + "navigationStyle": "custom", + "navigationBarTitleText": "uni-app分页", + "app": { + "bounce": "none" + } + } + }, { "path": "replayText/replayText", "style": { @@ -418,17 +449,7 @@ // } // } // }, - // { - // "path": "login/login", - // "style": { - // "navigationStyle": "custom", - // "navigationBarRightButton":{ "hide": true}, - // "navigationBarTitleText": "uni-app分页", - // "app": { - // "bounce": "none" - // } - // } - // }, + // { // "path": "video/video", // "style": { diff --git a/pages/live/live.vue b/pages/live/live.vue index 56b5e0a..9f4bb6b 100644 --- a/pages/live/live.vue +++ b/pages/live/live.vue @@ -106,17 +106,24 @@ - - + > + + + { permissionListener.value=uni.createRequestPermissionListener(); console.log('放在onLoad执行'); console.log(permissionListener.value); - permissionListener.value.onConfirm((res)=>{ - console.log("onConfirm"); + permissionListener.value.onRequest((res)=>{ + console.log("onRequest"); if(res.includes("android.permission.CAMERA")){ topTipRef.value?.open(); } }).catch((err)=>{ - console.log("onConfirm error"); + console.log("onRequest error"); console.log(err); }); permissionListener.value.onComplete((res)=>{ @@ -549,6 +557,13 @@ const groupedMeetings = computed(() => { // 页面显示时获取会议列表数据 onShow(() => { + currentPage.value = 1; + hasMoreData.value = true; + meetingList.value = []; + selectedMonth.value = ''; + monthName.value = ''; + selectedProvince.value = ''; + provinceName.value = ''; generateMonthList(); getMeetingList(true); }); @@ -781,8 +796,7 @@ const getStatusText = (status) => { 1: "预告", 2: "直播中", 3: "已结束", - 4: "已完成", - 5: "已取消", + 4: "回放中" }; return statusMap[status] || "预告"; }; @@ -974,6 +988,16 @@ const onRefresh = () => { hasMoreData.value = true; // 调用获取会议列表函数 + if(selectedMonth.value || selectedProvince.value){ + meetingListBySearch(true).finally(() => { + isRefreshing.value = false; + uni.showToast({ + title: "刷新成功", + icon: "none", + duration: 1500, + }); + }); + }else{ getMeetingList(true).finally(() => { // 延迟关闭刷新状态,给用户更好的体验 setTimeout(() => { @@ -986,6 +1010,7 @@ const onRefresh = () => { }, 500); }); }; +} // 上拉加载更多 const onLoadMore = () => { console.log("上拉加载更多"); @@ -995,9 +1020,15 @@ const onLoadMore = () => { currentPage.value++; // 调用API获取更多数据 - getMeetingList(false).finally(() => { - isLoadingMore.value = false; - }); + if(selectedMonth.value || selectedProvince.value){ + meetingListBySearch(false).finally(() => { + isLoadingMore.value = false; + }); + }else{ + getMeetingList(false).finally(() => { + isLoadingMore.value = false; + }); + } }; diff --git a/pages_app/liveReplay/liveReplay.vue b/pages_app/liveReplay/liveReplay.vue index 03b6860..3b6ac1e 100644 --- a/pages_app/liveReplay/liveReplay.vue +++ b/pages_app/liveReplay/liveReplay.vue @@ -79,14 +79,29 @@ @click="playVideo(item)" v-if="item.liveimg" > - + > --> + + + - + + + + {{video.title || video.name}} @@ -84,6 +91,7 @@ import docUrl from '@/utils/docUrl'; import navTo from '@/utils/navTo'; import empty from '@/components/empty/empty.vue'; + import lazyImg from '@/static/default_video.png'; const isAllActive=ref(false) // 响应式数据 const videoList = ref([]); diff --git a/pages_app/scanLogin/scanLogin.vue b/pages_app/scanLogin/scanLogin.vue index 85c022a..74a7dd7 100644 --- a/pages_app/scanLogin/scanLogin.vue +++ b/pages_app/scanLogin/scanLogin.vue @@ -150,7 +150,7 @@ } .main-content { - padding: 80rpx 60rpx; + padding:220rpx 60rpx 20rpx; display: flex; flex-direction: column; align-items: center; diff --git a/static/default_news_iv.png b/static/default_news_iv.png new file mode 100644 index 0000000..1a00f5a Binary files /dev/null and b/static/default_news_iv.png differ diff --git a/static/default_video.png b/static/default_video.png new file mode 100644 index 0000000..ce24a6a Binary files /dev/null and b/static/default_video.png differ diff --git a/static/video_icon.png b/static/video_icon.png new file mode 100644 index 0000000..6e13bca Binary files /dev/null and b/static/video_icon.png differ diff --git a/tsconfig.json b/tsconfig.json index d55fe5d..ea9fb78 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -60,5 +60,6 @@ + diff --git a/utils/config.js b/utils/config.js index 73207e9..3e4a7fb 100644 --- a/utils/config.js +++ b/utils/config.js @@ -13,7 +13,7 @@ if(process.env.UNI_PLATFORM =="h5"){ BASE_URL='https://dev-app.igandan.com/app' } }else{ - BASE_URL='https://dev-app.igandan.com/app' - //BASE_URL='https://app.igandan.com/app' + //BASE_URL='https://dev-app.igandan.com/app' + BASE_URL='https://app.igandan.com/app' } export default BASE_URL \ No newline at end of file diff --git a/utils/docUrl.js b/utils/docUrl.js index 9a544d7..c9a5042 100644 --- a/utils/docUrl.js +++ b/utils/docUrl.js @@ -13,7 +13,7 @@ if(process.env.UNI_PLATFORM =="h5"){ DOC_URL='https://dev-doc.igandan.com/app/' } }else{ - DOC_URL='https://dev-doc.igandan.com/app/' - //DOC_URL='https://doc.igandan.com/app/' + //DOC_URL='https://dev-doc.igandan.com/app/' + DOC_URL='https://doc.igandan.com/app/' } export default DOC_URL \ No newline at end of file diff --git a/utils/otherHost.js b/utils/otherHost.js index 1a1cd31..ac2a67f 100644 --- a/utils/otherHost.js +++ b/utils/otherHost.js @@ -7,7 +7,7 @@ let OTHER_HOST='' OTHER_HOST='https://dev-wx.igandan.com' } }else{ - OTHER_HOST='https://dev-wx.igandan.com' - //OTHER_HOST='https://wx.igandan.com' + //OTHER_HOST='https://dev-wx.igandan.com' + OTHER_HOST='https://wx.igandan.com' } export default OTHER_HOST \ No newline at end of file diff --git a/utils/request.js b/utils/request.js index eef1694..bf8bddf 100644 --- a/utils/request.js +++ b/utils/request.js @@ -9,6 +9,7 @@ */ import BASE_URL from "./config.js"; import version from '@/utils/version.js' +import client_type from "@/utils/client_type.js" export const request = (url, data = {}, method = 'post', loading = false, contentType = 'application/json',extraHeader={}) => { if (loading) { @@ -36,12 +37,8 @@ export const request = (url, data = {}, method = 'post', loading = false, conten token = uni.getStorageSync('DEV_AUTH_TOKEN_App'); } }else{ - if (BASE_URL.indexOf('dev') == -1) { - token = uni.getStorageSync('AUTH_TOKEN_App'); - - } else { - token = uni.getStorageSync('DEV_AUTH_TOKEN_App'); - } + token = uni.getStorageSync('AUTH_TOKEN_App'); + } let header = { 'content-type': contentType, @@ -62,7 +59,7 @@ export const request = (url, data = {}, method = 'post', loading = false, conten defaultData = { version: version, user_uuid:userInfo.uuid, - client_type: 'A', //client_type, + client_type:client_type, timestamp:new Date().getTime() } postData={ @@ -79,7 +76,7 @@ export const request = (url, data = {}, method = 'post', loading = false, conten defaultData = { version: version, user_uuid:userInfo.uuid, - client_type: 'A', //client_type, + client_type:client_type, timestamp:new Date().getTime()+"" } @@ -104,12 +101,7 @@ export const request = (url, data = {}, method = 'post', loading = false, conten success: async (res) => { var Authorization_token = res.header.Authorization; if (Authorization_token) { - if (process.env.NODE_ENV === 'development') { - uni.setStorageSync('DEV_AUTH_TOKEN_App', Authorization_token); - } else { - uni.setStorageSync('AUTH_TOKEN_App', Authorization_token); - } - + uni.setStorageSync('AUTH_TOKEN_App', Authorization_token); } if (loading) { uni.hideLoading(); @@ -141,6 +133,12 @@ export const request = (url, data = {}, method = 'post', loading = false, conten e(res.data) }else if(res.data.code==35002){ n(res) + uni.sendNativeEvent('goTabbarPage', { + msg: 'home' + },ret => { + console.log(ret); + }) + plus.runtime.quit() }else{ uni.showToast({ title: res.data.message,