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

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

parents fded5f49 49f1f9f4
......@@ -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": {
......
......@@ -5,7 +5,7 @@
<uni-icons type="contact-filled" size="100" color="#AFAFAF"></uni-icons>
<!-- 登录按钮 -->
<!-- 可以从 @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">
<image class="avatar" :src="avatarUrl"></image>
</button>
......@@ -31,6 +31,7 @@
export default {
data() {
return {
flag:false,
// code:'',
tokenflag: true,
// openid: "",
......@@ -52,6 +53,8 @@
...mapMutations('m_user', ['updateToken']),
...mapMutations('m_user', ['updateUserInfo']),
getWXUserCode() {
console.log("点击了按钮");
this.flag = true
console.log(this.token);
console.log("获取登录信息")
uni.login({
......@@ -66,6 +69,7 @@
uni.redirectTo({
url: this.url
})
// this.flag = false
})
}
});
......
<template>
<view>
<noData v-if="activityList.length === 0"></noData>
<view class="activityContainer" v-if="activityList.length !== 0">
<noData v-if="activityLength === 0"></noData>
<view class="activityContainer" v-if="activityLength !== 0">
<view class="activity_item" v-for="(item,index) in activityList" :key="index" @click="gotoDetail(item)">
<view>
<image class="image" :src="item.bannerImage"></image>
......@@ -61,7 +61,8 @@
total: 0,
type: '',
url: '/pages_activity/activity/activity',
flag: true
flag: true,
activityLength:1
};
},
computed: {
......@@ -86,13 +87,13 @@
},
onLoad() {
this.login()
this.getList()
// this.getList()
},
// created() {
created() {
// uni.setStorageSync("title", '赛事活动')
// this.getList()
// this.getList()
// },
this.getList()
},
onShow() {
console.log('onShow')
this.getList()
......@@ -140,10 +141,14 @@
this.isloading = true
listActivity(this.queryParams.pageNum).then(response => {
console.log("赛事活动:", response)
this.activityList = [...this.activityList, ...response.rows] || []
this.total = response.total || [];
if(response.code == 200){
this.activityList = [...this.activityList, ...response.rows] || []
this.activityLength = this.activityList.length
this.total = response.total || [];
}else{
this.activityLength = 0
}
this.isloading = false;
// 只要数据请求完毕,就立即按需调用 cb 回调函数
cb && cb()
});
......@@ -201,7 +206,7 @@
overflow-x:hidden;
.activity_item {
margin: 20rpx 20rpx 20rpx 20rpx;
margin: 30rpx 30rpx 30rpx 30rpx;
height: 100%;
// width: 706rpx;
background: #ffffff;
......@@ -224,10 +229,10 @@
.image-status {
// justify-content: end;
position: absolute;
padding-left: 87%;
top: -5rpx;
width: 105rpx;
height: 105rpx;
padding-left: 86%;
top: 0rpx;
width: 98rpx;
height: 98rpx;
z-index: 99;
// margin-left: 128rpx;
}
......@@ -253,7 +258,7 @@
height: 77rpx;
opacity: 0.6;
background: #000000;
top: -90rpx;
top: -80rpx;
z-index: 9;
font-size: 18px;
font-weight: 500;
......
......@@ -115,14 +115,20 @@
signupId: null,
}
},
// onLaunch(){
// this.getList(this.activityId)
// },
onLoad(options) {
console.log('onLoad')
this.activityId =Number.parseInt(options.activity_id)
console.log(this.activityId)
this.getList(this.activityId)
},
onShow() {
console.log('onShow')
this.getList(this.activityId)
},
// onShow() {
// console.log('onShow')
// this.getList(this.activityId)
// },
filters: {
ellipsis(value){
if (!value) return '';
......@@ -139,6 +145,7 @@
methods:{
getList(activityId){
getActivity(activityId).then(response=>{
console.log(response)
this.activityObject = response.data
this.activityObject.detail = this.activityObject.detail.replace(/src="/,`src="https://www.aiwanyundong.com`)
console.log(this.activityObject)
......@@ -249,6 +256,18 @@
},
//立即报名
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') {
return uni.$showMsg('活动已结束!')
}
......@@ -337,7 +356,7 @@
height: 77rpx;
opacity: 0.6;
background: #000000;
top: -90rpx;
top: -82rpx;
z-index: 9;
font-size: 18px;
font-weight: 500;
......
......@@ -212,7 +212,7 @@ import {
if(this.projectIndex===this.projectList.length)
return ''
else
return this.projectSignupNum + '人/' + this.limitPeople + '人'
return this.projectSignupNum + '/' + this.limitPeople
}
},
methods: {
......@@ -241,39 +241,40 @@ import {
return uni.$showMsg('报名人数已满!')
}
if(this.projectFee !== 0){
this.info.status = '0'
addsignInInfo(this.info).then(response=>{
console.log(response)
if(response.code === 500)
if(response.data.status ==='1')
return uni.$showMsg(response.msg)
this.orderVo.signupId = response.data
this.orderVo.signupId = response.data.signupId
this.orderVo.wechatId = this.info.wechatId
// if(response.code === 200){
// addUnifiedOrder(this.orderVo).then(response =>{
// console.log(response)
// uni.requestPayment({
// provider:'wxpay',
// timeStamp: response.data.timeStamp,
// nonceStr: response.data.nonceStr,
// package: response.data.package,
// signType: response.data.signType,
// paySign: response.data.paySign,
// success:function(res){
// console.log('success'+ JSON.stringify(res))
// uni.showLoading({
// title: '报名成功!',
// })
// setTimeout(() => {
// uni.navigateBack({
// delta: 1
// });
// }, 1000);
// },
// fail: function (err) {
// console.log('fail:' + JSON.stringify(err));
// }
// })
// })
// }
if(response.data.status === '0'){
addUnifiedOrder(this.orderVo).then(response =>{
console.log(response)
uni.requestPayment({
provider:'wxpay',
timeStamp: response.data.timeStamp,
nonceStr: response.data.nonceStr,
package: response.data.package,
signType: response.data.signType,
paySign: response.data.paySign,
success:function(res){
console.log('success'+ JSON.stringify(res))
uni.showLoading({
title: '报名成功!',
})
setTimeout(() => {
uni.navigateBack({
delta: 1
});
}, 1000);
},
fail: function (err) {
console.log('fail:' + JSON.stringify(err));
}
})
})
}
})
}else{
this.info.status = '1'
......
......@@ -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()
......
......@@ -73,7 +73,7 @@
break
}
}
if(i==response.length){
if(i==res.length){
this.flag = 1
}
}
......@@ -91,6 +91,7 @@
})
return
}
console.log("答题情况",this.flag);
if (this.flag > 0) {
uni.showToast({
title: '您今日已答题',
......
......@@ -292,7 +292,7 @@
uni.navigateBack({
delta: 1
})
}, 1200);
}, 1500);
})
}
},
......
......@@ -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中设置规则
......
......@@ -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'
})
},
......@@ -196,10 +196,10 @@
}
.button-hover {
{
background-color: rgba(144, 238, 144, 0.5);
opacity: 0.7;
}
}
/* 标题css */
......
......@@ -13,11 +13,13 @@
</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"
<!-- <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"> -->
<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"
refresher-enabled="true" @refresherrefresh="refresh" :refresher-triggered="triggered">
<view class="nav_item">
......@@ -32,8 +34,11 @@
</view>
</view>
</scroll-view>
</swiper-item>
</swiper>
</view>
</view>
<!-- </swiper-item>
</swiper> -->
<view class="nav_item_bottom">
<button style="background-color:#3b7cde; color:white;" @click="goPhoneBtn(phoneNumber)">咨询电话</button>
<button type="primary" @click="gotoMessageConsult">留言咨询</button>
......@@ -74,6 +79,7 @@
},
data() {
return {
customerListLength: 1,
// token:uni.getStorageSync("token"),
triggered: false, //自定义下拉刷新状态
isActive: 0,
......@@ -156,7 +162,7 @@
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 +180,7 @@
// this.triggered = false
setTimeout(() => {
this.triggered = false
}, 1000);
}, 3000);
},
//触底加载更多
lowerBottom() {
......@@ -198,7 +204,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 +357,7 @@
min-height: calc(100% - 10%);
padding: 5rpx;
height: auto;
padding-bottom: 15%;
padding-bottom: 20%;
.customer-item {
margin: 20rpx 5%;
......
......@@ -3,11 +3,11 @@ import store from '@/store/store.js'
const url_all = {
// '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://localhost:8080', // 开发
'DEV': 'http://192.168.0.97:8080'
// 'DEV': 'https://www.aiwanyundong.com/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"];
......
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