jufubao-takeorder 1.0.1 → 1.0.2-beta10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/components/JfbTakeorderFilterOrderList/Api.js +43 -0
- package/src/components/JfbTakeorderFilterOrderList/Attr.js +16 -0
- package/src/components/JfbTakeorderFilterOrderList/JfbTakeorderFilterOrderList.vue +353 -0
- package/src/components/JfbTakeorderFilterOrderList/JfbTakeorderFilterOrderListLess.less +80 -0
- package/src/components/JfbTakeorderFilterOrderList/JfbTakeorderFilterOrderListMixin.js +30 -0
- package/src/components/JfbTakeorderFilterOrderList/Mock.js +13 -0
- package/src/components/JfbTakeorderFilterOrderList/cusAttr/advanced.js +26 -0
- package/src/components/JfbTakeorderFilterOrderList/cusAttr/content.js +9 -0
- package/src/components/JfbTakeorderFilterOrderList/cusAttr/style.js +11 -0
- package/src/components/JfbTakeorderIndex/Api.js +72 -0
- package/src/components/JfbTakeorderIndex/Attr.js +16 -0
- package/src/components/JfbTakeorderIndex/JfbTakeorderIndex.vue +851 -0
- package/src/components/JfbTakeorderIndex/JfbTakeorderIndexLess.less +80 -0
- package/src/components/JfbTakeorderIndex/JfbTakeorderIndexMixin.js +30 -0
- package/src/components/JfbTakeorderIndex/Mock.js +13 -0
- package/src/components/JfbTakeorderIndex/components/cityPicker.vue +307 -0
- package/src/components/JfbTakeorderIndex/cusAttr/advanced.js +26 -0
- package/src/components/JfbTakeorderIndex/cusAttr/content.js +9 -0
- package/src/components/JfbTakeorderIndex/cusAttr/style.js +11 -0
- package/src/components/JfbTakeorderOrderDetail/Api.js +125 -0
- package/src/components/JfbTakeorderOrderDetail/Attr.js +16 -0
- package/src/components/JfbTakeorderOrderDetail/JfbTakeorderOrderDetail.vue +1211 -0
- package/src/components/JfbTakeorderOrderDetail/JfbTakeorderOrderDetailLess.less +80 -0
- package/src/components/JfbTakeorderOrderDetail/JfbTakeorderOrderDetailMixin.js +30 -0
- package/src/components/JfbTakeorderOrderDetail/Mock.js +13 -0
- package/src/components/JfbTakeorderOrderDetail/components/CusEditQuote.vue +150 -0
- package/src/components/JfbTakeorderOrderDetail/components/products.vue +141 -0
- package/src/components/JfbTakeorderOrderDetail/cusAttr/advanced.js +12 -0
- package/src/components/JfbTakeorderOrderDetail/cusAttr/content.js +233 -0
- package/src/components/JfbTakeorderOrderDetail/cusAttr/style.js +11 -0
- package/src/components/JfbTakeorderOrderList/Api.js +43 -0
- package/src/components/JfbTakeorderOrderList/Attr.js +16 -0
- package/src/components/JfbTakeorderOrderList/JfbTakeorderOrderList.vue +320 -0
- package/src/components/JfbTakeorderOrderList/JfbTakeorderOrderListLess.less +80 -0
- package/src/components/JfbTakeorderOrderList/JfbTakeorderOrderListMixin.js +30 -0
- package/src/components/JfbTakeorderOrderList/Mock.js +13 -0
- package/src/components/JfbTakeorderOrderList/cusAttr/advanced.js +26 -0
- package/src/components/JfbTakeorderOrderList/cusAttr/content.js +23 -0
- package/src/components/JfbTakeorderOrderList/cusAttr/style.js +11 -0
- package/src/components/JfbTakeorderVoiceSwitch/Api.js +39 -0
- package/src/components/JfbTakeorderVoiceSwitch/Attr.js +12 -0
- package/src/components/JfbTakeorderVoiceSwitch/JfbTakeorderVoiceSwitch.vue +191 -0
- package/src/components/JfbTakeorderVoiceSwitch/JfbTakeorderVoiceSwitchLess.less +80 -0
- package/src/components/JfbTakeorderVoiceSwitch/JfbTakeorderVoiceSwitchMixin.js +30 -0
- package/src/components/JfbTakeorderVoiceSwitch/Mock.js +5 -0
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @desc 获取绝对路径完整地址
|
|
3
|
+
* @param @path
|
|
4
|
+
**/
|
|
5
|
+
//例如:https://image.jufubao.cn/20220501010108/image/bg/default_gonghui_bg.png
|
|
6
|
+
@basePath: 'business/';
|
|
7
|
+
@doMain: '//sandbox-img.jufubao.cn/';
|
|
8
|
+
|
|
9
|
+
.getBusinessImageUrl(@path, @size: 'size8') {
|
|
10
|
+
@url: "@{doMain}@{basePath}@{path}?x-oss-process=style/@{size}";
|
|
11
|
+
background-image: url(@url);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
//start
|
|
15
|
+
.jfb-takeorder-order-detail {
|
|
16
|
+
box-sizing: border-box;
|
|
17
|
+
|
|
18
|
+
&__body{
|
|
19
|
+
position: relative;
|
|
20
|
+
overflow: hidden;
|
|
21
|
+
z-index: 2
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
&.editx,&.editx:hover {
|
|
25
|
+
position: relative;
|
|
26
|
+
min-height: unit(100, rpx);
|
|
27
|
+
z-index: 3;
|
|
28
|
+
&::after {
|
|
29
|
+
border: 2rpx dashed blue;
|
|
30
|
+
content: " ";
|
|
31
|
+
position: absolute;
|
|
32
|
+
top:0;
|
|
33
|
+
left:0;
|
|
34
|
+
bottom:0;
|
|
35
|
+
right:0;
|
|
36
|
+
z-index: var(--preview-z-index);
|
|
37
|
+
cursor: pointer;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
&__edit {
|
|
44
|
+
cursor: pointer;
|
|
45
|
+
position: absolute;
|
|
46
|
+
right: unit(0, rpx);
|
|
47
|
+
top: unit(0, rpx);
|
|
48
|
+
height: unit(50, rpx);
|
|
49
|
+
z-index: 100;
|
|
50
|
+
display: flex;
|
|
51
|
+
justify-content: center;
|
|
52
|
+
align-items: center;
|
|
53
|
+
background: rgba(0, 0, 0, .4);
|
|
54
|
+
border-radius: 0 0 0 20rpx;
|
|
55
|
+
box-shadow: 0 0 10px rbga(0, 0, 0, 0.3);
|
|
56
|
+
color: #fff;
|
|
57
|
+
font-size: unit(22, rpx);
|
|
58
|
+
padding: 0 6rpx 0 6px;
|
|
59
|
+
|
|
60
|
+
&-icon{
|
|
61
|
+
padding: 0 unit(20, rpx);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
&.editx {
|
|
65
|
+
box-sizing: border-box;
|
|
66
|
+
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
//end
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
/**notPreview**/
|
|
74
|
+
.jfb-takeorder-order-detail {
|
|
75
|
+
//&:before {
|
|
76
|
+
//content: " ";
|
|
77
|
+
//display: table;
|
|
78
|
+
//}
|
|
79
|
+
}
|
|
80
|
+
/**endNotPreview**/
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
//@AttrImport
|
|
5
|
+
import Attr from "./Attr";
|
|
6
|
+
//@EndAttrImport
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
export default {
|
|
10
|
+
data() {
|
|
11
|
+
return {
|
|
12
|
+
//#ifdef H5
|
|
13
|
+
|
|
14
|
+
//@AttrData
|
|
15
|
+
Attr:{}, //对外开发编辑属性
|
|
16
|
+
//@EndAttrData
|
|
17
|
+
|
|
18
|
+
// #endif
|
|
19
|
+
cssRoot: 'jfb-takeorder-order-detail'
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
created() {
|
|
23
|
+
|
|
24
|
+
//@AttrDataCreated
|
|
25
|
+
this.Attr = this.$xdUniHelper.customClone(Attr);
|
|
26
|
+
//@EndAttrDataCreated
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
},
|
|
30
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
module.exports = {
|
|
4
|
+
getTakeorderOrderDetail: { "id": 80, "order_id": "h866697758749884417", "shop_name": "星巴克(平谷国泰店)", "shop_address": "平谷区文化北街13号国泰商场一层", "brand_name": "星巴克", "province_name": "平谷区", "market_amount": 525, "suggest_min_quotation": 116, "suggest_max_quotation": 171, "rest_quotation_time": 259, "rest_receive_time": 0, "rest_report_time": 0, "buyer_phone_number": "18232189788", "receive_user_settle_amount": 100, "quotation_person_count": 0, "user_quotation": 0, "order_status": "quoting", "user_quotation_status": "wait_quote", "product_list": [{ "product_name": "星巴克经典咖啡", "product_sku_name": "大杯\/特别热\/经典糖\/标准\/全脂牛奶", "product_thumb": "https:\/\/www.shuomingshu.cn\/wp-content\/uploads\/images\/2023\/01\/07\/dc0bdf6bfedb4038911ec6550fd31d62_5t1vcuagbok.jpg", "product_num": 5, "market_price": 382, "suggest_min_quotation": 23, "suggest_max_quotation": 34, "user_quotation": 0 }], "product_total": 5, "report_voucher_list": [], "request_id": "dd0ae89273941292" },
|
|
5
|
+
createQuotation: {},
|
|
6
|
+
cancelQuotation: {},
|
|
7
|
+
updateQuotation: {},
|
|
8
|
+
discardOrder: {},
|
|
9
|
+
acceptOrder: {},
|
|
10
|
+
reportOrder: {},
|
|
11
|
+
imageRecognition: {},
|
|
12
|
+
getImagePreview: {}
|
|
13
|
+
}
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<view class="dialog">
|
|
3
|
+
<view class="dialog-body">
|
|
4
|
+
<view class="dialog-title">修改报价</view>
|
|
5
|
+
<view class="current-quote"> 当前报价:¥{{ $xdUniHelper.divisionFloatNumber(info.user_quotation,100) }} </view>
|
|
6
|
+
<!-- 报价输入框(带¥前缀) -->
|
|
7
|
+
<view class="quote-input">
|
|
8
|
+
<view class="quote-input-unit">¥</view>
|
|
9
|
+
<input v-model="quotePrice" placeholder="请输入单张报价金额" />
|
|
10
|
+
</view>
|
|
11
|
+
<!-- 建议报价 -->
|
|
12
|
+
<view class="suggest-wrap">
|
|
13
|
+
建议报价:
|
|
14
|
+
<text :style="{ color: mainColor }" class="suggest-range"
|
|
15
|
+
>¥{{ $xdUniHelper.divisionFloatNumber(info.suggest_min_quotation,100) }} ~ ¥{{ $xdUniHelper.divisionFloatNumber(info.suggest_max_quotation,100) }}</text
|
|
16
|
+
>
|
|
17
|
+
</view>
|
|
18
|
+
<!-- 备注说明 -->
|
|
19
|
+
<view class="note-text">
|
|
20
|
+
注:修改报价不能高于当前报价,修改成功后按照最新价格参与报价,中标后将按您修改过后的价格为您结算
|
|
21
|
+
</view>
|
|
22
|
+
<view class="btn-wrap">
|
|
23
|
+
<XdButton
|
|
24
|
+
width="180rpx"
|
|
25
|
+
size="small"
|
|
26
|
+
bgColor="#EEE"
|
|
27
|
+
color="#999"
|
|
28
|
+
type="primary"
|
|
29
|
+
@click="handleClose"
|
|
30
|
+
>再想想</XdButton
|
|
31
|
+
>
|
|
32
|
+
<XdButton
|
|
33
|
+
width="180rpx"
|
|
34
|
+
size="small"
|
|
35
|
+
type="primary"
|
|
36
|
+
@click="handleConfirm"
|
|
37
|
+
>确定</XdButton
|
|
38
|
+
>
|
|
39
|
+
</view>
|
|
40
|
+
</view>
|
|
41
|
+
</view>
|
|
42
|
+
</template>
|
|
43
|
+
|
|
44
|
+
<script>
|
|
45
|
+
import XdButton from "@/components/XdButton/XdButton";
|
|
46
|
+
export default {
|
|
47
|
+
name: "CusEditQuote",
|
|
48
|
+
components: { XdButton },
|
|
49
|
+
props: {
|
|
50
|
+
mainColor: {
|
|
51
|
+
type: String,
|
|
52
|
+
default: "",
|
|
53
|
+
},
|
|
54
|
+
info: {
|
|
55
|
+
type: Object,
|
|
56
|
+
default: () => {},
|
|
57
|
+
},
|
|
58
|
+
},
|
|
59
|
+
data() {
|
|
60
|
+
return {
|
|
61
|
+
quotePrice: "",
|
|
62
|
+
};
|
|
63
|
+
},
|
|
64
|
+
methods: {
|
|
65
|
+
handleClose() {
|
|
66
|
+
this.$emit("close");
|
|
67
|
+
},
|
|
68
|
+
handleConfirm() {
|
|
69
|
+
this.$emit("confirm", this.quotePrice);
|
|
70
|
+
},
|
|
71
|
+
},
|
|
72
|
+
};
|
|
73
|
+
</script>
|
|
74
|
+
|
|
75
|
+
<style lang="less" scoped>
|
|
76
|
+
.dialog {
|
|
77
|
+
width: 100%;
|
|
78
|
+
height: 100%;
|
|
79
|
+
position: absolute;
|
|
80
|
+
top: 0;
|
|
81
|
+
left: 0;
|
|
82
|
+
z-index: 9999;
|
|
83
|
+
background: rgba(0, 0, 0, 0.5);
|
|
84
|
+
&-body {
|
|
85
|
+
background: #fff;
|
|
86
|
+
border-radius: 16rpx;
|
|
87
|
+
width: 80%;
|
|
88
|
+
margin: 0 auto;
|
|
89
|
+
position: absolute;
|
|
90
|
+
top: 50%;
|
|
91
|
+
left: 50%;
|
|
92
|
+
transform: translate(-50%, -50%);
|
|
93
|
+
}
|
|
94
|
+
&-title {
|
|
95
|
+
color: #666666;
|
|
96
|
+
font-size: 28rpx;
|
|
97
|
+
padding: 32rpx 0;
|
|
98
|
+
text-align: center;
|
|
99
|
+
border-bottom: 2rpx solid #f8f8f8;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
/* 当前报价 */
|
|
104
|
+
.current-quote {
|
|
105
|
+
font-size: 28rpx;
|
|
106
|
+
color: #333;
|
|
107
|
+
padding: 32rpx 0 16rpx 64rpx;
|
|
108
|
+
}
|
|
109
|
+
.quote {
|
|
110
|
+
&-input {
|
|
111
|
+
position: relative;
|
|
112
|
+
padding: 0 64rpx 16rpx 64rpx;
|
|
113
|
+
&-unit {
|
|
114
|
+
position: absolute;
|
|
115
|
+
left: 80rpx;
|
|
116
|
+
top: 50%;
|
|
117
|
+
transform: translateY(-80%);
|
|
118
|
+
font-size: 28rpx;
|
|
119
|
+
color: #333;
|
|
120
|
+
font-weight: 700;
|
|
121
|
+
}
|
|
122
|
+
& > input {
|
|
123
|
+
background: #f8f8f8;
|
|
124
|
+
font-size: 28rpx;
|
|
125
|
+
padding: 20rpx 46rpx 20rpx 60rpx;
|
|
126
|
+
border-radius: 16rpx;
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
/* 建议报价 */
|
|
132
|
+
.suggest-wrap {
|
|
133
|
+
font-size: 26rpx;
|
|
134
|
+
padding: 0 64rpx 16rpx 64rpx;
|
|
135
|
+
color: #333;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
/* 备注说明 */
|
|
139
|
+
.note-text {
|
|
140
|
+
font-size: 24rpx;
|
|
141
|
+
color: #999;
|
|
142
|
+
padding: 0 64rpx 24rpx 64rpx;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
.btn-wrap {
|
|
146
|
+
display: flex;
|
|
147
|
+
justify-content: space-around;
|
|
148
|
+
padding: 32rpx 0 48rpx 0
|
|
149
|
+
}
|
|
150
|
+
</style>
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<view
|
|
3
|
+
class="wrap order-info"
|
|
4
|
+
:class="{ 'no-margin-top': info.user_quotation_status === 'received' }"
|
|
5
|
+
>
|
|
6
|
+
<view class="order-info-title">
|
|
7
|
+
<view class="order-info-title-left">
|
|
8
|
+
<view>{{ info.shop_name }}</view>
|
|
9
|
+
<text>|</text>
|
|
10
|
+
<view>{{ info.brand_name }}</view>
|
|
11
|
+
</view>
|
|
12
|
+
<view class="order-info-title-right">{{ info.province_name }}</view>
|
|
13
|
+
</view>
|
|
14
|
+
<view
|
|
15
|
+
v-for="(Pitem, Pindex) in info.product_list"
|
|
16
|
+
:key="Pindex"
|
|
17
|
+
class="order-info-product"
|
|
18
|
+
>
|
|
19
|
+
<image :src="Pitem.product_thumb"></image>
|
|
20
|
+
<view class="order-info-product-info">
|
|
21
|
+
<view class="order-info-product-info-name">{{
|
|
22
|
+
Pitem.product_name
|
|
23
|
+
}}</view>
|
|
24
|
+
<view class="order-info-product-info-sku"
|
|
25
|
+
>规格:{{ Pitem.product_sku_name }}</view
|
|
26
|
+
>
|
|
27
|
+
<view class="order-info-product-info-price">
|
|
28
|
+
<view class="order-info-product-info-price-left"
|
|
29
|
+
><text>¥ </text>{{ $xdUniHelper.divisionFloatNumber(Pitem.suggest_min_quotation,100)
|
|
30
|
+
}}<text class="range">~</text><text>¥ </text
|
|
31
|
+
>{{ $xdUniHelper.divisionFloatNumber(Pitem.suggest_max_quotation,100) }}</view
|
|
32
|
+
>
|
|
33
|
+
<view class="order-info-product-info-price-right"
|
|
34
|
+
><XdFontIcon
|
|
35
|
+
icon="icondanchuangguanbi_xian"
|
|
36
|
+
color="#999"
|
|
37
|
+
size="14"
|
|
38
|
+
></XdFontIcon
|
|
39
|
+
><view>{{ Pitem.product_num }}</view></view
|
|
40
|
+
>
|
|
41
|
+
</view>
|
|
42
|
+
</view>
|
|
43
|
+
</view>
|
|
44
|
+
</view>
|
|
45
|
+
</template>
|
|
46
|
+
|
|
47
|
+
<script>
|
|
48
|
+
export default {
|
|
49
|
+
props: {
|
|
50
|
+
info: {
|
|
51
|
+
type: Object,
|
|
52
|
+
default: () => ({}),
|
|
53
|
+
},
|
|
54
|
+
},
|
|
55
|
+
};
|
|
56
|
+
</script>
|
|
57
|
+
|
|
58
|
+
<style lang="less" scoped>
|
|
59
|
+
.wrap {
|
|
60
|
+
background: #fff;
|
|
61
|
+
margin: 16rpx;
|
|
62
|
+
border-radius: 16rpx;
|
|
63
|
+
&.no-margin-top {
|
|
64
|
+
margin-top: 0 !important;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
.order-info {
|
|
68
|
+
&-title {
|
|
69
|
+
display: flex;
|
|
70
|
+
justify-content: space-between;
|
|
71
|
+
padding: 24rpx 32rpx;
|
|
72
|
+
border-bottom: 1px solid #f4f4f4;
|
|
73
|
+
&-left {
|
|
74
|
+
display: flex;
|
|
75
|
+
align-items: center;
|
|
76
|
+
font-size: 28rpx;
|
|
77
|
+
}
|
|
78
|
+
&-right {
|
|
79
|
+
font-weight: 500;
|
|
80
|
+
font-size: 28rpx;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
&-product {
|
|
84
|
+
display: flex;
|
|
85
|
+
padding: 16rpx 32rpx;
|
|
86
|
+
border-bottom: 1px solid #f4f4f4;
|
|
87
|
+
& > image {
|
|
88
|
+
width: 180rpx;
|
|
89
|
+
height: 180rpx;
|
|
90
|
+
flex-shrink: 0;
|
|
91
|
+
border: 10rpx;
|
|
92
|
+
}
|
|
93
|
+
&-info {
|
|
94
|
+
margin-left: 24rpx;
|
|
95
|
+
font-size: 28rpx;
|
|
96
|
+
&-name {
|
|
97
|
+
.uni-max-cut(2,80);
|
|
98
|
+
margin-bottom: 10rpx;
|
|
99
|
+
}
|
|
100
|
+
&-sku {
|
|
101
|
+
font-size: 24rpx;
|
|
102
|
+
color: #999;
|
|
103
|
+
}
|
|
104
|
+
&-price {
|
|
105
|
+
margin-top: 10rpx;
|
|
106
|
+
display: flex;
|
|
107
|
+
justify-content: space-between;
|
|
108
|
+
align-items: center;
|
|
109
|
+
&-left {
|
|
110
|
+
color: #ff2c18;
|
|
111
|
+
font-size: 32rpx;
|
|
112
|
+
font-weight: 500;
|
|
113
|
+
& > text {
|
|
114
|
+
font-size: 24rpx;
|
|
115
|
+
margin-right: 10rpx;
|
|
116
|
+
}
|
|
117
|
+
.range {
|
|
118
|
+
margin: 0 10rpx;
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
&-right {
|
|
122
|
+
color: #999;
|
|
123
|
+
display: flex;
|
|
124
|
+
align-items: baseline;
|
|
125
|
+
& > view {
|
|
126
|
+
margin-left: 10rpx;
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
.other-info-item {
|
|
134
|
+
display: flex;
|
|
135
|
+
justify-content: space-between;
|
|
136
|
+
padding: 20rpx 32rpx;
|
|
137
|
+
color: #333;
|
|
138
|
+
font-size: 28rpx;
|
|
139
|
+
border-bottom: 2rpx solid #f8f8f8;
|
|
140
|
+
}
|
|
141
|
+
</style>
|
|
@@ -0,0 +1,233 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
import { customVal, dataVal } from "@/utils/AttrTools";
|
|
4
|
+
|
|
5
|
+
export default (data, gValue, gColor, oldData = {}) => {
|
|
6
|
+
return [
|
|
7
|
+
{
|
|
8
|
+
label: '公告内容:',
|
|
9
|
+
ele: 'xd-site-news',
|
|
10
|
+
valueKey: 'notice',
|
|
11
|
+
groupKey: 'content',
|
|
12
|
+
value: data.notice || null,
|
|
13
|
+
className: 'input70',
|
|
14
|
+
setting: {
|
|
15
|
+
config: {
|
|
16
|
+
sort: true,
|
|
17
|
+
maxlen: 100,
|
|
18
|
+
action: 'aliyun',
|
|
19
|
+
size: 5,
|
|
20
|
+
tipsformet: '上传文件格式:@imageType@,不超过@size@MB.',
|
|
21
|
+
uploadType: 'aliyun',
|
|
22
|
+
type: ['jpg', 'png', 'jpeg']
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
handleCustom({ action, data }) {
|
|
26
|
+
if (data && data.params) {
|
|
27
|
+
//当一个插件中出现使用内容分类时候需要设置code值,在页面引用时候容器id + code进行拼接
|
|
28
|
+
//data.params = Object.assign({}, data.params, {code: 'g_test_id'});
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
//获取返回参数(场景类型名称为必填)
|
|
32
|
+
//获取返回参数(场景类型名称为必填)
|
|
33
|
+
let loading = { close() { } }
|
|
34
|
+
|
|
35
|
+
//获取显示内容
|
|
36
|
+
if (action === 'screen') {
|
|
37
|
+
XdBus.getParentApi('getOptionsSettingList')({ setting_id: 'edtix_bucket_content_tip' })
|
|
38
|
+
.then(res => {
|
|
39
|
+
loading.close();
|
|
40
|
+
data.cb(res['list'])
|
|
41
|
+
})
|
|
42
|
+
.catch(error => {
|
|
43
|
+
console.error(error);
|
|
44
|
+
loading.close();
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
//获取返回参数(广告位高度必选项)
|
|
50
|
+
if (action === 'getNewsInfo') {
|
|
51
|
+
XdBus.getParentApi('cmsGetPublishEditxContent')(data.params)
|
|
52
|
+
.then(res => {
|
|
53
|
+
loading.close()
|
|
54
|
+
data.cb({ list: res.list, selectId: res.selected })
|
|
55
|
+
})
|
|
56
|
+
.catch(error => {
|
|
57
|
+
loading.close()
|
|
58
|
+
console.error(error);
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
//获取产品业务线列表
|
|
63
|
+
if (action === 'namespace') {
|
|
64
|
+
XdBus.getParentApi('getOptionsNamespaces')({})
|
|
65
|
+
.then(res => {
|
|
66
|
+
loading.close()
|
|
67
|
+
data.cb(res['list'])
|
|
68
|
+
})
|
|
69
|
+
.catch(error => {
|
|
70
|
+
loading.close()
|
|
71
|
+
console.error(error);
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
//使用内容分类
|
|
76
|
+
if (action === 'cmsPublishEditxContent') {
|
|
77
|
+
loading = XdBus.getParentApi('loading')({});
|
|
78
|
+
XdBus.getParentApi('cmsPublishEditxContent')(data.params)
|
|
79
|
+
.then(res => {
|
|
80
|
+
console.log('cmsPublishEditxContent', res)
|
|
81
|
+
loading.close();
|
|
82
|
+
data.cb(res)
|
|
83
|
+
})
|
|
84
|
+
.catch(error => {
|
|
85
|
+
loading.close();
|
|
86
|
+
console.error(error);
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
//位置列表
|
|
91
|
+
if (action === 'getListPostion') {
|
|
92
|
+
loading = XdBus.getParentApi('loading')({});
|
|
93
|
+
XdBus.getParentApi('getListNewsPosition')(data.params)
|
|
94
|
+
.then(res => {
|
|
95
|
+
loading.close();
|
|
96
|
+
data.cb(res)
|
|
97
|
+
})
|
|
98
|
+
.catch(error => {
|
|
99
|
+
loading.close();
|
|
100
|
+
console.error(error);
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
//位置创建
|
|
105
|
+
if (action === 'addPostion') {
|
|
106
|
+
loading = XdBus.getParentApi('loading')({});
|
|
107
|
+
XdBus.getParentApi('addNewsPosition')(data.params)
|
|
108
|
+
.then(res => {
|
|
109
|
+
loading.close();
|
|
110
|
+
data.cb(true)
|
|
111
|
+
})
|
|
112
|
+
.catch(error => {
|
|
113
|
+
console.error(error);
|
|
114
|
+
loading.close();
|
|
115
|
+
data.cb(false)
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
//位置编辑
|
|
120
|
+
if (action === 'editPostion') {
|
|
121
|
+
loading = XdBus.getParentApi('loading')({});
|
|
122
|
+
XdBus.getParentApi('updateNewsPosition')(data.params)
|
|
123
|
+
.then(res => {
|
|
124
|
+
loading.close();
|
|
125
|
+
data.cb(true)
|
|
126
|
+
})
|
|
127
|
+
.catch(error => {
|
|
128
|
+
console.error(error);
|
|
129
|
+
loading.close();
|
|
130
|
+
data.cb(false)
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
//位置删除
|
|
135
|
+
if (action === 'deleltePostion') {
|
|
136
|
+
loading = XdBus.getParentApi('loading')({});
|
|
137
|
+
XdBus.getParentApi('deleteNewsPosition')(data.params)
|
|
138
|
+
.then(res => {
|
|
139
|
+
loading.close();
|
|
140
|
+
data.cb(true)
|
|
141
|
+
})
|
|
142
|
+
.catch(error => {
|
|
143
|
+
console.error(error);
|
|
144
|
+
loading.close();
|
|
145
|
+
data.cb(false)
|
|
146
|
+
});
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
//获取广告位内容列表
|
|
150
|
+
if (action === 'getListContent') {
|
|
151
|
+
loading = XdBus.getParentApi('loading')({});
|
|
152
|
+
XdBus.getParentApi('getListNewsContent')(data.params)
|
|
153
|
+
.then(res => {
|
|
154
|
+
loading.close();
|
|
155
|
+
data.cb(res)
|
|
156
|
+
})
|
|
157
|
+
.catch(error => {
|
|
158
|
+
loading.close();
|
|
159
|
+
console.error(error);
|
|
160
|
+
});
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
//广告内容创建
|
|
164
|
+
if (action === 'addContent') {
|
|
165
|
+
loading = XdBus.getParentApi('loading')({});
|
|
166
|
+
XdBus.getParentApi('addNewsContent')(data.params)
|
|
167
|
+
.then(res => {
|
|
168
|
+
loading.close();
|
|
169
|
+
data.cb(true)
|
|
170
|
+
})
|
|
171
|
+
.catch(error => {
|
|
172
|
+
console.error(error);
|
|
173
|
+
loading.close();
|
|
174
|
+
data.cb(false)
|
|
175
|
+
});
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
//广告内容编辑
|
|
179
|
+
if (action === 'editContent') {
|
|
180
|
+
loading = XdBus.getParentApi('loading')({});
|
|
181
|
+
XdBus.getParentApi('updateNewsContent')(data.params)
|
|
182
|
+
.then(res => {
|
|
183
|
+
loading.close();
|
|
184
|
+
data.cb(true)
|
|
185
|
+
})
|
|
186
|
+
.catch(error => {
|
|
187
|
+
console.error(error);
|
|
188
|
+
loading.close();
|
|
189
|
+
data.cb(false)
|
|
190
|
+
});
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
//广告内容删除
|
|
194
|
+
if (action === 'deleteContent') {
|
|
195
|
+
loading = XdBus.getParentApi('loading')({});
|
|
196
|
+
XdBus.getParentApi('deleteNewsContent')(data.params)
|
|
197
|
+
.then(res => {
|
|
198
|
+
loading.close();
|
|
199
|
+
data.cb(true)
|
|
200
|
+
})
|
|
201
|
+
.catch(error => {
|
|
202
|
+
console.error(error);
|
|
203
|
+
loading.close();
|
|
204
|
+
data.cb(false)
|
|
205
|
+
});
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
//内容发布
|
|
209
|
+
if (action === 'publish') {
|
|
210
|
+
loading = XdBus.getParentApi('loading')({});
|
|
211
|
+
console.log('publish', data.params)
|
|
212
|
+
XdBus.getParentApi('cmsPublishContent')(data.params)
|
|
213
|
+
.then(res => {
|
|
214
|
+
loading.close();
|
|
215
|
+
data.cb(res)
|
|
216
|
+
})
|
|
217
|
+
.catch(error => {
|
|
218
|
+
loading.close();
|
|
219
|
+
console.error(error);
|
|
220
|
+
});
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
//通知页面进行刷新
|
|
224
|
+
if (action === 'update') {
|
|
225
|
+
loading = XdBus.getParentApi('loading')({});
|
|
226
|
+
XdBus.getParentApi('getXdBusUpdateView')('onUpdateView', {});
|
|
227
|
+
loading.close()
|
|
228
|
+
}
|
|
229
|
+
},
|
|
230
|
+
},
|
|
231
|
+
].filter(i => i)
|
|
232
|
+
}
|
|
233
|
+
|