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);
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("apponshow-------------------");
// console.log("event", event);
@ -84,7 +114,10 @@ export default {
// #endif
} catch (error) {}
} catch (error) {
console.log('error');
console.log(error)
}
},
onHide() {},
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",
"style": {
@ -418,17 +449,7 @@
// }
// }
// },
// {
// "path": "login/login",
// "style": {
// "navigationStyle": "custom",
// "navigationBarRightButton":{ "hide": true},
// "navigationBarTitleText": "uni-app分页",
// "app": {
// "bounce": "none"
// }
// }
// },
// {
// "path": "video/video",
// "style": {

View File

@ -106,17 +106,24 @@
<view
class="meeting-poster"
@click.stop="playVideo(item)"
v-if="item.liveimg"
v-if="item.liveimg && item.status_code!=0"
>
<image
:src="docUrl + item.liveimg"
class="poster-image"
<up-image
:src="docUrl + item.liveimg"
class="poster-image"
mode="aspectFill"
@error="onImageError"
@load="onImageLoad"
:loadingIcon="lazyImg"
:errorIcon="lazyImg"
:lazy-load="true"
width="100%"
height="320rpx"
: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
:src="playImg"
width="108rpx"
@ -261,6 +268,7 @@ import navBar from "@/components/navBar/navBar.vue";
import { encryptAesEcb, decryptAesEcb } from "@/utils/aesEcb.js";
import { getCameraPermission } from "@/utils/permission.js";
import topTip from "@/components/topTip/topTip.vue";
import lazyImg from "@/static/default_news_iv.png";
//
const isTimePopupShow = ref(false);
const isLocationPopupShow = ref(false);
@ -293,13 +301,13 @@ onUnload (() => {
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;
});
}
};
</script>

View File

@ -79,14 +79,29 @@
@click="playVideo(item)"
v-if="item.liveimg"
>
<image
<!-- <image
:src="docUrl + item.liveimg"
class="poster-image"
mode="aspectFill"
@error="onImageError"
@load="onImageLoad"
: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">
<up-image
:src="playImg"
@ -218,6 +233,7 @@ import dayjs from "dayjs";
import navTo from "@/utils/navTo";
import navBar from "@/components/navBar/navBar.vue";
import empty from "@/components/empty/empty.vue";
import lazyImg from "@/static/default_news_iv.png";
//
const isTimePopupShow = ref(false);
const isLocationPopupShow = ref(false);

View File

@ -34,7 +34,14 @@
@click="playVideo(video)"
>
<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 class="video-info">
<view class="video-title">{{video.title || video.name}}</view>
@ -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([]);

View File

@ -150,7 +150,7 @@
}
.main-content {
padding: 80rpx 60rpx;
padding:220rpx 60rpx 20rpx;
display: flex;
flex-direction: column;
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'
}
}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

View File

@ -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

View File

@ -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

View File

@ -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');
token = uni.getStorageSync('AUTH_TOKEN_App');
} else {
token = uni.getStorageSync('DEV_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,