合并重提
This commit is contained in:
31
App.vue
31
App.vue
@ -1,8 +1,35 @@
|
|||||||
<script>
|
<script>
|
||||||
import Vue from 'vue'
|
import Vue from 'vue'
|
||||||
export default {
|
export default {
|
||||||
onLaunch: function () {
|
onLaunch: function() {
|
||||||
console.log("App Launch");
|
// 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 () {
|
onShow: function () {
|
||||||
console.log("App Show");
|
console.log("App Show");
|
||||||
|
|||||||
@ -124,6 +124,7 @@ export function clearAuthStatus() {
|
|||||||
|
|
||||||
export function oAuth() {
|
export function oAuth() {
|
||||||
console.log('处理微信授权')
|
console.log('处理微信授权')
|
||||||
|
console.log('处理微信授权cookie',cookie.get("spread"))
|
||||||
console.log(store)
|
console.log(store)
|
||||||
console.log(store.state)
|
console.log(store.state)
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
|
|||||||
@ -143,7 +143,7 @@
|
|||||||
"plugins" : {
|
"plugins" : {
|
||||||
"live-player-plugin" : {
|
"live-player-plugin" : {
|
||||||
// 注意填写该直播组件最新版本号,微信开发者工具调试时可获取最新版本号(复制时请去掉注释)
|
// 注意填写该直播组件最新版本号,微信开发者工具调试时可获取最新版本号(复制时请去掉注释)
|
||||||
"version" : "1.1.9",
|
"version" : "1.1.10",
|
||||||
// 必须填该直播组件appid,该示例值即为直播组件appid(复制时请去掉注释)
|
// 必须填该直播组件appid,该示例值即为直播组件appid(复制时请去掉注释)
|
||||||
"provider" : "wx2b03c6e691cd7370"
|
"provider" : "wx2b03c6e691cd7370"
|
||||||
}
|
}
|
||||||
|
|||||||
@ -431,9 +431,9 @@
|
|||||||
"borderStyle": "black",
|
"borderStyle": "black",
|
||||||
"backgroundColor": "#ffffff",
|
"backgroundColor": "#ffffff",
|
||||||
"height": "50px",
|
"height": "50px",
|
||||||
"fontSize": "10px",
|
"fontSize": "8px",
|
||||||
"iconWidth": "24px",
|
"iconWidth": "16px",
|
||||||
"spacing": "3px",
|
"spacing": "-3px",
|
||||||
"list": [{
|
"list": [{
|
||||||
"pagePath": "pages/home/index",
|
"pagePath": "pages/home/index",
|
||||||
"iconPath": "static/icon-home.png",
|
"iconPath": "static/icon-home.png",
|
||||||
|
|||||||
@ -7,42 +7,33 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {
|
import { mapState, mapMutations, mapActions } from "vuex";
|
||||||
mapState,
|
// 组件
|
||||||
mapMutations,
|
// import request from "@//api/request";
|
||||||
mapActions
|
import { wxappAuth, getUser } from "@/api/user";
|
||||||
} from "vuex";
|
import dayjs from "dayjs";
|
||||||
// 组件
|
import cookie from "@/utils/store/cookie";
|
||||||
// import request from "@//api/request";
|
import { parseQuery, login, handleQrCode ,getCurrentPageUrl,handleUrlParam} from "@/utils";
|
||||||
import {
|
|
||||||
wxappAuth,
|
|
||||||
getUser
|
|
||||||
} from "@/api/user";
|
|
||||||
import dayjs from "dayjs";
|
|
||||||
import cookie from "@/utils/store/cookie";
|
|
||||||
import {
|
|
||||||
parseQuery,
|
|
||||||
login,
|
|
||||||
handleQrCode
|
|
||||||
} from "@/utils";
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "Loading",
|
name: "Loading",
|
||||||
data() {
|
data() {
|
||||||
return {};
|
return {};
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
|
|
||||||
var url = handleQrCode();
|
var url = handleQrCode();
|
||||||
// 判断是否是分销
|
if(!url){
|
||||||
if (url) {
|
url = handleUrlParam(getCurrentPageUrl())
|
||||||
var spread = cookie.get("spread");
|
}
|
||||||
let urlSpread = parseInt(url.spread);
|
// 判断是否是分销
|
||||||
if (!Number.isNaN(urlSpread) && spread !== urlSpread) {
|
if (url) {
|
||||||
cookie.set("spread", urlSpread || 0);
|
var spread = cookie.get("spread");
|
||||||
} else if (spread === 0 || typeof spread !== "number") {
|
let urlSpread = parseInt(url.spread);
|
||||||
cookie.set("spread", urlSpread || 0);
|
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) {
|
if (this.$store.getters.token) {
|
||||||
this.toLaunch();
|
this.toLaunch();
|
||||||
|
|||||||
@ -111,6 +111,7 @@ export default {
|
|||||||
pinkT: [], //团长信息
|
pinkT: [], //团长信息
|
||||||
storeCombination: [], //拼团产品
|
storeCombination: [], //拼团产品
|
||||||
pinkId: 0,
|
pinkId: 0,
|
||||||
|
uniqueId: "",
|
||||||
count: 0, //拼团剩余人数
|
count: 0, //拼团剩余人数
|
||||||
iShidden: false
|
iShidden: false
|
||||||
};
|
};
|
||||||
@ -208,6 +209,7 @@ export default {
|
|||||||
that.$set(that, "pinkBool", res.data.pinkBool);
|
that.$set(that, "pinkBool", res.data.pinkBool);
|
||||||
that.$set(that, "isOk", res.data.isOk);
|
that.$set(that, "isOk", res.data.isOk);
|
||||||
that.$set(that, "currentPinkOrder", res.data.currentPinkOrder);
|
that.$set(that, "currentPinkOrder", res.data.currentPinkOrder);
|
||||||
|
that.$set(that, "uniqueId", res.data.uniqueId);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
//拼团取消
|
//拼团取消
|
||||||
|
|||||||
@ -128,7 +128,6 @@
|
|||||||
// }
|
// }
|
||||||
},
|
},
|
||||||
goRoom(live) {
|
goRoom(live) {
|
||||||
console.log(live.roomId,9999)
|
|
||||||
wx.navigateTo({
|
wx.navigateTo({
|
||||||
url: `plugin-private://wx2b03c6e691cd7370/pages/live-player-plugin?room_id=${live.roomId}`
|
url: `plugin-private://wx2b03c6e691cd7370/pages/live-player-plugin?room_id=${live.roomId}`
|
||||||
});
|
});
|
||||||
|
|||||||
@ -8,7 +8,7 @@
|
|||||||
<view>总资产(元)</view>
|
<view>总资产(元)</view>
|
||||||
<view class="money">{{ now_money }}</view>
|
<view class="money">{{ now_money }}</view>
|
||||||
</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>
|
||||||
<view class="cumulative acea-row row-top">
|
<view class="cumulative acea-row row-top">
|
||||||
<view class="item">
|
<view class="item">
|
||||||
@ -31,7 +31,7 @@
|
|||||||
</view>
|
</view>
|
||||||
<view>消费记录</view>
|
<view>消费记录</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="item" @click="goUserBill(2)">
|
<view class="item" @click="goUserBill(2)" v-if="is_hide=='0'">
|
||||||
<view class="pictrue">
|
<view class="pictrue">
|
||||||
<image src="@/static/images/record3.png" />
|
<image src="@/static/images/record3.png" />
|
||||||
</view>
|
</view>
|
||||||
@ -54,6 +54,7 @@ export default {
|
|||||||
props: {},
|
props: {},
|
||||||
data: function() {
|
data: function() {
|
||||||
return {
|
return {
|
||||||
|
is_hide: "1",
|
||||||
now_money: 0,
|
now_money: 0,
|
||||||
orderStatusSum: 0,
|
orderStatusSum: 0,
|
||||||
recharge: 0,
|
recharge: 0,
|
||||||
@ -82,6 +83,7 @@ export default {
|
|||||||
that.now_money = res.data.now_money;
|
that.now_money = res.data.now_money;
|
||||||
that.orderStatusSum = res.data.orderStatusSum;
|
that.orderStatusSum = res.data.orderStatusSum;
|
||||||
that.recharge = res.data.recharge;
|
that.recharge = res.data.recharge;
|
||||||
|
this.is_hide = res.data.is_hide;
|
||||||
},
|
},
|
||||||
err => {
|
err => {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
|
|||||||
@ -718,13 +718,14 @@ export function handleQrCode() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function handleUrlParam(path) {
|
export function handleUrlParam(path) {
|
||||||
console.log(path)
|
|
||||||
var url = path.split("?")[1]; //获取url中"?"符后的字串
|
var url = path.split("?")[1]; //获取url中"?"符后的字串
|
||||||
console.log(url)
|
|
||||||
var theRequest = new Object();
|
var theRequest = new Object();
|
||||||
let strs = url.split("&");
|
if(path.includes("?")){
|
||||||
for (var i = 0; i < strs.length; i++) {
|
var url = path.split("?")[1]; //获取url中"?"符后的字串
|
||||||
theRequest[strs[i].split("=")[0]] = unescape(strs[i].split("=")[1]);
|
let strs = url.split("&");
|
||||||
|
for (var i = 0; i < strs.length; i++) {
|
||||||
|
theRequest[strs[i].split("=")[0]] = unescape(strs[i].split("=")[1]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return theRequest;
|
return theRequest;
|
||||||
}
|
}
|
||||||
@ -856,7 +857,6 @@ export const handleLoginFailure = () => {
|
|||||||
console.log('————————')
|
console.log('————————')
|
||||||
store.commit("updateAuthorizationPage", true);
|
store.commit("updateAuthorizationPage", true);
|
||||||
let path = '/' + getCurrentPageUrlWithArgs()
|
let path = '/' + getCurrentPageUrlWithArgs()
|
||||||
console.log("getCurrentPageUrl", getCurrentPageUrl());
|
|
||||||
//判断小程序转发分享商品详情进来的
|
//判断小程序转发分享商品详情进来的
|
||||||
if (getCurrentPageUrl() == 'pages/shop/GoodsCon/index' && handleUrlParam(path) && !handleQrCode()) {
|
if (getCurrentPageUrl() == 'pages/shop/GoodsCon/index' && handleUrlParam(path) && !handleQrCode()) {
|
||||||
console.log('————————')
|
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('是拼团进来的')
|
console.log('是拼团进来的')
|
||||||
console.log('————————')
|
console.log('————————')
|
||||||
|
|
||||||
let url = handleQrCode();
|
let url = handleQrCode();
|
||||||
console.log(url)
|
if(!url){
|
||||||
|
url = handleUrlParam(path);
|
||||||
|
}
|
||||||
if (url) {
|
if (url) {
|
||||||
path = parseUrl({
|
path = parseUrl({
|
||||||
path: `/${getCurrentPageUrl()}`,
|
path: `/${getCurrentPageUrl()}`,
|
||||||
@ -1003,6 +1005,7 @@ export const handleLoginFailure = () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (getCurrentPageUrl() == 'pages/shop/GoodsCon/index' && handleQrCode()) {
|
if (getCurrentPageUrl() == 'pages/shop/GoodsCon/index' && handleQrCode()) {
|
||||||
|
debugger;
|
||||||
console.log('————————')
|
console.log('————————')
|
||||||
console.log('是扫描的商品详情')
|
console.log('是扫描的商品详情')
|
||||||
console.log('————————')
|
console.log('————————')
|
||||||
|
|||||||
Reference in New Issue
Block a user