2021-06-13 17:54:48 +08:00
|
|
|
<template>
|
|
|
|
<div>
|
|
|
|
<u-collapse v-if="versionData.length !=0">
|
|
|
|
<u-collapse-item class="version-item" :title="item.versionName" v-for="(item, index) in versionData" :key="index">
|
|
|
|
<!-- {{item.body}} -->
|
|
|
|
|
|
|
|
{{item.content}}
|
|
|
|
</u-collapse-item>
|
|
|
|
|
|
|
|
</u-collapse>
|
2021-06-15 14:32:01 +08:00
|
|
|
<u-empty class="empty" v-else text="暂无版本信息" mode="list"></u-empty>
|
2021-06-13 17:54:48 +08:00
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
import { getAppVersionList } from "@/api/message";
|
|
|
|
export default {
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
versionData: [],
|
|
|
|
appType: "",
|
|
|
|
params: {
|
|
|
|
pageNumber: 1,
|
|
|
|
pageSize: 10,
|
|
|
|
},
|
|
|
|
};
|
|
|
|
},
|
|
|
|
mounted() {
|
|
|
|
const platform = uni.getSystemInfoSync().platform;
|
|
|
|
/**
|
|
|
|
* 获取是否是安卓
|
|
|
|
*/
|
|
|
|
if (platform === "android") {
|
|
|
|
this.appType = "ANDROID";
|
|
|
|
} else {
|
|
|
|
this.IosWhether = true;
|
|
|
|
this.appType = "IOS";
|
|
|
|
}
|
|
|
|
this.getVersionList();
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
async getVersionList() {
|
|
|
|
let res = await getAppVersionList(this.appType, this.params);
|
|
|
|
if (res.data.success) {
|
|
|
|
this.versionData = res.data.result.records;
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
};
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style scoped lang="scss">
|
|
|
|
.version-item{
|
|
|
|
padding: 10rpx;
|
|
|
|
background: #fff;
|
|
|
|
}
|
2021-06-15 14:32:01 +08:00
|
|
|
|
2021-06-13 17:54:48 +08:00
|
|
|
</style>
|