修改一些Bug,优化关于我们样式 ,合并版本说明中重复内容

master
lemon橪 2021-06-11 17:58:49 +08:00
parent 983dbda3e6
commit 2995383d63
12 changed files with 176 additions and 267 deletions

View File

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

View File

@ -7,4 +7,6 @@ export default {
appid: "wx6f10f29075dc1b0b", //小程序唯一凭证,即 AppID可在「微信公众平台 - 设置 - 开发设置」页中获得。(需要已经成为开发者,且帐号没有异常状态)
appSecret: "6dfbe0c72380dce5d49d65b3c91059b1", //可在 manifest.json 查看
aMapKey: "d649892b3937a5ad20b76dacb2bcb5bd", //在高德中申请web端key
scanAuthNavigation:['https://m-b2b2c.pickmall.cn'], //扫码认证跳转域名配置 会根据此处配置的路由进行跳转
iosAppId:"id1564638363" //AppStore的应用地址id 具体在分享->拷贝链接中查看
};

View File

@ -2,8 +2,8 @@
"name" : "lili商城",
"appid" : "__UNI__C100675",
"description" : "",
"versionName" : "4.0.16",
"versionCode" : 4000016,
"versionName" : "4.0.18",
"versionCode" : 4000018,
"transformPx" : false,
"app-plus" : {
"compatible" : {
@ -82,7 +82,7 @@
"weixin" : {
"__platform__" : [ "ios", "android" ],
"appid" : "wx32788b91bdb614c0",
"UniversalLinks" : "gapp/"
"UniversalLinks" : "https://m-b2b2c.pickmall.cn/app/"
},
"alipay" : {
"__platform__" : [ "ios", "android" ]

View File

@ -181,11 +181,6 @@
}
},
{
"path": "aboutUs",
"style": {
"navigationBarTitleText": "关于我们"
}
}, {
"path": "address/address",
"style": {
"enablePullDownRefresh": true,
@ -243,7 +238,7 @@
{
"path": "set/editionIntro",
"style": {
"navigationBarTitleText": "版本说明"
"navigationBarTitleText": "关于我们"
}
},
{

View File

@ -1,139 +0,0 @@
<template>
<view class="about-us">
<view class="box flex-center">
<image src="/static/logo.png" mode="scaleToFill"></image>
<view>{{config.name}}</view>
</view>
<u-cell-group :border="false">
<!-- #ifdef APP-PLUS -->
<u-cell-item title="检查更新" @click="checkUpdate"></u-cell-item>
<!-- #endif -->
<u-cell-item title="证照信息" @click="navigateTo('/pages/mine/help/tips?type=message')"></u-cell-item>
<u-cell-item title="服务协议" @click="navigateTo('/pages/mine/help/tips?type=user')"></u-cell-item>
<u-cell-item title="隐私协议" @click="navigateTo('/pages/mine/help/tips?type=privacy')"></u-cell-item>
<u-cell-item title="关于我们" :border-bottom="false" @click="navigateTo('/pages/mine/help/tips?type=about')"></u-cell-item>
</u-cell-group>
<view class="intro flex-center c-content">
<view>客服热线13161366885</view>
<view>客服邮箱lili@lili.com</view>
</view>
<view class="bottom flex-center">
<view @click="navigateTo('/pages/mine/help/tips?type=user')">lili</view>
<view>CopyRight @ {{config.name}} </view>
</view>
</view>
</template>
<script>
// #ifdef APP-PLUS
import APPUpdate, { getCurrentNo, getServerNo } from "@/plugins/APPUpdate";
import { getAppVersionList } from "@/api/message.js";
// #endif
import config from "@/config/config";
export default {
data() {
return {
config,
showUpdate: false,
version: "",
currentNo: 0,
params: {
pageNumber: 1,
pageSize: 5,
},
};
},
onLoad() {
/**
* 根据当前app系统判断
*/
// #ifdef APP-PLUS
let _this = this;
plus.runtime.getProperty(plus.runtime.appid, function (inf) {
var wgtVer = inf.version;
_this.currentVersion = wgtVer;
});
if (uni.getSystemInfoSync().platform === "android") {
this.params.type = 0;
} else {
this.params.type = 1;
}
// #endif
},
methods: {
/**
* 点击查看更新
*/
async checkUpdate() {
// #ifdef APP-PLUS
let needUpdate = false;
getCurrentNo((res) => {
this.currentNo = res.versionCode;
});
let res = await getAppVersionList(this.params);
res.data.data.forEach((ele) => {
let versionDetail = ele.version.replace(/\./g, "");
if (versionDetail.length < this.currentNo.length) {
versionDetail = versionDetail.padEnd(this.currentNo.length, "0");
}
if (versionDetail > this.currentNo) {
needUpdate = true;
}
});
if (needUpdate) {
APPUpdate(true);
} else {
uni.showToast({
title: "已是最新版本!",
});
}
// #endif
},
navigateTo(url) {
uni.navigateTo({
url,
});
},
},
};
</script>
<style lang="scss" scoped>
.box {
width: 100%;
height: 242rpx;
image {
transform: scale(2.5);
width: 94rpx;
height: 94rpx;
}
view {
font-size: 30rpx;
margin-top: 25rpx;
}
}
.u-cell {
padding: 35rpx 20rpx;
height: 110rpx;
}
.intro {
color: #999999;
font-size: $font-sm;
margin-top: 20rpx;
border: none;
padding: 45rpx 0;
line-height: 2em;
}
.bottom {
:nth-child(1) {
color: $main-color;
font-size: 22rpx;
margin-bottom: 20rpx;
}
:last-child {
font-size: 20rpx;
color: $font-color-light;
}
margin-top: 110rpx;
}
</style>

View File

@ -1,27 +1,47 @@
// TODO
<template>
<view class="edition-intro">
<view class="logo c-content">
<h1> {{config.name}}</h1>
<view class='vesion'>
Version
</view>
<u-cell-group class="cell">
<!-- #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>
<!-- #endif -->
<u-cell-item title="功能介绍"></u-cell-item>
<!-- #ifdef APP-PLUS -->
<u-cell-item title="检查更新" @click="checkUpdate"></u-cell-item>
<!-- #endif -->
<u-cell-item title="证照信息" @click="navigateTo('/pages/mine/help/tips?type=message')"></u-cell-item>
<u-cell-item title="服务协议" @click="navigateTo('/pages/mine/help/tips?type=user')"></u-cell-item>
<u-cell-item title="隐私协议" @click="navigateTo('/pages/mine/help/tips?type=privacy')"></u-cell-item>
<u-cell-item title="关于我们" :border-bottom="false" @click="navigateTo('/pages/mine/help/tips?type=about')"></u-cell-item>
</u-cell-group>
<view class="intro">
<view>客服热线13161366885</view>
<view style="margin:20rpx 0 0 0;">客服邮箱lili@lili.com</view>
<view>
<image src="/static/img/edition.png" mode=""></image>
<view style="margin:20rpx 0; color:#003a8c;" @click="navigateTo('/pages/mine/help/tips?type=user')">lili</view>
<view>CopyRight @ {{config.name}} </view>
</view>
<view>版本不息&nbsp;优化不止</view>
</view>
<view class="edition c-content" v-for="(item,index) in editionHistory" :key="index">
<view class="level">
<text style="color: #1ABC9C;">{{item.version}}</text>
<text>{{$u.timeFormat(item.update_time, 'yyyy-mm-dd')}}</text>
</view>
<view class="detail" v-html="item.content"></view>
</view>
</view>
</template>
<script>
import config from "@/config/config";
import * as API_Message from "@/api/message.js";
export default {
data() {
return {
config,
IosWhetherStar: false,
editionHistory: [], //
params: {
pageNumber: 1,
@ -34,6 +54,7 @@ export default {
if (uni.getSystemInfoSync().platform === "android") {
this.params.type = 0;
} else {
this.IosWhetherStar = true;
this.params.type = 1;
}
this.GET_AppVersionList(true);
@ -45,6 +66,11 @@ export default {
}
},
methods: {
navigateTo(url) {
uni.navigateTo({
url,
});
},
GET_AppVersionList(reset) {
if (reset) {
this.params.pageNumber = 1;
@ -68,55 +94,31 @@ export default {
</script>
<style lang="scss" scoped>
page {
background: #fff;
}
.cell {
width: 90%;
margin: 0 auto;
}
.edition-intro {
.logo {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
flex-direction: column;
font-size: $font-lg;
color: $font-color-light;
height: 330rpx;
margin-bottom: 20rpx;
> view:nth-child(1) {
width: 144rpx;
height: 144rpx;
border: 1px solid #ffc71c;
border-radius: 50%;
position: relative;
margin-bottom: 30rpx;
image {
width: 80rpx;
height: 113rpx;
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
margin: auto;
}
}
}
.edition {
margin-bottom: 20rpx;
color: $font-color-light;
font-size: $font-sm;
.level {
display: flex;
justify-content: space-between;
align-items: center;
padding: 20rpx 30rpx;
border-bottom: 2rpx solid $border-color-light;
text:nth-child(1) {
font-size: $font-base;
font-weight: 700;
}
}
.detail {
margin-left: 20rpx;
line-height: 2em;
padding: 20rpx 0;
> h1 {
margin: 150rpx 0 20rpx 0;
letter-spacing: 2rpx;
}
> .vesion {
font-size: 30rpx;
margin-bottom: 150rpx;
}
}
.intro {
margin-top: 150rpx;
font-size: 24rpx;
letter-spacing: 2rpx;
}
</style>

View File

@ -18,10 +18,8 @@
<u-cell-item title="安全中心" @click="navigateTo('/pages/mine/set/securityCenter/securityCenter')"></u-cell-item>
<u-cell-item title="意见反馈" @click="navigateTo('/pages/mine/set/feedBack')"></u-cell-item>
<!-- #ifndef H5 -->
<u-cell-item title="版本说明" @click="navigateTo('/pages/mine/set/editionIntro')"></u-cell-item>
<!-- #endif -->
<!-- <u-cell-item title="好评鼓励"></u-cell-item> -->
<u-cell-item title="关于我们" @click="navigateTo('/pages/mine/aboutUs')"></u-cell-item>
<u-cell-item :title="`关于${config.name}`" @click="navigateTo('/pages/mine/set/editionIntro')"></u-cell-item>
</u-cell-group>
<view class="submit" @click="showModalDialog">{{userInfo.id ?'退':''}}</view>
<u-modal show-cancel-button v-model="quitShow" @confirm="confirm" :confirm-color="lightColor" :async-close="true" :content="userInfo.id ? '确定要退出登录么?' : '确定要返回登录么?'"></u-modal>
@ -30,9 +28,11 @@
<script>
import storage from "@/utils/storage.js";
import config from "@/config/config";
export default {
data() {
return {
config,
lightColor: this.$lightColor,
quitShow: false,
isCertificate: false,

View File

@ -20,8 +20,11 @@
</view>
<view class="logi-List" v-else>
<view class="logi-List-title">
暂无物流信息
<view class="verificationCode" v-if="order.verificationCode ">
券码 {{order.verificationCode}}
</view>
<view v-else class="logi-List-title">
{{'暂无物流信息'}}
</view>
</view>
@ -101,7 +104,8 @@
</view>
</view>
<!-- 客户服务 售后取消订单查看物流投诉等 -->
<view class="info-view" v-if="orderDetail.allowOperationVO && orderDetail.allowOperationVO.cancel == true || order.orderStatus == 'DELIVERED' || order.orderStatus != 'UNPAID' && order.orderType =='PINTUAN'">
<view class="info-view"
v-if="orderDetail.allowOperationVO && orderDetail.allowOperationVO.cancel == true || order.orderStatus == 'DELIVERED' || order.orderStatus != 'UNPAID' && order.orderType =='PINTUAN'">
<view style="width: 100%">
<view class="order-info-view">
<view class="title">服务</view>
@ -359,7 +363,6 @@ export default {
* 投诉
*/
complaint(sku) {
uni.navigateTo({
url:
"/pages/order/complain/complain?sn=" +
@ -378,7 +381,6 @@ export default {
},
//
toPay(val) {
val.sn
? uni.navigateTo({
url: "/pages/cart/payment/payOrder?order_sn=" + val.sn,
@ -651,7 +653,10 @@ page,
}
}
}
.verificationCode{
font-weight: bold;
letter-spacing: 2rpx;
}
.bottom_view {
width: 100%;
height: 100rpx;

View File

@ -146,11 +146,9 @@ export default {
/**点击规格 */
handleClickSpec(val, index, specValue) {
this.$set(this.currentSelceted, index, specValue.id);
let selectedSkuId = this.goodsSpec.find((i) => {
let matched = true;
let specValues = i.specValues.filter((j) => j.specName !== "images");
for (let n = 0; n < specValues.length; n++) {
if (specValues[n].specValueId !== this.currentSelceted[n]) {
matched = false;
@ -206,7 +204,11 @@ export default {
//
if (this.buyType) {
data.cartType = "PINTUAN";
} else {
}
else if(this.goodsDetail.goodsType == 'VIRTUAL_GOODS'){
data.cartType = "VIRTUAL";
}
else {
data.cartType = "BUY_NOW";
}

View File

@ -93,7 +93,6 @@ export default {
mounted() {
this.init();
},
methods: {
/**
@ -108,13 +107,17 @@ export default {
},
/**
* 扫码
* TODO 扫码功能后续还会后续增加
* 应该实现的功能目前计划有
* 扫描商品跳转商品页面
* 扫描活动跳转活动页面
* 扫描二维码登录
* 扫描其他站信息 弹出提示返回首页
*/
seacnCode() {
uni.scanCode({
success: function (res) {
let path = encodeURIComponent(res.result);
// TODO
// webview
setTimeout(() => {
uni.navigateTo({
@ -125,12 +128,36 @@ export default {
});
},
/**
* 提示获取权限
*/
tipsGetSettings() {
uni.showModal({
title: "提示",
content: "您已经关闭相机权限,去设置",
success: function (res) {
if (res.confirm) {
let isIos = plus.os.name == "iOS";
if (isIos) {
plus.runtime.openURL("app-settings:");
} else {
permision.gotoAppPermissionSetting()
}
}
},
});
},
/**
* 唤醒客户端扫码
* 没权限去申请权限有权限获取扫码功能
*/
scan() {
async scan() {
// #ifdef APP-PLUS
let isIos = plus.os.name == "iOS";
// Ios
if (isIos) {
if (permision.judgeIosPermission("camera")) {
this.seacnCode();
} else {
@ -145,6 +172,16 @@ export default {
},
});
}
} else {
//
const result = await permision.requestAndroidPermission("CAMERA");
if (result == 1 || result == 0) {
this.seacnCode();
} else {
this.tipsGetSettings();
}
}
// #endif
// #ifdef MP-WEIXIN

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

View File

@ -73,6 +73,7 @@ function cleanStorage() {
storage.setHasLogin(false);
storage.setAccessToken("");
storage.setRefreshToken("");
console.log("清空token")
storage.setUuid("");
storage.setUserInfo({});
@ -120,22 +121,26 @@ http.interceptors.request.use(
config.params = params;
config.header.accessToken = accessToken;
console.log(accessToken);
console.warn(accessToken);
/**
* jwt 因为安卓以及ios没有window的属性
* window.atob这个函数 base64编码的使用方法就是btoa而用于解码的使用方法是atob
* 所以使用手写 base-64 编码的字符串数据
*/
//
const atob = (str) => Buffer.from(str, "base64").toString("binary");
// 判断如果过期时间小于我的当前时间在请求上重新刷新token
if (accessToken.split(".").length <= 1) {
refresh();
} else {
console.log(
JSON.parse(atob(accessToken.split(".")[1])).exp,
Math.round(new Date() / 1000)
);
if (
JSON.parse(atob(accessToken.split(".")[1])).exp <
new Date().getTime() / 1000
Math.round(new Date() / 1000)
) {
console.log("过期时间小于当前时间刷新token");
refresh();
}
}
@ -154,28 +159,28 @@ http.interceptors.request.use(
async function refresh() {
// 本地储存的是过期token了重新获取
const getTokenResult = await refreshToken();
// if (getTokenResult === "success") {
// // 获取新的token成功 刷新当前页面
if (getTokenResult === "success") {
// 获取新的token成功 刷新当前页面
// let routes = getCurrentPages(); // 获取当前打开过的页面路由数组
// let curRoute = routes[routes.length - 1].route; //获取当前页面路由
// let curParam = routes[routes.length - 1].options; //获取路由参数
// // 拼接参数
// let param = "";
// for (let key in curParam) {
// param += "&" + key + "=" + curParam[key];
// }
// // 判断当前路径
// if (curRoute.indexOf("pages/tabbar") == 1) {
// uni.switchTab({
// url: "/" + curRoute + param.replace("&", "?"),
// });
// }
let routes = getCurrentPages(); // 获取当前打开过的页面路由数组
let curRoute = routes[routes.length - 1].route; //获取当前页面路由
let curParam = routes[routes.length - 1].options; //获取路由参数
// 拼接参数
let param = "";
for (let key in curParam) {
param += "&" + key + "=" + curParam[key];
}
// 判断当前路径
if (curRoute.indexOf("pages/tabbar") == 1) {
uni.switchTab({
url: "/" + curRoute + param.replace("&", "?"),
});
}
// uni.redirectTo({
// url: "/" + curRoute + param.replace("&", "?"),
// });
// }
uni.redirectTo({
url: "/" + curRoute + param.replace("&", "?"),
});
}
}
// 必须使用异步函数,注意
@ -184,7 +189,7 @@ http.interceptors.response.use(
/* 请求之后拦截器。可以使用async await 做异步操作 */
// token存在并且token过期
let token = storage.getAccessToken();
console.warn(token)
if (
(token && response.statusCode === 403) ||
response.data.status === 403