update @优化小问题
This commit is contained in:
parent
2d6112ac3a
commit
41392bfbbe
|
@ -6,19 +6,6 @@ import {
|
||||||
|
|
||||||
// 公共路由
|
// 公共路由
|
||||||
const routePublic = [
|
const routePublic = [
|
||||||
// {
|
|
||||||
// path: "/",
|
|
||||||
// redirect: { name: 'home', params: { key: 'default_key' } }
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// path: "/:key",
|
|
||||||
// redirect: { name: 'home' }
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// path: "/home/:key",
|
|
||||||
// name: "home",
|
|
||||||
// component: () => import("../views/home.vue"),
|
|
||||||
// },
|
|
||||||
{
|
{
|
||||||
path: "/",
|
path: "/",
|
||||||
redirect: "/home",
|
redirect: "/home",
|
||||||
|
@ -78,9 +65,9 @@ const router = createRouter({
|
||||||
|
|
||||||
router.beforeEach(async (to, from, next) => {
|
router.beforeEach(async (to, from, next) => {
|
||||||
const rouList = routes.filter(
|
const rouList = routes.filter(
|
||||||
(item) => item.path != "/" && item.path === to.fullPath
|
(item) => item.path !== "/" && item.path === to.path
|
||||||
);
|
);
|
||||||
if (from.fullPath === "/" && rouList.length === 0) {
|
if (from.path === "/" && rouList.length === 0) {
|
||||||
const url = window.location.href;
|
const url = window.location.href;
|
||||||
const str = url.split("/");
|
const str = url.split("/");
|
||||||
const strP = str[str.length - 1];
|
const strP = str[str.length - 1];
|
||||||
|
|
|
@ -12,7 +12,7 @@ export default {
|
||||||
name: 'home',
|
name: 'home',
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
key: this.$route.params.key || this.$route.query.key || localStorage.getItem('key'),
|
key: localStorage.getItem('key'),
|
||||||
loginBack: this.$route.query.loginBack,
|
loginBack: this.$route.query.loginBack,
|
||||||
// jumpPath: this.$route.query.jumpPath,
|
// jumpPath: this.$route.query.jumpPath,
|
||||||
openid: this.$route.query.openid || localStorage.getItem("openid"), // 微信授权id
|
openid: this.$route.query.openid || localStorage.getItem("openid"), // 微信授权id
|
||||||
|
@ -23,7 +23,7 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
if (!this.key || this.key === 'default_key') {
|
if (!this.key) {
|
||||||
this.loginBack = '';
|
this.loginBack = '';
|
||||||
this.dialogType = 'error';
|
this.dialogType = 'error';
|
||||||
return this.dialogText = 'key不存在';
|
return this.dialogText = 'key不存在';
|
||||||
|
|
|
@ -253,6 +253,7 @@ export default {
|
||||||
async getData(type?: string) {
|
async getData(type?: string) {
|
||||||
this.overlayLoad = false;
|
this.overlayLoad = false;
|
||||||
this.loadingStatus = true;
|
this.loadingStatus = true;
|
||||||
|
if (!this.groupId) return showToast('组合商品ID不能为空');
|
||||||
this.pageData = new Map([['31', []], ['32', []], ['33', []], ['2', []], ['1', []]]);
|
this.pageData = new Map([['31', []], ['32', []], ['33', []], ['2', []], ['1', []]]);
|
||||||
const res = await QUERY({
|
const res = await QUERY({
|
||||||
key: this.key,
|
key: this.key,
|
||||||
|
|
|
@ -112,7 +112,7 @@ export default {
|
||||||
// modules: [ Pagination, Autoplay ],
|
// modules: [ Pagination, Autoplay ],
|
||||||
initialSlide: 1,
|
initialSlide: 1,
|
||||||
key: this.$route.query.key || localStorage.getItem('key'),
|
key: this.$route.query.key || localStorage.getItem('key'),
|
||||||
jumpPath: sessionStorage.getItem('jumpPath'),
|
// jumpPath: sessionStorage.getItem('jumpPath'),
|
||||||
loadingStatus: false,
|
loadingStatus: false,
|
||||||
pageData: null,
|
pageData: null,
|
||||||
cssData: {
|
cssData: {
|
||||||
|
|
Loading…
Reference in New Issue