jufubao-third 1.0.22 → 1.0.23-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 +2 -2
- package/src/components/JfbThirdOpenEmbeddedMp/Attr.js +121 -0
- package/src/components/JfbThirdOpenEmbeddedMp/JfbThirdOpenEmbeddedMp.vue +130 -0
- package/src/components/JfbThirdOpenEmbeddedMp/JfbThirdOpenEmbeddedMpLess.less +80 -0
- package/src/components/JfbThirdOpenEmbeddedMp/JfbThirdOpenEmbeddedMpMixin.js +30 -0
- package/src/components/JfbThirdPay/Api.js +2 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "jufubao-third",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.23-beta3",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "聚福宝业务组件第三方购物平台包",
|
|
6
6
|
"main": "index.js",
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"color": "^3.1.3",
|
|
52
52
|
"core-js": "^2.6.5",
|
|
53
53
|
"flyio": "^0.6.2",
|
|
54
|
-
"gxd-uni-library-editx": "1.0.
|
|
54
|
+
"gxd-uni-library-editx": "1.0.207",
|
|
55
55
|
"jweixin-module": "^1.6.0",
|
|
56
56
|
"md5": "^2.3.0",
|
|
57
57
|
"path-to-regexp": "^6.2.1",
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
import {dataVal,getAttrPathMsg} from "@/utils/AttrTools";
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* @description 当表单组件中有联动操作时候,使用方法进行返回
|
|
7
|
+
*/
|
|
8
|
+
export default {
|
|
9
|
+
style: [],
|
|
10
|
+
content: (data={},gValue={},gColor={},oldData) => {
|
|
11
|
+
const cashierURL = getAttrPathMsg(data , 'cashierURL', '收银台');
|
|
12
|
+
return [
|
|
13
|
+
//===base=========
|
|
14
|
+
{
|
|
15
|
+
ele: 'title',
|
|
16
|
+
label: '基础',
|
|
17
|
+
size: 'small',
|
|
18
|
+
groupKey:'content',
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
label: '渠道配置',
|
|
22
|
+
ele: 'xd-site-select-list',
|
|
23
|
+
labelInline: true,
|
|
24
|
+
valueKey: 'channelApi',
|
|
25
|
+
value: dataVal({data, key:'channelApi', dValue:'10', gValue}),
|
|
26
|
+
placeholder: '请选择渠道配置',
|
|
27
|
+
multiple: false,
|
|
28
|
+
className: 'input100',
|
|
29
|
+
groupKey:'content',
|
|
30
|
+
handleCustom({action, data}) {
|
|
31
|
+
XdBus.getParentApi('getOptionsSettingList')({
|
|
32
|
+
setting_id: 'edtix_style_radius1',
|
|
33
|
+
key: Date.now()
|
|
34
|
+
})
|
|
35
|
+
.then(res => {
|
|
36
|
+
res.list = res.list.filter(item=>{
|
|
37
|
+
return item.label !== '无';
|
|
38
|
+
});
|
|
39
|
+
data.cb(res.list)
|
|
40
|
+
})
|
|
41
|
+
.catch(error => {
|
|
42
|
+
console.error(error);
|
|
43
|
+
});
|
|
44
|
+
},
|
|
45
|
+
rules: [
|
|
46
|
+
{
|
|
47
|
+
required: false,
|
|
48
|
+
validator: (rule, value, callback) => {
|
|
49
|
+
let setTpl = dataVal({data, key:'footerTpl', dValue:'normal', gValue});
|
|
50
|
+
if(setTpl === 'itemCenterBig') {
|
|
51
|
+
if(value && value.length === 0) callback('请设置菜单');
|
|
52
|
+
else {
|
|
53
|
+
let errorStr = '';
|
|
54
|
+
if(value && value.length > 0) {
|
|
55
|
+
let len = value.length;
|
|
56
|
+
for(let i = 0; i < len; i++) {
|
|
57
|
+
if(value[i].name.length > 5) {
|
|
58
|
+
errorStr = `菜单${i}最大长度不能超过5个汉字`;
|
|
59
|
+
break
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
if(errorStr) {
|
|
64
|
+
callback(errorStr)
|
|
65
|
+
}else callback();
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
else callback()
|
|
69
|
+
},
|
|
70
|
+
trigger: 'blur'
|
|
71
|
+
}
|
|
72
|
+
],
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
label: '',
|
|
76
|
+
ele: 'el-input',
|
|
77
|
+
type: 'text',
|
|
78
|
+
groupKey: 'content',
|
|
79
|
+
valueKey: 'channelApiBase',
|
|
80
|
+
value: 'v2.0',
|
|
81
|
+
hidden: true,
|
|
82
|
+
},
|
|
83
|
+
|
|
84
|
+
//===advanced=========
|
|
85
|
+
{
|
|
86
|
+
label: cashierURL.label,
|
|
87
|
+
ele: 'xd-select-pages-path',
|
|
88
|
+
valueKey: cashierURL['key'],
|
|
89
|
+
groupKey:'advanced',
|
|
90
|
+
placeholder: cashierURL.hold,
|
|
91
|
+
value: cashierURL.path,
|
|
92
|
+
labelInline:true,
|
|
93
|
+
className: 'input100',
|
|
94
|
+
setting: {
|
|
95
|
+
mode:'new',
|
|
96
|
+
router: XdBus.getParentApi('getPagesTree'),
|
|
97
|
+
},
|
|
98
|
+
inline: false,
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
label: '版本号:',
|
|
102
|
+
ele: 'el-input',
|
|
103
|
+
type: 'text',
|
|
104
|
+
groupKey: 'advanced',
|
|
105
|
+
valueKey: 'version',
|
|
106
|
+
value: 'v2.0',
|
|
107
|
+
hidden: true,
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
label: '过滤引用模版字段:',
|
|
111
|
+
ele: 'el-input',
|
|
112
|
+
type: 'text',
|
|
113
|
+
groupKey: 'advanced',
|
|
114
|
+
valueKey: 'refFilterKey',
|
|
115
|
+
value: '[]',
|
|
116
|
+
hidden: true,
|
|
117
|
+
},
|
|
118
|
+
].filter(i=>i)
|
|
119
|
+
},
|
|
120
|
+
advanced: [],
|
|
121
|
+
};
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<view
|
|
3
|
+
class="jfb-third-open-embedded-mp"
|
|
4
|
+
@click="handleEditxSelect"
|
|
5
|
+
:class="{ editx : isEditx && active }"
|
|
6
|
+
>
|
|
7
|
+
<!--#ifdef H5-->
|
|
8
|
+
<view
|
|
9
|
+
class="jfb-third-open-embedded-mp__edit"
|
|
10
|
+
:class="{ editx : isEditx && active }"
|
|
11
|
+
v-if="isEditx && active"
|
|
12
|
+
>
|
|
13
|
+
<view class="jfb-third-open-embedded-mp__edit-icon" @click.stop="delEdit">
|
|
14
|
+
<xd-font-icon icon="iconshanchu-01" color="#fff" size="30"></xd-font-icon>
|
|
15
|
+
</view>
|
|
16
|
+
</view>
|
|
17
|
+
<!-- #endif -->
|
|
18
|
+
<view class="jfb-third-open-embedded-mp__body">
|
|
19
|
+
<view class="pop" :style="[noDataStyleComp]">弹窗模式方便编辑(占位),在线上此模块不显</view>
|
|
20
|
+
</view>
|
|
21
|
+
</view>
|
|
22
|
+
</template>
|
|
23
|
+
|
|
24
|
+
<script>
|
|
25
|
+
import XdFontIcon from "@/components/XdFontIcon/XdFontIcon";
|
|
26
|
+
import JfbThirdOpenEmbeddedMpMixin from "./JfbThirdOpenEmbeddedMpMixin";
|
|
27
|
+
import { gCPVal } from "@/utils/xd.base";
|
|
28
|
+
import componentsMixins from "@/mixins/componentsMixins";
|
|
29
|
+
import extsMixins from "@/mixins/extsMixins";
|
|
30
|
+
import {mapState} from "vuex";
|
|
31
|
+
import {getNoUrl} from "@/utils/nourl";
|
|
32
|
+
import Color from "color";
|
|
33
|
+
|
|
34
|
+
export default {
|
|
35
|
+
name: "JfbThirdOpenEmbeddedMp",
|
|
36
|
+
components: {
|
|
37
|
+
XdFontIcon
|
|
38
|
+
},
|
|
39
|
+
mixins: [
|
|
40
|
+
componentsMixins, extsMixins, JfbThirdOpenEmbeddedMpMixin
|
|
41
|
+
],
|
|
42
|
+
data() {
|
|
43
|
+
return {
|
|
44
|
+
backgroundColor: '',//提示信息背景
|
|
45
|
+
isPreview: false,
|
|
46
|
+
|
|
47
|
+
//基础
|
|
48
|
+
channelApi:'',
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
//高级
|
|
52
|
+
cashierURL:'',
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
computed:{
|
|
56
|
+
...mapState(['extraData']),
|
|
57
|
+
|
|
58
|
+
noDataStyleComp(){
|
|
59
|
+
let height = '60rpx';
|
|
60
|
+
if(!this.isPreview) height = 0;
|
|
61
|
+
return {
|
|
62
|
+
backgroundColor:this.backgroundColor,
|
|
63
|
+
color:this.warningColor,
|
|
64
|
+
minHeight: height,
|
|
65
|
+
textAlign: 'center',
|
|
66
|
+
lineHeight: height,
|
|
67
|
+
fontSize: '24rpx',
|
|
68
|
+
padding: '16rpx',
|
|
69
|
+
overflow: 'hidden'
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
},
|
|
73
|
+
watch: {
|
|
74
|
+
container(value, oldValue) {
|
|
75
|
+
if (JSON.stringify(value) === JSON.stringify(oldValue)) return;
|
|
76
|
+
if (this.$configProject['isPreview']) this.init(value)
|
|
77
|
+
},
|
|
78
|
+
extraData:{
|
|
79
|
+
deep: true,
|
|
80
|
+
handler(value){
|
|
81
|
+
this.requestApi(value)
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
created() {
|
|
86
|
+
this.backgroundColor = Color(this.warningColor).alpha(0.2).toString();
|
|
87
|
+
this.isPreview = this.$configProject['isPreview'];
|
|
88
|
+
|
|
89
|
+
this.init(this.container);
|
|
90
|
+
},
|
|
91
|
+
methods: {
|
|
92
|
+
/**
|
|
93
|
+
* @description 请求三方接口
|
|
94
|
+
*/
|
|
95
|
+
requestApi(params){
|
|
96
|
+
this.$xdShowLoading({});
|
|
97
|
+
//打包模式
|
|
98
|
+
getNoUrl(params)
|
|
99
|
+
.then(res => {
|
|
100
|
+
|
|
101
|
+
})
|
|
102
|
+
.catch(error => {
|
|
103
|
+
console.log(error)
|
|
104
|
+
});
|
|
105
|
+
|
|
106
|
+
},
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* @description 监听事件变化
|
|
110
|
+
* @param container {object} 业务组件对象自己
|
|
111
|
+
*/
|
|
112
|
+
init(container) {
|
|
113
|
+
this.channelApi = gCPVal(container, 'channelApi', '');
|
|
114
|
+
this.cashierURL = gCPVal(container, 'cashierURL', {value: 'cashierURL'}).value;
|
|
115
|
+
},
|
|
116
|
+
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
</script>
|
|
121
|
+
|
|
122
|
+
<style scoped lang="less">
|
|
123
|
+
@import "./JfbThirdOpenEmbeddedMpLess.less";
|
|
124
|
+
|
|
125
|
+
.jfb-third-open-embedded-mp {
|
|
126
|
+
&__body{
|
|
127
|
+
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
</style>
|
|
@@ -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-third-open-embedded-mp {
|
|
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-third-open-embedded-mp {
|
|
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-third-open-embedded-mp'
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
created() {
|
|
23
|
+
|
|
24
|
+
//@AttrDataCreated
|
|
25
|
+
this.Attr = this.$xdUniHelper.customClone(Attr);
|
|
26
|
+
//@EndAttrDataCreated
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
},
|
|
30
|
+
}
|
|
@@ -15,7 +15,8 @@ module.exports = [
|
|
|
15
15
|
{
|
|
16
16
|
mapFnName: 'getThirdListCards',
|
|
17
17
|
title: '三方 - 展示可选卡券列表',
|
|
18
|
-
path: "/mall/v1/order/list-binded-cards/thirdmall",
|
|
18
|
+
//path: "/mall/v1/order/list-binded-cards/thirdmall",
|
|
19
|
+
path:"/thirdmall/v1/order/list-binded-cards",
|
|
19
20
|
isRule: false,
|
|
20
21
|
params: {
|
|
21
22
|
},
|