From 77147e65c3ba20532833c53264576ce6216b25c8 Mon Sep 17 00:00:00 2001 From: xuwenbo <717567226@qq.com> Date: Mon, 14 Sep 2020 09:56:54 +0800 Subject: [PATCH 1/8] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=8F=82=E5=9B=A2?= =?UTF-8?q?=E8=8E=B7=E5=8F=96=E4=B8=8D=E5=88=B0uniqueId?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/activity/GroupRule/index.vue | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pages/activity/GroupRule/index.vue b/pages/activity/GroupRule/index.vue index 52db565..30ad73d 100644 --- a/pages/activity/GroupRule/index.vue +++ b/pages/activity/GroupRule/index.vue @@ -111,6 +111,7 @@ export default { pinkT: [], //团长信息 storeCombination: [], //拼团产品 pinkId: 0, + uniqueId: "", count: 0, //拼团剩余人数 iShidden: false }; @@ -208,6 +209,7 @@ export default { that.$set(that, "pinkBool", res.data.pinkBool); that.$set(that, "isOk", res.data.isOk); that.$set(that, "currentPinkOrder", res.data.currentPinkOrder); + that.$set(that, "uniqueId", res.data.uniqueId); }); }, //拼团取消 From 79930429d825af7620ec963e0e21e7b64a721cfe Mon Sep 17 00:00:00 2001 From: xuwenbo <717567226@qq.com> Date: Mon, 14 Sep 2020 10:11:26 +0800 Subject: [PATCH 2/8] =?UTF-8?q?h5=E6=B5=B7=E6=8A=A5=E4=B8=8D=E8=83=BD?= =?UTF-8?q?=E7=94=9F=E6=88=90=E5=88=86=E9=94=80=E5=85=B3=E7=B3=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/Loading/index.vue | 7 +++++-- utils/index.js | 13 ++++++++----- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/pages/Loading/index.vue b/pages/Loading/index.vue index 0959adc..43cd7fe 100644 --- a/pages/Loading/index.vue +++ b/pages/Loading/index.vue @@ -18,7 +18,7 @@ import { mapState, mapMutations, mapActions } from "vuex"; import { wxappAuth, getUser } from "@/api/user"; import dayjs from "dayjs"; import cookie from "@/utils/store/cookie"; -import { parseQuery, login, handleQrCode } from "@/utils"; +import { parseQuery, login, handleQrCode ,getCurrentPageUrl,handleUrlParam} from "@/utils"; export default { name: "Loading", @@ -26,8 +26,11 @@ export default { return {}; }, onShow() { - + var url = handleQrCode(); + if(!url){ + url = handleUrlParam(getCurrentPageUrl()) + } // 判断是否是分销 if (url) { var spread = cookie.get("spread"); diff --git a/utils/index.js b/utils/index.js index eaf884b..802a37f 100644 --- a/utils/index.js +++ b/utils/index.js @@ -821,7 +821,7 @@ export const handleLoginFailure = () => { let path = '/' + getCurrentPageUrlWithArgs() console.log("getCurrentPageUrl",getCurrentPageUrl()); //判断小程序转发分享商品详情进来的 - if (getCurrentPageUrl() == 'pages/shop/GoodsCon/index' && handleUrlParam(path) && !handleQrCode()) { + if (getCurrentPageUrl() == 'pages/shop/GoodsCon/index' && handleUrlParam(path) ) { debugger; console.log('————————') console.log('判断小程序转发分享商品详情进来的') @@ -846,7 +846,7 @@ export const handleLoginFailure = () => { } // 是分享转发拼团进来的 - if (getCurrentPageUrl() == 'pages/activity/GroupDetails/index' && handleUrlParam(path) && !handleQrCode()) { + if (getCurrentPageUrl() == 'pages/activity/GroupDetails/index' && handleUrlParam(path)) { console.log('————————') console.log('是分享转发拼团进来的') console.log('————————') @@ -870,7 +870,7 @@ export const handleLoginFailure = () => { } // 是分享转发秒杀进来的 - if (getCurrentPageUrl() == 'pages/activity/SeckillDetails/index' && handleUrlParam(path) && !handleQrCode()) { + if (getCurrentPageUrl() == 'pages/activity/SeckillDetails/index' && handleUrlParam(path)) { console.log('————————') console.log('是分享转发秒杀进来的') console.log('————————') @@ -894,7 +894,7 @@ export const handleLoginFailure = () => { } // 判断是不是转发分享的砍价海报进来的 - if (getCurrentPageUrl() == 'pages/activity/DargainDetails/index' && handleUrlParam(path) && !handleQrCode()) { + if (getCurrentPageUrl() == 'pages/activity/DargainDetails/index' && handleUrlParam(path)) { console.log('————————') console.log('判断是不是转发分享的砍价海报进来的') console.log('————————') @@ -918,12 +918,15 @@ export const handleLoginFailure = () => { } } // 判断是不是拼团进来的 - if (getCurrentPageUrl() == 'pages/activity/GroupRule/index' && handleQrCode()) { + if (getCurrentPageUrl() == 'pages/activity/GroupRule/index' ) { console.log('————————') console.log('是拼团进来的') console.log('————————') let url = handleQrCode(); + if(!url){ + url = handleUrlParam(path); + } console.log(url) if (url) { path = parseUrl({ From bd82399ff1892167d8928a6bc757212d19788fdc Mon Sep 17 00:00:00 2001 From: xuwenbo <717567226@qq.com> Date: Mon, 14 Sep 2020 10:44:03 +0800 Subject: [PATCH 3/8] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=88=AA=E5=8F=96url?= =?UTF-8?q?=E6=98=AF=E5=90=A6=E5=B8=A6=E5=8F=82=E6=95=B0=E7=9A=84=E5=88=A4?= =?UTF-8?q?=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- utils/index.js | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/utils/index.js b/utils/index.js index 802a37f..d8e91a3 100644 --- a/utils/index.js +++ b/utils/index.js @@ -681,13 +681,14 @@ export function handleQrCode() { export function handleUrlParam(path) { console.log(path) - - var url = path.split("?")[1]; //获取url中"?"符后的字串 - console.log(url) var theRequest = new Object(); - let strs = url.split("&"); - for (var i = 0; i < strs.length; i++) { - theRequest[strs[i].split("=")[0]] = unescape(strs[i].split("=")[1]); + if(path.includes("?")){ + var url = path.split("?")[1]; //获取url中"?"符后的字串 + console.log(url) + let strs = url.split("&"); + for (var i = 0; i < strs.length; i++) { + theRequest[strs[i].split("=")[0]] = unescape(strs[i].split("=")[1]); + } } return theRequest; } From 736fd5b5a22e172dc59ef485b23bf6dc7a262738 Mon Sep 17 00:00:00 2001 From: xuwenbo <717567226@qq.com> Date: Mon, 14 Sep 2020 13:39:49 +0800 Subject: [PATCH 4/8] =?UTF-8?q?=E5=85=AC=E4=BC=97=E5=8F=B7=E6=8E=88?= =?UTF-8?q?=E6=9D=83=E7=99=BB=E5=BD=95spread=E8=BD=AC=E6=8D=A2=E5=BC=82?= =?UTF-8?q?=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- libs/wechat.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libs/wechat.js b/libs/wechat.js index da1849a..01a0e49 100644 --- a/libs/wechat.js +++ b/libs/wechat.js @@ -124,6 +124,7 @@ export function clearAuthStatus() { export function oAuth() { console.log('处理微信授权') + console.log('处理微信授权cookie',cookie.get("spread")) console.log(store) console.log(store.state) return new Promise((resolve, reject) => { @@ -147,7 +148,7 @@ export function auth(code) { console.log('获取微信授权') return new Promise((resolve, reject) => { let loginType = cookie.get(LOGINTYPE); - wechatAuth(code, parseInt(cookie.get("spread")), loginType) + wechatAuth(code, cookie.get("spread"), loginType) .then(({ data }) => { console.log(data) const expires_time = dayjs(data.expires_time); From 3d519fa84020fb2aafd9b4c09d810ea25946cf84 Mon Sep 17 00:00:00 2001 From: xuwenbo <717567226@qq.com> Date: Mon, 14 Sep 2020 14:21:52 +0800 Subject: [PATCH 5/8] =?UTF-8?q?=E5=8D=87=E7=BA=A7=E7=9B=B4=E6=92=AD?= =?UTF-8?q?=E7=BB=84=E4=BB=B61.1.9->1.1.10?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.json b/manifest.json index 37a8309..c647f3d 100644 --- a/manifest.json +++ b/manifest.json @@ -143,7 +143,7 @@ "plugins" : { "live-player-plugin" : { // 注意填写该直播组件最新版本号,微信开发者工具调试时可获取最新版本号(复制时请去掉注释) - "version" : "1.1.9", + "version" : "1.1.10", // 必须填该直播组件appid,该示例值即为直播组件appid(复制时请去掉注释) "provider" : "wx2b03c6e691cd7370" } From f449f9cf58c756378bf59c1c68ab9d7ab93f7d5e Mon Sep 17 00:00:00 2001 From: xuwenbo <717567226@qq.com> Date: Mon, 14 Sep 2020 14:50:54 +0800 Subject: [PATCH 6/8] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E7=89=88=E6=9C=AC?= =?UTF-8?q?=E6=9B=B4=E6=96=B0=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App.vue | 39 +++++++++++++++++++++++++++++++++------ 1 file changed, 33 insertions(+), 6 deletions(-) diff --git a/App.vue b/App.vue index 51526d2..09a834b 100644 --- a/App.vue +++ b/App.vue @@ -1,8 +1,35 @@ <script> import Vue from 'vue' export default { - onLaunch: function () { - console.log("App Launch"); + onLaunch: function() { + // debugger + const updateManager = uni.getUpdateManager() + updateManager.onCheckForUpdate(function (res) { + // 请求完新版本信息的回调 + console.log(res.hasUpdate) + }) + // 下载新版本 + updateManager.onUpdateReady(function () { + uni.showModal({ + title: '更新提示', + content: '新版本已经准备好,是否重启应用?', + success(res) { + if (res.confirm) { + // 重启应用 + updateManager.applyUpdate() + } + } + }) + }) + // 新版本下载失败 + updateManager.onUpdateFailed(function (res) { + // 新的版本下载失败 + uni.showModal({ + title: '已经有新版本了哟~', + content: '新版本已经上线啦~,请您删除当前小程序,重新搜索打开哟~', + }) + + }) }, onShow: function () { console.log("App Show"); @@ -43,17 +70,17 @@ export default { }); }); }, - + // 自动登录 async autoLogin(data) { - + }, }, - + }; </script> - + <style lang="less"> /*每个页面公共css */ @import "animate.css"; From 150724b80da65b14996f861956cf8d9ff1e6abad Mon Sep 17 00:00:00 2001 From: xuwenbo <717567226@qq.com> Date: Mon, 14 Sep 2020 17:06:17 +0800 Subject: [PATCH 7/8] =?UTF-8?q?=E5=8A=A8=E6=80=81=E6=8E=A7=E5=88=B6?= =?UTF-8?q?=E5=85=85=E5=80=BC=E6=8C=89=E9=92=AE=E6=98=BE=E7=A4=BA=E9=9A=90?= =?UTF-8?q?=E8=97=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/index.js | 4 ++-- pages/user/UserAccount/index.vue | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/config/index.js b/config/index.js index b46828a..191bc6d 100644 --- a/config/index.js +++ b/config/index.js @@ -1,7 +1,7 @@ // export const VUE_APP_API_URL = 'http://natapp.xinxintuan.co/api'; // export const VUE_APP_API_URL = 'https://wxapi.yixiang.co/api'; -// export const VUE_APP_API_URL = 'http://192.168.31.223:8008/api'; -export const VUE_APP_API_URL = 'https://h5api.xinxintuan.co/api'; +export const VUE_APP_API_URL = 'http://127.0.0.1:8008/api'; +// export const VUE_APP_API_URL = 'https://h5api.xinxintuan.co/api'; export const VUE_APP_RESOURCES_URL = 'https://wx.yixiang.co/static'; diff --git a/pages/user/UserAccount/index.vue b/pages/user/UserAccount/index.vue index 17852a7..0b6cfbc 100644 --- a/pages/user/UserAccount/index.vue +++ b/pages/user/UserAccount/index.vue @@ -8,7 +8,7 @@ <view>总资产(元)</view> <view class="money">{{ now_money }}</view> </view> - <navigator url="/pages/user/Recharge/index" class="recharge font-color-red">充值</navigator> + <navigator url="/pages/user/Recharge/index" class="recharge font-color-red" v-if="is_hide=='0'">充值</navigator> </view> <view class="cumulative acea-row row-top"> <view class="item"> @@ -31,7 +31,7 @@ </view> <view>消费记录</view> </view> - <view class="item" @click="goUserBill(2)"> + <view class="item" @click="goUserBill(2)" v-if="is_hide=='0'"> <view class="pictrue"> <image src="@/static/images/record3.png" /> </view> @@ -54,6 +54,7 @@ export default { props: {}, data: function() { return { + is_hide: "1", now_money: 0, orderStatusSum: 0, recharge: 0, @@ -82,6 +83,7 @@ export default { that.now_money = res.data.now_money; that.orderStatusSum = res.data.orderStatusSum; that.recharge = res.data.recharge; + this.is_hide = res.data.is_hide; }, err => { uni.showToast({ From 181314b6a6b99bac6c7b62bc7f758a2d824779dc Mon Sep 17 00:00:00 2001 From: xuwenbo <717567226@qq.com> Date: Mon, 14 Sep 2020 20:30:14 +0800 Subject: [PATCH 8/8] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/index.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/config/index.js b/config/index.js index 191bc6d..4a72380 100644 --- a/config/index.js +++ b/config/index.js @@ -1,7 +1,5 @@ -// export const VUE_APP_API_URL = 'http://natapp.xinxintuan.co/api'; // export const VUE_APP_API_URL = 'https://wxapi.yixiang.co/api'; export const VUE_APP_API_URL = 'http://127.0.0.1:8008/api'; -// export const VUE_APP_API_URL = 'https://h5api.xinxintuan.co/api'; export const VUE_APP_RESOURCES_URL = 'https://wx.yixiang.co/static';