Commit 47f2c5da authored by youjie's avatar youjie

no message

parents 1a99bdd3 e7ce9d5f
{ {
"name": "million", "name": "million",
"version": "0.0.1", "version": "0.0.1",
"description": "tw", "productDescription": "订完机票和饭店,当地旅游体验就交给印象之旅。自己的行程自己排- 海外潜水、户外攀岩、料理课程、私房景点、 一日游、票券、包车旅游、机场接驳,各式世界当地旅游行程任您挑选",
"productName": "million app", "productName": "印象之旅 - 当地旅游,在地旅游,旅游体验 - 印象之旅",
"cordovaId": "org.cordova.quasar.app", "cordovaId": "org.cordova.quasar.app",
"capacitorId": "", "capacitorId": "",
"author": "罗超 <alex9012@vip.qq.com>", "author": "罗超 <alex9012@vip.qq.com>",
"private": true, "private": true,
"scripts": { "scripts": {
"test": "echo \"No test specified\" && exit 0", "test": "echo \"No test specified\" && exit 0",
"dev": "quasar dev -m ssr", "dev": "quasar dev -m ssr",
"build": "quasar build -m ssr", "build": "quasar build -m ssr",
"build:pwa": "quasar build -m pwa" "build:pwa": "quasar build -m pwa"
}, },
"dependencies": { "dependencies": {
"@quasar/extras": "^1.15.10", "@quasar/extras": "^1.15.10",
"axios": "^0.18.1", "axios": "^0.18.1",
"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",
"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",
"swiper": "^9.0.5", "v-viewer": "^1.6.4",
"v-viewer": "^1.6.4", "vue-awesome-swiper": "^3.0.4",
"vue-awesome-swiper": "^3.0.4", "vue-concise-slider": "^4.2.5",
"vue-concise-slider": "^4.2.5", "vue-core-video-player": "^0.2.0",
"vue-core-video-player": "^0.2.0", "vue-core-video-players": "0.0.5",
"vue-core-video-players": "0.0.5", "vue-i18n": "^8.0.0"
"vue-i18n": "^8.0.0" },
}, "devDependencies": {
"devDependencies": { "@quasar/app": "^1.0.0"
"@quasar/app": "^1.0.0" },
}, "engines": {
"engines": { "node": ">= 10.18.1",
"node": ">= 10.18.1", "npm": ">= 6.13.4",
"npm": ">= 6.13.4", "yarn": ">= 1.21.1"
"yarn": ">= 1.21.1" },
}, "browserslist": [
"browserslist": [ "last 1 version, not dead, ie >= 11"
"last 1 version, not dead, ie >= 11" ]
] }
} \ No newline at end of file
...@@ -165,7 +165,10 @@ module.exports = function( /* ctx */ ) { ...@@ -165,7 +165,10 @@ module.exports = function( /* ctx */ ) {
'QParallax', 'QParallax',
'QField', 'QField',
'QTree', 'QTree',
'QRating' 'QRating',
'QStepper',
'QStep',
'QToggle'
], ],
directives: [ directives: [
......
...@@ -10,7 +10,7 @@ export default { ...@@ -10,7 +10,7 @@ export default {
}; };
</script> </script>
<style> <style>
@import url("//at.alicdn.com/t/c/font_1890699_fpmgpq29nve.css"); @import url("//at.alicdn.com/t/c/font_1890699_l4zj0bx0p69.css");
@font-face { @font-face {
font-family: "oswald"; font-family: "oswald";
src: url("https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/smallapp/Oswald-Regular.ttf"); src: url("https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/smallapp/Oswald-Regular.ttf");
...@@ -23,6 +23,11 @@ export default { ...@@ -23,6 +23,11 @@ export default {
.text-subtitle1 { .text-subtitle1 {
font-size: 1.25rem !important; font-size: 1.25rem !important;
} }
.content-page{
width: 100%;
max-width: 1200px;
margin: 0 auto;
}
body { body {
font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto,
Helvetica Neue, Arial, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Helvetica Neue, Arial, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol,
......
...@@ -20,7 +20,8 @@ Vue.prototype.domainManager = function() { ...@@ -20,7 +20,8 @@ Vue.prototype.domainManager = function() {
domainUrl = "http://testapi.oytour.com"; domainUrl = "http://testapi.oytour.com";
} else if (domainNameUrl.indexOf('oytour') !== -1) { } else if (domainNameUrl.indexOf('oytour') !== -1) {
domainUrl = "http://reborn.oytour.com"; domainUrl = "http://reborn.oytour.com";
domainUrl = 'http://192.168.10.11:8083' // domainUrl = 'http://192.168.10.11:8083'
domainUrl = 'http://192.168.10.206:8015' // 吴春
} }
var obj = { var obj = {
//主地址 //主地址
......
...@@ -117,8 +117,9 @@ margin-left: 10px; ...@@ -117,8 +117,9 @@ margin-left: 10px;
.category-item { .category-item {
width: 160px; width: 160px;
padding: 10px; padding: 10px;
border-radius: 8px; border-radius: 8px;
font-weight: bold; font-weight: bold;
font-size: 18px !important;
} }
.font-16 { .font-16 {
font-size: 16px; font-size: 16px;
...@@ -129,6 +130,8 @@ border-radius: 8px; ...@@ -129,6 +130,8 @@ border-radius: 8px;
line-height: 34px; line-height: 34px;
padding:0 8px; padding:0 8px;
cursor: pointer; cursor: pointer;
font-size:14px;
font-weight: 400;
} }
.category-l2:hover { .category-l2:hover {
background-color: #eee; background-color: #eee;
......
...@@ -122,6 +122,63 @@ ...@@ -122,6 +122,63 @@
</div> </div>
</div> </div>
<div class="row items-end q-mt-md" v-if="p.isSupportChildren == 1">
<div class="col" :class="{'column':$q.platform.is.mobile}">
<div>
<span class="text-subtitle2 text-weight-bold">儿童</span>
<span class="text-grey-6 f12 q-ml-sm">(2-11歲,占床)</span>
</div>
<div v-if="$q.platform.is.mobile">
<span class="text-grey-7 product-price" style="font-size: 13px">
CNY
{{ moneyFormat(p.childNeedPrice, 0) }} /每人
</span>
</div>
</div>
<div class="row items-end">
<span v-if="$q.platform.is.desktop" class="text-grey-7 product-price" style="font-size: 13px">
CNY
{{ moneyFormat( p.childNeedPrice, 0) }} /每人
</span>
<q-input
style="width: 150px"
@input="changePeople"
v-model="chosenObj.etCount"
class="col"
:class="{
'q-ml-sm q-px-none q-pl-none': $q.platform.is.desktop,
}"
mask="#"
reverse-fill-mask
dense
standout
readonly
:disable="!p.remainNum"
>
<template v-slot:prepend>
<q-btn
color="primary"
size="sm"
class="q-px-none"
flat
icon="remove"
@click="addPeople('etCount', -1)"
/>
</template>
<template v-slot:append>
<q-btn
color="primary"
size="sm"
class="q-px-none"
flat
icon="add"
@click="addPeople('etCount', 1)"
/>
</template>
</q-input>
</div>
</div>
<div class="row items-end q-mt-md" v-if="p.isSupportChildren == 1"> <div class="row items-end q-mt-md" v-if="p.isSupportChildren == 1">
<div class="col" :class="{'column':$q.platform.is.mobile}"> <div class="col" :class="{'column':$q.platform.is.mobile}">
<div> <div>
......
...@@ -102,6 +102,9 @@ ...@@ -102,6 +102,9 @@
.f30 { .f30 {
font-size: 30px; font-size: 30px;
} }
.f34 {
font-size: 34px;
}
.f36 { .f36 {
font-size: 36px; font-size: 36px;
} }
...@@ -121,4 +124,7 @@ ...@@ -121,4 +124,7 @@
display:-webkit-box; /* 盒模型 */ display:-webkit-box; /* 盒模型 */
-webkit-line-clamp:2; /* 限制文本行数 */ -webkit-line-clamp:2; /* 限制文本行数 */
-webkit-box-orient:vertical; /* 盒内子元素布局方向 */ -webkit-box-orient:vertical; /* 盒内子元素布局方向 */
}
.primary {
color: $primary;
} }
\ No newline at end of file
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
<!-- <script async defer crossorigin="anonymous" src="https://connect.facebook.net/zh_CN/sdk.js#xfbml=1&version=v7.0" nonce="bDrSmWhp"></script> --> <!-- <script async defer crossorigin="anonymous" src="https://connect.facebook.net/zh_CN/sdk.js#xfbml=1&version=v7.0" nonce="bDrSmWhp"></script> -->
<!-- <script type="text/javascript" src="https://api.map.baidu.com/api?v=1.0&type=webgl&ak=OBd2bhrqKUSbQGpniCZ996suti9YG7Bc"></script> --> <!-- <script type="text/javascript" src="https://api.map.baidu.com/api?v=1.0&type=webgl&ak=OBd2bhrqKUSbQGpniCZ996suti9YG7Bc"></script> -->
<script src="https://api.map.baidu.com/api?type=webgl&v=2.0&ak=OBd2bhrqKUSbQGpniCZ996suti9YG7Bc"></script> <script src="https://api.map.baidu.com/api?type=webgl&v=2.0&ak=OBd2bhrqKUSbQGpniCZ996suti9YG7Bc"></script>
<script src="http://res.wx.qq.com/connect/zh_CN/htmledition/js/wxLogin.js"></script>
<script> <script>
function countryCb(r) { function countryCb(r) {
if (!r) { if (!r) {
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
class="col product-price text-subtitle1 text-weight-bold f30" class="col product-price text-subtitle1 text-weight-bold f30"
style="text-align: left" style="text-align: left"
> >
<span>CNY {{ moneyFormat(dataList.MinPrice, 0) }}</span> <span>CNY {{ moneyFormat(MinPrice, 0) }}</span>
<span class="q-ml-sm f16 text-grey-7"></span> <span class="q-ml-sm f16 text-grey-7"></span>
</span> </span>
<q-btn <q-btn
...@@ -156,9 +156,9 @@ ...@@ -156,9 +156,9 @@
$q.platform.is.mobile, $q.platform.is.mobile,
}" }"
> >
<div class="product-price f30 bold" v-if="dataList.MinPrice > 0"> <div class="product-price f30 bold" v-if="MinPrice > 0">
<!-- CNY:{{ dataList. }} --> <!-- CNY:{{ dataList. }} -->
CNY:{{ moneyFormat(dataList.MinPrice, 0) }} CNY:{{ moneyFormat(MinPrice, 0) }}
<span class="f16 text-grey-6 normal"></span> <span class="f16 text-grey-6 normal"></span>
</div> </div>
<div v-else class="text-subtitle1 f30 bold text-grey-6">暫無報價</div> <div v-else class="text-subtitle1 f30 bold text-grey-6">暫無報價</div>
...@@ -309,7 +309,7 @@ ...@@ -309,7 +309,7 @@
</template> </template>
</div> --> </div> -->
<!--方案选择区 --> <!--方案选择区 -->
<select-room :detail="dataList"></select-room> <select-room @change="(value) => MinPrice = value" :detail="dataList"></select-room>
<div class="text-h6 q-pt-lg" v-if="$q.platform.is.mobile"> <div class="text-h6 q-pt-lg" v-if="$q.platform.is.mobile">
所選方案詳情 所選方案詳情
</div> </div>
...@@ -616,6 +616,7 @@ export default { ...@@ -616,6 +616,7 @@ export default {
}, },
data() { data() {
return { return {
MinPrice: 0,
selectedCar: "", selectedCar: "",
tab: "", tab: "",
searchDate: "", searchDate: "",
...@@ -816,8 +817,10 @@ export default { ...@@ -816,8 +817,10 @@ export default {
console.log("getData", r); console.log("getData", r);
this.dataList = r.data.data; this.dataList = r.data.data;
this.dataList.FacilityServices = JSON.parse(this.dataList.FacilityServices) this.dataList.FacilityServices = JSON.parse(this.dataList.FacilityServices)
this.dataList.imgCover = this.dataList.ImageList; this.dataList.imgCover = this.dataList.List.map(item => {
return item.Path
});
conosle.log(this.dataList.imgCover)
this.isShow = true; this.isShow = true;
this.isDirect = this.dataList.isDirect; this.isDirect = this.dataList.isDirect;
if (this.dataList.videoStr && this.dataList.videoStr != "") { if (this.dataList.videoStr && this.dataList.videoStr != "") {
......
...@@ -341,6 +341,7 @@ export default { ...@@ -341,6 +341,7 @@ export default {
if(!this.startDate && arr.length) { if(!this.startDate && arr.length) {
this.startDate = day.DateStr this.startDate = day.DateStr
this.minPrice = Math.min(...arr) this.minPrice = Math.min(...arr)
this.$emit('change', this.minPrice)
} }
return { return {
min: Math.min(...arr), min: Math.min(...arr),
......
<template>
<div class="content-page order-preview">
<q-stepper
v-model="step"
ref="stepper"
color="primary"
inactive-color="grey-5 "
class="bg-transparent"
flat
animated
>
<q-step
:name="1"
title="確認訂單"
icon="settings"
:done="step > 1"
></q-step>
<q-step
:name="2"
title="付款"
icon="iconfont iconPayment-1"
:done="step > 2"
></q-step>
<q-step
:name="3"
title="訂購完成"
icon="iconfont iconicon_finish_R"
:done="step == 3"
></q-step>
</q-stepper>
<div
class="row q-pa-md"
style="min-width: 375px; margin: 0 auto"
:class="{
'row': $q.screen.width >= 1200 && $q.platform.is.desktop,
'column': $q.screen.width < 1200 || $q.platform.is.mobile,
}"
>
<div class="col">
<q-card flat class="q-pa-md">
<div class="text-subtitle1 text-weight-bolder">訂購人資訊</div>
<q-separator color="grey-2" class="q-my-md"/>
<div class="row q-col-gutter-md">
<div :class="filedWidth">
<q-input standout v-model="userInfo.lastName" label="名字" :rules="[val => !!val || '請輸入名字']"/>
</div>
<div :class="filedWidth">
<q-input standout v-model="userInfo.firstName" label="姓氏" :rules="[val => !!val || '請輸入姓氏']"/>
</div>
<div :class="filedWidth">
<q-select v-model="userInfo.country" @input="changeCountry" :options="countrys" emit-value option-label="Name" option-value="ID" map-options label="國家/地區" standout />
</div>
<div :class="filedWidth">
<q-input standout v-model="userInfo.firstName" label="電話" :rules="[val => !!val || '請輸入行動電話']">
<template v-slot:prepend>
<div class="text-subtitle2">+{{ userInfo.areaCode }}</div>
</template>
</q-input>
</div>
<div :class="filedWidth">
<q-input standout v-model="userInfo.mail" label="郵箱地址" :rules="[val => !!val || '請輸入郵箱地址']" />
</div>
<div :class="filedWidth">
<q-toggle v-model="isUpdateUserInfo" label="同步更新會員資料" />
</div>
</div>
</q-card>
<q-card flat class="q-pa-md q-mt-lg">
<div class="text-subtitle1 text-weight-bolder q-mb-md">旅客資料</div>
<div class="row">
<q-img src="https://image.kkday.com/v2/image/get/s1.kkday.com/product_138437/20230217083232_t5rcO/jpg" class="rounded-borders" spinner-color="grey-3" style="width:80px;" />
<div class="q-ml-md col">
<div class="text-subtitle1 ellipsis">【夏季限定】加拿大三日游 | 班夫&贾斯珀国家公园&哥伦比亚冰原 | 卡加利出发卡加利出发卡加利出发</div>
<div class="text-caption text-grey-6 ellipsis q-mt-sm">加拿大三日游 | 班夫&贾斯珀国家公园&哥伦比亚冰原</div>
</div>
</div>
<div class="q-mt-md row">
<div class="text-grey-9">
<q-icon name="iconfont iconrili" size="20px" class="q-mr-sm" />
<span>2023-02-27</span>
</div>
<div class="text-grey-9 q-ml-md">
<q-icon name="iconfont iconpeople" size="20px" class="q-mr-sm" />
<span class="q-mr-sm" >成人 x 2</span>
<span class="q-mr-sm" >兒童 x 2</span>
</div>
</div>
<q-separator color="grey-2" class="q-my-md"/>
</q-card>
</div>
<div
:class="{
'q-ml-lg': !($q.screen.width < 1200 || $q.platform.is.mobile),
'q-mt-lg': $q.screen.width < 1200 || $q.platform.is.mobile,
}"
>
<div
class="rounded-borders bg-white q-pa-md"
style="width: 300px"
:style="{
width:
$q.screen.width < 1200 || $q.platform.is.mobile
? '100%'
: '300px',
}"
>222</div>
</div>
</div>
</div>
</template>
<script>
export default {
data() {
return {
step: 1,
userInfo:{
lastName:'',
firstName:'',
country:0,
phone:'',
areaCode:'',
mail:''
},
isUpdateUserInfo:false,
countrys:[],
areaCodes:[]
};
},
computed:{
filedWidth(){
return {
'col-12': this.$q.screen.width < 1200,
'col-6':this.$q.screen.width >= 1200
}
}
},
created() {
},
mounted() {
this.initCountry()
},
methods: {
initCountry(){
this.apipost(
"GetCountryInfo_post",
{},
(r) => {
this.countrys = r.data.data.countList
this.userInfo.country = this.countrys[0].ID
this.areaCodes = r.data.data.phoneCountList
this.changeCountry(this.userInfo.country)
this.areaCodes.forEach(x=>{
let temp = this.countrys.find(y=>y.ID==x.ID)
x.EnName=`${temp.EnName}(${x.PhoneCode})`
})
});
},
changeCountry(id){
this.userInfo.areaCode = this.areaCodes.find(x=>x.ID==id).PhoneCode
}
},
};
</script>
<style>
.order-preview .q-stepper__content {
display: none !important;
}
.order-preview .q-toggle__track{
height: 0.7em;
border-radius: 0.35em;
opacity: .38;
width: 50px;
}
.order-preview .q-toggle__thumb{
top: 0.42em;
left: 0.45em;
width: 0.5em;
height: 0.5em;
transition: left 0.22s ease-in-out;
user-select: none;
z-index: 0;
}
.order-preview .q-toggle__inner--truthy .q-toggle__thumb{
left: 0.94em;
}
.order-preview .q-toggle__inner{
width: 1.9em;
}
.order-preview .q-toggle__label{
margin-top: 12px;
}
</style>
<style> <style>
.login-box { .login {
max-width: 420px; background: url('../assets/img/login-bg.png');background-size: cover;
padding: 50px 40px; width: 100%;
margin: 40px auto; height: 100%;
background-color: #fff; position: fixed;
border-radius: 5px; top: 0;
background-clip: padding-box; bottom: 0;
box-shadow: 0 2px 4px 0 rgba(10, 8, 8, .5); left: 0;
} right: 0;
}
.login-box {
max-width: 436px;
padding: 30px 40px;
margin: 100px auto;
position: absolute;
right: 360px;
background-clip: padding-box;
background: #ffffff;
border-radius: 18px;
}
.login-box .tw_logo { .login-box .tw_logo {
margin: 0 auto 20px; margin: 0 auto 20px;
display: block; display: block;
height: 45px; height: 45px;
width: auto; width: auto;
} }
.login-box .tip-text { .login-box .tip-text {
font-size: 16px; font-size: 16px;
margin-bottom: 15px; margin-bottom: 15px;
color: #999; color: #999;
text-align: center; text-align: center;
} }
.login-box .tip-text a { .login-box .tip-text a {
color: #00afff; color: #00afff;
} }
.login_row { .login_row {
width: 100%; width: 100%;
} }
.form-group { .form-group {
position: relative; position: relative;
margin-bottom: 15px; margin-bottom: 15px;
} }
.login_labelName { .login_labelName {
margin-bottom: 10px; margin-top: 34px;
font-size: 15px; font-size: 16px;
} margin-bottom: 16px;
}
.form-group i { .form-group i {
position: absolute; position: absolute;
right: 6px; right: 6px;
bottom: 0; bottom: 0;
z-index: 2; z-index: 2;
width: 46px; width: 46px;
height: 46px; height: 46px;
text-align: center; text-align: center;
line-height: 46px; line-height: 46px;
color: #999; color: #999;
font-size: 28px; font-size: 28px;
cursor: pointer; cursor: pointer;
} }
.login-box .q-field__control {
height: 46px;
}
.login-box .q-field__control {
height: 46px;
}
.type-item {
width: 50px;
height: 50px;
background: #f5f5f5;
border-radius: 25px;
}
.type-item img {
width: 28px;
height: 28px;
}
</style> </style>
<template> <template>
<div class="login"> <div class="login">
<div class="login-box"> <div class="login-box">
<img :src="logo" class="tw_logo" /> <!-- <img :src="logo" class="tw_logo" /> -->
<p class="tip-text"> <!-- <p class="tip-text">
還沒有帳號嗎?立即<a style="cursor:pointer;" @click="CommonJump('/register',{})">免費加入</a> 還沒有帳號嗎?立即<a style="cursor:pointer;" @click="CommonJump('/register',{})">免費加入</a>
</p> </p> -->
<div class="login_row"> <div v-if="loginType !== 'wechat'">
<div class="form-group"> <div class="flex items-end justify-between">
<div class="login_labelName">電子郵件</div> <div class="f34 bold">{{ isLogin ? "登錄" : "註冊" }}</div>
<q-input outlined v-model="loginMsg.account" class="bg-grey-1" /> <div class="f16 bold cursor-pointer" v-if="loginType !== 'bindEmail'" @click="loginToRegister">
</div> {{ isLogin ? "註冊賬號" : "返回登錄" }}
<div class="form-group"> </div>
<div class="login_labelName">密碼</div>
<q-input v-if="flag==1" outlined v-model="loginMsg.password" type="text" ref="pwd"
class="bg-grey-1 login_pwd" />
<q-input v-if="flag==2" outlined v-model="loginMsg.password" type="password" ref="pwd"
class="bg-grey-1 login_pwd" />
<i class="iconfont iconyanjing_xianshi" v-if="flag==1" @click="flag=2"></i>
<i class="iconfont iconbiyan" v-if="flag==2" @click="flag=1"></i>
</div> </div>
<div> <div class="login_row">
<q-btn color="primary" unelevated style="width:100%;height:50px;margin-top:20px;" filled :label="mylabel" <div class="form-group">
@click="login" /> <div class="login_labelName">輸入郵箱</div>
<q-input outlined v-model="loginMsg.Mailbox" />
<div class="primary q-mt-sm" v-show="tips">邮箱格式有误,请核实</div>
</div>
<div class="form-group" v-if="loginType === 'PassWord'">
<div class="login_labelName flex justify-between items-center">
密碼<span class="text-grey-6 cursor-pointer" @click="resetPassword">忘記密碼</span>
</div>
<q-input
v-if="flag == 1"
outlined
v-model="loginMsg.PassWord"
type="text"
ref="pwd"
/>
<q-input
v-if="flag == 2"
outlined
v-model="loginMsg.PassWord"
type="PassWord"
ref="pwd"
/>
<i
class="iconfont iconyanjing_xianshi"
v-if="flag == 1"
@click="flag = 2"
></i>
<i
class="iconfont iconbiyan"
v-if="flag == 2"
@click="flag = 1"
></i>
</div>
<div v-else-if="loginType === 'MailCode'|| loginType === 'bindEmail'">
<q-btn
v-if="!isSend" class="q-mb-lg"
unelevated
color="grey-3"
style="width: 100%; color: #8B8B8B !important; height: 50px; margin-top: 20px"
filled
label="发送验证码"
@click="sendVerify"
/>
<div v-else class="mt q-mb-sm">
<q-input outlined v-model="loginMsg.MailCode" type="text" />
<div class="q-mt-sm" :class="cutDown ? 'text-grey-6' : ''">
{{ cutDown ? cutDown + "秒后可重新发送" : "重新發送驗證碼" }}
</div>
</div>
</div>
<div
class="text-right f16 text-grey-6 cursor-pointer"
v-if="isLogin"
@click="changeLoginType"
>
{{
loginType === "PassWord" ? "使用郵箱驗證登陸" : "使用賬號密碼登陸"
}}
</div>
<div class="q-mb-xl">
<q-btn
color="primary"
unelevated
style="width: 100%; height: 50px; margin-top: 20px"
filled
:label="mylabel"
@click="login"
/>
</div>
<div class="flex flex-center">
<div
class="text-center text-grey-6 q-px-lg inline-block bg-white"
style="z-index: 1; margin: 0 auto"
>
更多登录方式
</div>
</div>
<q-separator style="margin-top: -10px" />
<div class="flex flex-center q-mt-lg q-mb-xl">
<div
@click="useWechatLogin"
class="type-item flex flex-center cursor-pointer"
v-for="item in typeList"
:key="item"
>
<img :src="require(`src/assets/img/${item}.png`)" />
</div>
</div>
<div class="flex items-start no-wrap">
<div><q-checkbox v-model="isAgree"></q-checkbox></div>
<span
>在使用印象的产品和服务前,我已阅读
理解并同意印象的<a>《隐私政策》</a><a>《使用条款》</a></span
>
</div>
</div> </div>
</div> </div>
<!-- 微信扫码页面 -->
<div v-show="loginType === 'wechat'">
<div class="bold f34">微信登錄</div>
<!-- <qrcode-vue></qrcode-vue> -->
<div id="login_container"></div>
</div>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
export default { import QrcodeVue from "qrcode.vue";
name: "Login", export default {
components: { name: "Login",
components: {
QrcodeVue,
},
data() {
return {
isSend: false,
tips: false,
cutDown: 0,
loginType: "PassWord", // PassWord 邮箱密码,verify,邮箱验证码,wechat微信登录 微信登录没有绑定邮箱时跳转绑定邮箱业务逻辑
isAgree: false,
isLogin: true,
loginMsg: {
RB_Group_Id: 0,
Mailbox: "",
PassWord: "",
MailCode: "",
},
// , 'google', 'facebook', 'apple'
typeList: ["wechat"],
logo: "",
flag: 2,
mylabel: "登入",
};
},
created() {},
mounted() {
console.log('login', this.$route.query)
const {code, state} = this.$route.query
if(code) {
this.fetchLoginInfo(code, state)
this.isLogin = false
this.loginType = 'bindEmail'
}
this.getOpenInfo()
var jObj = JSON.parse(localStorage.getItem("groupinfo"));
this.loginMsg.RB_Group_Id = jObj.GroupId;
//获取网站基础配置
if (localStorage.baseifo) {
var jObj = JSON.parse(window.localStorage.getItem("baseifo"));
this.logo = jObj.Config.Logo;
}
},
watch: {
loginType: function () {
this.resetInfo();
}, },
data() { },
return { methods: {
loginMsg: { fetchLoginInfo(code, state) {this.apipost(
RB_Group_Id: 0, 'getWXToken_post',
account: "", {
password: "" code,
state
}, },
logo: '', (res) => {
flag: 2, const {type, id } = res.data.data
mylabel:'登入' if(type === 1) {
}; this.CommonJump("/index", {});
} else {
this.isLogin = false
// 绑定邮箱
this.loginType = 'bindEmail'
this.userId = id
}
},
(err) => {}
);
}, },
created() { getOpenInfo() {
this.apipost(
"GetOpenInfo_post",
{},
(r) => {
this.openInfo = r.data.data;
},
null
);
}, },
mounted() { setWechatCode() {
var jObj = JSON.parse(localStorage.getItem('groupinfo')); const { AppID, State, OpenRedirectUri } = this.openInfo;
this.loginMsg.RB_Group_Id = jObj.GroupId; const obj = new WxLogin({
//获取网站基础配置 self_redirect: false,
if (localStorage.baseifo) { id: "login_container",
var jObj = JSON.parse(window.localStorage.getItem('baseifo')); appid: AppID,
this.logo = jObj.Config.Logo; scope: "snsapi_login",
redirect_uri: OpenRedirectUri, // 是 重定向地址,需要进行UrlEncode
state: State,
style: "",
href: "",
});
},
loginToRegister() {
this.isLogin = !this.isLogin;
if(!this.isLogin) {
this.mylabel = "注册";
this.loginType = 'MailCode'
} else {
this.mylabel = "登录"
} }
}, },
methods: { sendVerify() {
login() { if (this.verifyEmail()) {
if (this.loginMsg.account == '') { this.isSend = true;
this.$q.notify({ this.cutDown = 60;
type: 'negative', this.startCutDown();
message: '请输入账号', }
position: 'top', },
timeout: 2000, // 以毫秒为单位; 0意味着没有超时 startCutDown() {
}) this.timer = setTimeout(() => {
return; this.cutDown--;
} if (this.cutDown) {
if (this.loginMsg.password == '') { this.startCutDown();
this.$q.notify({
type: 'negative',
message: '请输入密码',
position: 'top',
timeout: 2000, // 以毫秒为单位; 0意味着没有超时
})
return;
} }
this.mylabel='提交中...'; }, 1000);
this.apipost( },
"b2b_post_Login", this.loginMsg, resetInfo() {
res => { this.isSend = false;
this.mylabel='登入'; this.tips = false;
if (res.data.resultCode == 1) { this.loginMsg = {
var jsonData = JSON.stringify(res.data.data); RB_Group_Id: 0,
window.localStorage.setItem("b2bUser", jsonData); Mailbox: "",
this.CommonJump('/index', {}) PassWord: "",
} else { MailCode: "",
this.$q.notify({ };
type: 'negative', if (this.timer) {
message: res.data.message, clearTimeout(this.timer);
position: 'top',
timeout: 2000, // 以毫秒为单位; 0意味着没有超时
})
}
},
err => {}
);
} }
this.cutDown = 0;
}, },
}; verifyEmail() {
if (/^[^@\s]+@[^@\s]+\.[^@\s]+$/.test(this.loginMsg.Mailbox)) {
this.tips = false;
return true;
} else {
// 提示用户邮箱格式有误
this.tips = true;
return false;
}
},
changeLoginType() {
if (this.loginType === "PassWord") {
this.loginType = "MailCode";
} else {
this.loginType = "PassWord";
}
},
useWechatLogin() {
// this.loginType = "wechat";
// this.setWechatCode()
const { AppID, State, OpenRedirectUri } = this.openInfo;
console.log("encodeURI('http://localhost:9090/login')", OpenRedirectUri)
let redirect_uri = OpenRedirectUri
const url = `https://open.weixin.qq.com/connect/qrconnect?appid=${AppID}&redirect_uri=${redirect_uri}&response_type=code&scope=snsapi_login&state=${State}&wechat_redirect=${redirect_uri}`
// this.windowObjectReference = window.open(url, 'wechat', 'left: 20,top: 20,width:200,height:200,')
// console.log('windowObjectReference', this.windowObjectReference)
// setTimeout(() => {console.log(this.windowObjectReference.close())}, 1000)
window.location.href = url
},
login() {
if(this.mylabel === "提交中...") {
return
}
if (!this.isAgree) {
this.$q.notify({
type: "negative",
message: "请先同意平台使用协议",
position: "top",
timeout: 2000, // 以毫秒为单位; 0意味着没有超时
});
return;
}
if (this.loginMsg.Mailbox == "") {
this.$q.notify({
type: "negative",
message: "请输入账号",
position: "top",
timeout: 2000, // 以毫秒为单位; 0意味着没有超时
});
return;
}
if (this.loginMsg.PassWord == "" && (this.loginType === 'PassWord')) {
this.$q.notify({
type: "negative",
message: "请输入密码",
position: "top",
timeout: 2000, // 以毫秒为单位; 0意味着没有超时
});
return;
}
if (this.loginMsg.MailCode == "" && (this.loginType === 'MailCode' || this.loginType === 'bindEmail')) {
this.$q.notify({
type: "negative",
message: "请输入邮箱验证码",
position: "top",
timeout: 2000, // 以毫秒为单位; 0意味着没有超时
});
return;
}
let params = {...this.loginMsg}
let url = 'MailboxPwdLogin_post' // 密码登录
if(!this.isLogin) {
url = 'directCustomer_post_MailRegister'
} else if(this.loginType === 'MailBox') {
ulr = 'MailboxLogin_post'
}
if(this.loginType === 'bindEmail') {
url = 'BindMailByOpenId_post'
params.Unoinid = this.userId
}
this.mylabel = "提交中...";
this.apipost(
url,
params,
(res) => {
this.mylabel = "登入";
if (res.data.resultCode == 1) {
var jsonData = JSON.stringify(res.data.data);
window.localStorage.setItem("b2bUser", jsonData);
this.CommonJump("/index", {});
} else {
this.$q.notify({
type: "negative",
message: res.data.message,
position: "top",
timeout: 2000, // 以毫秒为单位; 0意味着没有超时
});
}
},
(err) => {}
);
},
resetPassword() {
this.CommonJump("/resetPassword", {});
}
},
};
</script> </script>
<style>
.login {
background: url('../assets/img/login-bg.png');background-size: cover;
width: 100%;
height: 100%;
position: fixed;
top: 0;
bottom: 0;
left: 0;
right: 0;
}
.login-box {
width: 436px;
padding: 30px 40px;
margin: 100px auto;
position: absolute;
right: 360px;
background-clip: padding-box;
background: #ffffff;
border-radius: 18px;
}
.login-box .tw_logo {
margin: 0 auto 20px;
display: block;
height: 45px;
width: auto;
}
.login-box .tip-text {
font-size: 16px;
margin-bottom: 15px;
color: #999;
text-align: center;
}
.login-box .tip-text a {
color: #00afff;
}
.login_row {
width: 100%;
}
.form-group {
position: relative;
margin-bottom: 15px;
}
.login_labelName {
margin-top: 34px;
font-size: 16px;
margin-bottom: 16px;
}
.form-group i {
position: absolute;
right: 6px;
bottom: 0;
z-index: 2;
width: 46px;
height: 46px;
text-align: center;
line-height: 46px;
color: #999;
font-size: 28px;
cursor: pointer;
}
.login-box .q-field__control {
height: 46px;
}
.type-item {
width: 50px;
height: 50px;
background: #f5f5f5;
border-radius: 25px;
}
.type-item img {
width: 28px;
height: 28px;
}
</style>
<template>
<div class="login">
<div class="login-box">
<div class="f34 bold">重置密码</div>
<div class="login_row">
<div class="form-group">
<div class="login_labelName">輸入郵箱</div>
<q-input outlined v-model="loginMsg.Mailbox" />
<div class="primary q-mt-sm" v-show="tips">邮箱格式有误,请核实</div>
</div>
<div>
<q-btn
v-if="!isSend" class="q-mb-lg"
unelevated
color="grey-3"
style="width: 100%; color: #8B8B8B !important; height: 50px; margin-top: 20px"
filled
label="发送验证码"
@click="sendVerify"
/>
<div v-else class="mt q-mb-sm">
<q-input outlined v-model="loginMsg.MailCode" type="text" />
<div class="q-mt-sm" :class="cutDown ? 'text-grey-6' : ''">
{{ cutDown ? cutDown + "秒后可重新发送" : "重新發送驗證碼" }}
</div>
</div>
</div>
<div class="form-group">
<div class="login_labelName flex justify-between items-center">
密碼
</div>
<q-input
v-if="flag == 1"
outlined
v-model="loginMsg.PassWord"
type="text"
ref="pwd"
/>
<q-input
v-if="flag == 2"
outlined
v-model="loginMsg.PassWord"
type="PassWord"
ref="pwd"
/>
<i
class="iconfont iconyanjing_xianshi"
v-if="flag == 1"
@click="flag = 2"
></i>
<i
class="iconfont iconbiyan"
v-if="flag == 2"
@click="flag = 1"
></i>
</div>
<div class="q-mb-xl">
<q-btn
color="primary"
unelevated
style="width: 100%; height: 50px; margin-top: 20px"
filled
:label="mylabel"
@click="login"
/>
</div>
</div>
</div>
</div>
</template>
<script>
import QrcodeVue from "qrcode.vue";
export default {
name: "Login",
components: {
QrcodeVue,
},
data() {
return {
isSend: false,
tips: false,
cutDown: 0,
isAgree: false,
isLogin: true,
loginMsg: {
Mailbox: "",
PassWord: "",
MailCode: "",
},
// , 'google', 'facebook', 'apple'
typeList: ["wechat"],
logo: "",
flag: 2,
mylabel: "重置密码",
};
},
created() {},
mounted() {
},
methods: {
sendVerify() {
if (this.verifyEmail()) {
this.isSend = true;
this.cutDown = 60;
this.startCutDown();
}
},
startCutDown() {
this.timer = setTimeout(() => {
this.cutDown--;
if (this.cutDown) {
this.startCutDown();
}
}, 1000);
},
verifyEmail() {
if (/^[^@\s]+@[^@\s]+\.[^@\s]+$/.test(this.loginMsg.Mailbox)) {
this.tips = false;
return true;
} else {
// 提示用户邮箱格式有误
this.tips = true;
return false;
}
},
login() {
if(this.mylabel === "提交中...") {
return
}
if (this.loginMsg.Mailbox == "") {
this.$q.notify({
type: "negative",
message: "请输入账号",
position: "top",
timeout: 2000, // 以毫秒为单位; 0意味着没有超时
});
return;
}
if (this.loginMsg.PassWord == "") {
this.$q.notify({
type: "negative",
message: "请输入密码",
position: "top",
timeout: 2000, // 以毫秒为单位; 0意味着没有超时
});
return;
}
if (this.loginMsg.MailCode == "") {
this.$q.notify({
type: "negative",
message: "请输入邮箱验证码",
position: "top",
timeout: 2000, // 以毫秒为单位; 0意味着没有超时
});
return;
}
this.mylabel = "提交中...";
this.apipost(
'MailboxPwdLogin_post',
this.loginMsg,
(res) => {
this.mylabel = "重置密码";
if (res.data.resultCode == 1) {
this.CommonJump("/login", {});
} else {
this.$q.notify({
type: "negative",
message: res.data.message,
position: "top",
timeout: 2000, // 以毫秒为单位; 0意味着没有超时
});
}
},
(err) => {}
);
},
},
};
</script>
...@@ -90,6 +90,11 @@ const routes = [{ ...@@ -90,6 +90,11 @@ const routes = [{
component: () => component: () =>
import ('pages/city/cityDetail.vue') import ('pages/city/cityDetail.vue')
}, },
{
path: '/lineOrderPriview/:id?', //自定义页面
component: () =>
import ('pages/line/orderPreview.vue')
},
] ]
}, },
...@@ -103,6 +108,16 @@ const routes = [{ ...@@ -103,6 +108,16 @@ const routes = [{
import ('pages/login.vue') import ('pages/login.vue')
}] }]
}, },
{
path: '/resetPassword',
component: () =>
import ('pages/resetPassword.vue'),
children: [{
path: '/resetPassword',
component: () =>
import ('pages/resetPassword.vue')
}]
},
{ {
path: '/newTrip', path: '/newTrip',
component: () => component: () =>
......
src/statics/icons/favicon-128x128.png

4.46 KB | W: | H:

src/statics/icons/favicon-128x128.png

4.57 KB | W: | H:

src/statics/icons/favicon-128x128.png
src/statics/icons/favicon-128x128.png
src/statics/icons/favicon-128x128.png
src/statics/icons/favicon-128x128.png
  • 2-up
  • Swipe
  • Onion skin
src/statics/icons/favicon-16x16.png

555 Bytes | W: | H:

src/statics/icons/favicon-16x16.png

1.93 KB | W: | H:

src/statics/icons/favicon-16x16.png
src/statics/icons/favicon-16x16.png
src/statics/icons/favicon-16x16.png
src/statics/icons/favicon-16x16.png
  • 2-up
  • Swipe
  • Onion skin
src/statics/icons/favicon-32x32.png

998 Bytes | W: | H:

src/statics/icons/favicon-32x32.png

2.3 KB | W: | H:

src/statics/icons/favicon-32x32.png
src/statics/icons/favicon-32x32.png
src/statics/icons/favicon-32x32.png
src/statics/icons/favicon-32x32.png
  • 2-up
  • Swipe
  • Onion skin
src/statics/icons/favicon-96x96.png

3.22 KB | W: | H:

src/statics/icons/favicon-96x96.png

3.89 KB | W: | H:

src/statics/icons/favicon-96x96.png
src/statics/icons/favicon-96x96.png
src/statics/icons/favicon-96x96.png
src/statics/icons/favicon-96x96.png
  • 2-up
  • Swipe
  • Onion skin
src/statics/icons/favicon.ico

16.3 KB | W: | H:

src/statics/icons/favicon.ico

48.1 KB | W: | H:

src/statics/icons/favicon.ico
src/statics/icons/favicon.ico
src/statics/icons/favicon.ico
src/statics/icons/favicon.ico
  • 2-up
  • Swipe
  • Onion skin
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