ios 首页 任务 我的 修改

This commit is contained in:
duan
2024-12-30 22:30:10 +08:00
parent 9a52daeffe
commit c978fab954
33 changed files with 3400 additions and 696 deletions

View File

@@ -1,9 +1,22 @@
<template>
<view style="padding-bottom: 40rpx;">
<u-navbar :background="background" :is-back="isBack" :title="title" :border-bottom="false">
</u-navbar>
<!-- <u-navbar :background="background" :is-back="isBack" :title="title" :border-bottom="false">
</u-navbar> -->
<!-- 登录信息 -->
<view class="info flex align-center justify-center">
<view class="info " style="padding: 20rpx;">
<view
style="background-color: #f5f1f1;padding: 20rpx; display: flex;align-items: center;justify-content: space-between;"
class="">
<image src="../../static/logo.png" style="width: 170rpx;height: 51rpx;z-index: 999;" mode=""></image>
<!-- <view class="">
<image src="../../static/dwbimgs/one.png" style="width: 46rpx;height: 46rpx;z-index: 999;" mode="">
</image>
<image src="../../static/dwbimgs/two.png" style="width: 46rpx;height: 46rpx;z-index: 999;" mode="">
</image>
<image src="../../static/dwbimgs/three.png" style="width: 46rpx;height: 46rpx;z-index: 999;"
mode=""></image>
</view> -->
</view>
<view class="info-box">
<view @click="token?goNav('/pages/me/userinfo'):goNav('/pages/login/login')"
class="info-box-c flex align-center justify-between">
@@ -15,9 +28,9 @@
<view class="info-box-c-l-name-t">
{{userName?userName:'未登录'}}
</view>
<view class="info-box-c-l-name-b" v-if="invitationCode">
<!-- <view class="info-box-c-l-name-b" v-if="invitationCode">
ID:{{invitationCode}}
</view>
</view> -->
</view>
</view>
<view class="info-box-c-r">
@@ -28,22 +41,22 @@
</view>
<!-- 统计 -->
<view class="statistics flex align-center justify-center">
<view class="statistics-box flex align-center justify-between">
<view class="statistics-box flex align-center justify-between" style="margin: 0 100rpx;">
<view class="statistics-box-item" @click="goNav('/me/jilu/duanju-love')">
<view class="statistics-box-item-top">
{{myLoveNum}}
</view>
<view class="statistics-box-item-btn">
我的喜欢
</view>
<view class="statistics-box-item-top">
{{myLoveNum}}
</view>
</view>
<view class="statistics-box-item" @click="goNav('/me/jilu/duanju-zhjuiju-jilu')">
<view class="statistics-box-item-top">
{{myZhui}}
</view>
<view class="statistics-box-item-btn">
我的追剧
</view>
<view class="statistics-box-item-top">
{{myZhui}}
</view>
</view>
<!-- <view class="statistics-box-item" @click="goNav('/me/jifen/duanju-jifen')">
<view class="statistics-box-item-top">
@@ -53,13 +66,14 @@
我的积分
</view>
</view> -->
<view v-if="isShowMoneyPay" class="statistics-box-item" @click="goNav('/me/yaoqing/ymg-yaoqing-tixian')">
<view class="statistics-box-item-top">
{{userInfo.amount || '0.00'}}
</view>
<view v-if="isShowMoneyPay" class="statistics-box-item"
@click="goNav('/me/yaoqing/ymg-yaoqing-tixian')">
<view class="statistics-box-item-btn">
我的红包
</view>
<view class="statistics-box-item-top">
{{userInfo.amount || '0.00'}}
</view>
</view>
</view>
</view>
@@ -85,16 +99,47 @@
</view>
</view> -->
<!-- 钱包 -->
<view class="money flex align-center justify-center" v-if="isWxIosPay == true">
<view class="money" v-if="isWxIosPay == true" style="position: relative;">
<!-- <view
style="position: relative;background-color: #f2b5b5;width: 700rpx;height: 74rpx;padding:20rpx;border-radius: 14rpx 14rpx 0rpx 0rpx;position: absolute;left: 0;top: 0;display: flex;align-items: center;justify-content: space-between;">
<view class="df">
<image src="../../static/dwbimgs/money.png" style="width: 47rpx;height: 47rpx;margin-right: 28rpx;"
mode=""></image>
<view style="font-weight: bold;font-size: 36rpx;color: #FFFFFF;">
{{formatNumber(moneyNum)}}
</view>
</view>
<view
style="font-weight: bold;font-size: 25rpx;color: #977641;width: 110rpx;text-align:center;line-height: 50rpx;background: linear-gradient( 90deg, #FEE7BC 0%, #FDCC89 100%);border-radius: 46rpx 46rpx 46rpx 46rpx;">
提现
</view>
<view style="position: absolute;background-color: #fff;width: 40rpx;height: 40rpx;transform: rotate(45deg);bottom: -10rpx;left: 48%;background-color: #f2b5b5;">
</view>
</view> -->
<view style="margin-top: 0rpx;">观看历史</view>
<view class="df" style=" justify-content: space-between;margin-top: 28rpx;">
<view style="border-radius:21rpx 21rpx 21rpx 21rpx" v-for="item in list" :key="item">
<image :src="item.titleImg"
style="width: 188rpx;height: 247rpx;border-radius:21rpx 21rpx 21rpx 21rpx" mode=""></image>
<view style="font-weight: 400;font-size: 25rpx;color: #333333;">
{{item.title}}
</view>
<view style="font-weight: 400;font-size: 21rpx;color: #999999;">
看到{{item.courseDetailsName}}
</view>
</view>
</view>
</view>
<!-- <view class="money flex align-center justify-center" v-if="isWxIosPay == true">
<view class="money-box flex align-center justify-between">
<view class="">
<view class="money-box-title flex align-center">
<view class="money-box-title-l">
金币余额
</view>
<!-- <view @click="isShoMoney = !isShoMoney" class="money-box-title-r" style="margin-left: 12rpx;">
<u-icon :name="isShoMoney?'eye':'eye-off'" color="#5A4A32" size="40"></u-icon>
</view> -->
</view>
<view class="money-box-price">
<block v-if="isShoMoney">
@@ -108,11 +153,8 @@
<view class="money-box-btn" @click="goNav('/me/yaoqing/redPack-mingxi?moneyType=2&viewType=2')">
金币明细
</view>
<!-- <view class="money-box-btn" @click="goNav('/me/wallet/wallet')">
立即充值
</view> -->
</view>
</view>
</view> -->
<!-- 常用工具 -->
<view class="tool flex align-center justify-center">
<view class="tool-box">
@@ -184,7 +226,8 @@
观看历史
</view>
</view>
<view v-if="rate>0 && isShowMoneyPay" class="tool-box-content-item flex align-center justify-center flex-wrap"
<view v-if="rate>0 && isShowMoneyPay"
class="tool-box-content-item flex align-center justify-center flex-wrap"
@click="goNav('/me/yaoqing/ymf-my-team')">
<view class="tool-box-content-item-img">
<image src="../../static/images/me/vtd.png" mode=""></image>
@@ -251,8 +294,8 @@
</u-popup>
<!-- 抖音im客服 -->
<ttMsg />
<other-xuanfu></other-xuanfu>
</view>
</template>
@@ -261,11 +304,12 @@
import ttMsg from '../../components/ttMsg/ttMsg.vue'
import httpsRequest from '../../common/httpRequest.js'
import otherXuanfu from '@/components/other-xuafu.vue'
export default {
components: {
ttMsg,otherXuanfu
ttMsg,
otherXuanfu
},
data() {
return {
@@ -283,6 +327,7 @@
}],
isLogin: false,
userName: '未登录',
list: [],
isVIP: false,
invitationCode: '',
token: '',
@@ -295,7 +340,7 @@
showCard: false,
numCount: 0,
rate: 0,
twoRate:0,
twoRate: 0,
kmPaySel: '否',
isWxIosPay: true, //微信下是否显示支付功能
userInfo: {},
@@ -304,18 +349,18 @@
},
onLoad() {
this.getBannerList()
this.zxczxczxczsw(1212,5)
this.zzzzzzzzzzzzzzzzs(1212.5)
this.zxcee(1212,5)
this.aaaaccx(1212,5)
this.wwrqx(1212,5)
this.zxczxczxczsw(1212, 5)
this.zzzzzzzzzzzzzzzzs(1212.5)
this.zxcee(1212, 5)
this.aaaaccx(1212, 5)
this.wwrqx(1212, 5)
},
onShow() {
this.ymfgetDataList()
const systemInfo = uni.getSystemInfoSync();
const isIOS = /iOS/.test(systemInfo.platform);
if ( !isIOS ) {
if (!isIOS) {
this.isBack = true
}
this.isWxIosPay = uni.getStorageSync('isWxIosPay')
@@ -335,8 +380,8 @@
this.userName = res.data.userName
this.avatar = res.data.avatar
this.invitationCode = res.data.invitationCode
this.rate = res.data.rate||0
this.twoRate = res.data.twoRate||0
this.rate = res.data.rate || 0
this.twoRate = res.data.twoRate || 0
}
})
@@ -374,7 +419,7 @@
}
this.avatar = uni.getStorageSync('avatar') ? uni.getStorageSync('avatar') : '../../static/images/logo.png'
httpsRequest.getT("app/common/type/919", {}).then(res => {
httpsRequest.getT("/app/common/type/919", {}).then(res => {
console.log(res);
if (res.code === 0) {
const sysInfo = uni.getSystemInfoSync();
@@ -464,6 +509,26 @@
}
})
},
//获取观看记录
ymfgetDataList() {
let data = {
page: 1,
limit: 3,
classify: 3
}
this.$Request.getT('/app/courseCollect/selectByUserId', data).then(res => {
if (res.code === 0) {
console.log(res,'debug')
let arr = []
res.data.records.forEach((ele, index) => {
if (index < 3) {
arr.push(ele)
}
})
this.list = arr
}
})
},
/**
* 获取积分
*/
@@ -553,7 +618,7 @@
}
r1 = Number(arg1.toString().replace(".", ""));
r2 = Number(arg2.toString().replace(".", ""));
},
/**
* 保留小数n位不进行四舍五入
@@ -576,7 +641,7 @@
return parseFloat(num).toFixed(decimal);
}
},
//乘法函数,用来得到精确的乘法结果
//说明javascript的乘法结果会有误差在两个浮点数相乘的时候会比较明显。这个函数返回较为精确的乘法结果。
//调用mul(arg1,arg2)
@@ -689,7 +754,7 @@
// #endif
}
},
goNav(e,type) {
goNav(e, type) {
console.log(e)
let token = uni.getStorageSync('token')
if (token) {
@@ -702,7 +767,7 @@
url: e
})
}
} else {
uni.navigateTo({
url: "/pages/login/login"
@@ -881,7 +946,7 @@
.statistics-box-item-btn {
width: 100%;
text-align: center;
color: #999999;
color: #333;
font-size: 26rpx;
// margin-top: 20rpx
}
@@ -933,41 +998,45 @@
}
.money {
width: 100%;
height: auto;
margin-top: 20rpx;
.money-box {
width: 686rpx;
height: 100%;
border-radius: 24rpx;
background: #ffffff;
padding: 30rpx;
}
.money-box-btn {
background: linear-gradient(90deg, #FF7581 0%, #F8A5AF 100%);
border-radius: 44rpx;
padding: 18rpx 30rpx;
font-size: 24rpx;
color: #ffffff;
font-weight: bold;
}
.money-box-title-l {
color: #333333;
font-size: 28rpx;
font-weight: normal;
}
.money-box-price {
color: #333333;
font-size: 48rpx;
font-weight: 800;
margin-top: 20rpx;
box-sizing: border-box;
background-color: #fff;
margin: 30rpx;
padding: 55rpx 24rpx;
}
// .money-box {
// width: 686rpx;
// height: 100%;
// border-radius: 24rpx;
// background: #ffffff;
// padding: 30rpx;
// }
// .money-box-btn {
// background: linear-gradient(90deg, #FF7581 0%, #F8A5AF 100%);
// border-radius: 44rpx;
// padding: 18rpx 30rpx;
// font-size: 24rpx;
// color: #ffffff;
// font-weight: bold;
// }
// .money-box-title-l {
// color: #333333;
// font-size: 28rpx;
// font-weight: normal;
// }
// .money-box-price {
// color: #333333;
// font-size: 48rpx;
// font-weight: 800;
// margin-top: 20rpx;
// }
}
@@ -1015,4 +1084,9 @@
font-size: 24rpx;
}
}
.df {
display: flex;
align-items: center;
}
</style>