提交 43273edc 编写于 作者: Y yyt

布局

上级 c76ed1b7
<template> <template>
<view class="add-school-activity"> <view class="add-school-activity">
<view class="nav-bar-back"> <view class="nav-bar-back">
<image class="nav-bar-back-icon" src="/static/discover/back.png" @click="goBack"></image> <image class="nav-bar-back-icon" src="/static/discover/back.png" @click="goBack"></image>
<view class="nav-bar-title">发起赛事</view> <view class="nav-bar-title">发起赛事</view>
<image class="nav-bar-add" src="../../static/post/send.png" @click="submit" :disabled="btnDisabled"></image> <image class="nav-bar-add" src="../../static/post/send.png" @click="submit" :disabled="btnDisabled"></image>
</view> </view>
<view class="school-activity-icon-wrapper"> <view class="school-activity-icon-wrapper">
<image class="school-activity-icon" src="/static/discover/activity-icon.png"></image> <image class="school-activity-icon" src="/static/discover/activity-icon.png"></image>
</view> </view>
<view class="school-activity-item-wrapper"> <view class="school-activity-item-wrapper">
<view class="form-group"> <view class="form-group">
<image class="form-icon" src="/static/discover/name.png"></image> <image class="form-icon" src="/static/discover/name.png"></image>
<input maxlength="20" class="form-input" type="text" placeholder="请输入活动名称" v-model="name"> <input maxlength="20" class="form-input" type="text" placeholder="请输入活动名称" v-model="name">
</view> </view>
<view class="form-group"> <view class="form-group">
<image class="form-icon" src="/static/discover/content.png"></image> <image class="form-icon" src="/static/discover/content.png"></image>
<textarea maxlength="200" class="form-input1" placeholder="请输入活动内容" v-model="content" ></textarea> <textarea maxlength="200" class="form-input1" placeholder="请输入活动内容" v-model="content"></textarea>
</view> </view>
<view class="form-group"> <view class="form-group">
<image class="form-icon" src="/static/discover/activity-time.png"></image> <image class="form-icon" src="/static/discover/activity-time.png"></image>
<view class="input-wrapper"> <view class="input-wrapper">
<view class="form-input2-wrapper"> <view class="form-input2-wrapper">
<view class="form-input2"> <view class="form-input2">
<picker mode="date" start="1970-01-01" end="2100-12-31" @change="handleDateChange1"> <picker mode="date" start="1970-01-01" end="2100-12-31" @change="handleDateChange1">
<view class="picker">{{ start_date }}</view> <view class="picker">{{ start_date }}</view>
</picker> </picker>
</view> </view>
<view class="form-input2"> <view class="form-input2">
<picker mode="time" start="00:00" end="23:59" @change="handleTimeChange1"> <picker mode="time" start="00:00" end="23:59" @change="handleTimeChange1">
<view class="picker">{{ start_time }}</view> <view class="picker">{{ start_time }}</view>
</picker> </picker>
</view>
</view>
<view class="form-input2-wrapper">
<view class="form-input2">
<picker mode="date" start="1970-01-01" end="2100-12-31" @change="handleDateChange2">
<view class="picker">{{ end_date }}</view>
</picker>
</view>
<view class="form-input2">
<picker mode="time" start="00:00" end="23:59" @change="handleTimeChange2">
<view class="picker">{{ end_time }}</view>
</picker>
</view> </view>
</view> </view>
<view class="form-input2-wrapper">
<view class="form-input2">
<picker mode="date" start="1970-01-01" end="2100-12-31" @change="handleDateChange2">
<view class="picker">{{ end_date }}</view>
</picker>
</view>
<view class="form-input2">
<picker mode="time" start="00:00" end="23:59" @change="handleTimeChange2">
<view class="picker">{{ end_time }}</view>
</picker>
</view>
</view>
</view> </view>
</view> </view>
<view class="form-group"> <view class="form-group">
<image class="form-icon" src="/static/discover/activity-object.png"></image> <image class="form-icon" src="/static/discover/activity-object.png"></image>
<input maxlength="20" class="form-input" type="text" placeholder="请输入活动对象" v-model="object"> <input maxlength="20" class="form-input" type="text" placeholder="请输入活动对象" v-model="object">
</view> </view>
<view class="form-group"> <view class="form-group">
<image class="form-icon" src="/static/discover/activity-place.png"></image> <image class="form-icon" src="/static/discover/activity-place.png"></image>
<input maxlength="20" class="form-input" type="text" placeholder="请输入活动地点" v-model="place"> <input maxlength="20" class="form-input" type="text" placeholder="请输入活动地点" v-model="place">
</view> </view>
<view class="form-group"> <view class="form-group">
<image class="form-icon" src="/static/discover/activity-contact.png"></image> <image class="form-icon" src="/static/discover/activity-contact.png"></image>
<input maxlength="20" class="form-input" type="text" placeholder="请输入活动联系方式" v-model="contact"> <input maxlength="20" class="form-input" type="text" placeholder="请输入活动联系方式" v-model="contact">
</view> </view>
<view class="form-group1"> <view class="form-group1">
<text>请设置活动封面</text> <text>请设置活动封面</text>
<uni-file-picker class="pic-content" v-model="imageValue" file-mediatype="image" mode="grid" file-extname="png,jpg" :limit="1" <uni-file-picker class="pic-content" v-model="imageValue" file-mediatype="image" mode="grid"
@select="select" @progress="progress" @success="success" @fail="fail" /> file-extname="png,jpg" :limit="1" @select="select" @progress="progress" @success="success"
@fail="fail" />
</view> </view>
</view> </view>
</view> </view>
</template> </template>
<script> <script>
export default { export default {
data() { data() {
return { return {
btnDisabled: false, btnDisabled: false,
name:'', name: '',
content:'', content: '',
object:'', object: '',
place:'', place: '',
contact:'', contact: '',
start_date: '2023-05-04', start_date: '2023-05-04',
end_date: '2023-05-04', end_date: '2023-05-04',
start_time:'14:00', start_time: '14:00',
end_time:'14:00', end_time: '14:00',
imageValue:[], imageValue: [],
teacherId:'', teacherId: '',
} }
}, },
methods: { methods: {
goBack() { goBack() {
uni.navigateBack({ uni.navigateBack({
delta: 1 delta: 1
}) })
}, },
async submit() { async submit() {
if (this.btnDisabled) { if (this.btnDisabled) {
return return
} }
this.btnDisabled = true this.btnDisabled = true
setTimeout(() => { setTimeout(() => {
this.btnDisabled = false this.btnDisabled = false
}, 1000) }, 1000)
const reg = /^1[3|4|5|7|8][0-9]\d{8}$/ const reg = /^1[3|4|5|7|8][0-9]\d{8}$/
const reg2 = /^([a-z0-9_\.-]+)@([\da-z\.-]+)\.([a-z\.]{2,6})$/ const reg2 = /^([a-z0-9_\.-]+)@([\da-z\.-]+)\.([a-z\.]{2,6})$/
let time1=this.start_date+' '+this.start_time let time1 = this.start_date + ' ' + this.start_time
let time2=this.end_date+' '+this.end_time let time2 = this.end_date + ' ' + this.end_time
let obj1 = new Date(time1) //开始时间 let obj1 = new Date(time1) //开始时间
let obj2 = new Date(time2) //结束时间 let obj2 = new Date(time2) //结束时间
if (this.name == '' || this.content == '' || this.object == '' || this.place == '') {
if(this.name==''||this.content==''||this.object==''||this.place=='') { uni.showToast({
uni.showToast({ title: '输入内容不能为空',
title: '输入内容不能为空', icon: 'none'
icon: 'none' });
}); return;
return; } else if (this.imageValue.length == 0) {
} uni.showToast({
else if(this.imageValue.length==0) { title: '输入图片不能为空',
uni.showToast({ icon: 'none'
title: '输入图片不能为空', });
icon: 'none' return;
}); } else if (obj1.getTime() >= obj2.getTime()) {
return; uni.showToast({
} title: '开始时间不能大于等于结束时间',
else if (obj1.getTime() >= obj2.getTime()) { icon: 'none'
uni.showToast({ });
title: '开始时间不能大于等于结束时间', return;
icon: 'none' } else if (!(reg.test(this.contact))) {
}); uni.showToast({
return; title: '请输入正确的联系方式(手机号)',
}else if (!(reg.test(this.contact))) { icon: 'none'
uni.showToast({ });
title: '请输入正确的联系方式(手机号)', return;
icon: 'none' } else {
}); uniCloud.callFunction({
return; name: 'fe-find-teacher-createActivity',
}else { data: {
uniCloud.callFunction({ teacherId: this.teacherId,
name: 'fe-find-teacher-createActivity', picture: this.imageValue[0]["path"],
data: { teacherId:this.teacherId, title: this.name,
picture:this.imageValue[0]["path"], content: this.content,
title:this.name, invitee: this.object,
content:this.content, startDate: this.start_date + ' ' + this.start_time,
invitee:this.object, endDate: this.end_date + ' ' + this.end_time,
startDate:this.start_date+' '+this.start_time, place: this.place,
endDate:this.end_date+' '+this.end_time, contact: this.contact
place:this.place, }
contact:this.contact })
} .then(res => {
}) console.log(res);
.then(res => { });
console.log(res); uni.showToast({
});
// console.log(this.teacherId);
// uni.showToast({
// title: '提交成功',
// icon: 'success',
// });
// this.goBack();
uni.showToast({
title: '提交成功', title: '提交成功',
duration: 1000, duration: 1000,
success: () => { success: () => {
setTimeout(() => { setTimeout(() => {
uni.navigateBack() uni.navigateBack()
}, 1000) }, 1000)
} }
}) })
} }
}, },
handleDateChange1(event) { handleDateChange1(event) {
this.start_date = event.detail.value this.start_date = event.detail.value
// uni.showToast({ },
// title: this.start_date, handleDateChange2(event) {
// icon: 'none' this.end_date = event.detail.value
// }) },
}, handleTimeChange1(event) {
handleDateChange2(event) { this.start_time = event.detail.value
this.end_date = event.detail.value },
}, handleTimeChange2(event) {
handleTimeChange1(event) { this.end_time = event.detail.value
this.start_time = event.detail.value },
}, select(e) {
handleTimeChange2(event) { console.log('选择文件:', e)
this.end_time = event.detail.value },
}, // 获取上传进度
select(e) { progress(e) {
console.log('选择文件:', e) console.log('上传进度:', e)
}, },
// 获取上传进度 // 上传成功
progress(e) { success(e) {
console.log('上传进度:', e) console.log('上传成功', e)
}, },
// 上传失败
// 上传成功 fail(e) {
success(e) { console.log('上传失败:', e)
console.log('上传成功',e) },
}, },
onLoad(e) {
// 上传失败 this.teacherId = e.teacherId;
fail(e) {
console.log('上传失败:', e)
},
},onLoad(e) {
this.teacherId=e.teacherId;
} }
} }
</script> </script>
<style> <style>
...@@ -215,29 +200,33 @@ ...@@ -215,29 +200,33 @@
height: 100%; height: 100%;
background-color: #EDEEF0; background-color: #EDEEF0;
} }
.nav-bar-back { .nav-bar-back {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
width: 100%; width: 100%;
height: 60px; height: 60px;
background-color: #EDEEF0; background-color: #EDEEF0;
} }
.nav-bar-back-icon { .nav-bar-back-icon {
width: 40px; width: 40px;
height: 30px; height: 30px;
margin-top: 10px; margin-top: 10px;
margin-bottom: 10px; margin-bottom: 10px;
float: left; float: left;
margin-left: 10px; margin-left: 10px;
} }
.nav-bar-title { .nav-bar-title {
flex: 1; flex: 1;
text-align: center; text-align: center;
font-size: 20px; font-size: 20px;
font-weight: bold; font-weight: bold;
color: #F1992D; color: #F1992D;
} }
.nav-bar-add { .nav-bar-add {
width: 30px; width: 30px;
height: 30px; height: 30px;
...@@ -245,66 +234,72 @@ ...@@ -245,66 +234,72 @@
float: right; float: right;
margin-right: 10px; margin-right: 10px;
} }
.school-activity-icon-wrapper{
.school-activity-icon-wrapper {
margin-top: 20px; margin-top: 20px;
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
} }
.school-activity-icon { .school-activity-icon {
width: 50%; width: 50%;
height: 80px; height: 80px;
margin: 0px; margin: 0px;
padding: 0px; padding: 0px;
} }
.school-activity-item-wrapper{ .school-activity-item-wrapper {
margin-top: 20px; margin-top: 20px;
} }
.form-group { .form-group {
display: flex; display: flex;
align-items: center; align-items: center;
margin-top: 15px; margin-top: 15px;
} }
.form-icon {
width: 40px; .form-icon {
height: 30px; width: 40px;
margin-left: 10px; height: 30px;
} margin-left: 10px;
}
.form-input {
.form-input {
margin-left: 5px;
width: 70%;
height: 35px;
border: none;
outline: none;
font-size: 14px;
color: #333;
background-color: #fff;
padding: 0 10px;
}
.form-input1 {
margin-left: 5px; margin-left: 5px;
width: 70%; width: 70%;
height: 35px; height: 70px;
border: none; border: none;
outline: none; outline: none;
font-size: 14px; font-size: 14px;
color: #333; color: #333;
background-color: #fff; background-color: #fff;
padding: 0 10px; padding: 0 10px;
} }
.form-input1 {
margin-left: 5px;
width: 70%;
height: 70px;
border: none;
outline: none;
font-size: 14px;
color: #333;
background-color: #fff;
padding: 0 10px;
}
.input-wrapper { .input-wrapper {
flex-direction: column; flex-direction: column;
display: flex; display: flex;
width: 100%; width: 100%;
} }
.form-input2-wrapper { .form-input2-wrapper {
display: flex; display: flex;
flex-direction: row; flex-direction: row;
} }
.form-input2 { .form-input2 {
margin-top: 5px; margin-top: 5px;
margin-left: 10px; margin-left: 10px;
...@@ -317,29 +312,33 @@ ...@@ -317,29 +312,33 @@
background-color: #fff; background-color: #fff;
padding: 0 10px; padding: 0 10px;
} }
.form-group1 { .form-group1 {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
margin-top: 10px; margin-top: 10px;
} }
.form-group1 text {
margin-bottom: 10px; /* 调整 text 和 pic-content 之间的距离 */ .form-group1 text {
} margin-bottom: 10px;
/* 调整 text 和 pic-content 之间的距离 */
}
.pic-content { .pic-content {
height: 200px; height: 200px;
} }
.picker{ .picker {
margin-top: 10px; margin-top: 10px;
}
.file-picker__box{
background-color: white;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, 0%);
} }
.file-picker__box {
background-color: white;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, 0%);
}
</style> </style>
\ No newline at end of file
<template> <template>
<view class="detail"> <view class="detail">
<!-- <view class="nav-bar-back">
<image class="nav-bar-back-icon" src="/static/discover/back.png" @click="goBack"></image>
<view class="nav-bar-title">{{title}}</view>
</view> -->
<view v-if="from==1"> <view v-if="from==1">
<view class="top"> <view class="top">
<image @click="goBack" class="back" src="/static/discover/back.png"></image> <image @click="goBack" class="back" src="/static/discover/back.png"></image>
...@@ -21,7 +15,7 @@ ...@@ -21,7 +15,7 @@
</view> </view>
</view> </view>
<view class="school-activity-icon-wrapper"> <view class="school-activity-icon-wrapper">
<image class="school-activity-icon" :src="this.picture"></image> <image class="school-activity-icon" :src="this.picture" @click.stop="showPic(this.picture)"></image>
</view> </view>
<view class="activity-production"> <view class="activity-production">
<image class="activity-production-icon" src="/static/discover/production.png"></image> <image class="activity-production-icon" src="/static/discover/production.png"></image>
...@@ -53,8 +47,6 @@ ...@@ -53,8 +47,6 @@
<uni-popup-dialog cancelText="取消" confirmText="确定" title="警告" content="确定删除该活动吗?" <uni-popup-dialog cancelText="取消" confirmText="确定" title="警告" content="确定删除该活动吗?"
@confirm="dialogConfirm"></uni-popup-dialog> @confirm="dialogConfirm"></uni-popup-dialog>
</uni-popup> </uni-popup>
<!-- <image @click="getData" class="activity-production-icon" src="/static/discover/place.png"></image> -->
</view> </view>
</template> </template>
...@@ -75,6 +67,16 @@ ...@@ -75,6 +67,16 @@
} }
}, },
methods: { methods: {
// 图片放大
showPic(imgUrl) {
let arr = [];
arr.push(imgUrl)
console.log(arr, '图片的地址')
uni.previewImage({
current: 0,
urls: arr
});
},
goBack() { goBack() {
uni.navigateBack({ uni.navigateBack({
delta: 1 delta: 1
...@@ -136,10 +138,6 @@ ...@@ -136,10 +138,6 @@
this.activityId = e.activityId; this.activityId = e.activityId;
this.getData(); this.getData();
} }
// mounted() {
// this.activityId = this.$route.query.activityId
// }
} }
</script> </script>
...@@ -186,25 +184,6 @@ ...@@ -186,25 +184,6 @@
display: inline-block; display: inline-block;
} }
/* .nav-bar-back {
display: flex;
align-items: center;
justify-content: center;
width: 100%;
height: 60px;
background-color: #EDEEF0;
}
.nav-bar-back-icon {
width: 40px;
height: 30px;
}
.nav-bar-title {
flex: 1;
text-align: center;
font-size: 24px;
font-weight: bold;
color: #F1992D;
} */
.school-activity-icon-wrapper { .school-activity-icon-wrapper {
margin-top: 10px; margin-top: 10px;
display: flex; display: flex;
......
...@@ -12,7 +12,6 @@ ...@@ -12,7 +12,6 @@
}" itemStyle="padding-left: 15px; padding-right: 15px; height: 34px;" @click="tabChange" :current="current"> }" itemStyle="padding-left: 15px; padding-right: 15px; height: 34px;" @click="tabChange" :current="current">
</u-tabs> </u-tabs>
</view> </view>
<view v-if=" id!='1'"> <view v-if=" id!='1'">
<u-tabs :list="list1" lineWidth="30" lineColor="#F1992D" :activeStyle="{ <u-tabs :list="list1" lineWidth="30" lineColor="#F1992D" :activeStyle="{
color: '#F1992D', color: '#F1992D',
...@@ -21,23 +20,23 @@ ...@@ -21,23 +20,23 @@
}" :inactiveStyle="{ }" :inactiveStyle="{
color: '#606266', color: '#606266',
transform: 'scale(1)' transform: 'scale(1)'
}" itemStyle="padding-left: 15px; padding-right: 15px; height: 34px;" > }" itemStyle="padding-left: 15px; padding-right: 15px; height: 34px;">
</u-tabs> </u-tabs>
</view> </view>
<!-- 校内活动 --> <!-- 校内活动 -->
<view v-if="current == 0"> <view v-if="current == 0">
<view v-for="activity in activityList"> <view v-for="activity in activityList">
<view class="one-school-activity" @click="goToDetail(activity.activityId)" > <view class="one-school-activity" @click="goToDetail(activity.activityId)">
<text class="school-activity-title">{{activity.title}}</text> <text class="school-activity-title">{{activity.title}}</text>
<image class="school-activity-icon" :src="activity.picture"></image> <image class="school-activity-icon" :src="activity.picture" @click.stop="showPic(activity.picture)"></image>
</view> </view>
</view> </view>
<view @click="goActivityAdd(teacherId)" class="add-activity" v-if="showButton"> <view @click="goActivityAdd(teacherId)" class="add-activity" v-if="showButton">
<u-icon name="edit-pen" color="#F1992D" size="40"></u-icon> <u-icon name="edit-pen" color="#F1992D" size="40"></u-icon>
</view> </view>
</view> </view>
<!-- 我的活动 --> <!-- 我的活动 -->
<view v-if="current == 1 &&id=='1'" > <view v-if="current == 1 &&id=='1'">
<view v-for="activity in activityList1"> <view v-for="activity in activityList1">
<view class="one-school-activity" @click="goToDetail(activity.activityId,1)"> <view class="one-school-activity" @click="goToDetail(activity.activityId,1)">
<text class="school-activity-title">{{activity.title}}</text> <text class="school-activity-title">{{activity.title}}</text>
...@@ -54,89 +53,101 @@ ...@@ -54,89 +53,101 @@
return { return {
current: 0, current: 0,
showButton: false, // 初始值为隐藏 showButton: false, // 初始值为隐藏
id: '1' ,// 根据id控制显示和隐藏 后期改为判断用户身份 id: '1', // 根据id控制显示和隐藏 后期改为判断用户身份
teacherId: '', teacherId: '',
list: [{ list: [{
name: '发现' name: '发现'
},{ }, {
name: '我的活动', name: '我的活动',
}, ], }, ],
list1: [{ list1: [{
name: '发现' name: '发现'
}], }],
activityList:[], activityList: [],
activityList1:[], activityList1: [],
title:'趣味篮球赛' title: '趣味篮球赛'
} }
}, },
onPullDownRefresh(){ onPullDownRefresh() {
//刷新后的效果 //刷新后的效果
this.onLoad1(); this.onLoad1();
uni.stopPullDownRefresh(); uni.stopPullDownRefresh();
}, },
mounted() { mounted() {
// 根据id值进行判断 // 根据id值进行判断
if (this.id == 1) { if (this.id == 1) {
this.showButton = true; this.showButton = true;
} }
}, },
methods: { methods: {
// 图片放大
showPic(imgUrl) {
let arr = [];
arr.push(imgUrl)
console.log(arr, '图片的地址')
uni.previewImage({
current: 0,
urls: arr
});
},
goToDetail(activityId) { goToDetail(activityId) {
uni.navigateTo({ uni.navigateTo({
url: '/pages/discover/discover-detail?activityId='+ activityId url: '/pages/discover/discover-detail?activityId=' + activityId
}) })
}, },
goToDetail(activityId,from) { goToDetail(activityId, from) {
uni.navigateTo({ uni.navigateTo({
url: '/pages/discover/discover-detail?activityId='+ activityId +'&from=' + from url: '/pages/discover/discover-detail?activityId=' + activityId + '&from=' + from
}) })
}, },
goActivityAdd(teacherId) { goActivityAdd(teacherId) {
uni.navigateTo({ uni.navigateTo({
url: '/pages/discover/add-school-activity?teacherId=' + teacherId url: '/pages/discover/add-school-activity?teacherId=' + teacherId
}) })
}, },
tabChange(index) { tabChange(index) {
this.current = index.index; this.current = index.index;
}, },
getData() { getData() {
uniCloud.callFunction({ uniCloud.callFunction({
name: 'fe-find-activityList', name: 'fe-find-activityList',
data: {} data: {}
}) })
.then(res => { .then(res => {
this.activityList=res.result.data.activityList, this.activityList = res.result.data.activityList,
console.log(res); console.log(res);
}); });
}, },
getData1() { getData1() {
uniCloud.callFunction({ uniCloud.callFunction({
name: 'fe-find-teacher-ActivityList', name: 'fe-find-teacher-ActivityList',
data: {teacherId:this.teacherId} data: {
}) teacherId: this.teacherId
.then(res => { }
this.activityList1=res.result.data.activityList, })
console.log(this.activityList1); .then(res => {
}); this.activityList1 = res.result.data.activityList,
console.log(this.activityList1);
});
},
onLoad1() {
let type = getApp().globalData.type;
if (type == "644a64c228064a7587cd79bf") this.id = 2;
else this.id = 1;
if (this.id == 1) this.teacherId = getApp().globalData.userId;
this.getData();
this.getData1();
}
}, },
onLoad1() {
let type =getApp().globalData.type;
if(type=="644a64c228064a7587cd79bf") this.id=2;
else this.id=1;
if(this.id==1) this.teacherId=getApp().globalData.userId;
this.getData();
this.getData1();
}
},
onLoad() { onLoad() {
let type =getApp().globalData.type; let type = getApp().globalData.type;
if(type=="644a64c228064a7587cd79bf") this.id=2; if (type == "644a64c228064a7587cd79bf") this.id = 2;
else this.id=1; else this.id = 1;
if(this.id==1) this.teacherId=getApp().globalData.userId; if (this.id == 1) this.teacherId = getApp().globalData.userId;
this.getData(); this.getData();
this.getData1(); this.getData1();
}, },
...@@ -148,21 +159,22 @@ ...@@ -148,21 +159,22 @@
<style> <style>
.one-school-activity { .one-school-activity {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
width: 90%; width: 90%;
background-color: rgb(245 154 35 / 30%); background-color: rgb(245 154 35 / 30%);
margin: 20px auto; margin: 20px auto;
border-radius: 15px; border-radius: 15px;
overflow: auto; overflow: auto;
} }
.school-activity-icon { .school-activity-icon {
width: 90%; width: 90%;
height: 200px; height: 200px;
margin-top: 2px; margin-top: 2px;
margin-bottom: 10px; margin-bottom: 10px;
border-radius: 15px; border-radius: 15px;
} }
.school-activity-title { .school-activity-title {
...@@ -171,17 +183,18 @@ ...@@ -171,17 +183,18 @@
font-size: 20px; font-size: 20px;
font-weight: bold; font-weight: bold;
} }
.add-activity { .add-activity {
position: fixed; position: fixed;
right: 20rpx; right: 20rpx;
bottom: 100rpx; bottom: 100rpx;
width: 100rpx; width: 100rpx;
height: 100rpx; height: 100rpx;
border-radius: 50%; border-radius: 50%;
background-color: white; background-color: white;
box-shadow: 0 0 20rpx #999; box-shadow: 0 0 20rpx #999;
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
} }
</style> </style>
\ No newline at end of file
...@@ -40,11 +40,10 @@ ...@@ -40,11 +40,10 @@
</view> </view>
</uni-popup> </uni-popup>
</view> </view>
</template> </template>
<script> <script>
let code=200; let code = 200;
import { import {
Fcaptcha Fcaptcha
} from "@/common/fcaptcha.js" } from "@/common/fcaptcha.js"
...@@ -89,7 +88,7 @@ ...@@ -89,7 +88,7 @@
errorMessage: '请输入六位验证码' errorMessage: '请输入六位验证码'
}, { }, {
validateFunction: function(rule, value, data, callback) { validateFunction: function(rule, value, data, callback) {
if (value.length !=6) { if (value.length != 6) {
callback('验证码为六位!') callback('验证码为六位!')
} else { } else {
callback(); callback();
...@@ -138,45 +137,44 @@ ...@@ -138,45 +137,44 @@
await this.fcaptcha.refresh() await this.fcaptcha.refresh()
}, },
confirm(validateForm) { confirm(validateForm) {
this.$refs[validateForm].validate(valid=>{ this.$refs[validateForm].validate(valid => {
if(!valid){ if (!valid) {
this.calluniCloud() this.calluniCloud()
} }
}) })
}, },
async calluniCloud(){ async calluniCloud() {
await uniCloud.callFunction({ await uniCloud.callFunction({
name: 'fe-retrievePassword', name: 'fe-retrievePassword',
data: { data: {
phone:this.formData.phone, phone: this.formData.phone,
password:this.formData.password, password: this.formData.password,
code:this.formData.captcha code: this.formData.captcha
} }
}) })
.then(res => { .then(res => {
this.code=res.result.code this.code = res.result.code
console.log(res) console.log(res)
}) })
await this.showTorM() await this.showTorM()
}, },
showTorM(){ showTorM() {
if (this.code == 200) { if (this.code == 200) {
console.log(this.code, 'this.code1') console.log(this.code, 'this.code1')
uni.showToast({ uni.showToast({
title: '修改成功', title: '修改成功',
duration: 2000 duration: 2000
}); });
} else if(this.code==400){ } else if (this.code == 400) {
uni.showToast({ uni.showToast({
title: '验证码错误或超时', title: '验证码错误或超时',
icon:"error", icon: "error",
duration: 2000 duration: 2000
}); });
} } else {
else{
uni.showToast({ uni.showToast({
title: '错误', title: '错误',
icon:"error", icon: "error",
duration: 2000 duration: 2000
}); });
} }
...@@ -200,16 +198,16 @@ ...@@ -200,16 +198,16 @@
if (!this.graphicVerifyCode) { if (!this.graphicVerifyCode) {
return uni.showToast({ return uni.showToast({
title: '请输入图形验证码', title: '请输入图形验证码',
icon:'error' icon: 'error'
}) })
} }
let validate = this.fcaptcha.validate(this.graphicVerifyCode) let validate = this.fcaptcha.validate(this.graphicVerifyCode)
if (!validate) { if (!validate) {
this.updateImageCode(); this.updateImageCode();
this.graphicVerifyCode='' this.graphicVerifyCode = ''
uni.showToast({ uni.showToast({
title: '图形验证码错误', title: '图形验证码错误',
icon:'error' icon: 'error'
}) })
this.fcaptcha.refresh() this.fcaptcha.refresh()
} else { } else {
...@@ -220,7 +218,7 @@ ...@@ -220,7 +218,7 @@
uniCloud.callFunction({ uniCloud.callFunction({
name: 'fe-auth-code', name: 'fe-auth-code',
data: { data: {
phone:this.formData.phone phone: this.formData.phone
} }
}) })
.then(res => { .then(res => {
...@@ -309,6 +307,7 @@ ...@@ -309,6 +307,7 @@
width: 200rpx; width: 200rpx;
height: 100rpx; height: 100rpx;
} }
.btn-big { .btn-big {
background-color: #f1992d; background-color: #f1992d;
color: #fff; color: #fff;
......
...@@ -21,7 +21,6 @@ ...@@ -21,7 +21,6 @@
<text class="rgst" @click="goBack(1,'/pages/login/register')">注册账号</text> <text class="rgst" @click="goBack(1,'/pages/login/register')">注册账号</text>
<text class="fbpw" @click="goBack(2,'/pages/login/find')">找回密码</text> <text class="fbpw" @click="goBack(2,'/pages/login/find')">找回密码</text>
</view> </view>
</view> </view>
</template> </template>
...@@ -81,14 +80,14 @@ ...@@ -81,14 +80,14 @@
} }
}) })
.then(res => { .then(res => {
if(res.result.code===200){ if (res.result.code === 200) {
getApp().globalData.userId=res.result.data.userId getApp().globalData.userId = res.result.data.userId
getApp().globalData.name=res.result.data.name getApp().globalData.name = res.result.data.name
getApp().globalData.type=res.result.data.type getApp().globalData.type = res.result.data.type
getApp().globalData.icon=res.result.data.icon getApp().globalData.icon = res.result.data.icon
getApp().globalData.school=res.result.data.school getApp().globalData.school = res.result.data.school
getApp().globalData.moblie=res.result.data.phone_num getApp().globalData.moblie = res.result.data.phone_num
getApp().globalData.gender=res.result.data.gender getApp().globalData.gender = res.result.data.gender
console.log(res) console.log(res)
uni.showToast({ uni.showToast({
title: '登录成功', title: '登录成功',
...@@ -99,7 +98,7 @@ ...@@ -99,7 +98,7 @@
animationType: 'pop-in', animationType: 'pop-in',
animationDuration: 300 animationDuration: 300
}) })
}else{ } else {
uni.showToast({ uni.showToast({
title: '账号或密码错误', title: '账号或密码错误',
icon: 'error' icon: 'error'
......
...@@ -31,7 +31,6 @@ ...@@ -31,7 +31,6 @@
</uni-forms-item> </uni-forms-item>
</uni-forms> </uni-forms>
</view> </view>
<!-- <helang-tab-bar-bubble :fixed-bottom="true"></helang-tab-bar-bubble> -->
</view> </view>
</template> </template>
......
...@@ -10,36 +10,37 @@ ...@@ -10,36 +10,37 @@
<script> <script>
export default { export default {
onReady() { onReady() {
if (this.type=='跑步'){ if (this.type == '跑步') {
uniCloud.callFunction({ uniCloud.callFunction({
name: 'fe-my-runningDetail', name: 'fe-my-runningDetail',
data: {runningId: this.id} data: {
}) runningId: this.id
.then(res => { }
this.getData(res); })
.then(res => {
}); this.getData(res);
});
const subNVue = uni.getSubNVueById('popup1'); // 通过 id 获取 nvue 子窗体 const subNVue = uni.getSubNVueById('popup1'); // 通过 id 获取 nvue 子窗体
subNVue.show('slide-in-top', 250); // 打开 nvue 子窗体 subNVue.show('slide-in-top', 250); // 打开 nvue 子窗体
} } else if (this.type == '健走') {
else if(this.type=='健走'){
uniCloud.callFunction({ uniCloud.callFunction({
name: 'fe-my-walkingDetail', name: 'fe-my-walkingDetail',
data: {walkingId: this.id} data: {
}) walkingId: this.id
.then(res => { }
this.getData(res); })
.then(res => {
}); this.getData(res);
});
const subNVue = uni.getSubNVueById('popup1'); // 通过 id 获取 nvue 子窗体 const subNVue = uni.getSubNVueById('popup1'); // 通过 id 获取 nvue 子窗体
subNVue.show('slide-in-top', 250); // 打开 nvue 子窗体 subNVue.show('slide-in-top', 250); // 打开 nvue 子窗体
} }
}, },
data() { data() {
return { return {
type:',', type: ',',
id: '', id: '',
icon: '/static/sport/icon.jpg', icon: '/static/sport/icon.jpg',
longitude: '', longitude: '',
...@@ -74,39 +75,31 @@ ...@@ -74,39 +75,31 @@
animationType: 'pop-in', animationType: 'pop-in',
animationDuration: 300 animationDuration: 300
}) })
// uni.navigateBack({
// delta: 1, //返回层数,2则上上页
// })
}, },
getData(res){ getData(res) {
console.log(res); console.log(res);
uni.$emit('information', { uni.$emit('information', {
type: this.type, type: this.type,
startTime: res.result.data.StartDatetime, startTime: res.result.data.StartDatetime,
distance: res.result.data.distance, distance: res.result.data.distance,
duration: res.result.data.duration, duration: res.result.data.duration,
pace: res.result.data.pace, pace: res.result.data.pace,
feeling:res.result.data.feeling, feeling: res.result.data.feeling,
id:this.id id: this.id
}); });
//this.id = res.result.data.id;
this.polyline[0].points = res.result.data.pathLine; this.polyline[0].points = res.result.data.pathLine;
this.markers[0].latitude = res.result.data.startPoint.latitude; this.markers[0].latitude = res.result.data.startPoint.latitude;
this.markers[0].longitude = res.result.data.startPoint.longitude; this.markers[0].longitude = res.result.data.startPoint.longitude;
this.markers[1].latitude = this.polyline[0].points[this.polyline[0].points.length - 1].latitude; this.markers[1].latitude = this.polyline[0].points[this.polyline[0].points.length - 1].latitude;
this.markers[1].longitude = this.polyline[0].points[this.polyline[0].points.length - 1].longitude; this.markers[1].longitude = this.polyline[0].points[this.polyline[0].points.length - 1].longitude;
// this.markers[1].longitude = res.result.data.endPoint.longitude;
//this.markers[1].latitude = res.result.data.endPoint.latitude;
this.latitude = this.markers[1].latitude; this.latitude = this.markers[1].latitude;
this.longitude = this.markers[1].longitude; this.longitude = this.markers[1].longitude;
} }
}, },
onLoad(e){ onLoad(e) {
this.id=e.id; this.id = e.id;
this.type=e.type; this.type = e.type;
console.log(this.type); console.log(this.type);
//console.log(this.id);
} }
} }
</script> </script>
......
...@@ -5,7 +5,9 @@ ...@@ -5,7 +5,9 @@
</view> </view>
<view class="info"> <view class="info">
<view class="info1"> <view class="info1">
<view class="head-portrait" :style="'background: url('+headPortraitIcon+') no-repeat center/cover #eeeeee;'"></view> <view class="head-portrait"
:style="'background: url('+headPortraitIcon+') no-repeat center/cover #eeeeee;'"
@click.stop="showPic(headPortraitIcon)"></view>
<view class="nickname">{{nickname}}</view> <view class="nickname">{{nickname}}</view>
</view> </view>
<view class="info2"> <view class="info2">
...@@ -44,18 +46,28 @@ ...@@ -44,18 +46,28 @@
<script> <script>
export default { export default {
data () { data() {
return { return {
headPortraitIcon:'', headPortraitIcon: '',
nickname:'', nickname: '',
schoolName:'', schoolName: '',
teamName:'', teamName: '',
// moblie:'', // moblie:'',
// gender:'', // gender:'',
userId:'', userId: '',
} }
}, },
methods:{ methods: {
// 图片放大
showPic(imgUrl) {
let arr = [];
arr.push(imgUrl)
console.log(arr, '图片的地址')
uni.previewImage({
current: 0,
urls: arr
});
},
goToModify() { goToModify() {
uni.navigateTo({ uni.navigateTo({
url: '/pages/my/my-modify' url: '/pages/my/my-modify'
...@@ -77,89 +89,83 @@ ...@@ -77,89 +89,83 @@
}) })
}, },
goToWalkingRecord() { goToWalkingRecord() {
uni.navigateTo({ uni.navigateTo({
url: '/pages/my/my-walking-record' url: '/pages/my/my-walking-record'
}) })
}, },
getData() { getData() {
uniCloud.callFunction({ uniCloud.callFunction({
name: 'fe-my-information', name: 'fe-my-information',
data: {userId:this.userId} data: {
}) userId: this.userId
.then(res => { }
console.log(res); })
.then(res => {
this.teamName=res.result.data.team; console.log(res);
this.teamName = res.result.data.team;
//this.activityList=res.result.data.activityList, });
//console.log(res);
});
}, },
}, },
onLoad() { onLoad() {
plus.navigator.setStatusBarBackground('#EDEEF0'); plus.navigator.setStatusBarBackground('#EDEEF0');
// this.headPortraitIcon=getApp().globalData.icon;
// this.nickname=getApp().globalData.name;
// this.schoolName=getApp().globalData.school;
// this.teamName=
}, },
onShow(){ onShow() {
this.headPortraitIcon=getApp().globalData.icon; this.headPortraitIcon = getApp().globalData.icon;
this.nickname=getApp().globalData.name; this.nickname = getApp().globalData.name;
this.schoolName=getApp().globalData.school; this.schoolName = getApp().globalData.school;
this.userId=getApp().globalData.userId; this.userId = getApp().globalData.userId;
this.getData(); this.getData();
// this.moblie=getApp().globalData.moblie;
// this.gender=getApp().globalData.gender;
} }
} }
</script> </script>
<style> <style>
.main { .main {
position: absolute; position: absolute;
width: 100%; width: 100%;
height: 100%; height: 100%;
background-color: #EDEEF0; background-color: #EDEEF0;
} }
.modify{
.modify {
height: 10%; height: 10%;
} }
.modify-icon{
.modify-icon {
margin-top: 50rpx; margin-top: 50rpx;
margin-left: 85%; margin-left: 85%;
width: 70rpx; width: 70rpx;
height: 70rpx; height: 70rpx;
} }
.info{
.info {
height: 60%; height: 60%;
} }
.info1{
.info1 {
height: 30%; height: 30%;
} }
.head-portrait { .head-portrait {
margin-top: 50rpx; margin-top: 50rpx;
margin-left: 15%; margin-left: 15%;
width: 200rpx; width: 200rpx;
height: 200rpx; height: 200rpx;
border-radius: 50%; border-radius: 50%;
background-size:100% 100%; background-size: 100% 100%;
/* background-image:url("/static/my/main/head-portrait.png") ; /* background-image:url("/static/my/main/head-portrait.png") ;
background-repeat:no-repeat; */ background-repeat:no-repeat; */
float: left; float: left;
} }
.nickname{
.nickname {
width: 250rpx; width: 250rpx;
height: 50rpx; height: 50rpx;
font-size: 60rpx; font-size: 60rpx;
...@@ -168,34 +174,38 @@ ...@@ -168,34 +174,38 @@
margin-top: 100rpx; margin-top: 100rpx;
margin-right: 100rpx; margin-right: 100rpx;
} }
.info2{
.info2 {
border-radius: 20rpx; border-radius: 20rpx;
background-color: #FFFFFF; background-color: #FFFFFF;
width:75%; width: 75%;
height: 40%; height: 40%;
margin-top: 50px; margin-top: 50px;
margin-left: auto; margin-left: auto;
margin-right: auto; margin-right: auto;
} }
.school{
.school {
height: 50%; height: 50%;
} }
.school-icon{
.school-icon {
width: 100rpx; width: 100rpx;
height: 100rpx; height: 100rpx;
margin-top: 30rpx; margin-top: 30rpx;
margin-left: 50rpx; margin-left: 50rpx;
background-size:100% 100%; background-size: 100% 100%;
background-image:url("/static/my/main/school-icon.png"); background-image: url("/static/my/main/school-icon.png");
background-repeat:no-repeat; background-repeat: no-repeat;
float: left; float: left;
} }
.school-name{
.school-name {
width: 340rpx; width: 340rpx;
height: 30rpx; height: 30rpx;
margin-top: 60rpx; margin-top: 60rpx;
...@@ -204,23 +214,26 @@ ...@@ -204,23 +214,26 @@
text-align: left; text-align: left;
float: right; float: right;
} }
.team{
.team {
height: 50%; height: 50%;
} }
.team-icon{
.team-icon {
width: 100rpx; width: 100rpx;
height: 100rpx; height: 100rpx;
margin-top: 40rpx; margin-top: 40rpx;
margin-left: 50rpx; margin-left: 50rpx;
background-size:100% 100%; background-size: 100% 100%;
background-image:url("/static/my/main/team-icon.png"); background-image: url("/static/my/main/team-icon.png");
background-repeat:no-repeat; background-repeat: no-repeat;
float: left; float: left;
} }
.team-name{
.team-name {
width: 340rpx; width: 340rpx;
height: 30rpx; height: 30rpx;
margin-top: 60rpx; margin-top: 60rpx;
...@@ -229,10 +242,10 @@ ...@@ -229,10 +242,10 @@
text-align: left; text-align: left;
float: right; float: right;
} }
.func{ .func {
width:75%; width: 75%;
/* margin-top: 10rpx; */ /* margin-top: 10rpx; */
margin-left: auto; margin-left: auto;
margin-right: auto; margin-right: auto;
...@@ -241,68 +254,76 @@ ...@@ -241,68 +254,76 @@
text-align: center; text-align: center;
font-size: 20rpx; font-size: 20rpx;
} }
.my-walking-record{
.my-walking-record {
width:200rpx;
width: 200rpx;
height: 250rpx; height: 250rpx;
} }
.my-walking-record-icon{
.my-walking-record-icon {
width: 100rpx; width: 100rpx;
height: 100rpx; height: 100rpx;
margin-top: 50rpx; margin-top: 50rpx;
margin-left: auto; margin-left: auto;
margin-right: auto; margin-right: auto;
background-size:100% 100%; background-size: 100% 100%;
background-image:url("/static/my/main/walking-record-icon.png"); background-image: url("/static/my/main/walking-record-icon.png");
background-repeat:no-repeat; background-repeat: no-repeat;
} }
.running-record{
.running-record {
width:200rpx;
width: 200rpx;
height: 250rpx; height: 250rpx;
} }
.running-record-icon{
.running-record-icon {
width: 100rpx; width: 100rpx;
height: 100rpx; height: 100rpx;
margin-top: 50rpx; margin-top: 50rpx;
margin-left: auto; margin-left: auto;
margin-right: auto; margin-right: auto;
background-size:100% 100%; background-size: 100% 100%;
background-image:url("/static/my/main/running-record-icon.png"); background-image: url("/static/my/main/running-record-icon.png");
background-repeat:no-repeat; background-repeat: no-repeat;
} }
.setting{
.setting {
width:200rpx;
width: 200rpx;
height: 250rpx; height: 250rpx;
} }
.setting-icon{
.setting-icon {
width: 100rpx; width: 100rpx;
height: 100rpx; height: 100rpx;
margin-top: 50rpx; margin-top: 50rpx;
margin-left: auto; margin-left: auto;
margin-right: auto; margin-right: auto;
background-size:100% 100%; background-size: 100% 100%;
background-image:url("/static/my/main/setting-icon.png"); background-image: url("/static/my/main/setting-icon.png");
background-repeat:no-repeat; background-repeat: no-repeat;
} }
.reset-password{
.reset-password {
width:200rpx;
width: 200rpx;
height: 250rpx; height: 250rpx;
} }
.reset-password-icon{
.reset-password-icon {
width: 100rpx; width: 100rpx;
height: 100rpx; height: 100rpx;
margin-top: 50rpx; margin-top: 50rpx;
margin-left: auto; margin-left: auto;
margin-right: auto; margin-right: auto;
background-size:100% 100%; background-size: 100% 100%;
background-image:url("/static/my/main/reset-password-icon.png"); background-image: url("/static/my/main/reset-password-icon.png");
background-repeat:no-repeat; background-repeat: no-repeat;
} }
</style> </style>
\ No newline at end of file
...@@ -7,12 +7,10 @@ ...@@ -7,12 +7,10 @@
</view> </view>
<view class="container"> <view class="container">
<view class="ui-all"> <view class="ui-all">
<view class="avatar" @tap="avatarChoose"> <view class="avatar" @tap="avatarChoose">
<view class="imgAvatar"> <view class="imgAvatar">
<view class="iavatar" :style="'background: url('+avatar+') no-repeat center/cover #eeeeee;'"> <view class="iavatar" :style="'background: url('+avatar+') no-repeat center/cover #eeeeee;'">
</view> </view>
</view> </view>
<text>修改头像</text> <text>修改头像</text>
<button v-if="!avatar" open-type="getUserInfo" @tap="getUserInfo" class="getInfo"></button> <button v-if="!avatar" open-type="getUserInfo" @tap="getUserInfo" class="getInfo"></button>
...@@ -57,7 +55,6 @@ ...@@ -57,7 +55,6 @@
<script> <script>
export default { export default {
data() { data() {
return { return {
selectSex: [{ selectSex: [{
...@@ -71,9 +68,6 @@ ...@@ -71,9 +68,6 @@
school: [{ school: [{
id: 1, id: 1,
name: '福州大学' name: '福州大学'
}, {
id: 2,
name: 'xx大学'
}], }],
index2: '0', index2: '0',
avatar: '', avatar: '',
...@@ -83,26 +77,20 @@ ...@@ -83,26 +77,20 @@
userId: '', userId: '',
sex: '', sex: '',
} }
}, },
methods: { methods: {
bindPickerChange(e) { bindPickerChange(e) {
this.index1 = e.detail.value; this.index1 = e.detail.value;
}, },
bindSchoolChange(e) { bindSchoolChange(e) {
this.index2 = e.detail.value; this.index2 = e.detail.value;
}, },
bindnickName(e) { bindnickName(e) {
this.nickName = e.detail.value; this.nickName = e.detail.value;
}, },
bindmobile(e) { bindmobile(e) {
this.mobile = e.detail.value; this.mobile = e.detail.value;
}, },
avatarChoose() { avatarChoose() {
let that = this; let that = this;
uniCloud.chooseAndUploadFile({ uniCloud.chooseAndUploadFile({
...@@ -115,7 +103,6 @@ ...@@ -115,7 +103,6 @@
}); });
}, },
dialogConfirm() { dialogConfirm() {
let that = this; let that = this;
let gender = that.selectSex[that.index1].name; let gender = that.selectSex[that.index1].name;
let school = that.school[that.index2].name; let school = that.school[that.index2].name;
...@@ -159,16 +146,12 @@ ...@@ -159,16 +146,12 @@
}) })
this.$refs.alertDialog.close(); this.$refs.alertDialog.close();
}, },
dialogClose() { dialogClose() {
this.$refsalertDialog.close(); this.$refsalertDialog.close();
}, },
savaInfo() { savaInfo() {
this.$refs.alertDialog.open(); this.$refs.alertDialog.open();
}, },
isPoneAvailable(poneInput) { isPoneAvailable(poneInput) {
var myreg = /^[1][3,4,5,7,8][0-9]{9}$/; var myreg = /^[1][3,4,5,7,8][0-9]{9}$/;
if (!myreg.test(poneInput)) { if (!myreg.test(poneInput)) {
...@@ -177,14 +160,12 @@ ...@@ -177,14 +160,12 @@
return true; return true;
} }
}, },
goBack() { goBack() {
uni.navigateBack({ uni.navigateBack({
delta: 1, //返回层数,2则上上页 delta: 1, //返回层数,2则上上页
}) })
}, },
Upload(updata) { Upload(updata) {
uniCloud.callFunction({ uniCloud.callFunction({
name: 'fe-my-modifyinformation', name: 'fe-my-modifyinformation',
data: { data: {
...@@ -199,11 +180,9 @@ ...@@ -199,11 +180,9 @@
.then(res => { .then(res => {
console.log(res); console.log(res);
}); });
}, },
}, },
onLoad() { onLoad() {
plus.navigator.setStatusBarBackground('#EDEEF0'); plus.navigator.setStatusBarBackground('#EDEEF0');
this.nickName = getApp().globalData.name; this.nickName = getApp().globalData.name;
this.userId = getApp().globalData.userId; this.userId = getApp().globalData.userId;
...@@ -216,9 +195,7 @@ ...@@ -216,9 +195,7 @@
} else if (this.gender == '') { } else if (this.gender == '') {
this.index1 = 1; this.index1 = 1;
} }
//this.getData();
} }
} }
</script> </script>
......
<template> <template>
<view class="main"> <view class="main">
<!-- <view class="return">
<view class="return-btn" @click="goBack"></view>
<text>重置密码</text>
</view> -->
<view class="top"> <view class="top">
<image @click="goBack" class="back" src="/static/discover/back.png"></image> <image @click="goBack" class="back" src="/static/discover/back.png"></image>
<view class="title">重置密码</view> <view class="title">重置密码</view>
...@@ -12,9 +8,8 @@ ...@@ -12,9 +8,8 @@
<view class="content"> <view class="content">
<view class="password"> <view class="password">
<span>&ensp;&ensp;码:</span> <span>&ensp;&ensp;码:</span>
<input placeholder="请输入原密码" @input="bindPassword" type="text" :password="showPassword" name="input"></input> <input placeholder="请输入原密码" @input="bindPassword" type="text" :password="showPassword"
<!-- <text :class="[!showPassword ?'cuIcon-attentionfill' : 'cuIcon-attentionforbidfill']" class="text-gray" @click="showPwd" ></text> --> name="input"></input>
<!-- <input type="safe-password" :value="originalPassword" :valplaceholder='请输入原密码'></input> -->
</view> </view>
<view class="password"> <view class="password">
<span>&ensp;&ensp;码:</span> <span>&ensp;&ensp;码:</span>
...@@ -42,7 +37,7 @@ ...@@ -42,7 +37,7 @@
data() { data() {
return { return {
showPassword: true, showPassword: true,
password:'', password: '',
newPassword: '', newPassword: '',
confirmPassword: '', confirmPassword: '',
} }
...@@ -84,50 +79,12 @@ ...@@ -84,50 +79,12 @@
this.Upload(updata); this.Upload(updata);
this.$refs.alertDialog.close(); this.$refs.alertDialog.close();
}, },
dialogClose() { dialogClose() {
//console.log('点击关闭')
this.$refsalertDialog.close(); this.$refsalertDialog.close();
}, },
confirmModification() { confirmModification() {
this.$refs.alertDialog.open(); this.$refs.alertDialog.open();
// uni.showModal({
// title: '温馨提示', //提示标题
// content: '确认修改密码吗', //提示内容
// showCancel: true, //是否显示取消按钮
// success: res => {
// if (res.confirm) { //confirm为ture,代表用户点击确定
// let that = this;
// let password = that.password;
// let newPassword = that.newPassword;
// let confirmPassword = that.confirmPassword;
// let updata = {};
// if (!that.isPasswordAvailable(newPassword)) {
// uni.showToast({
// title: '密码长度在8-20位!',
// icon: 'none',
// duration: 2000
// });
// return;
// } else if (!that.isConfirmPasswordAvailable(newPassword, confirmPassword)) {
// uni.showToast({
// title: '两次密码不一致',
// icon: 'none',
// duration: 2000
// });
// return;
// } else {
// updata.password = password;
// updata.newPassword = newPassword;
// }
// this.Upload(updata);
// } else if (res.cancel) { //cancel为ture,代表用户点击取消
// console.log('点击了取消按钮');
// }
// }
// })
}, },
isPasswordAvailable(newPassword) { isPasswordAvailable(newPassword) {
if (newPassword.length > 20 || newPassword.length < 8) { if (newPassword.length > 20 || newPassword.length < 8) {
return false; return false;
...@@ -135,7 +92,6 @@ ...@@ -135,7 +92,6 @@
return true; return true;
} }
}, },
isConfirmPasswordAvailable(newPassword, confirmPassword) { isConfirmPasswordAvailable(newPassword, confirmPassword) {
if (newPassword == confirmPassword) { if (newPassword == confirmPassword) {
return true; return true;
...@@ -143,28 +99,29 @@ ...@@ -143,28 +99,29 @@
return false; return false;
} }
}, },
goBack() { goBack() {
uni.navigateBack({ uni.navigateBack({
delta: 1, //返回层数,2则上上页 delta: 1, //返回层数,2则上上页
}) })
}, },
Upload(updata) { Upload(updata) {
uniCloud.callFunction({ uniCloud.callFunction({
name: 'fe-my-resetpassword', name: 'fe-my-resetpassword',
data: {userId:getApp().globalData.userId,password:updata.password,newPassword:updata.newPassword}, data: {
userId: getApp().globalData.userId,
}) password: updata.password,
.then(res => { newPassword: updata.newPassword
uni.showToast({ },
title: res.result.message,
icon: 'none', })
duration: 2000 .then(res => {
uni.showToast({
title: res.result.message,
icon: 'none',
duration: 2000
});
console.log(res);
}); });
//if (res.result.data.code==)
console.log(res);
});
}, },
onload() { onload() {
plus.navigator.setStatusBarBackground('#EDEEF0'); plus.navigator.setStatusBarBackground('#EDEEF0');
...@@ -178,7 +135,6 @@ ...@@ -178,7 +135,6 @@
position: absolute; position: absolute;
width: 100%; width: 100%;
height: 100%; height: 100%;
/* background-color: #EDEEF0; */
} }
.top { .top {
......
...@@ -5,11 +5,8 @@ ...@@ -5,11 +5,8 @@
<view class="title">跑步记录</view> <view class="title">跑步记录</view>
<span class="empty"></span> <span class="empty"></span>
</view> </view>
<!-- v-for="(item,index) in allPost" :key="index" -->
<view class="record" v-for="(item,index) in runningrecordList" :key="index" @click="goToDetail(item.runningId)"> <view class="record" v-for="(item,index) in runningrecordList" :key="index" @click="goToDetail(item.runningId)">
<view class="icon"> <view class="icon"></view>
</view>
<view class="content"> <view class="content">
<view class="content1"> <view class="content1">
<view class="distance"> <view class="distance">
...@@ -40,14 +37,11 @@ ...@@ -40,14 +37,11 @@
data() { data() {
return { return {
runningrecordList: [], runningrecordList: [],
type:'跑步', type: '跑步',
} }
}, },
methods: { methods: {
goBack() { goBack() {
// uni.navigateBack({
// delta: 1, //返回层数,2则上上页
// })
uni.reLaunch({ uni.reLaunch({
url: '/pages/my/main', url: '/pages/my/main',
animationType: 'pop-in', animationType: 'pop-in',
...@@ -55,20 +49,13 @@ ...@@ -55,20 +49,13 @@
}) })
}, },
goToDetail(runningId) { goToDetail(runningId) {
// console.log('a');
// uni.navigateTo({
// url: '/pages/my/finish'
// })
//uni.setStorageSync('data-to-finish', item)
uni.reLaunch({ uni.reLaunch({
url: '/pages/my/finish?id=' + runningId +'&type=' + this.type, url: '/pages/my/finish?id=' + runningId + '&type=' + this.type,
animationType: 'pop-in', animationType: 'pop-in',
animationDuration: 300 animationDuration: 300
}) })
}, },
getData() { getData() {
uniCloud.callFunction({ uniCloud.callFunction({
name: 'fe-my-runningList', name: 'fe-my-runningList',
data: { data: {
...@@ -76,10 +63,7 @@ ...@@ -76,10 +63,7 @@
} }
}) })
.then(res => { .then(res => {
//console.log(res);
this.runningrecordList = res.result.data.runningList; this.runningrecordList = res.result.data.runningList;
this.runningrecordList.forEach((item, index) => { this.runningrecordList.forEach((item, index) => {
item.duration = this.formatSeconds(item.duration); item.duration = this.formatSeconds(item.duration);
item.startDatetime = this.formatDate(item.startDatetime); item.startDatetime = this.formatDate(item.startDatetime);
...@@ -105,7 +89,6 @@ ...@@ -105,7 +89,6 @@
minuteTime = parseInt(minuteTime % 60); minuteTime = parseInt(minuteTime % 60);
} }
} }
//var result = "" + parseInt(secondTime) + "";
if (secondTime >= 10) { if (secondTime >= 10) {
result = "" + parseInt(secondTime) + ""; result = "" + parseInt(secondTime) + "";
} else { } else {
...@@ -121,19 +104,14 @@ ...@@ -121,19 +104,14 @@
} else { } else {
result = "0" + parseInt(hourTime) + ":" + result; result = "0" + parseInt(hourTime) + ":" + result;
} }
return result; return result;
}, },
formatDate(value) {
formatDate(value){ const str = value + ''; //转成字符串
const str = value + ''; //转成字符串
let arr = str.split(' '); let arr = str.split(' ');
return arr[0]; return arr[0];
}, },
onLoad() { onLoad() {
//console.log(this.formatSeconds(10));
//plus.navigator.setStatusBarBackground('#EDEEF0');
this.getData(); this.getData();
} }
} }
...@@ -145,7 +123,6 @@ ...@@ -145,7 +123,6 @@
position: absolute; position: absolute;
width: 100%; width: 100%;
height: 100%; height: 100%;
/* background-color: #EDEEF0; */
} }
.top { .top {
...@@ -185,9 +162,6 @@ ...@@ -185,9 +162,6 @@
border-bottom: 2rpx solid #EDEEF0; border-bottom: 2rpx solid #EDEEF0;
width: 100%; width: 100%;
height: 200rpx; height: 200rpx;
/* display: flex;
flex-direction: row; */
} }
.icon { .icon {
...@@ -196,9 +170,9 @@ ...@@ -196,9 +170,9 @@
height: 150rpx; height: 150rpx;
margin-top: 20rpx; margin-top: 20rpx;
margin-left: 30rpx; margin-left: 30rpx;
background-size:100% 100%; background-size: 100% 100%;
background-image:url("/static/my/my-record/run.png/"); background-image: url("/static/my/my-record/run.png/");
background-repeat:no-repeat; background-repeat: no-repeat;
float: left; float: left;
} }
......
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
<view class="main"> <view class="main">
<view class="top"> <view class="top">
<image @click="goBack" class="back" src="/static/discover/back.png"></image> <image @click="goBack" class="back" src="/static/discover/back.png"></image>
</view> </view>
<view class="profile"> <view class="profile">
<view class="profile-title"> <view class="profile-title">
...@@ -36,11 +35,11 @@ ...@@ -36,11 +35,11 @@
export default { export default {
data() { data() {
return { return {
profileContent:' Must Go,本产品基于 Vue Uniapp开发,提供 Android 和iOS 端 APP,针对于“后疫情”时代的身体素质普遍下降的问题,恢复大学生们原有的朝气。该产品定位于帮助众多大学生,乃至更多青年人走出怠惰于运动的舒适圈,增强身体素质、培养积极向上的心理状态。通过该产品可以轻松且高效地搜集到周边、尤其是自身高校的赛事活动信息,及时报名参与,并突破现在运动类APP的圈子局限,不必局限于与远在天边的“朋友”分享运动成果,而可以召集小队发帖社交与近在咫尺的“队友”外出活动。', profileContent: ' Must Go,本产品基于 Vue Uniapp开发,提供 Android 和iOS 端 APP,针对于“后疫情”时代的身体素质普遍下降的问题,恢复大学生们原有的朝气。该产品定位于帮助众多大学生,乃至更多青年人走出怠惰于运动的舒适圈,增强身体素质、培养积极向上的心理状态。通过该产品可以轻松且高效地搜集到周边、尤其是自身高校的赛事活动信息,及时报名参与,并突破现在运动类APP的圈子局限,不必局限于与远在天边的“朋友”分享运动成果,而可以召集小队发帖社交与近在咫尺的“队友”外出活动。',
aboutContent:'有问题或反馈请致电我们\n联系电话:18960545221' aboutContent: '有问题或反馈请致电我们\n联系电话:18960545221'
} }
}, },
methods:{ methods: {
dialogConfirm() { dialogConfirm() {
uni.reLaunch({ uni.reLaunch({
url: '/pages/login/login', url: '/pages/login/login',
...@@ -49,39 +48,18 @@ ...@@ -49,39 +48,18 @@
}) })
this.$refs.alertDialog.close(); this.$refs.alertDialog.close();
}, },
dialogClose() { dialogClose() {
//console.log('点击关闭')
this.$refsalertDialog.close(); this.$refsalertDialog.close();
}, },
confirmExit(){ confirmExit() {
this.$refs.alertDialog.open(); this.$refs.alertDialog.open();
// uni.showModal({
// title: '温馨提示', //提示标题
// content: '确认退出你的账号吗', //提示内容
// showCancel: true, //是否显示取消按钮
// success: function (res) {
// if (res.confirm) { //confirm为ture,代表用户点击确定
// // uni.navigateTo({
// // url: '/pages/login/login'
// // })
// uni.reLaunch({
// url: '/pages/login/login',
// animationType: 'pop-in',
// animationDuration: 300
// })
// } else if (res.cancel) { //cancel为ture,代表用户点击取消
// }
// }
// })
}, },
goBack(){ goBack() {
uni.navigateBack({ uni.navigateBack({
delta:1,//返回层数,2则上上页 delta: 1, //返回层数,2则上上页
}) })
}, },
onload(){ onload() {
plus.navigator.setStatusBarBackground('#EDEEF0'); plus.navigator.setStatusBarBackground('#EDEEF0');
} }
} }
...@@ -95,12 +73,14 @@ ...@@ -95,12 +73,14 @@
height: 100%; height: 100%;
background-color: #EDEEF0; background-color: #EDEEF0;
} }
.top { .top {
width: 100%; width: 100%;
height: 50px; height: 50px;
background-color: #EDEEF0; background-color: #EDEEF0;
} }
.back { .back {
width: 40px; width: 40px;
height: 30px; height: 30px;
...@@ -109,9 +89,9 @@ ...@@ -109,9 +89,9 @@
float: left; float: left;
margin-left: 10px; margin-left: 10px;
} }
.profile{
/* border: 2rpx solid #000; */ .profile {
width:80%; width: 80%;
height: 55%; height: 55%;
margin-top: 10rpx; margin-top: 10rpx;
margin-left: auto; margin-left: auto;
...@@ -119,47 +99,53 @@ ...@@ -119,47 +99,53 @@
background-color: #FFFFFF; background-color: #FFFFFF;
border-radius: 20rpx; border-radius: 20rpx;
} }
.profile-title{
.profile-title {
height: 12%; height: 12%;
color: #F1992D; color: #F1992D;
} }
.profile-icon{
.profile-icon {
width: 60rpx; width: 60rpx;
height: 60rpx; height: 60rpx;
margin-top: 10rpx; margin-top: 10rpx;
margin-left: 20rpx; margin-left: 20rpx;
background-size:100% 100%; background-size: 100% 100%;
background-image:url("/static/my/my-setting/profile-icon.png"); background-image: url("/static/my/my-setting/profile-icon.png");
background-repeat:no-repeat; background-repeat: no-repeat;
float: left; float: left;
} }
.profile-name{
.profile-name {
width: 200rpx; width: 200rpx;
height: 50rpx; height: 50rpx;
margin-top: 10rpx; margin-top: 10rpx;
margin-right: 280rpx; margin-right: 280rpx;
font-size: 40rpx; font-size: 40rpx;
text-align: left; text-align: left;
float: right; float: right;
} }
.profile-content{
.profile-content {
height: 88%; height: 88%;
} }
.profile-content textarea{
.profile-content textarea {
width: 80%; width: 80%;
height: 100%; height: 100%;
margin-left: auto; margin-left: auto;
margin-right: auto; margin-right: auto;
} }
.about{
.about {
width:80%;
width: 80%;
height: 15%; height: 15%;
margin-top: 5%; margin-top: 5%;
margin-left: auto; margin-left: auto;
...@@ -167,52 +153,56 @@ ...@@ -167,52 +153,56 @@
background-color: #FFFFFF; background-color: #FFFFFF;
border-radius: 20rpx; border-radius: 20rpx;
} }
.about-title{
.about-title {
height: 40%; height: 40%;
color: #F1992D; color: #F1992D;
} }
.about-icon{
.about-icon {
width: 60rpx; width: 60rpx;
height: 60rpx; height: 60rpx;
margin-top: 10rpx; margin-top: 10rpx;
margin-left: 20rpx; margin-left: 20rpx;
background-size:100% 100%; background-size: 100% 100%;
background-image:url("/static/my/my-setting/about-icon.png"); background-image: url("/static/my/my-setting/about-icon.png");
background-repeat:no-repeat; background-repeat: no-repeat;
float: left; float: left;
} }
.about-name{
.about-name {
width: 200rpx; width: 200rpx;
height: 50rpx; height: 50rpx;
margin-top: 10rpx; margin-top: 10rpx;
margin-right: 280rpx; margin-right: 280rpx;
font-size: 40rpx; font-size: 40rpx;
text-align: left; text-align: left;
float: right; float: right;
} }
.about-content{
.about-content {
height: 60%; height: 60%;
} }
.about-content textarea{
.about-content textarea {
width: 80%; width: 80%;
height: 100%; height: 100%;
margin-left: auto; margin-left: auto;
margin-right: auto; margin-right: auto;
} }
.exit{
.exit {}
} .exit-btn {
.exit-btn{ background-color: #F1992D;
background-color:#F1992D ;
color: #FFFFFF; color: #FFFFFF;
width:70%; width: 70%;
height: 85rpx; height: 85rpx;
line-height: 85rpx; line-height: 85rpx;
margin-top: 50rpx; margin-top: 50rpx;
......
...@@ -5,11 +5,8 @@ ...@@ -5,11 +5,8 @@
<view class="title">健走记录</view> <view class="title">健走记录</view>
<span class="empty"></span> <span class="empty"></span>
</view> </view>
<view class="record" v-for="(item,index) in walkingrecordList" :key="index" @click="goToDetail(item.walkingId)"> <view class="record" v-for="(item,index) in walkingrecordList" :key="index" @click="goToDetail(item.walkingId)">
<view class="icon"> <view class="icon"></view>
</view>
<view class="content"> <view class="content">
<view class="content1"> <view class="content1">
<view class="distance"> <view class="distance">
...@@ -40,7 +37,7 @@ ...@@ -40,7 +37,7 @@
data() { data() {
return { return {
walkingrecordList: [], walkingrecordList: [],
type:'健走', type: '健走',
} }
}, },
methods: { methods: {
...@@ -52,15 +49,14 @@ ...@@ -52,15 +49,14 @@
}) })
}, },
goToDetail(walkingId) { goToDetail(walkingId) {
uni.reLaunch({ uni.reLaunch({
url: '/pages/my/finish?id=' + walkingId +'&type=' + this.type, url: '/pages/my/finish?id=' + walkingId + '&type=' + this.type,
animationType: 'pop-in', animationType: 'pop-in',
animationDuration: 300 animationDuration: 300
}) })
}, },
getData() { getData() {
// console.log('a');
uniCloud.callFunction({ uniCloud.callFunction({
name: 'fe-my-walkingList', name: 'fe-my-walkingList',
data: { data: {
...@@ -68,8 +64,6 @@ ...@@ -68,8 +64,6 @@
} }
}) })
.then(res => { .then(res => {
//console.log(res);
this.walkingrecordList = res.result.data.walkingList; this.walkingrecordList = res.result.data.walkingList;
this.walkingrecordList.forEach((item, index) => { this.walkingrecordList.forEach((item, index) => {
item.duration = this.formatSeconds(item.duration); item.duration = this.formatSeconds(item.duration);
...@@ -77,8 +71,8 @@ ...@@ -77,8 +71,8 @@
}); });
}); });
}, },
formatDate(value){ formatDate(value) {
const str = value + ''; //转成字符串 const str = value + ''; //转成字符串
let arr = str.split(' '); let arr = str.split(' ');
return arr[0]; return arr[0];
}, },
...@@ -100,7 +94,6 @@ ...@@ -100,7 +94,6 @@
minuteTime = parseInt(minuteTime % 60); minuteTime = parseInt(minuteTime % 60);
} }
} }
//var result = "" + parseInt(secondTime) + "";
if (secondTime >= 10) { if (secondTime >= 10) {
result = "" + parseInt(secondTime) + ""; result = "" + parseInt(secondTime) + "";
} else { } else {
...@@ -116,12 +109,9 @@ ...@@ -116,12 +109,9 @@
} else { } else {
result = "0" + parseInt(hourTime) + ":" + result; result = "0" + parseInt(hourTime) + ":" + result;
} }
return result; return result;
}, },
onLoad() { onLoad() {
//plus.navigator.setStatusBarBackground('#EDEEF0');
this.getData(); this.getData();
} }
} }
...@@ -133,7 +123,6 @@ ...@@ -133,7 +123,6 @@
position: absolute; position: absolute;
width: 100%; width: 100%;
height: 100%; height: 100%;
/* background-color: #EDEEF0; */
} }
.top { .top {
...@@ -173,9 +162,6 @@ ...@@ -173,9 +162,6 @@
border-bottom: 2rpx solid #EDEEF0; border-bottom: 2rpx solid #EDEEF0;
width: 100%; width: 100%;
height: 200rpx; height: 200rpx;
/* display: flex;
flex-direction: row; */
} }
.icon { .icon {
...@@ -184,9 +170,9 @@ ...@@ -184,9 +170,9 @@
height: 150rpx; height: 150rpx;
margin-top: 20rpx; margin-top: 20rpx;
margin-left: 30rpx; margin-left: 30rpx;
background-size:100% 100%; background-size: 100% 100%;
background-image:url("/static/my/my-record/walk.png/"); background-image: url("/static/my/my-record/walk.png/");
background-repeat:no-repeat; background-repeat: no-repeat;
float: left; float: left;
} }
......
...@@ -31,7 +31,6 @@ ...@@ -31,7 +31,6 @@
<text class="dot">●</text> <text class="dot">●</text>
<text class="text">运动感受</text> <text class="text">运动感受</text>
</view> </view>
<view class="pic" v-if="!feeling"> <view class="pic" v-if="!feeling">
<image class="good" :src="good" @click="choice(1)"></image> <image class="good" :src="good" @click="choice(1)"></image>
<image class="normal" :src="normal" @click="choice(2)"></image> <image class="normal" :src="normal" @click="choice(2)"></image>
...@@ -59,25 +58,22 @@ ...@@ -59,25 +58,22 @@
this.duration = res.duration this.duration = res.duration
this.pace = res.pace this.pace = res.pace
this.feeling = res.feeling this.feeling = res.feeling
this.id=res.id; this.id = res.id;
if (this.feeling == 'good') { if (this.feeling == 'good') {
this.good = '/static/sport/good1.png' this.good = '/static/sport/good1.png'
} else if (this.feeling == 'normal') { } else if (this.feeling == 'normal') {
this.normal = '/static/sport/normal1.png' this.normal = '/static/sport/normal1.png'
} else if (this.feeling == 'bad') { } else if (this.feeling == 'bad') {
this.bad = '/static/sport/bad1.png' this.bad = '/static/sport/bad1.png'
} }
}) })
}, },
onUnload() { onUnload() {
uni.$off('information') uni.$off('information')
}, },
data() { data() {
return { return {
id:'', id: '',
username: '不知道叫啥', username: '不知道叫啥',
icon: '/static/sport/icon.jpg', icon: '/static/sport/icon.jpg',
type: '', type: '',
......
...@@ -101,9 +101,6 @@ ...@@ -101,9 +101,6 @@
</view> </view>
</view> </view>
</view> </view>
</view> </view>
</template> </template>
......
...@@ -15,7 +15,6 @@ ...@@ -15,7 +15,6 @@
<image v-if="!is" class="finish" :src="finish" @click="click(3)"></image> <image v-if="!is" class="finish" :src="finish" @click="click(3)"></image>
<image v-if="is" class="stop" :src="stop" @click="click(1)"></image> <image v-if="is" class="stop" :src="stop" @click="click(1)"></image>
</view> </view>
</view> </view>
</template> </template>
......
...@@ -48,7 +48,7 @@ ...@@ -48,7 +48,7 @@
</template> </template>
<script> <script>
let applyCode=200; let applyCode = 200;
export default { export default {
data() { data() {
return { return {
...@@ -72,11 +72,11 @@ ...@@ -72,11 +72,11 @@
animationDuration: 300 animationDuration: 300
}) })
}, },
async apply(){ async apply() {
await uniCloud.callFunction({ await uniCloud.callFunction({
name: 'fe-team-applyActivity', name: 'fe-team-applyActivity',
data: { data: {
userId:this.userId, userId: this.userId,
activityId: this.activityId activityId: this.activityId
} }
}) })
...@@ -86,26 +86,25 @@ ...@@ -86,26 +86,25 @@
console.log(res.result.message), console.log(res.result.message),
console.log(this.applyCode) console.log(this.applyCode)
}) })
await this.showTT(); await this.showTT();
}, },
showTT(){ showTT() {
if(this.applyCode==200){ if (this.applyCode == 200) {
uni.showToast({ uni.showToast({
title: '报名成功' title: '报名成功'
}); });
} } else {
else{
uni.showToast({ uni.showToast({
title: '您已报名,请勿重复报名', title: '您已报名,请勿重复报名',
icon: 'none' icon: 'none'
}); });
} }
} }
}, },
onLoad(option) { onLoad(option) {
this.userId=getApp().globalData.userId this.userId = getApp().globalData.userId
this.activityId=option.activityId this.activityId = option.activityId
console.log(option.activityId) console.log(option.activityId)
uniCloud.callFunction({ uniCloud.callFunction({
name: 'fe-team-activityDetail', name: 'fe-team-activityDetail',
...@@ -125,14 +124,14 @@ ...@@ -125,14 +124,14 @@
this.icon = res.result.data.icon this.icon = res.result.data.icon
}) })
} }
} }
</script> </script>
<style> <style>
.content{ .content {
padding-bottom: 30px; padding-bottom: 30px;
} }
.returnBack { .returnBack {
height: 55rpx; height: 55rpx;
width: 55rpx; width: 55rpx;
...@@ -222,7 +221,7 @@ ...@@ -222,7 +221,7 @@
margin-top: 10px; margin-top: 10px;
} }
.activity-object-text{ .activity-object-text {
font-weight: bold; font-weight: bold;
} }
...@@ -286,7 +285,8 @@ ...@@ -286,7 +285,8 @@
.loginButton::after { .loginButton::after {
border: 0; border: 0;
} }
.btn{
.btn {
margin-bottom: 30px; margin-bottom: 30px;
} }
</style> </style>
\ No newline at end of file
...@@ -33,7 +33,6 @@ ...@@ -33,7 +33,6 @@
</view> </view>
</view> </view>
<view class="form-input2-wrapper"> <view class="form-input2-wrapper">
<view class="form-input2"> <view class="form-input2">
<picker mode="date" start="1970-01-01" end="2100-12-31" @change="handleDateChange2"> <picker mode="date" start="1970-01-01" end="2100-12-31" @change="handleDateChange2">
<view class="picker">{{ end_date }}</view> <view class="picker">{{ end_date }}</view>
......
...@@ -125,7 +125,6 @@ ...@@ -125,7 +125,6 @@
position: absolute; position: absolute;
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
.returnBack { .returnBack {
......
<template> <template>
<view class="bg"> <view class="bg">
<!-- 标签栏 --> <!-- 标签栏 -->
<u-tabs :list="list" lineWidth="30" lineColor="#F1992D" :activeStyle="{ <u-tabs :list="list" lineWidth="30" lineColor="#F1992D" :activeStyle="{
color: '#F1992D', color: '#F1992D',
...@@ -9,9 +8,9 @@ ...@@ -9,9 +8,9 @@
}" :inactiveStyle="{ }" :inactiveStyle="{
color: '#606266', color: '#606266',
transform: 'scale(1)' transform: 'scale(1)'
}" itemStyle="padding-left: 15px; padding-right: 15px; height: 34px;" @click="tabChange" :current="current" class="tabbg"> }" itemStyle="padding-left: 15px; padding-right: 15px; height: 34px;" @click="tabChange" :current="current"
class="tabbg">
</u-tabs> </u-tabs>
<!-- 我的小队 --> <!-- 我的小队 -->
<view v-if="current == 0" class="content"> <view v-if="current == 0" class="content">
<view v-if="join==null"> <view v-if="join==null">
...@@ -38,8 +37,6 @@ ...@@ -38,8 +37,6 @@
</view> </view>
</view> </view>
</view> </view>
</view> </view>
<!-- 加入小队 --> <!-- 加入小队 -->
<view v-if="current == 1" class="content"> <view v-if="current == 1" class="content">
...@@ -58,7 +55,6 @@ ...@@ -58,7 +55,6 @@
</view> </view>
</view> </view>
</view> </view>
<uni-popup ref="popupDialog1" type="dialog"> <uni-popup ref="popupDialog1" type="dialog">
<uni-popup-dialog title="提示" content="是否确定退出小队?" :before-close="true" @confirm="dialogConfirm" <uni-popup-dialog title="提示" content="是否确定退出小队?" :before-close="true" @confirm="dialogConfirm"
...@@ -72,7 +68,7 @@ ...@@ -72,7 +68,7 @@
</template> </template>
<script> <script>
let code=200; let code = 200;
export default { export default {
data() { data() {
return { return {
...@@ -95,8 +91,7 @@ ...@@ -95,8 +91,7 @@
name: '加入小队', name: '加入小队',
}, ], }, ],
name: '', name: '',
activityList: [ activityList: []
]
}; };
}, },
methods: { methods: {
...@@ -109,7 +104,7 @@ ...@@ -109,7 +104,7 @@
this.showMyTeam(); this.showMyTeam();
} }
}, },
showJoinTeam(){ showJoinTeam() {
uniCloud.callFunction({ uniCloud.callFunction({
name: 'fe-team-teamList', name: 'fe-team-teamList',
data: {} data: {}
...@@ -119,7 +114,7 @@ ...@@ -119,7 +114,7 @@
this.teamList = res.result.data.teamList this.teamList = res.result.data.teamList
}) })
}, },
showMyTeam(){ showMyTeam() {
uniCloud.callFunction({ uniCloud.callFunction({
name: 'fe-team-activityList', name: 'fe-team-activityList',
data: { data: {
...@@ -225,7 +220,7 @@ ...@@ -225,7 +220,7 @@
dialogClose1() { dialogClose1() {
this.$refs['popupDialog2'].close(); this.$refs['popupDialog2'].close();
}, },
showTorM(){ showTorM() {
if (this.code == 200) { if (this.code == 200) {
uni.showToast({ uni.showToast({
title: '加入成功', title: '加入成功',
...@@ -254,11 +249,10 @@ ...@@ -254,11 +249,10 @@
uni.stopPullDownRefresh(); uni.stopPullDownRefresh();
}, },
onLoad(option) { onLoad(option) {
this.userId=getApp().globalData.userId this.userId = getApp().globalData.userId
if(option.index==1){ if (option.index == 1) {
this.showJoinTeam() this.showJoinTeam()
} } else {
else{
this.showMyTeam() this.showMyTeam()
} }
}, },
...@@ -270,18 +264,11 @@ ...@@ -270,18 +264,11 @@
</script> </script>
<style> <style>
.bg { .bg {}
/* background-color: #edeef0; */
/* position: absolute; .tabbg {}
width: 100%;
height: 100%; */
}
.tabbg{
/* background-color: #edeef0; */
}
.content { .content {
/* background-color: #edeef0; */
position: absolute; position: absolute;
width: 100%; width: 100%;
height: 100%; height: 100%;
...@@ -320,7 +307,6 @@ ...@@ -320,7 +307,6 @@
margin-bottom: 15px; margin-bottom: 15px;
float: left; float: left;
overflow: auto; overflow: auto;
} }
.icon { .icon {
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
memList: [{ memList: [{
memberIcon: '/static/icon/1.png', memberIcon: '/static/icon/1.png',
memberName: "不会取名字", memberName: "不会取名字",
},{ }, {
memberIcon: '/static/sport/icon.jpg', memberIcon: '/static/sport/icon.jpg',
memberName: "不会取名字", memberName: "不会取名字",
}] }]
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
} }
}, },
onLoad() { onLoad() {
this.userId=getApp().globalData.userId this.userId = getApp().globalData.userId
uniCloud.callFunction({ uniCloud.callFunction({
name: 'fe-team-memberList', name: 'fe-team-memberList',
data: { data: {
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
}) })
.then(res => { .then(res => {
console.log(res), console.log(res),
this.memList = res.result.data this.memList = res.result.data
}) })
} }
} }
...@@ -92,20 +92,22 @@ ...@@ -92,20 +92,22 @@
color: #f1992d; color: #f1992d;
display: inline-block; display: inline-block;
} }
.memList{ .memList {
margin-top: 20px; margin-top: 20px;
} }
.icon{
.icon {
position: relative; position: relative;
top:2px; top: 2px;
left: 38px; left: 38px;
width: 50px; width: 50px;
height: 50px; height: 50px;
border-radius: 50%; border-radius: 50%;
} }
.membername{
display: inline; .membername {
display: inline;
position: relative; position: relative;
font-size: 20px; font-size: 20px;
font-weight: bold; font-weight: bold;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册