Commit c50f9702 authored by 王永阿飞's avatar 王永阿飞
parents d2624e20 7eb69253
......@@ -107,3 +107,27 @@ export function selectexamType(examType) {
}
//查询某个用户总分
export function getCumulativeScore(activityId,signupId) {
return request({
url: `/tjt-race/rank/select/${activityId}/${signupId}`,
method: 'get',
})
}
//添加某个用户总分
export function updateCumulativeScore(tjtSignupScore) {
return request({
url: `/tjt-race/rank/update/TjtSignupScore`,
method: 'post',
data:tjtSignupScore
})
}
//查询某个答题活动积分排行
export function selectTjtSignupScoreList(activityId,pageNum) {
return request({
url: `/tjt-race/rank/list/${activityId}/${pageNum}`,
method: 'get',
})
}
......@@ -307,7 +307,16 @@
"navigationStyle": "custom"
}
}]
} ,{
"path" : "tjt_rank/tjt_rank",
"style" :
{
"navigationBarTitleText": "答题排行",
"enablePullDownRefresh": false
}
}
]
},
{
"root": "pages_feedback",
......
<template>
<view>
<view style="height: 100vh;">
<view class="login-container" v-if="tokenflag">
<view class="logo-image">
<image src="../../static/login/denglu_logo.png" style="width: 88px;height: 88px;"></image>
</view>
<button :disabled="flag" type="primary" class="btn-login" @click="getWXUserCode()">一键登录</button>
<button :disabled="flag" class="cancel-login" @click="gotoAbove()">返回</button>
<view class="logo-bottom">
<image src="../../static/login/pic_denglu.png" mode="aspectFit" style="width: 100%;height: 100%;"></image>
</view>
<!-- 提示登录的图标 -->
<uni-icons type="contact-filled" size="100" color="#AFAFAF"></uni-icons>
<!-- <uni-icons type="contact-filled" size="100" color="#AFAFAF"></uni-icons> -->
<!-- 登录按钮 -->
<!-- 可以从 @getuserinfo 事件处理函数的形参中,获取到用户的基本信息 -->
<button :disabled="flag" type="primary" class="btn-login" @click="getWXUserCode()">一键登录</button>
<!-- <button :disabled="flag" type="primary" class="btn-login" @click="getWXUserCode()">一键登录</button> -->
<!-- <button :disabled="flag" type="primary" class="cancel-login" @click="gotoAbove()">取消</button> -->
<!-- <button class="avatar-wrapper" open-type="chooseAvatar" @chooseavatar="onChooseAvatar">
<image class="avatar" :src="avatarUrl"></image>
</button>
......@@ -31,7 +40,7 @@
export default {
data() {
return {
flag:false,
flag: false,
// code:'',
tokenflag: true,
// openid: "",
......@@ -74,6 +83,11 @@
}
});
},
gotoAbove() {
uni.reLaunch({
url: '/pages_home/tjty_home_page/tjty_home_page',
})
},
getUserProfile() {
uni.getUserProfile({
desc: '获取微信用户的昵称与头像', // 声明获取用户个人信息后的用途,后续会展示在弹窗中,请谨慎填写
......@@ -132,41 +146,64 @@
<style lang="scss">
.login-container {
// 登录盒子的样式
height: 750rpx;
display: flex;
height: 100%;
// display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
background-color: #f8f8f8;
// background-color: #f8f8f8;
background: linear-gradient(226deg, #4a8ef5, #3b7cdd 100%);
position: relative;
overflow: hidden;
// 绘制登录盒子底部的半椭圆造型
&::after {
content: ' ';
display: block;
.logo-image {
height: 88px;
width: 88px;
position: relative;
top: 15%;
margin: 0% auto;
}
.logo-bottom {
position: absolute;
width: 100%;
height: 40px;
left: 0;
bottom: 0;
background-color: white;
border-radius: 100%;
transform: translateY(50%);
height: 35%;
top: 65%;
}
// 登录按钮的样式
.btn-login {
width: 90%;
border-radius: 100px;
margin: 15px 0;
background-color: #c00000;
position: relative;
z-index: 1;
width: 400rpx;
height: 88rpx;
background: #ffffff;
border-radius: 16px;
font-size: 18px;
font-family: Source Han Sans CN, Source Han Sans CN-Medium;
font-weight: 500;
text-align: center;
color: #3b7cde;
line-height: 88rpx;
top: 50%;
}
.cancel-login {
position: relative;
z-index: 1;
width: 400rpx;
height: 88rpx;
border: 1px solid #ffffff;
border-radius: 16px;
font-size: 18px;
font-family: Source Han Sans CN, Source Han Sans CN-Medium;
font-weight: 500;
text-align: center;
color: #ffffff;
line-height: 88rpx;
top: 56%;
background-color: transparent;
}
// 按钮下方提示消息的样式
// .tips-text {
// font-size: 12px;
// color: gray;
// }
}
</style>
......@@ -26,7 +26,7 @@
</view>
<view class="appoint-card-a">
<view v-if="appoin.remarks == null" class="appoint-card-ainfo">暂无课程详情</view>
<view v-else class="appoint-card-ainfo">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{{appoin.remarks}}</view>
<view v-else class="appoint-card-ainfo">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<rich-text :nodes="appoin.remarks"></rich-text></view>
</view>
<view class="appoint-footer">
<button @click="toAppli()" style="color: #FFFFFF;">立即预约</button>
......
<template>
<view class="rank-page">
<noData v-if="haveFlag"></noData>
<view class="rank-pages">
<view class="rank-top">
<view>排名</view>
<view>参赛人</view>
<view>积分</view>
<view>累计用时</view>
</view>
<view class="rank-content">
<view class="rank-item" v-for="(item,index) in tjtSignupScoreList" :key="index">
<view>{{item.rank}}</view>
<view>{{item.tjtActivitySignupExam.name}}</view>
<view>{{item.score}}</view>
<view>{{item.totalTime}}</view>
</view>
</view>
<view class="rank-bottom">
<uni-load-more :icon-size="14" :status="status" :content-text="contentText" @clickLoadMore="getMore()"/>
</view>
</view>
</view>
</template>
<script>
import {
selectTjtSignupScoreList
} from '@/api/dailyAnswer.js'
export default {
data() {
return {
haveFlag: false,
pageNum: 1,
tjtSignupScoreList: [],
status: 'more',
contentText: {
contentdown: '加载更多',
contentrefresh: '加载中',
contentnomore: '没有更多啦'
},
reload: false,
};
},
methods: {
getTjtSignupScoreList() {
return new Promise((resolve, reject) => {
selectTjtSignupScoreList(this.activityId, this.pageNum).then(res => {
console.log(res);
if (res.code == 200) {
this.tjtSignupScoreList = [...this.tjtSignupScoreList, ...res.rows]
if(this.tjtSignupScoreList.length<res.total){
this.status = 'more'
}else{
this.status = 'nomore'
}
} else {
this.haveFlag = true
}
})
resolve();
})
},
getMore(){
if(this.status == 'nomore' || this.status == 'loading'){
return
}else{
this.status = 'loading'
this.pageNum += 1
this.getTjtSignupScoreList()
}
}
},
onLoad(options) {
this.activityId = options.activityId
this.getTjtSignupScoreList()
}
}
</script>
<style lang="scss">
.rank-page {
width: 100%;
min-height: 100%;
height: auto;
.rank-pages {
min-height: 90%;
height: auto;
.rank-top {
width: 94%;
height: 70rpx;
margin-top: 40rpx;
margin-left: 3%;
display: flex;
flex-direction: row;
background-color: #A4ADB3;
text-align: center;
font-family: PingFangSC-regular;
font-size: 16px;
:nth-child(n) {
margin-top: 2%;
}
:nth-child(1) {
width: 20%;
}
:nth-child(2) {
width: 28%;
}
:nth-child(3) {
width: 22%;
}
:nth-child(4) {
width: 30%;
}
}
.rank-content {
margin-left: 3%;
width: 94%;
min-height: calc(90vh-110rpx);
height: auto;
font-size: 14px;
text-align: center;
font-family: PingFangSC-regular;
padding-bottom: 10%;
.rank-item {
display: flex;
flex-direction: row;
width: 100%;
margin-top: 8.5%;
:nth-child(1) {
width: 20%;
}
:nth-child(2) {
width: 28%;
}
:nth-child(3) {
width: 22%;
}
:nth-child(4) {
width: 30%;
}
}
}
.rank-bottom {
position: relative;
z-index: 2;
bottom: 10rpx;
// left: 40%;
}
}
}
</style>
......@@ -81,25 +81,25 @@
<image style="width: 51px; height: 16px; float: right; margin-right: 11px;"
src="../../static/home-imgs/home_pic_gengduo@2x.png" @click="toExeMore()"></image>
</view>
<view class="home_exercise_item" v-for="(item,index) in exerciseList" :key="index">
<view class="home_exercise_item" v-for="(item,index) in exerciseList" :key="index" @click="toAppoint(item)">
<view class="ima">
<image style="width: 116px;height:116px;border-radius:16px "
:src="'https://www.aiwanyundong.com/stage-api' + item.image"></image>
</view>
<view style="width: 66%;">
<view style="height: 80px;">
<view style="width: 66%; margin-left: 10rpx;">
<view class="a-card">
{{item.mechanismName}}
</view>
<view class="c-card">
适用人群:&nbsp;&nbsp;{{item.propertyPeople}}
</view>
</view>
<view>
<!-- <view>
<button class="b-card" @click="toAppoint(item)">
详情
</button>
</view>
</view> -->
</view>
</view>
</view>
......@@ -174,9 +174,9 @@
...mapState('m_user', ['token'])
},
onPullDownRefresh() {
this.activityList = [],
this.exerciseList = [],
this.login()
this.activityList = []
this.exerciseList = []
this.login()
uni.stopPullDownRefresh()
},
methods: {
......@@ -410,7 +410,7 @@
font-weight: 400;
text-align: left;
color: #666666;
line-height: 50px;
line-height: 100rpx;
}
......@@ -426,7 +426,7 @@
font-weight: 700;
text-align: left;
color: #333333;
line-height: 42px;
line-height: 120rpx;
}
.b-card {
......
......@@ -20,7 +20,7 @@
</view>
</uni-card>
<view class="newMedia-button-view">
<button style="background-color: #3B7CDE;" class="newMedia-button" @click="submitForm">提交</button>
<button style="background-color: #3B7CDE;" :disabled="disabledFag" class="newMedia-button" @click="submitForm">提交</button>
</view>
......@@ -50,8 +50,9 @@
export default {
data() {
return {
// 对输入的内容进行校验的标志
contentFlag: false,
disabledFag: false,//避免重复提交的校验标志
contentFlag: false,// 对输入的内容进行校验的标志
url: '',
personnel: {
consultType: '',
......@@ -139,7 +140,7 @@
methods: {
// 提交按钮
submitForm() {
console.log("咨询内容--->", this.personnel)
// this.disabledFag = true
if (this.personnel.consultContent && this.personnel.consultContent.length > 0) {
let reg = /^\s*$/
if (reg.test(this.personnel.consultContent)) {
......@@ -148,15 +149,14 @@
}
}
this.$refs.form.validate().then(res => {
console.log("留言咨询内容--->:", this.personnel)
submitConsultAxios(this.personnel).then(response => {
console.log("提交咨询:", response)
if (response.code == 200) {
// 打开弹窗
this.$refs.popup.open('center')
} else {
// this.disabledFag = false
uni.showToast({
title: '咨询提交失败,请您稍后在试',
duration: 1000,
......
......@@ -4,7 +4,7 @@
<swiper v-if="opusType == '1'" class="swiper-home" indicator-dots="true" autoplay="true" interval="2000"
circular="true" indicator-color="#000" indicator-active-color="#FF0000">
<swiper-item v-for="(item,index) in bannerList" :key="index">
<image :src="item.url" :webp="true" @click="clickImg(item.url)"></image>
<image :src="item.url" :webp="true" @click="clickImg(index)"></image>
</swiper-item>
</swiper>
<video v-if=" opusType == '2'" id="myVideo" class="video" show-fullscreen-btn :src="bannerList[0].url"
......@@ -54,7 +54,7 @@
...mapState('m_user', ['userInfo']),
},
onLoad(option) { //option为object类型,会序列化上个页面传递的参数
this.weChatId = this.userInfo.wechatId
this.weChatId = this.userInfo.wechatId
console.log("详情页获取的信息:", JSON.parse(option.param))
if (option.param) {
console.log("详情页获取的信息:", JSON.parse(option.param))
......@@ -68,17 +68,17 @@
this.opusType = JSON.parse(option.param).opusType
this.opusId = JSON.parse(option.param).productionId
}
},
methods: {
clickImg(imgUrl) {
wx.previewImage({
urls: [imgUrl], //需要预览的图片http链接列表,多张的时候,url直接写在后面就行了
current: '', // 当前显示图片的http链接,默认是第一个
success: function(res) {},
fail: function(res) {},
complete: function(res) {},
clickImg(index) {
let photoList = this.bannerList.map(item => {
return item.url;
});
uni.previewImage({
current: index,
urls: photoList
})
},
......@@ -122,7 +122,7 @@
})
}
},
}
</script>
......
......@@ -20,7 +20,7 @@ const url_all = {
// 开发版
develop: 'https://www.aiwanyundong.com/stage-api',
// develop: 'https://www.aiwanyundong.com/api',
// develop: 'http://192.168.0.63:8080',
// develop: 'http://127.0.0.1:8080',
// 体验版
trial: 'https://www.aiwanyundong.com/stage-api',
// 正式版
......
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