Commit 58e4e95b authored by 郝聪敏's avatar 郝聪敏

feature: 优化

parent ba42d8e6
...@@ -47,147 +47,155 @@ export default { ...@@ -47,147 +47,155 @@ export default {
// todo: 对外接口需提供x-auth-token // todo: 对外接口需提供x-auth-token
// 购物车-添加商品 // 购物车-添加商品
addShopCart(params) { addShopCart(params) {
return http.post(`${config.kdspHost}/api/kdsp/shop-cart/add-update`, params); return http.post(`${config.kdspHost}/api/kdsp/shop-cart/add-update`, params, {
hideToken: true,
headers: {
'x-auth-token': '7386386a-3a78-41f9-8584-14933823bf20'
}
});
}, },
// 商品组或专题查询 // 商品组或专题查询
getGoods(params) { getGoods(params) {
// return http.post(`${config.kdspHost}/api/kdsp/activity/activity-goods-special/skus`, params); return http.post(`${config.kdspHost}/api/kdsp/activity/activity-goods-special/skus`, params);
return { // return {
skus: [ // skus: [
{ // {
skuNo: '100014565800', // skuNo: '100014565800',
skuName: '【自营】【自营】小米手机 陶瓷黑 8GB+128GB 官方标配', // skuName: '【自营】【自营】小米手机 陶瓷黑 8GB+128GB 官方标配',
skuUrl: 'https://img14.360buyimg.com/n0/jfs/t1/141986/32/5318/98164/5f3236baE713fd239/5f2746db41f3e9c0.jpg', // skuUrl: 'https://img14.360buyimg.com/n0/jfs/t1/141986/32/5318/98164/5f3236baE713fd239/5f2746db41f3e9c0.jpg',
salePrice: 2.85, // salePrice: 2.85,
marketPrice: 293 // marketPrice: 293
}, // },
{ // {
skuNo: '100014565820', // skuNo: '100014565820',
skuName: '【自营】[自营][自营]0', // skuName: '【自营】[自营][自营]0',
skuUrl: 'https://img14.360buyimg.com/n0/jfs/t1/141986/32/5318/98164/5f3236baE713fd239/5f2746db41f3e9c0.jpg', // skuUrl: 'https://img14.360buyimg.com/n0/jfs/t1/141986/32/5318/98164/5f3236baE713fd239/5f2746db41f3e9c0.jpg',
salePrice: 264, // salePrice: 264,
marketPrice: 300 // marketPrice: 300
}, // },
{ // {
skuNo: '100014565820', // skuNo: '100014565820',
skuName: '【自营】[自营][自营]0', // skuName: '【自营】[自营][自营]0',
skuUrl: 'https://img14.360buyimg.com/n0/jfs/t1/141986/32/5318/98164/5f3236baE713fd239/5f2746db41f3e9c0.jpg', // skuUrl: 'https://img14.360buyimg.com/n0/jfs/t1/141986/32/5318/98164/5f3236baE713fd239/5f2746db41f3e9c0.jpg',
salePrice: 264, // salePrice: 264,
marketPrice: 300 // marketPrice: 300
}, // },
{ // {
skuNo: '100014565800', // skuNo: '100014565800',
skuName: '【自营】【自营】小米手机 陶瓷黑 8GB+128GB 官方标配', // skuName: '【自营】【自营】小米手机 陶瓷黑 8GB+128GB 官方标配',
skuUrl: 'https://img14.360buyimg.com/n0/jfs/t1/141986/32/5318/98164/5f3236baE713fd239/5f2746db41f3e9c0.jpg', // skuUrl: 'https://img14.360buyimg.com/n0/jfs/t1/141986/32/5318/98164/5f3236baE713fd239/5f2746db41f3e9c0.jpg',
salePrice: 2.85, // salePrice: 2.85,
marketPrice: 293 // marketPrice: 293
}, // },
{ // {
skuNo: '100014565820', // skuNo: '100014565820',
skuName: '【自营】[自营][自营]0', // skuName: '【自营】[自营][自营]0',
skuUrl: 'https://img14.360buyimg.com/n0/jfs/t1/141986/32/5318/98164/5f3236baE713fd239/5f2746db41f3e9c0.jpg', // skuUrl: 'https://img14.360buyimg.com/n0/jfs/t1/141986/32/5318/98164/5f3236baE713fd239/5f2746db41f3e9c0.jpg',
salePrice: 264, // salePrice: 264,
marketPrice: 300 // marketPrice: 300
}, // },
{ // {
skuNo: '100014565820', // skuNo: '100014565820',
skuName: '【自营】[自营][自营]0', // skuName: '【自营】[自营][自营]0',
skuUrl: 'https://img14.360buyimg.com/n0/jfs/t1/141986/32/5318/98164/5f3236baE713fd239/5f2746db41f3e9c0.jpg', // skuUrl: 'https://img14.360buyimg.com/n0/jfs/t1/141986/32/5318/98164/5f3236baE713fd239/5f2746db41f3e9c0.jpg',
salePrice: 264, // salePrice: 264,
marketPrice: 300 // marketPrice: 300
} // }
] // ]
}; // };
}, },
// 根据id查询优惠券列表 // 根据id查询优惠券列表
getCoupons(params) { getCoupons(params) {
// return http.post(`${config.kdspHost}/api/kdsp/coupon/list`, params, { return http.get(`${config.kdspHost}/api/kdsp/coupon/list`, {
// hideToken: true, params,
// headers: { hideToken: true,
// 'x-auth-token': '97466ed6-ec03-452e-be8f-763a8ffafefe' headers: {
// } 'x-auth-token': '7386386a-3a78-41f9-8584-14933823bf20'
// }); }
return { });
coupons: [ // return {
{ // coupons: [
id: 1, // {
pickupId: 1, // id: 1,
name: '3C数码会场', // pickupId: 1,
startDate: '2021-02-22', // name: '3C数码会场',
endDate: '2021-02-22', // startDate: '2021-02-22',
faceValue: 100, // endDate: '2021-02-22',
limitAmount: 300, // faceValue: 100,
limitDesc: '满300减100', // limitAmount: 300,
couponCategory: 1, // limitDesc: '满300减100',
iconUrl: 'in esse', // couponCategory: 1,
description: 'officia do', // iconUrl: 'in esse',
status: 19667180, // description: 'officia do',
navUrl: 'exercitation est', // status: 19667180,
pickupAble: false, // navUrl: 'exercitation est',
publishCountFinished: false // pickupAble: false,
}, // publishCountFinished: false
{ // },
id: 2, // {
pickupId: 1, // id: 2,
name: '3C数码会场', // pickupId: 1,
startDate: '2021-02-22', // name: '3C数码会场',
endDate: '2021-02-22', // startDate: '2021-02-22',
faceValue: 100, // endDate: '2021-02-22',
limitAmount: 300, // faceValue: 100,
limitDesc: '满300减100', // limitAmount: 300,
couponCategory: 1, // limitDesc: '满300减100',
iconUrl: 'oc', // couponCategory: 1,
description: 'minim dolore tempor', // iconUrl: 'oc',
status: 63205995, // description: 'minim dolore tempor',
navUrl: 'cupidat', // status: 63205995,
pickupAble: true, // navUrl: 'cupidat',
publishCountFinished: false // pickupAble: true,
}, // publishCountFinished: false
{ // },
id: 3, // {
pickupId: 1, // id: 3,
name: '3C数码会场', // pickupId: 1,
startDate: '2021-02-22', // name: '3C数码会场',
endDate: '2021-02-22', // startDate: '2021-02-22',
faceValue: 100, // endDate: '2021-02-22',
limitAmount: 300, // faceValue: 100,
limitDesc: '满300减100', // limitAmount: 300,
couponCategory: 1, // limitDesc: '满300减100',
iconUrl: 'eu fugiat commodo voluptate exercitation', // couponCategory: 1,
description: 'nisi', // iconUrl: 'eu fugiat commodo voluptate exercitation',
status: 43999314, // description: 'nisi',
navUrl: 'commodo in reprehenderit', // status: 43999314,
pickupAble: false, // navUrl: 'commodo in reprehenderit',
publishCountFinished: true // pickupAble: false,
}, // publishCountFinished: true
{ // },
id: 4, // {
pickupId: 1, // id: 4,
name: '3C数码会场', // pickupId: 1,
startDate: '2021-02-22', // name: '3C数码会场',
endDate: '2021-02-22', // startDate: '2021-02-22',
faceValue: 100, // endDate: '2021-02-22',
limitAmount: 300, // faceValue: 100,
limitDesc: '满300减100', // limitAmount: 300,
couponCategory: 1, // limitDesc: '满300减100',
iconUrl: 'eu fugiat commodo voluptate exercitation', // couponCategory: 1,
description: 'nisi', // iconUrl: 'eu fugiat commodo voluptate exercitation',
status: 43999314, // description: 'nisi',
navUrl: 'commodo in reprehenderit', // status: 43999314,
pickupAble: false, // navUrl: 'commodo in reprehenderit',
publishCountFinished: true // pickupAble: false,
} // publishCountFinished: true
] // }
}; // ]
// };
}, },
// 领取优惠券 // 领取优惠券
pickupCoupon(params) { pickupCoupon(params) {
return http.post(`${config.kdspHost}/api/kdsp/coupon/pickup`, params, { return http.post(`${config.kdspHost}/api/kdsp/coupon/pickup`, params, {
hideToken: true,
// todo: header里二者参数需特殊处理 // todo: header里二者参数需特殊处理
headers: { headers: {
'x-user-terminal': 'H5', 'x-user-terminal': 'H5',
'vccChannel': '', 'vccChannel': '',
} 'x-auth-token': ''
},
}); });
}, },
}; };
\ No newline at end of file
...@@ -9,5 +9,6 @@ export default { ...@@ -9,5 +9,6 @@ export default {
shenceUrl: `${protocol}//bn.xyqb.com/sa?project=default`, shenceUrl: `${protocol}//bn.xyqb.com/sa?project=default`,
opapiHost: `https://opapi-vcc2.liangkebang.net`, opapiHost: `https://opapi-vcc2.liangkebang.net`,
qiniuUpHost: `${protocol}//up-z0.qiniup.com`, qiniuUpHost: `${protocol}//up-z0.qiniup.com`,
kdspHost: 'https://kdsp-api-vcc2.liangkebang.net', // kdspHost: 'https://kdsp-api-vcc2.liangkebang.net',
kdspHost: 'https://talos-vcc2.liangkebang.net'
}; };
<template> <template>
<div class="coupon" v-if="column === 1"> <div class="coupon" v-if="column === 1">
<div class="coupon-item_one" :style="style" :key="coupon.id" v-for="coupon in couponList"> <div class="coupon-item_one" :style="style" :key="index" v-for="(coupon, index) in couponList">
<div class="Gi_one-left"> <div class="Gi_one-left">
<p>¥<span>{{ coupon.faceValue || '-' }}</span></p> <p>¥<span>{{ coupon.faceValue || '-' }}</span></p>
<p>{{coupon.limitDesc}}</p> <p>{{coupon.limitDesc}}</p>
</div> </div>
<div class="Gi_one-middle"> <div class="Gi_one-middle">
<p>{{ coupon.name }}</p> <p>{{ coupon.name }}</p>
<p>{{`${coupon.startDate} - ${coupon.endDate}`}}</p> <p>{{ coupon.couponValidTime }}</p>
</div> </div>
<cr-button class="Gi_one-right" type="primary" @click="getCoupon(coupon)">{{btnText(coupon.pickupAble)}}</cr-button> <cr-button class="Gi_one-right" type="primary" @click="pickupCoupon(coupon)">{{btnText(coupon.pickupAble)}}</cr-button>
<div class="coupon-item-mask" v-if="!coupon.pickupAble && coupon.publishCountFinished"> <div class="coupon-item-mask" v-if="!coupon.pickupAble && coupon.publishCountFinished">
<p>已抢空</p> <p>已抢空</p>
</div> </div>
</div> </div>
</div> </div>
<div v-else :class="['coupon', {'coupon_two': column === 2, 'coupon_multiple': column === 3}]"> <div v-else :class="['coupon', {'coupon_two': column === 2, 'coupon_multiple': column === 3}]">
<div class="coupon-item" :style="style" :key="coupon.id" v-for="coupon in couponList"> <div class="coupon-item" :style="style" :key="index" v-for="(coupon, index) in couponList">
<p class="coupon-item-title">{{ coupon.name }}</p> <p class="coupon-item-title">{{ coupon.name }}</p>
<p class="coupon-item-amount">¥<span>{{ coupon.faceValue || '-' }}</span></p> <p class="coupon-item-amount">¥<span>{{ coupon.faceValue || '-' }}</span></p>
<p class="coupon-item-amount">{{coupon.limitDesc}}</p> <p class="coupon-item-amount">{{coupon.limitDesc}}</p>
<cr-button shape="circle" type="primary" @click="getCoupon(coupon)"> <cr-button shape="circle" type="primary" @click="pickupCoupon(coupon)">
{{btnText(coupon.pickupAble)}} {{btnText(coupon.pickupAble)}}
</cr-button> </cr-button>
<div class="coupon-item-mask" v-if="!coupon.pickupAble && coupon.publishCountFinished"> <div class="coupon-item-mask" v-if="!coupon.pickupAble && coupon.publishCountFinished">
...@@ -67,22 +67,25 @@ ...@@ -67,22 +67,25 @@
watch: { watch: {
couponsList: { couponsList: {
handler: async function (newVal) { handler: async function (newVal) {
const { coupons } = await operationApi.getCoupons({ couponIds: newVal.join(',') }); if(newVal) this.getCoupons(newVal);
if(coupons && coupons.length) this.list = coupons;
// console.log('coupons', this.list);
}, },
immediate: true immediate: true
} }
}, },
methods: { methods: {
async getCoupon(coupon) { async pickupCoupon(coupon) {
if (!coupon.pickupAble) { if (!coupon.pickupAble) {
await operationApi.pickupCoupon({ couponId: coupon.couponId }); await operationApi.pickupCoupon({ couponId: coupon.id });
this.$toast.success('领取成功'); this.$toast.success('领取成功');
await this.getCoupons([coupon.id]);
} else { } else {
window.location.href = coupon.navUrl; window.location.href = coupon.navUrl;
} }
}, },
async getCoupons(ids) {
const { coupons } = await operationApi.getCoupons({ couponIds: ids.join(',') });
if(coupons && coupons.length) this.list = coupons;
},
btnText(pickupAble) { btnText(pickupAble) {
return pickupAble ? '去使用' : '立即领取'; return pickupAble ? '去使用' : '立即领取';
} }
......
...@@ -108,9 +108,9 @@ ...@@ -108,9 +108,9 @@
} }
}, },
async addShopCart(goods) { async addShopCart(goods) {
const { skuId, skuNum, skuSource } = goods; const { skuNo, skuSource } = goods;
const params = { skuId, skuNum, skuSource, type: 1 } const params = [{ skuId: skuNo, skuNum: 1, skuSource, type: 1 }];
await operationApi.addShopCart(params); await operationApi.addShopCart({ shopCartBaseList: params });
this.$toast.success('添加成功'); this.$toast.success('添加成功');
} }
} }
......
...@@ -8,13 +8,13 @@ ...@@ -8,13 +8,13 @@
</div> </div>
</template> </template>
<script> <script>
import Goods from '../Goods/index.vue'; import CsGoods from '../Goods/index.vue';
import Coupon from '../Coupon/index.vue'; import CsCoupon from '../Coupon/index.vue';
export default { export default {
name: 'goods-tabs', name: 'goods-tabs',
components: { components: {
Goods, CsGoods,
Coupon CsCoupon
}, },
props: { props: {
list: { list: {
......
// export const basicComponents = require('@qg/cherry-ui/md/index.json'); const crComponents = require('@qg/cherry-ui/md/index.json');
export const kaLoginForm = require('@qg/citrus-ui/md/index.json'); export const businessComponents = require('@qg/citrus-ui/md/index.json');
export const basicComponents = [ export const basicComponents = [
{ {
...@@ -23,638 +23,639 @@ export const basicComponents = [ ...@@ -23,638 +23,639 @@ export const basicComponents = [
}, },
commonStyle: {} commonStyle: {}
}, },
{ ...crComponents
eleName: 'cr-button',
title: 'Button 按钮',
config: [
{
key: 'type',
name: '类型',
desc: '类型,可选值为',
options: [
'default',
'primary',
'info',
'danger',
'waring',
'success'
],
type: 'select'
},
{
key: 'size',
name: '尺寸',
desc: '尺寸,可选值为',
options: [
'normal',
'large',
'small',
'mini'
],
type: 'select'
},
{
key: 'color',
name: '颜色',
desc: '按钮颜色,支持传入',
type: 'ColorSelector'
},
{
key: 'icon',
name: '图标',
desc: '左侧',
type: 'text'
},
{
key: 'block',
name: '块级元素',
desc: '是否为块级元素',
type: 'checkbox'
},
{
key: 'shape',
name: '形状',
desc: '按钮形状,可选值为',
options: [
'square',
'circle'
],
type: 'select'
},
{
key: 'disabled',
name: '禁用',
desc: '是否禁用按钮',
type: 'checkbox'
},
{
key: 'plain',
name: '朴素按钮',
desc: '朴素按钮',
type: 'checkbox'
},
{
key: 'hairline',
name: '细边框',
desc: '细边框',
type: 'checkbox'
},
{
key: 'loading',
name: '加载中',
desc: '是否显示为加载状态',
type: 'checkbox'
},
{
key: 'loadingText',
name: '加载文字',
desc: '加载状态提示文字',
type: 'text'
},
{
key: 'loadingType',
name: '加载图标类型',
desc: '',
options: [
'circular',
'spinner'
],
type: 'select'
},
{
key: 'loadingSize',
name: '加载图标大小',
desc: '加载图标大小',
type: 'text'
}
],
value: {
type: 'default',
size: 'normal',
color: '',
icon: '',
block: false,
shape: 'square',
disabled: false,
plain: false,
hairline: false,
loading: false,
loadingText: '',
loadingType: 'circular',
loadingSize: '20px'
},
commonStyle: {}
},
{
eleName: 'cr-image',
title: '图片',
config: [
{
key: 'width',
name: '宽度',
type: 'text'
},
{
key: 'height',
name: '高度',
type: 'text'
},
{
key: 'src',
name: '图片',
type: 'Upload'
},
],
value: {
width: '5.067rem',
height: '3.733rem',
src: 'https://appsync.lkbang.net/Fs0qmUsMry39AjHDf_W-qgn8XEy6',
fit: 'contain',
},
commonStyle: {}
},
{
eleName: 'cr-nav-bar',
title: 'NavBar 导航栏',
config: [
{
key: 'title',
name: '标题',
desc: '标题',
propType: 'string',
options: [],
type: 'text'
},
{
key: 'leftText',
name: '左侧文案',
desc: '左侧文案',
propType: 'string',
options: [],
type: 'text'
},
{
key: 'rightText',
name: '右侧文案',
desc: '右侧文案',
default: '',
options: [
'info',
'danger',
'primary',
'warning'
],
type: 'text'
},
{
key: 'leftArrow',
name: '左侧箭头',
desc: '是否显示左侧箭头',
propType: 'boolean',
options: [],
type: 'checkbox'
},
{
key: 'border',
name: '边框',
desc: '是否显示下边框',
propType: 'boolean',
options: [],
type: 'checkbox'
},
{
key: 'fixed',
name: '固定导航栏',
desc: '是否固定导航栏',
propType: 'boolean',
options: [],
type: 'checkbox'
},
{
key: 'zIndex',
name: 'z-index',
desc: '元素z-index',
propType: [
'number',
'string'
],
options: [],
type: 'text'
}
],
value: {
title: '',
leftText: '返回',
rightText: '',
leftArrow: true,
border: true,
fixed: true,
zIndex: '9999'
},
commonStyle: {}
}
];
export const businessComponents = [
kaLoginForm,
// { // {
// eleName: 'cs-ka-login-form', // eleName: 'cr-button',
// title: 'KA登陆表单', // title: 'Button 按钮',
// h: 224,
// config: [ // config: [
// { // {
// key: 'btnTxt', // key: 'type',
// name: '按钮文案', // name: '类型',
// type: 'text' // desc: '类型,可选值为',
// options: [
// 'default',
// 'primary',
// 'info',
// 'danger',
// 'waring',
// 'success'
// ],
// type: 'select'
// },
// {
// key: 'size',
// name: '尺寸',
// desc: '尺寸,可选值为',
// options: [
// 'normal',
// 'large',
// 'small',
// 'mini'
// ],
// type: 'select'
// }, // },
// { // {
// key: 'btnColor', // key: 'color',
// name: '按钮颜色', // name: '颜色',
// desc: '按钮颜色,支持传入',
// type: 'ColorSelector' // type: 'ColorSelector'
// }, // },
// { // {
// key: 'btnImage', // key: 'icon',
// name: '按钮图片', // name: '图标',
// type: 'Upload' // desc: '左侧',
// type: 'text'
// }, // },
// { // {
// key: 'vcBgColor', // key: 'block',
// name: '验证码背景色(可点击态)', // name: '块级元素',
// type: 'ColorSelector' // desc: '是否为块级元素',
// type: 'checkbox'
// },
// {
// key: 'shape',
// name: '形状',
// desc: '按钮形状,可选值为',
// options: [
// 'square',
// 'circle'
// ],
// type: 'select'
// },
// {
// key: 'disabled',
// name: '禁用',
// desc: '是否禁用按钮',
// type: 'checkbox'
// },
// {
// key: 'plain',
// name: '朴素按钮',
// desc: '朴素按钮',
// type: 'checkbox'
// },
// {
// key: 'hairline',
// name: '细边框',
// desc: '细边框',
// type: 'checkbox'
// },
// {
// key: 'loading',
// name: '加载中',
// desc: '是否显示为加载状态',
// type: 'checkbox'
// }, // },
// { // {
// key: 'registerFrom', // key: 'loadingText',
// name: '渠道号', // name: '加载文字',
// desc: '加载状态提示文字',
// type: 'text' // type: 'text'
// }, // },
// {
// key: 'loadingType',
// name: '加载图标类型',
// desc: '',
// options: [
// 'circular',
// 'spinner'
// ],
// type: 'select'
// },
// {
// key: 'loadingSize',
// name: '加载图标大小',
// desc: '加载图标大小',
// type: 'text'
// }
// ], // ],
// value: { // value: {
// btnTxt: '', // type: 'default',
// btnColor: '#ee0a24', // size: 'normal',
// btnImage: 'http://activitystatic.q-gp.com/landing-submit.png', // color: '',
// registerFrom: '', // icon: '',
// vcBgColor: '#97d5ff' // block: false,
// shape: 'square',
// disabled: false,
// plain: false,
// hairline: false,
// loading: false,
// loadingText: '',
// loadingType: 'circular',
// loadingSize: '20px'
// }, // },
// commonStyle: {} // commonStyle: {}
// }, // },
{ // {
eleName: 'download-guide', // eleName: 'cr-image',
title: '下载引导', // title: '图片',
h: 40, // config: [
config: [ // {
{ // key: 'width',
key: 'href', // name: '宽度',
name: '跳转链接', // type: 'text'
type: 'text' // },
}, // {
{ // key: 'height',
key: 'leftImg', // name: '高度',
name: 'logo', // type: 'text'
type: 'Upload' // },
} // {
], // key: 'src',
value: { // name: '图片',
href: 'https://s.xyqb.com/4', // type: 'Upload'
leftImg: 'http://activitystatic.q-gp.com/xyqb%402x.png' // },
}, // ],
commonStyle: {} // value: {
}, // width: '5.067rem',
{ // height: '3.733rem',
eleName: 'goods-tabs', // src: 'https://appsync.lkbang.net/Fs0qmUsMry39AjHDf_W-qgn8XEy6',
title: '商品导航', // fit: 'contain',
config: [ // },
{ // commonStyle: {}
title: '标签录入', // },
children: [ // {
{ // eleName: 'cr-nav-bar',
key: 'list', // title: 'NavBar 导航栏',
name: '添加菜单', // config: [
type: 'FormList' // {
formControl: [ // key: 'title',
{ // name: '标题',
key: 'tabTitle', // desc: '标题',
name: '名称', // propType: 'string',
type: 'text' // options: [],
}, // type: 'text'
{ // },
key: 'componentId', // {
name: '组件', // key: 'leftText',
type: 'ComponentSelect', // componentSelect // name: '左侧文案',
} // desc: '左侧文案',
] // propType: 'string',
} // options: [],
] // type: 'text'
}, // },
{ // {
title: '标签样式', // key: 'rightText',
children: [ // name: '右侧文案',
{ // desc: '右侧文案',
key: 'activeColor', // default: '',
name: '选中态文字颜色', // options: [
type: 'ColorSelector' // 'info',
}, // 'danger',
{ // 'primary',
key: 'inactiveColor', // 'warning'
name: '默认态文字颜色', // ],
type: 'ColorSelector' // type: 'text'
}, // },
{ // {
key: 'underlineColor', // key: 'leftArrow',
name: '下划线颜色', // name: '左侧箭头',
type: 'ColorSelector' // desc: '是否显示左侧箭头',
}, // propType: 'boolean',
] // options: [],
} // type: 'checkbox'
], // },
value: { // {
list: [{ // key: 'border',
tabTitle: 'tab1', // name: '边框',
componentId: '1' // desc: '是否显示下边框',
}, { // propType: 'boolean',
tabTitle: 'tab2', // options: [],
componentId: '2' // type: 'checkbox'
}], // },
activeColor: '#323233', // {
inactiveColor: '#646566', // key: 'fixed',
underlineColor: '#1989fa', // name: '固定导航栏',
}, // desc: '是否固定导航栏',
commonStyle: {} // propType: 'boolean',
}, // options: [],
{ // type: 'checkbox'
eleName: 'Goods', // },
title: '商品', // {
config: [ // key: 'zIndex',
{ // name: 'z-index',
title: '商品录入', // desc: '元素z-index',
children: [{ // propType: [
key: 'column', // 'number',
name: '商品列数', // 'string'
type: 'ColumnSelector' // ],
}, // options: [],
{ // type: 'text'
key: 'goods', // }
name: '选择商品', // ],
type: 'GoodsTableModal' // value: {
formControl: [ // title: '',
{ // leftText: '返回',
key: 'goodsNumber', // rightText: '',
name: '商品数量', // leftArrow: true,
type: 'number' // border: true,
} // fixed: true,
] // zIndex: '9999'
}] // },
}, // commonStyle: {}
{ // }
title: '专题推荐', ];
children: [
{ // export const businessComponents = [
key: 'showSpecial', // kaLoginForm,
name: '显示专题', // // {
type: 'checkbox' // // eleName: 'cs-ka-login-form',
}, // // title: 'KA登陆表单',
{ // // h: 224,
key: 'specialUrl', // // config: [
name: '专题图片', // // {
type: 'Upload' // // key: 'btnTxt',
}, // // name: '按钮文案',
{ // // type: 'text'
key: 'specialLink', // // },
name: '专题链接', // // {
type: 'text' // // key: 'btnColor',
}, // // name: '按钮颜色',
] // // type: 'ColorSelector'
} // // },
], // // {
value: { // // key: 'btnImage',
goods: { // // name: '按钮图片',
type: 'goodsGroup', // // type: 'Upload'
ids: [] // // },
}, // // {
goodsNumber: 3, // // key: 'vcBgColor',
column: 2, // // name: '验证码背景色(可点击态)',
showSpecial: true, // // type: 'ColorSelector'
specialUrl: '', // // },
specialLink: '' // // {
}, // // key: 'registerFrom',
commonStyle: {} // // name: '渠道号',
}, // // type: 'text'
{ // // },
eleName: 'Coupon', // // ],
title: '优惠券', // // value: {
config: [ // // btnTxt: '',
{ // // btnColor: '#ee0a24',
title: '优惠券录入', // // btnImage: 'http://activitystatic.q-gp.com/landing-submit.png',
children: [ // // registerFrom: '',
{ // // vcBgColor: '#97d5ff'
key: 'column', // // },
name: '优惠券列数', // // commonStyle: {}
type: 'ColumnSelector' // // },
}, // // {
{ // // eleName: 'download-guide',
key: 'couponsList', // // title: '下载引导',
name: '选择优惠券', // // h: 40,
type: 'CouponTableModal' // // config: [
formControl: [ // // {
{ // // key: 'href',
key: 'couponsNumber', // // name: '跳转链接',
name: '优惠券数量', // // type: 'text'
type: 'number' // // },
} // // {
] // // key: 'leftImg',
}, // // name: 'logo',
], // // type: 'Upload'
}, // // }
{ // // ],
title: '优惠券样式', // // value: {
children: [ // // href: 'https://s.xyqb.com/4',
{ // // leftImg: 'http://activitystatic.q-gp.com/xyqb%402x.png'
key: 'bgImage', // // },
name: '优惠券背景图片', // // commonStyle: {}
type: 'Upload' // // },
}, // // {
{ // // eleName: 'goods-tabs',
key: 'bgColor', // // title: '商品导航',
name: '优惠券背景颜色', // // config: [
type: 'ColorSelector' // // {
}, // // title: '标签录入',
] // // children: [
} // // {
], // // key: 'list',
value: { // // name: '添加菜单',
couponsList: [], // // type: 'FormList',
couponsNumber: 3, // // formControl: [
column: 3, // // {
bgColor: '', // // key: 'tabTitle',
bgImage: '', // // name: '名称',
}, // // type: 'text'
commonStyle: {} // // },
}, // // {
{ // // key: 'componentId',
eleName: 'Advertisement', // // name: '组件',
title: '广告', // // type: 'ComponentSelect', // componentSelect
config: [ // // }
{ // // ]
key: 'column', // // }
name: '广告列数', // // ]
type: 'ColumnSelector' // // },
}, // // {
{ // // title: '标签样式',
key: 'list', // // children: [
name: '添加广告', // // {
type: 'FormList' // // key: 'activeColor',
formControl: [ // // name: '选中态文字颜色',
{ // // type: 'ColorSelector'
key: 'img', // // },
name: '图片', // // {
type: 'Upload' // // key: 'inactiveColor',
}, // // name: '默认态文字颜色',
{ // // type: 'ColorSelector'
key: 'link', // // },
name: '链接', // // {
type: 'text', // componentSelect // // key: 'underlineColor',
} // // name: '下划线颜色',
] // // type: 'ColorSelector'
} // // },
], // // ]
value: { // // }
list: [{ // // ],
img: 'http://activitystatic.q-gp.com/landing-bg.png', // // value: {
link: 'http://activitystatic.q-gp.com' // // list: [{
}, { // // tabTitle: 'tab1',
img: 'http://activitystatic.q-gp.com/landing-bg.png', // // componentId: '1'
link: 'http://activitystatic.q-gp.com' // // }, {
}], // // tabTitle: 'tab2',
column: 2 // // componentId: '2'
} // // }],
}, // // activeColor: '#323233',
{ // // inactiveColor: '#646566',
eleName: 'Placeholder', // // underlineColor: '#1989fa',
title: '楼层间隔', // // },
config: [ // // commonStyle: {}
{ // // },
key: 'height', // // {
name: '间隔高度', // // eleName: 'Goods',
type: 'Slider' // // title: '商品',
}, // // config: [
], // // {
value: { // // title: '商品录入',
height: 10 // // children: [{
} // // key: 'column',
}, // // name: '商品列数',
{ // // type: 'ColumnSelector'
eleName: 'GuideCube', // // },
title: '导购魔方', // // {
config: [ // // key: 'goods',
{ // // name: '选择商品',
key: 'slidesPerColumn', // // type: 'GoodsTableModal',
name: '行数', // // formControl: [
type: 'InputNumber' // // {
}, // // key: 'goodsNumber',
{ // // name: '商品数量',
key: 'autoplay', // // type: 'number'
name: '自动播放', // // }
type: 'checkbox' // // ]
}, // // }]
{ // // },
key: 'animation', // // {
name: '切换动画', // // title: '专题推荐',
type: 'checkbox' // // children: [
}, // // {
{ // // key: 'showSpecial',
key: 'list', // // name: '显示专题',
name: '添加导购', // // type: 'checkbox'
type: 'FormList' // // },
formControl: [ // // {
{ // // key: 'specialUrl',
key: 'img', // // name: '专题图片',
name: '图片', // // type: 'Upload'
type: 'Upload' // // },
}, // // {
{ // // key: 'specialLink',
key: 'link', // // name: '专题链接',
name: '链接', // // type: 'text'
type: 'text', // componentSelect // // },
} // // ]
] // // }
} // // ],
], // // value: {
value: { // // goods: {
list: [{ // // type: 'goodsGroup',
img: 'http://activitystatic.q-gp.com/landing-bg.png', // // ids: []
link: 'http://activitystatic.q-gp.com' // // },
}, { // // goodsNumber: 3,
img: 'http://activitystatic.q-gp.com/landing-bg.png', // // column: 2,
link: 'http://activitystatic.q-gp.com' // // showSpecial: true,
}, { // // specialUrl: '',
img: 'http://activitystatic.q-gp.com/landing-bg.png', // // specialLink: ''
link: 'http://activitystatic.q-gp.com' // // },
}, { // // commonStyle: {}
img: 'http://activitystatic.q-gp.com/landing-bg.png', // // },
link: 'http://activitystatic.q-gp.com' // // {
}, { // // eleName: 'Coupon',
img: 'http://activitystatic.q-gp.com/landing-bg.png', // // title: '优惠券',
link: 'http://activitystatic.q-gp.com' // // config: [
}, { // // {
img: 'http://activitystatic.q-gp.com/landing-bg.png', // // title: '优惠券录入',
link: 'http://activitystatic.q-gp.com' // // children: [
}, { // // {
img: 'http://activitystatic.q-gp.com/landing-bg.png', // // key: 'column',
link: 'http://activitystatic.q-gp.com' // // name: '优惠券列数',
}, { // // type: 'ColumnSelector'
img: 'http://activitystatic.q-gp.com/landing-bg.png', // // },
link: 'http://activitystatic.q-gp.com' // // {
}, { // // key: 'couponsList',
img: 'http://activitystatic.q-gp.com/landing-bg.png', // // name: '选择优惠券',
link: 'http://activitystatic.q-gp.com' // // type: 'CouponTableModal',
}, { // // formControl: [
img: 'http://activitystatic.q-gp.com/landing-bg.png', // // {
link: 'http://activitystatic.q-gp.com' // // key: 'couponsNumber',
}, { // // name: '优惠券数量',
img: 'http://activitystatic.q-gp.com/landing-bg.png', // // type: 'number'
link: 'http://activitystatic.q-gp.com' // // }
}, { // // ]
img: 'http://activitystatic.q-gp.com/landing-bg.png', // // },
link: 'http://activitystatic.q-gp.com' // // ],
}], // // },
slidesPerColumn: 1, // // {
autoplay: false, // // title: '优惠券样式',
animation: false // // children: [
} // // {
}, // // key: 'bgImage',
{ // // name: '优惠券背景图片',
eleName: 'CustomMarquee', // // type: 'Upload'
title: '跑马灯', // // },
config: [ // // {
{ // // key: 'bgColor',
key: 'fontColor', // // name: '优惠券背景颜色',
name: '字体颜色', // // type: 'ColorSelector'
type: 'ColorSelector', // // },
}, // // ]
{ // // }
key: 'list', // // ],
name: '添加数据', // // value: {
type: 'FormList' // // couponsList: [],
formControl: [ // // couponsNumber: 3,
{ // // column: 3,
key: 'text', // // bgColor: '',
name: '文案', // // bgImage: '',
type: 'text' // // },
}, // // commonStyle: {}
{ // // },
key: 'link', // // {
name: '链接', // // eleName: 'Advertisement',
type: 'text' // // title: '广告',
}, // // config: [
] // // {
} // // key: 'column',
], // // name: '广告列数',
value: { // // type: 'ColumnSelector'
fontColor: '#666666', // // },
list: [{ // // {
text: '请输入文案' // // key: 'list',
}, { // // name: '添加广告',
text: '请输入文案' // // type: 'FormList',
}] // // formControl: [
} // // {
}, // // key: 'img',
]; // // name: '图片',
\ No newline at end of file // // type: 'Upload'
// // },
// // {
// // key: 'link',
// // name: '链接',
// // type: 'text', // componentSelect
// // }
// // ]
// // }
// // ],
// // value: {
// // list: [{
// // img: 'http://activitystatic.q-gp.com/landing-bg.png',
// // link: 'http://activitystatic.q-gp.com'
// // }, {
// // img: 'http://activitystatic.q-gp.com/landing-bg.png',
// // link: 'http://activitystatic.q-gp.com'
// // }],
// // column: 2
// // }
// // },
// // {
// // eleName: 'Placeholder',
// // title: '楼层间隔',
// // config: [
// // {
// // key: 'height',
// // name: '间隔高度',
// // type: 'Slider'
// // },
// // ],
// // value: {
// // height: 10
// // }
// // },
// // {
// // eleName: 'GuideCube',
// // title: '导购魔方',
// // config: [
// // {
// // key: 'slidesPerColumn',
// // name: '行数',
// // type: 'InputNumber'
// // },
// // {
// // key: 'autoplay',
// // name: '自动播放',
// // type: 'checkbox'
// // },
// // {
// // key: 'animation',
// // name: '切换动画',
// // type: 'checkbox'
// // },
// // {
// // key: 'list',
// // name: '添加导购',
// // type: 'FormList',
// // formControl: [
// // {
// // key: 'img',
// // name: '图片',
// // type: 'Upload'
// // },
// // {
// // key: 'link',
// // name: '链接',
// // type: 'text', // componentSelect
// // }
// // ]
// // }
// // ],
// // value: {
// // list: [{
// // img: 'http://activitystatic.q-gp.com/landing-bg.png',
// // link: 'http://activitystatic.q-gp.com'
// // }, {
// // img: 'http://activitystatic.q-gp.com/landing-bg.png',
// // link: 'http://activitystatic.q-gp.com'
// // }, {
// // img: 'http://activitystatic.q-gp.com/landing-bg.png',
// // link: 'http://activitystatic.q-gp.com'
// // }, {
// // img: 'http://activitystatic.q-gp.com/landing-bg.png',
// // link: 'http://activitystatic.q-gp.com'
// // }, {
// // img: 'http://activitystatic.q-gp.com/landing-bg.png',
// // link: 'http://activitystatic.q-gp.com'
// // }, {
// // img: 'http://activitystatic.q-gp.com/landing-bg.png',
// // link: 'http://activitystatic.q-gp.com'
// // }, {
// // img: 'http://activitystatic.q-gp.com/landing-bg.png',
// // link: 'http://activitystatic.q-gp.com'
// // }, {
// // img: 'http://activitystatic.q-gp.com/landing-bg.png',
// // link: 'http://activitystatic.q-gp.com'
// // }, {
// // img: 'http://activitystatic.q-gp.com/landing-bg.png',
// // link: 'http://activitystatic.q-gp.com'
// // }, {
// // img: 'http://activitystatic.q-gp.com/landing-bg.png',
// // link: 'http://activitystatic.q-gp.com'
// // }, {
// // img: 'http://activitystatic.q-gp.com/landing-bg.png',
// // link: 'http://activitystatic.q-gp.com'
// // }, {
// // img: 'http://activitystatic.q-gp.com/landing-bg.png',
// // link: 'http://activitystatic.q-gp.com'
// // }],
// // slidesPerColumn: 1,
// // autoplay: false,
// // animation: false
// // }
// // },
// // {
// // eleName: 'CustomMarquee',
// // title: '跑马灯',
// // config: [
// // {
// // key: 'fontColor',
// // name: '字体颜色',
// // type: 'ColorSelector',
// // },
// // {
// // key: 'list',
// // name: '添加数据',
// // type: 'FormList',
// // formControl: [
// // {
// // key: 'text',
// // name: '文案',
// // type: 'text'
// // },
// // {
// // key: 'link',
// // name: '链接',
// // type: 'text'
// // },
// // ]
// // }
// // ],
// // value: {
// // fontColor: '#666666',
// // list: [{
// // text: '请输入文案'
// // }, {
// // text: '请输入文案'
// // }]
// // }
// // },
// ];
\ No newline at end of file
<template> <template>
<div class="color-selector"> <div class="color-selector">
<Input class="color-selector-input" v-model="color" placeholder="请输入" @input="change"></Input> <Input class="color-selector-input" v-model="color" placeholder="请输入" @input="change"></Input>
<ColorPicker v-model="color" @on-change="change($event)" /> <ColorPicker placement="bottom-end" v-model="color" @on-change="change($event)" />
</div> </div>
</template> </template>
<script> <script>
......
...@@ -110,8 +110,8 @@ ...@@ -110,8 +110,8 @@
} }
&-button { &-button {
margin-top: 20px; // margin-top: 20px;
text-align: center; // text-align: center;
} }
} }
</style> </style>
\ No newline at end of file
...@@ -40,7 +40,7 @@ export default class GoodsTableModal extends Vue { ...@@ -40,7 +40,7 @@ export default class GoodsTableModal extends Vue {
async query(data) { async query(data) {
const { records, total } = await operationApi.skuInfo({ type: 'list', ...data }); const { records, total } = await operationApi.skuInfo({ type: 'list', ...data });
records.forEach(record => { records?.forEach(record => {
if (this.goods.ids.some(v => v === record.skuNo)) { if (this.goods.ids.some(v => v === record.skuNo)) {
record._checked = true; record._checked = true;
} }
...@@ -64,8 +64,8 @@ export default class GoodsTableModal extends Vue { ...@@ -64,8 +64,8 @@ export default class GoodsTableModal extends Vue {
}, },
async queryGroup(data) { async queryGroup(data) {
const { records, total } = await operationApi.specialPage(data); const { records, total } = await operationApi.specialPage(data);
records.forEach(record => { records?.forEach(record => {
if (this.goods.ids.some(v => v === record.skuNo)) { if (this.goods.ids.some(v => v === record.id)) {
record._checked = true; record._checked = true;
} }
}); });
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<template v-for="(item, index) in curElement.schame"> <template v-for="(item, index) in curElement.schame">
<div v-if="item.title"> <div v-if="item.title">
<h3>{{ item.title }}</h3> <h3>{{ item.title }}</h3>
<FormItem :label="child.name" :key="child.key" v-for="child in item.children"> <FormItem :label="child.name" :key="curElement.id + child.key" v-for="child in item.children">
<component :is="getComponent(child.type)" :options="child.options" :formControl="child.formControl" v-model="form[child.key]" /> <component :is="getComponent(child.type)" :options="child.options" :formControl="child.formControl" v-model="form[child.key]" />
</FormItem> </FormItem>
</div> </div>
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
<ColorSelector v-else-if="item.label === '背景颜色'" v-model="commonStyle.backgroundColor" @input="updateStyle($event, 'backgroundColor')"></ColorSelector> <ColorSelector v-else-if="item.label === '背景颜色'" v-model="commonStyle.backgroundColor" @input="updateStyle($event, 'backgroundColor')"></ColorSelector>
<template v-else> <template v-else>
<Tooltip placement="top" :content="child.content" v-for="child in item.list" :key="child.content"> <Tooltip placement="top" :content="child.content" v-for="child in item.list" :key="child.content">
<Button type="ghost" :icon="child.icon" @click="changeAlignType(...child.args)"></Button> <Button type="ghost" :icon="child.icon" @click="changeAlignType(child.args)"></Button>
</Tooltip> </Tooltip>
</template> </template>
</FormItem> </FormItem>
......
import { Component, Prop, Mixins, Watch } from 'vue-property-decorator'; import { Component, Prop, Mixins, Watch } from 'vue-property-decorator';
// import LoginForm from '@/lib/Form/index.vue';
import DownloadGuide from '@/lib/DownloadGuide/index.vue';
import CustomMarquee from '@/lib/Marquee/index.vue';
import ContextMenuMixin from '@editor/mixins/contextMenu.mixin'; import ContextMenuMixin from '@editor/mixins/contextMenu.mixin';
import TransformStyleMixin from '@/page/mixins/transformStyle.mixin'; import TransformStyleMixin from '@/page/mixins/transformStyle.mixin';
import { cloneDeep, pick, omit, throttle } from 'lodash'; import { cloneDeep, pick, omit, throttle } from 'lodash';
import { Action, Mutation, State, Getter } from 'vuex-class'; import { Action, Mutation, State, Getter } from 'vuex-class';
import { convertPointStyle, getStyle } from '@/service/utils.service'; import { convertPointStyle, getStyle } from '@/service/utils.service';
// import CsGuideCube from '@/lib/DownloadGuide/index.vue';
// import CsMarquee from '@/lib/Marquee/index.vue';
@Component({ components: { DownloadGuide, CustomMarquee }, name: 'FreedomContainer' }) @Component({ components: { }, name: 'FreedomContainer' })
export default class FreedomContainer extends Mixins(ContextMenuMixin, TransformStyleMixin) { export default class FreedomContainer extends Mixins(ContextMenuMixin, TransformStyleMixin) {
@Action('setDragable') setDragable; @Action('setDragable') setDragable;
@State(state => state.editor.curEleIndex) curEleIndex; @State(state => state.editor.curEleIndex) curEleIndex;
...@@ -76,7 +75,7 @@ export default class FreedomContainer extends Mixins(ContextMenuMixin, Transform ...@@ -76,7 +75,7 @@ export default class FreedomContainer extends Mixins(ContextMenuMixin, Transform
@Watch('commonStyle') @Watch('commonStyle')
onCommonStyleChange(newVal) { onCommonStyleChange(newVal) {
// console.log('onCommonStyleChange', newVal); console.log('onCommonStyleChange', newVal);
if (newVal) { if (newVal) {
this.setDotsStyle(); this.setDotsStyle();
} }
...@@ -96,10 +95,12 @@ export default class FreedomContainer extends Mixins(ContextMenuMixin, Transform ...@@ -96,10 +95,12 @@ export default class FreedomContainer extends Mixins(ContextMenuMixin, Transform
this.$nextTick(() => { this.$nextTick(() => {
const points = ['lt', 'rt', 'lb', 'rb', 'l', 'r', 't', 'b']; const points = ['lt', 'rt', 'lb', 'rb', 'l', 'r', 't', 'b'];
const [height, width] = this.getHW(this.curChildIndex); const [height, width] = this.getHW(this.curChildIndex);
this.dots[this.curChildIndex] = points.reduce((pre, cur) => { const dots = points.reduce((pre, cur) => {
pre[cur] = convertPointStyle(cur, {height, width}); pre[cur] = convertPointStyle(cur, {height, width});
return pre; return pre;
}, {}); }, {});
this.$set(this.dots, this.curChildIndex, dots);
console.log('setDotsStyle', this.dots[this.curChildIndex]);
}); });
} }
......
...@@ -12,7 +12,7 @@ export default class GoodsTabsMixin extends Vue { ...@@ -12,7 +12,7 @@ export default class GoodsTabsMixin extends Vue {
const goodsTabs = {}; const goodsTabs = {};
const pageData = cloneDeep(this.pageData); const pageData = cloneDeep(this.pageData);
pageData.elements.forEach((element, idx) => { pageData.elements.forEach((element, idx) => {
if (element.name === 'goods-tabs' && element?.props?.list.length) { if (element.name === 'cs-goods-tabs' && element?.props?.list.length) {
const childs = []; const childs = [];
const childIndexs = []; const childIndexs = [];
element.props.list.forEach((data, index) => { element.props.list.forEach((data, index) => {
...@@ -40,7 +40,7 @@ export default class GoodsTabsMixin extends Vue { ...@@ -40,7 +40,7 @@ export default class GoodsTabsMixin extends Vue {
parseGoodsTabs() { parseGoodsTabs() {
const goodsTabs = {}; const goodsTabs = {};
this.pageData.elements.forEach((element, idx) => { this.pageData.elements.forEach((element, idx) => {
if (element.name === 'goods-tabs' && element.child.length) { if (element.name === 'cs-goods-tabs' && element?.child?.length) {
goodsTabs[idx] = cloneDeep(element.child); goodsTabs[idx] = cloneDeep(element.child);
// 逆向循环 // 逆向循环
for (let i = element.child.length - 1; i >= 0; i--) { for (let i = element.child.length - 1; i >= 0; i--) {
......
...@@ -6,26 +6,26 @@ import VueGridLayout from 'vue-grid-layout'; ...@@ -6,26 +6,26 @@ import VueGridLayout from 'vue-grid-layout';
import FreedomContainer from '../../component/FreedomContainer/index.vue'; import FreedomContainer from '../../component/FreedomContainer/index.vue';
import DynamicForm from '../../component/DynamicForm/index.vue'; import DynamicForm from '../../component/DynamicForm/index.vue';
import DynamicPageForm from '../../component/DynamicPageForm/index.vue'; import DynamicPageForm from '../../component/DynamicPageForm/index.vue';
// import LoginForm from '@/lib/Form/index.vue'; import { basicComponents, businessComponents } from '@/lib/config';
import DownloadGuide from '@/lib/DownloadGuide/index.vue';
import GoodsTabs from '@/lib/GoodsTabs/index.vue';
import Goods from '@/lib/Goods/index.vue';
import Advertisement from '@/lib/Advertisement/index.vue';
import Coupon from '@/lib/Coupon/index.vue';
import Placeholder from '@/lib/Placeholder/index.vue';
import GuideCube from '@/lib/GuideCube/index.vue';
import Marquee from '@/lib/Marquee/index.vue';
import ContextMenuMixin from '@editor/mixins/contextMenu.mixin'; import ContextMenuMixin from '@editor/mixins/contextMenu.mixin';
import GoodsTabsMixin from '@editor/mixins/goodsTabs.mixin'; import GoodsTabsMixin from '@editor/mixins/goodsTabs.mixin';
import TransformStyleMixin from '@/page/mixins/transformStyle.mixin'; import TransformStyleMixin from '@/page/mixins/transformStyle.mixin';
import BasicPageForm from '@editor/component/BasicPageForm/index.vue'; import BasicPageForm from '@editor/component/BasicPageForm/index.vue';
import { basicComponents, businessComponents } from '@/lib/config';
import config from '@/config/index'; import config from '@/config/index';
import localStorage from '@/service/localStorage.service'; import localStorage from '@/service/localStorage.service';
import EventBus from '@/service/eventBus.service'; import EventBus from '@/service/eventBus.service';
// import CsLoginForm from '@/lib/Form/index.vue';
// import CsDownloadGuide from '@/lib/DownloadGuide/index.vue';
// import CsGoodsTabs from '@/lib/GoodsTabs/index.vue';
// import CsGoods from '@/lib/Goods/index.vue';
// import CsAdvertisement from '@/lib/Advertisement/index.vue';
// import CsCoupon from '@/lib/Coupon/index.vue';
// import CsPlaceholder from '@/lib/Placeholder/index.vue';
// import CsGuideCube from '@/lib/GuideCube/index.vue';
// import CsMarquee from '@/lib/Marquee/index.vue';
// CsLoginForm, CsDownloadGuide, CsGuideCube, CsGoodsTabs, CsCoupon, CsMarquee, CsAdvertisement, CsGoods, CsPlaceholder
@Component({components: { DynamicComponent, FreedomContainer, DynamicForm, GridLayout: VueGridLayout.GridLayout, @Component({components: { DynamicComponent, FreedomContainer, DynamicForm, GridLayout: VueGridLayout.GridLayout,
GridItem: VueGridLayout.GridItem, DownloadGuide, BasicPageForm, DynamicPageForm, GoodsTabs, Goods, Coupon, Advertisement, Placeholder, GuideCube, Marquee }, name: 'DashBoard'}) GridItem: VueGridLayout.GridItem, BasicPageForm, DynamicPageForm }, name: 'DashBoard'})
export default class DashBoard extends Mixins(ContextMenuMixin, GoodsTabsMixin, TransformStyleMixin) { export default class DashBoard extends Mixins(ContextMenuMixin, GoodsTabsMixin, TransformStyleMixin) {
@Mutation('ADD_ELEMENTS') addElements; @Mutation('ADD_ELEMENTS') addElements;
@Mutation('SET_CUR_ELE_INDEX') setCurEleIndex; @Mutation('SET_CUR_ELE_INDEX') setCurEleIndex;
......
...@@ -37,7 +37,7 @@ import Tabs from '@qg/cherry-ui/src/tabs'; ...@@ -37,7 +37,7 @@ import Tabs from '@qg/cherry-ui/src/tabs';
import BackTop from '@qg/cherry-ui/src/back-top'; import BackTop from '@qg/cherry-ui/src/back-top';
import Notify from '@qg/cherry-ui/src/notify'; import Notify from '@qg/cherry-ui/src/notify';
import Toast from '@qg/cherry-ui/src/toast'; import Toast from '@qg/cherry-ui/src/toast';
import { KaLoginForm } from '@qg/citrus-ui'; import citrusUi from '@qg/citrus-ui';
Vue.use(Button); Vue.use(Button);
Vue.use(Image); Vue.use(Image);
...@@ -66,7 +66,7 @@ Vue.use(Tabs); ...@@ -66,7 +66,7 @@ Vue.use(Tabs);
// Vue.use(Swipe); // Vue.use(Swipe);
Vue.use(BackTop); Vue.use(BackTop);
Vue.use(KaLoginForm); Vue.use(citrusUi);
Vue.prototype.$notify = Notify; Vue.prototype.$notify = Notify;
Vue.prototype.$toast = Toast; Vue.prototype.$toast = Toast;
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"> <html lang="en" >
<head> <head>
<title>低代码平台</title> <title>低代码平台</title>
<meta name="keywords"> <meta name="keywords">
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
<link href="https://cdn.bootcss.com/iview/2.9.0/styles/iview.css" rel="stylesheet"> <link href="https://cdn.bootcss.com/iview/2.9.0/styles/iview.css" rel="stylesheet">
<style> <style>
html { html {
font-size: 37.5Px; font-size: 37.5Px !important;
} }
html, body { html, body {
......
...@@ -1464,14 +1464,14 @@ ...@@ -1464,14 +1464,14 @@
"integrity": "sha512-shAmDyaQC4H92APFoIaVDHCx5bStIocgvbwQyxPRrbUY20V1EYTbSDchWbuwlMG3V17cprZhA6+78JfB+3DTPw==" "integrity": "sha512-shAmDyaQC4H92APFoIaVDHCx5bStIocgvbwQyxPRrbUY20V1EYTbSDchWbuwlMG3V17cprZhA6+78JfB+3DTPw=="
}, },
"@popperjs/core": { "@popperjs/core": {
"version": "2.8.4", "version": "2.9.0",
"resolved": "http://npmprivate.quantgroups.com/@popperjs%2fcore/-/core-2.8.4.tgz", "resolved": "http://npmprivate.quantgroups.com/@popperjs%2fcore/-/core-2.9.0.tgz",
"integrity": "sha512-h0lY7g36rhjNV8KVHKS3/BEOgfsxu0AiRI8+ry5IFBGEsQFkpjxtcpVc9ndN8zrKUeMZXAWMc7eQMepfgykpxQ==" "integrity": "sha512-wjtKehFAIARq2OxK8j3JrggNlEslJfNuSm2ArteIbKyRMts2g0a7KzTxfRVNUM+O0gnBJ2hNV8nWPOYBgI1sew=="
}, },
"@qg/cherry-ui": { "@qg/cherry-ui": {
"version": "2.18.66", "version": "2.18.75",
"resolved": "http://npmprivate.quantgroups.com/@qg%2fcherry-ui/-/cherry-ui-2.18.66.tgz", "resolved": "http://npmprivate.quantgroups.com/@qg%2fcherry-ui/-/cherry-ui-2.18.75.tgz",
"integrity": "sha512-JnpL3zuCeUzb11ji70KZ6fmt/XpjGwcxhHZsafQo7tiKpU9uAxZCJgUfiY0+XuyyBBqoBi/CRrWg7fvIFLewLA==", "integrity": "sha512-F5a1iySaJ70IZ9/kdY7DoijR+Wa5nzJjhaGtv4n9wrujxwrIPJPJ7k+sgAmujJXWgzGoSVYqPT6AFhg4JJ1GCQ==",
"requires": { "requires": {
"@popperjs/core": "^2.5.4", "@popperjs/core": "^2.5.4",
"vue-lazyload": "^1.3.3", "vue-lazyload": "^1.3.3",
...@@ -1479,16 +1479,17 @@ ...@@ -1479,16 +1479,17 @@
} }
}, },
"@qg/citrus-ui": { "@qg/citrus-ui": {
"version": "0.0.1-alpha.2", "version": "0.0.14",
"resolved": "http://npmprivate.quantgroups.com/@qg%2fcitrus-ui/-/citrus-ui-0.0.1-alpha.2.tgz", "resolved": "http://npmprivate.quantgroups.com/@qg%2fcitrus-ui/-/citrus-ui-0.0.14.tgz",
"integrity": "sha512-lp8JAPaAdVtVq+jEnoRx/y64Usz4GM/IvYlvtGlxt3/d9/BBgYqhjwxW8diGy0zZ9QztAJXoC+4WEDbWZk0JMw==", "integrity": "sha512-DtffXRTjxtKebZ0ZsjDR8tQUZn57eMDZ/YkmUvUgs6qlEKulxiWQCVeCmQ8wWJtYcKE/qlp55R/XaJJ+BqY20Q==",
"requires": { "requires": {
"@better-scroll/core": "^2.1.1", "@better-scroll/core": "^2.1.1",
"@qg/cherry-ui": "^2.18.66", "@qg/cherry-ui": "^2.18.72",
"@qg/js-bridge": "^1.1.9", "@qg/js-bridge": "^1.1.9",
"axios": "^0.21.1", "axios": "^0.21.1",
"js-cookie": "^2.2.1", "js-cookie": "^2.2.1",
"sa-sdk-javascript": "^1.16.1", "sa-sdk-javascript": "^1.16.1",
"swiper": "^4.5.1",
"vuex": "^3.6.0" "vuex": "^3.6.0"
} }
}, },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment