11.14提交

This commit is contained in:
zoujiandong 2025-11-14 13:23:42 +08:00
parent 1e134f236c
commit 5af6f8c906
14 changed files with 161 additions and 53 deletions

37
App.vue
View File

@ -11,7 +11,7 @@ export default {
console.log('打印options'); console.log('打印options');
console.log(options); console.log(options);
if(options && options.referrerInfo.extraData && options.referrerInfo.extraData.token){ 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); uni.setStorageSync("userInfo", options.referrerInfo.extraData.userInfo);
}; };
if(options && options.referrerInfo.extraData && options.referrerInfo.extraData.targetPath){ if(options && options.referrerInfo.extraData && options.referrerInfo.extraData.targetPath){
@ -50,7 +50,36 @@ export default {
// #ifdef APP // #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(); let main = plus.android.runtimeMainActivity();
//退quit //退quit
plus.runtime.quit = function(){ plus.runtime.quit = function(){
@ -68,6 +97,7 @@ export default {
}) })
} }
}); });
// uni.onNativeEventReceive((event, data) => { // uni.onNativeEventReceive((event, data) => {
// console.log("apponshow-------------------"); // console.log("apponshow-------------------");
// console.log("event", event); // console.log("event", event);
@ -84,7 +114,10 @@ export default {
// #endif // #endif
} catch (error) {} } catch (error) {
console.log('error');
console.log(error)
}
}, },
onHide() {}, onHide() {},
methods: {}, methods: {},

View File

