jufubao-base 1.0.119-beta2 → 1.0.119-beta3
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 +4 -3
- package/src/components/JfbBaseSaasBlessDetail/JfbBaseSaasBlessDetail.vue +38 -12
- package/src/components/JfbBaseSaasBlessDialog/JfbBaseSaasBlessDialog.vue +57 -22
- package/src/components/JfbBaseSaasBlessReceive/JfbBaseSaasBlessReceive.vue +24 -6
- package/src/components/JfbBaseSaasHome/JfbBaseSaasHome.vue +71 -25
- package/src/components/JfbBaseSaasLogin/Api.js +61 -2
- package/src/components/JfbBaseSaasLogin/Attr.js +23 -1
- package/src/components/JfbBaseSaasLogin/JfbBaseSaasLogin.vue +409 -119
- package/src/components/JfbBaseSaasLogin/saaslogin_copy.vue +410 -0
- package/src/components/JfbBaseSaasNewsList/JfbBaseSaasNewsList.vue +2 -1
- package/src/components/JfbBaseSassPhoneCollect/Api.js +12 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "jufubao-base",
|
|
3
|
-
"version": "1.0.119-
|
|
3
|
+
"version": "1.0.119-beta3",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "聚福宝业务组件基础插件包",
|
|
6
6
|
"main": "index.js",
|
|
@@ -48,6 +48,7 @@
|
|
|
48
48
|
"@vue/shared": "^3.0.0",
|
|
49
49
|
"color": "^3.1.3",
|
|
50
50
|
"core-js": "^2.6.5",
|
|
51
|
+
"dingtalk-jsapi": "^3.0.31",
|
|
51
52
|
"flyio": "^0.6.2",
|
|
52
53
|
"gxd-commands-bussiness": "^1.0.12",
|
|
53
54
|
"gxd-uni-library-editx": "1.0.17-beta2",
|
|
@@ -56,10 +57,10 @@
|
|
|
56
57
|
"path-to-regexp": "^6.2.1",
|
|
57
58
|
"qs": "^6.9.6",
|
|
58
59
|
"regenerator-runtime": "^0.12.1",
|
|
60
|
+
"vconsole": "^3.15.0",
|
|
59
61
|
"vue": "^2.6.10",
|
|
60
62
|
"vue-clipboard2": "^0.3.1",
|
|
61
|
-
"vuex": "^3.2.0"
|
|
62
|
-
"vconsole": "^3.15.0"
|
|
63
|
+
"vuex": "^3.2.0"
|
|
63
64
|
},
|
|
64
65
|
"repository": {
|
|
65
66
|
"type": "git",
|
|
@@ -13,13 +13,23 @@
|
|
|
13
13
|
<view class="jfb-base-saas-bless-detail__edit-icon" @click="delEdit">删除</view>
|
|
14
14
|
</view>
|
|
15
15
|
<!-- #endif -->
|
|
16
|
-
<view class="jfb-base-saas-bless-detail__body"
|
|
16
|
+
<view class="jfb-base-saas-bless-detail__body" :style="{
|
|
17
|
+
minHeight: layoutInfo.bodyMinHeightRpx + 'rpx',
|
|
18
|
+
backgroundImage: `url(${blessConfig && blessConfig.material_image.path})`
|
|
19
|
+
}">
|
|
17
20
|
<view class="bless_detail">
|
|
18
|
-
<view class="bless_box"
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
21
|
+
<view class="bless_box" v-if="blessConfig" :style="{
|
|
22
|
+
paddingTop: blessConfig.material_margin.top + 'rpx',
|
|
23
|
+
paddingLeft: blessConfig.material_margin.left + 'rpx',
|
|
24
|
+
paddingRight: blessConfig.material_margin.right + 'rpx',
|
|
25
|
+
paddingBottom: blessConfig.material_margin.bottom + 'rpx',
|
|
26
|
+
color: blessConfig.material_color
|
|
27
|
+
}">
|
|
28
|
+
<view class="dear">{{ blessConfig.material_nickname }}</view>
|
|
29
|
+
<view class="desc">{{ blessConfig.material_content }}</view>
|
|
30
|
+
<view class="salute">{{ blessConfig.material_end }}</view>
|
|
22
31
|
<xd-button class="sign_btn"
|
|
32
|
+
v-if="blessData.receive_status === 'N'"
|
|
23
33
|
style="width: 250rpx;" type="primary"
|
|
24
34
|
@click="showSign"
|
|
25
35
|
>去签收</xd-button>
|
|
@@ -42,8 +52,8 @@
|
|
|
42
52
|
<view class="dialog_main">
|
|
43
53
|
<xd-font-icon icon="iconchenggong" :size="90" :color="mainColor"></xd-font-icon>
|
|
44
54
|
<view class="sign_tit">签收成功</view>
|
|
45
|
-
<view class="sign_cont"
|
|
46
|
-
<view class="sign_ticket"
|
|
55
|
+
<view class="sign_cont">{{blessData.bless_type_name}}已经放入您的账户</view>
|
|
56
|
+
<view class="sign_ticket">{{blessData.bless_name}} X{{blessData.bless_card_number}}张</view>
|
|
47
57
|
</view>
|
|
48
58
|
<view slot="btn">
|
|
49
59
|
<xd-button style="width: 280rpx;" type="primary" @click="toUseTicket">去使用</xd-button>
|
|
@@ -82,6 +92,8 @@
|
|
|
82
92
|
dialogSuccess: false,
|
|
83
93
|
sign_image_url: "",
|
|
84
94
|
bless_id: "",
|
|
95
|
+
blessData: {},
|
|
96
|
+
blessConfig: null,
|
|
85
97
|
|
|
86
98
|
//面板
|
|
87
99
|
useTicketUrl: "", //使用券跳转地址
|
|
@@ -100,6 +112,18 @@
|
|
|
100
112
|
methods: {
|
|
101
113
|
onJfbLoad(options) {
|
|
102
114
|
this.bless_id = options.bless_id;
|
|
115
|
+
|
|
116
|
+
jfbRootExec("getBlessDetail", {
|
|
117
|
+
vm: this,
|
|
118
|
+
data: {
|
|
119
|
+
bless_id: this.bless_id
|
|
120
|
+
}
|
|
121
|
+
}).then(res => {
|
|
122
|
+
try{
|
|
123
|
+
this.blessData = res;
|
|
124
|
+
this.blessConfig = JSON.parse(res.bless_detail_config)
|
|
125
|
+
}catch(err){}
|
|
126
|
+
})
|
|
103
127
|
},
|
|
104
128
|
/**
|
|
105
129
|
* @description 监听事件变化
|
|
@@ -108,6 +132,7 @@
|
|
|
108
132
|
init(container) {
|
|
109
133
|
|
|
110
134
|
},
|
|
135
|
+
|
|
111
136
|
showSign(){
|
|
112
137
|
this.dialogShow = true;
|
|
113
138
|
},
|
|
@@ -233,20 +258,21 @@
|
|
|
233
258
|
.jfb-base-saas-bless-detail {
|
|
234
259
|
&__body{
|
|
235
260
|
box-sizing: border-box;
|
|
261
|
+
background-size: 100% auto;
|
|
262
|
+
position: relative;
|
|
236
263
|
.bless_detail{
|
|
237
|
-
padding: 350rpx 48rpx;
|
|
238
264
|
|
|
239
265
|
.bless_box{
|
|
240
|
-
width: 600rpx;
|
|
241
|
-
height: 720rpx;
|
|
242
|
-
border: 1px solid #DDD;
|
|
243
266
|
margin: 0 auto;
|
|
244
|
-
background-color: #FFF2CD;
|
|
245
267
|
box-sizing: border-box;
|
|
246
268
|
padding: 100rpx 80rpx;
|
|
247
269
|
color: #FA2300;
|
|
248
270
|
font-size: 32rpx;
|
|
249
271
|
font-weight: 400;
|
|
272
|
+
position: absolute;
|
|
273
|
+
top: 0;
|
|
274
|
+
left: 0;
|
|
275
|
+
width: 100%;
|
|
250
276
|
.dear{
|
|
251
277
|
font-weight: 500;
|
|
252
278
|
}
|
|
@@ -17,23 +17,24 @@
|
|
|
17
17
|
<view class="dialog_wrap" v-if="isShow">
|
|
18
18
|
<view class="dialog_mask"></view>
|
|
19
19
|
<view class="dialog_content">
|
|
20
|
-
<view class="dialog_num">
|
|
21
|
-
<text>1/
|
|
20
|
+
<view v-if="showIndicator" class="dialog_num">
|
|
21
|
+
<text>{{currentIndex + 1}}/{{ list.length }}</text>
|
|
22
22
|
</view>
|
|
23
23
|
<view class="dialog_main">
|
|
24
|
-
<view class="_left" @click="handleChange('left')">
|
|
24
|
+
<view v-if="showIndicator" class="_left" @click="handleChange('left')">
|
|
25
25
|
<xd-font-icon icon="iconxiangzuo_xian"></xd-font-icon>
|
|
26
26
|
</view>
|
|
27
|
-
<view class="_cont">
|
|
28
|
-
<image class="dialog_image" :src="
|
|
29
|
-
<view class="pop_tip"
|
|
27
|
+
<view class="_cont" v-if="currCover && currCover.bless_cover_config">
|
|
28
|
+
<image class="dialog_image" :src="currCover.bless_cover_config.material_image.path"></image>
|
|
29
|
+
<view class="pop_tip">{{currCover.bless_type_name}} {{ currCover.bless_card_number }}张</view>
|
|
30
30
|
<view class="bless_wrap">
|
|
31
|
-
<view class="bless_name"
|
|
32
|
-
<view class="bless_cont"
|
|
31
|
+
<view class="bless_name">{{currCover.bless_cover_config.material_nickname}}</view>
|
|
32
|
+
<view class="bless_cont">{{currCover.bless_cover_config.material_content}}</view>
|
|
33
|
+
<!-- <view class="bless_comp">{{ currCover.bless_cover_config.material_end }}</view> -->
|
|
33
34
|
</view>
|
|
34
35
|
<xd-button class="btn_image" type="primary" @click="handleToDetail">去看看</xd-button>
|
|
35
36
|
</view>
|
|
36
|
-
<view class="_right" @click="handleChange('right')">
|
|
37
|
+
<view v-if="showIndicator" class="_right" @click="handleChange('right')">
|
|
37
38
|
<xd-font-icon icon="iconxiangyou_xian"></xd-font-icon>
|
|
38
39
|
</view>
|
|
39
40
|
</view>
|
|
@@ -62,6 +63,7 @@
|
|
|
62
63
|
import { jfbRootExec } from "@/utils/xd.event";
|
|
63
64
|
import JfbBaseSaasBlessDialogMixin from "./JfbBaseSaasBlessDialogMixin";
|
|
64
65
|
import { getContainerPropsValue } from "@/utils/xd.base";
|
|
66
|
+
import getServiceUrl from '@/common/getServiceUrl'
|
|
65
67
|
import componentsMixins from "@/mixins/componentsMixins";
|
|
66
68
|
import extsMixins from "@/mixins/extsMixins";
|
|
67
69
|
export default {
|
|
@@ -76,7 +78,7 @@
|
|
|
76
78
|
data() {
|
|
77
79
|
return {
|
|
78
80
|
isPreview: false, //是否预览
|
|
79
|
-
isShow:
|
|
81
|
+
isShow: false,
|
|
80
82
|
currentImage: "",
|
|
81
83
|
currentIndex: 0,
|
|
82
84
|
list: [],
|
|
@@ -91,21 +93,23 @@
|
|
|
91
93
|
this.init(value)
|
|
92
94
|
}
|
|
93
95
|
},
|
|
96
|
+
computed: {
|
|
97
|
+
currCover(){
|
|
98
|
+
if(this.currentIndex < 0) return this.list[0];
|
|
99
|
+
if(this.currentIndex > this.list.length - 1) return this.list[this.list.length - 1];
|
|
100
|
+
return this.list[this.currentIndex]
|
|
101
|
+
},
|
|
102
|
+
showIndicator(){
|
|
103
|
+
return this.list.length > 1
|
|
104
|
+
}
|
|
105
|
+
},
|
|
94
106
|
created() {
|
|
95
107
|
this.isPreview = this.$configProject.isPreview;
|
|
96
108
|
this.init(this.container);
|
|
97
109
|
},
|
|
98
110
|
methods: {
|
|
99
111
|
onJfbLoad(options) {
|
|
100
|
-
|
|
101
|
-
vm: this,
|
|
102
|
-
data: {
|
|
103
|
-
page_size: 10,
|
|
104
|
-
page_token: '1'
|
|
105
|
-
}
|
|
106
|
-
}).then(res => {
|
|
107
|
-
this.list = res.list;
|
|
108
|
-
})
|
|
112
|
+
|
|
109
113
|
},
|
|
110
114
|
/**
|
|
111
115
|
* @description 监听事件变化
|
|
@@ -114,13 +118,37 @@
|
|
|
114
118
|
init(container) {
|
|
115
119
|
this.type = getContainerPropsValue(container, "content.type", 1);
|
|
116
120
|
this.isHide = getContainerPropsValue(container, "content.isHide", false);
|
|
121
|
+
this.blessDetailUrl = getContainerPropsValue(container, 'content.blessDetailUrl', {value: "/main/saas/blessDetail"}).value;
|
|
117
122
|
if (this.isPreview) {
|
|
118
123
|
this.isShow = !this.isHide;
|
|
119
124
|
}
|
|
120
125
|
},
|
|
126
|
+
getList(){
|
|
127
|
+
jfbRootExec("getBlessList", {
|
|
128
|
+
vm: this,
|
|
129
|
+
data: {
|
|
130
|
+
page_size: 10,
|
|
131
|
+
page_token: '1'
|
|
132
|
+
}
|
|
133
|
+
}).then(res => {
|
|
134
|
+
this.handleBlessList(res);
|
|
135
|
+
})
|
|
136
|
+
},
|
|
137
|
+
handleBlessList(res){
|
|
138
|
+
if(res.list.length > 0) this.isShow = true;
|
|
139
|
+
this.list = res.list.map(item => {
|
|
140
|
+
try{
|
|
141
|
+
item['bless_cover_config'] = JSON.parse(item.bless_cover_config);
|
|
142
|
+
}catch(err){
|
|
143
|
+
item['bless_cover_config'] = {};
|
|
144
|
+
}
|
|
145
|
+
return item;
|
|
146
|
+
});
|
|
147
|
+
},
|
|
121
148
|
handleToDetail(){
|
|
149
|
+
const { bless_id } = this.currCover;
|
|
122
150
|
this.$xdUniHelper.navigateTo({
|
|
123
|
-
url: `${this.blessDetailUrl}?bless_id=${
|
|
151
|
+
url: `${this.blessDetailUrl}?bless_id=${bless_id}`,
|
|
124
152
|
});
|
|
125
153
|
},
|
|
126
154
|
handleClose(){
|
|
@@ -154,7 +182,10 @@
|
|
|
154
182
|
onJfbUpdate(...data) {
|
|
155
183
|
console.log('event.onJfbUpdate', data)
|
|
156
184
|
},
|
|
157
|
-
onJfbCustomEvent(
|
|
185
|
+
onJfbCustomEvent({action, data}) {
|
|
186
|
+
if(action === '@showBaseBlessDialog'){
|
|
187
|
+
this.getList();
|
|
188
|
+
}
|
|
158
189
|
console.log('event.onJfbReachBottom', options)
|
|
159
190
|
},
|
|
160
191
|
}
|
|
@@ -236,7 +267,6 @@
|
|
|
236
267
|
.dialog_image {
|
|
237
268
|
width: 100%;
|
|
238
269
|
height: 328rpx;
|
|
239
|
-
background: red;
|
|
240
270
|
}
|
|
241
271
|
.pop_tip{
|
|
242
272
|
width: 100%;
|
|
@@ -249,6 +279,8 @@
|
|
|
249
279
|
}
|
|
250
280
|
.bless_wrap{
|
|
251
281
|
padding: 48rpx 32rpx;
|
|
282
|
+
width: 100%;
|
|
283
|
+
box-sizing: border-box;
|
|
252
284
|
.bless_name{
|
|
253
285
|
font-size: 36rpx;
|
|
254
286
|
color: #333333;
|
|
@@ -260,6 +292,9 @@
|
|
|
260
292
|
font-weight: 400;
|
|
261
293
|
margin-top: 32rpx;
|
|
262
294
|
}
|
|
295
|
+
.bless_comp{
|
|
296
|
+
text-align: right;
|
|
297
|
+
}
|
|
263
298
|
}
|
|
264
299
|
.btn_image{
|
|
265
300
|
width: unit(448, rpx);
|
|
@@ -17,13 +17,15 @@
|
|
|
17
17
|
<view class="receive_list">
|
|
18
18
|
<view class="receive_item" v-for="(item, i) in blessData" :key="i">
|
|
19
19
|
<view class="head">{{item.bless_type_name}}</view>
|
|
20
|
-
<view class="card"
|
|
20
|
+
<view class="card">
|
|
21
|
+
<image :src="item.cover_url"/>
|
|
22
|
+
</view>
|
|
21
23
|
<view class="receive_cont">
|
|
22
24
|
<view class="card_name">{{ item.bless_name }}</view>
|
|
23
|
-
<view class="card_num">×
|
|
25
|
+
<view class="card_num">× {{ item.bless_card_number }}张</view>
|
|
24
26
|
</view>
|
|
25
27
|
<view class="receive_time">
|
|
26
|
-
<view class="_time">
|
|
28
|
+
<view class="_time">{{ item.release_time }}</view>
|
|
27
29
|
<view>
|
|
28
30
|
<xd-button v-if="item.receive_status === 'N'" size="small" type="primary" @click="toSignUrl(item)">立即签收</xd-button>
|
|
29
31
|
<xd-button v-else size="small" type="default" @click="toSignUrl(item)">再次查看</xd-button>
|
|
@@ -43,6 +45,7 @@
|
|
|
43
45
|
import { getContainerPropsValue } from "@/utils/xd.base";
|
|
44
46
|
import componentsMixins from "@/mixins/componentsMixins";
|
|
45
47
|
import extsMixins from "@/mixins/extsMixins";
|
|
48
|
+
import getServiceUrl from '@/common/getServiceUrl'
|
|
46
49
|
export default {
|
|
47
50
|
name: "JfbBaseSaasBlessReceive",
|
|
48
51
|
components: {
|
|
@@ -80,7 +83,7 @@
|
|
|
80
83
|
* @param container {object} 业务组件对象自己
|
|
81
84
|
*/
|
|
82
85
|
init(container) {
|
|
83
|
-
this.blessSignUrl = getContainerPropsValue(container, 'content.blessSignUrl', {value: ""}).value;
|
|
86
|
+
this.blessSignUrl = getContainerPropsValue(container, 'content.blessSignUrl', {value: "/main/saas/blessDetail"}).value;
|
|
84
87
|
},
|
|
85
88
|
toSignUrl(item){
|
|
86
89
|
this.$xdUniHelper.navigateTo({
|
|
@@ -96,7 +99,18 @@
|
|
|
96
99
|
}
|
|
97
100
|
}).then(res => {
|
|
98
101
|
this.$xdHideLoading();
|
|
99
|
-
this.blessData = res.list
|
|
102
|
+
this.blessData = res.list.map(item => {
|
|
103
|
+
try{
|
|
104
|
+
let cover = JSON.parse(item.bless_cover_config)
|
|
105
|
+
item['cover_url'] = getServiceUrl(cover.material_image.url);
|
|
106
|
+
}catch(err){
|
|
107
|
+
item['cover_url'] = ""
|
|
108
|
+
}
|
|
109
|
+
item['release_time'] = this.$xdUniHelper.getDate(
|
|
110
|
+
item["release_time"] * 1000
|
|
111
|
+
).fullTime;
|
|
112
|
+
return item;
|
|
113
|
+
});
|
|
100
114
|
})
|
|
101
115
|
},
|
|
102
116
|
onJfbScroll(options) {
|
|
@@ -148,8 +162,12 @@
|
|
|
148
162
|
.card{
|
|
149
163
|
height: 300rpx;
|
|
150
164
|
border-radius: 16rpx;
|
|
151
|
-
background-color: red;
|
|
152
165
|
margin-top: 24rpx;
|
|
166
|
+
overflow: hidden;
|
|
167
|
+
image{
|
|
168
|
+
width: 100%;
|
|
169
|
+
height: 100%;
|
|
170
|
+
}
|
|
153
171
|
}
|
|
154
172
|
.receive_cont{
|
|
155
173
|
display: flex;
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
</view> -->
|
|
22
22
|
</view>
|
|
23
23
|
<template v-for="(comp, i) in componentList">
|
|
24
|
-
<view class="banner" v-if="comp.container_key === 'banner'" :key="i">
|
|
24
|
+
<view class="banner" v-if="comp.container_key === 'banner' && bannerList.length" :key="i">
|
|
25
25
|
<swiper class="swiper" circular>
|
|
26
26
|
<swiper-item v-for="(item,i) in bannerList" :key="i">
|
|
27
27
|
<view class="swiper-item" @click="toBannerLink(item)">
|
|
@@ -38,21 +38,50 @@
|
|
|
38
38
|
</view>
|
|
39
39
|
</view>
|
|
40
40
|
|
|
41
|
-
<view class="notice" v-if="comp.container_key === 'notice'" :key="i">
|
|
42
|
-
公告:薄如蝉翼的金华火腿,每一口都是时间的味道
|
|
41
|
+
<view class="notice" v-if="comp.container_key === 'notice' && noticeList.length" :key="i">
|
|
42
|
+
<!-- 公告:薄如蝉翼的金华火腿,每一口都是时间的味道 -->
|
|
43
|
+
<swiper vertical style="height: 40rpx;" autoplay>
|
|
44
|
+
<swiper-item v-for="(item,i) in noticeList" :key="i">
|
|
45
|
+
<view style="height: 40rpx;line-height: 40rpx;">{{ item.title }}</view>
|
|
46
|
+
</swiper-item>
|
|
47
|
+
</swiper>
|
|
43
48
|
</view>
|
|
49
|
+
<!-- <xd-notice-bar single scrollable></xd-notice-bar> -->
|
|
44
50
|
|
|
45
|
-
<view class="news_wrap" v-if="comp.container_key === 'news'" :key="i">
|
|
51
|
+
<view class="news_wrap" v-if="comp.container_key === 'news' && newsList.length" :key="i">
|
|
46
52
|
<view class="news_group">
|
|
47
53
|
<view class="group_header">
|
|
48
54
|
<view class="group_title">{{ comp.config.name }}</view>
|
|
49
|
-
<view class="group_more" @click="toNewsList">
|
|
55
|
+
<view class="group_more" @click="toNewsList('news')">
|
|
50
56
|
查看更多
|
|
51
57
|
<xd-font-icon icon="iconxiangyou_xian" :size="24" style="margin-left: 16rpx;"></xd-font-icon>
|
|
52
58
|
</view>
|
|
53
59
|
</view>
|
|
54
60
|
<view class="group_body">
|
|
55
|
-
<view class="news_item" v-for="(news, i) in newsList" :key="i" @click="toNewsDetail">
|
|
61
|
+
<view class="news_item" v-for="(news, i) in newsList" :key="i" @click="toNewsDetail(news.id)">
|
|
62
|
+
<view class="news_cont">
|
|
63
|
+
<view class="news_tit">{{ news.title }}</view>
|
|
64
|
+
<view class="news_date">{{ news.created_time }}</view>
|
|
65
|
+
</view>
|
|
66
|
+
<view class="news_img">
|
|
67
|
+
<image :src="news.thumb" />
|
|
68
|
+
</view>
|
|
69
|
+
</view>
|
|
70
|
+
</view>
|
|
71
|
+
</view>
|
|
72
|
+
</view>
|
|
73
|
+
|
|
74
|
+
<view class="news_wrap" v-if="comp.container_key === 'study' && studyList.length" :key="i">
|
|
75
|
+
<view class="news_group">
|
|
76
|
+
<view class="group_header">
|
|
77
|
+
<view class="group_title">{{ comp.config.name }}</view>
|
|
78
|
+
<view class="group_more" @click="toNewsList('study')">
|
|
79
|
+
查看更多
|
|
80
|
+
<xd-font-icon icon="iconxiangyou_xian" :size="24" style="margin-left: 16rpx;"></xd-font-icon>
|
|
81
|
+
</view>
|
|
82
|
+
</view>
|
|
83
|
+
<view class="group_body">
|
|
84
|
+
<view class="news_item" v-for="(news, i) in studyList" :key="i" @click="toNewsDetail(news.id)">
|
|
56
85
|
<view class="news_cont">
|
|
57
86
|
<view class="news_tit">{{ news.title }}</view>
|
|
58
87
|
<view class="news_date">{{ news.created_time }}</view>
|
|
@@ -72,16 +101,18 @@
|
|
|
72
101
|
|
|
73
102
|
<script>
|
|
74
103
|
import XdFontIcon from "@/components/XdFontIcon/XdFontIcon";
|
|
75
|
-
import { jfbRootExec } from "@/utils/xd.event";
|
|
104
|
+
import { jfbRootExec, jfbRootFnExec } from "@/utils/xd.event";
|
|
76
105
|
import JfbBaseSaasHomeMixin from "./JfbBaseSaasHomeMixin";
|
|
77
106
|
import { getContainerPropsValue } from "@/utils/xd.base";
|
|
78
107
|
import componentsMixins from "@/mixins/componentsMixins";
|
|
79
108
|
import extsMixins from "@/mixins/extsMixins";
|
|
80
109
|
import getServiceUrl from "@/common/getServiceUrl";
|
|
110
|
+
import XdNoticeBar from "@/components/XdNoticeBar/XdNoticeBar"
|
|
81
111
|
export default {
|
|
82
112
|
name: "JfbBaseSaasHome",
|
|
83
113
|
components: {
|
|
84
|
-
XdFontIcon
|
|
114
|
+
XdFontIcon,
|
|
115
|
+
XdNoticeBar
|
|
85
116
|
},
|
|
86
117
|
mixins: [
|
|
87
118
|
componentsMixins, extsMixins, JfbBaseSaasHomeMixin
|
|
@@ -92,6 +123,7 @@
|
|
|
92
123
|
bannerList: [],
|
|
93
124
|
newsList: [],
|
|
94
125
|
noticeList: [],
|
|
126
|
+
studyList: [],
|
|
95
127
|
|
|
96
128
|
//面板
|
|
97
129
|
newsListUrl: "", //新闻列表url
|
|
@@ -122,21 +154,12 @@
|
|
|
122
154
|
switch (item.container_key) {
|
|
123
155
|
case "banner":
|
|
124
156
|
this.p_getNewsList("banner", "ad").then(res => {
|
|
125
|
-
this.bannerList = res.list
|
|
126
|
-
ban['thumb'] = ban.thumb ? getServiceUrl(ban.thumb) : ""
|
|
127
|
-
return ban;
|
|
128
|
-
});
|
|
157
|
+
this.bannerList = this.handleMapList(res.list);
|
|
129
158
|
})
|
|
130
159
|
break;
|
|
131
160
|
case "news":
|
|
132
161
|
this.p_getNewsList("news", "news").then(res => {
|
|
133
|
-
this.newsList = res.list
|
|
134
|
-
news.created_time = this.$xdUniHelper.getDate(
|
|
135
|
-
news["created_time"] * 1000
|
|
136
|
-
).fullTime;
|
|
137
|
-
news.thumb = news.thumb ? getServiceUrl(news.thumb) : ""
|
|
138
|
-
return news;
|
|
139
|
-
});
|
|
162
|
+
this.newsList = this.handleMapList(res.list);
|
|
140
163
|
})
|
|
141
164
|
break;
|
|
142
165
|
case "notice":
|
|
@@ -144,6 +167,16 @@
|
|
|
144
167
|
this.noticeList = res.list;
|
|
145
168
|
})
|
|
146
169
|
break;
|
|
170
|
+
case "study":
|
|
171
|
+
this.p_getNewsList("study", "news").then(res => {
|
|
172
|
+
this.studyList = this.handleMapList(res.list);
|
|
173
|
+
})
|
|
174
|
+
break;
|
|
175
|
+
case "is_pop":
|
|
176
|
+
if(item.status === 'Y'){
|
|
177
|
+
jfbRootFnExec(this, 'onCustomEvent')("@showBaseBlessDialog", {})
|
|
178
|
+
}
|
|
179
|
+
break;
|
|
147
180
|
}
|
|
148
181
|
})
|
|
149
182
|
})
|
|
@@ -153,8 +186,21 @@
|
|
|
153
186
|
* @param container {object} 业务组件对象自己
|
|
154
187
|
*/
|
|
155
188
|
init(container) {
|
|
156
|
-
this.newsListUrl = getContainerPropsValue(container, 'content.newsListUrl', {value: ""}).value;
|
|
157
|
-
this.newsDetailUrl = getContainerPropsValue(container, 'content.newsDetailUrl', {value: ""}).value;
|
|
189
|
+
this.newsListUrl = getContainerPropsValue(container, 'content.newsListUrl', {value: "/main/saas/newsList"}).value;
|
|
190
|
+
this.newsDetailUrl = getContainerPropsValue(container, 'content.newsDetailUrl', {value: "/main/saas/newsDetail"}).value;
|
|
191
|
+
},
|
|
192
|
+
handleMapList(list){
|
|
193
|
+
return list.map(news => {
|
|
194
|
+
if(news.created_time){
|
|
195
|
+
news.created_time = this.$xdUniHelper.getDate(
|
|
196
|
+
news["created_time"] * 1000
|
|
197
|
+
).fullTime;
|
|
198
|
+
}
|
|
199
|
+
if(news.thumb){
|
|
200
|
+
news.thumb = news.thumb ? getServiceUrl(news.thumb) : ""
|
|
201
|
+
}
|
|
202
|
+
return news;
|
|
203
|
+
})
|
|
158
204
|
},
|
|
159
205
|
p_getNewsList(position_id, scene){
|
|
160
206
|
return jfbRootExec("getNewsList", {
|
|
@@ -167,14 +213,14 @@
|
|
|
167
213
|
}
|
|
168
214
|
})
|
|
169
215
|
},
|
|
170
|
-
toNewsList(){
|
|
216
|
+
toNewsList(position_id){
|
|
171
217
|
this.$xdUniHelper.navigateTo({
|
|
172
|
-
url: `${this.newsListUrl}`,
|
|
218
|
+
url: `${this.newsListUrl}?position_id=${position_id}`,
|
|
173
219
|
});
|
|
174
220
|
},
|
|
175
|
-
toNewsDetail(){
|
|
221
|
+
toNewsDetail(id){
|
|
176
222
|
this.$xdUniHelper.navigateTo({
|
|
177
|
-
url: `${this.newsDetailUrl}`,
|
|
223
|
+
url: `${this.newsDetailUrl}?id=${id}`,
|
|
178
224
|
});
|
|
179
225
|
},
|
|
180
226
|
toBannerLink(item){
|
|
@@ -11,6 +11,65 @@
|
|
|
11
11
|
* @type {*[]}
|
|
12
12
|
*/
|
|
13
13
|
module.exports = [
|
|
14
|
+
{
|
|
15
|
+
mapFnName: "getPlatform",
|
|
16
|
+
title: "登入 - 获取当前平台:根据header头判断",
|
|
17
|
+
path: "/saas/v1/login/platforms",
|
|
18
|
+
isRule: false,
|
|
19
|
+
data: {
|
|
20
|
+
sub_company_id: ['子公司ID', 'String', true],
|
|
21
|
+
callback_url: ['成功后回调URL', 'String', true],
|
|
22
|
+
phone_number_login_url: ['手机号登陆URL', 'String', true],
|
|
23
|
+
error_callback_url: ['错误回调URL', 'String', true],
|
|
24
|
+
phone_auth_callback_url: ['手机认证回调URL', 'String', true]
|
|
25
|
+
},
|
|
26
|
+
isConsole: true,
|
|
27
|
+
disabled: true,
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
mapFnName: "loginDing",
|
|
31
|
+
title: "钉钉登入 - code登陆:返回临时code",
|
|
32
|
+
path: "/saas/v1/login/dd/code-login",
|
|
33
|
+
isRule: false,
|
|
34
|
+
data: {
|
|
35
|
+
sub_company_id: ['子公司ID', 'String', true],
|
|
36
|
+
code: ['钉钉code', 'String', true],
|
|
37
|
+
},
|
|
38
|
+
isConsole: true,
|
|
39
|
+
disabled: true,
|
|
40
|
+
},
|
|
41
|
+
|
|
42
|
+
{
|
|
43
|
+
mapFnName: "loginWxEnter",
|
|
44
|
+
title: "企业微信登入 - code登陆:重定向passport、错误页、手机授权页",
|
|
45
|
+
path: "/saas/v1/login/qw/code-login",
|
|
46
|
+
isRule: false,
|
|
47
|
+
data: {
|
|
48
|
+
sub_company_id: ['子公司ID', 'String', true],
|
|
49
|
+
code: ['钉钉code', 'String', true],
|
|
50
|
+
callback_url: ['成功后回调URL', 'String', true],
|
|
51
|
+
phone_number_login_url: ['手机号登陆URL', 'String', true],
|
|
52
|
+
error_callback_url: ['错误回调URL', 'String', true],
|
|
53
|
+
phone_auth_callback_url: ['手机认证回调URL', 'String', true]
|
|
54
|
+
},
|
|
55
|
+
isConsole: true,
|
|
56
|
+
disabled: true,
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
mapFnName: "passportSaasLogin",
|
|
60
|
+
title: "saas用户登录",
|
|
61
|
+
path: "/passport-pb/v1/user/login-saas",
|
|
62
|
+
isRule: false,
|
|
63
|
+
params: {
|
|
64
|
+
access_token: ['access_token', 'String', true],
|
|
65
|
+
redirect_url: ['跳转地址', 'String', true],
|
|
66
|
+
phone_number: ['手机号', 'String', true],
|
|
67
|
+
valid_code: ['手机验证码', 'String', true],
|
|
68
|
+
biz_name: ['验证码校验参数', 'String', true]
|
|
69
|
+
},
|
|
70
|
+
isConsole: true,
|
|
71
|
+
disabled: true,
|
|
72
|
+
},
|
|
14
73
|
{
|
|
15
74
|
mapFnName: 'sendMsg',
|
|
16
75
|
title: '发送验证码',
|
|
@@ -24,9 +83,9 @@ module.exports = [
|
|
|
24
83
|
disabled: true,
|
|
25
84
|
},
|
|
26
85
|
{
|
|
27
|
-
mapFnName: '
|
|
86
|
+
mapFnName: 'sassPhoneLogin',
|
|
28
87
|
title: '登录',
|
|
29
|
-
path: '/saas/v1/login/check-sms',
|
|
88
|
+
path: '/saas/v1/login/jfb/check-sms',
|
|
30
89
|
isRule: false,
|
|
31
90
|
data: {
|
|
32
91
|
biz_name: ['biz_name', 'String', true],
|
|
@@ -12,7 +12,29 @@ export default {
|
|
|
12
12
|
ele: 'xd-select-pages-path', //package 名称
|
|
13
13
|
valueKey: 'callback_url', //form[valueKey]
|
|
14
14
|
placeholder: '请选择登录成功跳转地址',
|
|
15
|
-
value: null,
|
|
15
|
+
value: data.callback_url || null,
|
|
16
|
+
setting: {
|
|
17
|
+
router: XdBus.getParentApi('getPagesTree'),
|
|
18
|
+
},
|
|
19
|
+
inline: false,
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
label: '手机认证跳转地址:',
|
|
23
|
+
ele: 'xd-select-pages-path',
|
|
24
|
+
valueKey: 'phone_auth_callback_url',
|
|
25
|
+
placeholder: '请选择手机认证跳转地址',
|
|
26
|
+
value: data.phone_auth_callback_url || null,
|
|
27
|
+
setting: {
|
|
28
|
+
router: XdBus.getParentApi('getPagesTree'),
|
|
29
|
+
},
|
|
30
|
+
inline: false,
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
label: '错误跳转地址:',
|
|
34
|
+
ele: 'xd-select-pages-path',
|
|
35
|
+
valueKey: 'error_callback_url',
|
|
36
|
+
placeholder: '请选择错误跳转地址',
|
|
37
|
+
value: data.error_callback_url || null,
|
|
16
38
|
setting: {
|
|
17
39
|
router: XdBus.getParentApi('getPagesTree'),
|
|
18
40
|
},
|