新增功能介绍列表,优化关于我们页面。新增分享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
* @returns {AxiosPromise}
*
*/
export function getAppVersionList(appType) {
export function getAppVersion(appType) {
return http.request({
url: `/appVersion/${appType}`,
method: Method.GET,
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 = {
common: 'http://192.168.0.109:8890',
buyer: 'http://192.168.0.109:8888',
common: 'http://192.168.0.100:8890',
buyer: 'http://192.168.0.100:8888',
// common: "https://common-api.pickmall.cn",
// buyer: "https://buyer-api.pickmall.cn",
};

View File

@ -8,5 +8,6 @@ export default {
appSecret: "6dfbe0c72380dce5d49d65b3c91059b1", //可在 manifest.json 查看
aMapKey: "d649892b3937a5ad20b76dacb2bcb5bd", //在高德中申请web端key
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": "地址管理"
}
},
{
"path": "set/versionFunctionList",
"style": {
"navigationBarTitleText": "功能介绍"
}
},
{
"path": "set/securityCenter/fingerLogin",
"style": {

View File

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

View File

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