jufubao-base 1.0.116-beta3 → 1.0.116-beta4

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.
Files changed (36) hide show
  1. package/package.json +1 -1
  2. package/src/components/JfbBaseConDialog/XdCouCardBind.vue +2 -1
  3. package/src/components/JfbBaseConList/JfbBaseConList.vue +1 -1
  4. package/src/components/JfbBaseConPhone/Api.js +60 -0
  5. package/src/components/JfbBaseConPhone/JfbBaseConPhone.vue +110 -0
  6. package/src/components/JfbBaseConPhone/JfbBaseConPhoneLess.less +80 -0
  7. package/src/components/JfbBaseConPhone/JfbBaseConPhoneMixin.js +18 -0
  8. package/src/components/JfbBaseConPhone/Mock.js +5 -0
  9. package/src/components/JfbBasePhoneCollect/JfbBasePhoneCollect.vue +1 -1
  10. package/src/components/JfbBaseSaasBlessDetail/Api.js +21 -22
  11. package/src/components/JfbBaseSaasBlessDetail/Attr.js +6 -88
  12. package/src/components/JfbBaseSaasBlessDetail/JfbBaseSaasBlessDetail.vue +100 -12
  13. package/src/components/JfbBaseSaasBlessDialog/Api.js +4 -39
  14. package/src/components/JfbBaseSaasBlessDialog/Attr.js +2 -2
  15. package/src/components/JfbBaseSaasBlessDialog/JfbBaseSaasBlessDialog.vue +14 -5
  16. package/src/components/JfbBaseSaasBlessReceive/Api.js +4 -39
  17. package/src/components/JfbBaseSaasBlessReceive/Attr.js +6 -88
  18. package/src/components/JfbBaseSaasBlessReceive/JfbBaseSaasBlessReceive.vue +29 -18
  19. package/src/components/JfbBaseSaasHome/Api.js +14 -26
  20. package/src/components/JfbBaseSaasHome/Attr.js +15 -86
  21. package/src/components/JfbBaseSaasHome/JfbBaseSaasHome.vue +131 -60
  22. package/src/components/JfbBaseSaasLogin/Api.js +13 -0
  23. package/src/components/JfbBaseSaasLogin/Attr.js +11 -11
  24. package/src/components/JfbBaseSaasLogin/JfbBaseSaasLogin.vue +64 -7
  25. package/src/components/JfbBaseSaasNewsDetail/Api.js +6 -39
  26. package/src/components/JfbBaseSaasNewsDetail/Attr.js +2 -94
  27. package/src/components/JfbBaseSaasNewsDetail/JfbBaseSaasNewsDetail.vue +26 -22
  28. package/src/components/JfbBaseSaasNewsList/Api.js +5 -39
  29. package/src/components/JfbBaseSaasNewsList/Attr.js +6 -88
  30. package/src/components/JfbBaseSaasNewsList/JfbBaseSaasNewsList.vue +45 -19
  31. package/src/components/JfbBaseSassPhoneCollect/Api.js +39 -0
  32. package/src/components/JfbBaseSassPhoneCollect/Attr.js +438 -0
  33. package/src/components/JfbBaseSassPhoneCollect/JfbBaseSassPhoneCollect.vue +266 -0
  34. package/src/components/JfbBaseSassPhoneCollect/JfbBaseSassPhoneCollectLess.less +80 -0
  35. package/src/components/JfbBaseSassPhoneCollect/JfbBaseSassPhoneCollectMixin.js +30 -0
  36. package/src/components/JfbBaseSassPhoneCollect/Mock.js +5 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jufubao-base",
3
- "version": "1.0.116-beta3",
3
+ "version": "1.0.116-beta4",
4
4
  "private": false,
5
5
  "description": "聚福宝业务组件基础插件包",
6
6
  "main": "index.js",
@@ -20,7 +20,8 @@
20
20
  type="primary"
