修改一些Bug,优化关于我们样式 ,合并版本说明中重复内容
parent
983dbda3e6
commit
2995383d63
|
@ -4,10 +4,10 @@
|
||||||
*/
|
*/
|
||||||
// 开发环境
|
// 开发环境
|
||||||
const dev = {
|
const dev = {
|
||||||
// common: 'http://192.168.0.109:8890',
|
common: 'http://192.168.0.109:8890',
|
||||||
// buyer: 'http://192.168.0.109:8888',
|
buyer: 'http://192.168.0.109: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",
|
||||||
};
|
};
|
||||||
// 生产环境
|
// 生产环境
|
||||||
const prod = {
|
const prod = {
|
||||||
|
|
|
@ -7,4 +7,6 @@ export default {
|
||||||
appid: "wx6f10f29075dc1b0b", //小程序唯一凭证,即 AppID,可在「微信公众平台 - 设置 - 开发设置」页中获得。(需要已经成为开发者,且帐号没有异常状态)
|
appid: "wx6f10f29075dc1b0b", //小程序唯一凭证,即 AppID,可在「微信公众平台 - 设置 - 开发设置」页中获得。(需要已经成为开发者,且帐号没有异常状态)
|
||||||
appSecret: "6dfbe0c72380dce5d49d65b3c91059b1", //可在 manifest.json 查看
|
appSecret: "6dfbe0c72380dce5d49d65b3c91059b1", //可在 manifest.json 查看
|
||||||
aMapKey: "d649892b3937a5ad20b76dacb2bcb5bd", //在高德中申请web端key
|
aMapKey: "d649892b3937a5ad20b76dacb2bcb5bd", //在高德中申请web端key
|
||||||
|
scanAuthNavigation:['https://m-b2b2c.pickmall.cn'], //扫码认证跳转域名配置 会根据此处配置的路由进行跳转
|
||||||
|
iosAppId:"id1564638363" //AppStore的应用地址id 具体在分享->拷贝链接中查看
|
||||||
};
|
};
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
"name" : "lili商城",
|
"name" : "lili商城",
|
||||||
"appid" : "__UNI__C100675",
|
"appid" : "__UNI__C100675",
|
||||||
"description" : "",
|
"description" : "",
|
||||||
"versionName" : "4.0.16",
|
"versionName" : "4.0.18",
|
||||||
"versionCode" : 4000016,
|
"versionCode" : 4000018,
|
||||||
"transformPx" : false,
|
"transformPx" : false,
|
||||||
"app-plus" : {
|
"app-plus" : {
|
||||||
"compatible" : {
|
"compatible" : {
|
||||||
|
@ -82,7 +82,7 @@
|
||||||
"weixin" : {
|
"weixin" : {
|
||||||
"__platform__" : [ "ios", "android" ],
|
"__platform__" : [ "ios", "android" ],
|
||||||
"appid" : "wx32788b91bdb614c0",
|
"appid" : "wx32788b91bdb614c0",
|
||||||
"UniversalLinks" : "gapp/"
|
"UniversalLinks" : "https://m-b2b2c.pickmall.cn/app/"
|
||||||
},
|
},
|
||||||
"alipay" : {
|
"alipay" : {
|
||||||
"__platform__" : [ "ios", "android" ]
|
"__platform__" : [ "ios", "android" ]
|
||||||
|
|
|
@ -180,12 +180,7 @@
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "aboutUs",
|
|
||||||
"style": {
|
|
||||||
"navigationBarTitleText": "关于我们"
|
|
||||||
}
|
|
||||||
}, {
|
|
||||||
"path": "address/address",
|
"path": "address/address",
|
||||||
"style": {
|
"style": {
|
||||||
"enablePullDownRefresh": true,
|
"enablePullDownRefresh": true,
|
||||||
|
@ -243,7 +238,7 @@
|
||||||
{
|
{
|
||||||
"path": "set/editionIntro",
|
"path": "set/editionIntro",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "版本说明"
|
"navigationBarTitleText": "关于我们"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -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>
|
|
|
@ -1,27 +1,47 @@
|
||||||
// TODO 第一版本暂无此功能 后续优化以及更新
|
// TODO 第一版本暂无此功能 后续优化以及更新
|
||||||
<template>
|
<template>
|
||||||
<view class="edition-intro">
|
<view class="edition-intro">
|
||||||
<view class="logo c-content">
|
<h1> {{config.name}}</h1>
|
||||||
<view>
|
|
||||||
<image src="/static/img/edition.png" mode=""></image>
|
<view class='vesion'>
|
||||||
</view>
|
Version
|
||||||
<view>版本不息 优化不止</view>
|
|
||||||
</view>
|
</view>
|
||||||
<view class="edition c-content" v-for="(item,index) in editionHistory" :key="index">
|
|
||||||
<view class="level">
|
<u-cell-group class="cell">
|
||||||
<text style="color: #1ABC9C;">{{item.version}}</text>
|
<!-- #ifdef APP-PLUS -->
|
||||||
<text>{{$u.timeFormat(item.update_time, 'yyyy-mm-dd')}}</text>
|
<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>
|
||||||
|
<view style="margin:20rpx 0; color:#003a8c;" @click="navigateTo('/pages/mine/help/tips?type=user')">《lili商城用户协议》</view>
|
||||||
|
<view>CopyRight @ {{config.name}} </view>
|
||||||
</view>
|
</view>
|
||||||
<view class="detail" v-html="item.content"></view>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import config from "@/config/config";
|
||||||
import * as API_Message from "@/api/message.js";
|
import * as API_Message from "@/api/message.js";
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
config,
|
||||||
|
IosWhetherStar: false,
|
||||||
editionHistory: [], //版本历史
|
editionHistory: [], //版本历史
|
||||||
params: {
|
params: {
|
||||||
pageNumber: 1,
|
pageNumber: 1,
|
||||||
|
@ -34,6 +54,7 @@ export default {
|
||||||
if (uni.getSystemInfoSync().platform === "android") {
|
if (uni.getSystemInfoSync().platform === "android") {
|
||||||
this.params.type = 0;
|
this.params.type = 0;
|
||||||
} else {
|
} else {
|
||||||
|
this.IosWhetherStar = true;
|
||||||
this.params.type = 1;
|
this.params.type = 1;
|
||||||
}
|
}
|
||||||
this.GET_AppVersionList(true);
|
this.GET_AppVersionList(true);
|
||||||
|
@ -45,6 +66,11 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
navigateTo(url) {
|
||||||
|
uni.navigateTo({
|
||||||
|
url,
|
||||||
|
});
|
||||||
|
},
|
||||||
GET_AppVersionList(reset) {
|
GET_AppVersionList(reset) {
|
||||||
if (reset) {
|
if (reset) {
|
||||||
this.params.pageNumber = 1;
|
this.params.pageNumber = 1;
|
||||||
|
@ -68,55 +94,31 @@ export default {
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
page {
|
||||||
|
background: #fff;
|
||||||
|
}
|
||||||
|
.cell {
|
||||||
|
width: 90%;
|
||||||
|
margin: 0 auto;
|
||||||
|
}
|
||||||
.edition-intro {
|
.edition-intro {
|
||||||
.logo {
|
display: flex;
|
||||||
display: flex;
|
flex-direction: column;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
flex-direction: column;
|
|
||||||
font-size: $font-lg;
|
> h1 {
|
||||||
color: $font-color-light;
|
margin: 150rpx 0 20rpx 0;
|
||||||
height: 330rpx;
|
letter-spacing: 2rpx;
|
||||||
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 {
|
> .vesion {
|
||||||
margin-bottom: 20rpx;
|
font-size: 30rpx;
|
||||||
color: $font-color-light;
|
margin-bottom: 150rpx;
|
||||||
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;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.intro {
|
||||||
|
margin-top: 150rpx;
|
||||||
|
font-size: 24rpx;
|
||||||
|
letter-spacing: 2rpx;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -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/securityCenter/securityCenter')"></u-cell-item>
|
||||||
<u-cell-item title="意见反馈" @click="navigateTo('/pages/mine/set/feedBack')"></u-cell-item>
|
<u-cell-item title="意见反馈" @click="navigateTo('/pages/mine/set/feedBack')"></u-cell-item>
|
||||||
<!-- #ifndef H5 -->
|
<!-- #ifndef H5 -->
|
||||||
<u-cell-item title="版本说明" @click="navigateTo('/pages/mine/set/editionIntro')"></u-cell-item>
|
|
||||||
<!-- #endif -->
|
<!-- #endif -->
|
||||||
<!-- <u-cell-item title="好评鼓励"></u-cell-item> -->
|
<u-cell-item :title="`关于${config.name}`" @click="navigateTo('/pages/mine/set/editionIntro')"></u-cell-item>
|
||||||
<u-cell-item title="关于我们" @click="navigateTo('/pages/mine/aboutUs')"></u-cell-item>
|
|
||||||
</u-cell-group>
|
</u-cell-group>
|
||||||
<view class="submit" @click="showModalDialog">{{userInfo.id ?'退出登录':'返回登录'}}</view>
|
<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>
|
<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>
|
<script>
|
||||||
import storage from "@/utils/storage.js";
|
import storage from "@/utils/storage.js";
|
||||||
|
import config from "@/config/config";
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
config,
|
||||||
lightColor: this.$lightColor,
|
lightColor: this.$lightColor,
|
||||||
quitShow: false,
|
quitShow: false,
|
||||||
isCertificate: false,
|
isCertificate: false,
|
||||||
|
|
|
@ -20,8 +20,11 @@
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="logi-List" v-else>
|
<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>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
@ -101,7 +104,8 @@
|
||||||
</view>
|
</view>
|
||||||
</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 style="width: 100%">
|
||||||
<view class="order-info-view">
|
<view class="order-info-view">
|
||||||
<view class="title">服务</view>
|
<view class="title">服务</view>
|
||||||
|
@ -212,7 +216,7 @@
|
||||||
import { getExpress } from "@/api/trade.js";
|
import { getExpress } from "@/api/trade.js";
|
||||||
import { cancelOrder, confirmReceipt, getOrderDetail } from "@/api/order.js";
|
import { cancelOrder, confirmReceipt, getOrderDetail } from "@/api/order.js";
|
||||||
|
|
||||||
import {h5Copy} from "@/js_sdk/h5-copy/h5-copy.js";
|
import { h5Copy } from "@/js_sdk/h5-copy/h5-copy.js";
|
||||||
import shares from "@/components/m-share/index"; //分享
|
import shares from "@/components/m-share/index"; //分享
|
||||||
|
|
||||||
import { getClearReason } from "@/api/after-sale.js";
|
import { getClearReason } from "@/api/after-sale.js";
|
||||||
|
@ -359,7 +363,6 @@ export default {
|
||||||
* 投诉
|
* 投诉
|
||||||
*/
|
*/
|
||||||
complaint(sku) {
|
complaint(sku) {
|
||||||
|
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url:
|
url:
|
||||||
"/pages/order/complain/complain?sn=" +
|
"/pages/order/complain/complain?sn=" +
|
||||||
|
@ -378,7 +381,6 @@ export default {
|
||||||
},
|
},
|
||||||
// 去支付
|
// 去支付
|
||||||
toPay(val) {
|
toPay(val) {
|
||||||
|
|
||||||
val.sn
|
val.sn
|
||||||
? uni.navigateTo({
|
? uni.navigateTo({
|
||||||
url: "/pages/cart/payment/payOrder?order_sn=" + val.sn,
|
url: "/pages/cart/payment/payOrder?order_sn=" + val.sn,
|
||||||
|
@ -411,7 +413,7 @@ export default {
|
||||||
this.cancelShow = true;
|
this.cancelShow = true;
|
||||||
},
|
},
|
||||||
|
|
||||||
//提交取消订单(未付款)
|
//提交取消订单(未付款)
|
||||||
submitCancel() {
|
submitCancel() {
|
||||||
cancelOrder(this.orderSn, { reason: this.reason }).then((res) => {
|
cancelOrder(this.orderSn, { reason: this.reason }).then((res) => {
|
||||||
if (res.data.success) {
|
if (res.data.success) {
|
||||||
|
@ -651,7 +653,10 @@ page,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.verificationCode{
|
||||||
|
font-weight: bold;
|
||||||
|
letter-spacing: 2rpx;
|
||||||
|
}
|
||||||
.bottom_view {
|
.bottom_view {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100rpx;
|
height: 100rpx;
|
||||||
|
|
|
@ -146,11 +146,9 @@ export default {
|
||||||
/**点击规格 */
|
/**点击规格 */
|
||||||
handleClickSpec(val, index, specValue) {
|
handleClickSpec(val, index, specValue) {
|
||||||
this.$set(this.currentSelceted, index, specValue.id);
|
this.$set(this.currentSelceted, index, specValue.id);
|
||||||
|
|
||||||
let selectedSkuId = this.goodsSpec.find((i) => {
|
let selectedSkuId = this.goodsSpec.find((i) => {
|
||||||
let matched = true;
|
let matched = true;
|
||||||
let specValues = i.specValues.filter((j) => j.specName !== "images");
|
let specValues = i.specValues.filter((j) => j.specName !== "images");
|
||||||
|
|
||||||
for (let n = 0; n < specValues.length; n++) {
|
for (let n = 0; n < specValues.length; n++) {
|
||||||
if (specValues[n].specValueId !== this.currentSelceted[n]) {
|
if (specValues[n].specValueId !== this.currentSelceted[n]) {
|
||||||
matched = false;
|
matched = false;
|
||||||
|
@ -206,7 +204,11 @@ export default {
|
||||||
// 判断是否拼团商品
|
// 判断是否拼团商品
|
||||||
if (this.buyType) {
|
if (this.buyType) {
|
||||||
data.cartType = "PINTUAN";
|
data.cartType = "PINTUAN";
|
||||||
} else {
|
}
|
||||||
|
else if(this.goodsDetail.goodsType == 'VIRTUAL_GOODS'){
|
||||||
|
data.cartType = "VIRTUAL";
|
||||||
|
}
|
||||||
|
else {
|
||||||
data.cartType = "BUY_NOW";
|
data.cartType = "BUY_NOW";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -93,7 +93,6 @@ export default {
|
||||||
|
|
||||||
mounted() {
|
mounted() {
|
||||||
this.init();
|
this.init();
|
||||||
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
/**
|
/**
|
||||||
|
@ -108,13 +107,17 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 扫码
|
* TODO 扫码功能后续还会后续增加
|
||||||
|
* 应该实现的功能目前计划有:
|
||||||
|
* 扫描商品跳转商品页面
|
||||||
|
* 扫描活动跳转活动页面
|
||||||
|
* 扫描二维码登录
|
||||||
|
* 扫描其他站信息 弹出提示,返回首页。
|
||||||
*/
|
*/
|
||||||
seacnCode() {
|
seacnCode() {
|
||||||
uni.scanCode({
|
uni.scanCode({
|
||||||
success: function (res) {
|
success: function (res) {
|
||||||
let path = encodeURIComponent(res.result);
|
let path = encodeURIComponent(res.result);
|
||||||
// TODO 扫码功能后续还会后续增加
|
|
||||||
// 扫码成功后跳转到webview页面
|
// 扫码成功后跳转到webview页面
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
|
@ -125,26 +128,60 @@ 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
|
// #ifdef APP-PLUS
|
||||||
if (permision.judgeIosPermission("camera")) {
|
let isIos = plus.os.name == "iOS";
|
||||||
this.seacnCode();
|
// 判断是否是Ios
|
||||||
|
if (isIos) {
|
||||||
|
if (permision.judgeIosPermission("camera")) {
|
||||||
|
this.seacnCode();
|
||||||
|
} else {
|
||||||
|
// 没有权限提醒是否去申请权限
|
||||||
|
uni.showModal({
|
||||||
|
title: "提示",
|
||||||
|
content: "您已经关闭相机权限,去设置",
|
||||||
|
success: function (res) {
|
||||||
|
if (res.confirm) {
|
||||||
|
plus.runtime.openURL("app-settings:");
|
||||||
|
}
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
// 没有权限提醒是否去申请权限
|
// 安卓
|
||||||
uni.showModal({
|
const result = await permision.requestAndroidPermission("CAMERA");
|
||||||
title: "提示",
|
if (result == 1 || result == 0) {
|
||||||
content: "您已经关闭相机权限,去设置",
|
this.seacnCode();
|
||||||
success: function (res) {
|
} else {
|
||||||
if (res.confirm) {
|
this.tipsGetSettings();
|
||||||
plus.runtime.openURL("app-settings:");
|
}
|
||||||
}
|
|
||||||
},
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// #endif
|
// #endif
|
||||||
|
|
||||||
// #ifdef MP-WEIXIN
|
// #ifdef MP-WEIXIN
|
||||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 1.4 KiB |
|
@ -73,6 +73,7 @@ function cleanStorage() {
|
||||||
storage.setHasLogin(false);
|
storage.setHasLogin(false);
|
||||||
storage.setAccessToken("");
|
storage.setAccessToken("");
|
||||||
storage.setRefreshToken("");
|
storage.setRefreshToken("");
|
||||||
|
console.log("清空token")
|
||||||
storage.setUuid("");
|
storage.setUuid("");
|
||||||
storage.setUserInfo({});
|
storage.setUserInfo({});
|
||||||
|
|
||||||
|
@ -120,22 +121,26 @@ http.interceptors.request.use(
|
||||||
|
|
||||||
config.params = params;
|
config.params = params;
|
||||||
config.header.accessToken = accessToken;
|
config.header.accessToken = accessToken;
|
||||||
console.log(accessToken);
|
console.warn(accessToken);
|
||||||
/**
|
/**
|
||||||
* jwt 因为安卓以及ios没有window的属性
|
* jwt 因为安卓以及ios没有window的属性
|
||||||
* window.atob()这个函数 base64编码的使用方法就是btoa(),而用于解码的使用方法是atob(),
|
* window.atob()这个函数 base64编码的使用方法就是btoa(),而用于解码的使用方法是atob(),
|
||||||
* 所以使用手写 base-64 编码的字符串数据。
|
* 所以使用手写 base-64 编码的字符串数据。
|
||||||
*/
|
*/
|
||||||
//
|
|
||||||
const atob = (str) => Buffer.from(str, "base64").toString("binary");
|
const atob = (str) => Buffer.from(str, "base64").toString("binary");
|
||||||
// 判断如果过期时间小于我的当前时间,在请求上重新刷新token
|
// 判断如果过期时间小于我的当前时间,在请求上重新刷新token
|
||||||
if (accessToken.split(".").length <= 1) {
|
if (accessToken.split(".").length <= 1) {
|
||||||
refresh();
|
refresh();
|
||||||
} else {
|
} else {
|
||||||
|
console.log(
|
||||||
|
JSON.parse(atob(accessToken.split(".")[1])).exp,
|
||||||
|
Math.round(new Date() / 1000)
|
||||||
|
);
|
||||||
if (
|
if (
|
||||||
JSON.parse(atob(accessToken.split(".")[1])).exp <
|
JSON.parse(atob(accessToken.split(".")[1])).exp <
|
||||||
new Date().getTime() / 1000
|
Math.round(new Date() / 1000)
|
||||||
) {
|
) {
|
||||||
|
console.log("过期时间小于当前时间刷新token");
|
||||||
refresh();
|
refresh();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -154,28 +159,28 @@ http.interceptors.request.use(
|
||||||
async function refresh() {
|
async function refresh() {
|
||||||
// 本地储存的是过期token了,重新获取
|
// 本地储存的是过期token了,重新获取
|
||||||
const getTokenResult = await refreshToken();
|
const getTokenResult = await refreshToken();
|
||||||
// if (getTokenResult === "success") {
|
if (getTokenResult === "success") {
|
||||||
// // 获取新的token成功 刷新当前页面
|
// 获取新的token成功 刷新当前页面
|
||||||
|
|
||||||
// let routes = getCurrentPages(); // 获取当前打开过的页面路由数组
|
let routes = getCurrentPages(); // 获取当前打开过的页面路由数组
|
||||||
// let curRoute = routes[routes.length - 1].route; //获取当前页面路由
|
let curRoute = routes[routes.length - 1].route; //获取当前页面路由
|
||||||
// let curParam = routes[routes.length - 1].options; //获取路由参数
|
let curParam = routes[routes.length - 1].options; //获取路由参数
|
||||||
// // 拼接参数
|
// 拼接参数
|
||||||
// let param = "";
|
let param = "";
|
||||||
// for (let key in curParam) {
|
for (let key in curParam) {
|
||||||
// param += "&" + key + "=" + curParam[key];
|
param += "&" + key + "=" + curParam[key];
|
||||||
// }
|
}
|
||||||
// // 判断当前路径
|
// 判断当前路径
|
||||||
// if (curRoute.indexOf("pages/tabbar") == 1) {
|
if (curRoute.indexOf("pages/tabbar") == 1) {
|
||||||
// uni.switchTab({
|
uni.switchTab({
|
||||||
// url: "/" + curRoute + param.replace("&", "?"),
|
url: "/" + curRoute + param.replace("&", "?"),
|
||||||
// });
|
});
|
||||||
// }
|
}
|
||||||
|
|
||||||
// uni.redirectTo({
|
uni.redirectTo({
|
||||||
// url: "/" + curRoute + param.replace("&", "?"),
|
url: "/" + curRoute + param.replace("&", "?"),
|
||||||
// });
|
});
|
||||||
// }
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 必须使用异步函数,注意
|
// 必须使用异步函数,注意
|
||||||
|
@ -184,7 +189,7 @@ 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
|
||||||
|
|
Loading…
Reference in New Issue