报名工具小程序初始代码

This commit is contained in:
liupopo
2024-02-06 09:36:25 +08:00
commit d7420944ba
202 changed files with 41300 additions and 0 deletions

View File

@@ -0,0 +1,312 @@
<template>
<RefreshView ref="mescrollRef" :hasBack="true" :useTitleLeftBtn="0" :useTitleRightBtn="0"
:text="page.title" :useUpScroll="false">
<image class="type" src="../../static/dianhua.png" @click="call"></image>
<view class="name">{{data.linkerName}}</view>
<view class="area">{{data.regionName}}</view>
<view class="address">{{page.distance}}</view>
<!-- <view class="banner">
<swiper class="swiper" indicator-dots="true" autoplay="true">
<swiper-item class="swiper-item" v-for="(item,index) in data.listTwo" :key="index">-->
<image style="width: 100%;height: 450rpx;" :src="data.logo" mode="aspectFill"></image>
<!-- </swiper-item>
</swiper>
</view>-->
<!-- <view style="margin-top: 20rpx;">
<text style="background-color: #F1F1F1;border-radius: 5rpx;margin: 15rpx;padding-left: 15rpx;
padding-right: 15rpx;padding-top: 5rpx;padding-bottom: 5rpx;color: #4c576d;font-size: 22rpx;">{{data.environmentType}}</text>
</view>
-->
<view
style="display: flex;flex-direction: row;box-sizing: border-box;margin-top: 30rpx;margin-left: 20rpx;margin-right: 20rpx;">
<text style="font-size: 24rpx;color: #FF5722;">营业时间</text>
<text style="font-size: 24rpx;color: #FF5722;">{{data.shopTime}}</text>
</view>
<view class="nav-bar">
<image class="bar-left-img" src="../../static/area_dizhi.png" mode="aspectFit"></image>
<text class="bar-text">{{data.address}}</text>
</view>
<view class="line"></view>
<text class="bar-text">球馆简介</text>
<view class="short">
<rich-text :nodes="getShort()" class="short"></rich-text>
</view>
<!-- <uni-popup ref="popupBrowser" type="top">
<uni-pop-browser></uni-pop-browser>
/uni-popup>
#ifdef H5
<view>
<drag-button :isDock="true" :existTabBar="true" @btnClick="btnClick" />
</view>
#endif
<uni-popup ref="popup" type="share">
<uni-popup-share title="分享" @select="select"></uni-popup-share>
</uni-popup> -->
</RefreshView>
</template>
<script>
export default {
data() {
return {
page: {
sid: '',
title: '球馆详情',
lat: -1,
lon: -1,
distance: ""
},
data: {}
}
},
created() {
let _this = this
// 获取定位
uni.getLocation({
type: 'gcj02',
success: function(res) {
let locat = res
_this.page.lat = locat.latitude
_this.page.lon = locat.longitude
if (_this.page.distance == "") {
// if (_this.data.point != undefined) {
// let split = _this.data.point.split(",")
// // 计算距离
// _this.page.distance = "距您" + _this.getDistance(_this.page.lat, _this.page.lon,
// split[1], split[0])
// console.log(_this.page.distance)
// }
// 计算距离
_this.page.distance = "距您" + _this.getDistance(_this.page.lat, _this.page.lon,
_this.data.lat, _this.data.lng)
console.log(_this.page.distance)
}
_this.refresh()
},
fail(err) {
console.log(err)
}
});
},
onLoad(options) {
this.page.sid = options.sid
},
methods: {
refresh() {
let _this = this;
this.HTTP({
url: 'gms/v1/gymnasiumsManagement/getGymnasiumDetails/'+_this.page.sid,
paramsType: "FORM",
method: "GET",
loading: true
}).then((res) => {
this.data = res.data
// 成功关闭刷新状态
_this.$refs.mescrollRef.refreshFinished()
console.log("1》》》", _this.page.distance)
if (_this.page.distance == "") {
console.log("2》》》》", _this.page.lat)
if (_this.page.lat != -1) {
console.log("point》》》》",_this.data.point)
// let split = _this.data.point.split(",")
// // 计算距离
// _this.page.distance = "距您" + _this.getDistance(_this.page.lat, _this.page.lon, split[
// 1], split[0])
// console.log("3》》》》", _this.page.distance)
// 计算距离
_this.page.distance = "距您" + _this.getDistance(_this.page.lat, _this.page.lon,
_this.data.lat, _this.data.lng)
console.log(_this.page.distance)
}
}
}, (err) => {
// 关闭刷新状态
_this.$refs.mescrollRef.refreshFinished()
})
},
call() {
uni.makePhoneCall({
phoneNumber: this.data.linkerPhone,
success(res) {
console.log(res)
},
fail(err) {
console.log(err)
}
})
},
getShort() {
if (this.IsEmpty(this.data.summary)) {
return "球馆管理员未录入简介"
} else {
return this.data.summary
}
},
daoHang() {
},
},
}
</script>
<style lang="scss">
.short {
margin-left: 40rpx;
margin-right: 40rpx;
}
.bar-text {
font-size: 32rpx;
height: 100%;
line-height: 92rpx;
padding-left: 28rpx;
}
.name {
font-size: 33rpx;
border-radius: 15rpx;
color: #FFFFFF;
z-index: 9000;
top: --window-top;
margin-top: 300rpx;
padding: 10rpx 15rpx;
position: absolute;
left: 20rpx;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 1;
-webkit-box-orient: vertical;
line-height: 50rpx;
}
.area {
font-size: 28rpx;
border-radius: 15rpx;
color: #FFFFFF;
z-index: 9000;
top: --window-top;
margin-top: 350rpx;
padding: 10rpx 15rpx;
position: absolute;
left: 20rpx;
}
.address {
font-size: 25rpx;
border-radius: 15rpx;
color: #FFFFFF;
z-index: 9000;
top: --window-top;
margin-top: 390rpx;
padding: 10rpx 15rpx;
position: absolute;
left: 20rpx;
}
.type {
font-size: 28rpx;
border-radius: 15rpx;
color: #2C405A;
font-weight: bold;
z-index: 9000;
top: --window-top;
margin-top: 410rpx;
padding: 10rpx 15rpx;
position: absolute;
right: 20rpx;
width: 70rpx;
height: 70rpx;
}
.banner {
height: 450rpx;
width: 100%;
box-sizing: border-box;
.swiper {
height: 100%;
width: 100%;
.swiper-item {
height: 100%;
width: 100%;
.banner-image {
width: 100%;
height: 100%;
border-bottom-left-radius: 20rpx;
border-bottom-right-radius: 20rpx;
}
}
}
}
.nav-bar {
min-height: 92rpx;
width: 100%;
display: flex;
margin-top: 30rpx;
box-sizing: border-box;
flex-direction: row;
align-items: center;
margin-bottom: 30rpx;
margin-right: 35rpx;
.bar-left-img {
width: 60rpx;
height: 60rpx;
margin-left: 20rpx;
box-sizing: border-box;
}
.bar-text {
font-size: 28rpx;
flex: 1;
box-sizing: border-box;
line-height: 40rpx;
}
.bar-img {
width: 90rpx;
height: 92rpx;
padding-right: 28rpx;
}
}
.line {
width: 100%;
height: 18rpx;
background-color: #f5f4f9;
}
</style>

View File

@@ -0,0 +1,136 @@
<template>
<view>
<RefreshView ref="mescrollRef" @refresh="refresh" :hasBack="true" text="报名列表">
<view v-for="(item,index) in data.list" :key='index' class="list-item-layout">
<image :src="item.headImage" class="list-item-img" mode="aspectFill">
</image>
<view class="list-item-right">
<view class="list-item-name">{{item.realName}}</view>
<view class="list-item-content">报名时间{{item.timeStr}}</view>
</view>
</view>
</RefreshView>
</view>
</template>
<script>
// 必须
import MescrollMixin from "@/components/mescroll-uni/mescroll-mixins.js";
export default {
// 使用mixin (在main.js注册全局组件) 必须
mixins: [MescrollMixin],
data() {
return {
page: {
activitySid: '',
activityItemSid: '',
},
data: {
list: []
}
}
},
onLoad(options) {
// 赋值
this.page.activitySid = options.activitySid
this.page.activityItemSid = options.activityItemSid
},
methods: {
refresh(page) {
let _this = this;
this.HTTP({
url: 'aos/v1/participantRelation/getPageListPersonalParticipant',
paramsType: "JSON",
method: "POST",
data: {
current: page.num,
size: 10,
params: {
activitySid: this.page.activitySid,
activityItemSid: this.page.activityItemSid ,
}
},
loading: true
}).then((res) => {
// 成功关闭刷新状态
_this.$refs.mescrollRef.refreshFinished(res.data.records.length)
if (page.num == 1) {
// 第一页 先清空集合数据
_this.data.list = []
}
// 追加数据
_this.data.list = _this.data.list.concat(res.data.records)
}).catch(function(err) {
console.log("11111");
_this.$refs.mescrollRef.refreshError()
})
},
}
}
</script>
<style lang="scss">
.list-item-layout {
display: flex;
width: 100%;
flex-direction: row;
box-sizing: border-box;
padding-top: 20rpx;
padding-bottom: 10rpx;
margin-left: 33rpx;
margin-right: 33rpx;
border-bottom: 0.1px #F1F1F1 solid;
.list-item-img {
width: 140rpx;
height: 140rpx;
margin-right: 25rpx;
flex-shrink: 0;
}
.list-item-right {
flex: 1;
margin-top: 20rpx;
display: flex;
flex-direction: column;
height: 140rpx;
.list-item-name {
width: 100%;
flex: 1;
color: #333333;
font-size: 27rpx;
}
.list-item-content {
width: 100%;
flex: 1;
color: #999999;
font-size: 24rpx;
}
.list-item-time {
width: 100%;
color: #999999;
font-size: 24rpx;
flex: 1;
}
}
}
</style>

146
pages/index/BindPhone.vue Normal file
View File

@@ -0,0 +1,146 @@
<template>
<view>
<RefreshView ref="mescrollRef" :hasBack="true" text="绑定手机号" :useDownScroll="false" :useUpScroll="false">
<view style="margin-top: 30rpx;">
<view class="inputRow">
<image src="../../static/img/login/username.png" mode="aspectFill" class="drawableLeft"></image>
<input type="number" maxlength="11" @input="phoneText" placeholder="请输入手机号" class="input" />
<SendCodeItem :phoneNum="page.phone" url="aos/v1/aosUser/sendCodeFromWxBindMobile" @click="send" ref="wxCodeItem"></SendCodeItem>
</view>
</view>
<view class="inputRow">
<image src="../../static/img/login/code.png" mode="aspectFill" class="drawableLeft"></image>
<input type="number" @input="codeText" maxlength="6" placeholder="请输入验证码" class="input" />
</view>
<view class="btn" @click="next">
<text class="btnText">绑定手机</text>
</view>
</RefreshView>
</view>
</template>
<script>
export default {
data() {
return {
page: {
phone: '',
sysUserWxAuthSid: '',
code: ''
}
};
},
onLoad(options) {
this.page.sysUserWxAuthSid = options.sysUserWxAuthSid
console.log('=======', options)
console.log('=======', options.sysUserWxAuthSid)
},
methods: {
next() {
var phoneLength = this.page.phone.length;
var codeLength = this.page.code.length;
if (phoneLength == 0) {
this.Toast("请输入手机号")
return;
}
if (codeLength == 0) {
this.Toast("验证码不能为空")
return;
}
let _this = this
this.HTTP({
url: 'aos/v1/aosUser/wxBindMobile',
data: {
mobile: this.page.phone,
sysUserWxAuthSid: this.page.sysUserWxAuthSid,
code: this.page.code
},
method: 'POST',
paramsType: "JSON",
loading: true
}).then((res) => {
console.log('=======', res)
if (res.code == 200) {
// 保存
_this.WritePreference("sysUserSid", res.data)
_this.WritePreference("isLogin", true)
getApp().globalData.isLogin = true
getApp().globalData.sysUserSid = res.data
console.log('=======1111111111111111111111111111111sdfasdf;kjasdfjkasdklfkasdjf;asdddddddddddddd',res)
// $emit 触发事件 主要返回给webviwew页面
// uni.$emit('login', res.data.memberSid)
uni.navigateBack({
delta: 10
});
}
});
},
phoneText(e) {
//手机号
this.page.phone = e.detail.value;
},
send(e) { //发送验证码
console.log(e);
},
codeText(e) {
//验证码
this.page.code = e.detail.value;
}
}
};
</script>
<style lang="scss">
.inputRow {
display: flex;
margin-left: 30rpx;
margin-right: 30rpx;
margin-bottom: 10rpx;
margin-top: 10rpx;
padding-bottom: 10rpx;
border-bottom: 0.1px #F1F1F1 solid;
align-items: center;
.input {
margin-left: 20rpx;
height: 70rpx;
flex: 1;
font-size: 32rpx;
}
.drawableLeft {
width: 40rpx;
height: 40rpx;
margin: 20rpx;
}
}
.btn {
display: flex;
width: 90%;
height: 80rpx;
flex-direction: column;
background-color: $uni-base-color;
margin-top: 80rpx;
margin-left: auto;
margin-right: auto;
align-items: center;
justify-content: center;
border-radius: 10rpx;
.btnText {
color: #ffffff;
font-size: 33rpx;
}
}
</style>

View File

