gxd-uni-library-editx 1.0.90 → 1.0.91-beta2

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gxd-uni-library-editx",
3
- "version": "1.0.90",
3
+ "version": "1.0.91-beta2",
4
4
  "private": false,
5
5
  "description": "聚福宝基础插件专用库",
6
6
  "main": "index.js",
@@ -57,6 +57,7 @@
57
57
  class="ticket_item"
58
58
  v-for="ticket in showCardList"
59
59
  :key="ticket.card_number"
60
+ @click="handlerTicketSelect(!checkedCards.includes(ticket.card_number), ticket)"
60
61
  >
61
62
  <view class="_header">
62
63
  <view class="flex align-center">
@@ -68,28 +69,15 @@
68
69
  ></xd-font-icon>
69
70
  {{ticket.card_type_name}}
70
71
  </view>
71
- <!-- #ifdef H5 -->
72
- <xd-radio
73
- :disabled="cardIsDisabled(ticket)"
74
- size="mini"
75
- @change="flat => handlerTicketSelect(flat, ticket)"
76
- :value="checkedCards.includes(ticket.card_number)"
77
- ></xd-radio>
78
- <!-- #endif -->
79
- <!-- #ifdef MP-WEIXIN -->
72
+ <view v-if="ticket.is_login === 'Y'">
73
+ <view class="login_card" :style="{color: style.$mainColor, backgroundColor: $mainBgColor}">已登录</view>
74
+ </view>
80
75
  <xd-radio
81
- v-if="checkedCards.includes(ticket.card_number)"
82
76
  :disabled="cardIsDisabled(ticket)"
83
77
  size="mini"
84
- @change="flat => handlerTicketSelect(flat, ticket)"
78
+ :isClickEvent="false"
85
79
  :value="checkedCards.includes(ticket.card_number)"
86
80
  ></xd-radio>
87
- <view v-else>
88
- <view class="like-radio-wrap" @click="handlerTicketSelect(true, ticket)">
89
- <view class="like-radio" :class="{disabled: cardIsDisabled(ticket) }"></view>
90
- </view>
91
- </view>
92
- <!-- #endif -->
93
81
  </view>
94
82
  <view class="_cont">
95
83
  <view style="margin-right: 30rpx;">ID:{{ticket.card_number}}</view>
@@ -232,6 +220,7 @@ import XdRadio from "@/components/XdRadio/XdRadio"
232
220
  import XdForm from "@/components/XdForm/XdForm"
233
221
  import XdFormItem from "@/components/XdFormItem/XdFormItem"
234
222
  import XdFormInput from "@/components/XdFormInput/XdFormInput"
223
+ const Color = require('color');
235
224
  import {
236
225
  getParentsStyle, //获取页面风格单个键值值
237
226
  getParentsStyles, //获取页面风格列表
@@ -345,6 +334,7 @@ export default {
345
334
 
346
335
  total_price: "",
347
336
  style: {},
337
+ $mainBgColor: "",
348
338
  isQrCode: false,
349
339
  }
350
340
  },
@@ -378,6 +368,7 @@ export default {
378
368
  this.isQrCode = isQrCode(this);
379
369
  this.switchValidToken();
380
370
  this.style = await getParentsStyles(this.$parent);
371
+ this.$mainBgColor = Color(this.style.$mainColor).alpha(0.2).toString();
381
372
  console.log(this.style,'this.style');
382
373
  },