@ -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", "path": "replayText/replayText",
"style": { "style": {
@ -418,17 +449,7 @@
// } // }
// } // }
// }, // },
// {
// "path": "login/login",
// "style": {
// "navigationStyle": "custom",
// "navigationBarRightButton":{ "hide": true},
// "navigationBarTitleText": "uni-app分页",
// "app": {
// "bounce": "none"
// }
// }
// },
// { // {
// "path": "video/video", // "path": "video/video",
// "style": { // "style": {

View File

@ -106,17 +106,24 @@
<view <view
class="meeting-poster" class="meeting-poster"
@click.stop="playVideo(item)" @click.stop="playVideo(item)"
v-if="item.liveimg" v-if="item.liveimg && item.status_code!=0"
> >
<image <up-image
:src="docUrl + item.liveimg" :src="docUrl + item.liveimg"
class="poster-image" class="poster-image"
mode="aspectFill" mode="aspectFill"
@error="onImageError" :loadingIcon="lazyImg"
@load="onImageLoad" :errorIcon="lazyImg"
:lazy-load="true"
width="100%"
height="320rpx"
:data-item-id="item.id" :data-item-id="item.id"
></image> >
<view class="play-btn"> <template #error>
<image :src="lazyImg" class="poster-image" mode="aspectFill"></image>
</template>
</up-image>
<view class="play-btn" v-if="item.status_code==1 || item.status_code==2 || item.status_code==4">
<up-image <up-image
:src="playImg" :src="playImg"
width="108rpx" width="108rpx"
@ -261,6 +268,7 @@ import navBar from "@/components/navBar/navBar.vue";
import { encryptAesEcb, decryptAesEcb } from "@/utils/aesEcb.js"; import { encryptAesEcb, decryptAesEcb } from "@/utils/aesEcb.js";
import { getCameraPermission } from "@/utils/permission.js"; import { getCameraPermission } from "@/utils/permission.js";
import topTip from "@/components/topTip/topTip.vue"; import topTip from "@/components/topTip/topTip.vue";
import lazyImg from "@/static/default_news_iv.png";
// //
const isTimePopupShow = ref(false); const isTimePopupShow = ref(false);
const isLocationPopupShow = ref(false); const isLocationPopupShow = ref(false);
@ -293,13 +301,13 @@ onUnload (() => {
permissionListener.value=uni.createRequestPermissionListener(); permissionListener.value=uni.createRequestPermissionListener();
console.log('放在onLoad执行'); console.log('放在onLoad执行');
console.log(permissionListener.value); console.log(permissionListener.value);
permissionListener.value.onConfirm((res)=>{ permissionListener.value.onRequest((res)=>{
console.log("onConfirm"); console.log("onRequest");
if(res.includes("android.permission.CAMERA")){ if(res.includes("android.permission.CAMERA")){
topTipRef.value?.open(); topTipRef.value?.open();
} }
}).catch((err)=>{ }).catch((err)=>{
console.log("onConfirm error"); console.log("onRequest error");
console.log(err); console.log(err);
}); });
permissionListener.value.onComplete((res)=>{ permissionListener.value.onComplete((res)=>{
@ -549,6 +557,13 @@ const groupedMeetings = computed(() => {
// //
onShow(() => { onShow(() => {
currentPage.value = 1;
hasMoreData.value = true;
meetingList.value = [];
selectedMonth.value = '';
monthName.value = '';
selectedProvince.value = '';
provinceName.value = '';
generateMonthList(); generateMonthList();
getMeetingList(true); getMeetingList(true);
}); });
@ -781,8 +796,7 @@ const getStatusText = (status) => {
1: "预告", 1: "预告",
2: "直播中", 2: "直播中",
3: "已结束", 3: "已结束",
4: "已完成", 4: "回放中"
5: "已取消",
}; };
return statusMap[status] || "预告"; return statusMap[status] || "预告";
}; };
@ -974,6 +988,16 @@ const onRefresh = () => {
hasMoreData.value = true; 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(() => { getMeetingList(true).finally(() => {
// //
setTimeout(() => { setTimeout(() => {
@ -986,6 +1010,7 @@ const onRefresh = () => {
}, 500); }, 500);
}); });
}; };
}
// //
const onLoadMore = () => { const onLoadMore = () => {
console.log("上拉加载更多"); console.log("上拉加载更多");
@ -995,9 +1020,15 @@ const onLoadMore = () => {
currentPage.value++; currentPage.value++;
// API // API
getMeetingList(false).finally(() => { if(selectedMonth.value || selectedProvince.value){
isLoadingMore.value = false; meetingListBySearch(false).finally(() => {
}); isLoadingMore.value = false;
});
}else{
getMeetingList(false).finally(() => {
isLoadingMore.value = false;
});
}
}; };
</script> </script>

View File

@ -79,14 +79,29 @@
@click="playVideo(item)" @click="playVideo(item)"
v-if="item.liveimg" v-if="item.liveimg"
> >
<image <!-- <image
:src="docUrl + item.liveimg" :src="docUrl + item.liveimg"
class="poster-image" class="poster-image"
mode="aspectFill" mode="aspectFill"
@error="onImageError" @error="onImageError"
@load="onImageLoad" @load="onImageLoad"
:data-item-id="item.id" :data-item-id="item.id"
></image> ></image> -->
<up-image
:src="docUrl + item.liveimg"
class="poster-image"
mode="aspectFill"
:loadingIcon="lazyImg"
:errorIcon="lazyImg"
:lazy-load="true"
width="100%"
height="320rpx"
:data-item-id="item.id"
>
<template #error>
<image :src="lazyImg" class="poster-image" mode="aspectFill"></image>
</template>
</up-image>
<view class="play-btn"> <view class="play-btn">
<up-image <up-image
:src="playImg" :src="playImg"
@ -218,6 +233,7 @@ import dayjs from "dayjs";
import navTo from "@/utils/navTo"; import navTo from "@/utils/navTo";
import navBar from "@/components/navBar/navBar.vue"; import navBar from "@/components/navBar/navBar.vue";
import empty from "@/components/empty/empty.vue"; import empty from "@/components/empty/empty.vue";
import lazyImg from "@/static/default_news_iv.png";
// //
const isTimePopupShow = ref(false); const isTimePopupShow = ref(false);
const isLocationPopupShow = ref(false); const isLocationPopupShow = ref(false);

View File

@ -34,7 +34,14 @@
@click="playVideo(video)" @click="playVideo(video)"
> >
<view class="video-thumbnail"> <view class="video-thumbnail">
<image :src="docUrl + video.imgpath" mode="aspectFill"></image> <up-image :src="docUrl + video.imgpath" mode="aspectFill" :loadingIcon="lazyImg" :errorIcon="lazyImg" height="200rpx" width="100%" :lazy-load="true">
<template #error>
<image :src="lazyImg" mode="aspectFill" height="200rpx" width="100%"></image>
</template>
<template #loading>
<image :src="lazyImg" mode="aspectFill" height="200rpx" width="100%"></image>
</template>
</up-image>
</view> </view>
<view class="video-info"> <view class="video-info">
<view class="video-title">{{video.title || video.name}}</view> <view class="video-title">{{video.title || video.name}}</view>
@ -84,6 +91,7 @@
import docUrl from '@/utils/docUrl'; import docUrl from '@/utils/docUrl';
import navTo from '@/utils/navTo'; import navTo from '@/utils/navTo';
import empty from '@/components/empty/empty.vue'; import empty from '@/components/empty/empty.vue';
import lazyImg from '@/static/default_video.png';
const isAllActive=ref(false) const isAllActive=ref(false)
// //
const videoList = ref([]); const videoList = ref([]);

View File

@ -150,7 +150,7 @@
} }
.main-content { .main-content {
padding: 80rpx 60rpx; padding:220rpx 60rpx 20rpx;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;

BIN
static/default_news_iv.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

BIN
static/default_video.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

BIN
static/video_icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

View File

@ -60,5 +60,6 @@

View File

@ -13,7 +13,7 @@ if(process.env.UNI_PLATFORM =="h5"){
BASE_URL='https://dev-app.igandan.com/app' BASE_URL='https://dev-app.igandan.com/app'
} }
}else{ }else{
BASE_URL='https://dev-app.igandan.com/app' //BASE_URL='https://dev-app.igandan.com/app'
//BASE_URL='https://app.igandan.com/app' BASE_URL='https://app.igandan.com/app'
} }
export default BASE_URL export default BASE_URL

View File

@ -13,7 +13,7 @@ if(process.env.UNI_PLATFORM =="h5"){
DOC_URL='https://dev-doc.igandan.com/app/' DOC_URL='https://dev-doc.igandan.com/app/'
} }
}else{ }else{
DOC_URL='https://dev-doc.igandan.com/app/' //DOC_URL='https://dev-doc.igandan.com/app/'
//DOC_URL='https://doc.igandan.com/app/' DOC_URL='https://doc.igandan.com/app/'
} }
export default DOC_URL export default DOC_URL

View File

@ -7,7 +7,7 @@ let OTHER_HOST=''
OTHER_HOST='https://dev-wx.igandan.com' OTHER_HOST='https://dev-wx.igandan.com'
} }
}else{ }else{
OTHER_HOST='https://dev-wx.igandan.com' //OTHER_HOST='https://dev-wx.igandan.com'
//OTHER_HOST='https://wx.igandan.com' OTHER_HOST='https://wx.igandan.com'
} }
export default OTHER_HOST export default OTHER_HOST

