diff --git a/buyer/src/assets/images/default.png b/buyer/src/assets/images/default.png new file mode 100644 index 00000000..4f2b94c0 Binary files /dev/null and b/buyer/src/assets/images/default.png differ diff --git a/buyer/src/config/index.js b/buyer/src/config/index.js index e3fd5c56..135fe97e 100644 --- a/buyer/src/config/index.js +++ b/buyer/src/config/index.js @@ -18,4 +18,5 @@ module.exports = { aMapKey: "7f11113750315d8543daaf5c3ba353ca", //高德web端js申请的api key enableCDN: true, //生产环境 是否启用cdn加载 vue等js port: 10000, //端口 + inputMaxLength:'140' //全局输入框默认最大输入长度字 }; diff --git a/buyer/src/main.js b/buyer/src/main.js index e6f9e700..24d8e867 100644 --- a/buyer/src/main.js +++ b/buyer/src/main.js @@ -8,10 +8,15 @@ import * as filters from "./plugins/filters"; import store from "@/vuex/store"; import storage from "@/plugins/storage"; // 全局引入封装组件 -import { InstallAll } from "@/components/global.js"; +import {InstallAll} from "@/components/global.js"; + +const {aMapSecurityJsCode, title, inputMaxLength} = require("@/config"); + +const copyViewUi = {...ViewUI} +copyViewUi.Input.props.maxlength.default = inputMaxLength // 挂载最大输入值 +Vue.use(copyViewUi); + -const { aMapSecurityJsCode, title } = require("@/config"); -Vue.use(ViewUI); Vue.use(InstallAll); Vue.config.productionTip = false; diff --git a/manager/src/config/index.js b/manager/src/config/index.js index 7c8628ea..cbbf0588 100644 --- a/manager/src/config/index.js +++ b/manager/src/config/index.js @@ -11,4 +11,5 @@ module.exports = { website: "https://www.pickmall.cn", //官网地址 enableCDN: true, //生产环境 是否启用cdn加载 vue等js port: 10003, //端口 + inputMaxLength:'140' //全局输入框默认最大输入长度字 }; diff --git a/manager/src/main.js b/manager/src/main.js index b62fae93..595d42ce 100644 --- a/manager/src/main.js +++ b/manager/src/main.js @@ -8,12 +8,12 @@ import './styles/theme.less'; import "core-js/stable" // import "regenerator-runtime/runtime" import App from './App' -import { router } from './router/index' +import {router} from './router/index' import store from './store' import i18n from '@/locale' -import { getRequest, postRequest, putRequest, deleteRequest, importRequest, uploadFileRequest } from '@/libs/axios' -import { setStore, getStore, removeStore } from '@/libs/storage' +import {getRequest, postRequest, putRequest, deleteRequest, importRequest, uploadFileRequest} from '@/libs/axios' +import {setStore, getStore, removeStore} from '@/libs/storage' import util from '@/libs/util' import * as filters from '@/utils/filters' // global filter @@ -23,8 +23,9 @@ import {md5} from '@/utils/md5.js'; // 打印 import Print from 'vue-print-nb'; + Vue.use(Print); -const { aMapSecurityJsCode } = require("@/config"); +const {aMapSecurityJsCode, inputMaxLength} = require("@/config"); // 高德安全密钥 if (aMapSecurityJsCode) { window._AMapSecurityConfig = { @@ -44,14 +45,15 @@ Vue.prototype.wapLinkTo = function (goodsId, skuId) { // app端二维码 return `${WAP_URL}/pages/product/goods?id=${skuId}&goodsId=${goodsId}` }; -Vue.use(ViewUI, { - i18n: (key, value) => i18n.t(key, value) + +const copyViewUi = {...ViewUI} +copyViewUi.Input.props.maxlength.default = inputMaxLength // 挂载最大输入值 +Vue.use(copyViewUi, { + i18n: (key, value) => i18n.t(key, value), }); -Vue.component('liliDialog',liliDialog) -Vue.component('i18nBox',i18nBox) - - +Vue.component('liliDialog', liliDialog) +Vue.component('i18nBox', i18nBox) // 挂载全局使用的方法 @@ -66,31 +68,31 @@ Vue.prototype.getStore = getStore; Vue.prototype.removeStore = removeStore; Vue.prototype.md5 = md5; -Array.prototype.remove = function(from, to) { - var rest = this.slice((to || from) + 1 || this.length); - this.length = from < 0 ? this.length + from : from; - return this.push.apply(this, rest); +Array.prototype.remove = function (from, to) { + var rest = this.slice((to || from) + 1 || this.length); + this.length = from < 0 ? this.length + from : from; + return this.push.apply(this, rest); }; Object.keys(filters).forEach(key => { - Vue.filter(key, filters[key]) + Vue.filter(key, filters[key]) }) /* eslint-disable no-new */ new Vue({ - el: '#app', - router, - store, - i18n, - render: h => h(App), - data: { - currentPageName: '' - }, - mounted() { - // 初始化菜单 - util.initRouter(this); - this.currentPageName = this.$route.name; - // 显示打开的页面的列表 - this.$store.commit('setOpenedList'); - this.$store.commit('initCachePage'); - } + el: '#app', + router, + store, + i18n, + render: h => h(App), + data: { + currentPageName: '' + }, + mounted() { + // 初始化菜单 + util.initRouter(this); + this.currentPageName = this.$route.name; + // 显示打开的页面的列表 + this.$store.commit('setOpenedList'); + this.$store.commit('initCachePage'); + } }) diff --git a/seller/src/config/index.js b/seller/src/config/index.js index c03118db..ca3ce143 100644 --- a/seller/src/config/index.js +++ b/seller/src/config/index.js @@ -1,14 +1,15 @@ module.exports = { title: "lilishop", //配置显示在浏览器标签的title - /** + /** * 高德地图申请链接 * https://lbs.amap.com/api/javascript-api/guide/abc/prepare * 添加成功后,可获取到key值和安全密钥jscode(自2021年12月02日升级,升级之后所申请的 key 必须配备安全密钥 jscode 一起使用) */ //FIXME 请检查当前高德key创建的日期,如果2021年12月02日之前申请的 无需填写安全密钥 - aMapSecurityJsCode:"2bd0fbf621881f4c77be74f0e76495f3", // 高德web端js申请的安全密钥 + aMapSecurityJsCode: "2bd0fbf621881f4c77be74f0e76495f3", // 高德web端js申请的安全密钥 aMapKey: "7f11113750315d8543daaf5c3ba353ca", //高德web端js申请的api key website: "https://www.pickmall.cn", //官网地址 enableCDN: true, //生产环境 是否启用cdn加载 vue等js port: 10002, //端口 + inputMaxLength:'140' //全局输入框默认最大输入长度字 }; diff --git a/seller/src/main.js b/seller/src/main.js index 7aa95b4a..a1abb8b1 100644 --- a/seller/src/main.js +++ b/seller/src/main.js @@ -7,7 +7,7 @@ import vueQr from "vue-qr"; import liliDialog from '@/views/lili-dialog' import App from "./App"; -import { router } from "./router/index"; +import {router} from "./router/index"; import store from "./store"; import { getRequest, @@ -17,7 +17,7 @@ import { importRequest, uploadFileRequest } from "@/libs/axios"; -import { setStore, getStore, removeStore } from "@/libs/storage"; +import {setStore, getStore, removeStore} from "@/libs/storage"; import i18nBox from '@/views/lili-components/i18n-translate' import util from "@/libs/util"; @@ -26,10 +26,12 @@ import VueLazyload from "vue-lazyload"; import * as filters from "@/utils/filters"; // global filter -import { md5 } from "@/utils/md5.js"; -const { aMapSecurityJsCode } = require("@/config"); +import {md5} from "@/utils/md5.js"; + +const {aMapSecurityJsCode, inputMaxLength} = require("@/config"); // 打印 import Print from 'vue-print-nb'; + Vue.use(Print); // 高德安全密钥 if (aMapSecurityJsCode) { @@ -44,10 +46,14 @@ Vue.use(VueLazyload, { loading: require("./assets/loading2.gif") }); -Vue.use(ViewUI); -Vue.component('liliDialog',liliDialog) -Vue.component('i18nBox',i18nBox) -Vue.component('liliDialog',liliDialog) + +const copyViewUi = {...ViewUI} +copyViewUi.Input.props.maxlength.default = inputMaxLength // 挂载最大输入值 +Vue.use(copyViewUi); + +Vue.component('liliDialog', liliDialog) +Vue.component('i18nBox', i18nBox) +Vue.component('liliDialog', liliDialog) Vue.component("vue-qr", vueQr); //此处将vue-qr添加为全局组件 // 挂载全局使用的方法 @@ -63,19 +69,19 @@ Vue.prototype.removeStore = removeStore; Vue.prototype.md5 = md5; const PC_URL = BASE.PC_URL; // 跳转买家端地址 pc端 const WAP_URL = BASE.WAP_URL; // 跳转买家端地址 wap端 -Vue.prototype.linkTo = function(goodsId, skuId) { +Vue.prototype.linkTo = function (goodsId, skuId) { // 跳转买家端商品 window.open( `${PC_URL}/goodsDetail?skuId=${skuId}&goodsId=${goodsId}`, "_blank" ); }; -Vue.prototype.wapLinkTo = function(goodsId, skuId) { +Vue.prototype.wapLinkTo = function (goodsId, skuId) { // app端二维码 return `${WAP_URL}/pages/product/goods?id=${skuId}&goodsId=${goodsId}`; }; -Array.prototype.remove = function(from, to) { +Array.prototype.remove = function (from, to) { var rest = this.slice((to || from) + 1 || this.length); this.length = from < 0 ? this.length + from : from; return this.push.apply(this, rest);