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