jufubao-base 1.0.232-beta7 → 1.0.232-beta9

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": "jufubao-base",
3
- "version": "1.0.232-beta7",
3
+ "version": "1.0.232-beta9",
4
4
  "private": false,
5
5
  "description": "聚福宝业务组件基础插件包",
6
6
  "main": "index.js",
@@ -263,6 +263,18 @@ export default {
263
263
  },
264
264
  inline: false,
265
265
  },
266
+ {
267
+ label: '支付页面跳转路径:',
268
+ ele: 'xd-select-pages-path',
269
+ valueKey: 'payPath',
270
+ groupKey:'advanced',
271
+ placeholder: '请选择支付页面跳转路径',
272
+ value: data['payPath'] || null,
273
+ setting: {
274
+ router: XdBus.getParentApi('getPagesTree'),
275
+ },
276
+ inline: false,
277
+ },
266
278
  ].filter(i=>i)
267
279
  },
268
280
  advanced: [],
@@ -79,6 +79,7 @@
79
79
  //todo
80
80
  description: "",
81
81
  vipSuccessPath: "",
82
+ payPath: "",
82
83
  }
83
84
  },
84
85
  computed: {
@@ -114,6 +115,7 @@
114
115
  init(container) {
115
116
  this.description = getContainerPropsValue(container, 'content.description', "");
116
117
  this.vipSuccessPath = getContainerPropsValue(container, 'content.vipSuccessPath', {value: ""}).value;
118
+ this.payPath = getContainerPropsValue(container, 'content.payPath', {value: ""}).value;
117
119
  },
118
120
  handlePrivacy(code){
119
121
  let params = `page_id=${this.pageAttr["page_id"]}`;
@@ -144,10 +146,19 @@
144
146
  business_code: this.xnamespace,
145
147
  product_id: this.vipInfo.product_id,
146
148
  notify_provider_id: this.projectAttr.notify_provider_id,
147
- need_pay_price: 0
149
+ need_pay_price: 0,
150
+ selected_card_list_json: this.vipInfo.selected_card_list_json
148
151
  }
149
152
  }).then(res => {
150
-
153
+ if(res.need_pay_price > 0){
154
+ this.$xdUniHelper.redirectTo({
155
+ url: this.payPath + `?order_id=${res.pay_order_id}&main_order_id=${res.main_order_id}`
156
+ })
157
+ }else{
158
+ this.$xdUniHelper.redirectTo({
159
+ url: this.vipSuccessPath + `?order_id=${res.main_order_id}`
160
+ })
161
+ }
151
162
  })
152
163
  },
