diff --git a/src/flexible.js b/src/flexible.js new file mode 100644 index 0000000..3e046c7 --- /dev/null +++ b/src/flexible.js @@ -0,0 +1,118 @@ + +;(function(win, lib) { + var doc = win.document; + var docEl = doc.documentElement; + var metaEl = doc.querySelector('meta[name="viewport"]'); + var flexibleEl = doc.querySelector('meta[name="flexible"]'); + var dpr = 0; + var scale = 0; + var tid; + var flexible = lib.flexible || (lib.flexible = {}); + + if (metaEl) { + console.warn('将根据已有的meta标签来设置缩放比例'); + var match = metaEl.getAttribute('content').match(/initial\-scale=([\d\.]+)/); + if (match) { + scale = parseFloat(match[1]); + dpr = parseInt(1 / scale); + } + } else if (flexibleEl) { + var content = flexibleEl.getAttribute('content'); + if (content) { + var initialDpr = content.match(/initial\-dpr=([\d\.]+)/); + var maximumDpr = content.match(/maximum\-dpr=([\d\.]+)/); + if (initialDpr) { + dpr = parseFloat(initialDpr[1]); + scale = parseFloat((1 / dpr).toFixed(2)); + } + if (maximumDpr) { + dpr = parseFloat(maximumDpr[1]); + scale = parseFloat((1 / dpr).toFixed(2)); + } + } + } + + if (!dpr && !scale) { + var isAndroid = win.navigator.appVersion.match(/android/gi); + var isIPhone = win.navigator.appVersion.match(/iphone/gi); + var devicePixelRatio = win.devicePixelRatio; + if (isIPhone) { + // iOS下,对于2和3的屏,用2倍的方案,其余的用1倍方案 + if (devicePixelRatio >= 3 && (!dpr || dpr >= 3)) { + dpr = 3; + } else if (devicePixelRatio >= 2 && (!dpr || dpr >= 2)){ + dpr = 2; + } else { + dpr = 1; + } + } else { + // 其他设备下,仍旧使用1倍的方案 + dpr = 1; + } + scale = 1 / dpr; + } + + docEl.setAttribute('data-dpr', dpr); + if (!metaEl) { + metaEl = doc.createElement('meta'); + metaEl.setAttribute('name', 'viewport'); + metaEl.setAttribute('content', 'initial-scale=' + scale + ', maximum-scale=' + scale + ', minimum-scale=' + scale + ', user-scalable=no'); + if (docEl.firstElementChild) { + docEl.firstElementChild.appendChild(metaEl); + } else { + var wrap = doc.createElement('div'); + wrap.appendChild(metaEl); + doc.write(wrap.innerHTML); + } + } + + function refreshRem(){ + var width = docEl.getBoundingClientRect().width; + if (width / dpr > 540) { + width = width * dpr; + } + var rem = width / 10; + docEl.style.fontSize = rem + 'px'; + flexible.rem = win.rem = rem; + } + + win.addEventListener('resize', function() { + clearTimeout(tid); + tid = setTimeout(refreshRem, 300); + }, false); + win.addEventListener('pageshow', function(e) { + if (e.persisted) { + clearTimeout(tid); + tid = setTimeout(refreshRem, 300); + } + }, false); + + if (doc.readyState === 'complete') { + doc.body.style.fontSize = 12 * dpr + 'px'; + } else { + doc.addEventListener('DOMContentLoaded', function(e) { + doc.body.style.fontSize = 12 * dpr + 'px'; + }, false); + } + + + refreshRem(); + + flexible.dpr = win.dpr = dpr; + flexible.refreshRem = refreshRem; + flexible.rem2px = function(d) { + var val = parseFloat(d) * this.rem; + if (typeof d === 'string' && d.match(/rem$/)) { + val += 'px'; + } + return val; + } + flexible.px2rem = function(d) { + var val = parseFloat(d) / this.rem; + if (typeof d === 'string' && d.match(/px$/)) { + val += 'rem'; + } + return val; + } + +})(window, window['lib'] || (window['lib'] = {})); diff --git a/src/main.js b/src/main.js index 0f8ceaa..a2e4a34 100644 --- a/src/main.js +++ b/src/main.js @@ -7,14 +7,13 @@ import axios from "axios"; import QS from "qs"; import "./iview"; import "./vcharts"; -import "lib-flexible/flexible"; +import "./flexible"; import _ from "lodash"; Vue.prototype.$axios = axios; Vue.prototype.$qs = QS; Vue.prototype.$moment = moment; Vue.config.productionTip = false; -Vue.prototype.$moment = moment; Vue.prototype._ = _; import echarts from "echarts"; diff --git a/src/pages/Home.vue b/src/pages/Home.vue index f1f5001..1764684 100644 --- a/src/pages/Home.vue +++ b/src/pages/Home.vue @@ -1,367 +1,358 @@ - - - + + + - - - - - - 退出登录 - - - - - 优客后台管理 - + + + + + + 退出登录 + + + + + 优客后台管理 + - - - - 首页 - - - - - {{item.name}} - - - {{cItem.name}} - - - - - - - - - {{selectedMenu}} - {{selectedSubMenu}} - - - - - - - - - - + + + + 首页 + + + + + {{item.name}} + + + {{cItem.name}} + + + + + + + + + {{selectedMenu}} + {{selectedSubMenu}} + + + + + + + + + + diff --git a/src/pages/activity/ActivityCode.vue b/src/pages/activity/ActivityCode.vue index 221095f..1a3b760 100644 --- a/src/pages/activity/ActivityCode.vue +++ b/src/pages/activity/ActivityCode.vue @@ -1,33 +1,70 @@ - - - + + + 批量下载门店码 + 批量下载导购码 + + + + + - - 门店导购管理 + + 门店导购管理 - + + + + + + + + {{this.showStoreName}} + + + 下载 + + diff --git a/src/pages/activity/ActivityPlan.vue b/src/pages/activity/ActivityPlan.vue index f6d4ebb..909e129 100644 --- a/src/pages/activity/ActivityPlan.vue +++ b/src/pages/activity/ActivityPlan.vue @@ -1,128 +1,128 @@ - 加载中... - + 加载中... + - - + + - - - {{ item.label }} + + + {{ item.label }} - - - {{ item.label }} + + + {{ item.label }} - + - {{ item.label }} + {{ item.label }} - {pageNum = 1;searchTable()}">查询 + {pageNum = 1;searchTable()}">查询 - - - + + + - + - {stop(row)}" - >终止 + {stop(row)}">终止 - {modify(row)}">修改 + {modify(row)}">修改 - + - - - + + + - + {{this.showStoreName}} - + - 下载 + 下载 @@ -142,7 +142,7 @@ export default { useTable, planDetail }, - data() { + data () { const _this = this; return { showStoreName: "", @@ -203,7 +203,7 @@ export default { width: 60, align: "center", title: "序号", - render(h, params) { + render (h, params) { let num = parseInt(params.index) + 1; console.log(_this.pageSize); if (_this.pageSize > 1) { @@ -219,7 +219,7 @@ export default { { title: "活动类型", key: "scheduleVO.name", - render(h, params) { + render (h, params) { return h("span", params.row["params"][0]["name"]); } }, @@ -227,50 +227,50 @@ export default { title: "活动时间", key: "beginTime", width: 230, - render(h, params) { + render (h, params) { return h("span", params.row.beginTime + " - " + params.row.endTime); } }, { title: "零售公司", key: "shop", - render(h, params) { + render (h, params) { return h( "span", params.row.companyName + - "等" + - (params.row.companyCount || 0) + - "家公司" + "等" + + (params.row.companyCount || 0) + + "家公司" ); } }, { title: "店铺", key: "shop", - render(h, params) { + render (h, params) { return h( "span", params.row.storeName + - "等" + - (params.row.storeCount || 0) + - "家店铺" + "等" + + (params.row.storeCount || 0) + + "家店铺" ); } }, { title: "添加好友数", key: "addFriendNum", - render(h, params) { - return h("span", (params.row.friends || 0) + "人"); - } - }, - { - title: "参与活动客户数", - key: "joinActivityClientNum", - render(h, params) { - return h("span", (params.row.friends || 0) + "人"); + render (h, params) { + return h("span", (params.row.friendCount || 0) + "人"); } }, + // { + // title: "参与活动客户数", + // key: "joinActivityClientNum", + // render (h, params) { + // return h("span", (params.row.customerCount || 0) + "人"); + // } + // }, { title: "活动码", slot: "qrCodeAction", @@ -289,7 +289,7 @@ export default { { title: "活动状态", key: "status", - render(h, p) { + render (h, p) { const status = p.row.status; if (status === 1) return h("span", "未开始"); if (status === 2) return h("span", "进行中"); @@ -332,30 +332,30 @@ export default { ] }; }, - mounted() { + mounted () { this.setMenuName("活动管理", "活动计划"); this.getCompanyInfo(); this.getShopInfo(); this.searchTable(); }, methods: { - doShow(show) { + doShow (show) { this.showUse = show; this.searchTable(); }, - showDetail(detail) { + showDetail (detail) { let _this = this; this.getDetail(detail.id).then(res => { _this.detail = res; _this.isShowDetail = true; }); }, - getCompanyInfo() { + getCompanyInfo () { let that = this; let data = { userId: JSON.parse(sessionStorage.getItem("loginInfo")).userId }; - ActivityManager.getCompany(data, function(data) { + ActivityManager.getCompany(data, function (data) { that.companyList = []; data.data.results.forEach(element => { that.companyList.push({ @@ -365,18 +365,18 @@ export default { }); }); }, - selectCompany(value) { + selectCompany (value) { this.customerId = value; this.getShopInfo(); }, - getShopInfo() { + getShopInfo () { let that = this; let data = { userId: JSON.parse(sessionStorage.getItem("loginInfo")).userId, customerIds: this.customerId, scheduleId: null }; - ActivityManager.getShop(data, function(data) { + ActivityManager.getShop(data, function (data) { that.shopList = []; data.data.results.forEach(element => { that.shopList.push({ @@ -386,11 +386,11 @@ export default { }); }); }, - handlePage: function(value) { + handlePage: function (value) { this.pageNum = value; this.searchTable(); }, - stop(instance) { + stop (instance) { if (instance.status > 2) { return; } @@ -412,10 +412,10 @@ export default { } ); }, - onCancel: () => {} + onCancel: () => { } }); }, - getDetail(instanceId) { + getDetail (instanceId) { return new Promise((resolve, reject) => { ActivityManager.instanceDetail( { @@ -427,7 +427,7 @@ export default { ); }); }, - modify(instance) { + modify (instance) { let _this = this; this.getDetail(instance.id).then(res => { store.commit("SET_useData", res); @@ -435,14 +435,13 @@ export default { _this.showUse = true; }); }, - navigateCode(instance) { - return; + navigateCode (instance) { this.$router.push({ path: "/activity/plan/code", query: { instanceId: instance.id } }); }, - searchTable(params = {}) { + searchTable (params = {}) { this.loading = true; if ( this.formValidate.date !== null && @@ -475,7 +474,7 @@ export default { this.loading = false; }); }, - startDateChange: function(e) { + startDateChange: function (e) { //设置开始时间 this.endDateOptions = { disabledDate: date => { @@ -486,11 +485,11 @@ export default { } }; }, - endDateChange: function(e) { + endDateChange: function (e) { //设置结束时间 let endTime = this.formValidate.endDate ? new Date(this.formValidate.endDate).valueOf() - - 1 * 24 * 60 * 60 * 1000 + 1 * 24 * 60 * 60 * 1000 : ""; this.startDateOptions = { disabledDate: date => { @@ -498,17 +497,17 @@ export default { } }; }, - show: function(index) { + show: function (index) { this.isShow = true; this.showStoreName = index.name; this.qrCodeImage = index.qrCodeAction; this.rowData = index; }, - hide: function() { + hide: function () { this.isShow = false; }, // 下载二维码 - download: function(index) { + download: function (index) { debugger; let fileName = index.name + "-门店码"; http.downloadImg( @@ -516,10 +515,10 @@ export default { url: index.qrCodeAction }, fileName, - function(/*data*/) {} + function (/*data*/) { } ); }, - ok: function() { + ok: function () { this.isShow = false; } } diff --git a/src/pages/activity/addActivity.vue b/src/pages/activity/addActivity.vue index 6487540..ae682e0 100644 --- a/src/pages/activity/addActivity.vue +++ b/src/pages/activity/addActivity.vue @@ -1,96 +1,124 @@ - - + + 配置活动 基本配置 - + - - - + + + 请上传图片 - + - - - + + + - - + + - - + + - - + + - - + + + + + 活动类型 - + 类型{{ index + 1 }} - + - + - 删除 + 删除 - +添加活动类型 + +添加活动类型 - 取消 - 确定 + 取消 + 确定 @@ -99,7 +127,7 @@ import ActivityManager from "../../services/ActivityManager/ActivityManager"; import axios from "axios"; export default { name: "addActivity", - data() { + data () { return { dispalyModal: false, currentStep: 0, @@ -114,6 +142,7 @@ export default { description: [ { required: true, message: "活动描述不能为空", trigger: "blur" } ], + title: [{ required: true, message: "请输入标题", trigger: "blur" }], appId: [{ required: true, message: "appId不能为空", trigger: "blur" }], uri: [{ required: true, message: "URI不能为空", trigger: "blur" }], welcome: [{ required: true, message: "请输入欢迎语", trigger: "blur" }] @@ -128,7 +157,7 @@ export default { id: String }, watch: { - addActivityModal(val) { + addActivityModal (val) { this.dispalyModal = val; if (val === true && this.id) { this.getActivityData(); @@ -157,9 +186,9 @@ export default { this.$forceUpdate(); } }, - mounted() {}, + mounted () { }, methods: { - addActivityInput() { + addActivityInput () { let params = [...this.formValidate.params]; params.push({ defaultVal: "", @@ -175,7 +204,7 @@ export default { this.$set(this.formValidate, "params", params); this.$forceUpdate(); }, - delActivityInput(index) { + delActivityInput (index) { if (this.formValidate.params.length <= 1) { this.$Message.error("至少需要填写一个活动类型!"); return; @@ -183,30 +212,31 @@ export default { this.formValidate.params.splice(index, 1); this.$forceUpdate(); }, - visibleChange(show) { + visibleChange (show) { if (!show) { this.$emit("dispalyAddActivityModal", false, false); } }, - cancel() { + cancel () { this.$emit("dispalyAddActivityModal", false, false); }, - getActivityData() { + getActivityData () { let that = this; let data = { id: that.id }; - ActivityManager.getActivityInfo(data, function(data) { + ActivityManager.getActivityInfo(data, function (data) { that.formValidate = data.data.results; }); }, - uploadImgSuccess(res, file) { + uploadImgSuccess (res, file) { this.imageName = file.name; }, - handleBeforeUpload(res) { + handleBeforeUpload (res) { const me = this; let data = new FormData(); data.append("file", res); + data.append("needMediaId", true) axios({ method: "post", url: "/upload", @@ -214,16 +244,17 @@ export default { headers: { "Content-Type": "multipart/form-data" } - }).then(function(res) { + }).then(function (res) { if (res.data.success) { // me.formValidate.logo = res.data.results; me.$set(me.formValidate, "logo", res.data.results.localPath); + me.$set(me.formValidate, "mediaId", res.data.results.mediaId); console.log(me.formValidate.logo); } }); return false; }, - save() { + save () { let that = this; that.modal_loading = true; let i = 0; @@ -263,7 +294,7 @@ export default { let data = { ...that.formValidate, isGetActivityInfo: true }; data.categoryId = 0; data.categoryCode = "promotion"; - ActivityManager.addOreditActivity(data, function(data) { + ActivityManager.addOreditActivity(data, function (data) { that.addActivityModal = false; that.formValidate = {}; that.modal_loading = false; diff --git a/src/pages/activity/useActivityStepOne.vue b/src/pages/activity/useActivityStepOne.vue index 2556159..dc78059 100644 --- a/src/pages/activity/useActivityStepOne.vue +++ b/src/pages/activity/useActivityStepOne.vue @@ -175,7 +175,8 @@ export default { .text { position: relative; - left: 100px; + left: 50px; + line-height: 44px; } .inputClass { diff --git a/src/pages/activity/useTable.vue b/src/pages/activity/useTable.vue index 41dce79..fc91527 100644 --- a/src/pages/activity/useTable.vue +++ b/src/pages/activity/useTable.vue @@ -1,50 +1,46 @@ - - + + - - - + + + - - - - + + + + - 上一步 - 下一步 - 完成 + 上一步 + 下一步 + 完成 @@ -66,7 +62,7 @@ export default { useActivityStepFoure }, inject: ["setMenuName"], - data () { + data() { return { currentStep: 0, modal_loading: false, @@ -87,26 +83,27 @@ export default { } }, watch: { - show () { + show() { this.showUse = this.show; }, - schedule () { + schedule() { store.getters.useData.scheduleId = this.schedule.id; } }, - created () { + created() { + this.setMenuName("活动管理", "活动计划"); }, - mounted () { }, + mounted() {}, methods: { - visibleChange (show) { }, - cancel () { + visibleChange(show) {}, + cancel() { store.commit("RSET_useData"); this.$emit("doShow", false); this.modal_loading = false; this.showUse = false; this.currentStep = 0; }, - next () { + next() { let data = store.getters.useData; data.name = this.schedule.name; if (this.currentStep === 0) { @@ -149,22 +146,29 @@ export default { store.commit("SET_useData", data); this.currentStep = this.currentStep + 1; }, - back () { + back() { this.currentStep = this.currentStep - 1; }, - finish () { + finish() { let that = this; let data = store.getters.useData; data.isGetActivityInfo = true; this.modal_loading = true; - ActivityManager.saveActivityData(store.getters.useData, function (data) { + ActivityManager.saveActivityData(store.getters.useData, function(data) { store.commit("RSET_useData"); that.$emit("doShow", false); - that.setMenuName("活动管理", "活动计划"); - that.$router.push("/activity/plan"); + // that.$router.push("/activity/plan"); that.currentStep = 0; that.modal_loading = false; that.showUse = false; + + let request = { + selectedMenu: "活动管理", + selectedSubMenu: "活动计划", + data: {}, + type: 2 + }; + that.bus.$emit("callBack",request); }); } } diff --git a/src/pages/data/StoreDetail.vue b/src/pages/data/StoreDetail.vue index 616c13a..457643c 100644 --- a/src/pages/data/StoreDetail.vue +++ b/src/pages/data/StoreDetail.vue @@ -77,6 +77,18 @@ title: '店铺编号', key: 'storeCode' }, + { + title: '工号', + key: 'staffCode' + }, + { + title: '别名', + key: 'alias' + }, + { + title: '手机号', + key: 'phone' + }, { title: '所属零售公司', key: 'companyName' diff --git a/src/pages/recruit/BulletinIndex.vue b/src/pages/recruit/BulletinIndex.vue index 81e8be8..ec759de 100644 --- a/src/pages/recruit/BulletinIndex.vue +++ b/src/pages/recruit/BulletinIndex.vue @@ -3,47 +3,62 @@ - 招募令 - 便于门店进行推广员招募 + 招募令 + 便于门店进行推广员招募 - 使用范围:26家零售公司,785家店铺 - 修改 + 使用范围:{{welcome.company.length || 0}}家零售公司,{{welcome.stores.length || 0}}家店铺 + 修改 - - 开启 - 关闭 - + + 开启 + 关闭 + 招募海报 - - + + - - 上传 - + + 上传 + - {{btnStr}} - 取消 + {{btnStr}} + 取消 + :schedule="welcome" + :show="showStoreCheck"> @@ -54,11 +69,10 @@ import bulletinService from '../../services/recruit/Bulletin' import http from '../../services/CommonHttp'; import axios from "axios"; export default { - inject:['reload'], components: { selectStoreStep, }, - data() { + data () { return { showStoreCheck: false, welcome: { @@ -67,91 +81,97 @@ export default { company: [], stores: [], }, - inidData:{}, - showUpload:false, - btnStr:'编辑', - imgUrl:'', - onWitch:false, - uploadUrl:"" + inidData: {}, + showUpload: false, + btnStr: '编辑', + imgUrl: '', + onWitch: false, + uploadUrl: "", + oldImg: "" }; }, - mounted: function() { - - }, - created() { + mounted: function () { + + }, + created () { this.initData(); }, + inject: ['reload'], methods: { - witchChange(status) { + witchChange (status) { this.onWitch = status; }, - initData(){ + initData () { let that = this; bulletinService.getDetail({}, function (data) { console.log(data); - if(data.data.results.scheduleVO.params.length>0){ + if (data.data.results.scheduleVO.params.length > 0) { that.imgUrl = http.getBaseUrl() + data.data.results.scheduleVO.params[0].defaultVal; + that.oldImg = http.getBaseUrl() + data.data.results.scheduleVO.params[0].defaultVal; } that.initData = data.data.results; - + that.welcome = { ...that.initData, company: [...that.initData.organizations] }; }, function (err) { - that.$Message.error("网络异常,请重试"); - that.setNoLoading(); + that.$Message.error("网络异常,请重试"); + that.setNoLoading(); }); }, doShow () { this.showStoreCheck = false this.welcome = store.getters.useData - console.log(this.welcome); + console.log('@', this.welcome); }, showStores () { - console.log({ ...store.getters.useData, ...this.welcome }) - store.commit('SET_useData', { ...store.getters.useData, ...this.welcome }) + console.log(this.welcome, { ...store.getters.useData, ...this.welcome, ...this.initData }) + store.commit('SET_useData', { ...store.getters.useData, ...this.welcome, ...this.initData }) this.showStoreCheck = true }, - onEdit(){ - if(this.btnStr == '编辑'){ + onEdit () { + if (this.btnStr == '编辑') { this.showUpload = true; this.btnStr = '保存' - }else{ - this.initData.isGetActivityInfo = true; - try{ - if(this.welcome.stores.length>0){ - this.initData.stores = this.welcome.stores; - } - }catch(e){ - console.log(e); + } else { + let _this = this; + this.initData.stores = this.welcome.stores; + this.initData.company = this.welcome.company; + let param = this.initData + if (param.stores.length <= 0) { + _this.$Message.error("请至少选择一个店铺"); + _this.loading = false; + return false; } - if(this.onWitch){ - this.initData.status = 1; - this.initData.stores.forEach(item => { + param.isGetActivityInfo = true; + if (this.onWitch) { + param.status = 1; + param.stores.forEach(item => { item.status = 1; }) - }else{ - this.initData.status = 3; - this.initData.stores.forEach(item => { + } else { + param.status = 3; + param.stores.forEach(item => { item.status = 2; }) } - if(this.uploadUrl != ""){ - this.initData.scheduleVO.params.forEach(item => { + if (this.uploadUrl != "") { + param.scheduleVO.params.forEach(item => { item.defaultVal = item.description = this.uploadUrl; }) } - let that = this; - bulletinService.dosave(this.initData, function (data) { + bulletinService.dosave(param, function (data) { console.log(data); - that.$Message.info("保存成功"); - that.reload(); + _this.$Message.info("保存成功"); + _this.btnStr = '编辑' + _this.showUpload = false; }, function (err) { - that.$Message.error("网络异常,请重试"); - that.setNoLoading(); + _this.$Message.error("网络异常,请重试"); + _this.setNoLoading(); }); } }, - onCancel(){ - this.showUpload = false; + onCancel () { + this.showUpload = false; + this.imgUrl = this.oldImg; this.btnStr = '编辑' }, uploadImgSuccess (res, file) { diff --git a/src/pages/recruit/CheckList.vue b/src/pages/recruit/CheckList.vue index ea5b0be..294926b 100644 --- a/src/pages/recruit/CheckList.vue +++ b/src/pages/recruit/CheckList.vue @@ -564,4 +564,7 @@ .search-btn{ margin-left: 40px; } + .ivu-tabs{ + overflow :inherit; + } diff --git a/src/pages/shop/IncreaseStoreManager.vue b/src/pages/shop/IncreaseStoreManager.vue index bee0cd1..abcb172 100644 --- a/src/pages/shop/IncreaseStoreManager.vue +++ b/src/pages/shop/IncreaseStoreManager.vue @@ -3,7 +3,7 @@ - + 大区 {{ item.name }} diff --git a/src/pages/shop/IncreaseWelcomeEdit.vue b/src/pages/shop/IncreaseWelcomeEdit.vue index 531cf9b..ed1f1a9 100644 --- a/src/pages/shop/IncreaseWelcomeEdit.vue +++ b/src/pages/shop/IncreaseWelcomeEdit.vue @@ -256,6 +256,7 @@ export default { params: [], company: [], stores: [], + scheduleId: null, categoryCode: "welcome", id: null }, @@ -304,6 +305,10 @@ export default { console.log(this.$route); if (this.id) { this.getDetail(this.id); + } else { + store.commit("SET_useData", { + ...this.welcome + }); } }, components: { diff --git a/src/pages/shop/IncreaseWelcomeList.vue b/src/pages/shop/IncreaseWelcomeList.vue index ca09543..326ac2e 100644 --- a/src/pages/shop/IncreaseWelcomeList.vue +++ b/src/pages/shop/IncreaseWelcomeList.vue @@ -204,6 +204,6 @@ export default { height: 30px; } button:hover { - background: inherit !important; + /*background: inherit !important;*/ } diff --git a/src/pages/user/AccountManager.vue b/src/pages/user/AccountManager.vue index 3b12551..6306c52 100644 --- a/src/pages/user/AccountManager.vue +++ b/src/pages/user/AccountManager.vue @@ -3,7 +3,7 @@ - + 角色 diff --git a/src/pages/user/RoleManager.vue b/src/pages/user/RoleManager.vue index 6e01101..2d82b83 100644 --- a/src/pages/user/RoleManager.vue +++ b/src/pages/user/RoleManager.vue @@ -367,7 +367,13 @@ goToAccManagerPage: function (item) { // this.$router.push({path: '/account/manager',query:item}); // 回调首页更新菜单栏选择 - this.bus.$emit("callBack",item); + let request = { + selectedMenu: "设置管理", + selectedSubMenu: "账户管理", + data: item, + type: 1 + }; + this.bus.$emit("callBack",request); }, //选中角色 selectRole: function (id) { diff --git a/src/services/CommonHttp.js b/src/services/CommonHttp.js index cb3c847..c650918 100755 --- a/src/services/CommonHttp.js +++ b/src/services/CommonHttp.js @@ -7,9 +7,7 @@ import commonUtils from '../utils/Common' // http://mf.kiisoo.com:58080/ // axios.defaults.baseURL = 'https://wxtk.bsdits.com/kiisoo-ic/'; axios.defaults.baseURL = - process.env.NODE_ENV === 'production' - ? 'http://111.231.218.44:8080/kiisoo-ic' - : '/kiisoo-ic' + process.env.NODE_ENV === 'production' ? '/kiisoo-ic/' : '/kiisoo-ic' //响应时间 axios.defaults.timeout = 120000 @@ -227,42 +225,40 @@ export function fetchDelete(url, params) { }) } -export function downloadZip(url,filename, options = {}) { - return new Promise((resolve, reject) => { - axios.defaults.headers['content-type'] = 'application/json;charset=UTF-8' - axios({ - method: 'post', - url: url, // 请求地址 - data: {}, // 参数 - responseType: 'blob' // 表明返回服务器返回的数据类型 - }).then( - response => { - resolve(response.data) - let blob = new Blob([response.data], { - type: 'application/zip' - }) - console.log(blob) - let fileName = filename + '.zip' - if (window.navigator.msSaveOrOpenBlob) { - // console.log(2) - navigator.msSaveBlob(blob, fileName) - } else { - // console.log(3) - var link = document.createElement('a') - link.href = window.URL.createObjectURL(blob) - link.download = fileName - link.click() - //释放内存 - window.URL.revokeObjectURL(link.href) - } - options.page.loading = false - }, - err => { - options.page.loading = false - reject(err) - } - ) - }) +export function downloadZip(url, filename, options = {}) { + return new Promise((resolve, reject) => { + axios.defaults.headers['content-type'] = 'application/json;charset=UTF-8' + axios({ + method: 'post', + url: url, // 请求地址 + data: options, // 参数 + responseType: 'blob', // 表明返回服务器返回的数据类型 + }).then( + (response) => { + resolve(response.data) + let blob = new Blob([response.data], { + type: 'application/zip', + }) + console.log(blob) + let fileName = filename + '.zip' + if (window.navigator.msSaveOrOpenBlob) { + // console.log(2) + navigator.msSaveBlob(blob, fileName) + } else { + // console.log(3) + var link = document.createElement('a') + link.href = window.URL.createObjectURL(blob) + link.download = fileName + link.click() + //释放内存 + window.URL.revokeObjectURL(link.href) + } + }, + (err) => { + reject(err) + } + ) + }) } export function downloadExcel(url, filename, options = {}) { let split = filename.split(',') diff --git a/vue.config.js b/vue.config.js index eefe86a..b52ccd4 100644 --- a/vue.config.js +++ b/vue.config.js @@ -5,32 +5,32 @@ module.exports = { /* 用于默认#模式 */ // publicPath: process.env.NODE_ENV === 'production' ? '/public/' : './', - /* history模式 */ - publicPath: process.env.NODE_ENV === 'production' ? '/dist/' : '/', - /* 输出文件目录:在npm run build时,生成文件的目录名称 */ - outputDir: 'dist', - /* 放置生成的静态资源 (js、css、img、fonts) 的 (相对于 outputDir 的) 目录 */ - assetsDir: "assets", - /* 是否在构建生产包时生成 sourceMap 文件,false将提高构建速度 */ - productionSourceMap: false, - /* 默认情况下,生成的静态资源在它们的文件名中包含了 hash 以便更好的控制缓存,你可以通过将这个选项设为 false 来关闭文件名哈希。(false的时候就是让原来的文件名不改变) */ - filenameHashing: false, - /* 代码保存时进行eslint检测 */ - lintOnSave: true, - /* webpack-dev-server 相关配置 */ - devServer: { - /* 自动打开浏览器 */ - open: true, - /* 设置为0.0.0.0则所有的地址均能访问 */ - host: '0.0.0.0', - port: 8311, - https: false, - hotOnly: false, - disableHostCheck: true, - /* 使用代理 后台接口路径 */ - // proxy: 'http://192.168.1.123:8312/' - // proxy: 'http://192.168.31.177:8312/' - proxy: 'http://localhost:8312/' - // proxy: 'http://jdxdev.vipgz4.idcfengye.com/' - } + /* history模式 */ + publicPath: process.env.NODE_ENV === 'production' ? '/' : '/', + /* 输出文件目录:在npm run build时,生成文件的目录名称 */ + outputDir: 'dist', + /* 放置生成的静态资源 (js、css、img、fonts) 的 (相对于 outputDir 的) 目录 */ + assetsDir: 'assets', + /* 是否在构建生产包时生成 sourceMap 文件,false将提高构建速度 */ + productionSourceMap: false, + /* 默认情况下,生成的静态资源在它们的文件名中包含了 hash 以便更好的控制缓存,你可以通过将这个选项设为 false 来关闭文件名哈希。(false的时候就是让原来的文件名不改变) */ + filenameHashing: false, + /* 代码保存时进行eslint检测 */ + lintOnSave: true, + /* webpack-dev-server 相关配置 */ + devServer: { + /* 自动打开浏览器 */ + open: true, + /* 设置为0.0.0.0则所有的地址均能访问 */ + host: '0.0.0.0', + port: 8311, + https: false, + hotOnly: false, + disableHostCheck: true, + /* 使用代理 后台接口路径 */ + // proxy: 'http://192.168.1.123:8312/' + // proxy: 'http://192.168.31.177:8312/' + proxy: 'http://localhost:8080/', + // proxy: 'http://jdxdev.vipgz4.idcfengye.com/' + }, }
{{this.showStoreName}}
+ + 配置活动 基本配置 - + - - - + + + 请上传图片 - + - - - + + + - - + + - - + + - - + + - - + + + + + 活动类型 - + 类型{{ index + 1 }} - + - + - 删除 + 删除 - +添加活动类型 + +添加活动类型 - 取消 - 确定 + 取消 + 确定
配置活动
招募令
便于门店进行推广员招募
招募海报