合并master
commit
10dcf4473c
|
@ -89,7 +89,11 @@ export default {
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
navList () { // 导航列表
|
navList () { // 导航列表
|
||||||
return JSON.parse(storage.getItem('navList')) || []
|
if (storage.getItem('navList')) {
|
||||||
|
return JSON.parse(storage.getItem('navList'))
|
||||||
|
} else {
|
||||||
|
return []
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
|
@ -188,7 +188,7 @@ export default {
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
cateList () { // 商品分类
|
cateList () { // 商品分类
|
||||||
return this.$store.state.category
|
return this.$store.state.category || []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
|
|
|
@ -89,7 +89,11 @@ export default {
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
navList () { // 导航列表
|
navList () { // 导航列表
|
||||||
return JSON.parse(storage.getItem('navList')) || []
|
if (storage.getItem('navList')) {
|
||||||
|
return JSON.parse(storage.getItem('navList'))
|
||||||
|
} else {
|
||||||
|
return []
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
|
@ -13,7 +13,7 @@ export default new Vuex.Store({
|
||||||
cartNum: storage.getItem('cartNum') || 0,
|
cartNum: storage.getItem('cartNum') || 0,
|
||||||
logoImg: require('@/assets/images/logo2.png'),
|
logoImg: require('@/assets/images/logo2.png'),
|
||||||
hotWordsList: storage.getItem('hotWordsList'),
|
hotWordsList: storage.getItem('hotWordsList'),
|
||||||
category: localStorage.getItem('category')
|
category: JSON.parse(localStorage.getItem('category'))
|
||||||
},
|
},
|
||||||
getters,
|
getters,
|
||||||
actions,
|
actions,
|
||||||
|
|
|
@ -22,11 +22,13 @@ import liliDialog from '@/views/lili-dialog'
|
||||||
import {md5} from '@/utils/md5.js';
|
import {md5} from '@/utils/md5.js';
|
||||||
Vue.config.devtools = true;
|
Vue.config.devtools = true;
|
||||||
Vue.config.productionTip = false
|
Vue.config.productionTip = false
|
||||||
Vue.prototype.linkTo = function (goodsId, skuId, link='https://pc-b2b2c.pickmall.cn') { // 跳转买家端商品
|
const buyerUrlPC = 'https://pc-b2b2c.pickmall.cn' // 跳转买家端地址 pc端
|
||||||
window.open(`${link}/goodsDetail?skuId=${skuId}&goodsId=${goodsId}`, '_blank')
|
const buyerUrlWap = 'https://m-b2b2c.pickmall.cn' // 跳转买家端地址 wap端
|
||||||
|
Vue.prototype.linkTo = function (goodsId, skuId) { // 跳转买家端商品
|
||||||
|
window.open(`${buyerUrlPC}/goodsDetail?skuId=${skuId}&goodsId=${goodsId}`, '_blank')
|
||||||
};
|
};
|
||||||
Vue.prototype.wapLinkTo = function (goodsId, skuId) { // app端二维码
|
Vue.prototype.wapLinkTo = function (goodsId, skuId) { // app端二维码
|
||||||
return `https://m-b2b2c.pickmall.cn/pages/product/goods?id=${skuId}&goodsId=${goodsId}`
|
return `${buyerUrlWap}/pages/product/goods?id=${skuId}&goodsId=${goodsId}`
|
||||||
};
|
};
|
||||||
Vue.use(VueLazyload, {
|
Vue.use(VueLazyload, {
|
||||||
error: require('./assets/img-error.png'),
|
error: require('./assets/img-error.png'),
|
||||||
|
|
|
@ -8,14 +8,6 @@ import {
|
||||||
getRequestWithNoToken,
|
getRequestWithNoToken,
|
||||||
commonUrl
|
commonUrl
|
||||||
} from "@/libs/axios";
|
} from "@/libs/axios";
|
||||||
import config from "@/config";
|
|
||||||
|
|
||||||
// 文件上传接口
|
|
||||||
export const uploadFile = commonUrl + "/common/upload/file";
|
|
||||||
// 验证码渲染图片接口
|
|
||||||
export const drawCodeImage = "/common/captcha/draw/";
|
|
||||||
// 获取菜单
|
|
||||||
export const getMenuList = "/permission/getMenuList";
|
|
||||||
// 获取数据字典
|
// 获取数据字典
|
||||||
export const getDictData = "/dictData/getByType/";
|
export const getDictData = "/dictData/getByType/";
|
||||||
// Websocket
|
// Websocket
|
||||||
|
|
|
@ -6,17 +6,8 @@ import {
|
||||||
deleteRequest,
|
deleteRequest,
|
||||||
getRequestWithNoToken,
|
getRequestWithNoToken,
|
||||||
postRequestWithNoToken,
|
postRequestWithNoToken,
|
||||||
commonUrl,
|
|
||||||
baseUrl
|
|
||||||
} from "@/libs/axios";
|
} from "@/libs/axios";
|
||||||
|
|
||||||
// 文件上传接口
|
|
||||||
export const uploadFile = commonUrl + "/common/upload/file";
|
|
||||||
// 验证码渲染图片接口
|
|
||||||
export const drawCodeImage = commonUrl + "/common/captcha/draw/";
|
|
||||||
// 获取菜单
|
|
||||||
export const getMenuList = baseUrl + "/permission/getMenuList";
|
|
||||||
|
|
||||||
//获取所有city
|
//获取所有city
|
||||||
export const getAllCity = (params) => {
|
export const getAllCity = (params) => {
|
||||||
return getRequest(commonUrl+'/common/region/allCity', params)
|
return getRequest(commonUrl+'/common/region/allCity', params)
|
||||||
|
|
|
@ -1,10 +1,6 @@
|
||||||
// 统一请求路径前缀在libs/axios.js中修改
|
// 统一请求路径前缀在libs/axios.js中修改
|
||||||
import { getRequest, postRequest, putRequest, deleteRequest, importRequest, getRequestWithNoToken } from '@/libs/axios';
|
import { getRequest, postRequest, putRequest, deleteRequest, importRequest, getRequestWithNoToken } from '@/libs/axios';
|
||||||
|
|
||||||
// 验证码渲染图片接口
|
|
||||||
export const drawCodeImage = "/lili/common/captcha/draw/"
|
|
||||||
|
|
||||||
|
|
||||||
// 获取kuaidi配置
|
// 获取kuaidi配置
|
||||||
export const getParams = (params) => {
|
export const getParams = (params) => {
|
||||||
return getRequest('/platformSetting/get/'+params)
|
return getRequest('/platformSetting/get/'+params)
|
||||||
|
|
|
@ -3,12 +3,6 @@ import {getRequest, postRequest, putRequest, deleteRequest, importRequest, getRe
|
||||||
|
|
||||||
// Vaptcha ID
|
// Vaptcha ID
|
||||||
export const vaptchaID = "5dce36188713b71e70a41eb7"
|
export const vaptchaID = "5dce36188713b71e70a41eb7"
|
||||||
// 文件上传接口
|
|
||||||
export const uploadFile = "/upload/file"
|
|
||||||
// 验证码渲染图片接口
|
|
||||||
export const drawCodeImage = "/common/captcha/draw/"
|
|
||||||
// 获取菜单
|
|
||||||
export const getMenuList = "/permission/getMenuList"
|
|
||||||
// 获取数据字典
|
// 获取数据字典
|
||||||
export const getDictData = "/dictData/getByType/"
|
export const getDictData = "/dictData/getByType/"
|
||||||
// Websocket
|
// Websocket
|
||||||
|
|
|
@ -15,7 +15,8 @@ export const commonUrl =
|
||||||
process.env.NODE_ENV === "development"
|
process.env.NODE_ENV === "development"
|
||||||
? config.api_dev.common
|
? config.api_dev.common
|
||||||
: config.api_prod.common;
|
: config.api_prod.common;
|
||||||
|
// 文件上传接口
|
||||||
|
export const uploadFile = commonUrl + "/common/upload/file";
|
||||||
var isRefreshToken = 0;
|
var isRefreshToken = 0;
|
||||||
const refreshToken = getTokenDebounce();
|
const refreshToken = getTokenDebounce();
|
||||||
const service = axios.create({
|
const service = axios.create({
|
||||||
|
|
|
@ -56,11 +56,13 @@ Vue.prototype.setStore = setStore;
|
||||||
Vue.prototype.getStore = getStore;
|
Vue.prototype.getStore = getStore;
|
||||||
Vue.prototype.removeStore = removeStore;
|
Vue.prototype.removeStore = removeStore;
|
||||||
Vue.prototype.md5 = md5;
|
Vue.prototype.md5 = md5;
|
||||||
Vue.prototype.linkTo = function (goodsId, skuId, link='https://pc-b2b2c.pickmall.cn') { // 跳转买家端商品
|
const buyerUrlPC = 'https://pc-b2b2c.pickmall.cn' // 跳转买家端地址 pc端
|
||||||
window.open(`${link}/goodsDetail?skuId=${skuId}&goodsId=${goodsId}`, '_blank')
|
const buyerUrlWap = 'https://m-b2b2c.pickmall.cn' // 跳转买家端地址 wap端
|
||||||
|
Vue.prototype.linkTo = function (goodsId, skuId) { // 跳转买家端商品
|
||||||
|
window.open(`${buyerUrlPC}/goodsDetail?skuId=${skuId}&goodsId=${goodsId}`, '_blank')
|
||||||
};
|
};
|
||||||
Vue.prototype.wapLinkTo = function (goodsId, skuId) { // app端二维码
|
Vue.prototype.wapLinkTo = function (goodsId, skuId) { // app端二维码
|
||||||
return `https://m-b2b2c.pickmall.cn/pages/product/goods?id=${skuId}&goodsId=${goodsId}`
|
return `${buyerUrlWap}/pages/product/goods?id=${skuId}&goodsId=${goodsId}`
|
||||||
};
|
};
|
||||||
|
|
||||||
Array.prototype.remove = function(from, to) {
|
Array.prototype.remove = function(from, to) {
|
||||||
|
|
|
@ -315,6 +315,7 @@ import * as API_Shop from "@/api/shops";
|
||||||
import cloneObj from "@/utils/index";
|
import cloneObj from "@/utils/index";
|
||||||
import vuedraggable from "vuedraggable";
|
import vuedraggable from "vuedraggable";
|
||||||
import editor from "@/views/my-components/lili/editor";
|
import editor from "@/views/my-components/lili/editor";
|
||||||
|
import { uploadFile } from "@/libs/axios";
|
||||||
import {regular} from "@/utils";
|
import {regular} from "@/utils";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
@ -371,7 +372,7 @@ export default {
|
||||||
//提交状态
|
//提交状态
|
||||||
submitLoading: false,
|
submitLoading: false,
|
||||||
//上传图片路径
|
//上传图片路径
|
||||||
uploadFileUrl: API_GOODS.uploadFile,
|
uploadFileUrl: uploadFile,
|
||||||
// 预览图片路径
|
// 预览图片路径
|
||||||
previewPicture: "",
|
previewPicture: "",
|
||||||
//商品图片
|
//商品图片
|
||||||
|
|
|
@ -50,7 +50,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { uploadFile } from "@/api/index";
|
import { uploadFile } from "@/libs/axios";
|
||||||
import E from "wangeditor";
|
import E from "wangeditor";
|
||||||
import xss from "xss";
|
import xss from "xss";
|
||||||
// 表情包配置 自定义表情可在该js文件中统一修改
|
// 表情包配置 自定义表情可在该js文件中统一修改
|
||||||
|
|
|
@ -49,7 +49,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { uploadFile } from "@/api/index";
|
import { uploadFile } from "@/libs/axios";
|
||||||
export default {
|
export default {
|
||||||
name: "uploadPicInput",
|
name: "uploadPicInput",
|
||||||
props: {
|
props: {
|
||||||
|
@ -87,7 +87,7 @@ export default {
|
||||||
currentValue: this.value, // 当前值
|
currentValue: this.value, // 当前值
|
||||||
loading: false, // 加载状态
|
loading: false, // 加载状态
|
||||||
viewImage: false, // 是否预览图片
|
viewImage: false, // 是否预览图片
|
||||||
uploadFileUrl: uploadFile // 上传列表
|
uploadFileUrl: uploadFile // 上传路径
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
|
@ -55,7 +55,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { uploadFile } from "@/api/index";
|
import { uploadFile } from "@/libs/axios";
|
||||||
import vuedraggable from "vuedraggable";
|
import vuedraggable from "vuedraggable";
|
||||||
export default {
|
export default {
|
||||||
name: "uploadPicThumb",
|
name: "uploadPicThumb",
|
||||||
|
|
|
@ -237,7 +237,7 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import * as API_Order from "@/api/order";
|
import * as API_Order from "@/api/order";
|
||||||
import * as API_GOODS from "@/api/goods";
|
import { uploadFile } from "@/libs/axios";
|
||||||
export default {
|
export default {
|
||||||
name: "orderComplaint",
|
name: "orderComplaint",
|
||||||
data() {
|
data() {
|
||||||
|
@ -245,7 +245,7 @@ export default {
|
||||||
//展示图片层
|
//展示图片层
|
||||||
visible: false,
|
visible: false,
|
||||||
//上传图片路径
|
//上传图片路径
|
||||||
uploadFileUrl: API_GOODS.uploadFile,
|
uploadFileUrl: uploadFile,
|
||||||
accessToken: "", // 验证token
|
accessToken: "", // 验证token
|
||||||
id: 0, // 投诉单id
|
id: 0, // 投诉单id
|
||||||
complaintInfo: "", // 投诉信息
|
complaintInfo: "", // 投诉信息
|
||||||
|
|
|
@ -146,7 +146,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { uploadFile } from "@/api/index";
|
import { uploadFile } from "@/libs/axios";
|
||||||
import {
|
import {
|
||||||
addLive,
|
addLive,
|
||||||
addLiveGoods,
|
addLiveGoods,
|
||||||
|
|
Loading…
Reference in New Issue