新增功能介绍列表,优化关于我们页面。新增分享ios应用id配置

master
lemon橪 2021-06-13 17:54:48 +08:00
parent 2995383d63
commit eb070953c0
9 changed files with 162 additions and 88 deletions

View File

@ -67,15 +67,28 @@ export function getLogisticsMessages(params) {
/** /**
* TODO 获取版本更新信息 暂无此功能后续会优化更新
* @param appType * @param appType
* @returns {AxiosPromise} * @returns {AxiosPromise}
* *
*/ */
export function getAppVersionList(appType) { export function getAppVersion(appType) {
return http.request({ return http.request({
url: `/appVersion/${appType}`, url: `/appVersion/${appType}`,
method: Method.GET, method: Method.GET,
type:"manager" type:"manager"
}); });
} }
/**
* @param appType
* @returns {AxiosPromise}
*
*/
export function getAppVersionList(type,data) {
return http.request({
url: `/appVersion/appVersion/${type}`,
method: Method.GET,
type:"manager",
data
});
}

View File

@ -4,8 +4,8 @@
*/ */
// 开发环境 // 开发环境
const dev = { const dev = {
common: 'http://192.168.0.109:8890', common: 'http://192.168.0.100:8890',
buyer: 'http://192.168.0.109:8888', buyer: 'http://192.168.0.100:8888',
// common: "https://common-api.pickmall.cn", // common: "https://common-api.pickmall.cn",
// buyer: "https://buyer-api.pickmall.cn", // buyer: "https://buyer-api.pickmall.cn",
}; };

View File

@ -8,5 +8,6 @@ export default {
appSecret: "6dfbe0c72380dce5d49d65b3c91059b1", //可在 manifest.json 查看 appSecret: "6dfbe0c72380dce5d49d65b3c91059b1", //可在 manifest.json 查看
aMapKey: "d649892b3937a5ad20b76dacb2bcb5bd", //在高德中申请web端key aMapKey: "d649892b3937a5ad20b76dacb2bcb5bd", //在高德中申请web端key
scanAuthNavigation:['https://m-b2b2c.pickmall.cn'], //扫码认证跳转域名配置 会根据此处配置的路由进行跳转 scanAuthNavigation:['https://m-b2b2c.pickmall.cn'], //扫码认证跳转域名配置 会根据此处配置的路由进行跳转
iosAppId:"id1564638363" //AppStore的应用地址id 具体在分享->拷贝链接中查看 iosAppId:"id1564638363", //AppStore的应用地址id 具体在分享->拷贝链接中查看
logo:"https://lilishop-oss.oss-cn-beijing.aliyuncs.com/4c864e133c2944efad1f7282ac8a3b9e.png" //logo地址
}; };

View File

