合并重提
This commit is contained in:
31
App.vue
31
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");
|
||||
|
@ -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) => {
|
||||
|
@ -143,7 +143,7 @@
|
||||
"plugins" : {
|
||||
"live-player-plugin" : {
|
||||
// 注意填写该直播组件最新版本号,微信开发者工具调试时可获取最新版本号(复制时请去掉注释)
|
||||
"version" : "1.1.9",
|
||||
"version" : "1.1.10",
|
||||
// 必须填该直播组件appid,该示例值即为直播组件appid(复制时请去掉注释)
|
||||
"provider" : "wx2b03c6e691cd7370"
|
||||
}
|
||||
|
@ -431,9 +431,9 @@
|
||||
"borderStyle": "black",
|
||||
"backgroundColor": "#ffffff",
|
||||
"height": "50px",
|
||||
"fontSize": "10px",
|
||||
"iconWidth": "24px",
|
||||
"spacing": "3px",
|
||||
"fontSize": "8px",
|
||||
"iconWidth": "16px",
|
||||
"spacing": "-3px",
|
||||
"list": [{
|
||||
"pagePath": "pages/home/index",
|
||||
"iconPath": "static/icon-home.png",
|
||||
|
@ -7,42 +7,33 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
mapState,
|
||||
mapMutations,
|
||||
mapActions
|
||||
} from "vuex";
|
||||
// 组件
|
||||
// import request from "@//api/request";
|
||||
import {
|
||||
wxappAuth,
|
||||
getUser
|
||||
} from "@/api/user";
|
||||
import dayjs from "dayjs";
|
||||
import cookie from "@/utils/store/cookie";
|
||||
import {
|
||||
parseQuery,
|
||||
login,
|
||||
handleQrCode
|
||||
} from "@/utils";
|
||||
import { mapState, mapMutations, mapActions } from "vuex";
|
||||
// 组件
|
||||
// import request from "@//api/request";
|
||||
import { wxappAuth, getUser } from "@/api/user";
|
||||
import dayjs from "dayjs";
|
||||
import cookie from "@/utils/store/cookie";
|
||||
import { parseQuery, login, handleQrCode ,getCurrentPageUrl,handleUrlParam} from "@/utils";
|
||||
|
||||
export default {
|
||||
name: "Loading",
|
||||
data() {
|
||||
return {};
|
||||
},
|
||||
onShow() {
|
||||
export default {
|
||||
name: "Loading",
|
||||
data() {
|
||||
return {};
|
||||
},
|
||||
onShow() {
|
||||
|
||||
var url = handleQrCode();
|
||||
// 判断是否是分销
|
||||
if (url) {
|
||||
var spread = cookie.get("spread");
|
||||
let urlSpread = parseInt(url.spread);
|
||||
if (!Number.isNaN(urlSpread) && spread !== urlSpread) {
|
||||
cookie.set("spread", urlSpread || 0);
|
||||
} else if (spread === 0 || typeof spread !== "number") {
|
||||
cookie.set("spread", urlSpread || 0);
|
||||
}
|
||||
var url = handleQrCode();
|
||||
if(!url){
|
||||
url = handleUrlParam(getCurrentPageUrl())
|
||||
}
|
||||
// 判断是否是分销
|
||||
if (url) {
|
||||
var spread = cookie.get("spread");
|
||||
let urlSpread = parseInt(url.spread);
|
||||
if (!Number.isNaN(urlSpread) && spread !== urlSpread) {
|
||||
cookie.set("spread", urlSpread || 0);
|
||||
} else if (spread === 0 || typeof spread !== "number") {
|
||||
cookie.set("spread", urlSpread || 0);
|
||||
}
|
||||
if (this.$store.getters.token) {
|
||||
this.toLaunch();
|
||||
|
@ -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);
|
||||
});
|
||||
},
|
||||
//拼团取消
|
||||
|
@ -128,7 +128,6 @@
|
||||
// }
|
||||
},
|
||||
goRoom(live) {
|
||||
console.log(live.roomId,9999)
|
||||
wx.navigateTo({
|
||||
url: `plugin-private://wx2b03c6e691cd7370/pages/live-player-plugin?room_id=${live.roomId}`
|
||||
});
|
||||
|
@ -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({
|
||||
|
@ -718,13 +718,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中"?"符后的字串
|
||||
let strs = url.split("&");
|
||||
for (var i = 0; i < strs.length; i++) {
|
||||
theRequest[strs[i].split("=")[0]] = unescape(strs[i].split("=")[1]);
|
||||
}
|
||||
}
|
||||
return theRequest;
|
||||
}
|
||||
@ -856,7 +857,6 @@ export const handleLoginFailure = () => {
|
||||
console.log('————————')
|
||||
store.commit("updateAuthorizationPage", true);
|
||||
let path = '/' + getCurrentPageUrlWithArgs()
|
||||
console.log("getCurrentPageUrl", getCurrentPageUrl());
|
||||
//判断小程序转发分享商品详情进来的
|
||||
if (getCurrentPageUrl() == 'pages/shop/GoodsCon/index' && handleUrlParam(path) && !handleQrCode()) {
|
||||
console.log('————————')
|
||||
@ -954,13 +954,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();
|
||||
console.log(url)
|
||||
if(!url){
|
||||
url = handleUrlParam(path);
|
||||
}
|
||||
if (url) {
|
||||
path = parseUrl({
|
||||
path: `/${getCurrentPageUrl()}`,
|
||||
@ -1003,6 +1005,7 @@ export const handleLoginFailure = () => {
|
||||
}
|
||||
|
||||
if (getCurrentPageUrl() == 'pages/shop/GoodsCon/index' && handleQrCode()) {
|
||||
debugger;
|
||||
console.log('————————')
|
||||
console.log('是扫描的商品详情')
|
||||
console.log('————————')
|
||||
|
Reference in New Issue
Block a user