|
@@ -11,13 +11,13 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
<image class="bg" src="https://ndata.zzxcx.net/xpgx-xcx/index/bg1.png"></image>
|
|
|
- <image mode="widthFix" class="logo" src="https://ndata.zzxcx.net/xpgx-xcx/index/bg5.png"></image>
|
|
|
+ <image mode="widthFix" class="logo" src="https://ndata.zzxcx.net/xpgx-xcx/index/bg6.png"></image>
|
|
|
<view class="form">
|
|
|
<view class="content">
|
|
|
<image class="content-title" mode="widthFix" src="https://ndata.zzxcx.net/xpgx-xcx/index/title.png"></image>
|
|
|
<view class="content-inputs">
|
|
|
<view class="content-inputs-row">
|
|
|
- <view class="content-inputs-row-label">命主姓名</view>
|
|
|
+ <view class="content-inputs-row-label">姓名</view>
|
|
|
<view>
|
|
|
<input v-model="form.username" class="content-inputs-row-input" />
|
|
|
</view>
|
|
@@ -72,7 +72,7 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="content-inputs-row" style="flex-wrap: wrap;">
|
|
|
- <view class="content-inputs-row-label">命主性别</view>
|
|
|
+ <view class="content-inputs-row-label">性别</view>
|
|
|
<view @click="selectRadioByForm" class="content-inputs-row-radioGroup">
|
|
|
|
|
|
<view data-field="sex" data-value="1" class="content-inputs-row-radioUnchecked"
|
|
@@ -87,20 +87,20 @@
|
|
|
<view style="color: red;text-align: right;width: 100%;font-size: 24rpx;padding-right: 90rpx;">
|
|
|
排盘结果男女有别,请正确选择</view>
|
|
|
</view>
|
|
|
- <view class="content-inputs-row">
|
|
|
+ <!-- <view class="content-inputs-row">
|
|
|
<view class="content-inputs-row-label">是否保存</view>
|
|
|
<view @click="selectRadioByForm" class="content-inputs-row-radioGroup">
|
|
|
|
|
|
<view data-field="isSave" data-value="1" class="content-inputs-row-radioUnchecked"
|
|
|
:class="{ 'content-inputs-row-radioChecked': form.isSave == 1 }" checked="true">
|
|
|
- 是 <!-- <view style="width: 100%;height: 100%;"></view> -->
|
|
|
+ 是
|
|
|
</view>
|
|
|
<view data-field="isSave" data-value="0" class="content-inputs-row-radioUnchecked"
|
|
|
:class="{ 'content-inputs-row-radioChecked': form.isSave == 0 }" checked="true">
|
|
|
- 否 <!-- <view style="width: 100%;height: 100%;"></view> -->
|
|
|
+ 否
|
|
|
</view>
|
|
|
</view>
|
|
|
- </view>
|
|
|
+ </view> -->
|
|
|
<view class="content-button">
|
|
|
<!-- <navigator url="/pages/forecast/index"> -->
|
|
|
<view @click="submitForm" class="content-button-submit">开始排盘</view>
|
|
@@ -112,7 +112,23 @@
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
+ <van-popup round close-on-click-overlay safe-area-tab-bar :show="wxadWatchTip">
|
|
|
+ <view class="wxad">
|
|
|
+ <image src="https://ndata.zzxcx.net/ctjk/mp-wx/future/wxad_bg@2x.png" mode="widthFix"></image>
|
|
|
+ <view class="buttons">
|
|
|
+ <view @click="watchWxAd()" class="button1">
|
|
|
+ <van-icon custom-style="margin-right:10rpx;" color="#A21D0F" name="video-o" /><text>看广告免费领取</text>
|
|
|
+ </view>
|
|
|
+ <view @click="()=>{
|
|
|
+ wxadWatchTip=false
|
|
|
+ }" class="button2">
|
|
|
+ <van-icon custom-style="margin-right:10rpx;" color="#B35B23" name="close" />取消
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+
|
|
|
|
|
|
+ </van-popup>
|
|
|
<custom-tab-bar></custom-tab-bar>
|
|
|
<view style="height: 48px;width: 100%;">
|
|
|
|
|
@@ -123,9 +139,12 @@
|
|
|
<script>
|
|
|
import Vue from 'vue';
|
|
|
import calendar from 'js-calendar-converter'
|
|
|
+import { mapGetters, mapState } from "vuex";
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
|
+
|
|
|
+ wxadWatchTip: true,
|
|
|
videoSrc: "https://ndata.zzxcx.net/xpgx-xcx/video/8zi.mp4",
|
|
|
videoTime: 0,
|
|
|
isWatchFutureVideo: uni.getStorageSync("isWatchFutureVideo") || "0",
|
|
@@ -196,58 +215,96 @@ export default {
|
|
|
// this.videoSrc = "https://ndata.zzxcx.net/xpgx-xcx/video/8zi.mp4"
|
|
|
|
|
|
},
|
|
|
- submitForm() {
|
|
|
+ watchWxAd() {
|
|
|
let that = this
|
|
|
-
|
|
|
- wx.showModal({
|
|
|
- title: '看广告免费测算',
|
|
|
- content: '是否观看激励广告',
|
|
|
- success(res) {
|
|
|
-
|
|
|
- if (res.confirm) {
|
|
|
- console.log('用户点击确定')
|
|
|
- let videoAd = null;
|
|
|
- if (wx.createRewardedVideoAd) {
|
|
|
- videoAd = wx.createRewardedVideoAd({
|
|
|
- adUnitId: "adunit-f0e94618f34d4baf",
|
|
|
- });
|
|
|
- videoAd.onLoad(() => { });
|
|
|
- videoAd.onError((err) => {
|
|
|
- console.log(err)
|
|
|
- });
|
|
|
- videoAd.offClose();
|
|
|
- videoAd.onClose((res) => {
|
|
|
- if (!res.isEnded) {
|
|
|
- return
|
|
|
- }
|
|
|
- uni.navigateTo({
|
|
|
- url: `/pages/forecast/index?birthday=${that.form.birthday + ' ' + that.form.birthHour+':00'}&sex=${that.form.sex}&username=${that.form.username}`
|
|
|
- })
|
|
|
- });
|
|
|
-
|
|
|
- videoAd.show().catch(() => {
|
|
|
- // 失败重试
|
|
|
- videoAd
|
|
|
- .load()
|
|
|
- .then(() => videoAd.show())
|
|
|
- .catch((err) => {
|
|
|
- console.log("激励视频 广告显示失败");
|
|
|
- });
|
|
|
- });
|
|
|
-
|
|
|
- } else if (res.cancel) {
|
|
|
- console.log('用户点击取消')
|
|
|
- }
|
|
|
+ let videoAd = null;
|
|
|
+ if (wx.createRewardedVideoAd) {
|
|
|
+ videoAd = wx.createRewardedVideoAd({
|
|
|
+ adUnitId: "adunit-f0e94618f34d4baf",
|
|
|
+ });
|
|
|
+ videoAd.onLoad(() => { });
|
|
|
+ videoAd.onError((err) => {
|
|
|
+ console.log(err)
|
|
|
+ });
|
|
|
+ videoAd.offClose();
|
|
|
+ videoAd.onClose((res) => {
|
|
|
+ if (!res.isEnded) {
|
|
|
+ return
|
|
|
}
|
|
|
- }
|
|
|
+ uni.navigateTo({
|
|
|
+ url: `/pages/forecast/index?birthday=${that.form.birthday + ' ' + that.form.birthHour + ':00'}&sex=${that.form.sex}&username=${that.form.username}`
|
|
|
+ })
|
|
|
+ });
|
|
|
+
|
|
|
+ videoAd.show().catch(() => {
|
|
|
+ // 失败重试
|
|
|
+ videoAd
|
|
|
+ .load()
|
|
|
+ .then(() => videoAd.show())
|
|
|
+ .catch((err) => {
|
|
|
+ console.log("激励视频 广告显示失败");
|
|
|
+ });
|
|
|
+ });
|
|
|
+
|
|
|
+ } else if (res.cancel) {
|
|
|
+ console.log('用户点击取消')
|
|
|
+ }
|
|
|
+ },
|
|
|
+ submitForm() {
|
|
|
+ let that = this
|
|
|
+ if (this.baZiIsPay == '0') {
|
|
|
+ this.wxadWatchTip = true
|
|
|
+ return
|
|
|
+ }
|
|
|
+ // wx.showModal({
|
|
|
+ // title: '看广告免费测算',
|
|
|
+ // content: '是否观看激励广告',
|
|
|
+ // success(res) {
|
|
|
+
|
|
|
+ // if (res.confirm) {
|
|
|
+ // console.log('用户点击确定')
|
|
|
+ // let videoAd = null;
|
|
|
+ // if (wx.createRewardedVideoAd) {
|
|
|
+ // videoAd = wx.createRewardedVideoAd({
|
|
|
+ // adUnitId: "adunit-f0e94618f34d4baf",
|
|
|
+ // });
|
|
|
+ // videoAd.onLoad(() => { });
|
|
|
+ // videoAd.onError((err) => {
|
|
|
+ // console.log(err)
|
|
|
+ // });
|
|
|
+ // videoAd.offClose();
|
|
|
+ // videoAd.onClose((res) => {
|
|
|
+ // if (!res.isEnded) {
|
|
|
+ // return
|
|
|
+ // }
|
|
|
+ // uni.navigateTo({
|
|
|
+ // url: `/pages/forecast/index?birthday=${that.form.birthday + ' ' + that.form.birthHour + ':00'}&sex=${that.form.sex}&username=${that.form.username}`
|
|
|
+ // })
|
|
|
+ // });
|
|
|
+
|
|
|
+ // videoAd.show().catch(() => {
|
|
|
+ // // 失败重试
|
|
|
+ // videoAd
|
|
|
+ // .load()
|
|
|
+ // .then(() => videoAd.show())
|
|
|
+ // .catch((err) => {
|
|
|
+ // console.log("激励视频 广告显示失败");
|
|
|
+ // });
|
|
|
+ // });
|
|
|
+
|
|
|
+ // } else if (res.cancel) {
|
|
|
+ // console.log('用户点击取消')
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // }
|
|
|
|
|
|
- })
|
|
|
- // api.openApi.openApiBirthdayLog({
|
|
|
- // name:this.form.name,
|
|
|
- // sex:this.form.sex,
|
|
|
- // birthday:this.form.birthday+' '+this.form.birthHour+':00',
|
|
|
- // isPay:this.form.isPay
|
|
|
// })
|
|
|
+ api.openApi.openApiBirthdayLog({
|
|
|
+ name:this.form.name,
|
|
|
+ sex:this.form.sex,
|
|
|
+ birthday:this.form.birthday+' '+this.form.birthHour+':00',
|
|
|
+ isPay:this.form.isPay
|
|
|
+ })
|
|
|
|
|
|
|
|
|
|
|
@@ -279,7 +336,15 @@ export default {
|
|
|
}
|
|
|
|
|
|
}
|
|
|
- }
|
|
|
+ },
|
|
|
+ computed: {
|
|
|
+ ...mapState({
|
|
|
+ baZiIsPay: (state) => {
|
|
|
+ return state.user.baZiIsPay
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
+ },
|
|
|
};
|
|
|
</script>
|
|
|
|
|
@@ -291,6 +356,47 @@ export default {
|
|
|
position: relative;
|
|
|
height: 1500rpx;
|
|
|
|
|
|
+ .wxad {
|
|
|
+ width: 580rpx;
|
|
|
+ position: relative;
|
|
|
+
|
|
|
+ .buttons {
|
|
|
+ position: absolute;
|
|
|
+ top: 478rpx;
|
|
|
+ display: flex;
|
|
|
+ justify-content: center;
|
|
|
+ height: 202rpx;
|
|
|
+ width: 100%;
|
|
|
+ flex-wrap: wrap;
|
|
|
+
|
|
|
+ .button1 {
|
|
|
+ width: 412rpx;
|
|
|
+ background-image: url('https://ndata.zzxcx.net/ctjk/mp-wx/future/wxad_button1_bg@2x.png');
|
|
|
+ height: 80rpx;
|
|
|
+ background-size: 100% 100%;
|
|
|
+ line-height: 80rpx;
|
|
|
+ font-size: 34rpx;
|
|
|
+ text-align: center;
|
|
|
+ color: #A21D0F;
|
|
|
+ font-weight: bold;
|
|
|
+ border-radius: 20rpx;
|
|
|
+ }
|
|
|
+
|
|
|
+ .button2 {
|
|
|
+ width: 412rpx;
|
|
|
+ height: 80rpx;
|
|
|
+ background-color: #F8D5BA;
|
|
|
+ color: #B35B23;
|
|
|
+ font-size: 34rpx;
|
|
|
+ font-weight: bold;
|
|
|
+ line-height: 80rpx;
|
|
|
+ text-align: center;
|
|
|
+ border-radius: 20rpx;
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
.video {
|
|
|
position: absolute;
|
|
|
top: 10vh;
|