Files
im/pages/user/about/index.vue
T
cansnow db99bebcb4 22
2026-01-15 22:50:35 +08:00

154 lines
3.8 KiB
Vue

<template>
<view class="page_container">
<custom-nav-bar title="关于我们" />
<view class="logo_area">
<image class="logo" :src="cdn(config.app_logo)" mode="aspectFit"></image>
<view>{{ appversion }}</view>
<info-item @click="checkUpdate" class="check" title="检测更新" />
<info-item @click="openurl(config.website)" class="check" title="官方网站" />
<info-item v-if="1==2" @click="goto('/pages/common/article?type=spage&name=cooperation&title=商务合作')" class="check" title="商务合作" />
<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="清除缓存" />
<info-item v-if="1==2" @click="show = true" class="check" title="上传调试日志" />
<u-modal v-if="1==2" showCancelButton :show="show" title="上传日志" @confirm="uploadLog" @cancel="show = false">
<view class="slot-content">
<u--input placeholder="日志数量" border="surround" v-model="line"></u--input>
</view>
</u-modal>
</view>
</view>
</template>
<script>
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 { mapGetters } from "vuex";
import util from "@/util/index.js"
import checkUpgrade from "@/util/app_update.js"
export default {
components: {
CustomNavBar,
InfoItem,
},
data() {
return {
show: false,
line: 10000,
appversion: "",
loading: false,
};
},
computed:{
...mapGetters(["config"]),
},
onLoad() {
this.getAppVersion();
},
mounted() {
IMSDK.subscribe('uploadLogsProgress', this.uploadHandler);
},
beforeDestroy() {
IMSDK.unsubscribe('uploadLogsProgress', this.uploadHandler);
},
methods: {
...util,
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() {
checkUpgrade(true);
},
},
};
</script>
<style lang="scss">
.page_container {
background-color: #f8f8f8;
.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;
.logo{
border-radius: 32rpx;
width: 160rpx;
height: 160rpx;
margin-bottom: 24rpx;
}
}
.check {
margin-top: 26rpx;
border-top: 1px #e8eaef solid;
padding: 20rpx;
padding-bottom: 0;
width: 90%;
}
.btn_row {
padding: 0 44rpx;
}
}
</style>