@@ -0,0 +1,394 @@
<template>
<RefreshView ref="mescrollRef" :hasBack="true" :text="data.name" :useDownScroll="false" :useUpScroll="false"
useTitleRightBtn="0">
<view class="banner">
<swiper class="swiper" indicator-dots="true" autoplay="true">
<swiper-item class="swiper-item" v-for="(item,index) in data.listCoverImage" :key="index">
<image style="width: 100%;height: 450rpx;" :src="item" mode="aspectFill"></image>
</swiper-item>
</swiper>
</view>
<view style="display: flex;flex-direction: column;background: #FFFFFF; width: 100%;height: 100%;">
<!-- <view
style="display: flex;flex-direction: column;background: #FFFFFF;
margin-top: 20rpx;margin-left: 30rpx;margin-right: 30rpx; border: 2rpx solid #666666; border-radius: 30rpx;padding: 20px;">
-->
<view>
<view style="display: flex; flex-direction: row; margin-left: 20rpx;margin-top: 20rpx;">
<text
style="color: #101010; font-size: 36rpx;font-weight: 520; white-space: nowrap;overflow: hidden;text-overflow: ellipsis">{{data.name}}</text>
<text
style=" word-break:keep-all;
white-space:nowrap;display: flex;align-items: center; margin-left: 30rpx; color: #fff; font-size: 20rpx; background-color: #F2BF5C; padding: 3rpx 15rpx;border-radius: 5rpx;">{{data.sportCategoryName}}</text>
</view>
</view>
<view style="background-color: #F1F1F1; height: 5rpx; width: 100%; margin-top: 20rpx;"></view>
<view
style="display: flex;flex-direction: row;margin-top: 15rpx;align-items: center;margin-left: 20rpx;margin-right: 30rpx;">
<text style="font-size: 30rpx;color: #080808;">报名截止</text>
<text style="color: #666666;font-size: 26rpx;">{{data.enrollEndTime}}</text>
<text style="color: #E99D42;font-size: 26rpx;flex: 1;text-align: right;">还有1天</text>
</view>
<view style="background-color: #F1F1F1; height: 5rpx; width: 100%; margin-top: 20rpx;"></view>
<view style="display: flex;flex-direction: row;margin-top: 15rpx;margin-left: 20rpx;margin-right: 30rpx;">
<text style="font-size: 30rpx;color: #080808;">整体活动</text>
<view style="display: flex;flex-direction: column;">
<text style="color: #666666; font-size: 26rpx;">{{data.startTime}}</text>
<text style="color: #666666;margin-top: 20rpx;font-size: 26rpx;">{{data.endTime}}</text>
</view>
</view>
<view style="">
<view v-for="(item,index) in data.listActivityItemsDetails " :key="index" style="margin-top: 20rpx;">
<view
style="display: flex;flex-direction: row;margin-top: 20rpx;background-color: #F1F1F1;padding: 20rpx 30rpx;">
<text style="font-size: 30rpx;flex: 1;">{{item.name}}</text>
<view style="display: flex;flex-direction: row;">
<text style="font-size: 25rpx; color: #E99D42; ">{{item.enrollMoldName}}</text>
<text
style="color: #E99D42; margin-left: 10rpx;margin-right: 10rpx; font-size: 25rpx;">/</text>
<text
style="color: #E99D42; font-size: 25rpx;">{{item.enrollMoney==0?"免费":item.enrollMoney+'元'}}</text>
</view>
</view>
<view
style="display: flex;flex-direction: column;margin-top: 20rpx;margin-left: 30rpx;margin-right: 30rpx;">
<text style="color: #666666; margin-top: 15rpx;font-size: 28rpx;">{{item.introduction}}</text>
</view>
<view style="background-color: #F1F1F1; height: 5rpx; width: 100%;margin-top: 15rpx; ">
</view>
<!-- <view
style="display: flex;margin-top: 20rpx;margin-left: 30rpx;margin-right: 30rpx;align-items: center;">
<text style="font-size: 30rpx;">活动时间</text>
<text
style="color: #666666; font-size: 25rpx;flex: 1;">{{item.startTime+" 至 "+item.endTime}}</text>
</view>
-->
<view
style="display: flex;flex-direction: row;margin-top: 20rpx;margin-left: 30rpx;margin-right: 30rpx;align-items: center;">
<view style="display: flex;flex-direction: row;align-items: center;flex: 1;">
<text style="font-size: 30rpx;color: #E3A428 ;">{{item.startTime}}</text>
<text
style="color: #666666; font-size: 30rpx;text-align: right;flex: 1;">{{item.gymnasiumName}}</text>
</view>
<image v-if="!showAddress(item.gymnasiumSid)" style="width: 30rpx;height: 30rpx;"
src="../../static/home-icon/more.png" @click="gymnasiumName(item.gymnasiumSid)">
</image>
</view>
<view style="background-color: #F1F1F1; height: 5rpx; width: 100%;margin-top: 15rpx; "></view>
<view
style="display: flex;flex-direction: row;margin-top: 20rpx;margin-left: 30rpx;margin-right: 30rpx;align-items: center;">
<view style="display: flex;flex-direction: row;align-items: center;flex: 1;">
<text style="font-size: 30rpx;">报名数</text>
<text
style="color: #919191 ; font-size: 25rpx; margin-left: 20rpx;">{{item.enrollNumbers==0?"暂无":item.enrollNumbersLimit+'人'}}</text>
<text
style="color: #919191 ; font-size: 25rpx;margin-left: 10rpx;margin-right: 10rpx;">/</text>
<text
style="color: #919191 ; font-size: 25rpx;">{{item.enrollNumbersLimit==0?"不限":item.enrollNumbersLimit+'人'}}</text>
</view>
<view v-if="item.listUserHeadImageUrl.length>0" style="display: flex;flex-direction: row; "
@click="userList(item.sid)">
<view v-for="(url,i) in item.listUserHeadImageUrl " :key="i">
<view
style="display: flex; width: 100%; margin-left: 5rpx; margin-right: 5rpx;justify-content: center;">
<image style="border-radius: 50%; width: 50rpx;height: 50rpx;" :src="url"
mode="aspectFit"></image>
</view>
</view>
</view>
<image style="width: 30rpx;height: 30rpx;" src="../../static/home-icon/more.png"
@click="userList(item.sid)">
</image>
</view>
</view>
</view>
<view style="margin-top: 20rpx;background-color: #F1F1F1;height: 20rpx;">
</view>
<view style="display: flex;flex-direction: row;margin: 20rpx 30rpx 0rpx 30rpx; align-items: center;">
<text style="font-size: 30rpx;">活动介绍</text>
<view style="background-color: #F1F1F1; height: 10rpx; flex: 1;margin-left: 20rpx; "></view>
</view>
<text style="margin: 30rpx; color: #999999;font-size: 28rpx; ">{{data.introduction}}</text>
<view style="display: flex;flex-direction: row;margin: 20rpx 30rpx 0rpx 30rpx; align-items: center;">
<text style="font-size: 30rpx;">奖品奖项</text>
<view style="background-color: #F1F1F1; height: 10rpx; flex: 1;margin-left: 20rpx; "></view>
</view>
<text style="margin: 30rpx; color: #999999;font-size: 28rpx; ">{{data.notes}}</text>
<!--
<textarea style="margin: 30rpx; color: #999999 ; font-size: 25rpx;white-space: pre-wrap; "
read-only="readOnly" disabled="disabled " placeholder="无" v-model="data.notes" /> -->
<view style="display: flex;flex-direction: row;margin: 10rpx 30rpx 0rpx 30rpx; align-items: center;">
<text style="font-size: 30rpx;">特别鸣谢</text>
<view style="background-color: #F1F1F1; height: 10rpx; flex: 1;margin-left: 20rpx; "></view>
</view>
<view
style="display: flex;margin-left: 40rpx;margin-right: 40rpx;flex-direction: column; margin-top: 30rpx;">
<view v-for="(item,pos) in data.listSpecialThanks " :key="pos">
<view
style="display: flex; width: 100%; padding-top: 10rpx;padding-bottom: 10rpx;justify-content: center;">
<text style="color: #898989;font: size 28rpx;flex: 1;">{{item.name}}</text>
</view>
</view>
</view>
<view style="background-color: #F1F1F1; height: 5rpx; width: 100%;margin-top: 20rpx; "></view>
<view
style="display: flex;flex-direction: row;margin-top: 20rpx;margin-left: 30rpx; margin-right: 30rpx; align-items: center;">
<text style="color: #898989; font-size: 28rpx;">主办方</text>
<text style="color: #898989;font-size: 25rpx;">{{data.organizer}}</text>
</view>
<view style="background-color: #F1F1F1; height: 5rpx; width: 100%; margin-top: 20rpx;"></view>
<view
style="display: flex;flex-direction: row;margin-top: 20rpx;margin-left: 30rpx; margin-right: 30rpx; align-items: center;">
<text style="color: #898989;font-size: 28rpx;">联系人</text>
<view style="display: flex;flex-direction: row;">
<text style="color: #898989;font-size: 25rpx;">{{data.linkerName}}</text>
<view style="width: 30rpx;"></view>
<text style="color: #898989; font-size: 25rpx;">{{data.linkerPhone}}</text>
</view>
</view>
<view style="background-color: #F1F1F1; height: 5rpx; width: 100%; margin-top: 20rpx;"></view>
<view class="agreeMent">
<checkbox-group @change="checkboxChange">
<checkbox style="transform:scale(0.7)" :checked="checked1"></checkbox>
</checkbox-group>
<text class="text2">我已阅读并同意</text>
<text style="color: #007AFF;">参赛须知</text>
<text style="display: flex;text-align: center; margin-left: 20rpx; padding: 5rpx 10rpx;background: #0081D5;
color: #FFFFFF; font-size: 28rpx;" @click="click()"> 我要报名 </text>
</view>
</view>
</view>
<view style="height: 300rpx;"></view>
</RefreshView>
</template>
<script>
export default {
data() {
return {
checked1: true,
data: {
},
raceSid: ""
}
},
onLoad: function(option) {
this.raceSid = option.raceSid;
this.HTTP({
url: 'aos/v1/activityManagement/getActivityDetails/' + this.raceSid,
method: 'GET',
paramsType: "FORM",
loading: true
}).then((res) => {
if (200 == res.code) {
this.data = res.data
} else {
this.Toast(res.msg)
uni.navigateBack({
delta: 1
})
}
});
},
methods: {
showAddress(s) {
console.log("..." + s);
return this.IsEmpty(s)
},
checkboxChange(e) {
this.checked1 = !this.checked1
console.log(this.checked1)
},
gymnasiumName(e) {
uni.navigateTo({
url: "ArenaDetailActivity?sid=" + e
})
console.log("gymnasiumName>>", e)
},
userList(sid) {
console.log("zazzz>>", this.data.sid)
console.log("userList>>", sid)
uni.navigateTo({
url: "BaoMingListActivity?activitySid=" + this.data.sid + "&activityItemSid=" + sid
})
},
click() {
let _this = this;
if (!this.checked1) {
this.Toast("请认真阅读参赛须知,并勾选。")
return
}
// if (this.data.listActivityItemsDetails.length == 1) {
// let evendSid = this.data.sid
// let eventsSubprojectSid = this.data.listActivityItemsDetails[0].sid
// this.HTTP({
// url: 'aos/events/v1/eventsenroll/save',
// method: 'POST',
// data: {
// 'eventsSid': evendSid,
// 'eventsSubprojectSid': eventsSubprojectSid,
// 'participantSid': getApp().globalData.memberSid,
// 'paymentMemberSid': "",
// },
// paramsType: "JSON",
// loading: true
// }).then((res) => {
// if (res.code == 200) {
// this.Toast("报名成功!")
// // 返回的页面数,如果 delta 大于现有页面数,则返回到首页。
// uni.navigateBack({
// delta: 10
// });
// } else {
// this.Toast(res.msg)
// }
// }, (err) => {
// // 错误提示
// _this.Toast("出错了:" + err.data.errmsg)
// });
// } else {
console.log("===========" + this.data.listActivityItemsDetails.length)
let list = this.data.listActivityItemsDetails
let newList = []
for (var i = 0; i < list.length; i++) {
newList.push(list[i].name)
}
uni.showActionSheet({
itemList: newList,
success: function(res) {
console.log("itemList==" + newList)
console.log("res==" + JSON.stringify(res))
_this.listSelect(res.tapIndex, newList)
},
fail(e) {
console.log("reeees==" + JSON.stringify(e))
}
});
// }
},
listSelect(id, info) {
console.log(id)
console.log(info)
let _this = this
let evendSid = this.data.sid
let eventsSubprojectSid = this.data.listActivityItemsDetails[id].sid
console.log(eventsSubprojectSid)
this.Login()
.then((res) => {
this.HTTP({
url: 'aos/v1/activityItemManagement/enroll',
method: 'POST',
data: {
'activitySid': evendSid,
'activityItemsSid': eventsSubprojectSid,
'participantSid': res,
'paymentMemberSid': "",
},
paramsType: "JSON",
loading: true
}).then((res) => {
if (res.code == 200) {
this.Toast("报名成功!")
// 返回的页面数,如果 delta 大于现有页面数,则返回到首页。
uni.navigateBack({
delta: 10
});
} else {
this.Toast(res.msg)
}
}, (err) => {
// 错误提示
_this.Toast("出错了:" + err.data.errmsg)
})
})
},
}
}
</script>
<style lang="scss">
.items {
display: flex;
flex-direction: column;
}
.agreeMent {
display: flex;
flex-direction: row;
align-items: center;
margin-top: 50rpx;
margin-left: 30rpx;
.text2 {
color: #666666;
font-size: 30rpx;
}
}
.banner {
height: 450rpx;
width: 100%;
box-sizing: border-box;
.swiper {
height: 100%;
width: 100%;
.swiper-item {
height: 100%;
width: 100%;
.banner-image {
width: 100%;
height: 100%;
border-bottom-left-radius: 20rpx;
border-bottom-right-radius: 20rpx;
}
}
}
}
</style>

View File

