mirror of
https://gitee.com/beijing_hongye_huicheng/lilishop-uniapp.git
synced 2026-08-06 10:57:25 +08:00
refactor: 更新多个页面的样式和结构
This commit is contained in:
@@ -1,40 +1,41 @@
|
||||
|
||||
<template>
|
||||
<view class="edition-intro">
|
||||
<image :src="config.logo" class="logo" />
|
||||
<h1> {{config.name}}</h1>
|
||||
<view class='version'>
|
||||
<!-- #ifdef APP-PLUS -->
|
||||
Version {{localVersion.version}}
|
||||
<!-- #endif -->
|
||||
<!-- #ifdef MP-WEIXIN -->
|
||||
小程序版本: {{localVersion.version}} {{ localVersion.envVersion}}
|
||||
<!-- #endif -->
|
||||
<view class="header-block">
|
||||
<image :src="config.logo" class="logo" mode="aspectFit" />
|
||||
<text class="app-name">{{ config.name }}</text>
|
||||
<view class="version">
|
||||
<!-- #ifdef APP-PLUS -->
|
||||
Version {{ localVersion.version }}
|
||||
<!-- #endif -->
|
||||
<!-- #ifdef MP-WEIXIN -->
|
||||
小程序版本: {{ localVersion.version }} {{ localVersion.envVersion }}
|
||||
<!-- #endif -->
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- {{localVersion}} -->
|
||||
<u-cell-group class="cell" :border="false">
|
||||
<!-- #ifdef APP-PLUS -->
|
||||
<u-cell v-if="IosWhether" @click="checkStar" title="去评分"></u-cell>
|
||||
<u-cell title="功能介绍" @click="navigateTo('/pages/mine/set/versionFunctionList')"></u-cell>
|
||||
<u-cell title="检查更新" @click="checkUpdate"></u-cell>
|
||||
<!-- #endif -->
|
||||
|
||||
<u-cell title="证照信息" @click="navigateTo('/pages/mine/help/tips?type=LICENSE_INFORMATION')"></u-cell>
|
||||
<u-cell title="服务协议" @click="navigateTo('/pages/mine/help/tips?type=USER_AGREEMENT')"></u-cell>
|
||||
<u-cell title="隐私协议" @click="navigateTo('/pages/mine/help/tips?type=PRIVACY_POLICY')"></u-cell>
|
||||
<u-cell title="关于我们" :border="false" @click="navigateTo('/pages/mine/help/tips?type=ABOUT')"></u-cell>
|
||||
<u-cell-group class="cell-group">
|
||||
<!-- #ifdef APP-PLUS -->
|
||||
<u-cell v-if="IosWhether" isLink title="去评分" @click="checkStar"></u-cell>
|
||||
<u-cell isLink title="功能介绍" @click="navigateTo('/pages/mine/set/versionFunctionList')"></u-cell>
|
||||
<u-cell isLink title="检查更新" @click="checkUpdate"></u-cell>
|
||||
<!-- #endif -->
|
||||
|
||||
<u-cell isLink title="证照信息" @click="navigateTo('/pages/mine/help/tips?type=LICENSE_INFORMATION')"></u-cell>
|
||||
<u-cell isLink title="服务协议" @click="navigateTo('/pages/mine/help/tips?type=USER_AGREEMENT')"></u-cell>
|
||||
<u-cell isLink title="隐私协议" @click="navigateTo('/pages/mine/help/tips?type=PRIVACY_POLICY')"></u-cell>
|
||||
<u-cell isLink title="关于我们" @click="navigateTo('/pages/mine/help/tips?type=ABOUT')"></u-cell>
|
||||
</u-cell-group>
|
||||
|
||||
<view class="intro">
|
||||
<view>{{config.customerServiceMobile ? `客服热线:${config.customerServiceMobile}` : ``}}</view>
|
||||
<view style="margin:20rpx 0 0 0;">{{config.customerServiceEmail ? `客服邮箱:${config.customerServiceEmail}` : ``}}</view>
|
||||
|
||||
<view>
|
||||
<view style="margin:20rpx 0; color:#003a8c;" @click="navigateTo('/pages/mine/help/tips?type=USER_AGREEMENT')">《{{config.name}}用户协议》</view>
|
||||
<view>CopyRight ©{{config.name}} </view>
|
||||
<view v-if="config.customerServiceMobile">客服热线:{{ config.customerServiceMobile }}</view>
|
||||
<view v-if="config.customerServiceEmail" class="intro-line">客服邮箱:{{ config.customerServiceEmail }}</view>
|
||||
<view class="intro-line">
|
||||
<text class="intro-link" @click="navigateTo('/pages/mine/help/tips?type=USER_AGREEMENT')">
|
||||
《{{ config.name }}用户协议》
|
||||
</text>
|
||||
</view>
|
||||
<view class="intro-line">CopyRight ©{{ config.name }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
@@ -47,10 +48,10 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
config,
|
||||
IosWhether: false, //是否是ios
|
||||
editionHistory: [], //版本历史
|
||||
versionData: {}, //版本信息
|
||||
localVersion: "", //当前版本信息
|
||||
IosWhether: false,
|
||||
editionHistory: [],
|
||||
versionData: {},
|
||||
localVersion: "",
|
||||
params: {
|
||||
pageNumber: 1,
|
||||
pageSize: 5,
|
||||
@@ -60,9 +61,6 @@ export default {
|
||||
onLoad() {
|
||||
// #ifdef APP-PLUS
|
||||
const platform = uni.getSystemInfoSync().platform;
|
||||
/**
|
||||
* 获取是否是安卓
|
||||
*/
|
||||
if (platform === "android") {
|
||||
this.params.type = 0;
|
||||
} else {
|
||||
@@ -78,19 +76,16 @@ export default {
|
||||
};
|
||||
});
|
||||
// #endif
|
||||
|
||||
|
||||
// #ifdef MP-WEIXIN
|
||||
const accountInfo = wx.getAccountInfoSync();
|
||||
console.log("===========accountInfo==============");
|
||||
console.log(accountInfo);
|
||||
this.version_number = accountInfo.miniProgram.version // 小程序 版本号
|
||||
this.localVersion = {
|
||||
versionCode: accountInfo.miniProgram.version.replace(/\./g, ""),
|
||||
version: accountInfo.miniProgram.version ,// 小程序 版本号,
|
||||
envVersion:accountInfo.miniProgram.envVersion, //判断小程序是开发版本还是release版本
|
||||
};
|
||||
// #endif
|
||||
|
||||
// #ifdef MP-WEIXIN
|
||||
const accountInfo = wx.getAccountInfoSync();
|
||||
this.version_number = accountInfo.miniProgram.version;
|
||||
this.localVersion = {
|
||||
versionCode: accountInfo.miniProgram.version.replace(/\./g, ""),
|
||||
version: accountInfo.miniProgram.version,
|
||||
envVersion: accountInfo.miniProgram.envVersion,
|
||||
};
|
||||
// #endif
|
||||
},
|
||||
|
||||
methods: {
|
||||
@@ -110,18 +105,12 @@ export default {
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* ios点击评分
|
||||
*/
|
||||
checkStar() {
|
||||
plus.runtime.launchApplication({
|
||||
action: `itms-apps://itunes.apple.com/app/${config.iosAppId}?action=write-review`,
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* 检查更新
|
||||
*/
|
||||
checkUpdate() {
|
||||
if (
|
||||
this.versionData.version.replace(/\./g, "") <
|
||||
@@ -144,34 +133,74 @@ export default {
|
||||
page {
|
||||
background: #fff !important;
|
||||
}
|
||||
.cell {
|
||||
width: 90%;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.edition-intro {
|
||||
min-height: 100vh;
|
||||
background: #fff;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
> h1 {
|
||||
margin: 20rpx 0 20rpx 0;
|
||||
letter-spacing: 2rpx;
|
||||
}
|
||||
> .version {
|
||||
font-size: 30rpx;
|
||||
margin-bottom: 100rpx;
|
||||
}
|
||||
}
|
||||
.intro {
|
||||
margin-top: 100rpx;
|
||||
font-size: 24rpx;
|
||||
letter-spacing: 2rpx;
|
||||
.header-block {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
padding: 80rpx 0 48rpx;
|
||||
}
|
||||
|
||||
.logo {
|
||||
width: 200rpx;
|
||||
height: 200rpx;
|
||||
}
|
||||
|
||||
.app-name {
|
||||
margin-top: 20rpx;
|
||||
font-size: 36rpx;
|
||||
font-weight: 500;
|
||||
letter-spacing: 2rpx;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.version {
|
||||
margin-top: 16rpx;
|
||||
font-size: 28rpx;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.cell-group {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
:deep(.u-cell) {
|
||||
padding: 0 30rpx;
|
||||
}
|
||||
|
||||
:deep(.u-cell__title-text) {
|
||||
font-size: 30rpx;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
:deep(.u-cell__right-icon-wrap) {
|
||||
color: #ccc !important;
|
||||
}
|
||||
|
||||
.intro {
|
||||
margin-top: auto;
|
||||
width: 100%;
|
||||
padding: 48rpx 40rpx 60rpx;
|
||||
text-align: center;
|
||||
font-size: 24rpx;
|
||||
line-height: 1.6;
|
||||
color: #666;
|
||||
letter-spacing: 1rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.intro-line {
|
||||
margin-top: 16rpx;
|
||||
}
|
||||
|
||||
.intro-link {
|
||||
color: #003a8c;
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user