Files
im/pages/user/about/index.vue
T

165 lines
4.0 KiB
Vue
Raw Normal View History

2025-11-07 09:56:20 +08:00
<template>
2025-11-25 05:36:02 +08:00
<view class="page_container">
<custom-nav-bar title="关于我们" />
<view class="logo_area">
2026-01-09 09:15:59 +08:00
<image class="logo" :src="cdn(config.app_logo)" mode="aspectFit"></image>
2025-11-25 05:36:02 +08:00
<view>{{ appversion }}</view>
2025-12-24 04:12:56 +08:00
<info-item @click="checkUpdate" class="check" title="检测更新" />
<info-item @click="openurl(config.website)" class="check" title="官方网站" />
2026-01-09 09:15:59 +08:00
<info-item v-if="1==2" @click="goto('/pages/common/article?type=spage&name=cooperation&title=商务合作')" class="check" title="商务合作" />
2025-12-24 04:12:56 +08:00
<info-item @click="goto('/pages/common/article?type=spage&name=terms_of_service&title=用户协议')" class="check" title="用户协议" />
<info-item @click="goto('/pages/common/article?type=spage&name=privacy_policy&title=隐私政策')" class="check" title="隐私政策" />
<info-item @click="goto('/pages/common/article?type=spage&name=aboutus&title=关于我们')" class="check" title="关于我们" />
<info-item @click="clearcache" class="check" title="清除缓存" />
2026-01-09 09:15:59 +08:00
<info-item v-if="1==2" @click="show = true" class="check" title="上传调试日志" />
2025-11-07 09:56:20 +08:00
2026-01-09 09:15:59 +08:00
<u-modal v-if="1==2" showCancelButton :show="show" title="上传日志" @confirm="uploadLog" @cancel="show = false">
2025-11-25 05:36:02 +08:00
<view class="slot-content">
<u--input placeholder="日志数量" border="surround" v-model="line"></u--input>
</view>
</u-modal>
</view>
</view>
2025-11-07 09:56:20 +08:00
</template>
<script>
2025-11-25 05:36:02 +08:00
import IMSDK from "openim-uniapp-polyfill";
import {version } from '@/common/config'
import CustomNavBar from "@/components/CustomNavBar/index.vue";
import {PageEvents } from "@/constant";
import InfoItem from "../selfInfo/InfoItem.vue";
import {checkUpgrade} from "@/api/login.js"
2025-12-24 04:12:56 +08:00
import { mapGetters } from "vuex";
2026-01-09 09:15:59 +08:00
import util from "@/util/index.js"
2025-11-25 05:36:02 +08:00
export default {
components: {
CustomNavBar,
InfoItem,
},
data() {
return {
show: false,
line: 10000,
appversion: "",
loading: false,
};
},
2025-12-24 04:12:56 +08:00
computed:{
...mapGetters(["config"]),
},
2025-11-25 05:36:02 +08:00
onLoad() {
this.getAppVersion();
},
mounted() {
IMSDK.subscribe('uploadLogsProgress', this.uploadHandler);
},
beforeDestroy() {
IMSDK.unsubscribe('uploadLogsProgress', this.uploadHandler);
},
methods: {
2025-12-27 07:08:30 +08:00
...util,
2025-11-25 05:36:02 +08:00
uploadLog() {
this.show = false
IMSDK.asyncApi('uploadLogs',IMSDK.uuid(), {
line: this.line,
ex: ""
})
uni.showLoading({
title: '上传中',
mask: true,
});
},
uploadHandler({data: {current,size},}) {
console.log('uploadHandler', current, size)
if (current >= size) {
uni.hideLoading();
uni.showToast({
title: "上传成功",
icon: "none",
});
return;
}
},
getAppVersion() {
let system = uni.getSystemInfoSync();
const _this = this;
plus.runtime.getProperty(plus.runtime.appid,(inf) => {
console.log(inf);
_this.appversion = inf.version
});
},
checkRespHandler() {
this.loading = false;
},
goto(url){
uni.navigateTo({
url: url,
});
},
clearcache(){
},
openurl(url){
// #ifdef APP
plus.runtime.openWeb(url)
// #endif
// #ifdef H5
window.open(url);
// #endif
},
// 验证是否升级
checkUpdate() {
this.loading = true;
const _this = this;
2026-01-09 09:15:59 +08:00
checkUpgrade().then(res=>{
_this.loading = false;
}).catch(e=>{
console.log(e);
if(e === true){
uni.showToast({title:'已经是最新版本'})
return ;
}
_this.loading = false;
});
2025-11-25 05:36:02 +08:00
},
},
};
2025-11-07 09:56:20 +08:00
</script>
<style lang="scss">
2025-11-25 05:36:02 +08:00
.page_container {
background-color: #f8f8f8;
2025-11-07 09:56:20 +08:00
2025-11-25 05:36:02 +08:00
.logo_area {
display: flex;
flex-direction: column;
align-items: center;
margin: 24rpx 24rpx 0 24rpx;
background: #fff;
border-radius: 6px;
padding: 48rpx 0 16rpx 0;
color: $uni-text-color;
2026-01-09 09:15:59 +08:00
.logo{
border-radius: 32rpx;
width: 160rpx;
height: 160rpx;
2025-11-25 05:36:02 +08:00
margin-bottom: 24rpx;
}
}
2025-11-07 09:56:20 +08:00
2025-11-25 05:36:02 +08:00
.check {
margin-top: 26rpx;
border-top: 1px #e8eaef solid;
padding: 20rpx;
padding-bottom: 0;
width: 90%;
}
2025-11-07 09:56:20 +08:00
2025-11-25 05:36:02 +08:00
.btn_row {
padding: 0 44rpx;
}
}
</style>