Commit df15a353 authored by 吴春's avatar 吴春

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

parents f7a71179 66506c6f
<template>
<div class='wrapper'>
<input type="checkbox" :checked="inputSelect" @change="changeSelect" id='checkLabel'>
<label for="checkLabel"></label>
</div>
</template>
<style scoped>
.wrapper {
display: inline-block;
}
.wrapper input{
display:none;
}
.wrapper label{
position: relative;
background:grey;
cursor:pointer;
width: 50px;
height: 30px;
border-radius: 100px;
display:block;
}
.wrapper label::before {
content:'';
position: absolute;
/* display:block; */
width:30px;
height:30px;
border-radius: 30px;
background:white;
transition: all 0.36s;
top:0px;
left:0px;
}
.wrapper input:checked + label {
background:green;
}
.wrapper input:checked + label::before {
left: calc(100%);
transform: translateX(-100%);
transition: all .36s cubic-bezier(.78, .14, .15, .86);
}
</style>
<script>
export default {
props: {
value: {
default: false
}
},
data() {
return {
inputSelect: false
}
},
watch: {
value: function() {
this.inputSelect = this.value
}
},
methods: {
changeSelect() {
this.inputSelect = !this.inputSelect
console.log('changeSelect', this.inputSelect, this.value)
this.$emit('input', this.inputSelect)
}
}
}
</script>
\ No newline at end of file
<template>
<div class="column full-height">
<div class="col">
<div class="text-right">
<div class="text-right" v-if="$q.platform.is.desktop">
<q-btn
color="primary"
icon="refresh"
......@@ -112,23 +112,29 @@
<span class="text-subtitle2 text-grey-6 col">總金額</span>
<span class="text-h6 text-primary product-price">CNY {{ moneyFormat(sumPrice,0) }}</span>
</div>
<div class="q-mt-md text-right">
<span class="q-mr-lg f12 text-negative" v-if="!p.startDate" >
<div class="q-mt-md text-right"
:class="{'row wrap justify-end items-start':$q.platform.is.mobile}">
<span :class="{'col-12 q-mb-sm':$q.platform.is.mobile}">
<span class="f12 text-negative" v-if="!p.startDate"
:class="{'q-mr-lg':$q.platform.is.desktop}">
{{$q.platform.is.mobile?'請選擇上面的出行日期':'請選擇左側的出行日期'}}
</span>
<span class="q-mr-lg f12 text-negative"
<span class="f12 text-negative"
:class="{'q-mr-lg':$q.platform.is.desktop}"
v-if="(p.startDate&&!selectedCarObj)
||(p.startDate&&dataList.CarType==1&&(!selectedAirportObj||!unCarObj))
||(p.startDate&&dataList.CarType==2&&(!selectedAirportObj||!onCarObj))
||(p.startDate&&dataList.CarType==3&&(!onCarObj||!unCarObj))" >
{{`請選擇上面的${dataList.CarType==3?'車類型、上車下車點':dataList.CarType==1?'機場、車類型、下車點':'機場、車類型、上車點'}`}}
</span>
</span>
<q-btn color="primary" label="立即訂購" unelevated class="q-px-lg"
:disable="sumPrice==0||!selectedCarObj
||(dataList.CarType!=3&&!selectedAirportObj)
||(dataList.CarType==1&&!unCarObj)||(dataList.CarType==2&&!onCarObj)
||(dataList.CarType==3&&(!onCarObj||!unCarObj))"
@click="goOrderHandler"/>
</div>
</div>
</div>
......@@ -176,6 +182,7 @@ export default {
},
created() {
this.initModel();
console.log(this.p,'=======')
if(this.p.startDate){
this.chosenObj.startDate = this.p.startDate;
this.calcMoney()
......
......@@ -28,6 +28,9 @@
.margin {
margin: 10px;
}
.mr0 {
margin-right: 0 !important;
}
.mt {
margin-top: 10px;
}
......@@ -130,4 +133,9 @@
}
.white {
color: #fff;
}
.user-edit {
color: #2D90FF;
margin:0 20px;
cursor: pointer;
}
\ No newline at end of file
......@@ -121,7 +121,7 @@
<template v-if="details.TravelHours>0">
<q-icon name="iconfont icontime" size="20px" class="q-mr-xs q-ml-sm" />
<span class="q-mr-sm">
{{`行程時間:${details.TravelHours}小時`}}
{{`包車時長:${details.TravelHours} h`}}
</span>
</template>
</div>
......
......@@ -12,6 +12,12 @@
z-index: 999;
"
class="bg-white"
v-if="
(currentHeight > navs[0].top + 100 && $q.platform.is.desktop) ||
(currentHeight > priceListHeight &&
currentHeight < navs[0].top &&
$q.platform.is.mobile)
"
:style="{ transform: stickyHeight }"
>
<div
......@@ -31,7 +37,7 @@
unelevated
class="q-px-xl"
label="選擇方案"
@click="goScrollHandler('#scheme')"
@click="goScrollHandler(priceListHeight)"
/>
</div>
</div>
......@@ -141,13 +147,11 @@
icon="iconfont iconOwner-1"
label=" 印象自組團"
/>
<q-chip
v-if="dataList.dayList"
class="transparent q-mr-xl no-padding"
<q-chip
v-if="dataList.TravelHours>0" class="transparent q-mr-xl no-padding"
square
icon="iconfont icontime"
:label="` 行程時間 ${dataList.dayList.length} 天`"
/>
icon="iconfont icontime"
:label="`包車時長:${dataList.TravelHours} h`" />
<q-chip
class="transparent q-mr-xl no-padding"
square
......@@ -182,7 +186,7 @@
label="選擇方案"
unelevated
:disable="priceList.length>0?false:true"
@click="goScrollHandler('#scheme')"
@click="goScrollHandler(priceListHeight)"
:class="{ 'q-mt-md full-width': $q.platform.is.desktop }"
/>
</div>
......@@ -229,7 +233,7 @@
<q-tab
v-for="(x, i) in navs"
:key="i"
@click="goScrollHandler(x.id)"
@click="goScrollHandler(x.top + 20)"
:name="x.display"
:label="x.display"
></q-tab>
......@@ -245,20 +249,12 @@
style="max-width: 1200px; margin-left: auto; margin-right: auto"
>
<div class="text-h6">選擇方案</div>
<div
style="
background: #fff;
padding: 20px;
border-radius: 10px;
margin-top: 20px;
"
>
<div
class="rounded-borders bg-white q-pa-md q-mt-md"
v-if="$q.platform.is.mobile"
>
<q-field
class="q-my-md"
class="q-mt-md"
stack-label
label="選擇日期、選項"
standout
......@@ -276,22 +272,20 @@
></calendar>
</q-popup-proxy>
</q-field>
<template v-if="currentPrice && currentPrice.startDate">
<order-preview
class="q-pa-md"
:dataList="dataList"
:configId="msg.configId"
:Month="currentYM.str"
:price="currentPrice"
@reset="resetHandler"
@getPriceList="getPriceList"
></order-preview>
</template>
<order-preview
:dataList="dataList"
:configId="msg.configId"
:Month="currentYM.str"
:price="currentPrice"
@reset="resetHandler"
@getPriceList="getPriceList"
></order-preview>
</div>
<!--方案选择区 -->
<!-- <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>
<div
class="bg-white rounded-borders q-mt-md"
v-if="priceList && priceList.length > 0"
......@@ -315,7 +309,7 @@
</div>
<div class="text-grey f12">
<ul class="q-pl-md no-margin">
<li v-for="(x, i) in warnBuy" class="q-mt-md" :key="i">
<li v-for="(x, i) in warnBuy" :class="{'q-mt-md':$q.platform.is.desktop|(i!=0&&$q.platform.is.mobile)}" :key="i">
{{ x }}
</li>
</ul>
......@@ -333,7 +327,7 @@
color="primary"
outline
:label="showOrderPreview ? '取消選擇' : '選擇'"
@click="showOrderPreview = !showOrderPreview"
@click="changeShowOrderPreviewHandler"
class="q-px-lg"
/>
</div>
......@@ -347,7 +341,7 @@
style="border-top: 1px solid #eee"
v-if="showOrderPreview"
>
<div v-if="dataList.FreeCancelDay>0||dataList.TravelHours>0" class="q-pa-md bg-grey-2 row items-center rounded-borders">
<div class="q-pa-md bg-grey-2 row items-center rounded-borders">
<div class="text-subtitle2 text-weight-bold q-mr-xl">
關於此方案
</div>
......@@ -358,9 +352,13 @@
icon="iconfont iconcancel"
:label="`${dataList.FreeCancelDay}天前可免费取消`"
/>
<q-chip v-if="dataList.TravelHours>0" class="transparent q-mr-xl no-padding"
icon="iconfont icontime" :label="`行程時間:${dataList.TravelHours}小時`" />
</div>
<q-chip
class="transparent q-mr-xl no-padding"
square
icon="iconfont iconroundcheck"
label="6個工作日內(不含例休假)確認"
/>
</div>
<div class="q-mt-lg row" v-if="$q.platform.is.desktop">
<div class="col">
<calendar
......@@ -382,7 +380,7 @@
</div>
</div>
</div>
</div>
</div>
</div>
......@@ -395,7 +393,7 @@
<div
:class="{ 'col-8': $q.platform.is.desktop, col: $q.platform.is.mobile }"
>
<div id="product" :class="{
<div ref="product" class="text-h5 text-weight-bold text-left q-mt-xl" :class="{
'q-px-md': $q.screen.width < 1220 && $q.platform.is.mobile,
}">產品介紹</div>
<div
......@@ -406,7 +404,6 @@
v-if="dataList.feature && dataList.feature.featureHtml != ''"
></div>
<div
id="price"
class="text-h5 text-weight-bold text-left q-mt-xl"
ref="price"
:class="{
......@@ -445,8 +442,29 @@
'q-px-md': $q.screen.width < 1220 && $q.platform.is.mobile,
}"
></div>
<div
class="text-h5 text-weight-bold text-left q-mt-xl"
ref="warning"
:class="{
'q-px-md': $q.screen.width < 1220 && $q.platform.is.mobile,
}"
>
購買須知
</div>
<div
class="q-mt-lg trip-text bg-orange-1 q-pa-md rounded-borders q-mb-xl"
style="border: 1px dashed var(--q-color-warning)"
v-html="
dataList.feature
? dataList.feature.importantTip || '暂无购买须知'
: '暂无购买须知'
"
:class="{
'q-mx-md': $q.screen.width < 1220 && $q.platform.is.mobile,
}"
></div>
<div
id="assemblypoint"
class="text-h5 text-weight-bold text-left q-mt-xl"
ref="assemblypoint"
:class="{
......@@ -473,7 +491,6 @@
</div>
</div>
<div
id="experiencelocation"
class="text-h5 text-weight-bold text-left q-mt-xl"
ref="experiencelocation"
:class="{
......@@ -500,29 +517,6 @@
</div>
</div>
<div
id="warning"
class="text-h5 text-weight-bold text-left q-mt-xl"
ref="warning"
:class="{
'q-px-md': $q.screen.width < 1220 && $q.platform.is.mobile,
}"
>
購買須知
</div>
<div
class="q-mt-lg trip-text bg-orange-1 q-pa-md rounded-borders q-mb-xl"
style="border: 1px dashed var(--q-color-warning)"
v-html="
dataList.feature
? dataList.feature.importantTip || '暂无购买须知'
: '暂无购买须知'
"
:class="{
'q-mx-md': $q.screen.width < 1220 && $q.platform.is.mobile,
}"
></div>
<div
id="tips"
class="text-h5 text-weight-bold text-left q-mt-xl"
ref="tips"
:class="{
......@@ -544,7 +538,6 @@
}"
></div>
<div
id="cancelTips"
class="text-h5 text-weight-bold text-left q-mt-xl"
ref="cancelTips"
:class="{
......@@ -579,6 +572,7 @@
</div>
<template v-if="$q.platform.is.desktop">
<div class="col-1"></div>
<div class="col q-ml-xl position-relative">
<div style="position: sticky; top: 100px">
......@@ -586,7 +580,12 @@
class="text-subtitle2 text-grey-6 cursor-pointer q-mb-md"
v-for="(x, i) in navs"
:key="i"
@click="goScrollHandler(x.id)"
@click="goScrollHandler(x.top + 20)"
:class="{
'active-trip-module':
currentHeight >= x.top &&
(i == navs.length - 1 || currentHeight < navs[i + 1].top),
}"
>
{{ x.display }}
</div>
......@@ -656,7 +655,8 @@ export default {
warnBuy: [
"如一輛車位不夠使用,請購買多輛車",
"收費公路費、停車費、入園費等請另行繳納",
"由於交通擁堵,時間可能會略有變化",
"由於交通擁堵,時長可能會略有變化",
"每增加 30 分鐘,將收取相應的延期費。 (現場支付)",
],
showOrderPreview: false,
videoPosition: 0,
......@@ -672,43 +672,43 @@ export default {
],
navs: [
{
id: "#product",
val: "product",
top: 0,
isActive: false,
display: "產品介紹",
},
{
id: "#price",
val: "price",
top: 0,
isActive: false,
display: "費用說明",
},
{
id: "#warning",
val: "warning",
top: 0,
isActive: false,
display: "購買須知",
},
{
id: "#assemblypoint",
val: "assemblypoint",
top: 0,
isActive: false,
display: "接送點範圍",
},
{
id: "#experiencelocation",
val: "experiencelocation",
top: 0,
isActive: false,
display: "機場地點",
},
{
id: "#tips",
val: "tips",
top: 0,
isActive: false,
display: "溫馨提示",
},
{
id: "#cancelTips",
val: "cancelTips",
top: 0,
isActive: false,
display: "取消政策",
......@@ -745,6 +745,13 @@ export default {
immediate: true,
deep: true,
},
currentPrice: {
handler: function (val, oldval) {
this.currentPrice = val;
},
immediate: false,
deep: true,
},
},
created() {
if (this.$route.params.id) {
......@@ -755,6 +762,7 @@ export default {
}
},
mounted() {
window.addEventListener("scroll", this.handleScroll);
const timeStamp = Date.now()
const formattedString = date.formatDate(timeStamp, 'YYYY-MM-DD')
this.currentYM = {
......@@ -765,12 +773,36 @@ export default {
if (localStorage.baseifo) {
this.TripConfig = JSON.parse(window.localStorage.getItem("baseifo"));
}
window.addEventListener("scroll", this.menu);
// this.getData();
window.addEventListener("scroll", this.menu);
this.getCarData();
// this.getCarPriceData();
},
methods: {
changeShowOrderPreviewHandler(){
this.showOrderPreview=!this.showOrderPreview
if(!this.showOrderPreview){
// // this.currentPrice=null
// if(this.currentPrice){
// this.currentPrice.isSupportChildren=null
// this.currentPrice.unionCityList=null
// this.currentPrice.singleRoomPrice=0
// this.currentPrice.originalB2CPrice=0
// }
this.changeTripShowHandler()
}
},
changeTripShowHandler() {
this.$nextTick(() => {
this.navs.forEach((x) => {
x.top =
this.$refs[x.val].getBoundingClientRect().top +
this.currentHeight -
60;
});
});
},
getPriceList(Arr,id){
this.priceList = JSON.parse(Arr)
if(this.selectedCar === id) {
......@@ -782,6 +814,38 @@ export default {
getTopNum(x) {
this.days = JSON.parse(x);
},
handleScroll(e) {
let temp = this.getScroll().top;
this.stickyHeight = document.querySelector(".q-header--hidden")
? "translateY(0px)"
: "translateY(45px)";
this.currentHeight = temp;
if (
this.videoPosition > 0 &&
this.videoPosition < this.currentHeight &&
this.options.currentPage == 0 &&
!this.isPictureInPicture
) {
this.isPictureInPicture = true;
let t = document.querySelectorAll("video")[0];
try {
t.requestPictureInPicture();
} catch (error) {}
} else if (
this.videoPosition > 0 &&
this.videoPosition > this.currentHeight &&
this.options.currentPage == 0 &&
this.isPictureInPicture
) {
this.isPictureInPicture = false;
document.exitPictureInPicture();
}
let h = document.location.hash;
if (h.indexOf("#/detailCar/") == -1) {
window.removeEventListener("scroll", this.handleScroll);
}
},
getScroll() {
return {
left:
......@@ -796,9 +860,9 @@ export default {
0,
};
},
goScrollHandler(id) {
console.log("scrollIntoView", id);
document.querySelector(id).scrollIntoView({ behavior: "smooth" });
goScrollHandler(top) {
window.scrollTo(0, top);
// document.querySelector(id).scrollIntoView({ behavior: "smooth" });
},
slideHandler(e) {
this.options.currentPage = e.currentPage;
......@@ -821,7 +885,9 @@ export default {
},
resetHandler() {
this.currentPrice.startDate = "";
this.$refs.calendar.reset();
if(!this.$q.platform.is.mobile){
this.$refs.calendar.reset();
}
},
changeChosenDateHandler(val) {
val.price.version = new Date().getTime();
......@@ -890,6 +956,17 @@ export default {
this.zoomDiyContext = tw > 1 ? 1 : tw.toFixed(2);
}
setTimeout(() => {
this.navs.forEach((x) => {
x.top =
this.$refs[x.val].getBoundingClientRect().top + this.currentHeight - 60;
});
this.priceListHeight =
this.$refs.pricelist.getBoundingClientRect().top +
this.currentHeight -
60;
}, 1000);
try {
document
.querySelector("#scrollId .q-page-container")
......@@ -1029,6 +1106,21 @@ export default {
</script>
<style>
.active-trip-module {
color: var(--q-color-primary);
font-weight: 800;
position: relative;
}
.active-trip-module::before {
position: absolute;
content: " ";
top: 0;
bottom: 0;
left: -25px;
width: 5px;
border-radius: 5px;
background: var(--q-color-primary);
}
.slider-item {
transform: scale(1);
transition-timing-function: ease;
......
......@@ -308,7 +308,7 @@
</div>
<div class="text-grey f12">
<ul class="q-pl-md no-margin">
<li v-for="(x, i) in warnBuy" class="q-mt-md" :key="i">
<li v-for="(x, i) in warnBuy" :class="{'q-mt-md':$q.platform.is.desktop|(i!=0&&$q.platform.is.mobile)}" :key="i">
{{ x }}
</li>
</ul>
......
<style lang="scss" scoped>
</style>
<template>
<div>
<q-checkbox
v-for="item in checkboxList"
:key="item.label"
v-model="checkedValue"
:val="item.value"
@input="changeValue(item)"
>{{ item.label }}</q-checkbox
>
</div>
</template>
<script>
export default {
props: {
checkboxList: {
type: Array,
default: () => [],
},
radio: {
type: Boolean,
default: true,
},
value: {
default: "",
},
},
data() {
return {
checkedValue: [],
};
},
mounted() {
this.prevVal = JSON.parse(JSON.stringify(this.checkedValue));
},
watch: {
value: function () {
if (this.value) {
this.checkedValue = [this.value];
}
},
},
methods: {
changeValue(item) {
console.log("changeValue", item, this.checkedValue, this.prevVal);
const index = this.prevVal.findIndex((el) => item.value === el);
if (this.radio) {
if (index > -1) {
this.checkedValue = [];
} else {
this.checkedValue = [item.value];
}
}
this.$emit(
"input",
this.radio ? this.checkedValue[0] : this.checkedValue
);
this.prevVal = JSON.parse(JSON.stringify(this.checkedValue));
},
},
};
</script>
\ No newline at end of file
<style>
.login-box {
width: 436px;
padding: 30px 40px;
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.EMail" />
<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.Code" type="text" />
<div class="q-mt-sm" :class="cutDown ? 'text-grey-6' : ''">
{{ cutDown ? cutDown + "秒后可重新发送" : "重新發送驗證碼" }}
</div>
</div>
</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: {
EMail: "",
Code: "",
},
// , 'google', 'facebook', 'apple'
typeList: ["wechat"],
logo: "",
flag: 2,
mylabel: "注销账户",
};
},
created() {},
mounted() {
},
methods: {
sendVerify() {
if(this.inSending) return
this.inSending = true
if (this.verifyEmail()) {
this.apipost('directCustomer_post_SendMail', {Mailbox: this.loginMsg.EMail, SendType: 4}, (res) => {
this.inSending = false
if (res.data.resultCode == 1) {
this.isSend = true;
this.cutDown = 60;
this.startCutDown();
} else {
this.$q.notify({
type: "negative",
message: res.data.message,
position: "top",
timeout: 2000, // 以毫秒为单位; 0意味着没有超时
});
}
}, null)
} else {
this.inSending = false
}
},
startCutDown() {
this.timer = setTimeout(() => {
this.cutDown--;
if (this.cutDown) {
this.startCutDown();
}
}, 1000);
},
verifyEmail() {
if (/^[^@\s]+@[^@\s]+\.[^@\s]+$/.test(this.loginMsg.EMail)) {
this.tips = false;
return true;
} else {
// 提示用户邮箱格式有误
this.tips = true;
return false;
}
},
login() {
if(this.mylabel === "提交中...") {
return
}
if (this.loginMsg.EMail == "") {
this.$q.notify({
type: "negative",
message: "请输入账号",
position: "top",
timeout: 2000, // 以毫秒为单位; 0意味着没有超时
});
return;
}
if (this.loginMsg.Code == "") {
this.$q.notify({
type: "negative",
message: "请输入邮箱验证码",
position: "top",
timeout: 2000, // 以毫秒为单位; 0意味着没有超时
});
return;
}
this.mylabel = "提交中...";
this.apipost(
'b2c_post_SetAccountCancel',
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>
<style>
.login-box {
width: 436px;
padding: 30px 40px;
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.EMail" />
<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.Code" type="text" />
<div class="q-mt-sm" :class="cutDown ? 'text-grey-6' : ''">
{{ cutDown ? cutDown + "秒后可重新发送" : "重新發送驗證碼" }}
</div>
</div>
</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: {
EMail: "",
Code: "",
},
// , 'google', 'facebook', 'apple'
typeList: ["wechat"],
logo: "",
flag: 2,
mylabel: "修改邮箱",
};
},
created() {},
mounted() {
},
methods: {
sendVerify() {
if(this.inSending) return
this.inSending = true
if (this.verifyEmail()) {
this.apipost('directCustomer_post_SendMail', {Mailbox: this.loginMsg.EMail, SendType: 5}, (res) => {
this.inSending = false
if (res.data.resultCode == 1) {
this.isSend = true;
this.cutDown = 60;
this.startCutDown();
} else {
this.$q.notify({
type: "negative",
message: res.data.message,
position: "top",
timeout: 2000, // 以毫秒为单位; 0意味着没有超时
});
}
}, null)
} else {
this.inSending = false
}
},
startCutDown() {
this.timer = setTimeout(() => {
this.cutDown--;
if (this.cutDown) {
this.startCutDown();
}
}, 1000);
},
verifyEmail() {
if (/^[^@\s]+@[^@\s]+\.[^@\s]+$/.test(this.loginMsg.EMail)) {
this.tips = false;
return true;
} else {
// 提示用户邮箱格式有误
this.tips = true;
return false;
}
},
login() {
if(this.mylabel === "提交中...") {
return
}
if (this.loginMsg.EMail == "") {
this.$q.notify({
type: "negative",
message: "请输入账号",
position: "top",
timeout: 2000, // 以毫秒为单位; 0意味着没有超时
});
return;
}
if (this.loginMsg.Code == "") {
this.$q.notify({
type: "negative",
message: "请输入邮箱验证码",
position: "top",
timeout: 2000, // 以毫秒为单位; 0意味着没有超时
});
return;
}
this.mylabel = "提交中...";
this.apipost(
'b2c_post_UpdateCustomerEMail',
this.loginMsg,
(res) => {
this.mylabel = "修改邮箱";
if (res.data.resultCode == 1) {
// this.CommonJump("/login", {});
this.$emit('change')
this.$q.notify({
type: "positive",
message: res.data.message,
position: "top",
timeout: 2000, // 以毫秒为单位; 0意味着没有超时
});
} else {
this.$q.notify({
type: "negative",
message: res.data.message,
position: "top",
timeout: 2000, // 以毫秒为单位; 0意味着没有超时
});
}
},
(err) => {}
);
},
},
};
</script>
......@@ -33,14 +33,15 @@
}
.img-box {
width: 50px;
height: 50px;
background: #F5F5F5;
border-radius: 25px;
}.img {
height: 50px;
background: #f5f5f5;
border-radius: 25px;
}
.img {
width: 50px;
height: 50px;
display: block;
padding: 11px;
height: 50px;
display: block;
padding: 11px;
}
</style>
<template>
......@@ -49,50 +50,135 @@ padding: 11px;
<div class="tips">登陸方式管理</div>
<div class="card">
<div class="flex justify-between">
<div>郵箱<span class="text-grey-6">(默認地址)</span></div>
<div><span>修改</span><span>删除</span></div>
<div>
<span class="f18 bold">郵箱</span
><span class="text-grey-6">(默認地址)</span>
<div class="text-grey-7">{{ form.Mailbox }}</div>
</div>
<div>
<span class="user-edit mr0" @click="changeEmail">修改</span>
<!-- <span class="text-grey-6 cursor-pointer" @click="deleteUser(item)">删除</span> -->
</div>
</div>
</div>
<div class="card flex justify-between">
<div class="img-box">
<img class="img" src="../../assets/img/wechat.png" />
</div>
<div class="flex justify-between">
<div>郵箱<span class="text-grey-6">(默認地址)</span></div>
<div><span>修改</span><span>删除</span></div>
<div class="img-box">
<img class="img" src="../../assets/img/wechat.png" />
</div>
<div class="q-ml-sm">
<div class="f18 bold">微信</div>
<div class="text-grey-7">{{ form.WXNickName }}</div></div>
</div>
<div>
<span class="user-edit mr0" @click="changeWechat">修改</span>
<!-- <span class="text-grey-6 cursor-pointer" @click="deleteUser(item)">删除</span> -->
</div>
</div>
<div></div>
<q-dialog content-style="width: 900px" v-model="showReset">
<resetEmail @change="resetEmailSuccess"></resetEmail>
</q-dialog>
</div>
</div>
</template>
<script>
import resetEmail from "./components/resetEmail.vue";
export default {
components: { resetEmail },
data() {
return {
form: {
lastName: "",
firstName: "",
},
model: "",
date: "",
options: [],
showReset: false,
form: {},
};
},
mounted() {
const { code, state } = this.$route.query;
if (code) {
this.reSetWechat(code, state);
}
this.getUserInfo();
this.getOpenInfo();
this.userInfo = this.$user.userInfo;
console.log("let u = this.$user.userInfo;", this.userInfo);
},
methods: {
submit() {
const verifyArr = ["fastName", "lastName"];
verifyArr.forEach((item) => {
this.$refs[item].validate();
});
verifyArr.forEach((item) => {
if (item.$refs[item].hasError) {
this.formHasError = true;
}
});
if ((this.formHasError = true)) {
return;
}
getUserInfo() {
this.apipost(
"GetCustomerInfo_post",
{
Id: this.userInfo?.id,
},
(res) => {
if (res.data.resultCode == 1) {
this.form = res.data.data;
} else {
// this.$notify(res.data.message);
this.$q.notify({
type: "negative",
message: res.data.message,
position: "top",
timeout: 2000, // 以毫秒为单位; 0意味着没有超时
});
}
},
null
);
},
getOpenInfo() {
this.apipost(
"GetOpenInfo_post",
{},
(r) => {
if (r.data.resultCode == 1) {
this.openInfo = r.data.data;
} else {
this.$q.notify({
type: "negative",
message: r.data.message,
position: "top",
timeout: 2000, // 以毫秒为单位; 0意味着没有超时
});
}
},
null
);
},
changeWechat() {
const { AppID, State, OpenRedirectUri } = this.openInfo;
let redirect_uri = OpenRedirectUri;
const url = `https://open.weixin.qq.com/connect/qrconnect?appid=${AppID}&redirect_uri=${redirect_uri}/loginInfo&response_type=code&scope=snsapi_login&state=${State}&wechat_redirect=${redirect_uri}`;
window.location.href = url;
},
changeEmail() {
this.showReset = true;
},
resetEmailSuccess() {
this.showReset = false;
this.getUserInfo();
},
reSetWechat(code, state) {
this.apipost(
"GetOpenInfo_post",
{ code, state },
(r) => {
if (r.data.resultCode == 1) {
this.$q.notify({
type: "positive",
message: r.data.message,
position: "top",
timeout: 2000, // 以毫秒为单位; 0意味着没有超时
});
} else {
this.$q.notify({
type: "negative",
message: r.data.message,
position: "top",
timeout: 2000, // 以毫秒为单位; 0意味着没有超时
});
}
},
null
);
},
},
};
......
......@@ -18,13 +18,19 @@
::v-deep .q-field__control {
height: 40px;
}
::v-deep .q-field--auto-height .q-field__control {
min-height: 40px;
}
::v-deep .q-field__marginal {
height: 40px;
}
.title {
margin-top: 20px;
margin-bottom: 10px;
}
.card {
margin-top: 20px;
width: 433px;
width: 413px;
height: 170px;
background: #ffffff;
border: 1px solid #eeeeee;
......@@ -62,86 +68,321 @@
<div class="content q-ma-lg bg-white">
<div class="q-ma-lg">
<div class="tips">
收貨地址 <span>您已创建 4个收货地址,最多可创建 10个</span>
收貨地址 <span>您已创建 {{count}}个收货地址,最多可创建 10个</span>
</div>
<div class="card">
<div class="flex justify-between label">
<div>唐艷林<span class="text-grey-6">(默認地址)</span></div>
<div><span>修改</span><span>删除</span></div>
<div class="flex flex-wrap justify-between">
<div class="card" v-for="item in pageData" :key="item.Id">
<div class="flex justify-between label">
<div>
{{ item.Name
}}<span class="text-grey-6" v-if="item.IsDefault === 1"
>(默認地址)</span
>
</div>
<div>
<span class="user-edit" @click="editUser(item)">编辑</span>
<span class="text-grey-6 cursor-pointer" @click="deleteUser(item)"
>删除</span
>
</div>
</div>
<div class="address-item q-pt-sm">
所在地區:{{ item.CountryName }} {{ item.CityName }}
</div>
<div class="address-item">詳細地址:{{ item.Address }}</div>
<div class="address-item">手機:{{ item.Mobile }}</div>
</div>
<div class="address-item q-pt-sm">所在地區:四川成都市成華區跳蹬河街道</div>
<div class="address-item">詳細地址:建設南路163號3棟</div>
<div class="address-item">手機:180****1613</div>
<!-- <div class="card flex flex-center" @click="showDialog"><span></span>添加郵寄地址</div> -->
<q-btn v-if="count < 10"
class="card flex flex-center"
color="blue"
unelevated
outline
@click="isShowDialog = true"
label="添加郵寄地址"
></q-btn>
</div>
<div class="card flex flex-center" @click="showDialog"><span></span>添加郵寄地址</div>
</div>
<q-dialog content-style="width: 900px" v-model="isShowDialog">
<div class="bg-white dialog-box">
<div>添加邮寄地址</div>
<div class="dialog-box">
<div class="row">
<div class="col">
<div class="title"></div>
<q-input
class="form-item"
v-model="form.firstName"
outlined
placeholder="姓"
ref="firstName"
:rules="[(val) => val !== '' || '请输入姓氏']"
></q-input>
</div>
<div class="col">
<div class="title"></div>
<q-input
ref="lastName"
class="form-item"
placeholder="名"
v-model="form.lastName"
outlined
:rules="[(val) => val !== '' || '请输入名字']"
></q-input>
<div class="bg-white dialog-box" style="width: 800px; padding: 20px">
<div>添加邮寄地址</div>
<form @submit.prevent.stop="submit" class="q-gutter-md">
<div>
<div class="row">
<div class="col">
<div class="title">全名</div>
<q-input
class="form-item"
v-model="form.Name"
outlined
placeholder="全名"
ref="Name"
:rules="[(val) => !!val || '请输入全名']"
></q-input>
</div>
</div>
<div class="row">
<div class="col">
<div class="title">選擇手機區號</div>
<q-select
ref="AreaCode"
square
outlined
option-value="ID"
option-label="PhoneCode"
class="form-item"
v-model="form.AreaCode"
:options="phoneCountList"
placeholder="選擇手機區號"
:rules="[(val) => Boolean(val) || '请選擇手機區號']"
/>
</div>
<div class="col">
<div class="title">手機號碼</div>
<q-input
ref="Mobile"
class="form-item"
placeholder="手機號碼"
v-model="form.Mobile"
outlined
:rules="[(val) => !!val || '请输入手機號碼']"
></q-input>
</div>
</div>
<div class="row">
<div class="col">
<div class="title">國家/地區</div>
<q-select
ref="CountryId"
square
outlined
option-value="ID"
option-label="Name"
class="form-item"
v-model="form.CountryId"
:options="countList"
placeholder="Filled"
:rules="[(val) => Boolean(val) || '请选择國家/地區']"
/>
</div>
<div class="col">
<div class="title">城市</div>
<q-input
ref="CityName"
class="form-item"
placeholder="城市"
v-model="form.CityName"
outlined
:rules="[(val) => !!val || '请输入電話(首次需驗證)']"
></q-input>
</div>
</div>
<div class="row">
<div class="col">
<div class="title">詳細地址</div>
<q-input
ref="Address"
class="form-item"
placeholder="詳細地址"
v-model="form.Address"
outlined
:rules="[(val) => !!val || '请输入詳細地址)']"
></q-input>
</div>
<div class="col">
<div class="title">郵政編碼</div>
<q-input
ref="PostalCode"
class="form-item"
placeholder="郵政編碼"
v-model="form.PostalCode"
outlined
:rules="[(val) => !!val || '请输入郵政編碼']"
></q-input>
</div>
</div>
<div class="flex items-center q-my-sm">
<BaseSwitch v-model="form.IsDefault"></BaseSwitch
><span class="q-ml-sm">保存為默認地址</span></div>
<div>
<q-btn color="primary" type="submit" unelevated label="保存" />
</div>
</div>
</div>
<div>
<q-btn color="primary" unelevated label="保存" @click="submit" />
</div>
</form>
</div>
</div>
</q-dialog>
</div>
</template>
<script>
import BaseSwitch from "../../components/base-switch.vue";
export default {
components: {
BaseSwitch,
},
data() {
return {
isShowDialog: false,
isShowDialog: false,
selectedKey: "全部",
form: {
lastName: "",
firstName: "",
Name: "",
Mobile: "",
},
model: "",
date: "",
options: [],
countList: [],
phoneCountList: [],
count: 0,
pageData: [],
};
},
mounted() {
this.id = 0;
this.getUsersList();
this.getCountryInfo();
},
methods: {
showDialog() {
this.isShowDialog = true
getCountryInfo() {
this.apipost(
"GetCountryInfo_post",
{},
(res) => {
if (res.data.resultCode == 1) {
const { phoneCountList, countList } = res.data.data;
this.countList = countList;
this.phoneCountList = phoneCountList;
} else {
// this.$notify(res.data.message);
this.$q.notify({
type: "negative",
message: res.data.message,
position: "top",
timeout: 2000, // 以毫秒为单位; 0意味着没有超时
});
}
},
null
);
},
changeCouponType(item) {
this.selectedKey = item;
},
submit() {
const verifyArr = ["fastName", "lastName"];
this.formHasError = false;
const verifyArr = [
"Name",
"AreaCode",
"Mobile",
"CountryId",
"CityName",
"Address",
"PostalCode",
];
verifyArr.forEach((item) => {
console.log("this.$refs[item]", this, item, this.$refs[item]);
this.$refs[item].validate();
});
verifyArr.forEach((item) => {
if (item.$refs[item].hasError) {
console.log("item", item);
if (this.$refs[item].hasError) {
console.log("item", item);
this.formHasError = true;
}
});
if ((this.formHasError = true)) {
console.log("this.formHasError", this.formHasError, this.form);
if (this.formHasError) {
return;
}
this.submitUserInfo();
},
getUsersList() {
this.apipost(
"b2c_post_GetMailingAddressPageListt",
{ pageIndex: 1, pageSize: 20 },
(res) => {
if (res.data.resultCode == 1) {
const { count, pageData } = res.data.data;
this.count = count;
this.pageData = pageData;
} else {
// this.$notify(res.data.message);
this.$q.notify({
type: "negative",
message: res.data.message,
position: "top",
timeout: 2000, // 以毫秒为单位; 0意味着没有超时
});
}
},
null
);
},
editUser(item) {
console.log("editUser", item);
this.form = {...item};
this.form.IsDefault = this.form.IsDefault === 1
this.isShowDialog = true;
},
deleteUser(item) {
this.apipost(
"b2c_post_DelMailingAddressInfo",
{
AddressId: item.Id,
},
(res) => {
if (res.data.resultCode == 1) {
this.$q.notify({
type: "positive",
message: res.data.message,
position: "top",
timeout: 2000, // 以毫秒为单位; 0意味着没有超时
});
this.getUsersList();
} else {
// this.$notify(res.data.message);
this.$q.notify({
type: "negative",
message: res.data.message,
position: "top",
timeout: 2000, // 以毫秒为单位; 0意味着没有超时
});
}
},
null
);
},
submitUserInfo() {
let params = { ...this.form };
params.AreaCode = params.AreaCode.ID;
params.CountryId = params.CountryId.ID;
params.IsDefault = params.IsDefault ? 1 : 2;
this.apipost(
"b2c_post_SetMailingAddressInfo",
params,
(res) => {
if (res.data.resultCode == 1) {
this.$q.notify({
type: "positive",
message: res.data.message,
position: "top",
timeout: 2000, // 以毫秒为单位; 0意味着没有超时
});
this.isShowDialog = false;
this.getUsersList();
} else {
// this.$notify(res.data.message);
this.$q.notify({
type: "negative",
message: res.data.message,
position: "top",
timeout: 2000, // 以毫秒为单位; 0意味着没有超时
});
}
},
null
);
},
},
};
......
......@@ -4,6 +4,26 @@
height: 40px;
margin: 10px;
}
.form-group {
width: 320px;
}
.form-group {
position: relative;
margin-bottom: 15px;
}
.form-group i {
position: absolute;
right: 12px;
bottom: 0;
z-index: 2;
width: 40px;
height: 40px;
text-align: center;
line-height: 40px;
color: #999;
font-size: 28px;
cursor: pointer;
}
.content {
width: 900px;
}
......@@ -33,25 +53,53 @@
设置密码(8 - 20个字符,须至少包含1个数字、1个字母及1个特殊符号)
</div>
<div class="text-grey-6">高强度密码能提高账号安全性</div>
<q-input
class="form-item"
v-model="form.firstName"
outlined
placeholder="姓"
ref="firstName"
:rules="[(val) => val !== '' || '请输入姓氏']"
></q-input>
<q-input
class="form-item"
v-model="form.firstName"
outlined
placeholder="姓"
ref="firstName"
:rules="[(val) => val !== '' || '请输入姓氏']"
></q-input>
<div>
<q-btn color="primary" unelevated label="确认" @click="submit" />
</div>
<form @submit.prevent.stop="submit">
<div class="form-group">
<q-input
class="form-item"
v-model="form.OldPassword"
outlined
placeholder="旧密码"
ref="OldPassword"
:type="isPasswordOld === 2 ? 'PassWord' : 'text'"
:rules="[(val) => val !== '' || '请输入旧密码']"
></q-input
><i
class="iconfont iconyanjing_xianshi"
v-if="isPasswordOld == 1"
@click="isPasswordOld = 2"
></i>
<i
class="iconfont iconbiyan"
v-if="isPasswordOld == 2"
@click="isPasswordOld = 1"
></i>
</div>
<div class="form-group">
<q-input
class="form-item"
v-model="form.NewPassword"
outlined
placeholder="新密码"
ref="NewPassword"
:type="isPassword === 2 ? 'PassWord' : 'text'"
:rules="[(val) => val !== '' || '请输入新密码']"
></q-input
><i
class="iconfont iconyanjing_xianshi"
v-if="isPassword == 1"
@click="isPassword = 2"
></i>
<i
class="iconfont iconbiyan"
v-if="isPassword == 2"
@click="isPassword = 1"
></i>
</div>
<div>
<q-btn color="primary" type="submit" unelevated label="确认" />
</div>
</form>
</div>
</div>
</div>
......@@ -64,66 +112,205 @@
<div class="text-grey-6">
抢先获取印象最新优惠活动、优惠码、折扣信息及最新动向
</div>
<q-checkbox>电子邮件</q-checkbox>
<q-checkbox>短信</q-checkbox>
<checkboxGroupVue
:checkboxList="emailType"
v-model="setInfoForm.DiscountsNoticeWay"
></checkboxGroupVue>
</div>
<div>
<div>消息提醒</div>
<div class="text-grey-6">
获取购物车内活动及支付状态、评价提醒、推荐好友获取优惠等信息
</div>
<q-checkbox>电子邮件</q-checkbox>
<q-checkbox>短信</q-checkbox>
<checkboxGroupVue
:checkboxList="emailType"
v-model="setInfoForm.MessageNoticeWay"
></checkboxGroupVue>
</div>
<div>
<div>賬戶通知</div>
<div class="text-grey-6">
接收重要通知,如订单摘要、凭证及活动取消
</div>
<q-checkbox>电子邮件</q-checkbox>
<q-checkbox>短信</q-checkbox>
<checkboxGroupVue
:checkboxList="emailType"
v-model="setInfoForm.AccountNoticeWay"
></checkboxGroupVue>
</div>
<div>
<q-btn
color="primary"
unelevated
label="更改偏好設置"
@click="submit"
@click="changeNoticeType"
/>
</div>
<div class="tips q-mt-lg">註銷賬戶</div>
<div class="q-mt-sm">删除您的Klook客路帐户及个人数据</div>
<div class="tips q-mt-lg">註銷賬戶</div>
<q-btn color="primary" class="q-mt-sm" @click="removeAccount">删除您的帐户及个人数据</q-btn>
</div>
</div>
<q-dialog content-style="width: 900px" v-model="showRemove">
<removeAccount></removeAccount>
</q-dialog>
</div>
</template>
<script>
import checkboxGroupVue from "./components/checkboxGroup.vue";
import removeAccount from './components/removeAccount.vue'
export default {
components: { checkboxGroupVue, removeAccount },
data() {
return {
isPasswordOld: 2,
isPassword: 2,
emailType: [
{ label: "电子邮件", value: 1 },
{ label: "短信", value: 2 },
],
setInfoForm: {
DiscountsNoticeWay: 1,
MessageNoticeWay: 1,
AccountNoticeWay: 1,
},
form: {
lastName: "",
firstName: "",
OldPassword: "",
NewPassword: "",
},
model: "",
date: "",
options: [],
showRemove: false,
};
},
mounted() {
this.getUserInfo();
},
methods: {
removeAccount() {
this.showRemove = true
},
getUserInfo() {
this.apipost(
"GetCustomerInfo_post",
{
Id: this.userInfo?.id,
},
(res) => {
if (res.data.resultCode == 1) {
const { DiscountsNoticeWay, MessageNoticeWay, AccountNoticeWay } =
res.data.data;
this.setInfoForm = {
DiscountsNoticeWay,
MessageNoticeWay,
AccountNoticeWay,
};
} else {
// this.$notify(res.data.message);
this.$q.notify({
type: "negative",
message: res.data.message,
position: "top",
timeout: 2000, // 以毫秒为单位; 0意味着没有超时
});
}
},
null
);
},
changeNoticeType() {
let arr = ["DiscountsNoticeWay", "MessageNoticeWay", "AccountNoticeWay"];
let notify = {
DiscountsNoticeWay: "请选择優惠及更新信息偏好",
MessageNoticeWay: "请选择消息提醒偏好",
AccountNoticeWay: "请选择賬戶通知偏好",
};
let item = "";
for (let i = 0; i < arr.length; i++) {
item = arr[i];
if (!this.setInfoForm[item]) {
// this.$notify(res.data.message);
this.$q.notify({
type: "negative",
message: notify[item],
position: "top",
timeout: 2000, // 以毫秒为单位; 0意味着没有超时
});
return;
}
}
this.submitChangeNotice();
},
submitChangeNotice() {
this.apipost(
"b2c_post_SetCustomerNotice",
this.setInfoForm,
(res) => {
if (res.data.resultCode == 1) {
// this.$notify(res.data.message);
this.$q.notify({
type: "positive",
message: res.data.message,
position: "top",
timeout: 2000, // 以毫秒为单位; 0意味着没有超时
});
} else {
// this.$notify(res.data.message);
this.$q.notify({
type: "negative",
message: res.data.message,
position: "top",
timeout: 2000, // 以毫秒为单位; 0意味着没有超时
});
}
},
null
);
},
resetPassword() {
console.log("resetPassword");
this.apipost(
"b2c_post_UpdateCustomerPassWord",
this.form,
(res) => {
if (res.data.resultCode == 1) {
// this.$notify(res.data.message);
this.$q.notify({
type: "positive",
message: res.data.message,
position: "top",
timeout: 2000, // 以毫秒为单位; 0意味着没有超时
});
} else {
// this.$notify(res.data.message);
this.$q.notify({
type: "negative",
message: res.data.message,
position: "top",
timeout: 2000, // 以毫秒为单位; 0意味着没有超时
});
}
},
null
);
},
submit() {
const verifyArr = ["fastName", "lastName"];
this.formHasError = false;
const verifyArr = ["OldPassword", "NewPassword"];
console.log("submit");
verifyArr.forEach((item) => {
console.log("submit", this.$refs[item]);
this.$refs[item].validate();
});
verifyArr.forEach((item) => {
if (item.$refs[item].hasError) {
if (this.$refs[item].hasError) {
this.formHasError = true;
}
});
if ((this.formHasError = true)) {
console.log("this.formHasError", this.formHasError);
if (this.formHasError) {
return;
}
this.resetPassword();
},
},
};
......
......@@ -82,18 +82,18 @@
<div class="card" v-for="item in pageData" :key="item.id">
<div class="flex card-title justify-between">
<div class="flex">
<span>订单号</span>
<span class="phone">联系客服</span>
<span>{{item.Name}}</span>
<span class="phone">手機號:{{item.Mobile}}</span>
</div>
<span>
<span>编辑</span>
<span>删除</span>
<span class="user-edit" @click="editUser(item)">编辑</span>
<span class="text-grey-6 cursor-pointer" @click="deleteUser(item)">删除</span>
</span>
</div>
<div class="flex q-py-sm">
<div class="row">
<div class="col-12">中國內地身份證:510181********0920</div>
<div class="col-12">中國內地身份證:510181********0920</div>
<div class="row q-pa-lg" v-for="(item, index) in item.CardList" :key="index">
<div class="col">中國內地身份證:510181********0920</div>
<div class="col">中國內地身份證:510181********0920</div>
</div>
</div>
</div>
......@@ -116,10 +116,10 @@
<div class="title"></div>
<q-input
class="form-item"
v-model="form.Surname"
v-model="form.SurName"
outlined
placeholder="姓"
ref="Surname"
ref="SurName"
:rules="[(val) => !!val || '请输入姓氏']"
></q-input>
</div>
......@@ -150,10 +150,10 @@
<div class="col">
<div class="title">名字(需與旅遊證件一致)</div>
<q-input
ref="EnSurname"
ref="EnSurName"
class="form-item"
placeholder="名字(需與旅遊證件一致)"
v-model="form.EnSurname"
v-model="form.EnSurName"
outlined
:rules="[(val) => !!val || '请输入名字(需與旅遊證件一致)']"
></q-input>
......@@ -179,10 +179,10 @@
<div class="col">
<div class="title">電話(首次需驗證)</div>
<q-input
ref="Moblie"
ref="Mobile"
class="form-item"
placeholder="電話(首次需驗證)"
v-model="form.Moblie"
v-model="form.Mobile"
outlined
:rules="[(val) => !!val || '请输入電話(首次需驗證)']"
></q-input>
......@@ -210,8 +210,8 @@
/>
</div>
<div class="col">
<div class="flex justify-between items-center">
<div class="title">证件号码</div>
<div class="title flex justify-between items-center">
<div>证件号码</div>
<div v-if="index > 0" @click="deleteCardItem(item)">删除</div>
</div>
<q-input
......@@ -246,11 +246,11 @@ export default {
isShowDialog: false,
selectedKey: "全部",
form: {
Surname: "",
SurName: "",
Name: "",
EnName: "",
EnSurname: "",
Moblie: "",
EnSurName: "",
Mobile: "",
CardList: [],
},
model: "",
......@@ -328,11 +328,11 @@ export default {
submit() {
this.formHasError = false;
const verifyArr = [
"Surname",
"SurName",
"Name",
"EnName",
"EnSurname",
"Moblie",
"EnSurName",
"Mobile",
];
verifyArr.forEach((item) => {
console.log("this.$refs[item]", this, item, this.$refs[item]);
......@@ -373,11 +373,16 @@ export default {
null
);
},
deleteUser() {
editUser(item) {
console.log('editUser', item)
this.form = item
this.isShowDialog = true
},
deleteUser(item) {
this.apipost(
"b2c_post_DelTripGuestInfo",
{
Id: this.userInfo?.id,
TripGuestId: item.Id,
},
(res) => {
if (res.data.resultCode == 1) {
......@@ -418,6 +423,8 @@ export default {
position: "top",
timeout: 2000, // 以毫秒为单位; 0意味着没有超时
});
this.isShowDialog = false;
this.getUsersList()
} else {
// this.$notify(res.data.message);
this.$q.notify({
......
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