Commit 9e55d922 authored by 罗超's avatar 罗超

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

parents e103bd33 87315ca7
...@@ -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",
......
...@@ -51,6 +51,9 @@ body { ...@@ -51,6 +51,9 @@ body {
font-family: "Noto Sans SC", 微软雅黑, "Microsoft YaHei", sans-serif !important; font-family: "Noto Sans SC", 微软雅黑, "Microsoft YaHei", sans-serif !important;
font-weight: 400 !important; font-weight: 400 !important;
} }
.fz13{
font-size: 13px;
}
.fz14{ .fz14{
font-size: 14px; font-size: 14px;
} }
......
...@@ -18,7 +18,7 @@ const product = { ...@@ -18,7 +18,7 @@ const product = {
} else if (t === 1) { } else if (t === 1) {
url = "/detail/" + encodeURIComponent(productInfo.id ? productInfo.id : productInfo.ID) + "/" + 0 + "/" + configId url = "/detail/" + encodeURIComponent(productInfo.id ? productInfo.id : productInfo.ID) + "/" + 0 + "/" + configId
} else if (t === 5) { } else if (t === 5) {
url = "/hotel/" + configId url = "/detailHotal/" + configId+'/'+productInfo.b2CPrice
} }
} else { } else {
throw new Error("參數不合法"); throw new Error("參數不合法");
......
...@@ -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)
this.$router.push({ if(type === 'blank') { // 新窗口打开
path: p, let routeUrl = this.$router.resolve({
query: obj 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.$user = user
Vue.prototype.createCalendar = function(dateStr) { Vue.prototype.createCalendar = function(dateStr) {
......
<template>
<div style="width: 100vw !important; overflow: hidden">
<div class="column items-center justify-center">
<q-img width="100%" height="100%" :src="images[currentIndex]" :img-style="{'transform':scaleString+' '+rotateString}" spinner-color="primary" spinner-size="30px" fit="none" />
<div class="img-preview-tools-box" style="box-shadow: none !important">
<div class="img-preview-tools" style="box-shadow: none !important">
<div class="row items-center" style="box-shadow: none !important">
<q-icon name="first_page" size="28px" color="grey-2" class="q-mr-md cursor-pointer" v-ripple @click="changeImageIndexHandler(-1)"/>
<q-icon name="last_page" size="28px" color="grey-2" class="q-mr-md cursor-pointer" v-ripple @click="changeImageIndexHandler(1)"/>
<q-icon name="rotate_right" size="28px" color="grey-2" class="q-mr-md cursor-pointer" v-ripple @click="rotateHandler(1)"/>
<q-icon name="rotate_left" size="28px" color="grey-2" class="q-mr-md cursor-pointer" v-ripple @click="rotateHandler(-1)"/>
<q-icon name="crop_free" size="28px" color="grey-2" class="q-mr-md cursor-pointer" v-ripple @click="zoomHandler(0)"/>
<q-icon name="zoom_out" size="28px" color="grey-2" class="q-mr-md cursor-pointer" v-ripple @click="zoomHandler(-1)"/>
<q-icon name="zoom_in" size="28px" color="grey-2" class="q-mr-md cursor-pointer" v-ripple @click="zoomHandler(1)"/>
<q-icon name="close" size="28px" color="grey-2" class="cursor-pointer" v-ripple v-close-popup/>
</div>
</div>
</div>
</div>
</div>
</template>
<script>
export default {
props: ['current', 'images'],
data() {
return {
currentIndex: 0,
scale:1,
scaleString:'scale(1)',
rotate:0,
rotateString:'rotate(0deg)'
}
},
watch:{
current:(n,o)=>{
this.current = n
this.images = this.images
this.currentIndex=this.images.indexOf(this.current)
this.currentIndex = this.currentIndex==-1?0:this.currentIndex
}
},
mounted() {
this.currentIndex=this.images.indexOf(this.current)
this.currentIndex = this.currentIndex==-1?0:this.currentIndex
},
methods: {
zoomHandler(num){
if(num==0){
this.scale=1
}
if(this.scale<3 && num>0){
this.scale+=0.25
}
if(this.scale>0.25 && num<0){
this.scale-=0.25
}
this.scaleString=`scale(${this.scale})`
console.log(this.scale,data.scaleString)
},
rotateHandler(num){
if(num==0){
this.rotate=0
}
if(num>0){
this.rotate+=90
}
if(num<0){
this.rotate-=90
}
this.rotateString=`rotate(${this.rotate}deg)`
},
changeImageIndexHandler(num){
this.scale=1
this.scaleString=`scale(${this.scale})`
this.rotate=0
this.rotateString=`rotate(${this.rotate}deg)`
let i = this.currentIndex
i+=num
i = i<0?this.images.length-1:i
i = i==this.images.length?0:i
this.currentIndex = i
}
}
}
</script>
<style>
.img-preview-tools-box {
position: fixed;
z-index: 999999;
bottom: 100px;
}
.img-preview-tools-box .img-preview-tools {
background: rgba(0, 0, 0, 0.5);
border-radius: 48px;
padding: 10px 20px;
display: inline-block;
}
</style>
\ No newline at end of file
...@@ -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>
......
...@@ -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");
......
...@@ -733,7 +733,7 @@ this.dayArray = this.dayArray.filter(item => arr.includes(item.id)) ...@@ -733,7 +733,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');
}, },
}, },
}; };
......
...@@ -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 = {
......
...@@ -462,7 +462,8 @@ ...@@ -462,7 +462,8 @@
<div class="q-pa-md" :class="{ <div class="q-pa-md" :class="{
'q-mx-md': $q.screen.width < 1220 && $q.platform.is.mobile, 'q-mx-md': $q.screen.width < 1220 && $q.platform.is.mobile,
}"> }">
<componentsMap :AddressObj="AddressObj"/> <componentsMap v-if="AddressObj.Lng&&AddressObj.Lat" :AddressObj="AddressObj"/>
<div v-else class="card text-center">经纬度未知</div>
</div> </div>
</div> </div>
<div <div
...@@ -897,7 +898,6 @@ export default { ...@@ -897,7 +898,6 @@ export default {
type: "negative", type: "negative",
message: r.data.message, message: r.data.message,
position: "top", position: "top",
timeout: 2000, // 以毫秒为单位; 0意味着没有超时
}); });
} }
this.$q.loading.hide(); this.$q.loading.hide();
......
...@@ -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>
......
This diff is collapsed.
...@@ -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",
......
...@@ -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