Commit b454c8c7 authored by 刘鑫鹏's avatar 刘鑫鹏

Merge remote-tracking branch 'origin/dev' into dev

parents fded5f49 49f1f9f4
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
"navigationBarTitleText": "天体运动" "navigationBarTitleText": "天体运动"
} }
} }
], ],
"globalStyle": { "globalStyle": {
"navigationBarTextStyle": "black", "navigationBarTextStyle": "black",
"navigationBarTitleText": "天体运动", "navigationBarTitleText": "天体运动",
...@@ -52,7 +52,6 @@ ...@@ -52,7 +52,6 @@
"style": { "style": {
"navigationBarTitleText": "赛事活动详情", "navigationBarTitleText": "赛事活动详情",
"enablePullDownRefresh": false "enablePullDownRefresh": false
// "navigationStyle": "custom"
} }
}, },
{ {
...@@ -105,7 +104,7 @@ ...@@ -105,7 +104,7 @@
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
}, },
{ {
"path": "activity_signInExam/acvity_signInExam", "path": "activity_signInExam/acvity_signInExam",
"style": { "style": {
...@@ -113,7 +112,7 @@ ...@@ -113,7 +112,7 @@
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
}, },
{ {
"path": "activity_signInSucc/activity_signInSucc", "path": "activity_signInSucc/activity_signInSucc",
"style": { "style": {
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<uni-icons type="contact-filled" size="100" color="#AFAFAF"></uni-icons> <uni-icons type="contact-filled" size="100" color="#AFAFAF"></uni-icons>
<!-- 登录按钮 --> <!-- 登录按钮 -->
<!-- 可以从 @getuserinfo 事件处理函数的形参中,获取到用户的基本信息 --> <!-- 可以从 @getuserinfo 事件处理函数的形参中,获取到用户的基本信息 -->
<button type="primary" class="btn-login" @click="getWXUserCode()">一键登录</button> <button :disabled="flag" type="primary" class="btn-login" @click="getWXUserCode()">一键登录</button>
<!-- <button class="avatar-wrapper" open-type="chooseAvatar" @chooseavatar="onChooseAvatar"> <!-- <button class="avatar-wrapper" open-type="chooseAvatar" @chooseavatar="onChooseAvatar">
<image class="avatar" :src="avatarUrl"></image> <image class="avatar" :src="avatarUrl"></image>
</button> </button>
...@@ -31,6 +31,7 @@ ...@@ -31,6 +31,7 @@
export default { export default {
data() { data() {
return { return {
flag:false,
// code:'', // code:'',
tokenflag: true, tokenflag: true,
// openid: "", // openid: "",
...@@ -52,6 +53,8 @@ ...@@ -52,6 +53,8 @@
...mapMutations('m_user', ['updateToken']), ...mapMutations('m_user', ['updateToken']),
...mapMutations('m_user', ['updateUserInfo']), ...mapMutations('m_user', ['updateUserInfo']),
getWXUserCode() { getWXUserCode() {
console.log("点击了按钮");
this.flag = true
console.log(this.token); console.log(this.token);
console.log("获取登录信息") console.log("获取登录信息")
uni.login({ uni.login({
...@@ -66,6 +69,7 @@ ...@@ -66,6 +69,7 @@
uni.redirectTo({ uni.redirectTo({
url: this.url url: this.url
}) })
// this.flag = false
}) })
} }
}); });
......
<template> <template>
<view> <view>
<noData v-if="activityList.length === 0"></noData> <noData v-if="activityLength === 0"></noData>
<view class="activityContainer" v-if="activityList.length !== 0"> <view class="activityContainer" v-if="activityLength !== 0">
<view class="activity_item" v-for="(item,index) in activityList" :key="index" @click="gotoDetail(item)"> <view class="activity_item" v-for="(item,index) in activityList" :key="index" @click="gotoDetail(item)">
<view> <view>
<image class="image" :src="item.bannerImage"></image> <image class="image" :src="item.bannerImage"></image>
...@@ -61,7 +61,8 @@ ...@@ -61,7 +61,8 @@
total: 0, total: 0,
type: '', type: '',
url: '/pages_activity/activity/activity', url: '/pages_activity/activity/activity',
flag: true flag: true,
activityLength:1
}; };
}, },
computed: { computed: {
...@@ -86,13 +87,13 @@ ...@@ -86,13 +87,13 @@
}, },
onLoad() { onLoad() {
this.login() this.login()
this.getList() // this.getList()
}, },
// created() { created() {
// uni.setStorageSync("title", '赛事活动') // uni.setStorageSync("title", '赛事活动')
// this.getList() // this.getList()
// this.getList() this.getList()
// }, },
onShow() { onShow() {
console.log('onShow') console.log('onShow')
this.getList() this.getList()
...@@ -140,10 +141,14 @@ ...@@ -140,10 +141,14 @@
this.isloading = true this.isloading = true
listActivity(this.queryParams.pageNum).then(response => { listActivity(this.queryParams.pageNum).then(response => {
console.log("赛事活动:", response) console.log("赛事活动:", response)
this.activityList = [...this.activityList, ...response.rows] || [] if(response.code == 200){
this.total = response.total || []; this.activityList = [...this.activityList, ...response.rows] || []
this.activityLength = this.activityList.length
this.total = response.total || [];
}else{
this.activityLength = 0
}
this.isloading = false; this.isloading = false;
// 只要数据请求完毕,就立即按需调用 cb 回调函数 // 只要数据请求完毕,就立即按需调用 cb 回调函数
cb && cb() cb && cb()
}); });
...@@ -201,7 +206,7 @@ ...@@ -201,7 +206,7 @@
overflow-x:hidden; overflow-x:hidden;
.activity_item { .activity_item {
margin: 20rpx 20rpx 20rpx 20rpx; margin: 30rpx 30rpx 30rpx 30rpx;
height: 100%; height: 100%;
// width: 706rpx; // width: 706rpx;
background: #ffffff; background: #ffffff;
...@@ -224,10 +229,10 @@ ...@@ -224,10 +229,10 @@
.image-status { .image-status {
// justify-content: end; // justify-content: end;
position: absolute; position: absolute;
padding-left: 87%; padding-left: 86%;
top: -5rpx; top: 0rpx;
width: 105rpx; width: 98rpx;
height: 105rpx; height: 98rpx;
z-index: 99; z-index: 99;
// margin-left: 128rpx; // margin-left: 128rpx;
} }
...@@ -253,7 +258,7 @@ ...@@ -253,7 +258,7 @@
height: 77rpx; height: 77rpx;
opacity: 0.6; opacity: 0.6;
background: #000000; background: #000000;
top: -90rpx; top: -80rpx;
z-index: 9; z-index: 9;
font-size: 18px; font-size: 18px;
font-weight: 500; font-weight: 500;
......
...@@ -115,14 +115,20 @@ ...@@ -115,14 +115,20 @@
signupId: null, signupId: null,
} }
}, },
// onLaunch(){
// this.getList(this.activityId)
// },
onLoad(options) { onLoad(options) {
console.log('onLoad')
this.activityId =Number.parseInt(options.activity_id) this.activityId =Number.parseInt(options.activity_id)
console.log(this.activityId)
this.getList(this.activityId) this.getList(this.activityId)
}, },
onShow() { // onShow() {
console.log('onShow') // console.log('onShow')
this.getList(this.activityId) // this.getList(this.activityId)
}, // },
filters: { filters: {
ellipsis(value){ ellipsis(value){
if (!value) return ''; if (!value) return '';
...@@ -139,6 +145,7 @@ ...@@ -139,6 +145,7 @@
methods:{ methods:{
getList(activityId){ getList(activityId){
getActivity(activityId).then(response=>{ getActivity(activityId).then(response=>{
console.log(response)
this.activityObject = response.data this.activityObject = response.data
this.activityObject.detail = this.activityObject.detail.replace(/src="/,`src="https://www.aiwanyundong.com`) this.activityObject.detail = this.activityObject.detail.replace(/src="/,`src="https://www.aiwanyundong.com`)
console.log(this.activityObject) console.log(this.activityObject)
...@@ -249,6 +256,18 @@ ...@@ -249,6 +256,18 @@
}, },
//立即报名 //立即报名
immedSignIn(){ immedSignIn(){
var signInSum = 0
var limitSum = 0
for (var i = 0; i < this.activityObject.tjtActivityProjectVoList.length; i++) {
signInSum = signInSum + this.activityObject.tjtActivityProjectVoList[i].projectSignupNum
}
for (var i = 0; i < this.activityObject.tjtActivityProjectVoList.length; i++) {
limitSum = limitSum + this.activityObject.tjtActivityProjectVoList[i].limitPeople
}
console.log(signInSum)
console.log(limitSum)
if(signInSum === limitSum)
return uni.$showMsg('报名人数已满1!')
if (this.activityObject.activityStatus === '2') { if (this.activityObject.activityStatus === '2') {
return uni.$showMsg('活动已结束!') return uni.$showMsg('活动已结束!')
} }
...@@ -337,7 +356,7 @@ ...@@ -337,7 +356,7 @@
height: 77rpx; height: 77rpx;
opacity: 0.6; opacity: 0.6;
background: #000000; background: #000000;
top: -90rpx; top: -82rpx;
z-index: 9; z-index: 9;
font-size: 18px; font-size: 18px;
font-weight: 500; font-weight: 500;
......
...@@ -212,7 +212,7 @@ import { ...@@ -212,7 +212,7 @@ import {
if(this.projectIndex===this.projectList.length) if(this.projectIndex===this.projectList.length)
return '' return ''
else else
return this.projectSignupNum + '人/' + this.limitPeople + '人' return this.projectSignupNum + '/' + this.limitPeople
} }
}, },
methods: { methods: {
...@@ -241,39 +241,40 @@ import { ...@@ -241,39 +241,40 @@ import {
return uni.$showMsg('报名人数已满!') return uni.$showMsg('报名人数已满!')
} }
if(this.projectFee !== 0){ if(this.projectFee !== 0){
this.info.status = '0'
addsignInInfo(this.info).then(response=>{ addsignInInfo(this.info).then(response=>{
console.log(response) console.log(response)
if(response.code === 500) if(response.data.status ==='1')
return uni.$showMsg(response.msg) return uni.$showMsg(response.msg)
this.orderVo.signupId = response.data this.orderVo.signupId = response.data.signupId
this.orderVo.wechatId = this.info.wechatId this.orderVo.wechatId = this.info.wechatId
// if(response.code === 200){ if(response.data.status === '0'){
// addUnifiedOrder(this.orderVo).then(response =>{ addUnifiedOrder(this.orderVo).then(response =>{
// console.log(response) console.log(response)
// uni.requestPayment({ uni.requestPayment({
// provider:'wxpay', provider:'wxpay',
// timeStamp: response.data.timeStamp, timeStamp: response.data.timeStamp,
// nonceStr: response.data.nonceStr, nonceStr: response.data.nonceStr,
// package: response.data.package, package: response.data.package,
// signType: response.data.signType, signType: response.data.signType,
// paySign: response.data.paySign, paySign: response.data.paySign,
// success:function(res){ success:function(res){
// console.log('success'+ JSON.stringify(res)) console.log('success'+ JSON.stringify(res))
// uni.showLoading({ uni.showLoading({
// title: '报名成功!', title: '报名成功!',
// }) })
// setTimeout(() => { setTimeout(() => {
// uni.navigateBack({ uni.navigateBack({
// delta: 1 delta: 1
// }); });
// }, 1000); }, 1000);
// }, },
// fail: function (err) { fail: function (err) {
// console.log('fail:' + JSON.stringify(err)); console.log('fail:' + JSON.stringify(err));
// } }
// }) })
// }) })
// } }
}) })
}else{ }else{
this.info.status = '1' this.info.status = '1'
......
...@@ -550,7 +550,7 @@ ...@@ -550,7 +550,7 @@
}, },
onLoad(options) { onLoad(options) {
this.examTime = new Date().toISOString().substring(0, 10) this.examTime = options.examTime
this.signupId = Number(options.signupId) this.signupId = Number(options.signupId)
this.activityId = Number(options.activityId) this.activityId = Number(options.activityId)
this.getExamTime() this.getExamTime()
......
...@@ -73,7 +73,7 @@ ...@@ -73,7 +73,7 @@
break break
} }
} }
if(i==response.length){ if(i==res.length){
this.flag = 1 this.flag = 1
} }
} }
...@@ -91,6 +91,7 @@ ...@@ -91,6 +91,7 @@
}) })
return return
} }
console.log("答题情况",this.flag);
if (this.flag > 0) { if (this.flag > 0) {
uni.showToast({ uni.showToast({
title: '您今日已答题', title: '您今日已答题',
......
...@@ -292,7 +292,7 @@ ...@@ -292,7 +292,7 @@
uni.navigateBack({ uni.navigateBack({
delta: 1 delta: 1
}) })
}, 1200); }, 1500);
}) })
} }
}, },
......
...@@ -54,12 +54,12 @@ ...@@ -54,12 +54,12 @@
contentFlag: false, contentFlag: false,
url: '', url: '',
personnel: { personnel: {
consultType:'1', consultType:'',
consultContent: '', consultContent: '',
nickName: '', nickName: '',
phone: '', phone: '',
wechatId: '', wechatId: '',
consult_type : '0' // consult_type : '0'
}, },
rules: { rules: {
// consultContent: { // consultContent: {
...@@ -128,7 +128,8 @@ ...@@ -128,7 +128,8 @@
onLoad(options) { onLoad(options) {
this.personnel.wechatId = this.userInfo.wechatId this.personnel.wechatId = this.userInfo.wechatId
console.log("this.userInfo:", this.userInfo) console.log("this.userInfo:", this.userInfo)
this.url = options.url this.personnel.consultType = options.consultType
console.log("从别的页面传来的consultType--->", this.personnel.consultType)
}, },
onReady() { onReady() {
// 需要在onReady中设置规则 // 需要在onReady中设置规则
......
...@@ -100,7 +100,7 @@ ...@@ -100,7 +100,7 @@
}, },
messageConsult(e) { messageConsult(e) {
uni.navigateTo({ 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'
}) })
}, },
...@@ -196,10 +196,10 @@ ...@@ -196,10 +196,10 @@
} }
.button-hover { .button-hover {
{
background-color: rgba(144, 238, 144, 0.5); background-color: rgba(144, 238, 144, 0.5);
opacity: 0.7; opacity: 0.7;
}
} }
/* 标题css */ /* 标题css */
......
...@@ -13,11 +13,13 @@ ...@@ -13,11 +13,13 @@
</view> </view>
</scroll-view> </scroll-view>
</view> </view>
<noData v-if="customerList.length === 0" :style="fullHeight"></noData> <noData v-if="!customerListLength" :style="fullHeight"></noData>
<!-- 选项卡内容轮播滑动显示,current为当前第几个swiper子项 --> <!-- 选项卡内容轮播滑动显示,current为当前第几个swiper子项 -->
<swiper @change="change" :current="isActive" class="swiper-content" :style="fullHeight" <!-- <swiper @change="change" :current="isActive" class="swiper-content" :style="fullHeight"
v-if="customerList.length !== 0"> v-if="customerList.length !== 0">
<swiper-item class="swiperitem-content"> <swiper-item class="swiperitem-content"> -->
<view class="swiper-content" :style="fullHeight" v-if="customerList.length !== 0">
<view class="swiperitem-content">
<scroll-view scroll-y style="height: 100%;" @scrolltolower="lowerBottom" lower-threshold="150px" <scroll-view scroll-y style="height: 100%;" @scrolltolower="lowerBottom" lower-threshold="150px"
refresher-enabled="true" @refresherrefresh="refresh" :refresher-triggered="triggered"> refresher-enabled="true" @refresherrefresh="refresh" :refresher-triggered="triggered">
<view class="nav_item"> <view class="nav_item">
...@@ -32,8 +34,11 @@ ...@@ -32,8 +34,11 @@
</view> </view>
</view> </view>
</scroll-view> </scroll-view>
</swiper-item> </view>
</swiper> </view>
<!-- </swiper-item>
</swiper> -->
<view class="nav_item_bottom"> <view class="nav_item_bottom">
<button style="background-color:#3b7cde; color:white;" @click="goPhoneBtn(phoneNumber)">咨询电话</button> <button style="background-color:#3b7cde; color:white;" @click="goPhoneBtn(phoneNumber)">咨询电话</button>
<button type="primary" @click="gotoMessageConsult">留言咨询</button> <button type="primary" @click="gotoMessageConsult">留言咨询</button>
...@@ -74,6 +79,7 @@ ...@@ -74,6 +79,7 @@
}, },
data() { data() {
return { return {
customerListLength: 1,
// token:uni.getStorageSync("token"), // token:uni.getStorageSync("token"),
triggered: false, //自定义下拉刷新状态 triggered: false, //自定义下拉刷新状态
isActive: 0, isActive: 0,
...@@ -156,7 +162,7 @@ ...@@ -156,7 +162,7 @@
gotoMessageConsult() { gotoMessageConsult() {
console.log("准备进入到留言咨询。。。。") console.log("准备进入到留言咨询。。。。")
uni.navigateTo({ 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 +180,7 @@ ...@@ -174,7 +180,7 @@
// this.triggered = false // this.triggered = false
setTimeout(() => { setTimeout(() => {
this.triggered = false this.triggered = false
}, 1000); }, 3000);
}, },
//触底加载更多 //触底加载更多
lowerBottom() { lowerBottom() {
...@@ -198,7 +204,8 @@ ...@@ -198,7 +204,8 @@
console.log(response); console.log(response);
console.log("response", response); console.log("response", response);
this.customerList = [...this.customerList, ...response.rows] 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) { if (this.customerList.length >= response.total) {
this.onMore = false this.onMore = false
} }
...@@ -350,7 +357,7 @@ ...@@ -350,7 +357,7 @@
min-height: calc(100% - 10%); min-height: calc(100% - 10%);
padding: 5rpx; padding: 5rpx;
height: auto; height: auto;
padding-bottom: 15%; padding-bottom: 20%;
.customer-item { .customer-item {
margin: 20rpx 5%; margin: 20rpx 5%;
......
...@@ -3,11 +3,11 @@ import store from '@/store/store.js' ...@@ -3,11 +3,11 @@ import store from '@/store/store.js'
const url_all = { const url_all = {
// 'DEV': 'http://192.168.1.161:8080', // 开发 // 'DEV': 'http://192.168.1.161:8080', // 开发
// 'DEV': 'http://192.168.0.99:8080', // 'DEV': 'http://192.168.0.97:8080',
// DEV: "http://116.205.136.218:8088/api", //线上服务 // DEV: "http://116.205.136.218:8088/api", //线上服务
// 'DEV': 'http://localhost:8080', // 开发 // 'DEV': 'http://127.0.0.1:8080', // 开发
'DEV': 'http://192.168.0.97:8080' // 'DEV': 'http://192.168.1.11:8080'
// 'DEV': 'https://www.aiwanyundong.com/api/' 'DEV': 'https://www.aiwanyundong.com/api/'
}; };
let BASEURL = url_all["DEV"]; let BASEURL = url_all["DEV"];
......
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