Merge branch 'master' of gitee.com:beijing_hongye_huicheng/lilishop-uniapp
commit
a555009ac9
|
@ -8,7 +8,7 @@
|
||||||
<view class="share-list">
|
<view class="share-list">
|
||||||
<!-- #ifdef MP-WEIXIN -->
|
<!-- #ifdef MP-WEIXIN -->
|
||||||
<view class="share-item">
|
<view class="share-item">
|
||||||
<button class="share-btn" open-type="share">
|
<button class="share-btn" @click="weChatShare" open-type="share">
|
||||||
<u-icon color="#04BE02" size="80" name="weixin-fill"></u-icon>微信好友
|
<u-icon color="#04BE02" size="80" name="weixin-fill"></u-icon>微信好友
|
||||||
</button>
|
</button>
|
||||||
</view>
|
</view>
|
||||||
|
@ -19,7 +19,7 @@
|
||||||
<view>{{ item.title }}</view>
|
<view>{{ item.title }}</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- #endif -->
|
<!-- #endif -->
|
||||||
<!-- #ifdef H5 -->
|
<!-- #ifdef H5 -->
|
||||||
<view class="share-item" @click="copyLink()">
|
<view class="share-item" @click="copyLink()">
|
||||||
<u-icon color="#b4aee8" size="80" name="share-fill"></u-icon>
|
<u-icon color="#b4aee8" size="80" name="share-fill"></u-icon>
|
||||||
<view>{{ '复制链接' }}</view>
|
<view>{{ '复制链接' }}</view>
|
||||||
|
@ -62,6 +62,16 @@ export default {
|
||||||
close() {
|
close() {
|
||||||
this.$emit("close");
|
this.$emit("close");
|
||||||
},
|
},
|
||||||
|
weChatShare(){
|
||||||
|
this.$u.mpShare = {
|
||||||
|
title: this.shareTitle(), // 默认为小程序名称,可自定义
|
||||||
|
path: '', // 默认为当前页面路径,一般无需修改,QQ小程序不支持
|
||||||
|
// 分享图标,路径可以是本地文件路径、代码包文件路径或者网络图片路径。
|
||||||
|
// 支持PNG及JPG,默认为当前页面的截图
|
||||||
|
imageUrl: this.thumbnail ||''
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
// h5复制链接
|
// h5复制链接
|
||||||
// #ifdef H5
|
// #ifdef H5
|
||||||
copyLink() {
|
copyLink() {
|
||||||
|
@ -93,13 +103,13 @@ export default {
|
||||||
shareTitle() {
|
shareTitle() {
|
||||||
let shareTitle;
|
let shareTitle;
|
||||||
if (this.type == "goods") {
|
if (this.type == "goods") {
|
||||||
shareTitle = `我发现了一个${this.goodsName}商品快来跟我一起看看吧`;
|
shareTitle = `[好友推荐]${this.goodsName}快来跟我一起看看吧`;
|
||||||
} else if (this.type == "shops") {
|
} else if (this.type == "shops") {
|
||||||
shareTitle = `我发现了一个${this.goodsName}店铺快来跟我一起看看吧`;
|
shareTitle = `[好友发现]${this.goodsName}快来跟我一起看看吧`;
|
||||||
} else if (this.type == "pintuan") {
|
} else if (this.type == "pintuan") {
|
||||||
shareTitle = `我拼了一个${this.goodsName}快来跟我一起抢购吧!`;
|
shareTitle = `[好友邀请]${this.goodsName}快来跟我一起抢购吧!`;
|
||||||
} else if (this.type == "kanjia") {
|
} else if (this.type == "kanjia") {
|
||||||
shareTitle = `请快来帮我砍一刀${this.goodsName}`;
|
shareTitle = `[好友邀请]请快来帮我砍一刀${this.goodsName}`;
|
||||||
}
|
}
|
||||||
return shareTitle;
|
return shareTitle;
|
||||||
},
|
},
|
||||||
|
|
3
main.js
3
main.js
|
@ -16,6 +16,9 @@ let btn = Vue.component("airBtn", airBtn); //全局注册
|
||||||
document.body.appendChild(new btn().$mount().$el);
|
document.body.appendChild(new btn().$mount().$el);
|
||||||
// #endif
|
// #endif
|
||||||
|
|
||||||
|
// 引入uView对小程序分享的mixin封装
|
||||||
|
let mpShare = require('uview-ui/libs/mixin/mpShare.js');
|
||||||
|
Vue.mixin(mpShare)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 全局filters
|
* 全局filters
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
|
|
||||||
<view>
|
<view>
|
||||||
<view style="margin:20rpx 0; color:#003a8c;" @click="navigateTo('/pages/mine/help/tips?type=user')">《{{config.name}}用户协议》</view>
|
<view style="margin:20rpx 0; color:#003a8c;" @click="navigateTo('/pages/mine/help/tips?type=user')">《{{config.name}}用户协议》</view>
|
||||||
<view>CopyRight @{{config.name}} </view>
|
<view>CopyRight ©{{config.name}} </view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
|
@ -65,8 +65,14 @@ export default {
|
||||||
* 清除缓存重新登录
|
* 清除缓存重新登录
|
||||||
*/
|
*/
|
||||||
async confirm() {
|
async confirm() {
|
||||||
await logout();
|
try{
|
||||||
this.clear();
|
await logout();
|
||||||
|
this.clear();
|
||||||
|
}catch(e){
|
||||||
|
//TODO handle the exception
|
||||||
|
this.clear();
|
||||||
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -125,6 +125,7 @@
|
||||||
<div class="sale" v-if="current === 0 && sku.afterSaleStatus">
|
<div class="sale" v-if="current === 0 && sku.afterSaleStatus">
|
||||||
<div
|
<div
|
||||||
v-if="
|
v-if="
|
||||||
|
order.flowPrice != 0 &&
|
||||||
sku.afterSaleStatus.includes('NOT_APPLIED') ||
|
sku.afterSaleStatus.includes('NOT_APPLIED') ||
|
||||||
sku.afterSaleStatus.includes('PART_AFTER_SALE')
|
sku.afterSaleStatus.includes('PART_AFTER_SALE')
|
||||||
"
|
"
|
||||||
|
|
|
@ -335,12 +335,6 @@ export default {
|
||||||
type: "error",
|
type: "error",
|
||||||
});
|
});
|
||||||
return false;
|
return false;
|
||||||
} else if (checkBankno(this.form.bankAccountNumber) === false) {
|
|
||||||
this.$refs.uToast.show({
|
|
||||||
title: "银行卡卡号不正确",
|
|
||||||
type: "error",
|
|
||||||
});
|
|
||||||
return false;
|
|
||||||
} else if (this.$u.test.chinese(this.form.bankAccountName) === false) {
|
} else if (this.$u.test.chinese(this.form.bankAccountName) === false) {
|
||||||
this.$refs.uToast.show({
|
this.$refs.uToast.show({
|
||||||
title: "银行开户名输入错误",
|
title: "银行开户名输入错误",
|
||||||
|
|
|
@ -605,15 +605,7 @@ export default {
|
||||||
this.init(this.routerVal.id, this.routerVal.goodsId, this.routerVal.distributionId);
|
this.init(this.routerVal.id, this.routerVal.goodsId, this.routerVal.distributionId);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// #ifdef MP-WEIXIN
|
|
||||||
onShareAppMessage(res) {
|
|
||||||
return {
|
|
||||||
path: this.share(),
|
|
||||||
title: `[好友推荐]${this.goodsDetail.goodsName}`,
|
|
||||||
imageUrl: this.goodsDetail.goodsGalleryList[0],
|
|
||||||
};
|
|
||||||
},
|
|
||||||
// #endif
|
|
||||||
methods: {
|
methods: {
|
||||||
share() {
|
share() {
|
||||||
return `/pages/product/goods?id=${this.routerVal.id}&goodsId=${this.routerVal.goodsId}`;
|
return `/pages/product/goods?id=${this.routerVal.id}&goodsId=${this.routerVal.goodsId}`;
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="layout">
|
<div class="layout">
|
||||||
<div class="box">
|
<div class="box">
|
||||||
<u-swiper @click="clickSwiper" interval="5000" duration="500" height="300" v-if="res" name="img" :list="res.list">
|
<u-swiper @click="clickSwiper" interval="5000" duration="500" height="350" v-if="res" name="img" :list="res.list">
|
||||||
<u-loading slot="loading"></u-loading>
|
<u-loading slot="loading"></u-loading>
|
||||||
</u-swiper>
|
</u-swiper>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -39,8 +39,10 @@
|
||||||
:key="_index"
|
:key="_index"
|
||||||
>
|
>
|
||||||
<div class="item-img-box">
|
<div class="item-img-box">
|
||||||
<img
|
<u-image
|
||||||
class="item-img"
|
class="item-img"
|
||||||
|
width="156rpx"
|
||||||
|
height="156rpx"
|
||||||
:src="i.thumbnail ? i.thumbnail : i.goodsImage"
|
:src="i.thumbnail ? i.thumbnail : i.goodsImage"
|
||||||
alt
|
alt
|
||||||
/>
|
/>
|
||||||
|
|
|
@ -854,7 +854,7 @@ function downloadPopup(data, callback, cancelCallback, rebootCallback) {
|
||||||
export default function (isPrompt = false) {
|
export default function (isPrompt = false) {
|
||||||
getCurrentNo((version) => {
|
getCurrentNo((version) => {
|
||||||
getServerNo((res) => {
|
getServerNo((res) => {
|
||||||
if (res.versionCode.replace(/\./g, "") <= version.version) {
|
if (res.versionCode.replace(/\./g, "") <= version.version.replace(/\./g, "") ) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -121,6 +121,7 @@ http.interceptors.response.use(
|
||||||
if (!isRefreshing) {
|
if (!isRefreshing) {
|
||||||
console.log('旧token',token)
|
console.log('旧token',token)
|
||||||
isRefreshing = true;
|
isRefreshing = true;
|
||||||
|
storage.setAccessToken('')
|
||||||
let oldRefreshToken = storage.getRefreshToken();
|
let oldRefreshToken = storage.getRefreshToken();
|
||||||
//调用刷新token的接口
|
//调用刷新token的接口
|
||||||
return refreshTokenFn(oldRefreshToken)
|
return refreshTokenFn(oldRefreshToken)
|
||||||
|
|
Loading…
Reference in New Issue