383
374
  methods: {
@@ -731,23 +722,6 @@ export default {
731
722
  </script>
732
723
 
733
724
  <style lang="less" scoped>
734
- .like-radio-wrap{
735
- width: 50rpx;
736
- height: 50rpx;
737
- display: flex;
738
- align-items: center;
739
- justify-content: center;
740
- .like-radio{
741
- width: 32rpx;
742
- height: 32rpx;
743
- border-radius: 50%;
744
- border:1px solid #DDD;
745
- &.disabled{
746
- background: #f8f8f8;
747
- border: 1px solid #e5e5e5;
748
- }
749
- }
750
- }
751
725
 
752
726
  .xd-card-pay{
753
727
  .text-gray{
@@ -821,8 +795,14 @@ export default {
821
795
  ._header{
822
796
  display: flex;
823
797
  justify-content: space-between;
798
+ align-items: center;
824
799
  padding: 0rpx 30rpx;
825
800
  font-size: 28rpx;
801
+ .login_card{
802
+ padding: 8rpx 20rpx;
803
+ border-radius: 8px;
804
+ font-size: 28rpx;
805
+ }
826
806
  }
827
807
  ._cont{
828
808
  display: flex;
@@ -45,6 +45,7 @@
45
45
  class="ticket_item"
46
46
  v-for="ticket in showCardList"
47
47
  :key="ticket.card_number"
48
+ @click="handlerTicketSelect(!checkedCards.includes(ticket.card_number), ticket)"
48
49
  >
49
50
  <view class="_header">
50
51
  <view class="flex align-center">
@@ -56,28 +57,15 @@
56
57
  ></xd-font-icon>
57
58
  {{ticket.card_type_name}}
58
59
  </view>
59
- <!-- #ifdef H5 -->
60
- <xd-radio
61
- :disabled="cardIsDisabled(ticket)"
62
- size="mini"
63
- @change="flat => handlerTicketSelect(flat, ticket)"
64
- :value="checkedCards.includes(ticket.card_number)"
65
- ></xd-radio>
66
- <!-- #endif -->
67
- <!-- #ifdef MP-WEIXIN -->
60
+ <view v-if="ticket.is_login === 'Y'">
61
+ <view class="login_card" :style="{color: style.$mainColor, backgroundColor: $mainBgColor}">已登录</view>
62
+ </view>
68
63
  <xd-radio
69
- v-if="checkedCards.includes(ticket.card_number)"
70
64
  :disabled="cardIsDisabled(ticket)"
71
65
  size="mini"
72
- @change="flat => handlerTicketSelect(flat, ticket)"
66
+ :isClickEvent="false"
73
67
  :value="checkedCards.includes(ticket.card_number)"
74
68
  ></xd-radio>
75
- <view v-else>
76
- <view class="like-radio-wrap" @click="handlerTicketSelect(true, ticket)">
77
- <view class="like-radio" :class="{disabled: cardIsDisabled(ticket) }"></view>
78
- </view>
79
- </view>
80
- <!-- #endif -->
81
69
  </view>
82
70
  <view class="_cont">
83
71
  <view style="margin-right: 30rpx;">ID:{{ticket.card_number}}</view>
@@ -223,6 +211,7 @@ import XdRadio from "@/components/XdRadio/XdRadio"
223
211
  import XdForm from "@/components/XdForm/XdForm"
224
212
  import XdFormItem from "@/components/XdFormItem/XdFormItem"
225
213
  import XdFormInput from "@/components/XdFormInput/XdFormInput"
214
+ const Color = require('color');
226
215
  import {
227
216
  getParentsStyle, //获取页面风格单个键值值
228
217
  getParentsStyles, //获取页面风格列表
@@ -343,6 +332,7 @@ export default {
343
332
 
344
333
  total_price: "",
345
334
  style: {},
335
+ $mainBgColor: "",
346
336
  isQrCode: false,
347
337
  }
348
338
  },
@@ -378,6 +368,7 @@ export default {
378
368
  this.switchValidToken();
379
369
  this.style = await getParentsStyles(this.$parent);
380
370
  console.log(this.style,'this.style');
371
+ this.$mainBgColor = Color(this.style.$mainColor).alpha(0.2).toString();
381
372
  this.handleInit();
382
373
  },
383
374
  methods: {
@@ -736,24 +727,6 @@ export default {
736
727
 
737
728
  <style lang="less" scoped>
738
729
 
739
- .like-radio-wrap{
740
- width: 50rpx;
741
- height: 50rpx;
742
- display: flex;
743
- align-items: center;
744
- justify-content: center;
745
- .like-radio{
746
- width: 32rpx;
747
- height: 32rpx;
748
- border-radius: 50%;
749
- border:1px solid #DDD;
750
- &.disabled{
751
- background: #f8f8f8;
752
- border: 1px solid #e5e5e5;
753
- }
754
- }
755
- }
756
-
757
730
  .xd-card-pay{
758
731
  .text-gray{
759
732
  color: #999999;
@@ -853,8 +826,14 @@ export default {
853
826
  ._header{
854
827
  display: flex;
855
828
  justify-content: space-between;
829
+ align-items: center;
856
830
  padding: 0rpx 30rpx;
857
831
  font-size: 28rpx;
832
+ .login_card{
833
+ padding: 8rpx 20rpx;
834
+ border-radius: 8px;
835
+ font-size: 28rpx;
836
+ }
858
837
  }
859
838
  ._cont{
860
839
  display: flex;
@@ -7,7 +7,7 @@
7
7
  :color="mainColor"
8
8
  icon="iconchakan1"
9
9
  ></xd-font-icon>
10
- <view class="cha_kan" :style="lookStyleUI">查看</view>
10
+ <view class="cha_kan" :style="lookStyleUI">{{lookName}}</view>
11
11
  </view>
12
12
  <view class="item-right">
13
13
  <view class="item_info">
@@ -18,21 +18,17 @@
18
18
  :style="{marginRight: '18rpx'}"
19
19
  :color="mainColor"
20
20
  ></xd-font-icon>
21
- <view>{{ cardInfo.card_type_name }}</view>
21
+ <view>{{ cardInfo['card_type_name'] }}</view>
22
22
  </view>
23
23
  <view class="identify">
24
- <view class="_id">ID:{{ cardInfo.card_number }}</view>
25
- <view>有效期至:{{ cardInfo.end_time }}</view>
26
- </view>
27
- <view class="remain">
28
- 剩余{{ cardInfo.unit }}数:{{ cardInfo.card_point }}{{ cardInfo.unit }}
29
- </view>
30
- <view v-if="cardInfo.other_card_point && cardInfo.card_point_type !== 1" class="other">
31
- 购买其他物品可抵:{{ cardInfo.other_card_point }}
24
+ <view class="_id">ID:{{ cardInfo['card_number'] }}</view>
25
+ <view>有效期至:{{ cardInfo['end_time'] }}</view>
32
26
  </view>
27
+ <view class="remain">剩余{{ cardInfo['unit'] }}数:{{ cardInfo['card_point'] }}{{ cardInfo['unit'] }}</view>
28
+ <view v-if="cardInfo['other_card_point'] && cardInfo['card_point_type'] !== 1" class="other">购买其他物品可抵:{{ cardInfo['other_card_point'] }}</view>
33
29
  </view>
34
30
  <view class="btn" :style="loginStyleUI">
35
- <view >{{ tabIndex === 1 ? loginName : "转换" }}</view>
31
+ <view >{{ tabIndex === 1 ? (cardInfo['is_login'] === 'Y'? loggedName : loginName) : "转换" }}</view>
36
32
  </view>
37
33
  </view>
38
34
  </view>
@@ -46,6 +42,14 @@ export default {
46
42
  XdFontIcon
47
43
  },
48
44
  props: {
45
+ loggedName: {
46
+ type: String,
47
+ default: '已登录'
48
+ },
49
+ lookName:{
50
+ type: String,
51
+ default: '查看'
52
+ },
49
53
  loginName:{
50
54
  type: String,
51
55
  default: '登录'
@@ -89,16 +93,22 @@ export default {
89
93
  }
90
94
  },
91
95
  loginStyleUI(){
96
+ let style = this.$xdUniHelper.cloneDeep(this.loginStyle);
97
+
98
+ if(this.cardInfo['is_login'] === 'Y') {
99
+ style['backgroundColor'] = 'rgb(238, 238, 238)';
100
+ style['color'] = 'rgb(204, 204, 204)'
101
+ }
92
102
  //#ifdef MP-WEIXIN
93
103
  return this.styleObjectToString({
94
104
  backgroundColor:this.mainColor,
95
- ...this.loginStyle
105
+ ...style
96
106
  })
97
107
  //#endif
98
108
  //#ifdef H5
99
109
  return {
100
110
  backgroundColor:this.mainColor,
101
- ...this.loginStyle
111
+ ...style
102
112
  }
103
113
  //#endif
104
114
 
@@ -130,12 +140,14 @@ export default {
130
140
  margin-bottom: unit(30, rpx);
131
141
  background: #fff;
132
142
  .item-left {
133
- width: unit(140, rpx);
143
+ min-width: unit(140, rpx);
134
144
  display: flex;
145
+ flex-shrink: 0;
135
146
  flex-direction: column;
136
147
  align-items: center;
137
148
  justify-content: center;
138
149
  font-size: unit(24, rpx);
150
+ padding: 0 10rpx;
139
151
  .xd-font-icon {
140
152
  margin-bottom: unit(10, rpx);
141
153
  }