Commit 38ac24fa authored by mengcuiguang's avatar mengcuiguang

代码优化

parent 1e6f00a4
......@@ -25,19 +25,19 @@
src="@/static/index/ic_quit_white.png"></image>
</view>
</view>
<view style="display: flex;flex-direction: column;align-items: center;margin-bottom: 20rpx;">
<view style="display: flex;flex-direction: column;margin-bottom: 20rpx;padding-left: 14rpx;">
<view style="font-size: 38rpx;color: black;">{{titleText}}</view>
<view class="flex">
<view v-if="point>0" style="display: flex;flex-direction: row;margin-top: 10rpx;">
<view style="font-size: 28rpx;color: #644238;margin-top: 12rpx;">解锁本集:</view>
<view style="font-size: 28rpx;color: #644238;margin-top: 12rpx;">解锁本集</view>
<view style="font-size: 42rpx;color: red;font-weight: 777;">{{point}}</view>
<view style="font-size: 28rpx;color: #644238;margin-top: 12rpx;margin-left: 6rpx;">
看点
看点,
</view>
</view>
<view v-if="point>0" style="width: 60rpx;"></view>
<view style="display: flex;flex-direction: row;margin-top: 10rpx;">
<view style="font-size: 28rpx;color: #644238;margin-top: 12rpx;">账户余额:</view>
<view style="font-size: 28rpx;color: #644238;margin-top: 12rpx;">当前账户余额:</view>
<view style="font-size: 42rpx;color: red;font-weight: 777;">{{userBean.point}}
</view>
<view style="font-size: 28rpx;color: #644238;margin-top: 12rpx;margin-left: 6rpx;">
......@@ -80,6 +80,12 @@
</view>
</view>
<view style="display: flex;flex-direction: column;align-items: center;">
<view @click="onVip"
style="font-size: 34rpx;color: gray;margin-top: 16rpx;margin-bottom: 10rpx;">
更多充值及说明 ></view>
</view>
<view style="display: flex;flex-direction: column;align-items: center;">
<view style="font-size: 24rpx;color: gray;margin-top: 16rpx;margin-bottom: 18rpx;">
订单中如有疑问,请在个人中心联系客服</view>
......@@ -95,10 +101,12 @@
</template>
<script>
import common from '@/mixins/common';
import {
message
} from '@/utils/fun';
import common from '@/mixins/common';
import {
navigateTo,
message,
loading
} from '@/utils/fun.js';
export default {
name: 'coinPopup',
mixins: [common],
......@@ -123,7 +131,7 @@
agreeFlag: false,
userBean: {},
os: 'android',
titleText: '超多精彩好剧一键解锁',
titleText: '解锁剧集',
showClone: false
};
},
......@@ -193,9 +201,6 @@
handlePay() {
let that = this;
let vipBean = this.vipList[this.selectedIndex];
// 抖音支付
// #ifdef MP-TOUTIAO
this.post({
url: '/vip/getVipPayParams/douyin',
data: {
......@@ -210,7 +215,10 @@
that.ttPrePay(data, vipBean.largeType);
}
});
// #endif
},
onVip() {
navigateTo(`/pagesA/vipPay/vipPay`)
this.handleClose();
},
ttPrePay(ttData, largeType) {
if (!tt.canIUse('requestOrder')) {
......@@ -256,8 +264,8 @@
},
fail(res) {
if (res.errNo == '4') {
// 4-支付取消
// 4-支付取消
}
message.notify(res.errMsg);
......@@ -269,10 +277,10 @@
success(res) {
that.queryOrderStatus(largeType, ttData.tidStr);
},
fail(res) {
if (res.errNo == '4') {
// 4-支付取消
fail(res) {
if (res.errNo == '4') {
// 4-支付取消
}
// message.notify(res.errMsg);
},
......
......@@ -355,8 +355,8 @@
});
},
handleBanner(item) {
// navigateTo(`/pagesC/ttvideo/ttVideoDetail?data=` + encodeURIComponent(JSON.stringify(item)) +
// '&tt_album_id=' + item.douyinAlbumId + '&tt_episode_id=' + item.douyinEpisodeId);
navigateTo(`/pagesC/ttvideo/ttVideoDetail?data=` + encodeURIComponent(JSON.stringify(item)) +
'&tt_album_id=' + item.douyinAlbumId + '&tt_episode_id=' + item.douyinEpisodeId);
},
handleInfo(item) {
navigateTo(`/pagesC/ttvideo/ttVideoDetail?data=` + encodeURIComponent(JSON.stringify(item)) +
......
......@@ -111,20 +111,11 @@
</template>
<script>
import common from '@/mixins/common';
import {
getToLocal
} from "@/utils/utils.js"
import {
navigateTo,
message,
alert,
loading
} from '@/utils/fun.js';
import {
openUrl
} from '@/utils/app+.js';
const app = getApp();
......@@ -133,27 +124,11 @@
mixins: [common],
data() {
return {
imgTop: "",
hasMobile: false,
hideMobile: "",
isVip: false,
vipTime: "",
imgVip: "",
imgTask: "",
imgInvite: "",
statusBarHeight: app.globalData.statusBarHeight,
userBean: {},
windowHeight: 0,
os: 'android',
versionName: app.globalData.versionName,
corpid: '', // 企业ID
curl: '', // 客服链接
userBean: {}
};
},
methods: {
show() {
// this.os = wx.getSystemInfoSync().platform;
this.windowHeight = uni.getSystemInfoSync().windowHeight
// loadData() {
this.post({
url: '/user/baseMsg',
......@@ -167,6 +142,9 @@
},
hide() {
},
handleTask() {
navigateTo(`/pagesA/task/task`)
},
handleDotRecord() {
// 看点记录
......@@ -180,7 +158,7 @@
handleWatchRecord() {
navigateTo(`/pagesD/watchRecord/watchRecord`)
},
handleInvite() {
handleInvite() {
navigateTo(`/pagesD/invite/invite`)
},
handlePayRecord() {
......@@ -203,9 +181,7 @@
paySuccess(largeType) {
// largeType=vip 开通vip
// largeType=point 购买看点
if (wx.getSystemInfoSync().platform == 'ios') {
message.notify('支付成功');
}
message.notify('支付成功');
this.post({
url: '/user/baseMsg',
......
......@@ -92,13 +92,13 @@
<uni-popup ref="alertDialog" type="center">
<!-- <uni-popup ref="alertDialog" type="center">
<uni-popup-dialog confirmText="确认" title="付费须知" content="
1、会员属于虚拟商品,一经购买不可退换;
2、未满18岁的未成年人需要在监护人主导、同意下进行相关付费操作;
3、充值会员一般5分钟内到账,如未到账请在“我的”页面联系客服;" @close="dialogClose">
</uni-popup-dialog>
</uni-popup>
</uni-popup> -->
</view>
</template>
......@@ -262,8 +262,15 @@
}
}
},
handleAgree() {
this.$refs.alertDialog.open();
handleAgree() {
uni.showModal({
title: '付费须知',
content: '1、会员属于虚拟商品,一经购买不可退换;\n2、未满18岁的未成年人需要在监护人主导、同意下进行相关付费操作;\n3、充值会员一般5分钟内到账,如未到账请在“我的”页面联系客服;',
showCancel: false,
confirmColor: '#33dd44',
confirmText: '确定'
})
// this.$refs.alertDialog.open();
},
handlePay() {
let that = this;
......
<template>
<view class="body">
<scroll-view scroll-y style="height: 100%;">
<z-paging style="height: 88%;">
<view class="pageclass">
<image style="width: 750rpx; height: 476rpx"
src="https://mints-web.oss-cn-beijing.aliyuncs.com/images/bg_invite0.png" mode="scaleToFill">
......@@ -10,7 +10,7 @@
src="https://mints-web.oss-cn-beijing.aliyuncs.com/images/bg_invite2.png" mode="scaleToFill">
</image>
<view style="position: absolute; bottom: 46rpx">
<view style="position: absolute; top: 1246rpx">
<view class="fontclass">
<text style="font-size: 24rpx; color: #8d513b">您在本期活动已邀请{{ inviteData.friendCount }}人,累计获得{{
inviteData.point
......@@ -34,32 +34,33 @@
" src="https://mints-web.oss-cn-beijing.aliyuncs.com/images/bg_invite4.png" mode="scaleToFill"></image>
</view>
<view @click="handleRule" class="rightclass">
<text class="sign-rule">规则</text>
</view>
</scroll-view>
<view @click="handleShare" class="bottomclass">
<view class="bottomtext">
<text style="
color: #9d3c13;
font-size: 26rpx;
justify-content: center;
align-items: center;
">
邀请好友
</text>
<view style="position: absolute; bottom: -10rpx; right: 200rpx">
<image style="width: 100rpx; height: 100rpx"
src="https://mints-pkg.oss-cn-beijing.aliyuncs.com/pkg/img/ic_loading.gif">
</image>
</z-paging>
<view style="display: flex;justify-content: center;
align-items: center;flex-direction: column;">
<view @click="handleShare" class="bottomclass">
<view class="bottomtext">
<text style="
display: flex;
color: #9d3c13;
font-size: 26rpx;
height: 80rpx;
padding-bottom: 20rpx;
justify-content: center;
align-items: center;
">
邀请好友
</text>
</view>
</view>
</view>
</view>
</template>
<script>
......@@ -74,23 +75,37 @@
mixins: [common],
data() {
return {
showInvite: false,
inviteData: {},
shareUrl: ''
inviteData: {}
};
},
methods: {
show() {
},
loadData() {
this.post({
url: '/vTask/share/pageMsg',
showLoading: false,
success: ({
data
}) => {
this.inviteData = data;
}
});
},
handleRule(){
uni.showModal({
title: '邀请好友规则',
content: '1、本周邀请新用户活动!邀请好友越多,获得奖励越高,邀请达到页面展示的人数时,系统发放对应档位的奖励看点,各档位可累积获得。邀请第8人及以上,每多邀请1位新用户可得120看点,上不封顶。\n\n2、本活动为限时活动,用户需要在活动页面展示的时间内邀请成功,可获得本活动页面展示的奖励看点。注意:通过签到分享、早中晚任务分享的奖励不计入此活动奖励。\n\n3、被邀请的好友必须是没有使用过河狸刷剧的新用户。好友点击你分享的链接,进入本软件内播放剧集,算邀请成功。\n\n4、本页面的邀请记录明细中只展示通过当前活动页面邀请到的用户。在之前活动期内邀请成功的用户不计入此活动,获得的奖励请到【我的-看点记录】里查看。\n\n5、郑重声明,为了保障广大用户的利益,对于非正常邀请用户,平台将取消其参加活动资格,并扣除相应奖励。',
showCancel: false,
confirmColor: '#33dd44',
confirmText: '确定'
})
}
}
};
</script>
<style lang="scss">
.body {
background-color: whitesmoke;
background-color: #ea2c20;
}
.wrapper {
......@@ -109,7 +124,7 @@
}
.bottomclass {
position: absolute;
display: flex;
object-fit: fill;
bottom: 0;
align-items: center;
......@@ -122,11 +137,8 @@
.rightclass {
position: absolute;
object-fit: fill;
margin-top: 300rpx;
top: 246rpx;
right: 0;
align-items: center;
justify-content: center;
}
.sign-rule {
......@@ -137,8 +149,10 @@
color: #ffffff;
padding-left: 26rpx;
padding-right: 20rpx;
height: 40rpx;
line-height: 40rpx;
padding-top: 10rpx;
padding-bottom: 10rpx;
height: 60rpx;
line-height: 60rpx;
border-top-left-radius: 40rpx;
border-bottom-left-radius: 40rpx;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment