Commit 591d0f61 authored by 沈良进's avatar 沈良进

网站优化

parent a32874aa
<style scoped> <style lang="scss" scoped>
.header-box { .header-box {
max-width: 1200px; max-width: 1200px;
margin: 0 auto; margin: 0 auto;
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
} }
.select { .select {
color: #fff; color: #fff;
background-color: #ee4454; background-color: $primary;
} }
.menu-title { .menu-title {
font-weight: bold; font-weight: bold;
......
<style scoped> <style lang="scss" scoped>
.header-box { .header-box {
max-width: 1200px; max-width: 1200px;
margin: 0 auto; margin: 0 auto;
...@@ -28,8 +28,7 @@ ...@@ -28,8 +28,7 @@
line-height: 33px; line-height: 33px;
} }
.select { .select {
color: #fff; color: #fff;background-color: $primary;
background-color: #ee4454;
} }
.menu-title { .menu-title {
font-weight: bold; font-weight: bold;
......
<style scoped> <style scoped>
.fill { .fill {
background-image: url('../../assets/subscriber-bg.png'); background-image: url('../../assets/subscriber-bg.png');
width: 100%;
height: 301px; height: 301px;
background-size: cover
} }
.box { .box {
max-width: 1200px; max-width: 1200px;
...@@ -48,6 +50,9 @@ border-radius: 28px; ...@@ -48,6 +50,9 @@ border-radius: 28px;
height: 46px; height: 46px;
border-radius: 23px; border-radius: 23px;
} }
::v-deep .q-field__control-container {
padding-left: 30px;
}
</style>> </style>>
<template> <template>
<div class="fill"> <div class="fill">
...@@ -59,7 +64,7 @@ border-radius: 23px; ...@@ -59,7 +64,7 @@ border-radius: 23px;
最高可省60%,只有订阅用户才能享受到隐藏优惠,点击“订阅”,即表示你同意我们的《訂閱條款》 最高可省60%,只有订阅用户才能享受到隐藏优惠,点击“订阅”,即表示你同意我们的《訂閱條款》
</div> </div>
<div class="email-box" :class="{'mobile':$q.platform.is.mobile}"> <div class="email-box" :class="{'mobile':$q.platform.is.mobile}">
<q-input class="input" :class="{'mobile':$q.platform.is.mobile}" rounded outlined placeholder="請輸入您在使用的電子郵件"></q-input><q-btn color="primary" class="btn" label="提交"></q-btn> <q-input class="input" :class="{'mobile':$q.platform.is.mobile}" rounded outlined placeholder="請輸入您在使用的電子郵件"></q-input><q-btn unelevated color="primary" class="btn" label="提交"></q-btn>
</div> </div>
</div> </div>
</div> </div>
......
...@@ -281,7 +281,7 @@ export default { ...@@ -281,7 +281,7 @@ export default {
flag: 2, flag: 2,
mylabel: "登入", mylabel: "登入",
loading: false, loading: false,
inSending:false inSending: false,
}; };
}, },
created() {}, created() {},
...@@ -327,7 +327,6 @@ export default { ...@@ -327,7 +327,6 @@ export default {
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
const { type, unoinid } = res.data.data; const { type, unoinid } = res.data.data;
if (type === 1) { if (type === 1) {
window.localStorage.setItem( window.localStorage.setItem(
"b2bUser", "b2bUser",
JSON.stringify(res.data.data) JSON.stringify(res.data.data)
...@@ -454,15 +453,29 @@ export default { ...@@ -454,15 +453,29 @@ export default {
this.loginType = "PassWord"; this.loginType = "PassWord";
} }
}, },
isWeChat() {
//window.navigator.userAgent属性包含了浏览器类型、版本、操作系统类型、浏览器引擎类型等信息,这个属性可以用来判断浏览器类型
var ua = window.navigator.userAgent.toLowerCase();
//通过正则表达式匹配ua中是否含有MicroMessenger字符串
return ua.match(/MicroMessenger/i) == "micromessenger";
},
useWechatLogin() { useWechatLogin() {
// this.loginType = "wechat"; // this.loginType = "wechat";
// this.setWechatCode() // this.setWechatCode()
const { AppID, State, OpenRedirectUri } = this.openInfo; const { AppID, State, OpenRedirectUri } = this.openInfo;
let redirect_uri = OpenRedirectUri; let redirect_uri = OpenRedirectUri;
const url = `https://open.weixin.qq.com/connect/qrconnect?appid=${AppID}&redirect_uri=${encodeURIComponent('http://www.oytour.com/#/login')}&response_type=code&scope=snsapi_login&state=${State}&wechat_redirect=${redirect_uri}`; let url = `https://open.weixin.qq.com/connect/qrconnect?appid=${AppID}&redirect_uri=${encodeURIComponent(
"http://www.oytour.com/#/login"
)}&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,') // this.windowObjectReference = window.open(url, 'wechat', 'left: 20,top: 20,width:200,height:200,')
// console.log('windowObjectReference', this.windowObjectReference) // console.log('windowObjectReference', this.windowObjectReference)
// setTimeout(() => {console.log(this.windowObjectReference.close())}, 1000) // setTimeout(() => {console.log(this.windowObjectReference.close())}, 1000)
if (this.$q.platform.is.mobile && this.isWeChat()) {
// 移动端微信环境
url = `https://open.weixin.qq.com/connect/oauth2/authorize?appid=${AppID}&redirect_uri=${encodeURIComponent(
"http://www.oytour.com/#/login"
)}&response_type=code&scope=snsapi_userinfo&state=${State}&wechat_redirect=${redirect_uri}`;
}
window.location.href = url; window.location.href = url;
}, },
async login() { async login() {
......
...@@ -145,12 +145,23 @@ export default { ...@@ -145,12 +145,23 @@ export default {
null null
); );
}, },
isWeChat() {
//window.navigator.userAgent属性包含了浏览器类型、版本、操作系统类型、浏览器引擎类型等信息,这个属性可以用来判断浏览器类型
var ua = window.navigator.userAgent.toLowerCase();
//通过正则表达式匹配ua中是否含有MicroMessenger字符串
return ua.match(/MicroMessenger/i) == "micromessenger";
},
changeWechat() { changeWechat() {
const { AppID, State, OpenRedirectUri } = this.openInfo; const { AppID, State, OpenRedirectUri } = this.openInfo;
let redirect_uri = OpenRedirectUri; let redirect_uri = OpenRedirectUri;
console.log('${redirect_uri}/#/loginInfo',`${redirect_uri}/#/loginInfo`) console.log('${redirect_uri}/#/loginInfo',`${redirect_uri}/#/loginInfo`)
const url = `https://open.weixin.qq.com/connect/qrconnect?appid=${AppID}&redirect_uri=${encodeURIComponent(`http://www.oytour.com/#/loginInfo`)}&response_type=code&scope=snsapi_login&state=${State}&wechat_redirect=${redirect_uri}`; const url = `https://open.weixin.qq.com/connect/qrconnect?appid=${AppID}&redirect_uri=${encodeURIComponent(`http://www.oytour.com/#/loginInfo`)}&response_type=code&scope=snsapi_login&state=${State}&wechat_redirect=${redirect_uri}`;
if (this.$q.platform.is.mobile && this.isWeChat()) {
// 移动端微信环境
url = `https://open.weixin.qq.com/connect/oauth2/authorize?appid=${AppID}&redirect_uri=${encodeURIComponent(
"http://www.oytour.com/#/loginInfo"
)}&response_type=code&scope=snsapi_userinfo&state=${State}&wechat_redirect=${redirect_uri}`;
}
console.log('${redirect_uri}/#/loginInfo',`${redirect_uri}/#/loginInfo`, url) console.log('${redirect_uri}/#/loginInfo',`${redirect_uri}/#/loginInfo`, url)
window.location.href = url; window.location.href = url;
}, },
...@@ -168,6 +179,7 @@ export default { ...@@ -168,6 +179,7 @@ export default {
(r) => { (r) => {
if (r.data.resultCode == 1) { if (r.data.resultCode == 1) {
this.getUserInfo() this.getUserInfo()
this.$router.replace('/loginInfo')
this.$q.notify({ this.$q.notify({
type: "positive", type: "positive",
message: r.data.message, message: r.data.message,
......
...@@ -130,6 +130,7 @@ ...@@ -130,6 +130,7 @@
@input="changeCountry" @input="changeCountry"
emit-value emit-value
map-options map-options
options-dense
ref="CountryId" ref="CountryId"
square square
outlined outlined
......
...@@ -142,13 +142,13 @@ ...@@ -142,13 +142,13 @@
/> />
</div> --> </div> -->
<div class="col"> <div class="col">
<div class="title">電話(首次需驗證)</div> <div class="title">電話</div>
<q-input <q-input
ref="Moblie" ref="Moblie"
class="form-item" class="form-item"
v-model="form.Moblie" v-model="form.Moblie"
outlined outlined
:rules="[(val) => !!val || '请输入電話(首次需驗證)']" :rules="[(val) => !!val || '请输入電話']"
> >
<template v-slot:prepend> <template v-slot:prepend>
<div class="text-subtitle2"> <div class="text-subtitle2">
......
...@@ -191,6 +191,7 @@ ...@@ -191,6 +191,7 @@
<div class="col"> <div class="col">
<div class="title">國家/地區代碼</div> <div class="title">國家/地區代碼</div>
<q-select <q-select
options-dense
emit-value emit-value
map-options map-options
ref="AreaCode" ref="AreaCode"
...@@ -233,6 +234,7 @@ ...@@ -233,6 +234,7 @@
<q-select <q-select
emit-value emit-value
map-options map-options
options-dense
ref="card" ref="card"
square square
outlined outlined
......
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