diff --git a/components/m-share/index.vue b/components/m-share/index.vue index 449ea4b..0f8d394 100644 --- a/components/m-share/index.vue +++ b/components/m-share/index.vue @@ -8,7 +8,7 @@ - @@ -19,7 +19,7 @@ {{ item.title }} - + {{ '复制链接' }} @@ -62,6 +62,16 @@ export default { close() { this.$emit("close"); }, + weChatShare(){ + this.$u.mpShare = { + title: this.shareTitle(), // 默认为小程序名称,可自定义 + path: '', // 默认为当前页面路径,一般无需修改,QQ小程序不支持 + // 分享图标,路径可以是本地文件路径、代码包文件路径或者网络图片路径。 + // 支持PNG及JPG,默认为当前页面的截图 + imageUrl: this.thumbnail ||'' + } + }, + // h5复制链接 // #ifdef H5 copyLink() { @@ -93,13 +103,13 @@ export default { shareTitle() { let shareTitle; if (this.type == "goods") { - shareTitle = `我发现了一个${this.goodsName}商品快来跟我一起看看吧`; + shareTitle = `[好友推荐]${this.goodsName}快来跟我一起看看吧`; } else if (this.type == "shops") { - shareTitle = `我发现了一个${this.goodsName}店铺快来跟我一起看看吧`; + shareTitle = `[好友发现]${this.goodsName}快来跟我一起看看吧`; } else if (this.type == "pintuan") { - shareTitle = `我拼了一个${this.goodsName}快来跟我一起抢购吧!`; + shareTitle = `[好友邀请]${this.goodsName}快来跟我一起抢购吧!`; } else if (this.type == "kanjia") { - shareTitle = `请快来帮我砍一刀${this.goodsName}`; + shareTitle = `[好友邀请]请快来帮我砍一刀${this.goodsName}`; } return shareTitle; }, diff --git a/main.js b/main.js index 37296c1..3ea0c2b 100644 --- a/main.js +++ b/main.js @@ -16,6 +16,9 @@ let btn = Vue.component("airBtn", airBtn); //全局注册 document.body.appendChild(new btn().$mount().$el); // #endif +// 引入uView对小程序分享的mixin封装 +let mpShare = require('uview-ui/libs/mixin/mpShare.js'); +Vue.mixin(mpShare) /** * 全局filters diff --git a/pages/mine/set/setUp.vue b/pages/mine/set/setUp.vue index 61be1db..f09afcc 100644 --- a/pages/mine/set/setUp.vue +++ b/pages/mine/set/setUp.vue @@ -65,8 +65,14 @@ export default { * 清除缓存重新登录 */ async confirm() { - await logout(); - this.clear(); + try{ + await logout(); + this.clear(); + }catch(e){ + //TODO handle the exception + this.clear(); + } + }, /** diff --git a/pages/order/afterSales/afterSales.vue b/pages/order/afterSales/afterSales.vue index b9bbb36..44bc5cc 100644 --- a/pages/order/afterSales/afterSales.vue +++ b/pages/order/afterSales/afterSales.vue @@ -125,6 +125,7 @@
-
- +
+ +
+ diff --git a/pages/tabbar/home/template/tpl_promotions_detail.vue b/pages/tabbar/home/template/tpl_promotions_detail.vue index 3008aa7..7b411a8 100644 --- a/pages/tabbar/home/template/tpl_promotions_detail.vue +++ b/pages/tabbar/home/template/tpl_promotions_detail.vue @@ -39,8 +39,10 @@ :key="_index" >
- diff --git a/pages/tabbar/home/views.vue b/pages/tabbar/home/views.vue index e919e0e..4c4ef73 100644 --- a/pages/tabbar/home/views.vue +++ b/pages/tabbar/home/views.vue @@ -50,7 +50,7 @@
- +
@@ -125,6 +125,7 @@ export default { getFloorData().then((res) => { if (res.data.success) { this.pageData = JSON.parse(res.data.result.pageData); + console.log(this.pageData); } }); }, diff --git a/plugins/APPUpdate/index.js b/plugins/APPUpdate/index.js index 595514a..cfa6979 100644 --- a/plugins/APPUpdate/index.js +++ b/plugins/APPUpdate/index.js @@ -854,7 +854,7 @@ function downloadPopup(data, callback, cancelCallback, rebootCallback) { export default function (isPrompt = false) { getCurrentNo((version) => { getServerNo((res) => { - if (res.versionCode.replace(/\./g, "") <= version.version) { + if (res.versionCode.replace(/\./g, "") <= version.version.replace(/\./g, "") ) { return false; } diff --git a/utils/request.js b/utils/request.js index 3cb42cc..e7b0ccc 100644 --- a/utils/request.js +++ b/utils/request.js @@ -121,6 +121,7 @@ http.interceptors.response.use( if (!isRefreshing) { console.log('旧token',token) isRefreshing = true; + storage.setAccessToken('') let oldRefreshToken = storage.getRefreshToken(); //调用刷新token的接口 return refreshTokenFn(oldRefreshToken)