fix:图片地址更改,接口数据传输修改,添加h5、app跳转直播
							parent
							
								
									8eb4e4609d
								
							
						
					
					
						commit
						c34e10cdc5
					
				|  | @ -36,15 +36,12 @@ | ||||||
|     data: [], |     data: [], | ||||||
|   }); |   }); | ||||||
|   async function getDetail(id, item_id) { |   async function getDetail(id, item_id) { | ||||||
|     const { error, data } = await sheep.$api.order.itemDetail({ |     const { error, data } = await sheep.$api.order.itemDetail(id,item_id); | ||||||
|       id: id, |  | ||||||
|       item_id: item_id, |  | ||||||
|     }); |  | ||||||
|     if (error === 0) { |     if (error === 0) { | ||||||
|       state.data = data; |       state.data = data; | ||||||
|     } |     } | ||||||
|   } |   } | ||||||
|   onLoad(async (options) => { |   onLoad((options) => { | ||||||
|     getDetail(options.id, options.item_id); |     getDetail(options.id, options.item_id); | ||||||
|   }); |   }); | ||||||
| </script> | </script> | ||||||
|  |  | ||||||
|  | @ -13,11 +13,7 @@ | ||||||
|       </view> |       </view> | ||||||
|       <view class="modal-content ss-flex-1"> |       <view class="modal-content ss-flex-1"> | ||||||
|         <view class="pay-title ss-p-l-30 ss-m-y-30">选择支付方式</view> |         <view class="pay-title ss-p-l-30 ss-m-y-30">选择支付方式</view> | ||||||
|         <view |         <view class="pay-type-item" v-for="item in state.payMethods" :key="item.title"> | ||||||
|           class="pay-type-item" |  | ||||||
|           v-for="item in state.payMethods" |  | ||||||
|           :key="item.title" |  | ||||||
|         > |  | ||||||
|           <view |           <view | ||||||
|             class="pay-item ss-flex ss-col-center ss-row-between ss-p-x-30 border-bottom" |             class="pay-item ss-flex ss-col-center ss-row-between ss-p-x-30 border-bottom" | ||||||
|             :class="{ 'disabled-pay-item': item.disabled }" |             :class="{ 'disabled-pay-item': item.disabled }" | ||||||
|  | @ -31,7 +27,7 @@ | ||||||
|               <image |               <image | ||||||
|                 class="pay-icon" |                 class="pay-icon" | ||||||
|                 v-if="item.disabled" |                 v-if="item.disabled" | ||||||
|                 :src="sheep.$url.static('/assets/addons/shopro/frontend_img/pay/cod_disabled.png')" |                 :src="sheep.$url.static('/static/img/shop/pay/cod_disabled.png')" | ||||||
|                 mode="aspectFit" |                 mode="aspectFit" | ||||||
|               ></image> |               ></image> | ||||||
|               <image |               <image | ||||||
|  | @ -127,7 +123,7 @@ | ||||||
|       disabled: false, |       disabled: false, | ||||||
|     }, |     }, | ||||||
|     { |     { | ||||||
|       icon: '/assets/addons/shopro/frontend_img/pay/cod.png', |       icon: '/static/img/shop/pay/cod.png', | ||||||
|       title: '货到付款', |       title: '货到付款', | ||||||
|       value: 'offline', |       value: 'offline', | ||||||
|       disabled: false, |       disabled: false, | ||||||
|  |  | ||||||
|  | @ -81,6 +81,11 @@ export default { | ||||||
|           ids: ids.join(','), |           ids: ids.join(','), | ||||||
|         } |         } | ||||||
|       }), |       }), | ||||||
|  |     getMpLink: () => | ||||||
|  |       request({ | ||||||
|  |         url: 'app/mplive/getMpLink', | ||||||
|  |         method: 'GET' | ||||||
|  |       }), | ||||||
|   }, |   }, | ||||||
| 
 | 
 | ||||||
|   //上传
 |   //上传
 | ||||||