View File

@ -9,6 +9,7 @@
*/ */
import BASE_URL from "./config.js"; import BASE_URL from "./config.js";
import version from '@/utils/version.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 = export const request = (url, data = {}, method = 'post', loading = false, contentType =
'application/json',extraHeader={}) => { 'application/json',extraHeader={}) => {
if (loading) { if (loading) {
@ -36,12 +37,8 @@ export const request = (url, data = {}, method = 'post', loading = false, conten
token = uni.getStorageSync('DEV_AUTH_TOKEN_App'); token = uni.getStorageSync('DEV_AUTH_TOKEN_App');
} }
}else{ }else{
if (BASE_URL.indexOf('dev') == -1) { token = uni.getStorageSync('AUTH_TOKEN_App');
token = uni.getStorageSync('AUTH_TOKEN_App');
} else {
token = uni.getStorageSync('DEV_AUTH_TOKEN_App');
}
} }
let header = { let header = {
'content-type': contentType, 'content-type': contentType,
@ -62,7 +59,7 @@ export const request = (url, data = {}, method = 'post', loading = false, conten
defaultData = { defaultData = {
version: version, version: version,
user_uuid:userInfo.uuid, user_uuid:userInfo.uuid,
client_type: 'A', //client_type, client_type:client_type,
timestamp:new Date().getTime() timestamp:new Date().getTime()
} }
postData={ postData={
@ -79,7 +76,7 @@ export const request = (url, data = {}, method = 'post', loading = false, conten
defaultData = { defaultData = {
version: version, version: version,
user_uuid:userInfo.uuid, user_uuid:userInfo.uuid,
client_type: 'A', //client_type, client_type:client_type,
timestamp:new Date().getTime()+"" timestamp:new Date().getTime()+""
} }
@ -104,12 +101,7 @@ export const request = (url, data = {}, method = 'post', loading = false, conten
success: async (res) => { success: async (res) => {
var Authorization_token = res.header.Authorization; var Authorization_token = res.header.Authorization;
if (Authorization_token) { if (Authorization_token) {
if (process.env.NODE_ENV === 'development') { uni.setStorageSync('AUTH_TOKEN_App', Authorization_token);
uni.setStorageSync('DEV_AUTH_TOKEN_App', Authorization_token);
} else {
uni.setStorageSync('AUTH_TOKEN_App', Authorization_token);
}
} }
if (loading) { if (loading) {
uni.hideLoading(); uni.hideLoading();
@ -141,6 +133,12 @@ export const request = (url, data = {}, method = 'post', loading = false, conten
e(res.data) e(res.data)
}else if(res.data.code==35002){ }else if(res.data.code==35002){
n(res) n(res)
uni.sendNativeEvent('goTabbarPage', {
msg: 'home'
},ret => {
console.log(ret);
})
plus.runtime.quit()
}else{ }else{
uni.showToast({ uni.showToast({
title: res.data.message, title: res.data.message,