调整Home.vue页面布局和功能
This commit is contained in:
@@ -38,13 +38,13 @@
|
||||
<div class="admin-main">
|
||||
<el-scrollbar class="left">
|
||||
<el-menu
|
||||
:default-active="activePath"
|
||||
:collapse-transition="true"
|
||||
unique-opened
|
||||
background-color="#545c64"
|
||||
router
|
||||
text-color="#fff"
|
||||
:collapse="isCollapse">
|
||||
:default-active="activePath"
|
||||
:collapse-transition="true"
|
||||
unique-opened
|
||||
background-color="#545c64"
|
||||
router
|
||||
text-color="#fff"
|
||||
:collapse="isCollapse">
|
||||
<el-menu-item index="/welcome">
|
||||
<i class="el-icon-monitor"></i>
|
||||
<span slot="title">工作台</span>
|
||||
@@ -231,18 +231,18 @@
|
||||
</div>
|
||||
</div>
|
||||
<el-dialog
|
||||
title="激活充值"
|
||||
:visible="$store.state.activeDlgShow"
|
||||
:close-on-click-modal="false"
|
||||
width="1200"
|
||||
:before-close="handleClose">
|
||||
title="激活充值"
|
||||
:visible="$store.state.activeDlgShow"
|
||||
:close-on-click-modal="false"
|
||||
width="1200"
|
||||
:before-close="handleClose">
|
||||
<ai-payment/>
|
||||
</el-dialog>
|
||||
<el-dialog
|
||||
title="温馨提示"
|
||||
:visible="$store.state.showSheinAlert"
|
||||
:close-on-click-modal="false"
|
||||
width="1200">
|
||||
title="温馨提示"
|
||||
:visible="$store.state.showSheinAlert"
|
||||
:close-on-click-modal="false"
|
||||
width="1200">
|
||||
<span style="font-size: large">1、检查“SHEIN商家后台”是否登录,如没登录,请先登录,之后再刷新助手<br></span>
|
||||
<span style="font-size: large">2、如果SHEIN商家后台已经登录,仍然弹出当前窗口,则需要SHEIN进行二次授权,二次授权可在菜单“商品管理->商品列表”,任意选择一个商品,在“库存”一栏,点击修改,在新打开的页面中可看到“正在鉴权”的字样,即可完成二次授权</span>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
@@ -250,10 +250,10 @@
|
||||
</span>
|
||||
</el-dialog>
|
||||
<el-dialog
|
||||
title="温馨提示"
|
||||
:visible="$store.state.showTemuAlert"
|
||||
:close-on-click-modal="false"
|
||||
width="1200">
|
||||
title="温馨提示"
|
||||
:visible="$store.state.showTemuAlert"
|
||||
:close-on-click-modal="false"
|
||||
width="1200">
|
||||
<span style="font-size: large">请先打开卖家中心“结算数据->售后管理”页面进行二次授权,<a target="_blank" style="text-decoration: underline" href="https://seller.kuajingmaihuo.com/main/aftersales/information">去打开</a><br></span>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="closeTemuAlert">关 闭</el-button>
|
||||
@@ -267,128 +267,128 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {mapMutations, mapState} from 'vuex'
|
||||
import AiPayment from "@/components/AiPayment.vue";
|
||||
import LablesMember from '@/components/LablesMember'
|
||||
import {sendAliexpressAPIMessage, sendGoodcangAPIMessage} from "@/api/chromeApi";
|
||||
import {mapMutations, mapState} from 'vuex'
|
||||
import AiPayment from "@/components/AiPayment.vue";
|
||||
import LablesMember from '@/components/LablesMember'
|
||||
import {sendAliexpressAPIMessage, sendGoodcangAPIMessage} from "@/api/chromeApi";
|
||||
|
||||
export default {
|
||||
components: {AiPayment, LablesMember},
|
||||
data() {
|
||||
return {
|
||||
isCollapse: false,
|
||||
activePath: '/home',
|
||||
form: {
|
||||
mallId: this.$store.state.mallId,
|
||||
mallName: this.$store.state.mallName,
|
||||
code: ''
|
||||
},
|
||||
version: '',
|
||||
vipType: ["体验会员", "月会员", "半年会员", "年会员", "多店通用年会员"]
|
||||
export default {
|
||||
components: {AiPayment, LablesMember},
|
||||
data() {
|
||||
return {
|
||||
isCollapse: false,
|
||||
activePath: '/home',
|
||||
form: {
|
||||
mallId: this.$store.state.mallId,
|
||||
mallName: this.$store.state.mallName,
|
||||
code: ''
|
||||
},
|
||||
version: '',
|
||||
vipType: ["体验会员", "月会员", "半年会员", "年会员", "多店通用年会员"]
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
freeLogo: () => require("../assets/free.png"),
|
||||
getStateInfo() {
|
||||
if (this.$store.state.userInfo.flag == 0) {
|
||||
return '未激活';
|
||||
} else if (this.$store.state.userInfo.flag == 1) {
|
||||
if (this.$store.state.userInfo.type != 4) {
|
||||
return `(${this.$store.state.userInfo.mallName})` + this.vipType[this.$store.state.userInfo.type] + '(' + this.$store.state.userInfo.expireTime.substring(0, 10) + ')';
|
||||
} else {
|
||||
return this.vipType[this.$store.state.userInfo.type] + '(' + this.$store.state.userInfo.expireTime.substring(0, 10) + ')'
|
||||
}
|
||||
|
||||
} else {
|
||||
return '已过期';
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
freeLogo: () => require("../assets/free.png"),
|
||||
getStateInfo() {
|
||||
if (this.$store.state.userInfo.flag == 0) {
|
||||
return '未激活';
|
||||
} else if (this.$store.state.userInfo.flag == 1) {
|
||||
if (this.$store.state.userInfo.type != 4) {
|
||||
return `(${this.$store.state.userInfo.mallName})` + this.vipType[this.$store.state.userInfo.type] + '(' + this.$store.state.userInfo.expireTime.substring(0, 10) + ')';
|
||||
} else {
|
||||
return this.vipType[this.$store.state.userInfo.type] + '(' + this.$store.state.userInfo.expireTime.substring(0, 10) + ')'
|
||||
}
|
||||
|
||||
} else {
|
||||
return '已过期';
|
||||
}
|
||||
},
|
||||
|
||||
...mapState(['mallName', 'mallList', 'userInfo']),
|
||||
isAdmin: v => ['18571466720'].includes(v.userInfo.phone),
|
||||
},
|
||||
|
||||
watch: {
|
||||
$route(v) {
|
||||
if (v.meta && v.meta.activeMenu) {
|
||||
this.activePath = v.meta.activeMenu
|
||||
} else {
|
||||
this.activePath = v.fullPath
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
created() {
|
||||
const devVersion = require('../manifest.development.json').version
|
||||
const prodVersion = require('../manifest.production.json').version
|
||||
this.version = process.env.NODE_ENV === 'production' ? prodVersion : devVersion
|
||||
if (this.$route.meta && this.$route.meta.activeMenu) {
|
||||
this.activePath = this.$route.meta.activeMenu
|
||||
watch: {
|
||||
$route(v) {
|
||||
if (v.meta && v.meta.activeMenu) {
|
||||
this.activePath = v.meta.activeMenu
|
||||
} else {
|
||||
this.activePath = this.$route.fullPath
|
||||
this.activePath = v.fullPath
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
created() {
|
||||
const devVersion = require('../manifest.development.json').version
|
||||
const prodVersion = require('../manifest.production.json').version
|
||||
this.version = process.env.NODE_ENV === 'production' ? prodVersion : devVersion
|
||||
if (this.$route.meta && this.$route.meta.activeMenu) {
|
||||
this.activePath = this.$route.meta.activeMenu
|
||||
} else {
|
||||
this.activePath = this.$route.fullPath
|
||||
}
|
||||
// this.testGoodcang()
|
||||
},
|
||||
|
||||
methods: {
|
||||
...mapMutations(['setActiveDlgShow']),
|
||||
handleClick(e) {
|
||||
if (e === 'logout') {
|
||||
this.$store.dispatch('SignOut', false)
|
||||
} else if (e === 'pwd') {
|
||||
this.$router.push('changePwd')
|
||||
} else if (e === 'message') {
|
||||
this.$router.push('message')
|
||||
} else if (e === 'coin') {
|
||||
this.$router.push('coinFlow')
|
||||
}
|
||||
// this.testGoodcang()
|
||||
},
|
||||
|
||||
methods: {
|
||||
...mapMutations(['setActiveDlgShow']),
|
||||
handleClick(e) {
|
||||
if (e === 'logout') {
|
||||
this.$store.dispatch('SignOut', false)
|
||||
} else if (e === 'pwd') {
|
||||
this.$router.push('changePwd')
|
||||
} else if (e === 'message') {
|
||||
this.$router.push('message')
|
||||
} else if (e === 'coin') {
|
||||
this.$router.push('coinFlow')
|
||||
}
|
||||
},
|
||||
openMember(index) {
|
||||
this.$refs.LablesMember.show(index)
|
||||
},
|
||||
|
||||
openMember(index) {
|
||||
this.$refs.LablesMember.show(index)
|
||||
},
|
||||
|
||||
handleClose() {
|
||||
this.form.mallId = "";
|
||||
this.form.mallName = "";
|
||||
this.form.code = "";
|
||||
this.setActiveDlgShow(false)
|
||||
},
|
||||
toActive() {
|
||||
this.setActiveDlgShow(true)
|
||||
},
|
||||
getMessage(type) {
|
||||
return `你使用的是“${this.vipType[type]}”兑换券,确定兑换?`;
|
||||
},
|
||||
active() {
|
||||
this.$refs.form.validate((valid) => {
|
||||
if (valid) {
|
||||
this.$http.post(`/api/coupon/getDetail`, null, {
|
||||
params: {
|
||||
code: this.form.code
|
||||
}
|
||||
}).then(res => {
|
||||
if (res.code == 0) {
|
||||
let msg = this.getMessage(res.data.type);
|
||||
this.$confirm(msg, '温馨提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'info'
|
||||
}).then(() => {
|
||||
this.$http.post(`/api/order/upgradeByCode`, null, {
|
||||
params: {
|
||||
...this.form
|
||||
}
|
||||
}).then(res => {
|
||||
if (res.code == 0) {
|
||||
this.$message.success('激活成功')
|
||||
this.$store.dispatch('getUserInfo')
|
||||
this.setActiveDlgShow(false)
|
||||
}
|
||||
})
|
||||
handleClose() {
|
||||
this.form.mallId = "";
|
||||
this.form.mallName = "";
|
||||
this.form.code = "";
|
||||
this.setActiveDlgShow(false)
|
||||
},
|
||||
toActive() {
|
||||
this.setActiveDlgShow(true)
|
||||
},
|
||||
getMessage(type) {
|
||||
return `你使用的是“${this.vipType[type]}”兑换券,确定兑换?`;
|
||||
},
|
||||
active() {
|
||||
this.$refs.form.validate((valid) => {
|
||||
if (valid) {
|
||||
this.$http.post(`/api/coupon/getDetail`, null, {
|
||||
params: {
|
||||
code: this.form.code
|
||||
}
|
||||
}).then(res => {
|
||||
if (res.code == 0) {
|
||||
let msg = this.getMessage(res.data.type);
|
||||
this.$confirm(msg, '温馨提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'info'
|
||||
}).then(() => {
|
||||
this.$http.post(`/api/order/upgradeByCode`, null, {
|
||||
params: {
|
||||
...this.form
|
||||
}
|
||||
}).then(res => {
|
||||
if (res.code == 0) {
|
||||
this.$message.success('激活成功')
|
||||
this.$store.dispatch('getUserInfo')
|
||||
this.setActiveDlgShow(false)
|
||||
}
|
||||
})
|
||||
}
|
||||
});
|
||||
})
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user