|  |  | ||||||
|  | @ -22,11 +22,10 @@ export default { | ||||||
|         showLoading: false, |         showLoading: false, | ||||||
|       }, |       }, | ||||||
|     }), |     }), | ||||||
|   itemDetail: (params) => |   itemDetail: (id,itemId) => | ||||||
|     request({ |     request({ | ||||||
|       url: 'order/order/itemDetail', |       url: 'order/order/itemDetail/'+ id + '/' + itemId, | ||||||
|       method: 'GET', |       method: 'GET', | ||||||
|       params, |  | ||||||
|       custom: { |       custom: { | ||||||
|         showLoading: false, |         showLoading: false, | ||||||
|       }, |       }, | ||||||
|  |  | ||||||
|  | @ -73,7 +73,7 @@ | ||||||
|     }, |     }, | ||||||
|     title: { |     title: { | ||||||
|       type: String, |       type: String, | ||||||
|       default: '这是商品标题这是商品标题这是商品标题这是商品标题这是商品标题', |       default: '', | ||||||
|     }, |     }, | ||||||
|     titleWidth: { |     titleWidth: { | ||||||
|       type: Number, |       type: Number, | ||||||
|  |  | ||||||
|  | @ -58,6 +58,7 @@ | ||||||
| 
 | 
 | ||||||
|   const state = reactive({ |   const state = reactive({ | ||||||
|     liveList: [], |     liveList: [], | ||||||
|  |     mpLink: '', | ||||||
|   }); |   }); | ||||||
|   const props = defineProps({ |   const props = defineProps({ | ||||||
|     data: { |     data: { | ||||||
|  | @ -73,21 +74,36 @@ | ||||||
|   const { marginLeft, marginRight } = props.styles ?? {}; |   const { marginLeft, marginRight } = props.styles ?? {}; | ||||||
| 
 | 
 | ||||||
|   async function getLiveListByIds(ids) { |   async function getLiveListByIds(ids) { | ||||||
|     let { data } = await sheep.$api.app.mplive.getRoomList(ids); |     const { data } = await sheep.$api.app.mplive.getRoomList(ids); | ||||||
|     return data; |     return data; | ||||||
|   } |   } | ||||||
|   function goRoom(id) { |   function goRoom(id) { | ||||||
|     // wx.navigateTo({ |     // wx.navigateTo({ | ||||||
|     //   url: `plugin-private://wx2b03c6e691cd7370/pages/live-player-plugin?room_id=${id}&custom_params=${customParams}`, |     //   url: `plugin-private://wx2b03c6e691cd7370/pages/live-player-plugin?room_id=${id}&custom_params=${customParams}`, | ||||||
|     // }); |     // }); | ||||||
|  |     // #ifdef H5 | ||||||
|  |     window.location = state.mpLink; | ||||||
|  |     // #endif | ||||||
|  |     // #ifdef APP-PLUS | ||||||
|  |     plus.runtime.openURL(state.mpLink); | ||||||
|  |     // #endif | ||||||
|  |     // #ifdef MP-WEIXIN | ||||||
|     wx.navigateTo({ |     wx.navigateTo({ | ||||||
|       url: `plugin-private://wx2b03c6e691cd7370/pages/live-player-plugin?room_id=${id}`, |       url: `plugin-private://wx2b03c6e691cd7370/pages/live-player-plugin?room_id=${id}`, | ||||||
|     }); |     }); | ||||||
|  |     // #endif | ||||||
|  |   } | ||||||
|  | 
 | ||||||
|  |   async function getMpLink() { | ||||||
|  |     const { error, data } = await sheep.$api.app.mplive.getMpLink(); | ||||||
|  |     if (error === 0) { | ||||||
|  |       state.mpLink = data; | ||||||
|  |     } | ||||||
|   } |   } | ||||||
| 
 | 
 | ||||||
|   onMounted(async () => { |   onMounted(async () => { | ||||||
|     state.liveList = await getLiveListByIds(mpliveIds); |     state.liveList = await getLiveListByIds(mpliveIds); | ||||||
|     console.log(state.liveList, 'state.liveList'); |     getMpLink(); | ||||||
|   }); |   }); | ||||||
| </script> | </script> | ||||||
| <style lang="scss" scoped> | <style lang="scss" scoped> | ||||||
|  |  | ||||||
|  | @ -180,8 +180,8 @@ export default class SheepPay { | ||||||
| 
 | 
 | ||||||
|   // 货到付款
 |   // 货到付款
 | ||||||
|   async offlinePay() { |   async offlinePay() { | ||||||
|     const { code } = await this.prepay(); |     const { error } = await this.prepay(); | ||||||
|     code === 1 && this.payResult('success'); |     error === 0 && this.payResult('success'); | ||||||
|   } |   } | ||||||
| 
 | 
 | ||||||
|   // 支付宝复制链接支付
 |   // 支付宝复制链接支付
 | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue
	
	 kele
						kele