Browse Source

合并重提

master
Gaoxs 5 years ago
parent
commit
63e6eac9d1
  1. 31
      App.vue
  2. 1
      libs/wechat.js
  3. 2
      manifest.json
  4. 6
      pages.json
  5. 59
      pages/Loading/index.vue
  6. 2
      pages/activity/GroupRule/index.vue
  7. 1
      pages/home/components/Live.vue
  8. 6
      pages/user/UserAccount/index.vue
  9. 19
      utils/index.js

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");

1
libs/wechat.js

@ -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) => {

2
manifest.json

@ -143,7 +143,7 @@
"plugins" : { "plugins" : {
"live-player-plugin" : { "live-player-plugin" : {
// //
"version" : "1.1.9", "version" : "1.1.10",
// appidappid // appidappid
"provider" : "wx2b03c6e691cd7370" "provider" : "wx2b03c6e691cd7370"
} }

6
pages.json

@ -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",

59
pages/Loading/index.vue

@ -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();

2
pages/activity/GroupRule/index.vue

@ -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);
}); });
}, },
// //

1
pages/home/components/Live.vue

@ -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}`
}); });

6
pages/user/UserAccount/index.vue

@ -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({

19
utils/index.js

@ -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('————————')

Loading…
Cancel
Save