Commit ef22be69 by member

窜号提示

parent 87a689ea
<!DOCTYPE html><html><head><meta charset=utf-8><link rel="shortcut icon" href=./static/img/favicon.ico><script src=//web-1251519181.cos.ap-shanghai.myqcloud.com/lib/vue/2.5.5/vue.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/vue-router/3.0.2/vue-router.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/vuex/3.1.0/vuex.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/lodash.min.js></script><title>memberproject</title><link href=./static/css/app.77319871a0b6bf89744d8a781e02a7cd.css rel=stylesheet></head><body><div id=app></div><script src=//web-1251519181.cos.ap-shanghai.myqcloud.com/lib/elementUI/index.2.5.4.js></script><script src=//web-1251519181.cos.ap-shanghai.myqcloud.com/components/header.2.0.20.js></script><script src=//web-1251519181.cos.ap-shanghai.myqcloud.com/components/people.2.0.26.js></script><script src=//web-1251519181.cos.ap-shanghai.myqcloud.com/components/aside-menu.2.0.05.js></script><script src=//web-1251519181.cos.ap-shanghai.myqcloud.com/components/footer.2.0.02.js></script><script src=//web-1251519181.cos.ap-shanghai.myqcloud.com/components/store.2.0.00.js></script><script src=//web-1251519181.cos.ap-shanghai.myqcloud.com/components/card.2.0.01.js></script><script src=//web-1251519181.cos.ap-shanghai.myqcloud.com/components/selector.1.1.33.js></script><script type=text/javascript src=./static/js/manifest.d7175b8eb5741b6ef03b.js></script><script type=text/javascript src=./static/js/vendor.e716eaf003d24c302a8a.js></script><script type=text/javascript src=./static/js/app.1f36fb630d2a7a9bb705.js></script></body></html>
\ No newline at end of file
<!DOCTYPE html><html><head><meta charset=utf-8><link rel="shortcut icon" href=./static/img/favicon.ico><script src=//web-1251519181.cos.ap-shanghai.myqcloud.com/lib/vue/2.5.5/vue.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/vue-router/3.0.2/vue-router.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/vuex/3.1.0/vuex.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/lodash.min.js></script><title>memberproject</title><link href=./static/css/app.77319871a0b6bf89744d8a781e02a7cd.css rel=stylesheet></head><body><div id=app></div><script src=//web-1251519181.cos.ap-shanghai.myqcloud.com/lib/elementUI/index.2.5.4.js></script><script src=//web-1251519181.cos.ap-shanghai.myqcloud.com/components/header.2.0.20.js></script><script src=//web-1251519181.cos.ap-shanghai.myqcloud.com/components/people.2.0.26.js></script><script src=//web-1251519181.cos.ap-shanghai.myqcloud.com/components/aside-menu.2.0.05.js></script><script src=//web-1251519181.cos.ap-shanghai.myqcloud.com/components/footer.2.0.02.js></script><script src=//web-1251519181.cos.ap-shanghai.myqcloud.com/components/store.2.0.00.js></script><script src=//web-1251519181.cos.ap-shanghai.myqcloud.com/components/card.2.0.01.js></script><script src=//web-1251519181.cos.ap-shanghai.myqcloud.com/components/selector.1.1.33.js></script><script type=text/javascript src=./static/js/manifest.d7175b8eb5741b6ef03b.js></script><script type=text/javascript src=./static/js/vendor.e716eaf003d24c302a8a.js></script><script type=text/javascript src=./static/js/app.bde787b4661b8c5e1fca.js></script></body></html>
\ No newline at end of file
......@@ -5,7 +5,58 @@
</template>
<script>
import { mapState } from 'vuex';
export default {
name: 'App'
name: 'App',
computed: {
...mapState([
'uniqueId'
]),
},
created() {
this.baseUrl = window.location.origin.indexOf('localhost') > -1 ? 'http://gicdev.demogic.com' : window.location.origin;
this._getUserInfo();
this.changeTab();
},
methods: {
_getUserInfo() {
this.axios.get(`${this.baseUrl}/api-auth/get-login-user-info?requestProject=member`).then((res) => {
if (res.data.errorCode == 0) {
const uId = res.data.result && res.data.result.userId;
if (this.uniqueId === '') {
this.$store.commit('changeUniqueId', uId);
}
}
});
},
changeTab() {
document.addEventListener("visibilitychange", () => {
// 表示切换过来去查uid跟当前uid对比
if (document.visibilityState === 'visible') {
this.axios.get(`${this.baseUrl}/api-auth/get-login-user-info?requestProject=member`).then(res => {
if (res.data.errorCode == 0) {
const uId = res.data.result && res.data.result.userId;
// 两次的uId不等 表示账号有冲突
if (this.uniqueId !== uId) {
this.$confirm('出现窜号情况,请首先核对好是哪个商户再进行操作!', '提示', {
type: 'error'
}).then(() => {
this.$store.commit('changeUniqueId', uId);
window.location.reload();
}).catch(() => {
this.$store.commit('changeUniqueId', uId);
window.location.reload();
});
}
}
});
}
});
}
}
}
</script>
var a = {
currentPage: 1,
pageSize: 40,
queryList: [
[
商品属性
{
ids: [ "ff80808165391621016541b64386037b", "ff80808165391621016541b64386037e"],
operate: "intersect",
type: "brand"
},
品类
{
ids: ["ff8080816687cf1501668cb7d991075d", "ff808081667857c60166864de73f073a"],
operate: "intersect",
type: "category"
},
规格
{
ids: ["ff80808165a604420165e2001af046f9", "ff80808165a6043f0165e216150546f1"],
operate: "union",
type: "standard"
},
属性
{
ids: ["ff80808165a604400165e2136dbd50a3", "ff80808165a6043f0165e210a92346e2"],
operate: "diff",
type: "property"
},
部分商品
{
ids: ["ff80808166a414ea0166a42c59062213", "ff80808166a414ea0166a42c05c42185"],
operate: "union",
type: "goods"
},
部分商品sku
{
ids: ["0713eb81815f467dabf97c109e823252","87c37c34e2ff4f7092ea8ea014b625e0"],
operate: "diff",
type: "sku"
}
],
[
{
ids: ["ff80808165391621016541b64386037b","ff80808165391621016541b64386037e"],
operate: "intersect",
type: "brand"
},
{
ids: ["ff8080816687cf1501668cb7d991075d", "ff808081667857c60166864de73f073a"],
operate: "intersect",
type: "category"
},
{
ids: ["ff80808165a604400165e2136dbd50a3","ff80808165a6043f0165e210a92346e2"],
operate: "diff",
type: "property"
},
{
ids: ["ff80808166a414ea0166a42c59062213", "ff80808166a414ea0166a42c05c42185"],
operate: "union",
type: "goods"
},
{
ids: ["172e6a9c02004086890873225957fced"],
operate: "diff",
type: "sku"
},
{
ids: ["ff80808165a604420165e2001af046f0","ff80808165a6043f0165e216150546f2"],
operate: "intersect",
type: "stdGroup"
}
]
],
source: 1
}
\ No newline at end of file
......@@ -2,7 +2,7 @@ import axios from 'axios';
import QS from 'qs';
import { Message } from 'element-ui';
axios.defaults.baseURL = `${window.location.origin}`;
axios.defaults.baseURL = window.location.origin.indexOf('localhost') > -1 ? 'http://gicdev.demogic.com' : window.location.origin;
axios.defaults.timeout = 10000;
axios.defaults.headers.post['Content-Type'] = 'appliaction/x-www-form-urlencoded;charset=UTF-8';
......
......@@ -11,7 +11,8 @@ export default new Vuex.Store({
isShowFoot: true,
slideShow: false,
forzenList: false,
storeImageUrl: ""
storeImageUrl: "",
uniqueId: ''
},
mutations: {
[types.TITLE]: (state, data) => {
......@@ -28,6 +29,9 @@ export default new Vuex.Store({
},
["saveStoreImage"](state, url) {
state.storeImageUrl = url;
},
['changeUniqueId'](state, id) {
state.uniqueId = id || '';
}
},
actions: {
......
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