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

布局

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