11.14提交
This commit is contained in:
parent
1e134f236c
commit
5af6f8c906
37
App.vue
37
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: {},
|
||||
|
||||
43
pages.json
43
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": {
|
||||
|
||||
@ -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>
|
||||
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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([]);
|
||||
|
||||
@ -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
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
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
BIN
static/video_icon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 5.8 KiB |
@ -60,5 +60,6 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ -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
|
||||
@ -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
|
||||
@ -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
|
||||
@ -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,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user