|
@@ -1,32 +1,45 @@
|
|
|
-import { orderStatus } from '@/views/order-detail/orderStatus'
|
|
|
-import { Dialog } from 'vant'
|
|
|
-
|
|
|
-export const musicBuy = (item: any, callBack?: any) => {
|
|
|
- // play :0 不能看,1 能看
|
|
|
- const path =
|
|
|
- !item.play && item.chargeType === 'VIP' ? '/memberCenter' : '/orderDetail'
|
|
|
- if (!item.play && item.chargeType === 'VIP') {
|
|
|
- Dialog.confirm({
|
|
|
- title: '提示',
|
|
|
- message: '您还不是会员,是否加入会员?',
|
|
|
- confirmButtonColor: 'var(--van-primary)'
|
|
|
- }).then(() => {
|
|
|
- callBack && callBack(path)
|
|
|
- })
|
|
|
- return
|
|
|
- } else if (!item.play && item.chargeType === 'CHARGE') {
|
|
|
- orderStatus.orderObject.orderType = 'MUSIC'
|
|
|
- orderStatus.orderObject.orderName = item.musicSheetName
|
|
|
- orderStatus.orderObject.orderDesc = item.musicSheetName
|
|
|
- orderStatus.orderObject.actualPrice = item.musicPrice
|
|
|
- orderStatus.orderObject.orderList = [
|
|
|
- {
|
|
|
- orderType: 'MUSIC',
|
|
|
- goodsName: item.musicSheetName,
|
|
|
- actualPrice: item.musicPrice,
|
|
|
- ...item
|
|
|
- }
|
|
|
- ]
|
|
|
- callBack && callBack(path)
|
|
|
- }
|
|
|
-}
|
|
|
+import { orderStatus } from '@/views/order-detail/orderStatus'
|
|
|
+import { postMessage } from '@/helpers/native-message'
|
|
|
+import { Dialog } from 'vant'
|
|
|
+
|
|
|
+export const musicBuy = (item: any, callBack?: any) => {
|
|
|
+ postMessage({
|
|
|
+ api: 'openAccompanyWebView',
|
|
|
+ content: {
|
|
|
+ // url: location.origin + '/accompany?id=' + item.id,
|
|
|
+ url: 'http://192.168.3.13:3000/colexiu.html?id=' + item.id,
|
|
|
+ orientation: 0,
|
|
|
+ isHideTitle: true,
|
|
|
+ statusBarTextColor: false,
|
|
|
+ isOpenLight: true
|
|
|
+ }
|
|
|
+ })
|
|
|
+ return
|
|
|
+ // play :0 不能看,1 能看
|
|
|
+ const path =
|
|
|
+ !item.play && item.chargeType === 'VIP' ? '/memberCenter' : '/orderDetail'
|
|
|
+ if (!item.play && item.chargeType === 'VIP') {
|
|
|
+ Dialog.confirm({
|
|
|
+ title: '提示',
|
|
|
+ message: '您还不是会员,是否加入会员?',
|
|
|
+ confirmButtonColor: 'var(--van-primary)'
|
|
|
+ }).then(() => {
|
|
|
+ callBack && callBack(path)
|
|
|
+ })
|
|
|
+ return
|
|
|
+ } else if (!item.play && item.chargeType === 'CHARGE') {
|
|
|
+ orderStatus.orderObject.orderType = 'MUSIC'
|
|
|
+ orderStatus.orderObject.orderName = item.musicSheetName
|
|
|
+ orderStatus.orderObject.orderDesc = item.musicSheetName
|
|
|
+ orderStatus.orderObject.actualPrice = item.musicPrice
|
|
|
+ orderStatus.orderObject.orderList = [
|
|
|
+ {
|
|
|
+ orderType: 'MUSIC',
|
|
|
+ goodsName: item.musicSheetName,
|
|
|
+ actualPrice: item.musicPrice,
|
|
|
+ ...item
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ callBack && callBack(path)
|
|
|
+ }
|
|
|
+}
|