提交 37b5216f 编写于 作者: Y yyt

布局统一

上级 f4a3980c
......@@ -2,7 +2,7 @@
<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>
<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">
......@@ -226,11 +226,15 @@
.nav-bar-back-icon {
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: 24px;
font-size: 20px;
font-weight: bold;
color: #F1992D;
}
......
<template>
<view class="detail">
<!-- <view class="nav-bar-back">
<image class="nav-bar-back-icon" src="/static/discover/back.png" @click="goBack"></image>
......@@ -8,19 +8,21 @@
</view> -->
<view v-if="from==1">
<view class="top">
<image @click="goBack" class="back" src="/static/discover/back.png"></image>
<view class="title">活动详情</view>
<image @click="delPost" class="empty1" src="/static/discover/delete.png"></span>
<image @click="goBack" class="back" src="/static/discover/back.png"></image>
<view class="title">活动详情</view>
<image @click="delPost" class="empty1" src="/static/discover/delete.png"></span>
</view>
</view>
<view v-if="from!=1">
<view class="top">
<image @click="goBack" class="back" src="/static/discover/back.png"></image>
<view class="top">
<image @click="goBack" class="back" src="/static/discover/back.png"></image>
<view class="title">活动详情</view>
<span class="empty"></span>
</view>
</view>
<view class="school-activity-icon-wrapper">
<image class="school-activity-icon" :src="this.picture"></image>
</view>
<view class="school-activity-icon-wrapper"><image class="school-activity-icon" :src="this.picture"></image></view>
<view class="activity-production">
<image class="activity-production-icon" src="/static/discover/production.png"></image>
<text class="activity-title">活动介绍:</text>
......@@ -47,73 +49,76 @@
<view class="production-detail">{{contact}}</view>
</view>
<!-- 是否删除 -->
<uni-popup ref="alertDialog" type="dialog">
<uni-popup-dialog cancelText="取消" confirmText="确定" title="警告" content="确定删除该活动吗?"
@confirm="dialogConfirm"></uni-popup-dialog>
</uni-popup>
<uni-popup ref="alertDialog" type="dialog">
<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>
<script>
export default {
data() {
return {
id:'1',
title: '',
production:'',
object:'',
time:'',
place:'',
contact:'',
activityId: '',
picture:'',
from:''//判断页面来源
}
},
methods: {
goBack() {
uni.navigateBack({
delta: 1
})
},
deleteActivity() {
uniCloud.callFunction({
name: 'fe-find-deleteActivity',
data: { activityId:this.activityId
}
})
.then(res => {
console.log(res);
});
data() {
return {
id: '1',
title: '',
production: '',
object: '',
time: '',
place: '',
contact: '',
activityId: '',
picture: '',
from: '' //判断页面来源
}
},
methods: {
goBack() {
uni.navigateBack({
delta: 1
})
},
deleteActivity() {
uniCloud.callFunction({
name: 'fe-find-deleteActivity',
data: {
activityId: this.activityId
}
})
.then(res => {
console.log(res);
});
uni.showToast({
title: '删除成功',
duration: 1000,
success: () => {
setTimeout(() => {
uni.navigateBack()
}, 1000)
}
})
},
getData() {
uniCloud.callFunction({
name: 'fe-find-activityDetail',
data: { activityId:this.activityId
}
})
.then(res => {
console.log(res);
this.title = res.result.data.title,
this.production=res.result.data.content,
this.picture=res.result.data.picture,
this.object=res.result.data.invitee,
this.time=res.result.data.startDate+'——'+res.result.data.endDate,
this.place=res.result.data.place,
this.contact=res.result.data.contact
});
},delPost() {
title: '删除成功',
duration: 1000,
success: () => {
setTimeout(() => {
uni.navigateBack()
}, 1000)
}
})
},
getData() {
uniCloud.callFunction({
name: 'fe-find-activityDetail',
data: {
activityId: this.activityId
}
})
.then(res => {
console.log(res);
this.title = res.result.data.title,
this.production = res.result.data.content,
this.picture = res.result.data.picture,
this.object = res.result.data.invitee,
this.time = res.result.data.startDate + '——' + res.result.data.endDate,
this.place = res.result.data.place,
this.contact = res.result.data.contact
});
},
delPost() {
this.$refs.alertDialog.open();
},
dialogConfirm() {
......@@ -125,57 +130,63 @@
console.log('点击关闭')
this.$refsalertDialog.close();
}
},
},
onLoad(e) {
this.from=e.from;
this.activityId=e.activityId;
this.from = e.from;
this.activityId = e.activityId;
this.getData();
}
// mounted() {
// this.activityId = this.$route.query.activityId
// }
}
}
</script>
<style>
.top {
width: 100%;
height: 50px;
background-color: #EDEEF0;
text-align: center;
}
.back {
width: 40px;
height: 30px;
margin-top: 10px;
margin-bottom: 10px;
float: left;
margin-left: 10px;
}
.empty{
width: 40px;
height: 30px;
margin-top: 10px;
margin-bottom: 10px;
float: right;
margin-right: 10px;
}
.empty1{
width: 40px;
height: 30px;
margin-top: 12px;
margin-bottom: 10px;
float: right;
margin-right: 10px;
}
.title {
margin-top: 15px;
display: inline-block;
}
/* .nav-bar-back {
.top {
width: 100%;
height: 50px;
background-color: #EDEEF0;
text-align: center;
}
.back {
width: 40px;
height: 30px;
margin-top: 10px;
margin-bottom: 10px;
float: left;
margin-left: 10px;
}
.empty {
width: 40px;
height: 30px;
margin-top: 10px;
margin-bottom: 10px;
float: right;
margin-right: 10px;
}
.empty1 {
width: 40px;
height: 30px;
margin-top: 12px;
margin-bottom: 10px;
float: right;
margin-right: 10px;
}
.title {
font-size: 20px;
margin-top: 15px;
font-weight: bold;
color: #f1992d;
display: inline-block;
}
/* .nav-bar-back {
display: flex;
align-items: center;
justify-content: center;
......@@ -194,58 +205,65 @@
font-weight: bold;
color: #F1992D;
} */
.school-activity-icon-wrapper{
margin-top: 10px;
display: flex;
justify-content: center;
align-items: center;
}
.school-activity-icon {
width: 89%;
height: 200px;
margin: 0px;
.school-activity-icon-wrapper {
margin-top: 10px;
display: flex;
justify-content: center;
align-items: center;
}
.school-activity-icon {
width: 89%;
height: 200px;
margin: 0px;
padding: 0px;
border-radius: 15px;
}
.activity-production{
margin-top: 10px;
}
.activity-title {
font-size: 20px; /* 调整字体大小为24像素 */
}
}
.activity-object{
margin-top: 10px;
}
.activity-time{
margin-top: 10px;
}
.activity-place{
margin-top: 10px;
}
.activity-contact{
margin-top: 10px;
}
.activity-production-icon{
width: 40px;
height: 35px;
margin-left: 30px;
margin-top:8px;
margin-bottom: -5px;
}
.production-detail{
width: 85%;
background-color: rgb(245 154 35 / 30%);
border-radius: 5px;
margin-left: 20px;
margin-top: 5px;
/* 文字换行处理 */
word-wrap:break-word;
word-break:break-all;
padding-left: 7px;
padding-right: 7px;
padding-top:5px;
}
.activity-production {
margin-top: 10px;
}
.activity-title {
font-size: 20px;
/* 调整字体大小为24像素 */
}
.activity-object {
margin-top: 10px;
}
.activity-time {
margin-top: 10px;
}
.activity-place {
margin-top: 10px;
}
.activity-contact {
margin-top: 10px;
}
.activity-production-icon {
width: 40px;
height: 35px;
margin-left: 30px;
margin-top: 8px;
margin-bottom: -5px;
}
</style>
.production-detail {
width: 85%;
background-color: rgb(245 154 35 / 30%);
border-radius: 5px;
margin-left: 20px;
margin-top: 5px;
/* 文字换行处理 */
word-wrap: break-word;
word-break: break-all;
padding-left: 7px;
padding-right: 7px;
padding-top: 5px;
}
</style>
\ No newline at end of file
<template>
<view class="bg">
<image class="returnBack" src="/static/login/returnBack.png" @click="goBack(1,'/pages/login/login')"></image>
<image class="returnBack" src="/static/discover/back.png" @click="goBack(1,'/pages/login/login')"></image>
<view class="content">
<view class="text-area">
<uni-forms :modelValue="formData" label-position="left" :labelWidth='90' :rules="confirmRules"
......
<template>
<view class="content">
<image class="returnBack" src="/static/login/returnBack.png" @click="goBack()"></image>
<image class="returnBack" src="/static/discover/back.png" @click="goBack()"></image>
<image class="logo" src="/static/login/register.png"></image>
<view class="text-area">
<uni-forms :rules="rules" :value="formData" ref="form" validate-trigger="bind" err-show-type="undertext">
......
<template>
<view class="main">
<view class="modify">
<image class="modify-icon" src="/static/my/main/modify-icon.png" @click="goToModify()"></image>
<image class="modify-icon" src="/static/discover/back.png" @click="goToModify()"></image>
</view>
<view class="info">
<view class="info1">
......
<template>
<view>
<view class="top">
<image @click="goBack" class="back" :src="'/static/my/exit-icon.png'"></image>
<image @click="goBack" class="back" src="/static/discover/back.png"></image>
<view class="title">信息修改</view>
<span class="empty"></span>
</view>
<view class="container">
<view class="ui-all">
<view class="avatar" @tap="avatarChoose">
<view class="avatar" @tap="avatarChoose">
<view class="imgAvatar">
<view class="iavatar" :style="'background: url('+avatar+') no-repeat center/cover #eeeeee;'"></view>
</view>
<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>
</view>
......@@ -29,7 +30,8 @@
</view>
<view class="ui-list right">
<text>性别</text>
<picker @change="bindPickerChange" mode='selector' range-key="name" :value="index1" :range="selectSex">
<picker @change="bindPickerChange" mode='selector' range-key="name" :value="index1"
:range="selectSex">
<view class="picker">
{{selectSex[index1].name}}
</view>
......@@ -54,9 +56,8 @@
</template>
<script>
export default {
data() {
return {
selectSex: [{
......@@ -66,7 +67,7 @@
id: 2,
name: ''
}],
index1: '0',
index1: 0,
school: [{
id: 1,
name: '福州大学'
......@@ -76,11 +77,11 @@
}],
index2: '0',
avatar: '',
schoolName:'',
schoolName: '',
nickName: '',
mobile: '',
userId:'',
sex:'',
userId: '',
sex: '',
}
},
......@@ -101,22 +102,20 @@
this.mobile = e.detail.value;
},
avatarChoose() {
let that = this;
uniCloud.chooseAndUploadFile({
type: 'image',
success(res) {
that.avatar = res["tempFiles"][0]["url"];
//console.log(res);
//console.log(this.avatar);
},
fail() {},
complete() {}
});
},
dialogConfirm() {
let that = this;
let gender = that.selectSex[that.index1].name;
let school = that.school[that.index2].name;
......@@ -150,100 +149,23 @@
return;
}
this.Upload(updata);
getApp().globalData.icon=updata.headimg;
getApp().globalData.name=updata.nickname;
getApp().globalData.moblie=updata.mobile;
getApp().globalData.gender=updata.gender;
getApp().globalData.school=updata.school;
getApp().globalData.icon = updata.headimg;
getApp().globalData.name = updata.nickname;
getApp().globalData.moblie = updata.mobile;
getApp().globalData.gender = updata.gender;
getApp().globalData.school = updata.school;
uni.navigateBack({
delta: 1, //返回层数,2则上上页
})
this.$refs.alertDialog.close();
},
dialogClose() {
//console.log('点击关闭')
this.$refsalertDialog.close();
},
// getUserInfo() {
// uni.getUserProfile({
// desc: '用于完善会员资料', // 声明获取用户个人信息后的用途,后续会展示在弹窗中,请谨慎填写
// success: (res) => {
// console.log(res);
// uni.showToast({
// title: '已授权',
// icon: 'none',
// duration: 2000
// })
// }
// })
// },
// getphonenumber(e) {
// if (e.detail.iv) {
// console.log(e.detail.iv) //传后台解密换取手机号
// uni.showToast({
// title: '已授权',
// icon: 'none',
// duration: 2000
// })
// }
// },
savaInfo() {
this.$refs.alertDialog.open();
// uni.showModal({
// title: '温馨提示', //提示标题
// content: '确认修改你的个人信息吗', //提示内容
// showCancel: true, //是否显示取消按钮
// success: res => {
// if (res.confirm) { //confirm为ture,代表用户点击确定
// let that = this;
// let gender = that.selectSex[that.index1].name;
// let school = that.school[that.index2].name;
// let nickname = that.nickName;
// let mobile = that.mobile;
// let headimg = that.avatar;
// let updata = {};
// if (!nickname) {
// uni.showToast({
// title: '请填写昵称',
// icon: 'none',
// duration: 2000
// });
// return;
// }
// updata.nickname = nickname;
// if (!headimg) {
// headimg = that.avater;
// }
// updata.headimg = headimg;
// updata.gender = gender;
// updata.school = school;
// if (that.isPoneAvailable(mobile)) {
// updata.mobile = mobile;
// } else {
// uni.showToast({
// title: '手机号码有误,请重填',
// icon: 'none',
// duration: 2000
// });
// return;
// }
// this.Upload(updata);
// getApp().globalData.icon=updata.headimg;
// getApp().globalData.name=updata.nickname;
// getApp().globalData.moblie=updata.mobile;
// getApp().globalData.gender=updata.gender;
// getApp().globalData.school=updata.school;
// uni.navigateBack({
// delta: 1, //返回层数,2则上上页
// })
// // that.updata(updata);
// } else if (res.cancel) { //cancel为ture,代表用户点击取消
// console.log('点击了取消按钮');
// }
// }
// })
},
......@@ -255,61 +177,45 @@
return true;
}
},
// async updata(datas) {
// //传后台
// },
// imgUpload(file) {
// let that = this;
// uni.uploadFile({
// header: {
// Authorization: uni.getStorageSync('token')
// },
// url: '/api/upload/image', //需传后台图片上传接口
// filePath: file[0],
// name: 'file',
// formData: {
// type: 'user_headimg'
// },
// success: function(res) {
// var data = JSON.parse(res.data);
// data = data.data;
// that.avater = that.url + data.img;
// that.headimg = that.url + data.img;
// },
// fail: function(error) {
// console.log(error);
// }
// });
// },
goBack() {
uni.navigateBack({
delta: 1, //返回层数,2则上上页
})
},
Upload(updata) {
uniCloud.callFunction({
name: 'fe-my-modifyinformation',
data: {userId:this.userId,icon:updata.headimg,username:updata.nickname,school:updata.school,phone:updata.mobile,gender:updata.gender}
})
.then(res => {
console.log(res);
});
name: 'fe-my-modifyinformation',
data: {
userId: this.userId,
icon: updata.headimg,
username: updata.nickname,
school: updata.school,
phone: updata.mobile,
gender: updata.gender
}
})
.then(res => {
console.log(res);
});
},
},
onLoad() {
plus.navigator.setStatusBarBackground('#EDEEF0');
this.nickName=getApp().globalData.name;
this.userId=getApp().globalData.userId;
this.avatar=getApp().globalData.icon;
this.mobile=getApp().globalData.moblie;
this.gender=getApp().globalData.gender;
this.schoolName=getApp().globalData.school;
this.nickName = getApp().globalData.name;
this.userId = getApp().globalData.userId;
this.avatar = getApp().globalData.icon;
this.mobile = getApp().globalData.moblie;
this.gender = getApp().globalData.gender;
this.schoolName = getApp().globalData.school;
if (this.gender == '') {
this.index1 = 0;
} else if (this.gender == '') {
this.index1 = 1;
}
//this.getData();
}
......@@ -351,7 +257,7 @@
.title {
font-size: 20px;
margin-top: 10px;
margin-top: 15px;
font-weight: bold;
color: #f1992d;
display: inline-block;
......
......@@ -5,7 +5,7 @@
<text>重置密码</text>
</view> -->
<view class="top">
<image @click="goBack" class="back" :src="'/static/my/exit-icon.png'"></image>
<image @click="goBack" class="back" src="/static/discover/back.png"></image>
<view class="title">重置密码</view>
<span class="empty"></span>
</view>
......@@ -208,7 +208,7 @@
.title {
font-size: 20px;
margin-top: 10px;
margin-top: 15px;
font-weight: bold;
color: #f1992d;
display: inline-block;
......
<template>
<view class="main">
<view class="top">
<image @click="goBack" class="back" :src="'/static/my/exit-icon.png'"></image>
<image @click="goBack" class="back" src="/static/discover/back.png"></image>
<view class="title">跑步记录</view>
<span class="empty"></span>
</view>
......@@ -175,7 +175,7 @@
.title {
font-size: 20px;
margin-top: 10px;
margin-top: 15px;
font-weight: bold;
color: #f1992d;
display: inline-block;
......
<template>
<view class="main">
<view class="top">
<image @click="goBack" class="back" :src="'/static/my/exit-icon.png'"></image>
<image @click="goBack" class="back" src="/static/discover/back.png"></image>
</view>
<view class="profile">
......
<template>
<view class="main">
<view class="top">
<image @click="goBack" class="back" :src="'/static/my/exit-icon.png'"></image>
<image @click="goBack" class="back" src="/static/discover/back.png"></image>
<view class="title">健走记录</view>
<span class="empty"></span>
</view>
......@@ -163,7 +163,7 @@
.title {
font-size: 20px;
margin-top: 10px;
margin-top: 15px;
font-weight: bold;
color: #f1992d;
display: inline-block;
......
......@@ -2,7 +2,7 @@
<view class="content">
<!-- 页头 -->
<view class="top">
<image @click="back" :disabled="btnDisabled" class="back" :src="'../../static/icon/back.png'"></image>
<image @click="back" :disabled="btnDisabled" class="back" src="/static/discover/back.png"></image>
<view class="title">发布帖子</view>
<image class="add" :src="'../../static/post/send.png'" @click="addPost"></image>
</view>
......@@ -127,7 +127,10 @@
}
.title {
font-size: 20px;
margin-top: 15px;
font-weight: bold;
color: #f1992d;
display: inline-block;
}
......
......@@ -2,7 +2,7 @@
<view style="width: 100%;">
<!-- 页头 -->
<view class="top">
<image @click="back" class="back" :src="'../../static/icon/back.png'"></image>
<image @click="back" class="back" src="/static/discover/back.png"></image>
<view class="title">帖子详情</view>
<span class="empty"></span>
</view>
......@@ -409,7 +409,10 @@
}
.title {
font-size: 20px;
margin-top: 15px;
font-weight: bold;
color: #f1992d;
display: inline-block;
}
......
<template>
<view>
<view class="top">
<image class="back" src="/static/login/returnBack.png" @click="goBack()"></image>
<image class="back" src="/static/discover/back.png" @click="goBack()"></image>
<view class="title">累计排名</view>
<span class="empty"></span>
</view>
......@@ -108,7 +108,7 @@
.title {
font-size: 20px;
margin-top: 10px;
margin-top: 15px;
font-weight: bold;
color: #f1992d;
display: inline-block;
......
......@@ -2,7 +2,7 @@
<view class="content">
<map id="myMap" style="width: 100%; height: 780px;" :latitude="latitude" :longitude="longitude"
:markers="markers" show-location="true" :scale="18">
<cover-image class="returnBack" src="/static/login/returnBack.png" @click="goBack()"></cover-image>
<cover-image class="returnBack" src="/static/discover/back.png" @click="goBack()"></cover-image>
<cover-image class="start-button" src="/static/sport/start1.png" @click="start"></cover-image>
</map>
</view>
......
......@@ -2,7 +2,7 @@
<view class="content">
<view class="detail">
<view class="top">
<image class="back" src="/static/login/returnBack.png" @click="goBack()"></image>
<image class="back" src="/static/discover/back.png" @click="goBack()"></image>
<view class="title">活动详情</view>
<span class="empty"></span>
</view>
......@@ -168,7 +168,7 @@
.title {
font-size: 20px;
margin-top: 10px;
margin-top: 15px;
font-weight: bold;
color: #f1992d;
display: inline-block;
......
......@@ -99,8 +99,8 @@
});
return;
}
this.start_date=this.start_date+' '+this.start_time
this.end_date=this.end_date+' '+this.end_time
this.start_date = this.start_date + ' ' + this.start_time
this.end_date = this.end_date + ' ' + this.end_time
console.log(this.userId, 'this.userId')
uniCloud.callFunction({
name: 'fe-team-createActivity',
......@@ -158,14 +158,16 @@
.nav-bar-back-icon {
width: 40px;
height: 30px;
margin-left: 20rpx;
margin-right: auto;
margin-top: 10px;
margin-bottom: 10px;
float: left;
margin-left: 10px;
}
.nav-bar-title {
flex: 1;
text-align: center;
font-size: 24px;
font-size: 20px;
font-weight: bold;
color: #F1992D;
}
......
<template>
<view class="add-school-activity">
<view class="top">
<image class="back" src="/static/login/returnBack.png" @click="goBack()"></image>
<image class="back" src="/static/discover/back.png" @click="goBack()"></image>
<view class="title">创建小队</view>
<span class="empty"></span>
</view>
......@@ -163,7 +163,7 @@
.title {
font-size: 23px;
margin-top: 10px;
margin-top: 15px;
font-weight: bold;
color: #f1992d;
display: inline-block;
......
<template>
<view>
<view class="top">
<image class="back" src="/static/login/returnBack.png" @click="goBack()"></image>
<image class="back" src="/static/discover/back.png" @click="goBack()"></image>
<view class="title">成员列表</view>
<span class="empty"></span>
</view>
......@@ -87,7 +87,7 @@
.title {
font-size: 20px;
margin-top: 10px;
margin-top: 15px;
font-weight: bold;
color: #f1992d;
display: inline-block;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册