21
21
  :disabled="item.remain_card_count == 0"
22
22
  :style="{
23
- backgroundImage: item.btnImage
23
+ backgroundImage: item.btnImage,
24
+ backgroundSize: '100% 100%',
24
25
  }"
25
26
  @click="getCoupont(item)"
26
27
  >{{item.btn_txt}}</xd-button>
@@ -211,7 +211,7 @@ export default {
211
211
  backgroundImage: `url(${getServiceUrl(
212
212
  item.can_take_num === "Y" ? res.app_coupon_button_see_url : res.app_coupon_button_bg_url
213
213
  )})`,
214
- backgroundSize: "100%",
214
+ backgroundSize: "100% 100%",
215
215
  backgroundRepeat: "no-repeat",
216
216
  backgroundColor: '',
217
217
  margin: "0",
@@ -0,0 +1,60 @@
1
+ 'use strict';
2
+
3
+ /**
4
+ * @description API模型
5
+ * 建议:Ffff=>模块 Xxxx=>自定义名字
6
+ * 获取单记录(getByIdFfffXxxx)
7
+ * 获取列表记录(getByListFfffXxxx)
8
+ * 添加列表记录(addFfffXxxxx)
9
+ * 删除列表记录(removeFfffXxxxx|deleteFfffXxxx)
10
+ * 更新列表记录(updateFfffXxxxx)
11
+ * @type {*[]}
12
+ */
13
+ module.exports = [
14
+ {
15
+ mapFnName: 'getByIdFilmSquate', //自定义方法名字(必选)
16
+ title: '获取电影广场列表',
17
+ path: '/api/account/film/list-film-square',
18
+ isRule: false,
19
+ params: {
20
+ last_key: ['当前页', 'Number', '必选'],
21
+ page_size: ['每页数量', 'Number', '必选'],
22
+ },
23
+ isConsole: true,
24
+ disabled: true,
25
+ },
26
+ {
27
+ mapFnName: 'updateFilmPaiqiDate', //自定义方法名字(必选)
28
+ title: '更新排期',
29
+ path: '/api/account/film/paiqi-date',
30
+ isRule: false,
31
+ params: {
32
+ film_id: ['电影id', 'Number', '必选'],
33
+ cinema_id: ['影院id', 'Number', '必选'],
34
+ },
35
+ isConsole: true,
36
+ disabled: true,
37
+ },
38
+ {
39
+ mapFnName: 'removeFilmAddress', //自定义方法名字(必选)
40
+ title: '删除我的配送地址',
41
+ path: '/api/account/film/paiqi-date',
42
+ isRule: false,
43
+ params: {
44
+ film_id: ['电影id', 'Number', '必选'],
45
+ },
46
+ isConsole: true,
47
+ disabled: true,
48
+ },
49
+ {
50
+ mapFnName: 'addFilmcart', //自定义方法名字(必选)
51
+ title: '添加购物车',
52
+ path: '/api/account/film/paiqi-date',
53
+ isRule: false,
54
+ params: {
55
+ film_id: ['电影id', 'Number', '必选'],
56
+ },
57
+ isConsole: true,
58
+ disabled: true,
59
+ },
60
+ ];
@@ -0,0 +1,110 @@
1
+ <template>
2
+ <view
3
+ class="jfb-base-con-phone"
4
+ @click="handleEditxSelect"
5
+ :class="{ editx : isEditx && active }"
6
+ >
7
+ <!--#ifdef H5-->
8
+ <view
9
+ class="jfb-base-con-phone__edit"
10
+ :class="{ editx : isEditx && active }"
11
+ v-if="isEditx && active"
12
+ >
13
+ <view class="jfb-base-con-phone__edit-icon" @click="delEdit">删除</view>
14
+ </view>
15
+ <!-- #endif -->
16
+ <view class="jfb-base-con-phone__body">
17
+ <view>测试插件( {{containerId}} )</view>
18
+ </view>
19
+ </view>
20
+ </template>
21
+
22
+ <script>
23
+ import XdFontIcon from "@/components/XdFontIcon/XdFontIcon";
24
+ import { jfbRootExec } from "@/utils/xd.event";
25
+ import JfbBaseConPhoneMixin from "./JfbBaseConPhoneMixin";
26
+ import { getContainerPropsValue } from "@/utils/xd.base";
27
+ import componentsMixins from "@/mixins/componentsMixins";
28
+ import extsMixins from "@/mixins/extsMixins";
29
+ export default {
30
+ name: "JfbBaseConPhone",
31
+ components: {
32
+ XdFontIcon
33
+ },
34
+ mixins: [
35
+ componentsMixins, extsMixins, JfbBaseConPhoneMixin
36
+ ],
37
+ data() {
38
+ return {
39
+
40
+ //todo
41
+ }
42
+ },
43
+ watch: {
44
+ container(value) {
45
+ this.init(value)
46
+ }
47
+ },
48
+ created() {
49
+ this.init(this.container);
50
+
51
+ //todo
52
+ },
53
+ methods: {
54
+ onJfbLoad(options) {
55
+
56
+ // jfbRootExec('baiduUserLogin', {
57
+
58
+ // vm: this,// data: {
59
+
60
+ // account: 'gaoshiyong',// password: '123456789',// type: 3,// ...options
61
+
62
+ // }
63
+
64
+ // }).then().catch()
65
+ },
66
+ /**
67
+ * @description 监听事件变化
68
+ * @param container {object} 业务组件对象自己
69
+ */
70
+ init(container) {
71
+
72
+ //this.bgcolor = getContainerPropsValue(container, 'content.bgcolor', '#fff');
73
+
74
+ //this.height = getContainerPropsValue(container, 'content.height', 10);
75
+ },
76
+ onJfbScroll(options) {
77
+ console.log('event.onJfbScroll', options)
78
+ },
79
+ onJfbReachBottom(options) {
80
+ console.log('event.onJfbReachBottom', options)
81
+ },
82
+ onJfbShow(options) {
83
+ console.log('event.onJfbShow', options)
84
+ },
85
+ onJfbHide(options) {
86
+ console.log('event.onJfbHide', options)
87
+ },
88
+ onJfbBack(options) {
89
+ console.log('event.onJfbBack', options)
90
+ },
91
+ onJfbUpdate(...data) {
92
+ console.log('event.onJfbUpdate', data)
93
+ },
94
+ onJfbCustomEvent(options) {
95
+ console.log('event.onJfbReachBottom', options)
96
+ },
97
+ }
98
+ }
99
+
100
+ </script>
101
+
102
+ <style scoped lang="less">
103
+ @import "./JfbBaseConPhoneLess.less";
104
+
105
+ .jfb-base-con-phone {
106
+ &__body{
107
+
108
+ }
109
+ }
110
+ </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-base-con-phone {
16
+ border: 1px dashed rgba(0, 0, 0, 0);
17
+ box-sizing: border-box;
18
+ min-height: unit(50, rpx);
19
+
20
+ &__body{
21
+ position: relative;
22
+ overflow: hidden;
23
+ z-index: 2
24
+ }
25
+
26
+ &.editx {
27
+ position: relative;
28
+ border: 1px dashed blue;
29
+ box-sizing: border-box;
30
+ z-index: 3
31
+
32
+ }
33
+
34
+ &:hover {
35
+ border: 1px dashed blue;
36
+ }
37
+
38
+ &.noBorder {
39
+ border-color: rgba(0,0,0,0);
40
+ border-width: 0;
41
+ }
42
+
43
+
44
+ &__edit {
45
+ cursor: pointer;
46
+ position: absolute;
47
+ right: unit(0, rpx);
48
+ top: unit(-52, rpx);
49
+ height: unit(50, rpx);
50
+ line-height: unit(50, rpx);
51
+ display: flex;
52
+ justify-content: center;
53
+ align-items: center;
54
+ background: rgba(0, 0, 0, .6);
55
+ border-radius: unit(10, rpx);
56
+ box-shadow: 0 0 10px rbga(0, 0, 0, 0.3);
57
+ color: #fff;
58
+ font-size: unit(22, rpx);
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-base-con-phone {
75
+ &:before {
76
+ content: " ";
77
+ display: table;
78
+ }
79
+ }
80
+ /**endNotPreview**/
@@ -0,0 +1,18 @@
1
+ 'use strict';
2
+
3
+
4
+
5
+ export default {
6
+ data() {
7
+ return {
8
+ //#ifdef H5
9
+
10
+ // #endif
11
+ cssRoot: 'jfb-base-con-phone'
12
+ }
13
+ },
14
+ created() {
15
+
16
+
17
+ },
18
+ }
@@ -0,0 +1,5 @@
1
+ 'use strict';
2
+
3
+ module.exports = {
4
+ aaaa: {}
5
+ }
@@ -93,7 +93,6 @@
93
93
  <script>
94
94
  import XdFontIcon from "@/components/XdFontIcon/XdFontIcon";
95
95
  import { jfbRootExec } from "@/utils/xd.event";
96
- import JfbBasePhoneCollectMixin from "./JfbBasePhoneCollectMixin";
97
96
  import componentsMixins from "@/mixins/componentsMixins";
98
97
  import extsMixins from "@/mixins/extsMixins";
99
98
  import { getContainerPropsValue } from "@/utils/xd.base";
@@ -102,6 +101,7 @@ import XdForm from "@/components/XdForm/XdForm";
102
101
  import XdFormInput from "@/components/XdFormInput/XdFormInput";
103
102
  import XdButton from "@/components/XdButton/XdButton";
104
103
  import XdFormCheckbox from "@/components/XdFormCheckbox/XdFormCheckbox";
104
+ import JfbBasePhoneCollectMixin from "./JfbBasePhoneCollectMixin";
105
105
 
106
106
  export default {
107
107
  name: "JfbBasePhoneCollect",
@@ -12,49 +12,48 @@
12
12
  */
13
13
  module.exports = [
14
14
  {
15
- mapFnName: 'getByIdFilmSquate', //自定义方法名字(必选)
16
- title: '获取电影广场列表',
17
- path: '/api/account/film/list-film-square',
15
+ mapFnName: 'getBlessDetail',
16
+ title: '祝福 - 详情',
17
+ path: '/saas/v1/bless/item/:bless_id',
18
18
  isRule: false,
19
19
  params: {
20
- last_key: ['当前页', 'Number', '必选'],
21
- page_size: ['每页数量', 'Number', '必选'],
20
+ bless_id: ['bless_id', 'Number', '必选'],
22
21
  },
23
22
  isConsole: true,
24
23
  disabled: true,
25
24
  },
26
25
  {
27
- mapFnName: 'updateFilmPaiqiDate', //自定义方法名字(必选)
28
- title: '更新排期',
29
- path: '/api/account/film/paiqi-date',
26
+ mapFnName: 'doSignBless',
27
+ title: '祝福 - 签收',
28
+ path: '/saas/v1/bless/sign/:bless_id',
30
29
  isRule: false,
31
- params: {
32
- film_id: ['电影id', 'Number', '必选'],
33
- cinema_id: ['影院id', 'Number', '必选'],
30
+ data: {
31
+ bless_id: ['bless_id', 'Number', '必选'],
34
32
  },
35
33
  isConsole: true,
36
34
  disabled: true,
37
35
  },
38
36
  {
39
- mapFnName: 'removeFilmAddress', //自定义方法名字(必选)
40
- title: '删除我的配送地址',
41
- path: '/api/account/film/paiqi-date',
37
+ mapFnName: "getOssSign",
38
+ title: "获取上传参数",
39
+ path: "/common-user/v1/h5-oss/sign",
42
40
  isRule: false,
43
- params: {
44
- film_id: ['电影id', 'Number', '必选'],
41
+ data: {
42
+
45
43
  },
46
44
  isConsole: true,
47
45
  disabled: true,
48
46
  },
49
47
  {
50
- mapFnName: 'addFilmcart', //自定义方法名字(必选)
51
- title: '添加购物车',
52
- path: '/api/account/film/paiqi-date',
48
+ mapFnName: "doOssUpload",
49
+ title: "开启oss上传",
50
+ path: "/common-user/v1/h5-oss/upload",
53
51
  isRule: false,
54
- params: {
55
- film_id: ['电影id', 'Number', '必选'],
52
+ data: {
53
+ file_name: ['file_name', 'String', true],
54
+ file: ['file', 'file', true]
56
55
  },
57
56
  isConsole: true,
58
57
  disabled: true,
59
- },
58
+ }
60
59
  ];
@@ -8,99 +8,17 @@ export default {
8
8
  content: (data) => {
9
9
  return [
10
10
  {
11
- label: '背景颜色:', //label
12
- ele: 'xd-color', //package 名称
13
- valueKey: 'bgcolor', //form[valueKey]
14
- value: data.bgcolor || '', //v-model
15
- placeholder: '请输入占位框背景颜色',
16
- classNmae: 'input80', //样式名称 //input100,input80,input70,input60,input50,input40,input30,input20,
17
- rules: [
18
- {
19
- required: true,
20
- message: '请输入占位框背景颜色',
21
- trigger: 'blur'
22
- },
23
- ]
24
- },
25
- {
26
- label: '选中路径:', //label
11
+ label: '使用祝福券跳转地址:', //label
27
12
  ele: 'xd-select-pages-path', //package 名称
28
- valueKey: 'select-pages-path', //form[valueKey]
29
- value: data['select-pages-path'] || {},
13
+ valueKey: 'useTicketUrl', //form[valueKey]
14
+ placeholder: '请选择使用祝福券跳转地址',
15
+ value: null,
30
16
  setting: {
31
- router: XdBus.getParentApi('getPagesTree')
17
+ router: XdBus.getParentApi('getPagesTree'),
32
18
  },
33
19
  inline: false,
34
20
  },
35
- data.bgcolor && {
36
- label: '高度:', //label
37
- ele: 'el-input', //package 名称
38
- type: 'number',
39
- valueKey: 'height', //form[valueKey]
40
- value: data.height || 100, //v-model
41
- placeholder: '请输入占位框高度,单位像素,默认:10px',
42
- className: 'input80', //样式名称 //input100,input80,input70,input60,input50,input40,input30,input20,
43
- rules: [
44
- {
45
- required: true,
46
- message: '请输入占位框高度',
47
- trigger: 'blur'
48
- },
49
- ]
50
- },
51
- {
52
- label: '', //label
53
- ele: 'slot', //package 名称
54
- slot: 'is_reference',
55
- },
56
21
  ].filter(i=>i)
57
22
  },
58
- advanced: [
59
- {
60
- label: '背景颜色:', //label
61
- ele: 'xd-color', //package 名称
62
- valueKey: 'bgcolor', //form[valueKey]
63
- value: '', //v-model
64
- placeholder: '请输入占位框背景颜色',
65
- classNmae: 'input80', //样式名称 //input100,input80,input70,input60,input50,input40,input30,input20,
66
- rules: [
67
- {
68
- required: true,
69
- message: '请输入占位框背景颜色',
70
- trigger: 'blur'
71
- },
72
- ]
73
- },
74
- {
75
- label: '选中路径:', //label
76
- ele: 'xd-select-pages-path', //package 名称
77
- valueKey: 'select-pages-path', //form[valueKey]
78
- value: null,
79
- setting: {
80
- router: XdBus.getParentApi('getPagesTree')
81
- },
82
- inline: false,
83
- },
84
- {
85
- label: '高度:', //label
86
- ele: 'el-input', //package 名称
87
- type: 'number',
88
- valueKey: 'height', //form[valueKey]
89
- value: null, //v-model
90
- placeholder: '请输入占位框高度,单位像素,默认:10px',
91
- classNmae: 'input80', //样式名称 //input100,input80,input70,input60,input50,input40,input30,input20,
92
- rules: [
93
- {
94
- required: true,
95
- message: '请输入占位框高度',
96
- trigger: 'blur'
97
- },
98
- ]
99
- },
100
- {
101
- label: '', //label
102
- ele: 'slot', //package 名称
103
- slot: 'is_reference',
104
- },
105
- ],
23
+ advanced: [],
106
24
  };
@@ -19,7 +19,10 @@
19
19
  <view class="dear">亲爱的张珊珊:</view>
20
20
  <view class="desc">同事好比亲兄弟,一个单位共努力,加班加点在一起,齐心协力拼业绩,新年春节悄然到身旁,祝福送你好兄弟,合家欢乐福相伴,年年有余好运随,新年春节快乐哟!</view>
21
21
  <view class="salute">某某公司致上</view>
22
- <xd-button class="sign_btn" style="width: 250rpx;" type="primary">去签收</xd-button>
22
+ <xd-button class="sign_btn"
23
+ style="width: 250rpx;" type="primary"
24
+ @click="showSign"
25
+ >去签收</xd-button>
23
26
  </view>
24
27
  </view>
25
28
  <xd-dailog :show.sync="dialogShow" title="" class="my_dialog">
@@ -43,7 +46,7 @@
43
46
  <view class="sign_ticket">祝福券 X1张</view>
44
47
  </view>
45
48
  <view slot="btn">
46
- <xd-button style="width: 280rpx;" type="primary">去使用</xd-button>
49
+ <xd-button style="width: 280rpx;" type="primary" @click="toUseTicket">去使用</xd-button>
47
50
  </view>
48
51
  </xd-dailog>
49
52
  </view>
@@ -55,6 +58,7 @@
55
58
  import XdButton from "@/components/XdButton/XdButton";
56
59
  import XdDailog from "@/components/XdDailog/XdDailog"
57
60
  import XdSignature from "@/components/XdSignature/XdSignature"
61
+ import XdUpload from "@/components/XdUpload/XdUpload"
58
62
  import { jfbRootExec } from "@/utils/xd.event";
59
63
  import JfbBaseSaasBlessDetailMixin from "./JfbBaseSaasBlessDetailMixin";
60
64
  import { getContainerPropsValue } from "@/utils/xd.base";
@@ -66,15 +70,21 @@
66
70
  XdFontIcon,
67
71
  XdButton,
68
72
  XdDailog,
69
- XdSignature
73
+ XdSignature,
74
+ XdUpload
70
75
  },
71
76
  mixins: [
72
77
  componentsMixins, extsMixins, JfbBaseSaasBlessDetailMixin
73
78
  ],
74
79
  data() {
75
80
  return {
76
- dialogShow: true,
81
+ dialogShow: false,
77
82
  dialogSuccess: false,
83
+ sign_image_url: "",
84
+ bless_id: "",
85
+
86
+ //面板
87
+ useTicketUrl: "", //使用券跳转地址
78
88
  }
79
89
  },
80
90
  watch: {
@@ -89,7 +99,7 @@
89
99
  },
90
100
  methods: {
91
101
  onJfbLoad(options) {
92
-
102
+ this.bless_id = options.bless_id;
93
103
  },
94
104
  /**
95
105
  * @description 监听事件变化
@@ -97,24 +107,101 @@
97
107
  */
98
108
  init(container) {
99
109
 
110
+ },
111
+ showSign(){
112
+ this.dialogShow = true;
100
113
  },
101
114
  clearSign(){
102
115
  this.$refs.signatureRef.clear()
103
116
  },
117
+ toUseTicket(){
118
+ this.$xdUniHelper.navigateTo({
119
+ url: `${this.useTicketUrl}`,
120
+ });
121
+ },
104
122
  submitSign(){
105
123
  this.$refs.signatureRef.canvasToTempFilePath({
106
- success: (res) => {
124
+ success: async (res) => {
107
125
  console.log(res);
108
- // 是否为空画板 无签名
109
- console.log(res.isEmpty)
110
- // 生成图片的临时路径
111
- // H5 生成的是base64
112
- this.url = res.tempFilePath
126
+ let url = res.tempFilePath
127
+ if(!res.isEmpty){
128
+ //上传签名图片
129
+ await this.doSubmitSign(url);
130
+ //提交签名
131
+ await this.p_doSignBless();
132
+ this.dialogShow = false;
133
+ this.dialogSuccess = true;
134
+ }
135
+ }
136
+ })
137
+ },
138
+ p_doSignBless(){
139
+ return new Promise((resolve, reject) => {
140
+ jfbRootExec("doSignBless", {
141
+ vm: this,
142
+ data: {
143
+ bless_id: this.bless_id,
144
+ sign_image_url: this.sign_image_url
113
145
  }
146
+ }).then(res => {
147
+ resolve(res);
148
+ }).catch(err => {
149
+ reject(err);
150
+ })
114
151
  })
152
+
153
+ },
154
+ doSubmitSign(url){
155
+ let fileName = "sign.png";
156
+ let file = this.base64ToFile(url,fileName);
157
+
158
+ return new Promise((resolve,reject) => {
159
+ jfbRootExec("getOssSign", {
160
+ vm: this,
161
+ data: { name: fileName }
162
+ }).then(res => {
163
+ console.log(res);
164
+ let OSSAccessKeyId = res['id']
165
+ let cdnUrl = res['cdn_url']
166
+ delete res['id']
167
+ delete res['cdn_url']
168
+
169
+ uni.uploadFile({
170
+ url: res.action,
171
+ file: file,
172
+ name: 'file',
173
+ formData: {
174
+ ...res,
175
+ OSSAccessKeyId: OSSAccessKeyId,
176
+ name: fileName,
177
+ cdnUrl: cdnUrl,
178
+ success_action_status: 200
179
+ },
180
+ success: (res) => {
181
+ this.sign_image_url = cdnUrl;
182
+ resolve(cdnUrl);
183
+ }
184
+ })
185
+ }).catch(err => {
186
+ reject();
187
+ })
188
+ })
189
+
190
+ // this.dialogSuccess = true;
191
+ },
192
+ base64ToFile(base64String, filename){
193
+ var arr = base64String.split(',');
194
+ var mime = arr[0].match(/:(.*?);/)[1];
195
+ var bstr = atob(arr[1]);
196
+ var n = bstr.length;
197
+ var u8arr = new Uint8Array(n);
198
+ while(n--) {
199
+ u8arr[n] = bstr.charCodeAt(n);
200
+ }
201
+ return new File([u8arr], filename, {type:mime});
115
202
  },
116
203
  onJfbScroll(options) {
117
- console.log('event.onJfbScroll', options)
204
+
118
205
  },
119
206
  onJfbReachBottom(options) {
120
207
  console.log('event.onJfbReachBottom', options)
@@ -127,6 +214,7 @@
127
214
  },
128
215
  onJfbBack(options) {
129
216
  console.log('event.onJfbBack', options)
217
+ this.$xdUniHelper.navigateBack();
130
218
  },
131
219
  onJfbUpdate(...data) {
132
220
  console.log('event.onJfbUpdate', data)