Commit ca2b5ce4 authored by youjie's avatar youjie

Merge branch 'master' of http://gitlab.oytour.com/viitto/million

parents 2c85932c a9c8d4da
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
"babel-plugin-transform-remove-console": "^6.9.4", "babel-plugin-transform-remove-console": "^6.9.4",
"dayjs": "^1.11.7", "dayjs": "^1.11.7",
"js-md5": "^0.7.3", "js-md5": "^0.7.3",
"lodash-es": "^4.17.21",
"qrcode.vue": "^1.7.0", "qrcode.vue": "^1.7.0",
"qrcodejs2": "^0.0.2", "qrcodejs2": "^0.0.2",
"quasar": "^1.22.5", "quasar": "^1.22.5",
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -196,12 +196,25 @@ Vue.prototype.OpenNewUrl = function(URL) { ...@@ -196,12 +196,25 @@ Vue.prototype.OpenNewUrl = function(URL) {
} }
//公用跳转 //公用跳转
Vue.prototype.CommonJump = function(path, obj) { Vue.prototype.CommonJump = function(path, obj, type = 'push') {
let p = typeof(path) == 'string' ? path : this.$product.genernalUrl(path) let p = typeof(path) == 'string' ? path : this.$product.genernalUrl(path)
if(type === 'blank') { // 新窗口打开
let routeUrl = this.$router.resolve({
path: p,
query: obj
});
window.open(routeUrl.href, '_blank');
} else if (type === 'replace') { // replace
this.$router.replace({
path: p,
query: obj
});
} else if (type === 'push') { // push
this.$router.push({ this.$router.push({
path: p, path: p,
query: obj query: obj
}); });
}
} }
Vue.prototype.$user = user Vue.prototype.$user = user
Vue.prototype.createCalendar = function(dateStr) { Vue.prototype.createCalendar = function(dateStr) {
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
{{ formatEnum(product.ProductType) }} {{ formatEnum(product.ProductType) }}
</div> </div>
</q-img> </q-img>
<div class="ellipsis-2-lines text-body1 q-ma-md cursor-pointer" style="height: 74px;" @click="CommonJump(product,{})">{{ product.Title }}</div> <div class="ellipsis-2-lines text-body1 q-ma-md cursor-pointer" style="height: 74px;" @click="CommonJump(product,{},'blank')">{{ product.Title }}</div>
<div class="text-subtitle2 text-weight-bolder text-dark q-mx-md"> <div class="text-subtitle2 text-weight-bolder text-dark q-mx-md">
<span>CNY {{moneyFormat(product.B2CPrice,2)}}</span> <span>CNY {{moneyFormat(product.B2CPrice,2)}}</span>
<span class="f12 q-ml-sm"></span> <span class="f12 q-ml-sm"></span>
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
</div> </div>
</q-img> </q-img>
<div class="q-px-md col"> <div class="q-px-md col">
<div class="ellipsis-2-lines text-body1 q-ma-md cursor-pointer" style="height:50px;" @click="CommonJump(product,{})">{{ product.Title }}</div> <div class="ellipsis-2-lines text-body1 q-ma-md cursor-pointer" style="height:50px;" @click="CommonJump(product,{},'blank')">{{ product.Title }}</div>
<div class="text-subtitle2 text-weight-bolder text-dark q-mx-md"> <div class="text-subtitle2 text-weight-bolder text-dark q-mx-md">
<span>CNY {{moneyFormat(product.B2CPrice,2)}}</span> <span>CNY {{moneyFormat(product.B2CPrice,2)}}</span>
<span class="f12 q-ml-sm"></span> <span class="f12 q-ml-sm"></span>
......
<template> <template>
<div class="q-mt-lg"> <div class="q-mt-lg">
<div class="section-block paragraph1"> <div class="section-block paragraph1" v-html="plugData.ParagraphContent">
{{plugData.ParagraphContent}}
</div> </div>
</div> </div>
</template> </template>
...@@ -19,4 +18,9 @@ ...@@ -19,4 +18,9 @@
padding: 20px 0; padding: 20px 0;
color: #666; color: #666;
} }
.paragraph1 li{
list-style: none;
padding:0;
margin:0;
}
</style> </style>
\ No newline at end of file
<template> <template>
<!--輪播圖-小--> <!--輪播圖-小-->
<q-carousel v-model="slide" transition-prev="slide-right" transition-next="slide-left" :autoplay="5000" swipeable <q-carousel v-model="slide" transition-prev="slide-right" transition-next="slide-left" :autoplay="5000" swipeable
animated control-color="white" padding arrows infinite height="235px" animated control-color="white" padding :arrows="imgLength>1" infinite height="235px"
class="bg-primary text-white shadow-1 q-mt-lg q-mb-xl"> class="bg-primary text-white q-mb-xl">
<q-carousel-slide v-for="(x, i) in plugData.Details" :key="i" @click="clickSlideHandler(x.LinkUrl)" :name="i" <template v-for="(x, i) in plugData.Details">
:img-src="x.LinkImg" /> <q-carousel-slide :key="i" v-if="x.LinkImg" @click="clickSlideHandler(x.LinkUrl)" :name="i"
:img-src="x.LinkImg">
<div class="full-height column justify-center text-h4">
<div class="text-center text-shadow">{{ plugData.Title }}</div>
</div>
</q-carousel-slide>
</template>
</q-carousel> </q-carousel>
</template> </template>
<script> <script>
export default { export default {
props: ["plugData"], props: ["plugData"],
data() { data() {
return { return {
slide: 0, slide: 0,
imgLength:0
}; };
}, },
created() {
this.imgLength = this.plugData.Details.filter(x=>x.LinkImg!='').length
},
methods: { methods: {
clickSlideHandler(url) { clickSlideHandler(url) {
if (url && url.length > 1) { if (url && url.length > 1) {
......
...@@ -185,6 +185,7 @@ ...@@ -185,6 +185,7 @@
<q-menu <q-menu
ref="address" ref="address"
@mouseenter="addressMenuEnter" @mouseenter="addressMenuEnter"
@mouseleave="addressMenuLeave"
class="light-shadow" class="light-shadow"
> >
<div class="address-box flex"> <div class="address-box flex">
...@@ -493,6 +494,7 @@ export default { ...@@ -493,6 +494,7 @@ export default {
this.$refs.address.show(); this.$refs.address.show();
}, },
mouseeleaveAddress() { mouseeleaveAddress() {
this.addressFocus = 0;
setTimeout(() => { setTimeout(() => {
if (!this.addressFocus) { if (!this.addressFocus) {
this.$refs.address.hide(); this.$refs.address.hide();
......
...@@ -178,7 +178,9 @@ ...@@ -178,7 +178,9 @@
class="zk_toolbar flex justify-between" class="zk_toolbar flex justify-between"
:class="{ 'q-px-none': $q.platform.is.desktop }" :class="{ 'q-px-none': $q.platform.is.desktop }"
> >
<div v-if="$q.platform.is.mobile" @click="showDialog = true">菜单</div> <div class="flex"><div class="f24" v-if="$q.platform.is.mobile && isHome" @click="handleShowDialog">
<i class="iconfont iconmore1" style="font-size: 24px;"></i>
</div>
<img <img
:src="baseData.logo" :src="baseData.logo"
style=" style="
...@@ -189,7 +191,7 @@ ...@@ -189,7 +191,7 @@
" "
class="q-mr-lg q-ml-sm" class="q-mr-lg q-ml-sm"
@click="CommonJump('/index', {})" @click="CommonJump('/index', {})"
/> /></div>
<!-- pc --> <!-- pc -->
<div v-if="$q.platform.is.desktop"> <div v-if="$q.platform.is.desktop">
<q-btn label="繁體中文" flat> <q-btn label="繁體中文" flat>
...@@ -297,17 +299,26 @@ ...@@ -297,17 +299,26 @@
/> />
</div> </div>
</q-toolbar> </q-toolbar>
<city-category v-if="$q.platform.is.desktop" :baseData="baseData" :dataList="dataList"></city-category> <city-category
<q-dialog v-model="showDialog"> v-if="$q.platform.is.desktop"
<city-category-mobile></city-category-mobile></q-dialog> :baseData="baseData"
:dataList="dataList"
></city-category>
<popup @mousemove.prevent id="city-category" v-model="showDialog" mode="bottom" @close="handleDialogClose">
<city-category-mobile @close="showDialog = false"
:baseData="baseData"
:dataList="dataList"
></city-category-mobile
></popup>
</q-header> </q-header>
</template> </template>
<script> <script>
import CityCategoryMobile from './city-category-mobile.vue'; import popup from "../props/index";
import CityCategoryMobile from "./city-category-mobile.vue";
import cityCategory from "./city-category.vue"; import cityCategory from "./city-category.vue";
export default { export default {
components: { cityCategory, CityCategoryMobile }, components: { cityCategory, CityCategoryMobile, popup },
props: { props: {
baseData: { baseData: {
type: Object, type: Object,
...@@ -398,6 +409,19 @@ export default { ...@@ -398,6 +409,19 @@ export default {
// this.getCategoryList(); // this.getCategoryList();
}, },
methods: { methods: {
handler(event) {event.preventDefault();},
handleShowDialog() {
this.showDialog = true;
this.scrollTop = document.querySelector('body').scrollTop;
document.querySelector(
"body"
).style = `position: fixed; top: -${this.scrollTop}px`;
},
handleDialogClose() {
document.querySelector(
"body"
).style = '';},
avatarClick() { avatarClick() {
if (this.LoginUser.token) { if (this.LoginUser.token) {
this.CommonJump("/userCenter"); this.CommonJump("/userCenter");
......
...@@ -373,15 +373,15 @@ cursor: pointer; ...@@ -373,15 +373,15 @@ cursor: pointer;
</div> </div>
<div :class="$q.platform.is.desktop ? 'row': 'q-mt-lg'"> <div :class="$q.platform.is.desktop ? 'row': 'q-mt-lg'">
<div v-for="(item,i) in dataList.FooterList" :key="item.Id" :class="{'q-ml-xl':i>0 && $q.platform.is.desktop}"> <div v-for="(item,i) in dataList.FooterList" :key="item.Id" :class="{'q-ml-xl':i>0 && $q.platform.is.desktop}">
<div class=" text-weight-bold text-white" :class="$q.platform.is.desktop ? 'text-subtitle1': 'f14'">{{ item.NavTitle }}</div> <div class=" text-weight-bold text-white" :class="$q.platform.is.desktop ? 'text-subtitle1': 'f16'">{{ item.NavTitle }}</div>
<div :class="$q.platform.is.desktop ? 'q-mt-xl': 'q-mt-md'" v-if="item.SubList"> <div :class="$q.platform.is.desktop ? 'q-mt-xl': 'q-mt-md row'" v-if="item.SubList">
<div :class="$q.platform.is.desktop ? 'text-subtitle2 text-regular': 'f12'" class="q-mb-lg text-grey-8 cursor-pointer" v-for="item2 in item.SubList" :key="item2.Id" @click="navigateTo(item2)">{{item2.NavTitle}}</div> <div :class="$q.platform.is.desktop ? 'text-subtitle2 text-regular': 'f14'" class="q-mb-lg q-mr-md text-grey-8 cursor-pointer" v-for="item2 in item.SubList" :key="item2.Id" @click="navigateTo(item2)">{{item2.NavTitle}}</div>
</div> </div>
</div> </div>
</div> </div>
<div v-for="item in dataList.BottomList" :key="item.Id"> <div v-for="item in dataList.BottomList" :key="item.Id">
<div class="text-subtitle1 text-weight-bold text-white">{{ item.NavTitle }}</div> <div class="text-weight-bold text-white" :class="$q.platform.is.desktop ? 'text-subtitle1': 'f16'">{{ item.NavTitle }}</div>
<div class="q-mt-xl row" style="width:210px"> <div class="row" :class="$q.platform.is.desktop ? 'q-mt-xl' : 'q-mt-md'" :style="$q.platform.is.desktop ? 'width:210px': 'width:100%'" >
<div class="bg-white rounded-borders q-pa-xs overflow-hidden q-mb-md q-mr-md" @click="navigateTo(item2)" v-for="item2 in item.SubList" :key="item2.Id" style="width:40px;height:34px;"> <div class="bg-white rounded-borders q-pa-xs overflow-hidden q-mb-md q-mr-md" @click="navigateTo(item2)" v-for="item2 in item.SubList" :key="item2.Id" style="width:40px;height:34px;">
<img style="width:100%" :src="item2.Icon" :title="item2.NavTitle" /> <img style="width:100%" :src="item2.Icon" :title="item2.NavTitle" />
</div> </div>
......
<template> <template>
<div class="row items-start q-mt-lg"> <div class="items-start q-mt-lg" :class="$q.platform.is.desktop ? 'row' : 'colmuns'">
<div class="col-3 q-mr-lg"> <div class="col-3" :class="$q.platform.is.desktop ? 'q-mr-lg' : 'q-ma-md'">
<q-card flat class="rounded-borders q-py-md"> <q-card flat class="rounded-borders q-py-md">
<div class="text-subtitle1 text-weight-bold q-mx-md">篩選目的地</div> <div class="text-subtitle1 text-weight-bold q-mx-md">篩選目的地</div>
<q-input <q-input
...@@ -154,10 +154,10 @@ ...@@ -154,10 +154,10 @@
rounded-borders rounded-borders
cursor-pointer cursor-pointer
overflow-hidden overflow-hidden
q-mb-md
row
bg-white bg-white
" "
:class="$q.platform.is.desktop ? 'row q-mb-md' : 'colmuns q-ma-md'"
@click="GotoDetails(x)" @click="GotoDetails(x)"
v-for="(x, i) in DataList" v-for="(x, i) in DataList"
:key="i" :key="i"
...@@ -167,7 +167,8 @@ ...@@ -167,7 +167,8 @@
:ratio="1" :ratio="1"
spinner-color="grey" spinner-color="grey"
spinner-size="20px" spinner-size="20px"
width="272px" :width="$q.platform.is.desktop ? '272px' : ''"
:height="$q.platform.is.desktop ? '' : '200px'"
class="bg-grey-3" class="bg-grey-3"
/> />
<div class="q-pa-md col column"> <div class="q-pa-md col column">
...@@ -733,7 +734,7 @@ this.dayArray = this.dayArray.filter(item => arr.includes(item.id)) ...@@ -733,7 +734,7 @@ this.dayArray = this.dayArray.filter(item => arr.includes(item.id))
// this.msg.dayNumList = arr; // this.msg.dayNumList = arr;
}, },
GotoDetails(item) { GotoDetails(item) {
this.CommonJump(item,{}); this.CommonJump(item,{}, 'blank');
}, },
}, },
}; };
......
...@@ -117,9 +117,18 @@ ...@@ -117,9 +117,18 @@
.f36 { .f36 {
font-size: 36px; font-size: 36px;
} }
.f40 {
font-size: 40px;
}
.f42 { .f42 {
font-size: 42px; font-size: 42px;
} }
.lh200 {
line-height: 200%;
}
.lh150 {
line-height: 150%;
}
.text-center { .text-center {
text-align: center; text-align: center;
} }
......
This diff is collapsed.
...@@ -416,13 +416,22 @@ export default { ...@@ -416,13 +416,22 @@ export default {
// this.getHomeData(); // this.getHomeData();
}, },
mounted() { mounted() {
this.init()
this.timer = setInterval(() => {
this.init()
}, 100)
},
methods: {
init() {
var jObj = JSON.parse(localStorage.getItem("groupinfo")); var jObj = JSON.parse(localStorage.getItem("groupinfo"));
if(jObj) {
this.RB_Group_Id = jObj.GroupId; this.RB_Group_Id = jObj.GroupId;
this.getHomeData(); this.getHomeData();
if(this.timer) {
clearInterval(this.timer)
}
}
}, },
methods: {
getHomeData() { getHomeData() {
let locationName = this.GetDomain(); let locationName = this.GetDomain();
var msg = { var msg = {
......
...@@ -791,7 +791,7 @@ ...@@ -791,7 +791,7 @@
</div> </div>
<!-- 手机端 --> <!-- 手机端 -->
<div class="mobileSearch q-mt-md"> <!-- <div class="mobileSearch q-mt-md">
<div class="search-bar-m"> <div class="search-bar-m">
<i class="iconfont iconchazhao"></i> <i class="iconfont iconchazhao"></i>
<input <input
...@@ -815,7 +815,7 @@ ...@@ -815,7 +815,7 @@
/> />
<div class="sortShaixuan" @click="fullHeight = true">更多篩選條件</div> <div class="sortShaixuan" @click="fullHeight = true">更多篩選條件</div>
</div> </div>
</div> </div> -->
<template v-if="ShowType==0"> <template v-if="ShowType==0">
<!--豆腐格--> <!--豆腐格-->
......
...@@ -44,7 +44,7 @@ export default { ...@@ -44,7 +44,7 @@ export default {
}, },
created() { created() {
this.cityInfo = this.city this.cityInfo = this.city
this.cityInfo.Introduction=this.cityInfo.Introduction.replace(/\n/g,"<br>") this.cityInfo.Introduction=this.cityInfo.Introduction?.replace(/\n/g,"<br>")
}, },
} }
</script> </script>
......
<template> <template>
<q-page> <q-page >
<template v-for="(item,index) in CustomerData"> <template v-for="(item,index) in CustomerData">
<div :key="index"> <div :key="index">
<!--自訂版型(影片)--> <!--自訂版型(影片)-->
...@@ -62,6 +62,7 @@ ...@@ -62,6 +62,7 @@
<!--自訂版型(輪播圖)white_label_slider--> <!--自訂版型(輪播圖)white_label_slider-->
<sliderBig v-if="item.Id=='white_label_slider'&&item.plugData.Type==1" :plugData="item.plugData"></sliderBig> <sliderBig v-if="item.Id=='white_label_slider'&&item.plugData.Type==1" :plugData="item.plugData"></sliderBig>
<sliderSmall v-if="item.Id=='white_label_slider'&&item.plugData.Type==2" :plugData="item.plugData"> <sliderSmall v-if="item.Id=='white_label_slider'&&item.plugData.Type==2" :plugData="item.plugData">
</sliderSmall> </sliderSmall>
...@@ -235,6 +236,12 @@ ...@@ -235,6 +236,12 @@
return { return {
Id: 0, Id: 0,
CustomerData: {}, CustomerData: {},
pageTitle:''
};
},
meta() {
return {
title: this.pageTitle
}; };
}, },
created() { created() {
...@@ -255,6 +262,7 @@ ...@@ -255,6 +262,7 @@
res => { res => {
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
if (res.data.data) { if (res.data.data) {
this.pageTitle = res.data.data.PageName
this.CustomerData = res.data.data.PageDataList; this.CustomerData = res.data.data.PageDataList;
} }
} }
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
right: 0; right: 0;
} }
.login-box-pc { .login-box-pc {
max-width: 436px; width: 436px;
padding: 30px 40px; padding: 30px 40px;
margin: 100px auto; margin: 100px auto;
position: absolute; position: absolute;
...@@ -261,7 +261,8 @@ export default { ...@@ -261,7 +261,8 @@ export default {
created() {}, created() {},
mounted() { mounted() {
console.log("login", this.$route.query); console.log("login", this.$route.query);
const { code, state } = this.$route.query; const { code, state, path } = this.$route.query;
this.path = path
if (code) { if (code) {
this.fetchLoginInfo(code, state); this.fetchLoginInfo(code, state);
this.isLogin = false; this.isLogin = false;
...@@ -519,7 +520,11 @@ export default { ...@@ -519,7 +520,11 @@ export default {
var jsonData = JSON.stringify(res.data.data); var jsonData = JSON.stringify(res.data.data);
window.localStorage.setItem("b2bUser", jsonData); window.localStorage.setItem("b2bUser", jsonData);
console.log("userInfo", jsonData, res.data.data); console.log("userInfo", jsonData, res.data.data);
if(this.path) {
this.CommonJump(this.path, {});
} else {
this.CommonJump("/index", {}); this.CommonJump("/index", {});
}
} else { } else {
this.$q.notify({ this.$q.notify({
type: "negative", type: "negative",
......
<style> <style>
.login { .login {
background: url('../assets/img/login-bg.png');background-size: cover; background: url("../assets/img/login-bg.png");
background-size: cover;
width: 100%; width: 100%;
height: 100%; height: 100%;
position: fixed; position: fixed;
...@@ -9,7 +10,7 @@ ...@@ -9,7 +10,7 @@
left: 0; left: 0;
right: 0; right: 0;
} }
.login-box { .login-box-pc {
width: 436px; width: 436px;
padding: 30px 40px; padding: 30px 40px;
margin: 100px auto; margin: 100px auto;
...@@ -19,6 +20,12 @@ ...@@ -19,6 +20,12 @@
background: #ffffff; background: #ffffff;
border-radius: 18px; border-radius: 18px;
} }
.login-box {
max-width: 436px;
padding: 30px 40px;
background-clip: padding-box;
background: #ffffff;
}
.login-box .tw_logo { .login-box .tw_logo {
margin: 0 auto 20px; margin: 0 auto 20px;
...@@ -82,8 +89,8 @@ ...@@ -82,8 +89,8 @@
} }
</style> </style>
<template> <template>
<div class="login"> <div :class="$q.platform.is.desktop ? 'login': 'full-width'">
<div class="login-box"> <div class="login-box" :class="$q.platform.is.desktop ? 'login-box-pc': ''">
<div class="f34 bold">重置密码</div> <div class="f34 bold">重置密码</div>
<div class="login_row"> <div class="login_row">
<div class="form-group"> <div class="form-group">
......
...@@ -57,6 +57,19 @@ background: #FAF9F9; ...@@ -57,6 +57,19 @@ background: #FAF9F9;
border-radius: 9px; border-radius: 9px;
margin: 10px 13px 0 13px; margin: 10px 13px 0 13px;
} }
.order-number {
text-align: center;
position: absolute;
right: 10px;
top: 0;
height: 14px;
width: 14px;
font-size: 9px;
line-height: 14px;
border-radius: 50%;
color: #fff;
background-color: $primary;
}
</style> </style>
<template> <template>
<div class="user-nav-box"> <div class="user-nav-box">
...@@ -84,7 +97,7 @@ margin: 10px 13px 0 13px; ...@@ -84,7 +97,7 @@ margin: 10px 13px 0 13px;
</div> </div>
<div class="bg-white card"> <div class="bg-white card">
<div <div
class="order-item cursor-pointer" class="order-item cursor-pointer relative"
@click="navigateTo(item.key)" @click="navigateTo(item.key)"
v-for="item in orderList" v-for="item in orderList"
:key="item.key" :key="item.key"
...@@ -93,15 +106,15 @@ margin: 10px 13px 0 13px; ...@@ -93,15 +106,15 @@ margin: 10px 13px 0 13px;
<div class="column flex-center"> <div class="column flex-center">
<img class="order-img" :src="require(`../../assets/img/userCenter/${item.icon}.png`)" /> <img class="order-img" :src="require(`../../assets/img/userCenter/${item.icon}.png`)" />
<div>{{ item.label }}</div> <div>{{ item.label }}</div>
<div class="absoulte order-number" v-if="item.number">{{item.number}}</div>
</div> </div>
<!-- <span class="text-primary">{{ item.label }}</span> --> <!-- <span class="text-primary">{{ item.label }}</span> -->
</div> </div>
<div class="flex play-box q-mt-md" v-if="useOrder">
<div class="flex play-box q-mt-md"> <img class="go-play q-mr-md" :src="useOrder.GoodsPic" />
<img class="go-play q-mr-md" src="../../assets/img/userCenter/set.png" />
<div class="f12"> <div class="f12">
<div>即將出行</div> <div>即將出行</div>
<div class="text-grey-6">[2023年3月6日]日本富士山尊享一日遊</div> <div class="text-grey-6">[{{useOrder.UseDate}}]{{useOrder.GoodsName}}</div>
</div> </div>
</div> </div>
</div> </div>
...@@ -143,6 +156,7 @@ export default { ...@@ -143,6 +156,7 @@ export default {
return { return {
selectKey: "", selectKey: "",
LoginUser: {}, LoginUser: {},
useOrder: null,
orderList: [ orderList: [
{ {
icon: "order-pay", icon: "order-pay",
...@@ -221,6 +235,7 @@ export default { ...@@ -221,6 +235,7 @@ export default {
this.selectKey = this.$route.path; this.selectKey = this.$route.path;
if (localStorage.b2bUser) { if (localStorage.b2bUser) {
this.LoginUser = JSON.parse(window.localStorage.getItem("b2bUser")); this.LoginUser = JSON.parse(window.localStorage.getItem("b2bUser"));
this.getUserOrderInfo()
} }
}, },
methods: { methods: {
...@@ -228,6 +243,34 @@ export default { ...@@ -228,6 +243,34 @@ export default {
this.selectKey = route; this.selectKey = route;
this.CommonJump(route, {}); this.CommonJump(route, {});
}, },
getUserOrderInfo() {
this.apipost(
"GetMyOrderNum_post",
{},
(res) => {
if (res.data.resultCode == 1) {
const { NoPayCount, PayCount, RetultList } = res.data.data;
this.useOrder = RetultList[0] ? RetultList[0] : null
this.orderList.forEach(item => {
if(item.label === '待付款') {
item.number = NoPayCount
} else if(item.label === '待出行') {
item.number = PayCount
}
})
} else {
// // this.$notify(res.data.message);
// this.$q.notify({
// type: "negative",
// message: res.data.message,
// position: "top",
// timeout: 2000, // 以毫秒为单位; 0意味着没有超时
// });
}
},
null
);
},
}, },
}; };
</script> </script>
\ No newline at end of file
...@@ -32,9 +32,12 @@ export default function (/* { store, ssrContext } */) { ...@@ -32,9 +32,12 @@ export default function (/* { store, ssrContext } */) {
Router.beforeEach((to, from, next) => { Router.beforeEach((to, from, next) => {
let user = undefined let user = undefined
if(typeof window === 'object') { if(typeof window === 'object') {
if(to.meta.title) {
document.title = to.meta.title
}
user = JSON.parse(window.localStorage.getItem('b2bUser')) user = JSON.parse(window.localStorage.getItem('b2bUser'))
if(to.meta.needLogin && !user) { if(to.meta.needLogin && !user) {
next({path: '/login'}) next({path: '/login?path=' + encodeURIComponent(to.fullPath)})
} else { } else {
next() next()
} }
......
This diff is collapsed.
...@@ -5915,6 +5915,11 @@ locate-path@^5.0.0: ...@@ -5915,6 +5915,11 @@ locate-path@^5.0.0:
dependencies: dependencies:
p-locate "^4.1.0" p-locate "^4.1.0"
lodash-es@^4.17.21:
version "4.17.21"
resolved "https://registry.yarnpkg.com/lodash-es/-/lodash-es-4.17.21.tgz#43e626c46e6591b7750beb2b50117390c609e3ee"
integrity sha512-mKnC+QJ9pWVzv+C4/U3rRsHapFfHvQFoFB92e52xeyGMcX6/OlIl78je1u8vePzYZSkkogMPJ2yjxxsb89cxyw==
lodash._reinterpolate@^3.0.0: lodash._reinterpolate@^3.0.0:
version "3.0.0" version "3.0.0"
resolved "https://registry.npmmirror.com/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz" resolved "https://registry.npmmirror.com/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment