|
@@ -39,7 +39,7 @@
|
|
<image src="../../static/ticketBox/ticket_block.png" mode="scaleToFill"></image>
|
|
<image src="../../static/ticketBox/ticket_block.png" mode="scaleToFill"></image>
|
|
<view class="txt">¥{{ $numberFormat(info.salePrice) }}</view>
|
|
<view class="txt">¥{{ $numberFormat(info.salePrice) }}</view>
|
|
</view>
|
|
</view>
|
|
- <view class="prize-price-past" v-if="info.originPrice != 0">原价:¥{{ $numberFormat(info.originPrice) }}/个</view>
|
|
|
|
|
|
+ <view class="prize-price-past" v-if="info.originPrice != 0">原价:¥{{ $numberFormat(info.originPrice) }}</view>
|
|
</view>
|
|
</view>
|
|
|
|
|
|
<!-- 开启盲票 -->
|
|
<!-- 开启盲票 -->
|
|
@@ -49,7 +49,10 @@
|
|
<image src="../../static/ticketBox/ticket_btn_center.png" mode="scaleToFill"></image>
|
|
<image src="../../static/ticketBox/ticket_btn_center.png" mode="scaleToFill"></image>
|
|
<view class="ticket-btn-center-txt">刮开盲票</view>
|
|
<view class="ticket-btn-center-txt">刮开盲票</view>
|
|
</view>
|
|
</view>
|
|
- <image class="ticket-btn-share" src="../../static/ticketBox/ticket_share.png" mode="scaleToFill"></image>
|
|
|
|
|
|
+ <view class="ticket-btn-share flex">
|
|
|
|
+ <image src="../../static/ticketBox/ticket_share.png" mode="scaleToFill" @click="toShare"></image>
|
|
|
|
+ <button type="default" open-type="share" v-if="loginState"></button>
|
|
|
|
+ </view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
|
|
|
|
@@ -126,7 +129,9 @@
|
|
prizeIndex: 0,
|
|
prizeIndex: 0,
|
|
contnetHeight: 0,
|
|
contnetHeight: 0,
|
|
btnFixed: false,
|
|
btnFixed: false,
|
|
- prizeInfo: {}
|
|
|
|
|
|
+ prizeInfo: {},
|
|
|
|
+ userInfo: {},
|
|
|
|
+ loginState: false,
|
|
};
|
|
};
|
|
},
|
|
},
|
|
|
|
|
|
@@ -166,10 +171,14 @@
|
|
},
|
|
},
|
|
|
|
|
|
onShow() {
|
|
onShow() {
|
|
|
|
+ this.loginState = uni.getStorageSync('token') ? true : false
|
|
this.pagesNum = getCurrentPages().length
|
|
this.pagesNum = getCurrentPages().length
|
|
if (this.boxId) {
|
|
if (this.boxId) {
|
|
this.getDetail()
|
|
this.getDetail()
|
|
}
|
|
}
|
|
|
|
+ if(this.loginState) {
|
|
|
|
+ this.getBaseInfo()
|
|
|
|
+ }
|
|
},
|
|
},
|
|
|
|
|
|
methods: {
|
|
methods: {
|
|
@@ -254,15 +263,16 @@
|
|
},
|
|
},
|
|
|
|
|
|
toShare() {
|
|
toShare() {
|
|
- if (!uni.getStorageSync('token')) {
|
|
|
|
- uni.navigateTo({
|
|
|
|
- url: "/pages/login/index"
|
|
|
|
- })
|
|
|
|
- return
|
|
|
|
- }
|
|
|
|
- uni.navigateTo({
|
|
|
|
- url: `/packageOperate/share/index?boxId=${ this.info.boxId }`
|
|
|
|
- })
|
|
|
|
|
|
+ this.getBaseInfo()
|
|
|
|
+ // if (!uni.getStorageSync('token')) {
|
|
|
|
+ // uni.navigateTo({
|
|
|
|
+ // url: "/pages/login/index"
|
|
|
|
+ // })
|
|
|
|
+ // return
|
|
|
|
+ // }
|
|
|
|
+ // uni.navigateTo({
|
|
|
|
+ // url: `/packageOperate/share/index?boxId=${ this.info.boxId }`
|
|
|
|
+ // })
|
|
},
|
|
},
|
|
|
|
|
|
toIndex() {
|
|
toIndex() {
|
|
@@ -296,6 +306,23 @@
|
|
url: `/packagePrize/goods/detail?id=424`
|
|
url: `/packagePrize/goods/detail?id=424`
|
|
})
|
|
})
|
|
}
|
|
}
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ getBaseInfo() {
|
|
|
|
+ $http.post('/api/v1/mp/user/getLoginUserinfo', {}).then(res => {
|
|
|
|
+ uni.hideLoading();
|
|
|
|
+ if (res.code == 0) {
|
|
|
|
+ this.userInfo = res.data
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ onShareAppMessage(res) {
|
|
|
|
+ return {
|
|
|
|
+ title: '分享盲票',
|
|
|
|
+ path: `/pages/ticketBox/detail?boxId=${ this.info.boxId }&userId=${ this.userInfo.userId }&type=1`,
|
|
|
|
+ type: 2,
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -456,8 +483,30 @@
|
|
}
|
|
}
|
|
|
|
|
|
&-share {
|
|
&-share {
|
|
|
|
+ position: relative;
|
|
width: 110rpx;
|
|
width: 110rpx;
|
|
height: 110rpx;
|
|
height: 110rpx;
|
|
|
|
+
|
|
|
|
+ image {
|
|
|
|
+ position: absolute;
|
|
|
|
+ width: 110rpx;
|
|
|
|
+ height: 110rpx;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /deep/ button {
|
|
|
|
+ position: absolute;
|
|
|
|
+ z-index: 5;
|
|
|
|
+ width: 110rpx;
|
|
|
|
+ height: 110rpx;
|
|
|
|
+ background: none;
|
|
|
|
+ border: none !important;
|
|
|
|
+ }
|
|
|
|
+ /deep/ uni-button:after {
|
|
|
|
+ border: none !important;
|
|
|
|
+ }
|
|
|
|
+ /deep/ button:after {
|
|
|
|
+ border: none !important;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|