lyqu 4 лет назад
Родитель
Сommit
f6bff1778e

+ 2 - 2
common/conf/config.js

@@ -5,10 +5,10 @@ const appId = 'wx7e7a38f071b360e9';
 const appSecret = '4e862f91b48ac85a91380fa0991c9fda';
 
 //经过编码后的回调地址
-const redireactUrl = 'https://vote.guosen-fumao.cn/vote-h5/index.html#/pages/activityList/home/home?activityId=';
+const redireactUrl = 'https://vote.guosen-fumao.cn/vote-h5/index.html#/';
 
 //获取用户授权信息Code
-const authUrl = (activity) => { return `https://open.weixin.qq.com/connect/oauth2/authorize?appid=${appId}&redirect_uri=${encodeURIComponent(redireactUrl+activity)}&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect`};
+const authUrl = (path) => { return `https://open.weixin.qq.com/connect/oauth2/authorize?appid=${appId}&redirect_uri=${encodeURIComponent(redireactUrl+path)}&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect`};
 
 //获取用户的Access-token
 const atUrl = (code) => { return `https://api.weixin.qq.com/sns/oauth2/access_token?appid=${appId}&secret=${appSecret}&code=${code}&grant_type=authorization_code`}

+ 3 - 1
common/http/http.api.js