153
164
  onJfbScroll(options) {
@@ -60,7 +60,7 @@
60
60
  </view>
61
61
  </view>
62
62
  <view class="vip-open" @click="handleToOpen">
63
- <xd-font-icon color="#FCBF28" size="20" icon="iconjinhangzhong"></xd-font-icon>
63
+ <xd-font-icon color="#FCBF28" size="20" icon="iconPLUShuiyuan"></xd-font-icon>
64
64
  <text>立即开通</text>
65
65
  <xd-font-icon size="20" icon="iconxiangyou_xian"></xd-font-icon>
66
66
  </view>
@@ -16,7 +16,7 @@ module.exports = {
16
16
 
17
17
  getConsumpSettleMainInfo: { "shop_id": 1037266, "shop_logo": "\/uploads\/20230710\/44f645b06fe4da358f7b0ee06259afcd.jpg", "shop_name": "a加盟商-185", "shop_brand": 100003, "shop_partner_name": "A加盟商-余额测试", "settle_tag_list": [{ "label": "幸福西饼、goodlike品牌", "value": 262, "price": 0, "price_yuan": "0.00", "is_static_price": false, "icon_url": "https:\/\/sandbox-img.jufubao.cn\/uploads\/20230728\/70f4dd90cdf2681e71ccf41d332d71a0.jpeg" }], "request_id": "a4a6cfe9db905597" },
18
18
 
19
- getConsumpBaseUserInfo: { "user_name": "", "user_code": "WuE5Wotf08", "nickname": "张三", "real_name": "", "head_url": "https:\/\/thirdwx.qlogo.cn\/mmopen\/vi_32\/AOqEDeiaxss8GR4jD1GicIgyqWSOZV8xN23Iw3DOzFjVBzTFbdv21X7u9ZASQJYsTNm07XSq6ebzp4K4qu1JT26qGZ0qYFMe1nHdQjFZib83Fg\/132", "province_code": "", "city_code": "", "province_name": "", "city_name": "", "sex": "1", "sex_name": "男", "birthday_date": "2025-04-16", "phone_number": "177****7945", "show_user_name": "张三", "user_level": "VIP", "vip_expire_time": 1776157293, "request_id": "f1dbb1c0bb8da893" }
19
+ getConsumpBaseUserInfo: { "user_name": "", "user_code": "WuE5Wotf08", "nickname": "张三", "real_name": "", "head_url": "https:\/\/thirdwx.qlogo.cn\/mmopen\/vi_32\/AOqEDeiaxss8GR4jD1GicIgyqWSOZV8xN23Iw3DOzFjVBzTFbdv21X7u9ZASQJYsTNm07XSq6ebzp4K4qu1JT26qGZ0qYFMe1nHdQjFZib83Fg\/132", "province_code": "", "city_code": "", "province_name": "", "city_name": "", "sex": "1", "sex_name": "男", "birthday_date": "2025-04-16", "phone_number": "177****7945", "show_user_name": "张三", "user_level": "VIP", "vip_expire_time": 1776157293, "request_id": "f1dbb1c0bb8da893" },
20
20
 
21
21
  addConsumpCashierTempOrderData: { "cart_order_id": "c08f38347ec8bc5b", "request_id": "779bf62e988587ce" }
22
22
  }
@@ -8,7 +8,7 @@ module.exports = [
8
8
  {
9
9
  mapFnName: 'getListNoticeDialogContent', //自定义方法名字(必选)
10
10
  title: '获取内容',
11
- path: '/cms/v1/news-content',
11
+ path: '/cms/v1/ad-content',
12
12
  isRule: false,
13
13
  params: {
14
14
  scene: ['使用场景', 'String', '选填'],
@@ -247,6 +247,32 @@ export default {
247
247
  { label: '弹框', value: 'pop' },
248
248
  ]
249
249
  },
250
+ {
251
+ label: '展示位置:',
252
+ ele: 'xd-radio',
253
+ valueKey: 'systemType',
254
+ groupKey:'content',
255
+ value: data['systemType'] || 'fuli',
256
+ placeholder: '请选择展示位置',
257
+ className: 'input60',
258
+ list: [
259
+ { label: '福利系统', value: 'fuli' },
260
+ { label: 'plus系统', value: 'plus' },
261
+ ]
262
+ },
263
+ data['systemType']==='plus'&&{
264
+ label: '展示方式:',
265
+ ele: 'xd-radio',
266
+ valueKey: 'showGroup',
267
+ groupKey:'content',
268
+ value: data['showGroup'] || 'all',
269
+ placeholder: '请选择展示方式',
270
+ className: 'input60',
271
+ list: [
272
+ { label: '全部用户', value: 'all' },
273
+ { label: '仅会员', value: 'vip' },
274
+ ]
275
+ },
250
276
  {
251
277
  label: '是否隐藏弹框(仅预览模式生效):',
252
278
  ele: 'xd-radio',
@@ -84,7 +84,9 @@ export default {
84
84
  currentLinkUrl: "",
85
85
  currentIndex: 0,
86
86
  contentList: [],
87
- number: ''
87
+ number: '',
88
+ systemType: '',
89
+ showGroup: ''
88
90
  };
89
91
  },
90
92
  watch: {
@@ -134,9 +136,7 @@ export default {
134
136
 
135
137
  //弹窗显示
136
138
  if (res.list.length > 0) {
137
- this.contentList = res.list.map((item) => {
138
- return JSON.parse(item.content);
139
- });
139
+ this.contentList = res.list
140
140
  this.currentImage = getServiceUrl(
141
141
  this.contentList[0].image_url,
142
142
  "size3"
@@ -145,8 +145,17 @@ export default {
145
145
  this.contentList[0].redirect_data
146
146
  );
147
147
  this.currentIndex = 0;
148
-
149
- this.handlePop();
148
+ if(this.systemType === 'fuli'){
149
+ this.handlePop();
150
+ } else {
151
+ if(this.showGroup==='all') {
152
+ this.handlePop();
153
+ }else {
154
+ if(this.getTokenForKey('user_level')&&this.getTokenForKey('user_level')==='VIP') {
155
+ this.handlePop();
156
+ }
157
+ }
158
+ }
150
159
  }
151
160
  })
152
161
  .catch((error) => {
@@ -175,6 +184,16 @@ export default {
175
184
  );
176
185
  this.type = getContainerPropsValue(container, "content.type", "pop");
177
186
  this.number = getContainerPropsValue(container, "content.number", 1);
187
+ this.systemType = getContainerPropsValue(
188
+ container,
189
+ "content.systemType",
190
+ "fuli"
191
+ );
192
+ this.showGroup = getContainerPropsValue(
193
+ container,
194
+ "content.showGroup",
195
+ "all"
196
+ );
178
197
  },
179
198
  handlePop() {
180
199
  console.warn(`this.time${this.time * 60 + "分钟"}`);
@@ -6,7 +6,7 @@
6
6
  */
7
7
  module.exports = [
8
8
  {
9
- mapFnName: 'getBaseUserInfo',
9
+ mapFnName: 'getOpenBaseUserInfo',
10
10
  title: '获取用户信息',
11
11
  path: '/passport/v1/user/get',
12
12
  params: {},
@@ -25,5 +25,15 @@ module.exports = [
25
25
  },
26
26
  isConsole: true,
27
27
  disabled: true
28
+ },
29
+ {
30
+ mapFnName: "getVipMoneySaving",
31
+ title: "获取会员省钱金额",
32
+ path: '/member/v1/money-saving-record/total-amount',
33
+ isRule: false,
34
+ params: {
35
+ },
36
+ isConsole: true,
37
+ disabled: true
28
38
  }
29
39
  ];
@@ -232,6 +232,26 @@ export default {
232
232
  inline: false,
233
233
  notice: '',
234
234
  },
235
+ {
236
+ label: '4大特权图片:',
237
+ ele: 'xd-upload',
238
+ valueKey: 'specialImage',
239
+ groupKey:'content',
240
+ value: data.specialImage || {},
241
+ defaultValue: data.specialImage || null,
242
+ slot: true,
243
+ oneWidth: 375,
244
+ oneHeight: 500,
245
+ elinputClassName: 'input40',
246
+ tipsformet: '上传文件格式:@imageType@,不超过@size@MB.建议高度为<span style="color:red">750px</span>,宽度自适应',
247
+ type: ['jpg', 'png', 'jpeg'],
248
+ styleType: 'one',
249
+ uploadType: 'aliyun',
250
+ size: 5,
251
+ action: 'action',
252
+ sort: true,
253
+ maxlen: 100,
254
+ },
235
255
  {
236
256
  label: '会员详情路径:',
237
257
  ele: 'xd-select-pages-path',
@@ -26,11 +26,12 @@
26
26
  <view v-else class="vip_level">普通用户</view>
27
27
  </view>
28
28
  <view class="u_sub">
29
- <view v-if="isVip">已省xx</view>
30
- <view v-else>{{ uInfo.phone_number }}</view>
29
+ <view v-if="isVip" style="color:#999999;">已省{{ $xdUniHelper.divisionFloatNumber(save_amount, 100) }}</view>
30
+ <view v-else style="color:#333333;">{{ uInfo.phone_number }}</view>
31
31
  </view>
32
32
  </view>
33
- <view class="buy_btn" @click="showDrawer=true">立即续费</view>
33
+ <view v-if="isVip" class="buy_btn" @click="showDrawer=true">立即续费</view>
34
+ <view v-else class="buy_btn" @click="showDrawer=true">立即开通</view>
34
35
  </view>
35
36
 
36
37
  <!-- plus会员权益 -->
@@ -44,6 +45,10 @@
44
45
  <image :src="siteLogo" mode="aspectFill"></image>
45
46
  </view>
46
47
  </view>
48
+ </view>
49
+ <view>
50
+ <image :src="specialImage" mode="widthFix" style="width: 100%;"></image>
51
+ <!--
47
52
  <view class="vip_banner">
48
53
  <view class="banner_item" v-for="i in 4" :key="i">
49
54
  <view class="banner_img"></view>
@@ -64,10 +69,10 @@
64
69
  <view class="good_cont">平台会在生日当天为用户发放专属的生日祝福</view>
65
70
  </view>
66
71
  </view>
67
- </view>
72
+ </view> -->
68
73
  </view>
69
74
 
70
- <xd-vip-list :list="vipCardList"
75
+ <xd-vip-list v-if="!isVip" :list="vipCardList"
71
76
  @handlePrivacy="handlePrivacy"
72
77
  @toVipDetail="toVipDetail"
73
78
  ></xd-vip-list>
@@ -115,10 +120,12 @@
115
120
  uInfo: {},
116
121
  xnamespace: "",
117
122
  vipCardList: [],
123
+ save_amount: 0,
118
124
 
119
125
  siteLogo: "",
120
126
  //todo
121
127
  vipDetailPath: "",
128
+ specialImage: "",
122
129
  }
123
130
  },
124
131
  computed: {
@@ -147,6 +154,7 @@
147
154
  onJfbLoad(options) {
148
155
  this.setNameSpace(options);
149
156
  this.p_getBaseUserInfo();
157
+ this.p_getVipMoneySaving();
150
158
  this.p_getVipList();
151
159
  },
152
160
  /**
@@ -155,15 +163,24 @@
155
163
  */
156
164
  init(container) {
157
165
  this.vipDetailPath = getContainerPropsValue(container, 'content.vipDetailPath', {value: "/system/system/vipdetail"}).value;
166
+ this.specialImage = getServiceUrl(getContainerPropsValue(container, 'content.specialImage', {url: ""}).url);
158
167
  },
159
168
  p_getBaseUserInfo(){
160
- jfbRootExec("getBaseUserInfo", {
169
+ jfbRootExec("getOpenBaseUserInfo", {
161
170
  vm: this,
162
171
  data: {}
163
172
  }).then(res => {
164
173
  this.uInfo = res;
165
174
  })
166
175
  },
176
+ p_getVipMoneySaving(){
177
+ jfbRootExec("getVipMoneySaving", {
178
+ vm: this,
179
+ data: {}
180
+ }).then(res => {
181
+ this.save_amount = res.save_amount;
182
+ })
183
+ },
167
184
  p_getVipList(){
168
185
  jfbRootExec("getVipList", {
169
186
  vm: this,
@@ -258,6 +275,7 @@
258
275
  }
259
276
  .u_sub{
260
277
  margin-top: 24rpx;
278
+ font-size: 24rpx;
261
279
  }
262
280
  }
263
281
  .buy_btn{
@@ -1,20 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  module.exports = {
4
- getBaseUserInfo: {
5
- "user_name": "15801505541",
6
- "user_code": "97SJSG667V",
7
- "nickname": "草鸡无敌飞侠",
8
- "real_name": "",
9
- "head_url": "https://sandbox-img.jufubao.cn//uploads/20230217/dc6f1817ae3714814328fcff55925d00.jpg?x-oss-process=style/size8",
10
- "province_code": "",
11
- "city_code": "",
12
- "province_name": "",
13
- "city_name": "",
14
- "sex": "",
15
- "sex_name": "未知",
16
- "birthday_date": "",
17
- "phone_number": "15801505541",
18
- "request_id": "44cf5b8402ff7c2e"
19
- }
4
+ getOpenBaseUserInfo: {"user_name":"","user_code":"Uf4zx6EPfV","nickname":"未来~","real_name":"","head_url":"https:\/\/thirdwx.qlogo.cn\/mmopen\/vi_32\/Q0j4TwGTfTJsajZzh53IB56crRSdmKvRbjT4V1Ha8v5uCOkASbWS0GibgLeic8OKBzAwUyBa3vZGhjwmd6RfpG9g\/132","province_code":"","city_code":"","province_name":"","city_name":"","sex":"","sex_name":"未知","birthday_date":"","phone_number":"13611111111","show_user_name":"未来~","user_level":"VIP","vip_expire_time":1745026677,"request_id":"250e5709e6c95066"},
5
+ getVipList: {"total_size":3,"next_page_token":"","list":[{"vip_card_id":3,"product_id":60038520,"product_name":"体验卡","sale_price":200,"vip_card_icon":""},{"vip_card_id":2,"product_id":60038519,"product_name":"月卡","sale_price":2678,"vip_card_icon":""},{"vip_card_id":1,"product_id":60038515,"product_name":"测1","sale_price":20085,"vip_card_icon":""}],"request_id":"6b4aef5e06411d8a"},
6
+ getVipMoneySaving: { "save_amount": 100 , "request_id": "6b4aef5e06411d8a" }
20
7
  }
@@ -1,7 +1,10 @@
1
1
  <template>
2
2
  <view class="xd_vip_wrap">
3
3
  <view class="vip_list">
4
- <view class="vip_item" :class="{active: item.vip_card_id===vip_card_id}" v-for="item in uiList" :key="item.vip_card_id">
4
+ <view class="vip_item" :class="{active: item.vip_card_id===vip_card_id}"
5
+ v-for="item in uiList" :key="item.vip_card_id"
6
+ @click="handleChoseVip(item.vip_card_id)"
7
+ >
5
8
  <view class="vip_name">{{ item.product_name}}</view>
6
9
  <view class="vip_price">{{ $xdUniHelper.divisionFloatNumber(item.sale_price, 100) }}</view>
7
10
  </view>
@@ -50,6 +53,9 @@
50
53
  handlePrivacy(type){
51
54
  this.$emit('handlePrivacy', type)
52
55
  },
56
+ handleChoseVip(vip_card_id){
57
+ this.vip_card_id = vip_card_id
58
+ },
53
59
  toVipDetail(){
54
60
  if(this.vip_card_id){
55
61
  this.$emit('toVipDetail', this.vip_card_id)
@@ -53,7 +53,7 @@
53
53
  <view class="jfb-base-saving-detail__body-product">
54
54
  <view class="jfb-base-saving-detail__body-product-title">
55
55
  <view>购物</view>
56
- <view>已省:{{saveAmount}}</view>
56
+ <view>已省:{{getAmout(saveAmount)}}</view>
57
57
  </view>
58
58
  <view v-if="productList.length>0">
59
59
  <view v-for="(item,index) in productList" :key="index" class="jfb-base-saving-detail__body-product-item">
@@ -67,7 +67,7 @@
67
67
  </view>
68
68
  <view class="jfb-base-saving-detail__body-product-item-info-price">
69
69
  <view>合计节省</view>
70
- <view :style="{color:mainColor}">{{item.saving_amount/100}}</view>
70
+ <view :style="{color:mainColor}">{{getAmout(item.saving_amount)}}</view>
71
71
  </view>
72
72
  </view>
73
73
  </view> 
@@ -284,11 +284,11 @@
284
284
  data: {},
285
285
  }).then(res => {
286
286
  // 最大值
287
- let max = res.total_amount / 100;
287
+ let max = this.getAmout(res.total_amount);
288
288
  // 数量
289
- let value = res.save_amount / 100;
289
+ let value = this.getAmout(res.save_amount);
290
290
  // 计算
291
- let rate = Math.round((value * 1000) / max);
291
+ let rate = Math.round((value * 1000) / max)||0;
292
292
  this.option = {
293
293
  backgroundColor: '#fff', // 设置图表区域的背景颜色
294
294
  borderRadius: 10, // 设置图表区域的圆角
@@ -371,11 +371,11 @@
371
371
  vm: this,
372
372
  data: {},
373
373
  }).then(res => {
374
- let max = res.total_amount / 100;
374
+ let max = this.getAmout(res.total_amount);
375
375
  // 数量
376
- let value = res.save_amount / 100;
376
+ let value = this.getAmout(res.save_amount);
377
377
  // 计算
378
- let rate = Math.round((value * 1000) / max);
378
+ let rate = Math.round((value * 1000) / max)||0;
379
379
  this.option = {
380
380
  backgroundColor: '#fff', // 设置图表区域的背景颜色
381
381
  borderRadius: 10, // 设置图表区域的圆角
@@ -469,6 +469,9 @@
469
469
  this.tab = this.tabs[i].value;
470
470
  this.tabIndex = i;
471
471
  },
472
+ getAmout(amount) {
473
+ return this.$xdUniHelper.divisionFloatNumber(amount, 100)||0
474
+ },
472
475
  getYearAndMonth(dateStr) {
473
476
  // 将输入的日期字符串转换为Date对象
474
477
  const date = new Date(dateStr.replace("年", "-").replace("月", "-01"));
@@ -642,6 +645,7 @@
642
645
  }
643
646
 
644
647
  &-info {
648
+ flex: 1;
645
649
  &-name {
646
650
  font-size: 28rpx;
647
651
  color: #333333;
@@ -2,12 +2,9 @@
2
2
 
3
3
  module.exports = {
4
4
 
5
- getSavingByIdFilmSquate:{},
5
+ getMonthSavingDetail:{"date_range":"2025年4月","save_amount":1200,"total_size":1,"next_page_token":"","list":[{"product_name":"少年无疆","product_sku_name":"7厅(扫码付费按摩)-1排1列-场次:2025-04-15 20:13:20","product_image":"https:\/\/gw.alicdn.com\/tfscom\/i1\/TB17YwcmKL2gK0jSZPhXXahvXXa_.jpg","product_num":1,"save_amount":1200,"order_time":1745293229326}],"record_months":[{"value":0,"label":"2025年3月"},{"value":1200,"label":"2025年4月"},{"value":0,"label":"2025年5月"}],"request_id":"8ddd2b5753e24f2f"},
6
6
 
7
- updateSavingFilmPaiqiDate:{},
8
-
9
- removeSavingFilmAddress:{},
10
-
11
- addSavingFilmcart:{},
7
+ getYearSavingDetail:{"date_range":"2025年01月01日-2025年12月31日","total_amount":5000,"save_amount":1200,"total_size":1,"next_page_token":"","list":[{"product_name":"少年无疆","product_sku_name":"7厅(扫码付费按摩)-1排1列-场次:2025-04-15 20:13:20","product_image":"https:\/\/gw.alicdn.com\/tfscom\/i1\/TB17YwcmKL2gK0jSZPhXXahvXXa_.jpg","product_num":1,"save_amount":1200,"order_time":1745293229326}],"request_id":"2004ffc8e65e114e"},
12
8
 
9
+ getTotalSavingDetail:{"date_range":"2025年01月01日-2025年12月31日","total_amount":5000,"save_amount":1200,"total_size":1,"next_page_token":"","list":[{"product_name":"少年无疆","product_sku_name":"7厅(扫码付费按摩)-1排1列-场次:2025-04-15 20:13:20","product_image":"https:\/\/gw.alicdn.com\/tfscom\/i1\/TB17YwcmKL2gK0jSZPhXXahvXXa_.jpg","product_num":1,"save_amount":1200,"order_time":1745293229326}],"request_id":"2004ffc8e65e114e"},
13
10
  }
@@ -15,28 +15,30 @@
15
15
  <!-- #endif -->
16
16
  <view class="jfb-base-share__body">
17
17
  <view class="card_wrap">
18
- <swiper class="card_swiper" next-margin="50rpx" previous-margin="50rpx">
19
- <swiper-item class="swiper_item" v-for="i in 3" :key="i">
18
+ <swiper class="card_swiper" next-margin="50rpx" previous-margin="50rpx" :current="shareIndex" @change="handleSwitch">
19
+ <swiper-item class="swiper_item" v-for="(item,i) in shareList" :key="i">
20
20
  <view class="swiper_item-inner">
21
- <view class="swiper_item-logo"></view>
21
+ <image :src="item.share_image_url" mode="aspectFill"></image>
22
+ <!-- <view class="swiper_item-logo"></view>
22
23
  <view class="swiper_item-title">邀请好友领福利</view>
23
24
  <view class="swiper_item-qrcode"></view>
24
- <view class="swiper_item-visit">邀请码<br/>LWNXK7H</view>
25
+ <view class="swiper_item-visit">邀请码<br/>LWNXK7H</view> -->
25
26
  </view>
26
27
  <!-- <image style="width: 600rpx;height: 900rpx;"
27
28
  src="https://sandbox-img.jufubao.cn/uploads/20250410/34559f90dd5a01e7368c02bf33f1b484.png?ver=1744249748881&x-oss-process=style/size5"></image> -->
28
29
  </swiper-item>
29
30
  </swiper>
30
31
  </view>
31
-
32
+ <!-- #ifdef MP-WEIXIN -->
32
33
  <view class="share_wrap">
33
- <view class="share_btn">
34
+ <view class="share_btn" @click="toSendWx">
34
35
  <image src="https://sandbox-img.jufubao.cn/uploads/20250410/57bc093618bc51a85dc8bb68825d2b97.png?x-oss-process=style/size8" mode="widthFix"></image>
35
36
  </view>
36
- <view class="share_btn">
37
+ <view class="share_btn" @click="toSaveImg">
37
38
  <image src="https://sandbox-img1.jufubao.cn/uploads/20250410/faeb136bfd684ab6fa4608208ad26294.png?x-oss-process=style/size8" mode="widthFix"></image>
38
39
  </view>
39
40
  </view>
41
+ <!-- #endif -->
40
42
 
41
43
  <view class="visit_tip">
42
44
  好友使用你的邀请码成功注册后<br/>Ta将成为你的邀请用户
@@ -52,6 +54,8 @@
52
54
  import { getContainerPropsValue } from "@/utils/xd.base";
53
55
  import componentsMixins from "@/mixins/componentsMixins";
54
56
  import extsMixins from "@/mixins/extsMixins";
57
+ import getServiceUrl from "@/common/getServiceUrl";
58
+ import { mapState } from "vuex";
55
59
  export default {
56
60
  name: "JfbBaseShare",
57
61
  components: {
@@ -63,11 +67,14 @@
63
67
  data() {
64
68
  return {
65
69
  closeMask: true,
66
-
70
+ shareIndex: 0,
67
71
  shareList: [],
68
72
  //todo
69
73
  }
70
74
  },
75
+ computed: {
76
+ ...mapState(["shareInfo"]),
77
+ },
71
78
  watch: {
72
79
  container(value, oldValue) {
73
80
  if (JSON.stringify(value) === JSON.stringify(oldValue)) return;
@@ -98,11 +105,45 @@
98
105
  page_token: '1'
99
106
  }
100
107
  }).then(res => {
101
- this.shareList = res.list;
108
+ this.shareList = res.list.map(item => {
109
+ item.share_image_url = getServiceUrl(item.share_image_url);
110
+ return item;
111
+ });
102
112
  })
103
113
  },
114
+ handleSwitch(e){
115
+ this.shareIndex = e.detail.current;
116
+ },
117
+ toSendWx(){
118
+ let shareIndex = this.shareIndex;
119
+ let curShare = this.shareList[shareIndex];
120
+ this.setShareInfo({
121
+ title: "您的好友邀请您使用PLUS会员",
122
+ imageUrl: curShare.share_image_url,
123
+ path: `${curShare.jump_url}`,
124
+ });
125
+ },
126
+ toSaveImg(){
127
+ let shareIndex = this.shareIndex;
128
+ let curShare = this.shareList[shareIndex];
129
+ uni.getImageInfo({
130
+ src: curShare.share_image_url,
131
+ success: (res) => {
132
+ uni.saveImageToPhotosAlbum({
133
+ filePath: res.path,
134
+ success: () => {
135
+ uni.showToast({
136
+ title: '保存成功',
137
+ icon: "success"
138
+ })
139
+ }
140
+ })
141
+ }
142
+ })
143
+
144
+ },
104
145
  onJfbScroll(options) {
105
- console.log('event.onJfbScroll', options)
146
+ // console.log('event.onJfbScroll', options)
106
147
  },
107
148
  onJfbReachBottom(options) {
108
149
  console.log('event.onJfbReachBottom', options)
@@ -146,16 +187,18 @@
146
187
  justify-content: center;
147
188
 
148
189
  &-inner{
149
- width: 630rpx;
150
- height: 960rpx;
151
- background: url('https://sandbox-img.jufubao.cn/uploads/20250410/2d9f5ec31efb5cddece747d8b8da51f0.png?x-oss-process=style/size8') no-repeat;
152
- background-size: auto 100%;
190
+ width: 100%;
191
+ height: 100%;
192
+ // background: url('https://sandbox-img.jufubao.cn/uploads/20250410/2d9f5ec31efb5cddece747d8b8da51f0.png?x-oss-process=style/size8') no-repeat;
193
+ // background-size: auto 100%;
153
194
  box-sizing: border-box;
154
- display: flex;
155
- flex-direction: column;
156
- align-items: center;
157
- padding-top: 60rpx;
158
-
195
+ // display: flex;
196
+ // flex-direction: column;
197
+ // align-items: center;
198
+ image{
199
+ width: 100%;
200
+ height: 100%;
201
+ }
159
202
  }
160
203
  &-logo{
161
204
  height: 96rpx;
@@ -32,7 +32,7 @@
32
32
  v-if="productConfig.isPrice === 'Y'"
33
33
  type="two"
34
34
  :showPrice="item['show_prices']"
35
- :isVip="true">
35
+ :isPlus="productConfig.is_plus_site">
36
36
  </CusPrice>
37
37
  </view>
38
38
  <view>
@@ -127,6 +127,7 @@
127
127
  allModuleItemContRadius: 16,
128
128
  allModuleItemContBgColor: "#FFFFFF",
129
129
  emitParent:{},
130
+ is_plus_site: false
130
131
  }
131
132
  },
132
133
  computed: {
@@ -231,6 +232,7 @@
231
232
  return this;
232
233
  }
233
234
  })
235
+ this.is_plus_site = this.projectAttr.headers['X-Site-Group']==="vip";
234
236
  this.init(this.container);
235
237
  this.cusInit(this.container);
236
238
  },
@@ -28,6 +28,18 @@ module.exports = {
28
28
  sale_price: 3000,
29
29
  status: "ok",
30
30
  thumb: "/uploads/20231215/b2ce0235129aa592044f96343f25c338.jpeg",
31
+ show_prices: [
32
+ {
33
+ "p": 6500,
34
+ "n": "PLUS价",
35
+ "t": "S"
36
+ },
37
+ {
38
+ "p": 7500,
39
+ "n": "原价",
40
+ "t": "U"
41
+ }
42
+ ]
31
43
  },
32
44
  {
33
45
  brand_id: 30000,
@@ -43,7 +55,19 @@ module.exports = {
43
55
  sale_price: 2195,
44
56
  status: "ok",
45
57
  thumb:
46
- "https://img1.winxuancdn.com/1305/10251305_9.jpg?1530683968642"
58
+ "https://img1.winxuancdn.com/1305/10251305_9.jpg?1530683968642",
59
+ show_prices: [
60
+ {
61
+ "p": 8500,
62
+ "n": "PLUS价",
63
+ "t": "S"
64
+ },
65
+ {
66
+ "p": 7500,
67
+ "n": "原价",
68
+ "t": "U"
69
+ }
70
+ ]
47
71
  },
48
72
  {
49
73
  brand_id: 30000,
@@ -59,7 +83,19 @@ module.exports = {
59
83
  sale_price: 4219,
60
84
  status: "ok",
61
85
  thumb:
62
- "https://img2.winxuancdn.com/9564/10309564_9.jpg?1530754178039"
86
+ "https://img2.winxuancdn.com/9564/10309564_9.jpg?1530754178039",
87
+ show_prices: [
88
+ {
89
+ "p": 100,
90
+ "n": "PLUS价",
91
+ "t": "S"
92
+ },
93
+ {
94
+ "p": 200,
95
+ "n": "原价",
96
+ "t": "U"
97
+ }
98
+ ]
63
99
  },
64
100
  {
65
101
  brand_id: 30000,
@@ -75,7 +111,19 @@ module.exports = {
75
111
  sale_price: 4388,
76
112
  status: "ok",
77
113
  thumb:
78
- "https://img3.winxuancdn.com/9416/10309416_9.jpg?1530754178039"
114
+ "https://img3.winxuancdn.com/9416/10309416_9.jpg?1530754178039",
115
+ show_prices: [
116
+ {
117
+ "p": 100,
118
+ "n": "PLUS价",
119
+ "t": "S"
120
+ },
121
+ {
122
+ "p": 200,
123
+ "n": "原价",
124
+ "t": "U"
125
+ }
126
+ ]
79
127
  }
80
128
  ]
81
129
  },
@@ -24,7 +24,7 @@ export default {
24
24
  let differ = getContainerPropsValue(container, 'content.differ', 1);
25
25
  let showActivityPrice = getContainerPropsValue(container, 'content.showActivityPrice', 'N');
26
26
  let isShowExchange = getContainerPropsValue(container, 'content.isShowExchange', 'N');
27
- this.productConfig = {is_show_brand, isPrice, isShowTag, isShowDiscount, isAddCart, differ, showActivityPrice, isShowExchange};
27
+ this.productConfig = {is_show_brand, isPrice, isShowTag, isShowDiscount, isAddCart, differ, showActivityPrice, isShowExchange,is_plus_site: this.is_plus_site};
28
28
 
29
29
  //内容
30
30
  let brandColor = getContainerPropsValue(container, 'content.brandColor', '#aaa');