@@ -0,0 +1,470 @@
<template>
<TabLayout ref='tabLayout' text="选择球馆" :tabTitleData="page.tabTitle" @tabClickItem='clickTab' @downRefresh="down">
<swiper style="min-height: 100vh;" :current="page.currentTab" @change="swiperTab">
<swiper-item v-for="(listItem,listIndex) in data.tabList" :key="listIndex" style="box-sizing: border-box;">
<scroll-view style="height: 100%;" scroll-y="true" @scrolltolower="lower1">
<view :style="{'width': '100%','padding-top': page.paddingTop}">
<loading v-if="page.showLoading[listIndex]" :key='listIndex'></loading>
<view class="outer" v-for="(item,index) in listItem">
<view class="Item">
<image class="Img" :src="item.logo" mode="aspectFill" @click="img(item.sid)"></image>
<view class="Right" @click="right(item.sid,item.name)">
<text class="gameTv">{{item.name}}</text>
<text class="gameTv2">{{item.address}}</text>
<!-- <text class="gameTv2">{{item.linkerName+" "+item.linkerPhone}}</text> -->
</view>
</view>
</view>
<loading v-if="page.showBottomLoading[listIndex]" :key="'bottom'+listIndex"></loading>
<noData v-if="page.showNoData[listIndex]" :key="'nodata'+listIndex"></noData>
</view>
</scroll-view>
</swiper-item>
</swiper>
</TabLayout>
</template>
<script>
const util = require('../../util/util.js');
export default {
data() {
return {
page: {
tabTitle: ['常驻球馆', '所有球馆'],
tabType: ["gms/v1/userGymnasiumsManagement/getUserGymnasiumList",
"gms/v1/gymnasiumsManagement/getGymnasiumAreaVoPagerList"
],
currentTab: 0,
pages: [1, 1], //第几个swiper的第几页
nowLoadingPages: [false, false], //是否正在加载
paddingTop: '0px',
showLoading: [false, false],
showBottomLoading: [false, false],
showNoData: [false, false],
city: "石家庄",
code: "1301"
},
data: {
tabList: [
[],
[],
[],
[]
]
},
info: {
address: "",
placeName: ''
}
};
},
onLoad(options) {
let find_city_code = this.ReadPreference("find_city_code")
let find_city = this.ReadPreference("find_city")
let _this = this
this.$nextTick()
.then(function() {
_this.page.paddingTop = _this.$refs.tabLayout.getViewPagerTop()
})
if (this.IsEmpty(find_city_code)) {
// 首次进入
find_city_code = 0;
// 获取定位
let _this = this;
// 获取定位
uni.getLocation({
type: 'gcj02',
success: function(res) {
let locat = res
// 先写入定位
_this.location = {
latitude: locat.latitude,
longitude: locat.longitude
}
let url =
"https://restapi.amap.com/v3/geocode/regeo?key=b564c757b4cf4fd4a5d914625ca9373f&location=" +
res.longitude +
"," + res.latitude +
"&poitype=&radius=1000&extensions=all&batch=false&roadlevel=0";
_this.HttpOtherUrl({
url: url
}).then((res) => {
let json = JSON.stringify(res);
let info = JSON.parse(json).regeocode.addressComponent;
// 城市
let city = info.city;
// 城市编码
let code = info.adcode;
// 获取到正确的城市编码
if (code > 0) {
// 保存本次定位
_this.WritePreference("find_city", city)
_this.WritePreference("find_city_code", code)
_this.page.code = code
_this.page.city = city
_this.page.tabTitle[1] = "所有球馆(" + _this.page.city + ")"
} else {
// 未获取到正确的城市编码
_this.WritePreference("find_city", "石家庄")
_this.WritePreference("find_city_code", "1301")
_this.page.code = "1301"
_this.page.city = "石家庄"
_this.page.tabTitle[1] = "所有球馆(" + _this.page.city + ")"
}
}, (err) => {
//获取当前城市失败
_this.WritePreference("find_city", "石家庄")
_this.WritePreference("find_city_code", "1301")
_this.page.code = "1301"
_this.page.city = "石家庄"
_this.page.tabTitle[1] = "所有球馆(" + _this.page.city + ")"
})
},
fail(err) {
// 定位失败
_this.WritePreference("find_city", "石家庄")
_this.WritePreference("find_city_code", "1301")
_this.page.code = "1301"
_this.page.city = "石家庄"
_this.page.tabTitle[1] = "所有球馆(" + _this.page.city + ")"
}
});
} else {
this.page.code = find_city_code
this.page.city = find_city
this.page.tabTitle[1] = "所有球馆(" + this.page.city + ")"
}
// 加载第一页数据
this.down(0)
},
methods: {
img(sid) {
uni.navigateTo({
url: 'ArenaDetailActivity?sid=' + sid
})
},
right(sid, name) {
this.info.sid = sid
this.info.name = name
console.log("传值>" + JSON.stringify(this.info))
this.SetResult(this.info)
},
// swiper 滑动
swiperTab: function(e) {
// 模拟tab点击
this.$refs.tabLayout.changeTab(e);
},
clickTab(index) {
this.page.currentTab = index
// 每次切换时都重新加载页面
this.down(index)
},
down(index) {
// 下拉刷新请求 并更改数据
let _this = this
this.data.tabList[index] = []
//二维数组,开启强制渲染
_this.$forceUpdate()
// 初始化当前的页数
this.page.pages[index] = 1
// 当前页数的加载状态
this.page.nowLoadingPages[index] = true
// 只要切换页面就显示
this.page.showLoading[index] = true
this.page.showNoData[index] = false
if (index == 0) {
this.Login()
.then((res) => {
let path = index == 0 ? "/" + getApp().globalData.memberSid : "";
this.HTTP({
url: _this.page.tabType[index] + path,
method: index == 0 ? 'GET' : 'POST',
paramsType: index == 0 ? 'FORM' : "JSON",
data: index == 0 ? {} : {
"current": 1,
"size": 10,
"params": {
"memberSid": getApp().globalData.memberSid,
"regionId": _this.page.code
}
}
}).then((res) => {
// 当前页数的加载状态
_this.page.nowLoadingPages[index] = false
// 填充数据
_this.data.tabList[index] = res.data
_this.$refs.tabLayout.downRefresh()
//二维数组,开启强制渲染
_this.$forceUpdate()
// 关闭loading
_this.page.showLoading[index] = false
_this.page.showNoData[index] = res.data.length == 0
}, (err) => {
// 当前页数的加载状态
_this.page.nowLoadingPages[index] = false
_this.$refs.tabLayout.downRefresh()
//二维数组,开启强制渲染
_this.$forceUpdate()
// 关闭loading
_this.page.showLoading[index] = false
_this.page.showNoData[index] = false
})
})
}else{
let path = index == 0 ? "/" + getApp().globalData.memberSid : "";
this.HTTP({
url: _this.page.tabType[index] + path,
method: index == 0 ? 'GET' : 'POST',
paramsType: index == 0 ? 'FORM' : "JSON",
data: index == 0 ? {} : {
"current": 1,
"size": 10,
"params": {
"memberSid": getApp().globalData.memberSid,
"regionId": _this.page.code
}
}
}).then((res) => {
// 当前页数的加载状态
_this.page.nowLoadingPages[index] = false
// 填充数据
_this.data.tabList[index] = res.data.records
_this.$refs.tabLayout.downRefresh()
//二维数组,开启强制渲染
_this.$forceUpdate()
// 关闭loading
_this.page.showLoading[index] = false
_this.page.showNoData[index] = res.data.records.length == 0
}, (err) => {
// 当前页数的加载状态
_this.page.nowLoadingPages[index] = false
_this.$refs.tabLayout.downRefresh()
//二维数组,开启强制渲染
_this.$forceUpdate()
// 关闭loading
_this.page.showLoading[index] = false
_this.page.showNoData[index] = false
})
}
},
request(index, pagerStart) {
let _this = this
let path = index == 0 ? "/" + getApp().globalData.memberSid : "";
this.HTTP({
url: _this.page.tabType[index] + path,
method: index == 0 ? 'GET' : 'POST',
paramsType: index == 0 ? 'FORM' : "JSON",
data: index == 0 ? {} : {
"current": pagerStart,
"size": 10,
"params": {
"memberSid": getApp().globalData.memberSid,
"regionId": _this.page.code
}
}
}).then((res) => {
// 重置加载状态
_this.page.nowLoadingPages[index] = false
_this.$refs.tabLayout.downRefresh()
_this.page.showBottomLoading[this.page.currentTab] = false
if (res.data.records.length == 0) {
_this.Toast('没有更多数据了')
//二维数组,开启强制渲染
_this.$forceUpdate()
return
}
_this.data.tabList[index] = _this.data.tabList[index].concat(res.data.records)
//二维数组,开启强制渲染
_this.$forceUpdate()
}, (err) => {
// 重置加载状态
_this.page.nowLoadingPages[index] = false
_this.$refs.tabLayout.downRefresh()
//二维数组,开启强制渲染
_this.$forceUpdate()
})
},
// 加载更多 util.throttle为防抖函数
lower1: util.throttle(function(e) {
if (this.page.nowLoadingPages[this.page.currentTab]) {
// 正在加载 拦截请求
return
}
this.page.showBottomLoading[this.page.currentTab] = true
//二维数组,开启强制渲染
this.$forceUpdate()
// 更改请求的页数
this.page.pages[this.page.currentTab]++
// 正在加载
this.page.nowLoadingPages[this.page.currentTab] = true
// 请求数据
this.request(this.page.currentTab, this.page.pages[this.page.currentTab])
}, 300)
}
}
</script>
<style lang="scss">
.header {
display: flex;
flex-direction: row;
justify-content: space-between;
margin-left: 30rpx;
margin-right: 30rpx;
margin-top: 25rpx;
padding-bottom: 20rpx;
.textLogin {
background-color: #E91E63;
border-radius: 30rpx;
padding-left: 25rpx;
padding-right: 25rpx;
padding-top: 7rpx;
padding-bottom: 7rpx;
color: #FFFFFF;
font-size: 24rpx;
}
}
.textGray3 {
color: #999999;
font-size: 26rpx;
margin-top: 5rpx;
display: block;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.outer {
width: 100%;
display: flex;
flex-direction: column;
padding: 22rpx 38rpx;
box-sizing: border-box;
border-bottom: 0.1px #F1F1F1 solid;
.title {
padding-bottom: 22rpx;
flex: 1;
font-size: 28rpx;
color: #007AFF;
overflow: hidden;
box-orient: vertical;
text-overflow: ellipsis;
}
.Item {
display: flex;
flex-direction: row;
width: 100%;
height: 144rpx;
box-sizing: border-box;
.Img {
height: 100%;
width: 220rpx;
margin-right: 15rpx;
flex-shrink: 0;
}
}
.Right {
height: 100%;
display: flex;
flex-direction: column;
flex: 1;
box-sizing: border-box;
.gameTv {
font-size: 30rpx;
color: #000000;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 1;
overflow: hidden;
}
.gameTv2 {
font-size: 25rpx;
margin-top: 10rpx;
color: #666666;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 3;
overflow: hidden;
}
}
}
</style>

View File

@@ -0,0 +1,128 @@
<template>
<RefreshView ref="mescrollRef" :hasBack="true" text="人数限制" :useDownScroll="false" :useUpScroll="false"
useTitleRightBtn="1" titleRightBtnSource="保存" @rightBtn='rightBtnClick'>
<view style="display: flex;flex-direction: column;margin-top: 50rpx;margin-left: 30rpx;margin-right: 30rpx;">
<text>人数限制</text>
<view style="display: flex;flex-direction: row;align-items: center;margin-top: 20rpx;">
<view style="border: 2px #F1F1F1 solid;display: flex; ">
<input class="right" type="number" @input="enrollNumbersLimitText" placeholder="请输入人数限制"
:value="result.enrollNumbersLimit"></input>
</view>
<text
style="display: flex;flex: 1; justify-content: flex-end; font-size: 30rpx;color: #FF0000;">0为不限制</text>
</view>
</view>
<view style="display: flex;flex-direction: column;margin-top: 50rpx;margin-left: 30rpx;margin-right: 30rpx;">
<text>报名费用</text>
<view style="display: flex;flex-direction: row;align-items: center;margin-top: 20rpx;">
<view style="border: 2px #F1F1F1 solid;display: flex; ">
<input class="right" type="digit" @input="enrollMoneyText" placeholder="请输入报名费用"
:value="result.enrollMoney"></input>
</view>
<text
style="display: flex;flex: 1; justify-content: flex-end; font-size: 30rpx;color: #FF0000;">0为免费</text>
</view>
</view>
<!-- <radio-group v-if="!this.IsEmpty(result.enrollMoney)" style="margin-top: 50rpx; display: flex;flex-direction: row; " @change="radioChange">
<radio style="display: flex;flex: 1;justify-content: center;" :checked="result.checked1">线上收费</radio>
<radio style="display: flex;flex: 1;justify-content: center;" :checked="result.checked2">线下收费</radio>
</radio-group>
-->
</RefreshView>
</template>
<script>
export default {
data() {
return {
result: {
enrollNumbersLimit: "0",
enrollMoney: "0",
// type: "",
// checked1: "",
// checked2: "",
},
}
},
onLoad(options) {
this.result.enrollNumbersLimit = options.enrollNumbersLimit
this.result.enrollMoney = options.enrollMoney
// this.result.type = options.type
// if ("线上收费" == this.result.type) {
// this.result.checked1 = true
// this.result.checked2 = false
// } else {
// this.result.checked1 = false
// this.result.checked2 = true
// }
console.log("1===" + this.result.index)
console.log("2===" + this.result.enrollNumbersLimit)
console.log("3===" + this.result.enrollMoney)
// console.log("4===" + this.result.type)
},
methods: {
enrollNumbersLimitText(e) {
console.log("1===" + e.detail.value)
this.result.enrollNumbersLimit = e.detail.value
},
enrollMoneyText(e) {
console.log("2===" + e.detail.value)
this.result.enrollMoney = e.detail.value
},
// radioChange(e) {
// this.result.checked1 = !this.result.checked1
// this.result.checked2 = !this.result.checked2
// console.log('radio发生change事件携带value值为', this.result.checked1)
// console.log('radio发生change事件携带value值为', this.result.checked2)
// if (this.result.checked1) {
// this.result.type = "线上收费"
// } else {
// this.result.type = "线下收费"
// }
// console.log('type===》:', this.result.type)
// },
rightBtnClick() {
if (this.IsEmpty(this.result.enrollNumbersLimit)) {
this.result.enrollNumbersLimit = 0
}
let o = parseInt(this.result.enrollNumbersLimit)
if (isNaN(o)) {
this.Toast("输入的格式有误")
return
}
if (this.IsEmpty(this.result.enrollMoney)) {
this.result.enrollMoney = 0
}
let s = parseInt(this.result.enrollMoney)
if (isNaN(s)) {
this.Toast("输入的格式有误")
return
}
this.SetResult(this.result)
}
}
}
</script>
<style lang="scss">
.right {
padding: 20rpx;
flex: 1;
color: #555555;
font-size: 30rpx;
}
</style>

View File

@@ -0,0 +1,127 @@
<template>
<view>
<RefreshView ref="mescrollRef" :hasBack="true" text="用户认证" :useDownScroll="false" :useUpScroll="false">
<view style="margin-top: 30rpx;">
<view class="inputRow">
<image src="../../static/login/username.png" mode="aspectFill" class="drawableLeft"></image>
<input type="number" maxlength="11" @input="phoneText" placeholder="请输入手机号" class="input" />
<SendCodeItem :phoneNum="page.phone" url="portal/v1/sysUserManagement/sendCodeFromAttestation" @click="send" ref="wxCodeItem"></SendCodeItem>
</view>
</view>
<view class="inputRow">
<image src="../../static/login/code.png" mode="aspectFill" class="drawableLeft"></image>
<input type="number" @input="codeText" maxlength="6" placeholder="请输入验证码" class="input" />
</view>
<view class="btn" @click="next">
<text class="btnText">验证</text>
</view>
</RefreshView>
</view>
</template>
<script>
export default {
data() {
return {
page: {
phone: '',
code: ''
}
};
},
methods: {
next() {
var phoneLength = this.page.phone.length;
var codeLength = this.page.code.length;
if (phoneLength == 0) {
this.Toast("请输入手机号")
return;
}
if (codeLength == 0) {
this.Toast("验证码不能为空")
return;
}
let _this = this
this.HTTP({
url: 'portal/v1/sysUserManagement/verifyCodeFromAttestation',
data: {
mobile: this.page.phone,
code: this.page.code
},
method: 'GET',
paramsType: "FORM",
loading: true
}).then((res) => {
uni.navigateTo({
url: '../info/RealInfo'
})
});
},
phoneText(e) {
//手机号
this.page.phone = e.detail.value;
},
send(e) { //发送验证码
console.log(e);
},
codeText(e) {
//验证码
this.page.code = e.detail.value;
}
}
};
</script>
<style lang="scss">
.inputRow {
display: flex;
margin-left: 30rpx;
margin-right: 30rpx;
margin-bottom: 10rpx;
margin-top: 10rpx;
padding-bottom: 10rpx;
border-bottom: 0.1px #F1F1F1 solid;
align-items: center;
.input {
margin-left: 20rpx;
height: 70rpx;
flex: 1;
font-size: 32rpx;
}
.drawableLeft {
width: 40rpx;
height: 40rpx;
margin: 20rpx;
}
}
.btn {
display: flex;
width: 90%;
height: 80rpx;
flex-direction: column;
background-color: $uni-base-color;
margin-top: 80rpx;
margin-left: auto;
margin-right: auto;
align-items: center;
justify-content: center;
border-radius: 10rpx;
.btnText {
color: #ffffff;
font-size: 33rpx;
}
}
</style>

1278
pages/index/activity.vue Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,194 @@
<template>
<view style="background: #F1F2F5;">
<RefreshView ref="mescrollRef" :pageBg="F1F2F5" @refresh="refresh" :hasBack="true" text="活动列表"
:useDownScroll="true" :useUpScroll="true">
<view>
<view v-for="(item,index) in list " :key="index">
<view
style="display: flex;flex-direction: column;margin-bottom: 30rpx; padding: 30rpx;background: #FFFFFF;"
@click="clickItem(index)">
<view style="display: flex;flex-direction: column;">
<view style="display: flex; flex-direction: row;">
<text style="color: #101010; font-size: 32rpx; display:-webkit-box;-webkit-line-clamp:1;
overflow:hidden;text-overflow:ellipsis;-webkit-box-orient:vertical;
word-break:break-all;flex: 1;">{{item.name}}</text>
<text
style="color: #fff; font-size: 24rpx; background-color: #F2BF5C; padding: 5rpx 10rpx;">{{item.sportCategoryName}}</text>
</view>
<text
style="color: #898989 ; font-size: 28rpx; margin-top: 10rpx;">报名截止{{item.enrollEndTime}}</text>
</view>
<view style="width: 100%;height: 300rpx; margin-top: 20rpx;margin-bottom: 20rpx;">
<image style="width: 100%;height: 100%; border-radius: 30rpx;" mode="aspectFill" :src="item.firstCoverImage"></image>
<view style="display: flex; height: 50rpx;width: 100%; margin-top: -80rpx; ">
<view style=" display: flex;align-items: center;width: 100%;">
<image style="width: 28px;height: 48rpx;margin-left: 30rpx;"
src="../../static/renqi.png"></image>
<text style="color: #fff; margin-left: 15rpx;flex: 1;">{{item.popularity}}</text>
<text
:class="{'btn1':item.enrollState ==1||item.enrollState ==3,'btn2':item.enrollState==2}"
style="display: flex;text-align: center; padding: 8rpx 15rpx;
color: #FFFFFF; font-size: 28rpx; margin-right:30rpx; border-radius: 10rpx;">{{item.enrollStateName}}</text>
</view>
</view>
</view>
<view v-for="(info,pos) in item.listActivityItemsArea " :key="pos">
<view style="display: flex;flex-direction: column;">
<view
style="display: flex;flex-direction: row; align-items: center; margin-top: 10rpx;">
<text style="color: #101010; font-size: 28rpx; flex: 1;">{{info.name}}</text>
<view style=" align-items: center;">
<text style="color: #ff0000 ; font-size: 24rpx;">{{info.enrollMoldName}}</text>
<text
style="color: #ff0000 ; font-size: 24rpx;margin-left: 10rpx;margin-right: 10rpx;">/</text>
<text
style="color: #ff0000 ; font-size: 24rpx;">{{info.enrollMoney==0?"免费":info.enrollMoney}}</text>
</view>
</view>
<view style="display: flex;flex-direction: row;margin-top: 5rpx;">
<view style="flex: 1; align-items: center;">
<text style="color: #919191; font-size: 24rpx;">报名数</text>
<text
style="color: #919191 ; font-size: 24rpx;">{{info.enrollNumbers==0?"暂无":info.enrollNumbersLimit+'人'}}</text>
<text
style="color: #919191 ; font-size: 24rpx;margin-left: 10rpx;margin-right: 10rpx;">/</text>
<text
style="color: #919191 ; font-size: 24rpx;">{{info.enrollNumbersLimit==0?"不限":info.enrollNumbersLimit+'人'}}</text>
</view>
<text
style="margin-top: 10rpx; color: #919191; font-size: 24rpx;">{{info.startTime}}</text>
</view>
<view v-if="item.listActivityItemsArea.length>pos+1"
style="width: 100%; height: 2rpx;background-color: #efefef; margin-top: 10rpx;">
</view>
</view>
</view>
</view>
</view>
</view>
</RefreshView>
</view>
</template>
<script>
// 必须
import MescrollMixin from "@/components/mescroll-uni/mescroll-mixins.js";
export default {
// 使用mixin (在main.js注册全局组件) 必须
mixins: [MescrollMixin],
data() {
return {
index: 0,
list: [],
}
},
methods: {
refresh(page) {
let _this = this
this.HTTP({
url: 'aos/v1/activityManagement/getActivityAreaPagerList',
paramsType: "JSON",
method: "POST",
data: {
current: page.num,
size: 10,
params: {
name: "",
userSid: getApp().globalData.memberSid,
}
},
loading: true
}).then((res) => {
// 成功关闭刷新状态
_this.$refs.mescrollRef.refreshFinished(res.data.records.length)
if (page.num == 1) {
// 第一页 先清空集合数据
_this.list = []
}
// 追加数据
_this.list = _this.list.concat(res.data.records)
}).catch(function(err) {
console.log("11111");
_this.$refs.mescrollRef.refreshError()
});
},
clickItem(index) {
let raceSid = this.list[index].sid
console.log(raceSid)
uni.navigateTo({
url: 'DetailActivity?raceSid=' + raceSid
});
},
}
}
</script>
<style lang="scss">
.top {
display: flex;
flex-direction: row;
height: 100rpx;
background: #FFFFFF;
opacity: 0.8;
align-items: center;
border-radius: 20rpx;
margin-top: 20rpx;
margin-left: 30rpx;
margin-right: 30rpx;
.unselected {
text-align: center;
font-size: 28rpx;
font-family: Adobe Heiti Std;
font-weight: normal;
color: #191919;
line-height: 40rpx;
}
.selected {
text-align: center;
font-size: 28rpx;
font-family: Adobe Heiti Std;
font-weight: normal;
color: #2CAB69;
line-height: 40rpx;
border-bottom: 2rpx #2CAB69 solid;
padding-bottom: 10rpx;
}
}
.btn1 {
background: #BBBBBB;
}
.btn2 {
background: #0081D5;
}
</style>

199
pages/index/addSponsor.vue Normal file
View File

@@ -0,0 +1,199 @@
<template>
<RefreshView ref="mescrollRef" :hasBack="true" text="新增赞助商" :useDownScroll="false" :useUpScroll="false"
@backClick="backClick" useTitleRightBtn="1" titleRightBtnSource="保存" @rightBtn='rightBtnClick'>
<PublishItem leftText="赞助商名称" :isShowRight="false"></PublishItem>
<EditText hint="请输入赞助商名称" @onTextChange="text" :text="info.name"></EditText>
<view class=" line"></view>
<PublishItem leftText="单位地址" :isShowRight="false"></PublishItem>
<EditText hint="请输入单位地址" @onTextChange="address" :text="info.address"></EditText>
<view class=" line"></view>
<PublishItem leftText="网址" :isShowRight="false"></PublishItem>
<EditText hint="请输入网址" @onTextChange="webUrl" :text="info.webUrl"></EditText>
<view class=" line"></view>
<PublishItem leftText="联系方式" :middleText="name_mobile" rightText="编辑" :isShowRight="true"
@rightClick="clickItem('联系方式')"></PublishItem>
<view class="line"></view>
<PublishItem leftText="宣传海报" rightText="上传" :isShowRight="true" @rightClick="clickItem('宣传海报')"></PublishItem>
<!-- <scroll-view style="width: 100%;white-space: nowrap;" scroll-x="true">
<view v-for="(item,index) in info.logo" :key="index" style="display: inline-block;">
<view style="margin-left: 20rpx;margin-right: 20rpx;display: flex;">
<image :src="item" style="width: 220rpx;height: 150rpx;z-index: 1;" mode="aspectFill"
@click="showImage(item)">
</image>
<image src="../../static/event-icon/delete1.png"
style="margin-left: -60rpx;margin-top: 10rpx;width: 50rpx;height: 50rpx;z-index: 2;"
@click="deleteItem(item)">
</image>
</view>
</view>
</scroll-view> -->
<view v-if="info.logo!=''&&info.logo!=undefined" style="margin-left: 20rpx;margin-right: 20rpx;display: flex;margin-bottom: 20rpx;">
<image :src="info.logo" style="width: 220rpx;height: 150rpx;z-index: 1;" mode="aspectFill">
</image>
<image src="../../static/event-icon/delete1.png"
style="margin-left: -60rpx;margin-top: 10rpx;width: 50rpx;height: 50rpx;z-index: 2;"
@click="deleteItem()">
</image>
</view>
<view class="line"></view>
<PublishItem leftText="单位简介" rightText="编辑" :isShowRight="true" @rightClick="clickItem('单位简介')">
</PublishItem>
<view style="display: flex;margin-left: 30rpx; margin-right: 30rpx;">
<editor id="editor" style="white-space: pre-wrap;" placeholder="点击进行编辑..." showImgSize showImgToolbar
showImgResize :read-only="true" @click="clickItem('单位简介')" @ready="onEditorReady">
</editor>
</view>
</RefreshView>
</template>
<script>
export default {
data() {
return {
name_mobile: "",
info: {
name: "",
address: "",
introduction: "",
linkerName: "",
linkerPhone: "",
logo: "",
webUrl: "",
userSid: ""
}
}
},
onShow() {
let backResult = this.OnActivityResult();
if (backResult != undefined) {
console.log("结果>" + JSON.stringify(backResult))
if (!this.IsEmpty(backResult.linkerName)) {
console.log("电话>" + JSON.stringify(this.info))
this.name_mobile = backResult.linkerName + "\u3000" + backResult.linkerPhone
this.info.linkerName = backResult.linkerName
this.info.linkerPhone = backResult.linkerPhone
console.log("电话>" + JSON.stringify(this.info))
}
if (!this.IsEmpty(backResult.introduction)) {
this.info.introduction = backResult.introduction
this.onEditorReady()
}
}
},
methods: {
rightBtnClick() {
console.log("info>" + JSON.stringify(this.info))
let _this = this
this.Login()
.then((res) => {
_this.info.userSid = res
_this.HTTP({
url: 'aos/v1/sponsorManagement/saveSponsor',
method: 'POST',
data: _this.info,
paramsType: "JSON",
loading: true
}).then((res) => {
this.SetResult("")
console.log('=======', res)
});
})
},
text(e) {
this.info.name = e
},
address(e) {
this.info.address = e
},
webUrl(e) {
this.info.webUrl = e
},
onEditorReady() {
// #ifdef APP-PLUS
uni.createSelectorQuery().select('#editor').context((res) => {
this.editorCtx1 = res.context
this.editorCtx1.setContents({
html: this.info.introduction
})
}).exec()
// #endif
// #ifdef H5 || MP-WEIXIN
this.createSelectorQuery().select('#editor').context((res) => {
this.editorCtx1 = res.context
this.editorCtx1.setContents({
html: this.info.introduction
})
}).exec()
// #endif
},
clickItem(e) {
let _this = this
switch (e) {
case "宣传海报":
this.chooseUpload(9)
.then((res) => {
console.log("url>>>>", res);
// _this.info.logo.push(res.data)
// let a = _this.info.logo.concat(res.urls)
// _this.info.logo = a
_this.info.logo = res.urls[0]
console.log("list", _this.info.logo)
})
break;
case "联系方式":
uni.navigateTo({
url: "mobileInfoActivity?linkerName=" + _this.info.linkerName +
"&linkerPhone=" + _this.info.linkerPhone
})
break;
case "单位简介":
uni.navigateTo({
url: "explainActivity?introduction=" + _this.info.introduction
})
break;
}
},
deleteItem(item) {
let _this = this
uni.showModal({
title: '温馨提示',
content: '确定要删除宣传图片吗?',
success(res) {
if (res.confirm) {
_this.info.logo.splice(_this.info.logo.indexOf(item), 1)
}
}
});
},
}
};
</script>
<style lang="scss">
.line {
width: 100%;
height: 5rpx;
background-color: #f5f4f9;
}
</style>

View File

@@ -0,0 +1,109 @@
<template>
<view>
<RefreshView ref="mescrollRef" :hasBack="true" text="编辑内容" :useDownScroll="false" :useUpScroll="false"
useTitleRightBtn="1" titleRightBtnSource="确定" @rightBtn='rightBtnClick'>
<RichTextEditor ref="rich" placeholder="请输入...." :html="htmlStr" :removeHeight="topBarHeight"
@insertPic="insert">
</RichTextEditor>
</RefreshView>
</view>
</template>
<script>
export default {
data() {
return {
topBarHeight: '0px',
htmlStr: "",
activityBaseInfo: {
disclaimer: "",
}
};
},
onLoad: function(option) {
// this.activityBaseInfo.introduction = option.introduction;
console.log("options>>>", option)
let t = option.disclaimer == "undefined" ?"":option.disclaimer;
this.htmlStr = t
},
created() {
this.topBarHeight = getApp().globalData.totalHeightPx
},
mounted() {
},
methods: {
insert(e) {
console.log("11111111》》》》"+e)
this.Upload({
url: 'activity/uploadGameImg',
filePath: e,
key: "file",
loading: true
}).then((res) => {
this.$refs.rich.insertUrlImage(res.data)
}, (err) => {
})
},
getHtml() {
return this.$refs.rich.getHtml();
},
rightBtnClick() {
let reg1 = new RegExp('<p>', 'g') //g代表全部
let reg2 = new RegExp('</p>', 'g') //g代表全部
let reg3 = new RegExp('<br>', 'g') //g代表全部
let reg4 = new RegExp('"', 'g') //g代表全部
let newMsg = JSON.stringify(this.getHtml()).replace(reg1, '').replace(reg2, '\n').replace(reg3, '').replace(reg4, '');
// let articleData = this.getHtml().replace('</p>*$<p>', /\n/g)
console.log(newMsg)
this.activityBaseInfo.disclaimer = newMsg
// this.data.activityBaseInfo.introduction = this.getHtml()
this.SetResult(this.activityBaseInfo)
},
}
};
</script>
<style lang="less">
.bottom {
display: flex;
height: 800rpx;
margin-top: 20rpx;
margin-left: 30rpx;
margin-right: 30rpx;
flex-direction: column;
border: 1rpx solid #C8C7CC;
padding: 30rpx 20rpx;
background: #FDFBFB;
border-radius: 8rpx;
.input {
margin-top: 10rpx;
white-space: pre-line;
font-size: 30rpx;
color: #898989;
height: 500rpx;
line-height: 50rpx;
}
}
.btn {
justify-content: center;
width: 100%;
margin-top: 100rpx;
padding: 30rpx;
font-size: 28rpx;
color: #FFFFFF;
background: #007AFF;
text-align: center;
flex: 1;
position: absolute;
bottom: 0;
}
</style>

View File

@@ -0,0 +1,640 @@
<template>
<RefreshView ref="mescrollRef" :hasBack="true" text="发布活动" :useDownScroll="false" :useUpScroll="false"
:isInterceptBack="true" @backClick="backClick" :useTitleLeftBtn="isCreate==0?1:0" titleLeftBtnSource="存草稿"
@leftBtn='leftBtnClick' :useTitleRightBtn="isCreate==0?0:1" titleRightBtnSource="发布" @rightBtn='rightBtnClick'>
<view class="topLayout">
<view class="topLayout_item">
<text class="topLayout_item_left1">1</text>
<text style="font-size: 28rpx;color: #262626;margin-left: 10rpx;">基本信息</text>
</view>
<view class="topLayout_item" @click="topClik(2)">
<text class="topLayout_item_left2">2</text>
<text
style="font-size: 28rpx; font-family: Adobe Heiti Std;font-weight: normal;color: #262626;margin-left: 10rpx;">设置活动项目</text>
</view>
<view class="topLayout_item" @click="topClik(3)">
<text class="topLayout_item_left2">3</text>
<text style="font-size: 28rpx;color: #979797;margin-left: 10rpx;">奖项及其他</text>
</view>
</view>
<PublishItem leftText="标题" :isShowRight="false"></PublishItem>
<EditText hint="请输入活动名称" @onTextChange="text" :text="info.activityBaseInfo.name"></EditText>
<view class=" line">
</view>
<PublishItem leftText="赛事简介" rightText="编辑" :isShowRight="true" @rightClick="clickItem('赛事介绍')">
</PublishItem>
<view style="display: flex;margin-left: 30rpx; margin-right: 30rpx;">
<editor id="editor1" style="height: 50rpx; white-space: pre-wrap;" placeholder="点击进行编辑..." showImgSize
showImgToolbar showImgResize :read-only="true" @click="clickItem('赛事介绍')" @ready="onEditorReady1">
</editor>
</view>
<view class="line"></view>
<view style="display: flex; flex-direction: row;margin-top: 20rpx;margin-bottom: 20rpx;">
<view
style="display: flex; justify-content: center;align-items: center;padding-left: 30rpx;padding-right: 30rpx;"
@click="clickItem('宣传海报')">
<image style="width: 130rpx;height: 130rpx;" src="../../static/upload_image.png" mode="aspectFill">
</image>
</view>
<scroll-view style="width: 100%;white-space: nowrap;" scroll-x="true">
<view v-for="(item,index) in info.activityBaseInfo.listCoverImageUrl" :key="index"
style="display: inline-block;">
<view style="margin-left: 20rpx;margin-right: 20rpx;display: flex;">
<image :src="item" style="width: 220rpx;height: 150rpx;z-index: 1;" mode="aspectFill"
@click="showImage(item)">
</image>
<image src="../../static/event-icon/delete1.png"
style="margin-left: -60rpx;margin-top: 10rpx;width: 50rpx;height: 50rpx;z-index: 2;"
@click="deleteItem(item)">
</image>
</view>
</view>
</scroll-view>
</view>
<view class="line"></view>
<biaofun-datetime-picker :start="info.activityBaseInfo.enrollStartTime" @change="dateChange1">
<PublishItem leftText="报名开始时间" :middleText="info.activityBaseInfo.enrollStartTime" rightText="修改"
:isShowRight="true"></PublishItem>
</biaofun-datetime-picker>
<view class="line"></view>
<biaofun-datetime-picker :start="info.activityBaseInfo.enrollEndTime" @change="dateChange2">
<PublishItem leftText="报名截止时间" :middleText="info.activityBaseInfo.enrollEndTime" rightText="修改"
:isShowRight="true">
</PublishItem>
</biaofun-datetime-picker>
<view class="line"></view>
<PublishItem leftText="联系方式" :middleText="name_mobile" rightText="修改" :isShowRight="true"
@rightClick="clickItem('联系方式')"></PublishItem>
<view class="line"></view>
<!--
<view class="layout1" style="flex-direction:column">
<view class="layout">
<image style="width: 45rpx;height: 45rpx;" src="../../static/custom-icon/line.png" mode="aspectFill">
</image>
<text class="layout_lift">报名条件</text>
<view class="layout_right" style="flex: 1;margin-left: 50rpx;">
<radio-group @change="radioChange">
<radio :checked="info.activityBaseInfo.radioType1">认证用户</radio>
<radio :checked="info.activityBaseInfo.radioType2" style="margin-left: 50rpx;">不限制</radio>
</radio-group>
</view>
</view>
<text style="font-size: 24rpx; color:#ff0000 ; margin-left: 50rpx;">规模活动请选择认证用户便于管理及实施</text>
</view>
<view class="line"></view> -->
<PublishItem leftText="免责声明" rightText="编辑" :isShowRight="true" @rightClick="clickItem('免责声明')">
</PublishItem>
<view style="display: flex;margin-left: 30rpx; margin-right: 30rpx;">
<editor id="editor2" style="white-space: pre-wrap;" placeholder="点击进行编辑..." showImgSize showImgToolbar
showImgResize :read-only="true" @click="clickItem('免责声明')" @ready="onEditorReady2">
</editor>
</view>
<view class="line"></view>
<view class="layout">
<image style="width: 45rpx;height: 45rpx;" src="../../static/custom-icon/line.png" mode="aspectFill">
</image>
<text class="layout_lift" style="flex: 1;">参赛者取消报名</text>
<view style="display: flex; flex: 1;justify-content: flex-end;margin-right: 15rpx;">
<fui-dropdown-menu :size="30" selectedColor="#465CFF" :options="options" @click="typeItemClick"
@close="typeClose" ref="ddmtype">
<view class="fui-filter__item" @tap="filterTap()">
<image style="width: 22rpx;height: 22rpx; margin-left: 15rpx;"
src="../../static/event-icon/xia.png" mode="aspectFit" class="fui-filter__icon"
:class="{'fui-icon__ani':typeShow}">
</image>
<text>{{type}}</text>
</view>
</fui-dropdown-menu>
</view>
</view>
<view class="line"></view>
<view class="layout1" style="flex-direction:column">
<view class="layout">
<image style="width: 45rpx;height: 45rpx;" src="../../static/custom-icon/line.png" mode="aspectFill">
</image>
<text class="layout_lift" style="flex: 1;">是否公开</text>
<view class="layout_right">
<switch class="tui-fr" :checked="switch1Checked" @change="switch1Change">
</switch>
</view>
</view>
<text style="font-size: 24rpx; color:#ff0000 ; margin-left: 50rpx;">非公开赛事在我的赛事可见分享后好友可报名</text>
</view>
<view class="line"></view>
<view style="height: 300rpx;"></view>
<text class="btn" @click="jump()">设置活动项目</text>
<cropper saveMode="ScaleTo500" ref="cropper" :aspectRatio="1.25" @complete="complete" @cancel="cancel">
</cropper>
</RefreshView>
</template>
<script>
import asyncSwitch from "@/components/helang-asyncSwitch/helang-asyncSwitch.vue";
import fuiButton from "@/components/firstui/fui-dropdown-menu/fui-dropdown-menu.vue"
export default {
components: {
"async-switch": asyncSwitch,
"fuiButton": fuiButton
},
data() {
return {
isCreate: 0,
options: [{
text: '退还报名费',
value: 1,
}, {
text: '不退报名费',
value: 0
}],
name_mobile: "",
typeShow: false,
type: "退报名费",
switch1Checked: false,
switch2Checked: false,
info: {
sid: "",
activityBaseInfo: {
enrollStartTime: this.TimeFormat(this.CurrentMillions(), "yyyy-MM-dd HH:mm"),
enrollEndTime: this.TimeFormat(this.CurrentMillions(), "yyyy-MM-dd HH:mm"),
listCoverImageUrl: [],
cancelEnrollRefund: 0,
inviteType: 0
},
listActivityItems: [],
activityNotesOther: {}
},
};
},
onLoad: function(option) {
console.log('option.isCreate', option.isCreate)
this.isCreate = option.isCreate
let that = this
if (this.HasCache()) {
uni.showModal({
title: '提示',
content: '是否使用草稿内容',
success: function(res) {
if (res.confirm) { //这里是点击了确定以后
console.log('用户点击确定')
console.log('---->1', that.ReadGameCahce())
that.info = that.ReadGameCahce()
console.log('---->2', that.info)
if (that.info.activityBaseInfo.linkerName != null && that.info
.activityBaseInfo.linkerPhone != null) {
that.name_mobile = that.info.activityBaseInfo.linkerName + "\u3000" +
that.info.activityBaseInfo.linkerPhone
}
that.switch1Checked = that.info.activityBaseInfo.cancelEnrollRefund == 1 ?
true :
false
that.switch2Checked = that.info.activityBaseInfo.inviteType == 1 ? true :
false
that.onEditorReady1()
that.onEditorReady2()
} else { //这里是点击了取消以后
console.log('用户点击取消')
}
}
})
}
},
onShow() {
let backResult = this.OnActivityResult();
if (backResult != undefined) {
this.info.activityBaseInfo = backResult;
if (!this.IsEmpty(this.info.activityBaseInfo.linkerName) && !this.IsEmpty(this.info.activityBaseInfo
.linkerPhone)) {
this.name_mobile = this.info.activityBaseInfo.linkerName + "\u3000" + this.info.activityBaseInfo
.linkerPhone
}
console.log(backResult)
this.onEditorReady1()
this.onEditorReady2()
}
},
methods: {
text(e) {
this.info.activityBaseInfo.name = e
},
backClick() {
let that = this
uni.showModal({
title: '提示',
content: '赛事未发布,是否保存草稿?',
success: function(res) {
if (res.confirm) { //这里是点击了确定以后
console.log('用户点击确定')
that.WriteGameCahce(that.info)
uni.navigateBack({
delta: 1
})
} else { //这里是点击了取消以后
console.log('用户点击取消')
uni.navigateBack({
delta: 1
})
}
}
})
},
leftBtnClick() {
this.WriteGameCahce(this.info)
uni.navigateBack({
delta: 1
})
},
rightBtnClick() {
if (this.IsEmpty(getApp().globalData.memberSid)) {
console.log('createSid', "无sid")
} else {
this.info.createSid = getApp().globalData.memberSid
console.log('createSid', JSON.stringify(this.info))
// this.HTTP({
// url: 'v1/activityManagement/saveActivity',
// method: 'POST',
// data: this.info,
// paramsType: "FORM",
// loading: true
// }).then((res) => {
// this.ClearGameCache(this.info)
// wx.navigateBack({
// delta: 3
// })
// });
}
},
topClik(index) {
switch (index) {
case 2:
uni.navigateTo({
url: "setEventActivity?isCreate=" + this.isCreate +
// "&activityBaseInfo=" + encodeURIComponent(JSON.stringify(this.activityBaseInfo))
"&info=" + JSON.stringify(this.info) // 页面 A
})
break
case 3:
uni.navigateTo({
url: "prizeActivity?isCreate=" + this.isCreate +
"&info=" + JSON.stringify(this.info) // 页面 A
})
break
}
},
deleteItem(item) {
uni.showModal({
title: '温馨提示',
content: '确定要删除吗?',
success(res) {
if (res.confirm) {
this.info.activityBaseInfo.listCoverImageUrl.splice(this.info.activityBaseInfo
.listCoverImageUrl.indexOf(item), 1)
}
}
});
},
showImage(item) {
// 从相册选择6张图
uni.chooseImage({
count: 6,
sizeType: ['original', 'compressed'],
sourceType: ['album'],
success: function(res) {
// 预览图片
uni.previewImage({
urls: res.tempFilePaths,
longPressActions: {
itemList: ['发送给朋友', '保存图片', '收藏'],
success: function(data) {
console.log('选中了第' + (data.tapIndex + 1) + '个按钮,第' + (data
.index + 1) + '张图片');
},
fail: function(err) {
console.log(err.errMsg);
}
}
});
}
});
},
clickItem(e) {
let _this = this
switch (e) {
case "宣传海报":
uni.chooseImage({
count: 9,
sizeType: ['compressed'],
success: function(res) {
console.log(JSON.stringify(res.tempFilePaths));
for (var i = 0; i < res.tempFilePaths.length; i++) {
_this.info.activityBaseInfo.listCoverImageUrl.push(res.tempFilePaths[i])
}
}
})
break;
case "联系方式":
uni.navigateTo({
url: "mobileInfoActivity?activityBaseInfo=" + JSON.stringify(_this.info
.activityBaseInfo)
})
break;
case "赛事介绍":
uni.navigateTo({
url: "explainActivity?activityBaseInfo=" + JSON.stringify(_this.info
.activityBaseInfo)
})
break;
case "免责声明":
uni.navigateTo({
url: "eventActivity?activityBaseInfo=" + JSON.stringify(_this.info
.activityBaseInfo)
})
break;
}
},
radioChange(e) {
this.info.activityBaseInfo.radioType1 = !this.info.activityBaseInfo.radioType1
this.info.activityBaseInfo.radioType2 = !this.info.activityBaseInfo.radioType2
console.log('radio1发生change事件携带value值为', this.info.activityBaseInfo.radioType1)
console.log('radio2发生change事件携带value值为', this.info.activityBaseInfo.radioType2)
},
cancel() {
this.$refs.cropper.close(true);
},
complete(e) {
this.activityBaseInfo.logo = e.path
this.$refs.cropper.close(true);
},
dateChange1(e) {
this.info.activityBaseInfo.enrollStartTime = e.f1 + " " + e.hh + ":" + e.mm
console.log(e)
},
dateChange2(e) {
this.info.activityBaseInfo.enrollEndTime = e.f1 + " " + e.hh + ":" + e.mm
},
onEditorReady1() {
// #ifdef APP-PLUS
uni.createSelectorQuery().select('#editor1').context((res) => {
this.editorCtx1 = res.context
this.editorCtx1.setContents({
html: this.info.activityBaseInfo.introduction
})
}).exec()
// #endif
// #ifdef H5 || MP-WEIXIN
this.createSelectorQuery().select('#editor1').context((res) => {
this.editorCtx1 = res.context
this.editorCtx1.setContents({
html: this.info.activityBaseInfo.introduction
})
}).exec()
// #endif
},
onEditorReady2() {
// #ifdef APP-PLUS
uni.createSelectorQuery().select('#editor2').context((res) => {
this.editorCtx2 = res.context
this.editorCtx2.setContents({
html: this.info.activityBaseInfo.disclaimer
})
}).exec()
// #endif
// #ifdef H5 || MP-WEIXIN
this.createSelectorQuery().select('#editor2').context((res) => {
this.editorCtx2 = res.context
this.editorCtx2.setContents({
html: this.info.activityBaseInfo.disclaimer
})
}).exec()
// #endif
},
filterTap() {
// this.$refs.ddmtype.show()
this.typeShow = true;
},
typeItemClick(e) {
this.type = e.text
this.info.activityBaseInfo.cancelEnrollRefund = e.value
console.log(this.type)
console.log(this.info.activityBaseInfo.cancelEnrollRefund)
this.typeClose()
},
typeClose() {
this.typeShow = false;
},
switch1Change: function(e) {
this.switch1Checked = !this.switch1Checked;
this.info.activityBaseInfo.cancelEnrollRefund = this.switch1Checked == true ? 0 : 1;
console.log(`switch1Change样式点击后是否选中`, this.switch1Checked)
console.log(`cancelEnrollRefund是否选中`, this.info.activityBaseInfo.cancelEnrollRefund)
},
switch2Change: function(e) {
this.switch2Checked = !this.switch2Checked;
this.info.activityBaseInfo.inviteType = this.switch2Checked == true ? 0 : 1;
console.log(`switch2Change样式点击后是否选中`, this.switch1Checked)
console.log(`inviteType是否选中`, this.info.activityBaseInfo.inviteType)
},
jump() {
if (this.IsEmpty(this.info.activityBaseInfo.name)) {
this.Toast("请输入活动名称");
return;
}
if (this.IsEmpty(this.info.activityBaseInfo.linkerName) || this.IsEmpty(this.info.activityBaseInfo
.linkerPhone)) {
this.Toast("联系方式不能为空");
return;
}
if (this.IsEmpty(this.info.activityBaseInfo.introduction)) {
this.Toast("活动介绍不能为空");
return;
}
if (this.IsEmpty(this.info.activityBaseInfo.disclaimer)) {
this.Toast("免责声明不能为空");
return;
}
uni.navigateTo({
url: "setEventActivity?isCreate=" + this.isCreate +
// "&activityBaseInfo=" + encodeURIComponent(JSON.stringify(this.activityBaseInfo))
"&info=" + JSON.stringify(this.info)
})
}
}
};
</script>
<style lang="scss">
.line {
width: 100%;
height: 5rpx;
background-color: #f5f4f9;
}
.logo {
width: calc(100vw - 40rpx);
height: calc((100vw - 40rpx)*0.8);
margin-left: 20rpx;
}
.topLayout {
background: #F7F7F7;
display: flex;
padding: 30rpx 60rpx;
flex-direction: row;
align-items: center;
justify-content: space-between;
.topLayout_item {
display: flex;
flex-direction: row;
align-items: center;
.topLayout_item_left1 {
width: 48rpx;
height: 48rpx;
background-color: #007AFF;
border-radius: 50%;
color: #FFFFFF;
font-size: 36rpx;
text-align: center;
}
.topLayout_item_left2 {
width: 48rpx;
height: 48rpx;
border: 1rpx solid #D9D9D9;
border-radius: 50%;
color: #D9D9D9;
font-size: 36rpx;
text-align: center;
}
}
}
.layout {
background: #FFFFFF 100%;
display: flex;
flex-direction: row;
padding: 30rpx 15rpx;
align-items: center;
.layout_lift {
font-size: 30rpx;
color: #101010;
}
.layout_right {
display: flex;
right: 32rpx;
align-items: center;
}
}
.labelLayout {
display: flex;
flex: 1;
margin-left: 10rpx;
margin-right: 10rpx;
background-color: #F2BF5C;
color: #FFFFFF;
padding-top: 5rpx;
padding-bottom: 5rpx;
justify-content: center;
text-align: center;
font-size: 30rpx;
}
.labelLayout2 {
background-color: #007AFF;
}
.tui-fr {
zoom: .7
}
.layout1 {
background: #FFFFFF 100%;
display: flex;
flex-direction: row;
padding-bottom: 20rpx;
}
.btn {
justify-content: center;
width: 100%;
margin-top: 100rpx;
padding: 30rpx;
font-size: 30rpx;
color: #FFFFFF;
background: #007AFF;
text-align: center;
flex: 1;
position: absolute;
bottom: 0;
}
.fui-filter__item {
height: auto;
width: 300rpx;
display: flex;
flex-direction: row-reverse;
align-items: center;
font-size: 30rpx;
/* #ifdef H5 */
cursor: pointer;
/* #endif */
}
.fui-filter__icon {
transition: all .15s linear;
}
.fui-icon__ani {
transform: rotate(180deg);
}
</style>

View File

@@ -0,0 +1,74 @@
<template>
<view>
<RefreshView ref="mescrollRef" :hasBack="true" text="编辑内容" :useDownScroll="false" :useUpScroll="false"
useTitleRightBtn="1" titleRightBtnSource="确定" @rightBtn='rightBtnClick'>
<RichTextEditor ref="rich" placeholder="请输入...." :html="htmlStr" :removeHeight="topBarHeight"
@insertPic="insert">
</RichTextEditor>
</RefreshView>
</view>
</template>
<script>
export default {
data() {
return {
topBarHeight: '0px',
htmlStr: "",
activityBaseInfo: {
introduction: "",
}
};
},
onLoad: function(option) {
// this.activityBaseInfo.introduction = option.introduction;
console.log("options>>>", option)
// let t = JSON.parse(decodeURIComponent(option.introduction));
// this.htmlStr = t.html
let t = option.introduction == "undefined" ?"":option.introduction;
this.htmlStr = t
},
created() {
this.topBarHeight = getApp().globalData.totalHeightPx
},
mounted() {
},
methods: {
insert(e) {
this.chooseUpload(9)
.then((res) => {
console.log("url>>>>", res);
this.$refs.rich.insertUrlImage(res.urls)
})
},
getHtml() {
return this.$refs.rich.getHtml();
},
rightBtnClick() {
console.log(this.getHtml())
let reg1 = new RegExp('<p>', 'g') //g代表全部
let reg2 = new RegExp('</p>', 'g') //g代表全部
let reg3 = new RegExp('<br>', 'g') //g代表全部
let reg4 = new RegExp('"', 'g') //g代表全部
let newMsg = JSON.stringify(this.getHtml()).replace(reg1, '').replace(reg2, '\n').replace(reg3, '')
.replace(reg4, '');
// let articleData = this.getHtml().replace('</p>*$<p>', /\n/g)
console.log(newMsg)
this.activityBaseInfo.introduction = newMsg
// this.data.activityBaseInfo.introduction = this.getHtml()
this.SetResult(this.activityBaseInfo)
},
}
};
</script>
<style>
</style>

View File

@@ -0,0 +1,288 @@
<template>
<view>
<RefreshView ref="mescrollRef" @refresh="refresh" :hasBack="true" text="首页" :useDownScroll="true"
:useUpScroll="false" pageBg="#F1F2F5">
<view style="display: flex;flex-direction: column;align-items: center;width: 100vw;">
<view
style="display: flex;flex-direction: column;align-items: center;background-color: #2fa1f0;padding-top: 80rpx;">
<view style="width: 100vw;text-align: center;font-size: 60rpx;font-weight: 700;color: aliceblue;">
体育活动</view>
<view
style="width: 100vw;text-align: center;font-size: 35rpx;font-weight: 300;color: beige;margin-top: 10rpx;">
组织报名工具</view>
<view @click="jump(1)" style="width: 80%;background-color: #FFFFFF;display: flex;flex-direction: row;align-items: center;justify-content: center;
border-radius:100rpx;margin-top: 80rpx;margin-bottom: 20rpx;height: 80rpx;">
<image src="../../static/custom-icon/click.png" style="width: 60rpx;height: 60rpx;"></image>
<text>一分钟创建 轻松组织活动</text>
</view>
<view style="width: 85%;display: flex;flex-direction: row;align-items: center;
margin-top: 10rpx;margin-bottom: 20rpx;height: 80rpx;">
<image src="../../static/custom-icon/notice.png"
style="width: 40rpx;height: 40rpx;flex-shrink: 0;margin-right: 20rpx;"></image>
<text
style="font-size: 26rpx;font-weight: 200;">您注册的账号可以在宇运动旗下的子平台一号通行同时您发布的活动将会按类别同步到各子平台</text>
</view>
</view>
<view class="nav-bar" @click="jump(3)">
<view>
<text class="bar-text">最新活动</text>
<image src="../../static/custom-icon/new2.png"
style="width: 40rpx;height: 40rpx;flex-shrink: 0;margin-left: 10rpx;"></image>
</view>
<image class="bar-img" src="../../static/home-icon/more_text.png" mode="aspectFit" @tap="newGame">
</image>
</view>
<view v-for="(item,index) in list " :key="index" style="width: 100%;">
<view
style="display: flex;flex-direction: column;margin-bottom: 30rpx; padding: 30rpx;background: #FFFFFF;"
@click="clickItem(index)">
<view style="display: flex;flex-direction: column;">
<view style="display: flex; flex-direction: row;">
<text style="color: #101010; font-size: 32rpx; display:-webkit-box;-webkit-line-clamp:1;
overflow:hidden;text-overflow:ellipsis;-webkit-box-orient:vertical;
word-break:break-all;flex: 1;">{{item.name}}</text>
<text
style="color: #fff; font-size: 24rpx; background-color: #F2BF5C; padding: 5rpx 10rpx;">{{item.sportCategoryName}}</text>
</view>
<text
style="color: #898989 ; font-size: 28rpx; margin-top: 10rpx;">报名截止{{item.enrollEndTime}}</text>
</view>
<view style="width: 100%;height: 300rpx; margin-top: 20rpx;margin-bottom: 20rpx;">
<image style="width: 100%;height: 100%; border-radius: 30rpx;" mode="aspectFill"
:src="item.firstCoverImage"></image>
<view style="display: flex; height: 50rpx;width: 100%; margin-top: -80rpx; ">
<view style=" display: flex;align-items: center;width: 100%;">
<image style="width: 28px;height: 48rpx;margin-left: 30rpx;"
src="../../static/renqi.png"></image>
<text style="color: #fff; margin-left: 15rpx;flex: 1;">{{item.popularity}}</text>
<text
:class="{'btn1':item.enrollState ==1||item.enrollState ==3,'btn2':item.enrollState==2}"
style="display: flex;text-align: center; padding: 8rpx 15rpx;
color: #FFFFFF; font-size: 28rpx; margin-right:30rpx; border-radius: 10rpx;">{{item.enrollStateName}}</text>
</view>
</view>
</view>
<view style="width: 100%;" v-for="(info,pos) in item.listActivityItemsArea " :key="pos">
<view style="display: flex;flex-direction: column;">
<view
style="display: flex;flex-direction: row; align-items: center; margin-top: 10rpx;">
<text style="color: #101010; font-size: 28rpx; flex: 1;">{{info.name}}</text>
<view style=" align-items: center;">
<text style="color: #ff0000 ; font-size: 24rpx;">{{info.enrollMoldName}}</text>
<text
style="color: #ff0000 ; font-size: 24rpx;margin-left: 10rpx;margin-right: 10rpx;">/</text>
<text
style="color: #ff0000 ; font-size: 24rpx;">{{info.enrollMoney==0?"免费":info.enrollMoney}}</text>
</view>
</view>
<view style="display: flex;flex-direction: row;margin-top: 5rpx;">
<view style="flex: 1; align-items: center;">
<text style="color: #919191; font-size: 24rpx;">报名数</text>
<text
style="color: #919191 ; font-size: 24rpx;">{{info.enrollNumbers==0?"暂无":info.enrollNumbersLimit+'人'}}</text>
<text
style="color: #919191 ; font-size: 24rpx;margin-left: 10rpx;margin-right: 10rpx;">/</text>
<text
style="color: #919191 ; font-size: 24rpx;">{{info.enrollNumbersLimit==0?"不限":info.enrollNumbersLimit+'人'}}</text>
</view>
<text
style="margin-top: 10rpx; color: #919191; font-size: 24rpx;">{{info.startTime}}</text>
</view>
<view v-if="item.listActivityItemsArea.length>pos+1"
style="width: 100%; height: 2rpx;background-color: #101010; margin-top: 10rpx;">
</view>
</view>
</view>
</view>
</view>
</view>
</RefreshView>
</view>
</template>
<script>
// 必须
import MescrollMixin from "@/components/mescroll-uni/mescroll-mixins.js";
export default {
// 使用mixin (在main.js注册全局组件) 必须
mixins: [MescrollMixin],
data() {
return {
index: 0,
list: []
}
},
methods: {
refresh(page) {
let _this = this
this.HTTP({
url: 'aos/v1/activityManagement/getActivityAreaPagerList',
paramsType: "JSON",
method: "POST",
data: {
current: page.num,
size: 10,
params: {
name: "",
userSid: getApp().globalData.memberSid,
}
},
loading: true
}).then((res) => {
// 成功关闭刷新状态
_this.$refs.mescrollRef.refreshFinished(res.data.records.length)
if (page.num == 1) {
// 第一页 先清空集合数据
_this.list = []
}
// 追加数据
_this.list = _this.list.concat(res.data.records)
}).catch(function(err) {
console.log("11111");
_this.$refs.mescrollRef.refreshError()
});
},
clickItem(index) {
let raceSid = this.list[index].sid
console.log(raceSid)
uni.navigateTo({
url: 'DetailActivity?raceSid=' + raceSid
});
},
jump(index) {
let _this = this
switch (index) {
case 1:
// 新建活动
uni.navigateTo({
url: "activity?isCreate=0&sid="
})
break;
case 2:
// 草稿箱
uni.navigateTo({
// url: '../index/exemptionActivity?raceSid=' + res.data
})
break;
case 3:
// 活动列表
uni.navigateTo({
url: "activityList"
})
break;
}
}
}
}
</script>
<style lang="scss">
.line {
width: 100%;
height: 18rpx;
background-color: #f5f4f9;
}
.btn {
display: flex;
width: 80%;
height: 80rpx;
flex-direction: column;
background-color: $uni-base-color;
margin-left: auto;
margin-right: auto;
align-items: center;
justify-content: center;
border-radius: 10rpx;
}
.nav-bar {
height: 92rpx;
width: 100%;
display: flex;
justify-content: space-between;
.bar-text {
font-size: 32rpx;
height: 100%;
line-height: 92rpx;
padding-left: 28rpx;
}
.bar-img {
width: 90rpx;
height: 92rpx;
padding-right: 28rpx;
}
}
.top {
display: flex;
flex-direction: row;
height: 100rpx;
background: #FFFFFF;
opacity: 0.8;
align-items: center;
border-radius: 20rpx;
margin-top: 20rpx;
margin-left: 30rpx;
margin-right: 30rpx;
.unselected {
text-align: center;
font-size: 28rpx;
font-family: Adobe Heiti Std;
font-weight: normal;
color: #191919;
line-height: 40rpx;
}
.selected {
text-align: center;
font-size: 28rpx;
font-family: Adobe Heiti Std;
font-weight: normal;
color: #2CAB69;
line-height: 40rpx;
border-bottom: 2rpx #2CAB69 solid;
padding-bottom: 10rpx;
}
}
.btn1 {
background: #BBBBBB;
}
.btn2 {
background: #0081D5;
}
</style>

View File

@@ -0,0 +1,89 @@
<template>
<RefreshView ref="mescrollRef" :hasBack="true" text="联系方式" :useDownScroll="false" :useUpScroll="false"
useTitleRightBtn="1" titleRightBtnSource="确定" @rightBtn='rightBtnClick'>
<view style="display: flex;flex-direction: column;">
<text style=" margin-top: 50rpx; margin-left: 65rpx;">联系人</text>
<view class="input" style="margin-top: 20rpx;">
<input class="input_text" v-model="activityBaseInfo.linkerName" @input="nameText" placeholder="请输入联系人" />
</view>
<text style=" margin-top: 50rpx; margin-left: 65rpx; margin-top: 30rpx;">联系电话</text>
<view class="input" style="margin-top: 20rpx;">
<input class="input_text" type="number" v-model="activityBaseInfo.linkerPhone" maxlength="11"
@input="phoneText" placeholder="请输入联系电话" />
</view>
</view>
</RefreshView>
</template>
<script>
export default {
data() {
return {
activityBaseInfo: {
linkerName: "",
linkerPhone: "",
}
};
},
onLoad: function(option) {
this.activityBaseInfo.linkerName =option.linkerName;
this.activityBaseInfo.linkerPhone = option.linkerPhone;
console.log(JSON.stringify(this.activityBaseInfo))
},
mounted() {
},
methods: {
nameText(e) {
this.activityBaseInfo.linkerName = e.detail.value;
},
phoneText(e) {
this.activityBaseInfo.linkerPhone = e.detail.value
},
rightBtnClick() {
if (this.IsEmpty(this.activityBaseInfo.linkerName)) {
this.Toast("请输入联系人姓名")
return
}
let o = parseInt(this.activityBaseInfo.linkerPhone)
if (isNaN(o) || !this.activityBaseInfo.linkerPhone.startsWith(1) || this.activityBaseInfo.linkerPhone.length !=
11) {
this.Toast("输入的电话格式有误")
} else {
this.SetResult(this.activityBaseInfo)
console.log(this.activityBaseInfo)
}
},
}
}
</script>
<style lang="scss">
.input {
margin-left: 65rpx;
margin-right: 65rpx;
height: 80rpx;
background: #F2F2F2;
border-radius: 42rpx;
padding-left: 30rpx;
padding-right: 30rpx;
display: flex;
align-items: center;
.input_text {
width: 100%;
}
}
</style>

View File

@@ -0,0 +1,337 @@
<template>
<RefreshView ref="mescrollRef" :hasBack="true" text="发起活动" :useDownScroll="false" :useUpScroll="false"
:isInterceptBack="true" @backClick="backClick" :useTitleLeftBtn="isCreate==0?1:0" titleLeftBtnSource="存草稿"
@leftBtn='leftBtnClick' :useTitleRightBtn="1" titleRightBtnSource="发布" @rightBtn='rightBtnClick'>
<view class="topLayout">
<view class="topLayout_item" @click="topClik(1)">
<!-- <image style="width: 34rpx;height: 38rpx;" src="../../static/event-icon/finished.png" mode="aspectFit">
</image> -->
<text class="topLayout_item_left1">1</text>
<text style="font-size: 28rpx;color: #262626;margin-left: 10rpx;">基本信息</text>
</view>
<view class="topLayout_item" @click="topClik(2)">
<!-- <image style="width: 34rpx;height: 38rpx;" src="../../static/event-icon/finished.png" mode="aspectFit">
</image> -->
<text class="topLayout_item_left1">2</text>
<text
style="font-size: 28rpx; font-family: Adobe Heiti Std;font-weight: normal;color: #262626;margin-left: 10rpx;">设置活动项目</text>
</view>
<view class="topLayout_item">
<!-- <image style="width: 34rpx;height: 38rpx;" src="../../static/event-icon/unfinished.png"
mode="aspectFit">
</image> -->
<text class="topLayout_item_left1">3</text>
<text style="font-size: 28rpx;color: #979797;margin-left: 10rpx;">奖项及其他</text>
</view>
</view>
<PublishItem leftText="奖品设置" :isShowRight="false">
</PublishItem>
<view class="line"></view>
<view class="layout">
<textarea class="explain" @input="notesText" placeholder="奖品设置(点击编辑)"
:value="info.activityNotesOther.notes" />
</view>
<view class="line"></view>
<PublishItem leftText="特别鸣谢" rightText="选择赞助商" :isShowRight="true" @rightClick="clickItem()">
</PublishItem>
<view style="display: flex;margin-left: 40rpx;margin-right: 40rpx;flex-direction: column;">
<view v-for="(item,index) in info.activityNotesOther.listSponsor " :key="index">
<view
style="display: flex; width: 100%; padding-top: 10rpx;padding-bottom: 15rpx;justify-content: center;">
<text style="color: #898989;font: size 50rpx;flex: 1;"
@click="showDetail(item.sid)">{{item.name}}</text>
<image style="width: 30rpx;height: 30rpx;" src="../../static/event-icon/delete.png" mode="aspectFit"
@click="deleteItem(index)">
</image>
</view>
</view>
</view>
<view class="line"></view>
<PublishItem leftText="主办方" :isShowRight="false"></PublishItem>
<EditText hint="请输入主办方名称" @onTextChange="organizerText" :value="info.activityNotesOther.organizer">
</EditText>
<view class="line"></view>
<PublishItem leftText="承办方" :isShowRight="false"></PublishItem>
<EditText hint="请输入承办方名称" @onTextChange="cocosponsorrText" :value="info.activityNotesOther.cosponsor">
</EditText>
<!-- <text class="btn" @click="jump()">发布</text> -->
</view>
</RefreshView>
</template>
<script>
export default {
data() {
return {
isCreate: 0,
raceSid: "",
info: {
activityBaseInfo: {},
listActivityItems: [],
activityNotesOther: {
cosponsor: "",
organizer: "",
notes: "",
listSponsor: [
// {
// sid: "",
// name: "啊大大大add的方式达到",
// introduction: "",
// address: "",
// linkerName: "",
// linkerPhone: "",
// logo: "",
// webUrl: "",
// },
// {
// sid: "",
// name: "啊a士大夫士大夫大师傅是第三方士大夫达到",
// introduction: "",
// address: "",
// linkerName: "",
// linkerPhone: "",
// logo: "",
// webUrl: "",
// }
]
}
}
}
},
onLoad: function(option) {
this.isCreate = option.isCreate
console.log('option.isCreate', option.isCreate)
},
onShow() {
let backResult = this.OnActivityResult();
if (backResult != undefined) {
if (!this.IsEmpty(backResult)) {
this.info.activityNotesOther.listSponsor = backResult
console.log("list=====>" + JSON.stringify(backResult))
console.log("sponsorList=====>" + JSON.stringify(this.info.activityNotesOther.listSponsor))
}
}
},
methods: {
backClick() {
let that = this
uni.showModal({
title: '提示',
content: '赛事未发布,是否保存草稿?',
success: function(res) {
if (res.confirm) { //这里是点击了确定以后
console.log('用户点击确定')
that.WriteGameCahce(that.info)
uni.navigateBack({
delta: 3
})
} else { //这里是点击了取消以后
console.log('用户点击取消')
uni.navigateBack({
delta: 3
})
}
}
})
},
leftBtnClick() {
this.WriteGameCahce(this.info)
uni.navigateBack({
delta: 3
})
},
rightBtnClick() {
if (this.IsEmpty(getApp().globalData.memberSid)) {
console.log('createSid', "无sid")
} else {
this.info.createSid = getApp().globalData.memberSid
console.log('createSid', JSON.stringify(this.info))
// this.HTTP({
// url: 'v1/activityManagement/saveActivity',
// method: 'POST',
// data: this.info,
// paramsType: "FORM",
// loading: true
// }).then((res) => {
// this.ClearGameCache(this.info)
// wx.navigateBack({
// delta: 3
// })
// });
}
},
topClik(index) {
this.WriteGameCahce(this.info)
switch (index) {
case 1:
uni.navigateTo({
url: "exemptionActivity?isCreate=" + this.isCreate +
"&info=" + JSON.stringify(this.info) // 页面 A
})
break
case 2:
uni.navigateTo({
url: "setEventActivity?isCreate=" + this.isCreate +
"&info=" + JSON.stringify(this.info) // 页面 A
})
break
}
},
clickItem() {
uni.navigateTo({
url: "sponsorList"
})
},
notesText(e) {
this.info.activityNotesOther.notes = e.detail.value
},
cocosponsorrText(e) {
this.info.activityNotesOther.cosponsor = e
},
organizerText(e) {
this.info.activityNotesOther.organizer = e
},
showDetail() {
},
deleteItem(item) {
let _this = this
console.log("====>" + _this.info.activityNotesOther.listSponsor.length);
uni.showModal({
title: '温馨提示',
content: '确定要删除此赞助商吗?',
success(res) {
if (res.confirm) {
_this.info.activityNotesOther.listSponsor.splice(_this.info.activityNotesOther
.listSponsor.indexOf(item),
1);
console.log("====>" + _this.info.activityNotesOther.listSponsor.length);
}
}
});
},
jump() {
if (this.IsEmpty(this.info.activityNotesOther.cosponsor)) {
this.Toast("请输入承办方名称")
return
}
if (this.IsEmpty(this.info.activityNotesOther.organizer)) {
this.Toast("请输入主办方名称")
return
}
}
}
}
</script>
<style lang="scss">
.tripList_root {
top: 0px;
left: 0px;
width: 100%;
height: 100%;
overflow: hidden;
position: fixed;
z-index: 0;
}
.topLayout {
background: #F7F7F7;
display: flex;
padding: 30rpx 60rpx;
flex-direction: row;
align-items: center;
flex-direction: row;
justify-content: space-between;
.topLayout_item {
display: flex;
flex-direction: row;
align-items: center;
.topLayout_item_left1 {
width: 48rpx;
height: 48rpx;
background-color: #007AFF;
border-radius: 50%;
color: #FFFFFF;
font-size: 36rpx;
text-align: center;
}
.topLayout_item_left2 {
width: 48rpx;
height: 48rpx;
border: 1rpx solid #D9D9D9;
border-radius: 50%;
color: #D9D9D9;
font-size: 36rpx;
text-align: center;
}
}
}
.line {
width: 100%;
height: 5rpx;
background-color: #f5f4f9;
}
.layout {
background: #FFFFFF;
display: flex;
margin: 15px;
height: auto;
.notes {
width: 100%;
}
}
.btn {
justify-content: center;
width: 100%;
margin-top: 100rpx;
padding: 30rpx;
font-size: 28rpx;
color: #FFFFFF;
background: #007AFF;
text-align: center;
flex: 1;
position: absolute;
bottom: 0;
}
</style>

View File

@@ -0,0 +1,645 @@
<template>
<RefreshView ref="mescrollRef" :hasBack="true" text="发起活动" :useDownScroll="false" :useUpScroll="false"
:isInterceptBack="true" @backClick="backClick" :useTitleLeftBtn="isCreate==0?1:0" titleLeftBtnSource="存草稿"
@leftBtn='leftBtnClick' :useTitleRightBtn="isCreate==0?0:1" titleRightBtnSource="发布" @rightBtn='rightBtnClick'>
<view class="topLayout">
<view class="topLayout_item" @click="topClik(1)">
<!-- <image style="width: 34rpx;height: 38rpx;" src="../../static/event-icon/finished.png" mode="aspectFit">
</image> -->
<text class="topLayout_item_left1">1</text>
<text style="font-size: 28rpx;color: #262626;margin-left: 10rpx;">基本信息</text>
</view>
<view class="topLayout_item">
<!-- <image style="width: 34rpx;height: 38rpx;" src="../../static/event-icon/finished.png" mode="aspectFit">
</image> -->
<text class="topLayout_item_left1">2</text>
<text
style="font-size: 28rpx; font-family: Adobe Heiti Std;font-weight: normal;color: #262626;margin-left: 10rpx;">设置活动项目</text>
</view>
<view class="topLayout_item" @click="topClik(3)">
<!-- <image style="width: 34rpx;height: 38rpx;" src="../../static/event-icon/unfinished.png"
mode="aspectFit">
</image> -->
<text class="topLayout_item_left2">3</text>
<text style="font-size: 28rpx;color: #979797;margin-left: 10rpx;">奖项及其他</text>
</view>
</view>
<view>
<view v-for="(item,index) in info.listActivityItems " :key="index">
<view class="items">
<view class="layout1">
<text class="number">{{index+1}}</text>
<input class="name" type="text" @input="nameText($event, index)" placeholder="请输入活动项目名称"
:value="item.name" />
<view style="display: flex;padding-left: 30rpx; align-items: center;" @click="deleteItem(item)">
<image style="width: 34rpx;height: 38rpx;" src="../../static/event-icon/delete.png"
mode="aspectFit">
</image>
</view>
</view>
<view class="line"></view>
<view class="layout2">
<textarea class="explain" @input="explainText($event, index)" placeholder="活动项目说明(点击编辑)"
:value="item.introduction" />
</view>
<view class="line"></view>
<view class="tabLayout" style="flex-direction:column">
<view class="layout">
<image style="width: 45rpx;height: 45rpx;" src="../../static/custom-icon/line.png"
mode="aspectFill">
</image>
<view>
<text class="layout_lift">体育活动标签</text>
<text
style="color: #F2BF5C;font-size: 30rpx;margin-left: 5rpx;">{{item.SportCategoryName}}</text>
</view>
</view>
<view style="display: flex; flex-direction: row;margin-left: 30rpx;margin-right: 30rpx;">
<text class="labelLayout" :class="{'labelLayout2':item.SportCategorySid===1}"
@click="onClick(index,1)">乒乓球</text>
<text class="labelLayout" :class="{'labelLayout2':item.SportCategorySid==2}"
@click="onClick(index,2)">户外运动</text>
<text class="labelLayout" :class="{'labelLayout2':item.SportCategorySid==3}"
@click="onClick(index,3)">羽毛球</text>
<text class="labelLayout" :class="{'labelLayout2':item.SportCategorySid==4}"
@click="onClick(index,4)">足球</text>
<text class="labelLayout" :class="{'labelLayout2':item.SportCategorySid==5}"
@click="onClick(index,5)">篮球</text>
</view>
<view
style="display: flex; flex-direction: row;margin-left: 30rpx;margin-right: 30rpx;margin-top: 20rpx;">
<text class="labelLayout" :class="{'labelLayout2':item.SportCategorySid==6}"
@click="onClick(index,6)">网球</text>
<text class="labelLayout" :class="{'labelLayout2':item.SportCategorySid==7}"
@click="onClick(index,7)">台球</text>
<text class="labelLayout" :class="{'labelLayout2':item.SportCategorySid==8}"
@click="onClick(index,8)">游泳</text>
<text class="labelLayout" :class="{'labelLayout2':item.SportCategorySid==9}"
@click="onClick(index,9)">保龄球</text>
<text class="labelLayout" :class="{'labelLayout2':item.SportCategorySid==10}"
@click="onClick(index,10)">滑雪</text>
</view>
</view>
<PublishItem leftText="人数费用" :middleText="getData(item)" rightText="设置" :isShowRight="true"
@rightClick="clickItem('人数费用',index)">
</PublishItem>
<view class="line"></view>
<biaofun-datetime-picker :start="item.startTime" @change="dateChange1($event, index)">
<PublishItem leftText="开始时间" :middleText="item.startTime" rightText="修改" :isShowRight="true">
</PublishItem>
</biaofun-datetime-picker>
<view class="line"></view>
<biaofun-datetime-picker :start="item.endTime" @change="dateChange2($event, index)">
<PublishItem leftText="结束时间" :middleText="item.endTime" rightText="修改" :isShowRight="true">
</PublishItem>
</biaofun-datetime-picker>
<view class="line"></view>
<PublishItem leftText="活动地点" :middleText="item.address" rightText="选择" :isShowRight="true"
@rightClick="clickItem('活动地点',index)">
</PublishItem>
<!-- <PublishItem leftText="活动地点" :isShowRight="false"></PublishItem>
<EditText hint="请输入活动地点" @onTextChange="addressText($event, index)" :value="item.address">
</EditText> -->
<view class="line"></view>
<view class="line" style="height: 25rpx;"></view>
</view>
</view>
</view>
<view style="height: 100rpx;background: #FFFFFF;" v-if="info.listActivityItems.length<6">
<view class="addData" @click="addData()">
<image style="width: 48rpx;height: 48rpx;" src="../../static/event-icon/add.png" mode="aspectFit">
</image>
<text style="color: #898989 ; margin-left: 10rpx;">点击继续添加活动项目</text>
</view>
</view>
<view style="height: 150px;"></view>
<!-- <view style="display: flex;flex-direction: column; margin-top: 100rpx; margin: 30rpx;height: 400rpx;">
<text style="color: #ff0000; font-size: 24rpx;">提示</text>
<text style="color: #ff0000; font-size: 24rpx; margin-top: 20rpx; line-height: 40rpx;">{{str}}</text>
</view> -->
<text class="btn" @click="jump()">奖项及其他设置</text>
</RefreshView>
</template>
<script>
export default {
data() {
return {
isCreate: 0,
pos: 0,
str: "\u3000\u3000为简化业余比赛中记分的繁琐我们特加了简易记分模式选择'记到场分'、'记到局分'时可以不录小分,如积分相同则随机抽签确定名次。",
price: "",
info: {
sid: "",
listActivityItems: [{
SportCategorySid: 1,
SportCategoryName: "乒乓球"
}],
}
}
},
onLoad: function(option) {
console.log('option.isCreate', option.isCreate)
this.isCreate = option.isCreate
this.info = JSON.parse(option.info)
console.log("info1===>" + option.info)
console.log("info2===>" + this.info)
if (this.info.listActivityItems.length == 0) {
console.log("2222>" + this.info.listActivityItems.length)
this.info.listActivityItems.push({
address: "",
placeSid: "",
endTime: this.TimeFormat(this.CurrentMillions(), "yyyy-MM-dd HH:mm"),
enrollMoney: "",
enrollNumbersLimit: "",
introduction: "",
name: "",
SportCategorySid: 1,
SportCategoryName: "乒乓球",
startTime: this.TimeFormat(this.CurrentMillions(), "yyyy-MM-dd HH:mm"),
})
}
console.log("info3===>>" + JSON.stringify(this.info.listActivityItems))
},
onShow() {
let backResult = this.OnActivityResult();
if (backResult != undefined) {
if (!this.IsEmpty(backResult.sid)) {
console.log("选择的球馆>" + JSON.stringify(backResult))
// 选择的球馆
this.info.listActivityItems[this.pos].gymnasiumSid = backResult.sid
this.info.listActivityItems[this.pos].address = backResult.name
console.log("选择的球馆>" + JSON.stringify(this.info.listActivityItems))
}
if (!this.IsEmpty(backResult.enrollMoney)) {
// 人数费用
console.log("enrollMoney>" + backResult.enrollMoney)
this.info.listActivityItems[this.pos].enrollMoney = backResult.enrollMoney
this.info.listActivityItems[this.pos].enrollNumbersLimit = backResult.enrollNumbersLimit
}
}
},
methods: {
backClick() {
let that = this
uni.showModal({
title: '提示',
content: '赛事未发布,是否保存草稿?',
success: function(res) {
if (res.confirm) { //这里是点击了确定以后
console.log('用户点击确定')
that.WriteGameCahce(that.info)
uni.navigateBack({
delta: 2
})
} else { //这里是点击了取消以后
console.log('用户点击取消')
uni.navigateBack({
delta: 2
})
}
}
})
},
leftBtnClick() {
this.WriteGameCahce(this.info)
uni.navigateBack({
delta: 2
})
},
rightBtnClick() {
if (this.IsEmpty(getApp().globalData.memberSid)) {
console.log('createSid', "无sid")
} else {
this.info.createSid = getApp().globalData.memberSid
console.log('createSid', JSON.stringify(this.info))
// this.HTTP({
// url: 'v1/activityManagement/saveActivity',
// method: 'POST',
// data: this.info,
// paramsType: "FORM",
// loading: true
// }).then((res) => {
// this.ClearGameCache(this.info)
// wx.navigateBack({
// delta: 3
// })
// });
}
},
topClik(index) {
this.WriteGameCahce(this.info)
switch (index) {
case 1:
uni.navigateTo({
url: "exemptionActivity?isCreate=" + this.isCreate +
"&info=" + JSON.stringify(this.info) // 页面 A
})
break
case 3:
uni.navigateTo({
url: "prizeActivity?isCreate=" + this.isCreate +
"&info=" + JSON.stringify(this.info) // 页面 A
})
break
}
},
nameText(e, index) {
this.info.listActivityItems[index].name = e.detail.value
},
explainText(e, index) {
this.info.listActivityItems[index].introduction = e.detail.value
},
onClick(index, pos) {
console.log("index=====>" + index)
console.log("pos=====>" + pos)
switch (pos) {
case 1:
this.info.listActivityItems[index].SportCategorySid = 1,
this.info.listActivityItems[index].SportCategoryName = "乒乓球"
console.log("info3===>>" + JSON.stringify(this.info.listActivityItems))
break
case 2:
this.info.listActivityItems[index].SportCategorySid = 2,
this.info.listActivityItems[index].SportCategoryName = "户外运动"
break
case 3:
this.info.listActivityItems[index].SportCategorySid = 3,
this.info.listActivityItems[index].SportCategoryName = "羽毛球"
break
case 4:
this.info.listActivityItems[index].SportCategorySid = 4,
this.info.listActivityItems[index].SportCategoryName = "足球"
break
case 5:
this.info.listActivityItems[index].SportCategorySid = 5,
this.info.listActivityItems[index].SportCategoryName = "篮球"
break
case 6:
this.info.listActivityItems[index].SportCategorySid = 6,
this.info.listActivityItems[index].SportCategoryName = "网球"
break
case 7:
this.info.listActivityItems[index].SportCategorySid = 7,
this.info.listActivityItems[index].SportCategoryName = "台球"
break
case 8:
this.info.listActivityItems[index].SportCategorySid = 8,
this.info.listActivityItems[index].SportCategoryName = "游泳"
break
case 9:
this.info.listActivityItems[index].SportCategorySid = 9,
this.info.listActivityItems[index].SportCategoryName = "保龄球"
break
case 10:
this.info.listActivityItems[index].SportCategorySid = 10,
this.info.listActivityItems[index].SportCategoryName = "滑雪"
break
}
},
getData(info) {
let num = info.enrollNumbersLimit == 0 ? "不限制人数" : info.enrollNumbersLimit + "人"
let price = info.enrollMoney == 0 ? "免费" : info.enrollMoney + "元"
return num + " / " + price
},
dateChange1(e, index) {
console.log("eee>" + e.f3)
console.log("index>" + index)
this.info.listActivityItems[index].startTime = e.f1 + " " + e.hh + ":" + e.mm
},
dateChange2(e, index) {
this.info.listActivityItems[index].endTime = e.f1 + " " + e.hh + ":" + e.mm
},
addressText(e, index) {
this.info.listActivityItems[index].address = e
},
deleteItem(item) {
let _this = this
console.log("====>" + _this.info.listActivityItems.length);
uni.showModal({
title: '温馨提示',
content: '确定要删除这条活动项目吗?',
success(res) {
if (res.confirm) {
_this.info.listActivityItems.splice(_this.info.listActivityItems.indexOf(item),
1);
console.log("====>" + _this.info.listActivityItems.length);
}
}
});
},
clickItem(e, index) {
this.pos = index
let _this = this
console.log("index====>" + index);
console.log("this.pos====>" + this.pos);
switch (e) {
case "人数费用":
uni.navigateTo({
url: "InputHappyGameLimitActivity?enrollNumbersLimit=" +
(_this.info.listActivityItems[index].enrollNumbersLimit == undefined ? "" :
_this.info.listActivityItems[index].enrollNumbersLimit) +
"&enrollMoney=" + (_this.info.listActivityItems[index].enrollMoney ==
undefined ? "" :
_this.info.listActivityItems[index].enrollMoney) +
"&type=" + (_this.info.listActivityItems[index].type == undefined ? "" :
_this.info.listActivityItems[index].type),
})
break;
case "活动地点":
uni.navigateTo({
url: "InputHappyGameAreaActivity",
})
break;
}
},
addData() {
this.info.listActivityItems.push({
name: "",
introduction: "",
enrollNumbersLimit: "",
enrollMoney: "",
startTime: this.TimeFormat(this.CurrentMillions(), "yyyy-MM-dd HH:mm"),
endTime: this.TimeFormat(this.CurrentMillions(), "yyyy-MM-dd HH:mm"),
address: "",
SportCategorySid: 1,
SportCategoryName: "乒乓球",
})
},
jump() {
let info = this.info.listActivityItems;
if (info.length == 0) {
this.Toast("请添加活动项目")
return
}
// 设置比赛项目
for (var i = 0; i < info.length; i++) {
if (this.IsEmpty(info[i].name)) {
this.Toast("请输入活动项目名称")
return
}
if (this.IsEmpty(info[i].introduction)) {
this.Toast("请输入活动项目说明")
return
}
if (this.IsEmpty(info[i].address)) {
this.Toast("请输入活动地点")
return
}
}
// console.log("leagth" + this.listActivityItems.length)
uni.navigateTo({
url: "prizeActivity?isCreate=" + this.isCreate +
"&info=" + JSON.stringify(this.info)
})
}
}
}
</script>
<style lang="scss">
.topLayout {
background: #F7F7F7;
display: flex;
padding: 30rpx 60rpx;
flex-direction: row;
align-items: center;
flex-direction: row;
justify-content: space-between;
.topLayout_item {
display: flex;
align-items: center;
flex-direction: row;
.topLayout_item_left1 {
width: 48rpx;
height: 48rpx;
background-color: #007AFF;
border-radius: 50%;
color: #FFFFFF;
font-size: 36rpx;
text-align: center;
}
.topLayout_item_left2 {
width: 48rpx;
height: 48rpx;
border: 1rpx solid #D9D9D9;
border-radius: 50%;
color: #D9D9D9;
font-size: 36rpx;
text-align: center;
}
}
}
.line {
width: 100%;
height: 5rpx;
background-color: #f5f4f9;
}
.tabLayout {
background: #FFFFFF 100%;
display: flex;
flex-direction: row;
padding-bottom: 20rpx;
}
.layout {
background: #FFFFFF 100%;
display: flex;
flex-direction: row;
padding: 30rpx 15rpx;
align-items: center;
.layout_lift {
font-size: 30rpx;
color: #101010;
}
.layout_right {
display: flex;
right: 32rpx;
align-items: center;
}
}
.labelLayout {
display: flex;
flex: 1;
margin-left: 10rpx;
margin-right: 10rpx;
background-color: #F2BF5C;
color: #FFFFFF;
padding-top: 5rpx;
padding-bottom: 5rpx;
justify-content: center;
text-align: center;
font-size: 30rpx;
}
.labelLayout2 {
background-color: #007AFF;
}
.items {
display: flex;
flex-direction: column;
.layout1 {
padding: 32rpx;
display: flex;
flex-direction: row;
align-items: center;
background: #FFFFFF;
.number {
width: 48rpx;
height: 48rpx;
background-color: #007AFF;
border-radius: 50%;
color: #FFFFFF;
font-size: 36rpx;
text-align: center;
}
.name {
margin-left: 20rpx;
width: 80%;
}
}
.layout2 {
margin-top: 10rpx;
background: #FFFFFF;
display: flex;
padding: 32rpx;
height: auto;
.explain {
width: 100%;
}
}
.layout3 {
background: #FFFFFF;
display: flex;
margin-top: 10rpx;
flex-direction: row;
padding: 32rpx;
.layout_lift {
font-size: 28rpx;
color: #101010;
}
.layout_mobile {
display: flex;
flex: 1;
margin-left: 20rpx;
font-size: 28rpx;
color: #8F8F94;
}
.input {
flex: 1;
width: auto;
margin-left: 20rpx;
}
.layout_right {
display: flex;
right: 32rpx;
align-items: center;
.layout_right_text {
margin-right: 10rpx;
font-size: 28rpx;
color: #080808;
}
}
}
}
.addData {
display: flex;
flex-direction: row;
background: #FFFFFF;
padding: 32rpx;
align-items: center;
}
.btn {
justify-content: center;
width: 100%;
margin-top: 100rpx;
padding: 30rpx;
font-size: 28rpx;
color: #FFFFFF;
background: #007AFF;
text-align: center;
flex: 1;
position: absolute;
bottom: 0;
}
</style>

View File

@@ -0,0 +1,79 @@
<template>
<RefreshView ref="mescrollRef" :hasBack="true" text="赞助商详情" :useDownScroll="false" :useUpScroll="false"
useTitleRightBtn="0">
<image style="width: 100%;height: 300rpx;" :src="info.logo"
mode="scaleToFill">
</image>
<view style="background-color: #fff;padding-top:10rpx; padding-bottom: 10rpx; padding-left:20rpx ;">
<text style="font-size: 35rpx;">{{info.name}}</text>
</view>
<view style="height: 10rpx;background-color: #eee;margin-top: 10rpx;"></view>
<view
style="background-color: #fff;padding-top:10rpx; padding-bottom: 10rpx; padding-left:20rpx ;padding-right: 20rpx;">
<view style="font-size: 30rpx;padding: 5rpx;color: #666666;">联系方式{{info.linkerName+" "+info.linkerPhone}}</view>
<view style="font-size: 30rpx;padding: 5rpx;color: #666666;">网址{{info.webUrl}}</view>
<view style="font-size: 30rpx;padding: 5rpx;color: #666666;">地址{{info.address}}</view>
</view>
<view style="height: 10rpx;background-color: #eee;"></view>
<view
style="display: flex;flex-direction: column; background-color: #fff;padding-top:10rpx; padding-bottom: 10rpx; padding-left:20rpx ;padding-right: 20rpx;">
<text style="font-size: 30rpx;padding: 5rpx;color: #666666;">单位简介</text>
<text
style="font-size: 28rpx;padding: 5rpx;color: #666666;">{{info.introduction}}</text>
</view>
</RefreshView>
</template>
<script>
export default {
data() {
return {
sponsorSid: "",
info: {
name: "",
address: "",
introduction: "",
linkerName: "",
linkerPhone: "",
logo: "",
webUrl: "",
userSid: ""
}
}
},
onLoad: function(option) {
this.sponsorSid = option.sponsorSid;
},
onShow() {
let that = this
this.HTTP({
url: 'aos/v1/sponsorManagement/getSponsorDetailsBySid/' + that.sponsorSid,
method: 'GET',
paramsType: "FORM",
loading: true
}).then((res) => {
that.info = res.data
console.log('=======', JSON.stringify(that.info))
});
},
methods: {}
};
</script>
<style lang="scss">
</style>

198
pages/index/sponsorList.vue Normal file
View File

@@ -0,0 +1,198 @@
<template>
<view style="background: #F1F2F5;">
<RefreshView @refresh="refresh" ref="mescrollRef" :pageBg="F1F2F5" :hasBack="true" text="赞助商"
:useDownScroll="false" :useUpScroll="false" useTitleRightBtn="1" useTitleLeftBtn="1"
titleRightBtnSource="确定" titleLeftBtnSource="新增" @rightBtn='rightBtnClick' @leftBtn='leftClick'>
<view v-if="err" style="width: 100vw;height: 100vh;line-height: 100vh;text-align: center;"
@click="refresh()">点击重试</view>
<view v-if="!err">
<view v-for="(item,index) in sponsorList " :key="index">
<view
style="display: flex;flex-direction: row; padding: 20rpx;background-color: #fff; margin: 20rpx;">
<image style="width: 150rpx;height: 150rpx;" :src="item.logo" mode="aspectFill"
@click="img(item.sid)"></image>
<view
style="display: flex;flex-direction: column;margin-left: 30rpx;flex: 1;margin-right: 30rpx;margin-top: 15rpx;">
<text style=" display:-webkit-box;-webkit-line-clamp:1;
overflow:hidden;text-overflow:ellipsis;-webkit-box-orient:vertical;
word-break:break-all;">{{item.name}}</text>
<view style="display: flex;flex-direction: row;margin-top: 30rpx;">
<text>{{item.linkerName}}</text>
<text style="margin-left: 20rpx;">{{item.linkerPhone}}</text>
</view>
</view>
<checkbox-group style="display: flex; align-items: center;"
@change="checkboxChange($event, index)">
<checkbox :checked="item.checked"></checkbox>
</checkbox-group>
</view>
</view>
</view>
</RefreshView>
</view>
</template>
<script>
// 必须
import MescrollMixin from "@/components/mescroll-uni/mescroll-mixins.js";
export default {
// 使用mixin (在main.js注册全局组件) 必须
mixins: [MescrollMixin],
data() {
return {
err: false,
sponsorList: [
],
info: {
sidList: [],
nameList: []
}
}
},
onShow() {
let backResult = this.OnActivityResult();
console.log("++++++++",backResult);
if (backResult != undefined) {
console.log("++++++++");
this.refresh()
}
},
methods: {
refresh(page) {
let _this = this
this.Login()
.then((res) => {
this.HTTP({
url: 'aos/v1/sponsorManagement/getSponsorListByUsersid/' + res,
paramsType: "FORM",
method: "GET",
data: {
},
loading: true
}).then((res) => {
// 追加数据
_this.sponsorList = res.data
this.info.sidList = []
this.info.nameList = []
console.log("初始化=====>" + JSON.stringify(_this.sponsorList))
_this.err = false
});
}).catch(function(err) {
if (page == undefined || page.num == 1)
_this.err = true
})
},
rightBtnClick() {
console.log("右=====>" + JSON.stringify(this.info.sidList))
if (this.info.sidList.length == 0) {
this.Toast("请选择赞助商")
return
}
this.SetResult(this.info)
},
leftClick() {
uni.navigateTo({
url: 'addSponsor'
})
},
img(sid) {
uni.navigateTo({
url: 'sponsorDetail?sponsorSid=' + sid
})
},
checkboxChange(e, index) {
console.log("index=====>" + index)
this.sponsorList[index].checked = !this.sponsorList[index].checked
if (this.sponsorList[index].checked) {
this.info.sidList.push(this.sponsorList[index].sid)
this.info.nameList.push(this.sponsorList[index].name)
} else {
this.info.sidList.splice(this.sponsorList.indexOf(index), 1)
this.info.nameList.splice(this.sponsorList.indexOf(index), 1)
}
console.log("sidList=====>" + JSON.stringify(this.info.sidList))
console.log("nameList=====>" + JSON.stringify(this.info.nameList))
},
}
}
</script>
<style lang="scss">
.top {
display: flex;
flex-direction: row;
height: 100rpx;
background: #FFFFFF;
opacity: 0.8;
align-items: center;
border-radius: 20rpx;
margin-top: 20rpx;
margin-left: 30rpx;
margin-right: 30rpx;
.unselected {
text-align: center;
font-size: 28rpx;
font-family: Adobe Heiti Std;
font-weight: normal;
color: #191919;
line-height: 40rpx;
}
.selected {
text-align: center;
font-size: 28rpx;
font-family: Adobe Heiti Std;
font-weight: normal;
color: #2CAB69;
line-height: 40rpx;
border-bottom: 2rpx #2CAB69 solid;
padding-bottom: 10rpx;
}
}
.btn1 {
background: #CCCCCC;
}
.btn2 {
background: #09BE4F;
}
.btn3 {
background: #FF2B2B;
}
.btn4 {
background: #0081D5;
}
</style>