@ -199,6 +199,13 @@
"navigationBarTitleText": "地址管理" "navigationBarTitleText": "地址管理"
} }
}, },
{
"path": "set/versionFunctionList",
"style": {
"navigationBarTitleText": "功能介绍"
}
},
{ {
"path": "set/securityCenter/fingerLogin", "path": "set/securityCenter/fingerLogin",
"style": { "style": {

View File

@ -1,17 +1,20 @@
// TODO
<template> <template>
<view class="edition-intro"> <view class="edition-intro">
<image src="https://lilishop-oss.oss-cn-beijing.aliyuncs.com/4c864e133c2944efad1f7282ac8a3b9e.png" class="logo" />
<h1> {{config.name}}</h1> <h1> {{config.name}}</h1>
<view class='version'>
<view class='vesion'> <!-- #ifdef APP-PLUS -->
Version Version {{localVersion.version}}
<!-- #endif -->
</view> </view>
<u-cell-group class="cell"> <!-- {{localVersion}} -->
<u-cell-group class="cell" :border="false">
<!-- #ifdef APP-PLUS --> <!-- #ifdef APP-PLUS -->
<u-cell-item v-if="IosWhetherStar" @click="()=>{window.location.href = `itms-apps://itunes.apple.com/app/${config.iosAppId}?action=write-review`}" title="去评分"></u-cell-item> <u-cell-item v-if="IosWhether" @click="checkStar" title="去评分"></u-cell-item>
<!-- #endif --> <!-- #endif -->
<u-cell-item title="功能介绍"></u-cell-item> <u-cell-item title="功能介绍" @click="navigateTo('/pages/mine/set/versionFunctionList')"></u-cell-item>
<!-- #ifdef APP-PLUS --> <!-- #ifdef APP-PLUS -->
<u-cell-item title="检查更新" @click="checkUpdate"></u-cell-item> <u-cell-item title="检查更新" @click="checkUpdate"></u-cell-item>
<!-- #endif --> <!-- #endif -->
@ -35,59 +38,86 @@
</template> </template>
<script> <script>
import APPUpdate from "@/plugins/APPUpdate";
import config from "@/config/config"; import config from "@/config/config";
import * as API_Message from "@/api/message.js"; import { getAppVersion } from "@/api/message.js";
export default { export default {
data() { data() {
return { return {
config, config,
IosWhetherStar: false, IosWhether: false, //ios
editionHistory: [], // editionHistory: [], //
versionData: {}, //
localVersion: "", //
params: { params: {
pageNumber: 1, pageNumber: 1,
pageSize: 5, pageSize: 5,
}, },
loadStatus: "more",
}; };
}, },
onLoad() { onLoad() {
if (uni.getSystemInfoSync().platform === "android") { const platform = uni.getSystemInfoSync().platform;
/**
* 获取是否是安卓
*/
if (platform === "android") {
this.params.type = 0; this.params.type = 0;
} else { } else {
this.IosWhetherStar = true; this.IosWhether = true;
this.params.type = 1; this.params.type = 1;
} }
this.GET_AppVersionList(true); this.getVersion(platform);
plus.runtime.getProperty(plus.runtime.appid, (inf) => {
this.localVersion = {
versionCode: inf.version.replace(/\./g, ""),
version: inf.version,
};
});
}, },
onReachBottom() {
if (this.loadStatus != "noMore") { methods: {
this.params.pageNumber++; async getVersion(platform) {
this.GET_AppVersionList(false); let type;
platform == "android" ? (type = "ANDROID") : (type = "IOS");
let res = await getAppVersion(type);
if (res.data.success) {
this.versionData = res.data.result;
} }
}, },
methods: {
navigateTo(url) { navigateTo(url) {
uni.navigateTo({ uni.navigateTo({
url, url,
}); });
}, },
GET_AppVersionList(reset) {
if (reset) { /**
this.params.pageNumber = 1; * ios点击评分
} */
uni.showLoading({ checkStar() {
title: "加载中", plus.runtime.launchApplication({
action: `itms-apps://itunes.apple.com/app/${config.iosAppId}?action=write-review`,
}); });
API_Message.getAppVersionList(this.params).then((response) => { },
uni.hideLoading();
if (response.statusCode == 200) { /**
const { data } = response; * 检查更新
if (data.data.length < 10) { */
this.loadStatus = "noMore"; checkUpdate() {
} if (
this.editionHistory.push(...data.data); this.versionData.version.replace(/\./g, "") <
} this.localVersion.versionCode
) {
APPUpdate();
} else {
uni.showToast({
title: "当前版本已是最新版",
duration: 2000,
icon: "none",
}); });
}
}, },
}, },
}; };
@ -95,30 +125,36 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
page { page {
background: #fff; background: #fff !important;
} }
.cell { .cell {
width: 90%; width: 90%;
margin: 0 auto; margin: 0 auto;
} }
.edition-intro { .edition-intro {
min-height: 100vh;
background: #fff;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
> h1 { > h1 {
margin: 150rpx 0 20rpx 0; margin: 20rpx 0 20rpx 0;
letter-spacing: 2rpx; letter-spacing: 2rpx;
} }
> .vesion { > .version {
font-size: 30rpx; font-size: 30rpx;
margin-bottom: 150rpx; margin-bottom: 100rpx;
} }
} }
.intro { .intro {
margin-top: 150rpx; margin-top: 100rpx;
font-size: 24rpx; font-size: 24rpx;
letter-spacing: 2rpx; letter-spacing: 2rpx;
} }
.logo {
width: 200rpx;
height: 200rpx;
}
</style> </style>

View File

@ -1,39 +0,0 @@
<template>
<view class="notify">
<u-cell-group>
<u-cell-item title="账户通知" :arrow="false">
<u-switch slot="right-icon" active-color="#1abc9c" size="40" v-model="setting.account"></u-switch>
</u-cell-item>
<u-cell-item title="物流通知" :arrow="false">
<u-switch slot="right-icon" active-color="#1abc9c" size="40" v-model="setting.logistics"></u-switch>
</u-cell-item>
<u-cell-item title="优惠促销" :arrow="false">
<u-switch slot="right-icon" active-color="#1abc9c" size="40" v-model="setting.cheap"></u-switch>
</u-cell-item>
<u-cell-item title="服务通知" :arrow="false">
<u-switch slot="right-icon" active-color="#1abc9c" size="40" v-model="setting.service"></u-switch>
</u-cell-item>
</u-cell-group>
</view>
</template>
<script>
export default {
data() {
return {
setting:{
account:false,
logistics:false,
cheap:false,
service:false
}
};
}
}
</script>
<style lang="scss" scoped>
uni-view{
font-size: 20rpx;
}
</style>

View File

@ -0,0 +1,57 @@
<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>
<u-empty style="margin-top:100rpx;" v-else text="暂无版本信息" mode="list"></u-empty>
</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;
}
</style>

View File

@ -2,7 +2,7 @@
/**** 此文件说明请看注释 *****/ /**** 此文件说明请看注释 *****/
// 可以用自己项目的请求方法 // 可以用自己项目的请求方法
// 请求配置说明https://ext.dcloud.net.cn/plugin?id=822 // 请求配置说明https://ext.dcloud.net.cn/plugin?id=822
import { getAppVersionList } from "@/api/message.js"; import { getAppVersion } from "@/api/message.js";
const platform = uni.getSystemInfoSync().platform; const platform = uni.getSystemInfoSync().platform;
// 主颜色 // 主颜色
@ -28,7 +28,7 @@ export const getServerNo = function (callback) {
platform == "android" ? (type = "ANDROID") : (type = "IOS"); platform == "android" ? (type = "ANDROID") : (type = "IOS");
getAppVersionList(type).then((res) => { getAppVersion(type).then((res) => {
if (res.data.success && res.data.result.downloadUrl) { if (res.data.success && res.data.result.downloadUrl) {
let response = res.data.result; let response = res.data.result;
let result = {}; let result = {};

View File

@ -189,7 +189,6 @@ http.interceptors.response.use(
/* 请求之后拦截器。可以使用async await 做异步操作 */ /* 请求之后拦截器。可以使用async await 做异步操作 */
// token存在并且token过期 // token存在并且token过期
let token = storage.getAccessToken(); let token = storage.getAccessToken();
console.warn(token)
if ( if (
(token && response.statusCode === 403) || (token && response.statusCode === 403) ||
response.data.status === 403 response.data.status === 403