Commit 1e6f00a4 authored by mengcuiguang's avatar mengcuiguang

代码优化

parent f2913405
......@@ -143,7 +143,6 @@
imgInvite: "",
statusBarHeight: app.globalData.statusBarHeight,
userBean: {},
showAnimate: false,
windowHeight: 0,
os: 'android',
versionName: app.globalData.versionName,
......@@ -181,8 +180,8 @@
handleWatchRecord() {
navigateTo(`/pagesD/watchRecord/watchRecord`)
},
handleCoinPay() {
this.showAnimate = true;
handleInvite() {
navigateTo(`/pagesD/invite/invite`)
},
handlePayRecord() {
navigateTo(`/pagesD/payRecord/payRecord`)
......
......@@ -108,6 +108,14 @@
"navigationBarBackgroundColor": "#ffffff",
"navigationBarTextStyle": "black"
}
}, {
"path": "invite/invite",
"style": {
"navigationBarTitleText": "邀好友得1000看点",
"navigationStyle": "default",
"navigationBarBackgroundColor": "#ffffff",
"navigationBarTextStyle": "black"
}
}]
}
],
......
......@@ -151,6 +151,8 @@
} else if (this.currentPage == 1) {
// this.$refs.recommend.show();
} else if (this.currentPage == 2) {
this.$refs.follow.show();
}else if (this.currentPage == 3) {
this.$refs.user.show();
}
} catch (e) {
......@@ -174,21 +176,21 @@
this.$refs.recommend.hide();
this.$refs.follow.hide();
this.$refs.user.hide();
} else if (this.currentPage == 1) {
} else if (this.currentPage == 1) {
this.$refs.index.hide();
this.$refs.recommend.show();
this.$refs.follow.hide();
this.$refs.index.hide();
this.$refs.user.hide();
} else if (this.currentPage == 2) {
this.$refs.follow.show();
this.$refs.index.hide();
} else if (this.currentPage == 2) {
this.$refs.index.hide();
this.$refs.recommend.hide();
this.$refs.follow.show();
this.$refs.user.hide();
} else if (this.currentPage == 2) {
this.$refs.user.show();
this.$refs.index.hide();
this.$refs.recommend.hide();
} else if (this.currentPage == 3) {
this.$refs.index.hide();
this.$refs.recommend.hide();
this.$refs.follow.hide();
this.$refs.user.show();
}
},
goRecommend() {
......
......@@ -2,7 +2,7 @@
<view class="body">
<image style="width: 170rpx;height: 170rpx;margin-top: 30%;" src="@/static/logo-about.png" mode="widthFix" />
<view style="color: black;margin-top: 30rpx;font-size: 40rpx;font-size: 50rpx;">{{appName}}</view>
<view style="color: #FECF02;margin-top: 10rpx;font-size: 40rpx;font-size: 40rpx;">欢迎使用</view>
<view style="color: #A231EF;margin-top: 10rpx;font-size: 40rpx;font-size: 40rpx;">欢迎使用</view>
<view style="bottom: 0;position: absolute;">
<image style="width: 540rpx;height: 644rpx;display: flex;align-items: center;margin-bottom: 30%;"
src="https://mints-pkg.oss-cn-beijing.aliyuncs.com/pkg/img/book_bg_splash.png" mode="scaleToFill">
......@@ -33,31 +33,81 @@
mixins: [common],
data() {
return {
tips1: '',
tips1: '',
shareId: '',
slotParam: '',
appName: '幻墨小说阁'
appName: ''
}
},
onLoad(options) {
this.tips1 = options.tips1
this.tips1 = options.tips1
this.shareId = options.shareId
this.appName = '寻觅短剧'
},
onShow(options) {
// #ifdef MP-TOUTIAO
this.ttLoging()
// #endif
// #ifdef MP-WEIXIN
// this.wxlogin()
// #endif
},
methods: {
ttLoging() {
var that = this;
var obj = tt.getLaunchOptionsSync()
var tips2 = ''; // 投放测试
var channel = 'douyin' // 渠道
var tips2 = ''; // 投放测试标记
var product_type = ''; //自有产品
var zs_channel = ''; // 自有渠道
var vedio_id = ''; // 自有剧
var zs_os = ''; // 当前系统
var vedio_index = ''; // 自有剧
var free_index = ''; // 自有剧
var remark1 = ''; // 预留
var remark2 = ''; // 预留
var remark3 = ''; // 预留
var mid1 = "";
var mid2 = "";
var mid3 = "";
var mid4 = "";
var mid5 = "";
var thirdParam = "";
var album_id = obj.query.tt_album_id ?? '';
var episode_id = obj.query.tt_episode_id ?? '';
uni.setStorage({
key: 'tt_album_id',
data: album_id
});
uni.setStorage({
key: 'tt_episode_id',
data: episode_id
});
zs_os = wx.getSystemInfoSync().platform;
tips2 = obj.query.tips2 ?? ''
product_type = obj.query.product_type ?? ''
zs_channel = obj.query.zs_channel ?? ''
vedio_id = obj.query.vedio_id ?? ''
free_index = obj.query.free_index ?? ''
remark1 = obj.query.remark1 ?? ''
remark2 = obj.query.remark2 ?? ''
remark3 = obj.query.remark3 ?? ''
remark3 = obj.query.remark3 ?? ''
vedio_index = obj.query.vedio_index ?? ''
mid1 = obj.query.mid1 ?? ''
mid2 = obj.query.mid2 ?? ''
mid3 = obj.query.mid3 ?? ''
mid4 = obj.query.mid4 ?? ''
mid5 = obj.query.mid5 ?? ''
// 抖音feed页参数
thirdParam = JSON.stringify(obj.query);
// 打印渠道参数
if (this.tips1 == 'mints_vedio' || tips2 == 'mints_vedio') {
this.slotParam = JSON.stringify(obj.query);
......@@ -67,16 +117,30 @@
tt.login({
force: true,
success(res) {
console.log(`login 调用成功${res.code} ${res.anonymousCode}`);
that.post({
url: '/user/ttLogin',
data: {
channel: 'douyin',
channel: channel,
code: res.code,
anonymousCode: res.anonymousCode,
productType: product_type,
vedioId: vedio_id,
remark1: remark1,
remark2: remark2,
remark3: remark3,
thirdParam: thirdParam
remark3: remark3,
shareId: that.shareId,
os: zs_os,
vedioIndex: vedio_index,
freeIndex: free_index,
mid1: mid1,
mid2: mid2,
mid3: mid3,
mid4: mid4,
mid5: mid5,
thirdParam: thirdParam,
zsChannel: zs_channel
},
showLoading: false,
success: ({
......@@ -105,7 +169,7 @@
<style lang="scss">
.body {
background-color: white;
// background: linear-gradient(to bottom, #F2F1FF, #FBFBFF);
background: linear-gradient(to bottom, #F2F1FF, #FBFBFF);
display: flex;
flex-direction: column;
align-items: center;
......
<template>
<view class="body">
<scroll-view scroll-y style="height: 100%;">
<view class="pageclass">
<image style="width: 750rpx; height: 476rpx"
src="https://mints-web.oss-cn-beijing.aliyuncs.com/images/bg_invite0.png" mode="scaleToFill">
</image>
<view class="friendclass">
<image style="width: 686rpx; height: 830rpx"
src="https://mints-web.oss-cn-beijing.aliyuncs.com/images/bg_invite2.png" mode="scaleToFill">
</image>
<view style="position: absolute; bottom: 46rpx">
<view class="fontclass">
<text style="font-size: 24rpx; color: #8d513b">您在本期活动已邀请{{ inviteData.friendCount }}人,累计获得{{
inviteData.point
}}看点</text>
<!-- <text @click="handleRecord" style="font-size: 23rpx; color: #8d513b;
margin-top:8rpx;
text-decoration: underline;
">查看我的邀请明细 >></text> -->
</view>
</view>
</view>
<image style="width: 686rpx; margin-top: 20rpx; height: 370rpx"
src="https://mints-web.oss-cn-beijing.aliyuncs.com/images/bg_invite3.png" mode="scaleToFill">
</image>
<image style="
width: 686rpx;
margin-top: 20rpx;
height: 332rpx;
margin-bottom: 180rpx;
" 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>
</view>
</view>
</view>
</view>
</template>
<script>
import common from '@/mixins/common';
import {
formateTime
} from "@/utils/utils.js"
export default {
name: 'invite',
mixins: [common],
data() {
return {
showInvite: false,
inviteData: {},
shareUrl: ''
};
},
methods: {
show() {
},
}
};
</script>
<style lang="scss">
.body {
background-color: whitesmoke;
}
.wrapper {
display: flex;
align-items: center;
background-color: #ea2c20;
flex-direction: column;
width: 100%;
}
.pageclass {
display: flex;
align-items: center;
flex-direction: column;
width: 100%;
}
.bottomclass {
position: absolute;
object-fit: fill;
bottom: 0;
align-items: center;
justify-content: center;
width: 100%;
padding-bottom: 10rpx;
height: 130rpx;
background-color: #ffffff;
}
.rightclass {
position: absolute;
object-fit: fill;
margin-top: 300rpx;
right: 0;
align-items: center;
justify-content: center;
}
.sign-rule {
margin-left: auto;
background-color: #ffa500;
text-align: center;
font-size: 20rpx;
color: #ffffff;
padding-left: 26rpx;
padding-right: 20rpx;
height: 40rpx;
line-height: 40rpx;
border-top-left-radius: 40rpx;
border-bottom-left-radius: 40rpx;
}
.bottomtext {
align-items: center;
justify-content: center;
width: 90%;
height: 80rpx;
background-color: #fdbd3d;
border-radius: 50rpx;
color: white;
font-size: 26rpx;
}
.friendclass {
align-items: center;
justify-content: center;
width: 100%;
margin-top: 20rpx;
height: 830rpx;
display: flex;
flex-direction: column;
}
.fontclass {
align-items: center;
justify-content: center;
width: 100%;
display: flex;
flex-direction: column;
}
</style>
\ No newline at end of file
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