Commit a4ef38d3 authored by 王永阿飞's avatar 王永阿飞
parents c6bbab6a b9a1cd11
......@@ -17,7 +17,7 @@
"navigationBarTitleText": "天体运动"
}
}
],
],
"globalStyle": {
"navigationBarTextStyle": "black",
"navigationBarTitleText": "天体运动",
......@@ -52,7 +52,6 @@
"style": {
"navigationBarTitleText": "赛事活动详情",
"enablePullDownRefresh": false
// "navigationStyle": "custom"
}
},
{
......@@ -105,7 +104,7 @@
"enablePullDownRefresh": false
}
},
{
"path": "activity_signInExam/acvity_signInExam",
"style": {
......@@ -113,7 +112,7 @@
"enablePullDownRefresh": false
}
},
{
"path": "activity_signInSucc/activity_signInSucc",
"style": {
......
......@@ -11,8 +11,8 @@
<view class="Info">
<uni-forms ref="form" border :model="formInfo" :modelValue="formInfo">
<uni-forms-item label="姓名" required name="name">
<uni-easyinput :inputBorder="false" v-model="formInfo.name" placeholder="请输入姓名"
:clearable="false"></uni-easyinput>
<uni-easyinput :inputBorder="false" v-model="formInfo.name" placeholder="请输入姓名"
maxlength="16" learable="false"></uni-easyinput>
</uni-forms-item>
<uni-forms-item label="性别" required name="sex">
<picker @change="sexPickerChange" :value="index" :range="array" range-key="name">
......
......@@ -115,8 +115,8 @@
.appoint-card-ainfo{
// margin: ;
margin-left: 50px;
// margin-left: 50px;
padding: 5% 5% 0 5%;
font-size: 16px;
font-family: Source Han Sans CN, Source Han Sans CN-Regular;
font-weight: 400;
......
......@@ -50,7 +50,7 @@
</view>
</view>
</view>
<view class="bottomAdd" v-show="total >= max" @tap="more">查看更多</view>
<view style="margin-left: 35%;margin-bottom: 20px;" @tap="more" v-show="total >= queryParams.pageNum * queryParams.pageSize">点击加载更多...</view>
</view>
</scroll-view>
</swiper-item>
......@@ -91,6 +91,7 @@
</view>
</view>
</view>
<view style="margin-left: 35%;margin-bottom: 20px;" @tap="more" v-show="total >= queryParams.pageNum * queryParams.pageSize">点击加载更多...</view>
</view>
</scroll-view>
</swiper-item>
......@@ -131,6 +132,7 @@
</view>
</view>
</view>
<view style="margin-left: 35%;margin-bottom: 20px;" @tap="more" v-show="total >= queryParams.pageNum * queryParams.pageSize">点击加载更多...</view>
</view>
</scroll-view>
</swiper-item>
......@@ -170,6 +172,7 @@
</view>
</view>
</view>
<view style="margin-left: 35%;margin-bottom: 20px;" @tap="more" v-show="total >= queryParams.pageNum * queryParams.pageSize">点击加载更多...</view>
</view>
</scroll-view>
</swiper-item>
......@@ -210,6 +213,7 @@
</view>
</view>
</view>
<view style="margin-left: 35%;margin-bottom: 20px;" @tap="more" v-show="total >= queryParams.pageNum * queryParams.pageSize">点击加载更多...</view>
</view>
</scroll-view>
</swiper-item>
......@@ -242,7 +246,8 @@
},
data() {
return {
max:5,
max:10,
f:10,
// token:uni.getStorageSync("token"),
onMore: true,
loadStatus:'loading',
......@@ -334,15 +339,11 @@
onLoad() {
this.login()
this.list(1, this.queryParams.pageNum)
// this.getList()
},
// onReachBottom(){ //上拉触底函数
// if(!this.isLoadMore){ //此处判断,上锁,防止重复请求
// this.isLoadMore=true
// this.page+=1
// this.list()
// }},
methods: {
more() {
......@@ -376,30 +377,6 @@
}
},
//下拉刷新
// refresh() {
// this.triggered = true;
// //重置关键数据
// this.queryParams.pageNum = 1
// this.total = 0
// // this.queryParams.pageSize = 10
// this.isloading = false
// this.ByTypelist = []
// this.onMore = true
// //重新发起数据请求
// this.list()
// // this.triggered = false
// setTimeout(() => {
// this.triggered = false
// }, 1000);
// },
//获取更新token
getWXUserCode() {
console.log(this.token);
......@@ -419,40 +396,11 @@
}
});
},
// ReachBottom() {
// if (this.queryParams.pageNum * this.queryParams.pageSize >= this.total)
// return uni.$showMsg('数据加载完毕!')
// // if (this.isloading) return
// //让页码自增1
// this.queryParams.pageNum += 1
// console.log(this.queryParams.pageNum)
// // 重新获取列表数据
// this.flag = false
// this.list(this.type, this.queryParams.pageNum)
// },
// lowerBottom() {
// // console.log('触底加载更多');
// if (this.isloading) return
// if (!this.onMore) {
// uni.showToast({
// title: '没有更多数据了',
// icon: "none"
// })
// return
// }
// this.queryParams.pageNum += 1
// this.list(id,this.queryParams.pageNum)
// },
toAppoint(item) {
uni.navigateTo({
url: '/pages_course/tjty_course_appointment/appointment?id=' + item.courseId
})
},
// 获取标题区域宽度,和每个子元素节点的宽度以及元素距离左边栏的距离
getScrollW() {
const query = uni.createSelectorQuery().in(this);
......@@ -710,7 +658,7 @@
.bottomAdd {
display: flex;
justify-content: center;
margin-left: 50%;
color: rgb(94, 94, 94);
padding-bottom: 10px;
}
......
......@@ -550,7 +550,7 @@
},
onLoad(options) {
this.examTime = new Date().toISOString().substring(0, 10)
this.examTime = options.examTime
this.signupId = Number(options.signupId)
this.activityId = Number(options.activityId)
this.getExamTime()
......
......@@ -69,7 +69,8 @@
getAreaList,
getPeople,
dailyQuestion,
selectexamType
selectexamType,
selectRegisterList
} from '@/api/dailyAnswer.js'
import {
getActivity
......@@ -81,6 +82,7 @@
export default {
data() {
return {
registerPeopleNum: 0, //本微信报名人数
examCount: '', //题库试卷判断
idFlag: '',
color: 'background:#EEEEEE',
......@@ -219,20 +221,56 @@
},
computed: {
...mapState('m_user', ['userInfo'])
},
onLoad(options) {
this.info.activityId = options.activityId
this.info.wechatId = this.userInfo.wechatId
this.getArea()
this.getActivityDetial(options.activityId)
this.getPerson()
uni.setStorageSync('pages', 'ans_info')
},
onShow() {
this.getPerson()
this.getRegisterListLength()
},
onHide() {
this.info.areaId = 1
this.getArea()
this.cityIndex = this.cityList.length - 1
this.cityCode = ''
this.info.cityId = ''
this.areaIndex = 16
this.areaDisable = true
this.areaCode = ''
this.info.cityAreaId = ''
this.schoolIndex = -1
this.schoolCode = ''
this.info.schoolId = ''
this.schoolDisable = true
this.info.idFlag = false
this.info.areaId = 1
this.info.parentName = ''
this.info.name = ''
this.info.phone = ''
this.info.idCard = ''
this.info.cityId = ''
this.info.cityAreaId = ''
this.info.schoolId = ''
},
onReady() {
this.$refs.form.setRules(this.rules)
},
methods: {
//获取报名人数
getRegisterListLength() {
selectRegisterList(this.info.wechatId, this.info.activityId).then(res => {
if (res.code === 200) {
console.log("本微信号报名信息", res);
this.registerPeopleNum = res.data.length
}
})
},
IdChange(e) {
// console.log(e);
let idCareReg =
......@@ -295,6 +333,29 @@
if (this.info.idFlag) {
return
}
if (this.registerPeopleNum === 3) {
return uni.$showMsg('每个答题活动最多只能报名三人!')
this.cityIndex = this.cityList.length - 1
this.cityCode = ''
this.info.cityId = ''
this.areaIndex = 16
this.areaDisable = true
this.areaCode = ''
this.info.cityAreaId = ''
this.schoolIndex = -1
this.schoolCode = ''
this.info.schoolId = ''
this.schoolDisable = true
this.info.idFlag = false
this.info.areaId = 1
this.info.parentName = ''
this.info.name = ''
this.info.phone = ''
this.info.idCard = ''
this.info.cityId = ''
this.info.cityAreaId = ''
this.info.schoolId = ''
}
addTjtActivitySignupExams(this.info).then(res => {
console.log(res);
if (res >= 0 && res !== '') {
......@@ -311,9 +372,9 @@
dailyQuestion(res, time).then(res1 => {
console.log("试卷", res1);
if (res1.data.length > 0) {
if(this.examCount === 0){
if (this.examCount === 0) {
return uni.$showMsg('报名成功,暂无试卷!')
}else{
} else {
uni.showToast({
title: '报名成功!',
icon: 'none'
......@@ -339,6 +400,7 @@
}).catch(err => {
this.info.idFlag = this.idFlag
console.log(this.info.idFlag);
this.getPerson()
console.log('表单错误信息:', err);
})
},
......
......@@ -25,14 +25,16 @@
<view class="info">
<view class="question">
<text>{{item.activityName}}</text>
<view class="item1">
<!-- <view class="item1"> -->
<image class="image-status" src="../../static/oper-icon/content_tag_weikaishi@2x.png"
v-if="item.activityStatus==='0'"></image>
<image class="image-status" src="../../static/oper-icon/content_tag_jinxingzhong@2x.png"
v-else-if="item.activityStatus==='1'"></image>
<image class="image-status" src="../../static/oper-icon/content_tag_yijieshu@2x.png" v-else>
</image>
</view>
<!-- </view> -->
</view>
<dividerface></dividerface>
......@@ -67,6 +69,10 @@
import {
getMyActivitySignupByWechatId
} from "@/api/myActivity.js";
import {
getSinInInfo
} from "@/api/activity.js";
import {
userInfo
} from 'os';
......@@ -77,6 +83,7 @@
status: 1,
myActivitylist: [],
total: 0,
signInList: []
}
},
computed: {
......@@ -84,7 +91,9 @@
},
onLoad() {
this.wechatId = this.userInfo.wechatId
this.getList(this.wechatId)
// this.getlista(this.wechatId,this.activityId)
},
methods: {
getList(wechatId) {
......@@ -96,6 +105,14 @@
console.log(this.total)
});
},
// getlista(wechatId,activityId){
// getSinInInfo(wechatId,activityId).then(response=>{
// console.log("jkbnj",response)
// this.signInList =[...this.signInList, ...response.rows] || []
// })
// },
goActivity(type, wechatId, activityId) {
if (type === '1') {
......@@ -114,9 +131,15 @@
},
goDetail(type, wechatId, activityId){
if(type==='2'){
uni.navigateTo({
url: `/pages_events/tjty_ans_detail/tjty_ans_detail?activityId=${activityId}`
// uni.navigateTo({
// url: `/pages_events/tjty_ans_detail/tjty_ans_detail?activityId=${activityId}`
// })
getSinInInfo(wechatId,activityId).then(response=>{
console.log("jkbnj",response)
this.signInList =response.data
})
}
else{
uni.navigateTo({
......@@ -146,7 +169,18 @@
border-radius: 16px;
box-shadow: 0px 3px 10px 0px #dddddd;
.image-status {
position: relative;
// top: -120rpx;
left: 82%;
width: 120rpx;
height: 120rpx;
z-index: 4;
}
// :nth-child(1) {
......@@ -161,7 +195,17 @@
color: #333333;
line-height: 36px;
.question {
margin-top: 5%;
margin: 2% 18% 0 5%;
min-height: 72px;
height: auto;
line-height: 30px;
font-size: 18px;
font-family: Source Han Sans CN, Source Han Sans CN-Regular;
}
.item {
......@@ -178,35 +222,26 @@
}
.item1 {
// padding: 5% 5%;
// font-size: 35rpx;
// font-family: Source Han Sans CN, Source Han Sans CN-Regular;
// font-weight: 200;
// color: #333333;
.image-status {
position: relative;
top: -60rpx;
left: 98%;
width: 120rpx;
height: 120rpx;
z-index: 9;
}
padding: 5% 5%;
font-size: 35rpx;
font-family: Source Han Sans CN, Source Han Sans CN-Regular;
font-weight: 200;
color: #333333;
// .image-status {
// position: relative;
// top: -90rpx;
// left: 98%;
// width: 120rpx;
// height: 120rpx;
// z-index: 9;
// }
}
}
.question {
margin-top: 5%;
margin: 2% 15% 0 5%;
min-height: 72px;
height: auto;
line-height: 30px;
font-size: 18px;
font-family: Source Han Sans CN, Source Han Sans CN-Regular;
}
}
......
......@@ -23,6 +23,7 @@
<view class="item">上课地点:&nbsp;&nbsp;{{item.mechanismAddress|ellipsis}}</view>
</view>
</view>
<view style="margin-left: 35%;margin-bottom: 20px;" @tap="more" v-show="total >= queryParams.pageNum * queryParams.pageSize">点击加载更多...</view>
</view>
</template>
......@@ -38,7 +39,7 @@ import { userInfo } from 'os'
export default {
data(){
return{
max:10,
wechatId:"",
AppointmentList:[],
queryParams: {
......@@ -69,6 +70,22 @@ import { userInfo } from 'os'
}
},
methods:{
more() {
this.max += 10; //每次点击加1条
if (this.queryParams.pageNum * this.queryParams.pageSize >= this.total)
return uni.$showMsg('数据加载完毕!')
// if (this.isloading) return
//让页码自增1
this.queryParams.pageNum += 1
console.log(this.queryParams.pageNum)
// 重新获取列表数据
this.flag = false
this.getList(this.wechatId, this.queryParams.pageNum)
},
getList(wechatId,pageNum) {
listByWid(wechatId,pageNum).then(response => {
console.log(response)
......@@ -142,5 +159,8 @@ import { userInfo } from 'os'
height: 334rpx;
}
}
</style>
\ No newline at end of file
......@@ -54,12 +54,12 @@
contentFlag: false,
url: '',
personnel: {
consultType:'1',
consultType:'',
consultContent: '',
nickName: '',
phone: '',
wechatId: '',
consult_type : '0'
// consult_type : '0'
},
rules: {
// consultContent: {
......@@ -128,7 +128,8 @@
onLoad(options) {
this.personnel.wechatId = this.userInfo.wechatId
console.log("this.userInfo:", this.userInfo)
this.url = options.url
this.personnel.consultType = options.consultType
console.log("从别的页面传来的consultType--->", this.personnel.consultType)
},
onReady() {
// 需要在onReady中设置规则
......
<template>
<view>
<noData v-if="flag == 0"></noData>
<uni-card class="newMedia-card-main" v-if="flag == 1">
<view class="newMedia-card-main" v-if="flag == 1">
<text class="title-text">{{!issue.titleName ? '--' : issue.titleName}}</text>
<view class="message-view">
<text style="color: #3B7CDE">{{!issueBranch ? "--" : issueBranch}}</text>
......@@ -12,11 +12,11 @@
<!-- <view v-for="item in listImg">
<image :src="base_url + item" :webp="true"></image>
</view> -->
<view style="width: 650rpx;">
<!-- <view style="width: 630rpx;"> -->
<rich-text :nodes="issue.detail"></rich-text>
</view>
<!-- </view> -->
</view>
</uni-card>
</view>
<view class="newMedia-button-view">
<button style="background-color: #3B7CDE; margin-left: 40rpx;" class="newMedia-button"
@click="goPhoneBtn(phoneNumber)">咨询电话</button>
......@@ -46,8 +46,8 @@
phoneNumber: '188222333444',
issue: {},
listImg: [],
address:'天津',
detail:'',
address: '天津',
detail: '',
pushTime: '',
base_url: 'https://www.aiwanyundong.com/api',
// base_url: 'http://192.168.0.97:8080',
......@@ -100,7 +100,7 @@
},
messageConsult(e) {
uni.navigateTo({
url: '/pages_new_media/tity_message_consult/tity_message_consult?url=' + this.url
url: '/pages_new_media/tity_message_consult/tity_message_consult?consultType=' + 0
})
},
......@@ -117,14 +117,15 @@
// if(this.issue.pushTime){
// this.pushTime = this.issue.pushTime.substring(0, 16).replace('T', ' ')
// }
if(this.issue.updateTime){
if (this.issue.updateTime) {
this.pushTime = this.issue.updateTime.substring(0, 16).replace('T', ' ')
if(this.issue.address){
this.address = this.issue.address
}}
var reg = new RegExp('<body*>','gi')
var reg1 = new RegExp('</body*>','gi')
if (this.issue.address) {
this.address = this.issue.address
}
}
var reg = new RegExp('<body*>', 'gi')
var reg1 = new RegExp('</body*>', 'gi')
this.issue.detail = this.issue.detail.replace(reg, '')
this.issue.detail = this.issue.detail.replace(reg1, '')
console.log("处理后的内容--->", this.issue.detail)
......@@ -163,18 +164,31 @@
</script>
<style scoped>
/*
/deep/.uni-card {
display: flex;
/* margin-top: -20rpx; */
margin-top: -20rpx;
margin: 10.5rpx;
border-radius: 32rpx 32rpx 0 0;
min-height: 1330rpx;
height: auto;
width: 670rpx;
margin-bottom: 166px;
margin-bottom: 166px;
transform: translateX(-12rpx);
}
*/
.newMedia-card-main{
background-color: #fff;
margin: 30rpx 20rpx 0 20rpx;
padding: 35rpx 30rpx 30rpx 30rpx;
border-radius: 32rpx 32rpx 0 0;
/* min-height: 1330rpx; */
height: auto;
/* width: 670rpx; */
margin-bottom: 170rpx;
}
.newMedia-button-view {
display: flex;
/* margin-bottom: 50rpx; */
......@@ -196,10 +210,9 @@
}
.button-hover {
{
background-color: rgba(144, 238, 144, 0.5);
opacity: 0.7;
}
background-color: rgba(144, 238, 144, 0.5);
opacity: 0.7;
}
/* 标题css */
......@@ -221,13 +234,9 @@
/* 正文样式 */
.content-view {
margin-bottom: 150rpx;
margin-right: 20rpx;
}
margin-top: 30rpx;
/* margin-bottom: 120rpx; */
/* margin-right: 20rpx; */
/* 隐藏滚动条,但依旧具备可以滚动的功能 */
/deep/.uni-scroll-view::-webkit-scrollbar {
display: none
}
</style>
......@@ -13,11 +13,11 @@
</view>
</scroll-view>
</view>
<noData v-if="customerList.length === 0" :style="fullHeight"></noData>
<noData v-if="!customerListLength" :style="fullHeight"></noData>
<!-- 选项卡内容轮播滑动显示,current为当前第几个swiper子项 -->
<swiper @change="change" :current="isActive" class="swiper-content" :style="fullHeight"
v-if="customerList.length !== 0">
<swiper-item class="swiperitem-content">
<swiper-item class="swiperitem-content" @touchmove.stop="stopTouchMove">
<scroll-view scroll-y style="height: 100%;" @scrolltolower="lowerBottom" lower-threshold="150px"
refresher-enabled="true" @refresherrefresh="refresh" :refresher-triggered="triggered">
<view class="nav_item">
......@@ -74,6 +74,7 @@
},
data() {
return {
customerListLength: 1,
// token:uni.getStorageSync("token"),
triggered: false, //自定义下拉刷新状态
isActive: 0,
......@@ -152,11 +153,15 @@
}
});
},
//限制页面左右滑动
stopTouchMove() {
return true
},
//留言咨询
gotoMessageConsult() {
console.log("准备进入到留言咨询。。。。")
uni.navigateTo({
url: '/pages_new_media/tity_message_consult/tity_message_consult?url=' + this.url
url: '/pages_new_media/tity_message_consult/tity_message_consult?consultType=' + '1'
})
},
//下拉刷新
......@@ -174,7 +179,7 @@
// this.triggered = false
setTimeout(() => {
this.triggered = false
}, 1000);
}, 3000);
},
//触底加载更多
lowerBottom() {
......@@ -198,7 +203,8 @@
console.log(response);
console.log("response", response);
this.customerList = [...this.customerList, ...response.rows]
console.log("this.customerList->", this.customerList)
// console.log("this.customerList->", this.customerList)
this.customerListLength = response.rows.length
if (this.customerList.length >= response.total) {
this.onMore = false
}
......@@ -350,7 +356,7 @@
min-height: calc(100% - 10%);
padding: 5rpx;
height: auto;
padding-bottom: 15%;
padding-bottom: 35%;
.customer-item {
margin: 20rpx 5%;
......
// import 'vuex' from vuex
import store from '@/store/store.js'
const url_all = {
// 'DEV': 'http://192.168.1.161:8080', // 开发
// 'DEV': 'http://192.168.0.97:8080',
// DEV: "http://116.205.136.218:8088/api", //线上服务
// 'DEV': 'http://127.0.0.1:8080', // 开发
// 'DEV': 'http://192.168.1.11:8080'
'DEV': 'https://www.aiwanyundong.com/api/'
};
let BASEURL = url_all["DEV"];
export const request = (options = {}) => {
return new Promise((resolve, rejects) => {
handleRequest(options, resolve, rejects);
});
};
// 发起请求
function handleRequest(options, resolve, reject) {
let header = options.headers || {};
const isToken = header.isToken === undefined || header.isToken === true;
// todo: getToken() 重写
if (isToken && getToken()) {
header["Authorization"] = "Bearer " + getToken(); // 让每个请求携带自定义token 请根据实际情况自行修改
}
//请求
uni.request({
url: BASEURL + options.url,
method: options.method.toUpperCase(),
data: options.data,
header: header,
success: (response) => {
// console.log(response)
return resolve(response.data);
},
fail: (fail) => {
console.log("fail", fail);
return reject(fail);
},
});
}
//获取token
function getToken() {
// return "eyJhbGciOiJIUzUxMiJ9.eyJsb2dpbl91c2VyX2tleSI6IjljZDRiMmJmLTNjZDAtNDNjNy1hZWJhLTJkMWNiNjYwNGU3NiJ9.pEQ5o6rVhGmryKt23avS9BV_2F5Z-3ujS30uAWIZkZQL3GCnnsFgsBYnKHErEFLvKZRQV7efnq_MCJZCjOTcJA"
return 'wx_' + store.state.m_user.token;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment