| xqd
@@ -6,7 +6,10 @@
|
|
|
<view class="scratch-head">
|
|
|
<view class="s-h" @click="rules">规则</view>
|
|
|
<view class="s-h" @click="share">分享</view>
|
|
|
- <app-share-qr-code-poster v-model="shareShow" :url="poster" title="生成海报"></app-share-qr-code-poster>
|
|
|
+ <app-share-qr-code-poster @share="hShareAppMessage"
|
|
|
+ v-model="shareShow"
|
|
|
+ :url="poster" title="生成海报"
|
|
|
+ ></app-share-qr-code-poster>
|
|
|
</view>
|
|
|
<view class="scratch-oppty">
|
|
|
<view>您还有
|
| xqd
@@ -34,13 +37,15 @@
|
|
|
@touchend="touchEnd"
|
|
|
disable-scroll></canvas>
|
|
|
<view v-if="is_name" class="award-name">
|
|
|
- <text>{{list.name}}</text>
|
|
|
+ <text>{{list ? list.name : ''}}</text>
|
|
|
<app-button v-if="oppty > 0" @click="onStart" background="#f05525" height="80"
|
|
|
width="400"
|
|
|
+ border-color="#f05525"
|
|
|
color="#FFFFFF" font-size="32" round>再刮一次
|
|
|
</app-button>
|
|
|
<app-button v-if="oppty == 0" @click="onStart" background="#cdcdcd" height="80"
|
|
|
width="400"
|
|
|
+ border-color="#cdcdcd"
|
|
|
color="#FFFFFF" font-size="32" round>再刮一次
|
|
|
</app-button>
|
|
|
</view>
|
| xqd
@@ -49,12 +54,12 @@
|
|
|
</view>
|
|
|
<view class="dir-left-nowrap main-center cross-center end">
|
|
|
<view @click="home" class="dir-left-nowrap cross-center box-grow-0 left">
|
|
|
- <icon class="end-icon home"></icon>
|
|
|
+ <icon class="end-icon home" type></icon>
|
|
|
<view>回到首页</view>
|
|
|
</view>
|
|
|
<view @click="prize" class="dir-left-nowrap cross-center box-grow-0">
|
|
|
<view>我的中奖记录</view>
|
|
|
- <icon class="end-icon price"></icon>
|
|
|
+ <icon class="end-icon price" type></icon>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="prize">
|
| xqd
@@ -79,14 +84,15 @@
|
|
|
<view class="act-modal-bg"></view>
|
|
|
<view class="act-modal-pic cross-center main-center">
|
|
|
<view class="success main-center">
|
|
|
- <icon class="image-bg" :style="{'background-image': `url(${appImg.scratch_win})`}">></icon>
|
|
|
+ <icon class="image-bg" :style="{'background-image': `url(${appImg.scratch_win})`}" type></icon>
|
|
|
<view class="dir-top-nowrap name main-center">
|
|
|
<view>恭喜获得</view>
|
|
|
<text class="main-center">{{list.name}}</text>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="act-modal-end dir-top-nowrap cross-center main-center">
|
|
|
- <app-button @click="onStart" height="72" width="320" color="#FFFFFF" background="#f05525"
|
|
|
+ <app-button @click="onStart" height="72" width="320" color="#FFFFFF" background="#f05525"
|
|
|
+ border-color="#f05525"
|
|
|
round>再刮一次
|
|
|
</app-button>
|
|
|
<view class="act-zh">奖品已放入您的账号</view>
|
| xqd
@@ -123,7 +129,7 @@ export default {
|
|
|
lastX,
|
|
|
lastY,
|
|
|
logs: [],
|
|
|
- setting: null,
|
|
|
+ setting: {},
|
|
|
list: null,
|
|
|
oppty: 0,
|
|
|
msg: '', //错误信息
|
| xqd
@@ -147,20 +153,26 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
- onUnload: function () {
|
|
|
+ onUnload () {
|
|
|
clearInterval(this.interval);
|
|
|
},
|
|
|
- onHide: function () {
|
|
|
+ onHide () {
|
|
|
clearInterval(this.interval);
|
|
|
},
|
|
|
- onShareAppMessage: function () {
|
|
|
- return this.$shareAppMessage({
|
|
|
+ // #ifdef MP-WEIXIN
|
|
|
+ onLoad(options) { this.$commonLoad.onload(options);
|
|
|
+ wx.showShareMenu({
|
|
|
+ withShareTicket: true,
|
|
|
+ menus: ['shareAppMessage', 'shareTimeline']
|
|
|
+ })
|
|
|
+ },
|
|
|
+ onShareTimeline() {
|
|
|
+ return this.$shareTimeline({
|
|
|
title: this.$children[0].navigationBarTitle,
|
|
|
- path: '/plugins/scratch/index/index',
|
|
|
- params: {}
|
|
|
+ query: {}
|
|
|
});
|
|
|
},
|
|
|
-
|
|
|
+ // #endif
|
|
|
onShow() {
|
|
|
const self = this;
|
|
|
self.$showLoading({title: '加载中'});
|
| xqd
@@ -184,7 +196,23 @@ export default {
|
|
|
}, 10000)
|
|
|
},
|
|
|
|
|
|
+ // #ifdef MP
|
|
|
+ onShareAppMessage() {
|
|
|
+ return this.$shareAppMessage({
|
|
|
+ title: this.$children[0].navigationBarTitle,
|
|
|
+ path: '/plugins/scratch/index/index',
|
|
|
+ params: {}
|
|
|
+ });
|
|
|
+ },
|
|
|
+ // #endif
|
|
|
methods: {
|
|
|
+ hShareAppMessage(s = false){
|
|
|
+ return this.$shareAppMessage({
|
|
|
+ title: this.$children[0].navigationBarTitle,
|
|
|
+ path: '/plugins/scratch/index/index',
|
|
|
+ params: {}
|
|
|
+ }, s);
|
|
|
+ },
|
|
|
register() {
|
|
|
if (this.msg) {
|
|
|
uni.showToast({icon: `none`, title: this.msg});
|
| xqd
@@ -343,7 +371,7 @@ export default {
|
|
|
<style scoped lang="scss">
|
|
|
.app-layout /deep/ .app-layout {
|
|
|
background: #5e00b8;
|
|
|
- min-height: calc(100vh - var(--window-top));
|
|
|
+ min-height: 100vh;
|
|
|
}
|
|
|
.scratch-canvas {
|
|
|
width: #{600rpx};
|
| xqd
@@ -360,7 +388,7 @@ export default {
|
|
|
position: absolute;
|
|
|
left: 0;
|
|
|
top: 0;
|
|
|
- height: calc(100vh - var(--window-top));
|
|
|
+ height: 100vh;
|
|
|
width: #{100%};
|
|
|
display: block;
|
|
|
background-repeat: no-repeat;
|
| xqd
@@ -614,7 +642,7 @@ export default {
|
|
|
left: 0;
|
|
|
|
|
|
.image-bg {
|
|
|
- height: #{731rpx};
|
|
|
+ height: #{733rpx};
|
|
|
width: 100%;
|
|
|
background-repeat: no-repeat;
|
|
|
background-size: 100% 100%;
|