@@ -12,7 +12,8 @@ let activityUrl = {
 	adsListUrl: '/cyzh-ads/ads/list',
 	listUrl: '/cyzh-activity/activity/selectPageWithTag',
 	detailUrl: '/cyzh-activity/activity/detail',
-	rankListUrl: '/cyzh-userActivityStatistical/useractivitystatistical/list'
+	rankListUrl: '/cyzh-userActivityStatistical/useractivitystatistical/list',
+	signUpUrl: '/cyzh-production/production/create'
 }
 
 let userUrl = {
@@ -41,6 +42,7 @@ const install = (Vue, vm) => {
 		list:(params = {}) => vm.$u.get(activityUrl.listUrl, params),
 		detail:(params = {}) => vm.$u.get(activityUrl.detailUrl, params),
 		rankList:(params = {}) => vm.$u.get(activityUrl.rankListUrl, params), 
+		signUp:(params = {}) => vm.$u.post(activityUrl.signUpUrl, params),
 	}
 	
 	let user = {

+ 9 - 8
components/homeViews/activity-view.vue

@@ -19,7 +19,7 @@
 				<view class="margin-top-sm">
 					<u-avatar :src="rankList[1].loginWebVO.avatar" size="120"></u-avatar>
 				</view>
-				<view class="text-bold text-lg text-black">{{rankList[1].totalHotValue}}</view>
+				<view class="text-bold text-lg text-black">{{+rankList[1].totalHotValue}}</view>
 				<view class="flex justify-center">
 					<view class="hot-btn margin-top-xs">
 						<text class="cuIcon-hotfill padding-right-xs"></text>
@@ -31,7 +31,7 @@
 				<view class="margin-top-sm">
 					<u-avatar :src="rankList[0].loginWebVO.avatar" size="130"></u-avatar>
 				</view>
-				<view class="margin-top-xs text-bold text-lg text-black">{{rankList[0].totalHotValue}}</view>
+				<view class="margin-top-xs text-bold text-lg text-black">{{+rankList[0].totalHotValue}}</view>
 				<view class="flex justify-center">
 					<view class="hot-btn margin-top-xs">
 						<text class="cuIcon-hotfill padding-right-xs"></text>
@@ -43,7 +43,7 @@
 				<view class="margin-top-sm">
 					<u-avatar :src="rankList[2].loginWebVO.avatar" size="120"></u-avatar>
 				</view>
-				<view class="text-bold text-lg text-black">{{rankList[2].totalHotValue}}</view>
+				<view class="text-bold text-lg text-black">{{+rankList[2].totalHotValue}}</view>
 				<view class="flex justify-center">
 					<view class="hot-btn margin-top-xs">
 						<text class="cuIcon-hotfill padding-right-xs"></text>
@@ -61,7 +61,7 @@
 					</view>
 					<view>
 						<view class="text-bold text-black">{{item.name}}</view>
-						<view class="margin-tb-xs">{{item.totalHotValue}} 热力值</view>
+						<view class="margin-tb-xs">{{+item.totalHotValue}} 热力值</view>
 					</view>
 				</view>
 				<view class="padding-right">
@@ -132,16 +132,17 @@
 					url = path + "?poster=" + this.activity.poster; 
 				}
 				if (index == 1) { //报名
-					url = path + "?activityId=" + this.activityId;
-				}
-				if (index == 2) { //热榜
 					let userId = uni.getStorageSync("userId")
 					if (this.$u.test.isEmpty(userId)) {
-						window.location.href = authUrl(this.activityId);
+						let param = "pages/activityList/home/home?activityId=" + this.activityId;
+						window.location.href = authUrl(param);
 					} else {
 						url = path + "?activityId=" + this.activityId;
 					}
 				}
+				if (index == 2) { //热榜
+					url = path + "?activityId=" + this.activityId;
+				}
 				if (index == 3) { //我的奖金
 					url = path;
 				}

+ 11 - 8
components/homeViews/mine-view.vue

@@ -17,7 +17,8 @@
 						<view class="padding-left">
 							<button class="cu-btn sm line-black round" @click="edit">
 								<text class="cuIcon-post padding-right-xs"></text>
-								<text>修改资料</text>
+								<text v-if="!$u.test.isEmpty(userData.phone)">修改资料</text>
+								<text v-else>完善个人信息</text>
 							</button>
 						</view>
 					</view>
@@ -81,8 +82,9 @@
 		},
 		data() {
 			return {
+				userId: '',
 				userData: {},
-				isLogin: false,
+				isLogin: true,
 				iconList: [
 					{name: '我的礼品', icon: '/static/icon-gift.png', width: '36upx', height: '33upx', url: '/pages/activityList/mine/myGift'},
 					{name: '我的音乐', icon: '/static/icon-music.png', width: '33upx', height: '32upx', url: '/pages/activityList/mine/myMusic'},
@@ -97,20 +99,21 @@
 			}
 		},
 		mounted() {
-			let userId = uni.getStorageSync("userId")
-			if (this.$u.test.isEmpty(userId)) {
+			this.userId = uni.getStorageSync("userId")
+			if (this.$u.test.isEmpty(this.userId)) {
 				this.isLogin = false;
 			} else {
 				this.isLogin = true;
-				this.getUserInfo(userId);
+				this.getUserInfo();
 			}
 		},
 		methods: {
 			toAuth() {
-				 window.location.href = authUrl(this.activityId);
+				let param = "pages/activityList/home/home?current=2&activityId=" + this.activityId;
+				window.location.href = authUrl(param);
 			},
-			getUserInfo(userId) {
-				this.$u.api.user.detail({id: userId}).then(res => {
+			getUserInfo() {
+				this.$u.api.user.detail({id: this.userId}).then(res => {
 					this.userData = res;
 				})
 			},

+ 30 - 11
pages/activityList/activity/boost.vue

@@ -86,43 +86,43 @@
 </template>
 
 <script>
+	import {authUrl} from '@/common/conf/config.js';
+	import {getUrlParams} from '@/common/utils/utils.js';
 	export default {
 		data() {
 			return {
 				current: 0,
 				boostDetail: {},
 				dialogShow: false,
-				present: [
-					{icon: '/static/present1.png', price: 68, tips: '66热力值/388积分', name: ''},
-					{icon: '/static/present2.png', price: 168, tips: '66热力值/688积分', name: ''},
-					{icon: '/static/present3.png', price: 268, tips: '188热力值/1888积分', name: ''},
-					{icon: '/static/present4.png', price: 368, tips: '66热力值/388积分', name: '立白助力礼包A'}
-				],
 				count: 1,
 				currentPresentSum: 0,
 				activityId: '',
 				senderId: '',
+				receiverId: '',
 			}
 		},
 		onLoad(options) {
 			this.activityId = options.activityId;
 			this.senderId = uni.getStorageSync("userId");
+			this.receiverId = options.receiverId;
 			this.getBoostDetail(options.activityId, options.receiverId);
-			this.currentPresentSum = this.present[this.current].price;
+			this.authorization();
 		},
 		methods: {
 			//打榜助力
 			userBoost() {
-				if (this.$u.test.isEmpty(senderId)) {
-					window.location.href = authUrl(this.activityId);
+				if (this.$u.test.isEmpty(this.senderId)) {
+					let path = 'pages/activityList/activity/boost?activityId=' + this.activityId + '&receiverId=' + this.receiverId;
+					window.location.href = authUrl(path);
 				} else {
 					
 				}
 			},
 			//礼物支付
 			pay() {
-				if (this.$u.test.isEmpty(senderId)) {
-					window.location.href = authUrl(this.activityId);
+				if (this.$u.test.isEmpty(this.senderId)) {
+					let path = 'pages/activityList/activity/boost?activityId=' + this.activityId + '&receiverId=' + this.receiverId;
+					window.location.href = authUrl(path);
 				} else {
 					
 				}
@@ -131,6 +131,7 @@
 			getBoostDetail(activityId, receiverId) {
 				this.$u.api.user.boost({activityId: activityId, receiverId: receiverId, senderId: this.senderId}).then(res => {
 					this.boostDetail = res;
+					this.currentPresentSum = res.presentList[this.current].price;
 				})
 			},
 			change(index) {
@@ -149,6 +150,24 @@
 					this.count--
 				}
 			},
+			async authorization() {
+				let params = getUrlParams(window.location.search);
+				if (!this.$u.test.isEmpty(params.code)) {
+					let res = await this.$u.api.wxInfo.getUserInfo({userCode: params.code});
+					let datas = {
+						nickName: res.nickname,
+						avatar: res.headimgurl,
+						gender: res.sex,
+						openid: res.openid,
+						unionid: res.unionid
+					}
+					let result = await this.$u.api.user.login(datas);
+					if (result) {
+						this.senderId = result.id;
+						uni.setStorageSync("userId", result.id);
+					}
+				}
+			},
 		}
 	}
 </script>

+ 1 - 1
pages/activityList/activity/hot.vue

@@ -13,7 +13,7 @@
 					</view>
 					<view>
 						<view class="text-bold text-black">{{item.name}}</view>
-						<view class="margin-tb-xs">{{item.totalHotValue}} 热力值</view>
+						<view class="margin-tb-xs">{{+item.totalHotValue}} 热力值</view>
 					</view>
 				</view>
 				<view class="padding-right">

+ 102 - 28
pages/activityList/activity/signUp.vue

@@ -1,12 +1,27 @@
 <template>
 	<view>
 		<view class="image-container" @click="selectShow = true">
-			<view class="cuIcon-roundaddfill theme-color" style="font-size: 80upx;padding: 100upx 0 30upx 0;"></view>
-			<view class="text-black text-bold text-sm">添加图片或视频</view>
+			<block v-if="$u.test.isEmpty(data.urls)">
+				<view class="cuIcon-roundaddfill theme-color" style="font-size: 80upx;padding: 100upx 0 30upx 0;"></view>
+				<view class="text-black text-bold text-sm">添加图片或视频</view>
+			</block>
+			<block v-else>
+				<block v-if="data.urlsType == 0">
+					<image :src="data.urls" style="height: 400upx;" @click="preViewImg(data.urls)"></image>
+				</block>
+				<block v-else>
+					<video :src="data.urls" style="height: 400upx;"></video>
+				</block>
+			</block>
 		</view>
-		<view class="image-container" v-if="data.urlsType==1">
-			<view class="cuIcon-roundaddfill theme-color" style="font-size: 80upx;padding: 100upx 0 30upx 0;"></view>
-			<view class="text-black text-bold text-sm">请上传作品封面</view>
+		<view class="image-container" @click="uploadCover" v-if="data.urlsType == 1">
+			<block v-if="$u.test.isEmpty(data.cover)">
+				<view class="cuIcon-roundaddfill theme-color" style="font-size: 80upx;padding: 100upx 0 30upx 0;"></view>
+				<view class="text-black text-bold text-sm">请上传作品封面</view>
+			</block>
+			<block v-else>
+				<image :src="data.cover" style="height: 400upx;" @click="preViewImg(data.cover)"></image>
+			</block>
 		</view>
 		
 		<u-action-sheet :list="list" @click="upload" v-model="selectShow"></u-action-sheet>
@@ -17,27 +32,27 @@
 			</view>
 			<view class="padding-sm flex justify-around align-center">
 				<block v-for="(item, index) in classification" :key="index">
-					<view class="tags" :class="current == index ? 'theme-bg-color text-white' : ''" @click="current = index;data.personType=item">{{item}}</view>
+					<view class="tags" :class="current == index ? 'theme-bg-color text-white' : ''" @click="select(index,item)">{{item}}</view>
 				</block>
 			</view>
 			<view class="padding-sm">
 				<text class="text-black text-bold text-lg padding-left-sm">{{detail.personTitle}}</text>
 				<view style="padding: 30upx 20upx;">
-					<u-input v-model="data.personName" :placeholder="'请输入'+detail.personTitle" />
+					<u-input v-model="data.personName" :placeholder="'请输入' + detail.personTitle" />
 				</view>
 				<view style="padding: 0 20upx 40upx 20upx;">
 					<u-line color="#e3e3e3" />
 				</view>
 				<text class="text-black text-bold text-lg padding-left-sm">{{detail.productionTitle}}</text>
 				<view style="padding: 30upx 20upx;">
-					<u-input v-model="data.title" :placeholder="'请输入'+detail.productionTitle" />
+					<u-input v-model="data.title" :placeholder="'请输入' + detail.productionTitle" />
 				</view>
 				<view style="padding: 0 20upx 40upx 20upx;">
 					<u-line color="#e3e3e3" />
 				</view>
 				<text class="text-black text-bold text-lg padding-left-sm">{{detail.introductionTitle}}</text>
 				<view style="padding: 30upx 20upx 0 20upx;">
-					<u-input v-model="data.introduce" type="textarea" :clearable="false" height="140" :autoHeight="false" maxlength="60" :placeholder="'请输入'+detail.productionTitle" />
+					<u-input v-model="data.introduce" type="textarea" :clearable="false" height="140" :autoHeight="false" maxlength="60" :placeholder="'请输入' + detail.productionTitle" />
 				</view>
 				<view class="flex justify-end padding-right-sm padding-bottom-sm text-gray">{{data.introduce.length}} / 60</view>
 				<view style="padding: 0 20upx 40upx 20upx;">
@@ -63,37 +78,43 @@
 					text: '上传视频'
 				}],
 				current: 0,
-				type:0,
 				classification: [],
-				name: '',
-				introduction: '',
-				
-				data:{
-					userId:'',
-					urlsType:0,
-					urls:'',
-					person_name:'',
-					introduce:''
+				data: {
+					userId: '',
+					urlsType: 0,
+					urls: '',
+					cover: '',
+					title: '',
+					personName: '',
+					personType: '',
+					introduce: '',
+					activityId: '',
 				}
 			}
 		},
 		onLoad(options) {
 			this.getActivityDetail(options.activityId);
+			this.data.activityId = options.activityId;
+			this.data.userId = uni.getStorageSync("userId");
 		},
 		methods: {
 			async upload(index) {
 				console.log(index);
 				let res;
-				this.data.urlsType=index
-				if (index==0) {
+				this.data.urlsType = index
+				if (index == 0) {
 					//上传图片
-					res=await this.$mpi.uploadFile()
-				}else{
+					res = await this.$mpi.uploadFile()
+				} else {
 					//上传视频
-					res=await this.$mpi.uploadVideo()
+					res = await this.$mpi.uploadVideo()
 				}
 				let obj = JSON.parse(res);
-				this.data.urls=obj.data
+				this.data.urls = obj.data
+			},
+			async uploadCover() {
+				let res = await this.$mpi.uploadFile()
+				this.data.cover = JSON.parse(res).data;
 			},
 			getActivityDetail(id) {
 				this.$u.api.activity.detail({id: id}).then(res => {
@@ -101,11 +122,64 @@
 					this.classification = res.classification.split(',');
 				})
 			},
+			preViewImg(url){
+				uni.previewImage({
+					urls: [url]
+				});
+			},
+			select(index, item) {
+				this.current = index;
+				this.data.personType = item;
+			},
 			navWithParam() {
 				console.log(this.data);
-				// uni.navigateTo({
-				// 	url: '/pages/activityList/mine/introduction'
-				// })
+				if (this.$u.test.isEmpty(this.data.urls)) {
+					uni.showToast({
+						icon: "none",
+						title: "请上传作品"
+					})
+					return;
+				}
+				if (this.data.urlsType == 1 && this.$u.test.isEmpty(this.data.cover)) {
+					uni.showToast({
+						icon: "none",
+						title: "请上传作品封面"
+					})
+					return;
+				}
+				if (this.$u.test.isEmpty(this.data.personName)) {
+					uni.showToast({
+						icon: "none",
+						title: "请填写个人名称"
+					})
+					return;
+				}
+				if (this.$u.test.isEmpty(this.data.title)) {
+					uni.showToast({
+						icon: "none",
+						title: "请填写" + this.detail.productionTitle
+					})
+					return;
+				}
+				if (this.$u.test.isEmpty(this.data.introduce)) {
+					uni.showToast({
+						icon: "none",
+						title: "请填写个人介绍"
+					})
+					return;
+				}
+				this.$u.api.activity.signUp(this.data).then(res => {
+					uni.showToast({
+						icon: "none",
+						title: "提交成功",
+						duration: 3000,
+						success: () => {
+							uni.redirectTo({
+								url: '/pages/activityList/mine/introduction?detail='+JSON.stringify(res)
+							})
+						}
+					})
+				})
 			}
 		}
 	}

+ 12 - 7
pages/activityList/home/home.vue

@@ -6,18 +6,17 @@
 		</view>
 		<!--个人中心-->
 		<view v-if="current == 2">
-			<mine-view :activityId="activityId"></mine-view>
+			<mine-view ref="mine" :activityId="activityId"></mine-view>
 		</view>
 		<view style="height: 100upx;"></view>
 		<view class="footer-fixed">
-			<bottom-bar-home @onTap="change"></bottom-bar-home>
+			<bottom-bar-home ref="bar" @onTap="change"></bottom-bar-home>
 		</view>
 	</view>
 </template>
 
 <script>
 	import {getUrlParams} from '@/common/utils/utils.js';
-	import {atUrl, getWXUserInfoUrl} from '@/common/conf/config.js';
 	import searchBar from "@/components/basic/search-bar.vue";
 	import bottomBarHome from "@/components/basic/bottom-bar-home.vue";
 	import activityView from "@/components/homeViews/activity-view.vue";
@@ -42,14 +41,18 @@
 		},
 		onLoad(options) {
 			this.activityId = options.activityId;
-			this.authorization();
+			this.authorization(options.current);
+		},
+		onShow() {
+			if (this.current == 2) {
+				this.$refs.mine.getUserInfo();
+			}
 		},
 		methods: {
-			async authorization() {
+			async authorization(current) {
 				let params = getUrlParams(window.location.search);
 				if (!this.$u.test.isEmpty(params.code)) {
 					let res = await this.$u.api.wxInfo.getUserInfo({userCode: params.code});
-					console.log("是否登录",res);
 					let datas = {
 						nickName: res.nickname,
 						avatar: res.headimgurl,
@@ -58,9 +61,11 @@
 						unionid: res.unionid
 					}
 					let result = await this.$u.api.user.login(datas);
-					console.log("登录后",result)
 					if (result) {
 						uni.setStorageSync("userId", result.id);
+						if (!this.$u.test.isEmpty(current)) {
+							this.$refs.bar.change(current);
+						}
 					}
 				}
 			},

+ 32 - 15
pages/activityList/mine/edit.vue

@@ -1,12 +1,12 @@
 <template>
 	<view>
-		<view class="flex padding justify-between align-center">
+		<view class="flex padding justify-between align-center" @click="upload">
 			<view class="title">头像</view>
 			<u-avatar :src="userData.avatar" size="120"></u-avatar>
 		</view>
 		<u-line color="#f1f1f1"></u-line>
 		<view class="flex padding justify-between align-center">
-			<view class="title">昵称</view>
+			<view class="title">昵称<text class="text-red">*</text></view>
 			<u-input v-model="userData.nickName" :clearable="false" inputAlign="right" placeholder="请输入昵称"></u-input>
 		</view>
 		<u-line color="#f1f1f1"></u-line>
@@ -18,19 +18,25 @@
 			</view>
 		</view>
 		<u-line color="#f1f1f1"></u-line>
+		<view class="flex padding justify-between align-center">
+			<view class="title">手机号码<text class="text-red">*</text></view>
+			<u-input v-model="userData.phone" :clearable="false" inputAlign="right" placeholder="请填写手机号码"></u-input>
+		</view>
+		<u-line color="#f1f1f1"></u-line>
 		<view class="flex padding justify-between align-center" @click="calendarShow = true">
 			<view class="title">生日</view>
-			<view>{{birthday}}</view>
+			<view>{{userData.birthday}}</view>
 			<u-calendar v-model="calendarShow" mode="date" @change="change"></u-calendar>
 		</view>
 		<u-line color="#f1f1f1"></u-line>
 		<view class="padding">
-			<view class="title">个人介绍</view>
+			<view class="title">个人介绍<text class="text-red">*</text></view>
 		</view>
 		<view style="padding: 0 40upx">
-			<u-input v-model="introduction" type="textarea" :clearable="false" height="140" :autoHeight="false" maxlength="60" placeholder="请输入个人简介" />
+			<u-input v-model="introduce" type="textarea" :clearable="false" height="140" :autoHeight="false" maxlength="60" placeholder="请输入个人简介" />
 		</view>
-		<view class="flex justify-end padding-right-sm padding-bottom-sm text-gray">{{introduction.length}} / 60</view>
+		<view class="flex justify-end padding-right-sm padding-bottom-sm text-gray">{{introduce.length}} / 60</view>
+		<view style="height: 120upx;"></view>
 		<view class="footer-fixed margin-bottom">
 			<u-button class="custom-style" shape="circle" @click="save">保存</u-button>
 		</view>
@@ -42,7 +48,6 @@
 		data() {
 			return {
 				userData: {},
-				name: 'Daniel Hua',
 				sex: '',
 				sexShow: false,
 				border: true,
@@ -59,8 +64,7 @@
 					}
 				],
 				calendarShow: false,
-				birthday: '',
-				introduction: '',
+				introduce: '',
 			}
 		},
 		onLoad(options) {
@@ -70,6 +74,7 @@
 			getUserInfo(userId) {
 				this.$u.api.user.detail({id: userId}).then(res => {
 					this.userData = res;
+					this.introduce = res.introduce;
 					if (res.gender == 1) {
 						this.sex = '男';
 					} else if (res.gender == 2) {
@@ -84,22 +89,34 @@
 				this.sex = this.actionSheetList[index].text;
 			},
 			change(e) {
-				this.birthday = e.result;
+				this.userData.birthday = e.result;
+			},
+			async upload() {
+				let res = await this.$mpi.uploadFile()
+				this.userData.avatar = JSON.parse(res).data;
 			},
 			save() {
-				if (this.$u.test.isEmpty(this.introduction) || this.$u.test.isEmpty(this.userData.nickName)) {
+				if (this.$u.test.isEmpty(this.userData.introduce) || this.$u.test.isEmpty(this.userData.nickName) || this.$u.test.isEmpty(this.userData.phone)) {
+					uni.showToast({
+						icon: "none",
+						title: "请填写必填信息",
+					})
+					return;
+				} else if (!this.$u.test.mobile(this.userData.phone)) {
 					uni.showToast({
 						icon: "none",
-						title: "请填写个人昵称和个人介绍",
+						title: "请填写正确的手机号",
 					})
 					return;
 				} else {
 					let data = {
 						id: this.userData.id,
-						name: this.userData.nickName,
+						nickName: this.userData.nickName,
 						gender: this.sex == '男' ? 1 : this.sex == '女' ? 2 : 0,
-						birthday: this.birthday,
-						introduce: this.introduction,
+						phone: this.userData.phone,
+						birthday: this.userData.birthday,
+						introduce: this.introduce,
+						avatar: this.userData.avatar
 					}
 					this.$u.api.user.submit(data).then(res => {
 						uni.showToast({

+ 10 - 6
pages/activityList/mine/introduction.vue

@@ -3,18 +3,18 @@
 		<view class="bg-img flex align-center" style="background-image: url('/static/userBgImg.png');height: 450upx;"></view>
 		<view class="container" style="margin: -60upx 20upx 20upx 20upx;">
 			<view class="text-center">
-				<view class="cu-avatar avatar round" :style="[{backgroundImage:'url('+ avatar +')'}]"></view>
-				<view class="padding-tb-xs" style="font-size: 38upx;font-family: PingFang SC;font-weight: 800;color: #222222;">易烊千玺</view>
+				<view class="cu-avatar avatar round" :style="[{backgroundImage:'url('+ detail.cover +')'}]"></view>
+				<view class="padding-tb-xs" style="font-size: 38upx;font-family: PingFang SC;font-weight: 800;color: #222222;">{{detail.personName}}</view>
 				<view class="flex justify-center align-center">
-					<view class="padding-right-sm" style="font-size: 30upx;font-family: PingFang SC;font-weight: 800;color: #222222;">184056</view>
-					<view class="tag">
+					<view class="padding-right-sm" style="font-size: 30upx;font-family: PingFang SC;font-weight: 800;color: #222222;">{{+detail.hotValue}}</view>
+					<!-- <view class="tag">
 						<image src="/static/crown.png" style="width: 22upx;height: 19upx;margin-right: 10upx;"></image>
 						<view class="text-sm text-white">热力榜第1</view>
-					</view>
+					</view> -->
 				</view>
 			</view>
 			<view style="padding: 0 60upx;">
-				<view>歌手简介:易烊千玺,2000年11月28日生于湖南省怀化市,中国内地男演员、歌手、舞者,演唱组合TFBOYS成员,就读于中央戏剧学院。</view>
+				<view>{{detail.introduce}}</view>
 			</view>
 			<view class="flex justify-around padding">
 				<button class="theme-bg-color text-white round cu-btn" style="width: 200upx;height: 70upx;">转发好友</button>
@@ -43,6 +43,7 @@
 		data() {
 			return {
 				avatar: '/static/avatar.png',
+				detail: {},
 				boostList: [
 					{image: '/static/avatar.png', name: '易烊千玺', time: '2021-6-7 10:28:46', type: '打榜', hotValue: '12'},
 					{image: '/static/avatar2.png', name: '许嵩', time: '2021-6-7 10:28:46', type: '礼物', hotValue: '13'},
@@ -54,6 +55,9 @@
 				],
 			}
 		},
+		onLoad(options) {
+			this.detail= JSON.parse(options.detail);
+		},
 		methods: {
 			
 		}

+ 8 - 2
pages/activityList/mine/pointsDetail.vue

@@ -3,7 +3,7 @@
 		<view class="bg-img flex justify-center align-center" style="background-image: url('/static/bgimg.png');height: 310upx;">
 			<view class="text-center" style="margin-top: 80upx;">
 				<view style="font-size: 24upx;font-family: PingFang SC;font-weight: 400;color: #cfc8f9;">可用积分</view>
-				<view style="font-size: 54upx;font-family: PingFang SC;font-weight: 800;color: #ffffff;">205</view>
+				<view style="font-size: 54upx;font-family: PingFang SC;font-weight: 800;color: #ffffff;">{{+usablePoints}}</view>
 			</view>
 		</view>
 		<block v-for="(item, index) in pointsList" :key="index">
@@ -28,6 +28,7 @@
 		data() {
 			return {
 				userId: '',
+				usablePoints: '',
 				pointsList: [],
 				current: 1,
 				size: 30,
@@ -35,9 +36,9 @@
 			}
 		},
 		onLoad(options) {
-			this.
 			this.userId = uni.getStorageSync("userId");
 			this.getPointsDetail();
+			this.getTotalPoints();
 		},
 		onReachBottom() {
 			if (this.pointsList.length < this.current * this.size) {
@@ -48,6 +49,11 @@
 			}
 		},
 		methods: {
+			getTotalPoints() {
+				this.$u.api.user.detail({id: this.userId}).then(res => {
+					this.usablePoints = res.usablePoints;
+				})
+			},
 			getPointsDetail() {
 				this.$u.api.points.list({id: this.userId, current: this.current, size: this.size}).then(res => {
 					this.pointsList = [...this.pointsList,...res.records];