Commit 52549bbe by zhuzhequan

Merge branch 'dev' into 'master'

重新绑定功能样式修改

See merge request !17
parents 75abb357 7c4ec3fe
......@@ -4,7 +4,7 @@
<a class="nav-icon icon-menu" href="javascript:;" @click="toggleShow"></a>
</div>
<div class="header-nav-mobile_logo">
<img src="../assets/logo.png" height="40px" />
<img src="../assets/logo.png" style="height: 40px" />
</div>
<div class="header-nav-mobile_login" v-if="!userInfo">
<span @click="login">登录</span>
......@@ -25,7 +25,7 @@
<div v-show="showing" class="header-nav-mobile-overlay">
<div
class="header-nav-mobile-header flex items-center justify-between p-2.5">
<img src="../assets/logo.png" class="w-32" height="40px" />
<img src="../assets/logo.png" class="w-32" style="height: 40px" />
<i
class="el-icon-close text-xl font-bold cursor-pointer"
@click="toggleShow"></i>
......
......@@ -2,7 +2,7 @@
<div class="login_bg">
<div class="contact-header">
<div class="header-image">
<img src="../assets/logo.png" height="40px" />
<img src="../assets/logo.png" style="height: 40px" />
</div>
<div class="user-info">
<!-- <div class="user-msg">
......@@ -16,15 +16,15 @@
</div>
<div class="login_content">
<div class="no-authority">
<div style="display: flex;align-items: center">
<div style="display: flex; align-items: flex-end">
<div
style="
text-align: center;
color: #fff;
font-size: 50px;
line-height: 100px;
font-family: '微软雅黑';
"
text-align: center;
color: #fff;
font-size: 50px;
line-height: 100px;
font-family: '微软雅黑';
"
v-if="userInfo && userInfo.erpKey">
<a
:href="`https://${userInfo && userInfo.erpKey}.jomalls.com`"
......@@ -35,16 +35,26 @@
</div>
<h1
style="
text-align: center;
color: #fff;
font-size: 50px;
line-height: 100px;
font-family: '微软雅黑';
"
text-align: center;
color: #fff;
font-size: 50px;
line-height: 100px;
font-family: '微软雅黑';
"
v-else>
您尚未开通erp权限,请联系您的商务经理
</h1>
<el-button @click="handleBind" style="margin-left: 8px;height: 41px" type="primary">重新绑定ERP</el-button>
<!-- <b-->
<!-- @click="handleBind"-->
<!-- style="-->
<!-- cursor: pointer;-->
<!-- font-size: 26px;-->
<!-- color: blue;-->
<!-- margin-bottom: 24px;-->
<!-- margin-left: 10px;-->
<!-- ">-->
<!-- 重新绑定ERP-->
<!-- </b>-->
</div>
<h2
style="
......@@ -66,30 +76,53 @@
">
邮箱:nina@jomalls.com
</h2>
<el-button
style="
text-align: center;
font-size: 30px;
width: 160px;
height: 60px;
margin-left: 300px;
margin-top: 30px;
border-radius: 15px;
"
type="success"
@click="goBack">
返回首页
</el-button>
<div style="display:flex;justify-content: center">
<el-button
style="
text-align: center;
font-size: 30px;
width: 160px;
height: 60px;
margin-top: 30px;
border-radius: 15px;
"
type="success"
@click="goBack">
返回首页
</el-button>
<el-button
:style="{width:userInfo && userInfo.erpKey?'180':''}"
style="
text-align: center;
font-size: 30px;
width: 160px;
height: 60px;
margin-left: 40px;
margin-top: 30px;
border-radius: 15px;
"
type="primary"
@click="handleBind">
{{ userInfo && userInfo.erpKey ? '重新' : '' }}绑定ERP
</el-button>
</div>
</div>
</div>
<el-dialog :close-on-click-modal="false" :visible.sync="bindVisible" titlt="" width="500px">
<el-dialog
:close-on-click-modal="false"
:visible.sync="bindVisible"
titlt=""
width="500px">
<template slot="title">重新绑定ERP</template>
<el-form ref="formRef" :model="bindForm" inline label-width="80px">
<el-form-item label="域名" prop="erpKey" :rules="[{ required: true, message: '请输入erp域名',trigger:'blur' }]">
<el-input style="width: 100%;" v-model="bindForm.erpKey" clearable>
<template slot="append">
.jomalls.com
</template>
<el-form-item
label="域名"
prop="erpKey"
:rules="[
{ required: true, message: '请输入erp域名', trigger: 'blur' },
]">
<el-input style="width: 100%" v-model="bindForm.erpKey" clearable>
<template slot="append">.jomalls.com</template>
</el-input>
</el-form-item>
</el-form>
......@@ -111,52 +144,52 @@ export default {
components: {},
data() {
return {
bindVisible:false,
bindForm:{
erpKey:''
bindVisible: false,
bindForm: {
erpKey: '',
},
userInfo: JSON.parse(localStorage.getItem('userInfo')),
shopifyObj: JSON.parse(localStorage.getItem('shopifyObj'))
shopifyObj: JSON.parse(localStorage.getItem('shopifyObj')),
}
},
computed: {
// ...mapState(['shopifyObj']),
},
mounted() {
console.log(this.shopifyObj);
console.log(this.shopifyObj)
if (this.userInfo && this.shopifyObj) {
this.getShopifyInfo()
}
},
methods: {
...mapMutations(['setUserInfo']),
confirmBind(){
this.$refs.formRef.validate((v)=>{
if(v){
confirmBind() {
this.$refs.formRef.validate((v) => {
if (v) {
let u = localStorage.getItem('userInfo')
if(u) u = JSON.parse(u)
if (u) u = JSON.parse(u)
let obj = {
erpKey: this.bindForm.erpKey,
}
if(u.email) obj.email = u.email
if(u.phoneNumber) obj.phoneNumber = u.phoneNumber
post('business/user/bindErp',obj).then((res) => {
if(res.code === 200){
this.$message.success('操作成功')
u.erpKey = this.bindForm.erpKey
localStorage.setItem('userInfo',JSON.stringify(u))
if (u.email) obj.email = u.email
if (u.phoneNumber) obj.phoneNumber = u.phoneNumber
post('business/user/bindErp', obj).then((res) => {
if (res.code === 200) {
this.$message.success('操作成功')
u.erpKey = this.bindForm.erpKey
localStorage.setItem('userInfo', JSON.stringify(u))
location.reload()
}
})
}
})
},
handleBind(){
handleBind() {
this.bindVisible = true
this.bindForm = {
erpKey: ''
erpKey: '',
}
this.$nextTick(function(){
this.$nextTick(function () {
this.$refs.formRef?.clearValidate()
})
},
......
......@@ -3,8 +3,8 @@
<div class="logo">
<a href="/">
<span class="logo_text">
<img src="../assets/logo1.png" height="40px" v-if="$isMobile" />
<img src="../assets/logo.png" height="40px" v-else />
<img src="../assets/logo1.png" style="height: 40px" v-if="$isMobile" />
<img src="../assets/logo.png" style="height: 40px" v-else />
</span>
</a>
</div>
......@@ -16,7 +16,7 @@
<el-radio-group v-model="labelPosition" class="radioGroup" size="small" @change="clickChange">
<el-radio-button label="phone">手机号注册</el-radio-button>
<el-radio-button label="mailbox">邮箱注册</el-radio-button>
</el-radio-group>
<el-form
size="medium"
......
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