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 @@
"babel-plugin-transform-remove-console": "^6.9.4",
"dayjs": "^1.11.7",
"js-md5": "^0.7.3",
"lodash-es": "^4.17.21",
"qrcode.vue": "^1.7.0",
"qrcodejs2": "^0.0.2",
"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) {
}
//公用跳转
Vue.prototype.CommonJump = function(path, obj) {
Vue.prototype.CommonJump = function(path, obj, type = 'push') {
let p = typeof(path) == 'string' ? path : this.$product.genernalUrl(path)
this.$router.push({
path: p,
query: obj
});
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({
path: p,
query: obj
});
}
}
Vue.prototype.$user = user
Vue.prototype.createCalendar = function(dateStr) {
......
......@@ -5,7 +5,7 @@
{{ formatEnum(product.ProductType) }}
</div>
</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">
<span>CNY {{moneyFormat(product.B2CPrice,2)}}</span>
<span class="f12 q-ml-sm"></span>
......
......@@ -15,7 +15,7 @@
</div>
</q-img>
<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">
<span>CNY {{moneyFormat(product.B2CPrice,2)}}</span>
<span class="f12 q-ml-sm"></span>
......
<template>
<div class="q-mt-lg">
<div class="section-block paragraph1">
{{plugData.ParagraphContent}}
<div class="section-block paragraph1" v-html="plugData.ParagraphContent">
</div>
</div>
</template>
......@@ -19,4 +18,9 @@
padding: 20px 0;
color: #666;
}
.paragraph1 li{
list-style: none;
padding:0;
margin:0;
}
</style>
\ No newline at end of file
<template>
<!--輪播圖-小-->
<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"
class="bg-primary text-white shadow-1 q-mt-lg q-mb-xl">
<q-carousel-slide v-for="(x, i) in plugData.Details" :key="i" @click="clickSlideHandler(x.LinkUrl)" :name="i"
:img-src="x.LinkImg" />
animated control-color="white" padding :arrows="imgLength>1" infinite height="235px"
class="bg-primary text-white q-mb-xl">
<template v-for="(x, i) in plugData.Details">
<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>
</template>
<script>
export default {
props: ["plugData"],
data() {
return {
slide: 0,
imgLength:0
};
},
created() {
this.imgLength = this.plugData.Details.filter(x=>x.LinkImg!='').length
},
methods: {
clickSlideHandler(url) {
if (url && url.length > 1) {
......
......@@ -185,6 +185,7 @@
<q-menu
ref="address"
@mouseenter="addressMenuEnter"
@mouseleave="addressMenuLeave"
class="light-shadow"
>
<div class="address-box flex">
......@@ -493,6 +494,7 @@ export default {
this.$refs.address.show();
},
mouseeleaveAddress() {
this.addressFocus = 0;
setTimeout(() => {
if (!this.addressFocus) {
this.$refs.address.hide();
......
......@@ -178,7 +178,9 @@
class="zk_toolbar flex justify-between"
: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
:src="baseData.logo"
style="
......@@ -189,7 +191,7 @@
"
class="q-mr-lg q-ml-sm"
@click="CommonJump('/index', {})"
/>
/></div>
<!-- pc -->
<div v-if="$q.platform.is.desktop">
<q-btn label="繁體中文" flat>
......@@ -297,17 +299,26 @@
/>
</div>
</q-toolbar>
<city-category v-if="$q.platform.is.desktop" :baseData="baseData" :dataList="dataList"></city-category>
<q-dialog v-model="showDialog">
<city-category-mobile></city-category-mobile></q-dialog>
<city-category
v-if="$q.platform.is.desktop"
: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>
</template>
<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";
export default {
components: { cityCategory, CityCategoryMobile },
components: { cityCategory, CityCategoryMobile, popup },
props: {
baseData: {
type: Object,
......@@ -398,6 +409,19 @@ export default {
// this.getCategoryList();
},
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() {
if (this.LoginUser.token) {
this.CommonJump("/userCenter");
......
......@@ -373,15 +373,15 @@ cursor: pointer;
</div>
<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 class=" text-weight-bold text-white" :class="$q.platform.is.desktop ? 'text-subtitle1': 'f14'">{{ 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 ? '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=" 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 row'" v-if="item.SubList">
<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 v-for="item in dataList.BottomList" :key="item.Id">
<div class="text-subtitle1 text-weight-bold text-white">{{ item.NavTitle }}</div>
<div class="q-mt-xl row" style="width:210px">
<div class="text-weight-bold text-white" :class="$q.platform.is.desktop ? 'text-subtitle1': 'f16'">{{ item.NavTitle }}</div>
<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;">
<img style="width:100%" :src="item2.Icon" :title="item2.NavTitle" />
</div>
......
<template>
<div class="row items-start q-mt-lg">
<div class="col-3 q-mr-lg">
<div class="items-start q-mt-lg" :class="$q.platform.is.desktop ? 'row' : 'colmuns'">
<div class="col-3" :class="$q.platform.is.desktop ? 'q-mr-lg' : 'q-ma-md'">
<q-card flat class="rounded-borders q-py-md">
<div class="text-subtitle1 text-weight-bold q-mx-md">篩選目的地</div>
<q-input
......@@ -154,10 +154,10 @@
rounded-borders
cursor-pointer
overflow-hidden
q-mb-md
row
bg-white
"
:class="$q.platform.is.desktop ? 'row q-mb-md' : 'colmuns q-ma-md'"
@click="GotoDetails(x)"
v-for="(x, i) in DataList"
:key="i"
......@@ -167,7 +167,8 @@
:ratio="1"
spinner-color="grey"
spinner-size="20px"
width="272px"
:width="$q.platform.is.desktop ? '272px' : ''"
:height="$q.platform.is.desktop ? '' : '200px'"
class="bg-grey-3"
/>
<div class="q-pa-md col column">
......@@ -733,7 +734,7 @@ this.dayArray = this.dayArray.filter(item => arr.includes(item.id))
// this.msg.dayNumList = arr;
},
GotoDetails(item) {
this.CommonJump(item,{});
this.CommonJump(item,{}, 'blank');
},
},
};
......
......@@ -117,9 +117,18 @@
.f36 {
font-size: 36px;
}
.f40 {
font-size: 40px;
}
.f42 {
font-size: 42px;
}
.lh200 {
line-height: 200%;
}
.lh150 {
line-height: 150%;
}
.text-center {
text-align: center;
}
......
This diff is collapsed.
......@@ -416,13 +416,22 @@ export default {
// this.getHomeData();
},
mounted() {
this.init()
this.timer = setInterval(() => {
this.init()
}, 100)
},
methods: {
init() {
var jObj = JSON.parse(localStorage.getItem("groupinfo"));
if(jObj) {
this.RB_Group_Id = jObj.GroupId;
this.getHomeData();
},
methods: {
if(this.timer) {
clearInterval(this.timer)
}
}
},
getHomeData() {
let locationName = this.GetDomain();
var msg = {
......
......@@ -791,7 +791,7 @@
</div>
<!-- 手机端 -->
<div class="mobileSearch q-mt-md">
<!-- <div class="mobileSearch q-mt-md">
<div class="search-bar-m">
<i class="iconfont iconchazhao"></i>
<input
......@@ -815,7 +815,7 @@
/>
<div class="sortShaixuan" @click="fullHeight = true">更多篩選條件</div>
</div>
</div>
</div> -->
<template v-if="ShowType==0">
<!--豆腐格-->
......
......@@ -44,7 +44,7 @@ export default {
},
created() {
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>
......
<template>
<q-page>
<q-page >
<template v-for="(item,index) in CustomerData">
<div :key="index">
<!--自訂版型(影片)-->
......@@ -62,6 +62,7 @@
<!--自訂版型(輪播圖)white_label_slider-->
<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>
......@@ -235,6 +236,12 @@
return {
Id: 0,
CustomerData: {},
pageTitle:''
};
},
meta() {
return {
title: this.pageTitle
};
},
created() {
......@@ -255,6 +262,7 @@
res => {
if (res.data.resultCode == 1) {
if (res.data.data) {
this.pageTitle = res.data.data.PageName
this.CustomerData = res.data.data.PageDataList;
}
}
......
......@@ -11,7 +11,7 @@
right: 0;
}
.login-box-pc {
max-width: 436px;
width: 436px;
padding: 30px 40px;
margin: 100px auto;
position: absolute;
......@@ -261,7 +261,8 @@ export default {
created() {},
mounted() {
console.log("login", this.$route.query);
const { code, state } = this.$route.query;
const { code, state, path } = this.$route.query;
this.path = path
if (code) {
this.fetchLoginInfo(code, state);
this.isLogin = false;
......@@ -519,7 +520,11 @@ export default {
var jsonData = JSON.stringify(res.data.data);
window.localStorage.setItem("b2bUser", jsonData);
console.log("userInfo", jsonData, res.data.data);
if(this.path) {
this.CommonJump(this.path, {});
} else {
this.CommonJump("/index", {});
}
} else {
this.$q.notify({
type: "negative",
......
<style>
.login {
background: url('../assets/img/login-bg.png');background-size: cover;
background: url("../assets/img/login-bg.png");
background-size: cover;
width: 100%;
height: 100%;
position: fixed;
......@@ -9,7 +10,7 @@
left: 0;
right: 0;
}
.login-box {
.login-box-pc {
width: 436px;
padding: 30px 40px;
margin: 100px auto;
......@@ -19,6 +20,12 @@
background: #ffffff;
border-radius: 18px;
}
.login-box {
max-width: 436px;
padding: 30px 40px;
background-clip: padding-box;
background: #ffffff;
}
.login-box .tw_logo {
margin: 0 auto 20px;
......@@ -82,8 +89,8 @@
}
</style>
<template>
<div class="login">
<div class="login-box">
<div :class="$q.platform.is.desktop ? 'login': 'full-width'">
<div class="login-box" :class="$q.platform.is.desktop ? 'login-box-pc': ''">
<div class="f34 bold">重置密码</div>
<div class="login_row">
<div class="form-group">
......
......@@ -57,6 +57,19 @@ background: #FAF9F9;
border-radius: 9px;
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>
<template>
<div class="user-nav-box">
......@@ -84,7 +97,7 @@ margin: 10px 13px 0 13px;
</div>
<div class="bg-white card">
<div
class="order-item cursor-pointer"
class="order-item cursor-pointer relative"
@click="navigateTo(item.key)"
v-for="item in orderList"
:key="item.key"
......@@ -93,15 +106,15 @@ margin: 10px 13px 0 13px;
<div class="column flex-center">
<img class="order-img" :src="require(`../../assets/img/userCenter/${item.icon}.png`)" />
<div>{{ item.label }}</div>
<div class="absoulte order-number" v-if="item.number">{{item.number}}</div>
</div>
<!-- <span class="text-primary">{{ item.label }}</span> -->
</div>
<div class="flex play-box q-mt-md">
<img class="go-play q-mr-md" src="../../assets/img/userCenter/set.png" />
<div class="flex play-box q-mt-md" v-if="useOrder">
<img class="go-play q-mr-md" :src="useOrder.GoodsPic" />
<div class="f12">
<div>即將出行</div>
<div class="text-grey-6">[2023年3月6日]日本富士山尊享一日遊</div>
<div class="text-grey-6">[{{useOrder.UseDate}}]{{useOrder.GoodsName}}</div>
</div>
</div>
</div>
......@@ -143,6 +156,7 @@ export default {
return {
selectKey: "",
LoginUser: {},
useOrder: null,
orderList: [
{
icon: "order-pay",
......@@ -221,6 +235,7 @@ export default {
this.selectKey = this.$route.path;
if (localStorage.b2bUser) {
this.LoginUser = JSON.parse(window.localStorage.getItem("b2bUser"));
this.getUserOrderInfo()
}
},
methods: {
......@@ -228,6 +243,34 @@ export default {
this.selectKey = 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>
\ No newline at end of file
......@@ -32,9 +32,12 @@ export default function (/* { store, ssrContext } */) {
Router.beforeEach((to, from, next) => {
let user = undefined
if(typeof window === 'object') {
if(to.meta.title) {
document.title = to.meta.title
}
user = JSON.parse(window.localStorage.getItem('b2bUser'))
if(to.meta.needLogin && !user) {
next({path: '/login'})
next({path: '/login?path=' + encodeURIComponent(to.fullPath)})
} else {
next()
}
......
This diff is collapsed.
......@@ -5915,6 +5915,11 @@ locate-path@^5.0.0:
dependencies:
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:
version "3.0.0"
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