mirror of
https://gitee.com/ZhongBangKeJi/crmeb_java.git
synced 2026-04-26 12:39:36 +08:00
1. 会员等级背景图去掉校验 2. 当查询不到会员等级是,按无会员等级展示 3. 删除商城首页冗余配置在index中的引用 4. 换绑推广人时,计算上一个推广人的推广人数 5. pc后台清除推广人时,更新推广人数量 6. 保证砍价金额最小为0.01 7. 修复商品删除时购物车关联删除 8. 删除商品问题修复 9. 运费模板——指定包邮,包邮数量类型修改 10. 签到错误修复 11. 修复我的优惠券只查询20条的问题 12. 文章列表修复 13. 拼团商品详情页数据统计显示问题修复 14. PC后台,账户详情,持有优惠券列表修复 15. 支付查询参数修复 16. 修复过期优惠券可以重复领取 17. 订单邮费切换地址重复计算修复 18. 判断是否在指定包邮区域内 必须满足件数 + 金额 才能包邮 19. 支付页面,切换tab,金额计算问题修复 20. 物流模板新增、编辑——修复 21. 去除线下邮费的影响 22. 订单运费计算重写 23. 下单页面到店自提合计金额不应该计算商品邮费 24. 新人券领取后,部分使用时间为空——修复
203 lines
6.0 KiB
JavaScript
203 lines
6.0 KiB
JavaScript
import Vue from 'vue'
|
|
import '@babel/polyfill'
|
|
// import 'babel-polyfill'
|
|
import Cookies from 'js-cookie'
|
|
|
|
import 'normalize.css/normalize.css' // a modern alternative to CSS resets
|
|
|
|
import Element from 'element-ui'
|
|
import './styles/element-variables.scss'
|
|
|
|
import '@/styles/index.scss' // global css
|
|
|
|
import "@/assets/iconfont/iconfont";
|
|
import "@/assets/iconfont/iconfont.css";
|
|
|
|
import VueAwesomeSwiper from 'vue-awesome-swiper'
|
|
import 'swiper/dist/css/swiper.css'
|
|
import "vue-ydui/dist/ydui.base.css";
|
|
// 懒加载
|
|
import VueLazyload from 'vue-lazyload'
|
|
|
|
Vue.config.devtools=true
|
|
import App from './App'
|
|
import store from './store'
|
|
import router from './router'
|
|
import attrFrom from './components/attrFrom'
|
|
import uploadPicture from './components/uploadPicture/uploadFrom'
|
|
import goodListFrom from './components/goodList/goodListFrom'
|
|
import couponFrom from './components/couponList/couponFrom'
|
|
import articleFrom from './components/articleList/articleFrom'
|
|
import UploadIndex from '@/components/uploadPicture/index.vue'
|
|
import UploadFile from '@/components/Upload/uploadFile.vue'
|
|
import ueditorFrom from '@/components/ueditorFrom'
|
|
import VueUeditorWrap from 'vue-ueditor-wrap'
|
|
import iconFrom from './components/iconFrom'
|
|
import TimeSelect from '@/components/TimeSelect'
|
|
import dialog from "@/libs/dialog";
|
|
import scroll from "@/libs/loading";
|
|
import schema from "async-validator";
|
|
// 切勿更改 此组件为表单生成中使用的图片上传组件
|
|
import SelfUpload from '@/components/uploadPicture/forGenrator/index.vue'
|
|
import util from '@/utils/utils'
|
|
import modalAttr from '@/libs/modal-attr'
|
|
import modalIcon from '@/libs/modal-icon'
|
|
import { modalSure } from '@/libs/public'
|
|
import { loadScriptQueue } from '@/components/FormGenerator/utils/loadScript'
|
|
import './icons' // icon
|
|
import './permission' // permission control
|
|
import './utils/error-log' // error integralLog
|
|
import * as filters from './filters' // global filters
|
|
import { parseQuery } from "@/utils";
|
|
import * as Auth from '@/libs/wechat';
|
|
import * as constants from '@/utils/constants.js'
|
|
import * as selfUtil from '@/utils/ZBKJIutil.js';
|
|
Vue.use(VueLazyload, {
|
|
preLoad: 1.3,
|
|
error: require('./assets/imgs/no.png'),
|
|
loading: require('./assets/imgs/moren.jpg'),
|
|
attempt: 1,
|
|
listenEvents: ['scroll', 'wheel', 'mousewheel', 'resize', 'animationend', 'transitionend', 'touchmove']
|
|
})
|
|
|
|
Vue.use(uploadPicture)
|
|
Vue.use(goodListFrom)
|
|
Vue.use(couponFrom)
|
|
Vue.use(articleFrom)
|
|
Vue.use(VueAwesomeSwiper)
|
|
Vue.component('vue-ueditor-wrap', VueUeditorWrap)
|
|
Vue.component('attrFrom', attrFrom)
|
|
Vue.component('UploadIndex', UploadIndex)
|
|
Vue.component('SelfUpload', SelfUpload)
|
|
Vue.component('iconFrom', iconFrom)
|
|
Vue.component('ueditorFrom', ueditorFrom)
|
|
Vue.component('uploadFile', UploadFile)
|
|
Vue.component('timeSelect', TimeSelect)
|
|
Vue.prototype.$modalSure = modalSure
|
|
Vue.prototype.$modalAttr = modalAttr
|
|
Vue.prototype.$modalIcon = modalIcon
|
|
Vue.prototype.$dialog = dialog
|
|
Vue.prototype.$scroll = scroll;
|
|
Vue.prototype.$wechat = Auth;
|
|
Vue.prototype.$util = util;
|
|
Vue.prototype.$constants = constants;
|
|
Vue.prototype.$selfUtil = selfUtil;
|
|
Vue.prototype.$validator = function(rule) {
|
|
return new schema(rule);
|
|
};
|
|
|
|
let cookieName = "VCONSOLE";
|
|
let query = parseQuery();
|
|
let urlSpread = query["spread"];
|
|
let vconsole = query[cookieName.toLowerCase()];
|
|
let md5Crmeb = "b14d1e9baeced9bb7525ab19ee35f2d2"; //CRMEB MD5 加密开启vconsole模式
|
|
let md5UnCrmeb = "3dca2162c4e101b7656793a1af20295c"; //UN_CREMB MD5 加密关闭vconsole模式
|
|
|
|
|
|
if (vconsole !== undefined) {
|
|
if (vconsole === md5UnCrmeb && Cookies.has(cookieName))
|
|
Cookies.remove(cookieName);
|
|
} else vconsole = Cookies.get(cookieName);
|
|
|
|
if (vconsole !== undefined && vconsole === md5Crmeb) {
|
|
Cookies.set(cookieName, md5Crmeb, 3600);
|
|
const module = () => import("vconsole");
|
|
module().then(Module => {
|
|
new Module.default();
|
|
});
|
|
}
|
|
// 自定义实现String 类型的replaceAll方法
|
|
String.prototype.replaceAll = function(s1, s2) {
|
|
return this.replace(new RegExp(s1, "gm"), s2);
|
|
}
|
|
// Vue.prototype.$modalCoupon = modalCoupon
|
|
/**
|
|
* If you don't want to use mock-server
|
|
* you want to use MockJs for mock api
|
|
* you can execute: mockXHR()
|
|
*
|
|
* Currently MockJs will be used in the production environment,
|
|
* please remove it before going online ! ! !
|
|
*/
|
|
if (process.env.NODE_ENV === 'production') {
|
|
const { mockXHR } = require('../mock')
|
|
mockXHR()
|
|
}
|
|
|
|
Vue.use(Element, {
|
|
size: Cookies.get('size') || 'mini' // set element-ui default size
|
|
})
|
|
|
|
// register global utility filters
|
|
Object.keys(filters).forEach(key => {
|
|
Vue.filter(key, filters[key])
|
|
})
|
|
|
|
Vue.config.productionTip = false
|
|
|
|
const $previewApp = document.getElementById('previewApp')
|
|
const childAttrs = {
|
|
file: '',
|
|
dialog: ' width="600px" class="dialog-width" v-if="visible" :visible.sync="visible" :modal-append-to-body="false" '
|
|
}
|
|
|
|
window.addEventListener('message', init, false)
|
|
|
|
function buildLinks(links) {
|
|
let strs = ''
|
|
links.forEach(url => {
|
|
strs += `<link href="${url}" rel="stylesheet">`
|
|
})
|
|
return strs
|
|
}
|
|
|
|
function init(event) {
|
|
if (event.data.type === 'refreshFrame') {
|
|
const code = event.data.data
|
|
const attrs = childAttrs[code.generateConf.type]
|
|
let links = ''
|
|
|
|
if (Array.isArray(code.links) && code.links.length > 0) {
|
|
links = buildLinks(code.links)
|
|
}
|
|
|
|
$previewApp.innerHTML = `${links}<style>${code.css}</style><div id="app"></div>`
|
|
|
|
if (Array.isArray(code.scripts) && code.scripts.length > 0) {
|
|
loadScriptQueue(code.scripts, () => {
|
|
newVue(attrs, code.js, code.html)
|
|
})
|
|
} else {
|
|
newVue(attrs, code.js, code.html)
|
|
}
|
|
}
|
|
}
|
|
|
|
function newVue(attrs, main, html) {
|
|
// eslint-disable-next-line no-eval
|
|
main = eval(`(${main})`)
|
|
main.template = `<div>${html}</div>`
|
|
new Vue({
|
|
components: {
|
|
child: main
|
|
},
|
|
data() {
|
|
return {
|
|
visible: true
|
|
}
|
|
},
|
|
template: `<div><child ${attrs}/></div>`
|
|
}).$mount('#app')
|
|
}
|
|
|
|
String.prototype.replaceAll = function(s1, s2) {
|
|
return this.replace(new RegExp(s1, "gm"), s2);
|
|
}
|
|
|
|
new Vue({
|
|
el: '#app',
|
|
router,
|
|
store,
|
|
render: h => h(App)
|
|
})
|