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

网站优化

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