Browse Source

修复bug-1

master
max 3 years ago
parent
commit
5642d57831
  1. 2
      pages/center/order/order.wxml
  2. 3
      pages/center/orderdetail/orderdetail.wxss
  3. 4
      pages/club/clubDetail/clubDetail.wxml
  4. 6
      pages/club/manage/manage.js
  5. 6
      pages/club/manage/manage.wxml
  6. 2
      pages/dateTimePicker.js
  7. 4
      pages/index/activeDetail/activeDetail.wxml
  8. 8
      pages/index/index.wxml
  9. 37
      pages/index/myjoin/myjoin.js
  10. 8
      pages/index/myjoin/myjoin.wxml
  11. 45
      pages/index/order/order.js
  12. 16
      pages/index/order/order.wxml
  13. 7
      pages/index/order/order.wxss
  14. 22
      pages/release/addactive/addactive.js
  15. 6
      project.config.json

2
pages/center/order/order.wxml

@ -24,7 +24,7 @@
</view>
<view class="list-right">
<view class="list-name">{{item.activityName}}</view>
<view class="list-time">{{item.startTime}} - {{item.endTime}}</view>
<view class="list-time">开始:{{item.startTime}} <view></view> 结束:{{item.endTime}}</view>
<view class="list-people">{{item.createdTime}}<text class="orangeO1">¥{{item.cost}}</text></view>
</view>
</view>

3
pages/center/orderdetail/orderdetail.wxss

@ -15,6 +15,7 @@ page{background: #EDEDED;}
.carList .carInfo .carPrice{line-height:60rpx;width:100%;height:60rpx;font-size:24rpx;color:#E60303;}
.carList .carInfo .carChange{line-height:50rpx;width:100%;height:50rpx;font-size:24rpx;color:#8C8989;display:flex;justify-content: space-between;}
.contentCircle{padding:20rpx 0;}
.infomation{height:60rpx;line-height:60rpx;display: flex;justify-content: space-between;font-size:28rpx;}
.infomation{line-height:60rpx;font-size:28rpx;}
/* height:60rpx; display: flex;justify-content: space-between; */
.infomation .shoptitle{color:#807373}
.footer{width:94%;height:96rpx;line-height:96rpx;text-align: center;background:#F66A01;color:#fff;margin:34rpx auto;border-radius:16rpx;}

4
pages/club/clubDetail/clubDetail.wxml

@ -12,7 +12,7 @@
<text>{{company.clubName}}</text>
<image wx:if="{{isflage<=3}}" src="../../../images/manage.png" bindtap="tomanage"></image>
</view>
<view wx:if="{{company.verifyType==1}}" class="right-user">
<!-- <view wx:if="{{company.verifyType==1}}" class="right-user">
<image src="../../../images/person.png"></image>个人认证
</view>
<view wx:elif="{{company.verifyType==2}}" class="right-user">
@ -20,7 +20,7 @@
</view>
<view wx:else class="right-user">
<image src="../../../images/nouser.png"></image>游客登录
</view>
</view> -->
<view class="nav-detail">
活动:{{company.totalActivity?company.totalActivity:0}}
<text>|</text>

6
pages/club/manage/manage.js

@ -37,6 +37,11 @@ Page({
joinWay:that.data.array[e.detail.value].id
})
},
textDetailChange(e){
this.setData({
company: {...this.data.company, clubIntroduction: e.detail.value}
})
},
accountChange: function(e) {
var that = this;
that.setData({
@ -255,6 +260,7 @@ uploadcom: function (e) {
joinWay:that.data.joinWay,
payType:that.data.payType
};
re.request(Api.changeClub(), postData, header).then((res) => {
let datas = res.data.data;
console.log(datas);

6
pages/club/manage/manage.wxml

@ -40,7 +40,7 @@
</view>
<view class="formlistarea">
<text>俱乐部简介</text>
<textarea name="" placeholder="请输入俱乐部简介" value="{{company.clubIntroduction}}"></textarea>
<textarea name="" placeholder="请输入俱乐部简介" value="{{company.clubIntroduction}}" bindinput="textDetailChange"></textarea>
</view>
<view class="formlist" wx:if="{{jurisdiction<=2}}">
<text>设置加入方式</text>
@ -55,10 +55,10 @@
<text>俱乐部消息</text>
<input type="text" placeholder="请输入俱乐部消息"/>
</view> -->
<view class="formlist" bindtap="togroups">
<!-- <view class="formlist" bindtap="togroups">
<text>俱乐部成员({{company.totalMembers}})</text>
<image src="../../../images/back.png" class="back"></image>
</view>
</view> -->
<!-- <view class="formlist" bindtap="topopname" wx:if="{{jurisdiction==1}}">
<text>个性化称号</text>
<image src="../../../images/back.png" class="back"></image>

2
pages/dateTimePicker.js

@ -69,7 +69,7 @@ function withData(param) {
// 处理联动列表数据
/*年月日 时分秒*/
dateTimeArray[0] = getLoopArray(start, end);
dateTimeArray[1] = getLoopArray(1, 12);
dateTimeArray[1] = getLoopArray(+defaultDate[1], 12);
dateTimeArray[2] = getMonthDay(defaultDate[0], defaultDate[1]);
dateTimeArray[3] = getLoopArray(0, 23);
dateTimeArray[4] = getLoopArray(0, 59);

4
pages/index/activeDetail/activeDetail.wxml

@ -5,7 +5,7 @@
<view class="circle">
<view class="title">{{detail.activityName}}</view>
<view class="price">
<view class="price-left"><small>¥</small><text>{{detail.lowestPrice?detail.lowestPrice:0}}</text></view>
<view class="price-left"><small>¥</small><text>{{detail.lowestPrice?detail.lowestPrice:0}}</text> </view>
<view class="price-right">
<image src="../../../images/viewk.png"></image>浏览{{detail.totalRead?detail.totalRead:0}}
</view>
@ -18,7 +18,7 @@
<view class="detail-list">
<image src="../../../images/addr.png"></image>
<view class="two" bindtap="Tomap">
<text class="activeaddr">{{detail.activityAddr}}</text>
<text class="activeaddr">{{detail.activityAddr || '-'}}</text>
<text class="two-right">查看地图</text>
</view>
</view>

8
pages/index/index.wxml

@ -119,13 +119,13 @@
<view class="four-word">
<view class="four-title three-title">{{item.activityName}}</view>
<view class="four-log">
<text>{{item.startTime}}</text>
<text>{{item.startTime || '-'}}</text>
<view>|</view>
<text>{{item.totalDay}}天</text>
<text>{{item.totalDay || '-'}}天</text>
<view>|</view>
<text>{{item.activityAddr}}</text>
<text>{{item.activityAddr || '-'}}</text>
</view>
<view class="four-name">{{item.clubName}}
<view class="four-name">{{item.clubName || '-'}}
<!-- <image src="/images/person.png" wx:if="{{item.verifyType==1}}"></image>
<image src="/images/comp.png" wx:elif="{{item.verifyType==2}}"></image>
<image src="/images/nouser.png" wx:else></image> -->

37
pages/index/myjoin/myjoin.js

@ -52,7 +52,7 @@ Page({
*/
onLoad: function (options) {
var that = this;
console.log(options);
//console.log(options);
that.setData({
clubId: options.clubId,
activityId: options.acId,
@ -153,7 +153,7 @@ Page({
var that = this;
// if(this.data.info.details)
console.log(this.data.info.details);
let isfl=false
let isfl=false, phoneCardErr = false;
if(this.data.info.details.length==0){
wx.showToast({
title: '至少添加一个用户',
@ -161,11 +161,34 @@ Page({
})
return
}
this.data.info.details.forEach(item => {
if(item.gender==undefined||item.idcard==undefined||item.nickname==undefined||item.phone==undefined||item.realname==undefined||item.gender==''||item.idcard==''||item.nickname==''||item.phone==''||item.realname==''){
isfl=true
}
});
try {
this.data.info.details.forEach((item, index) => {
if(!/^1[3-9][0-9]{9}$/.test(item.phone)){
let err = `${index + 1}个用户手机号填写有误`;
wx.showToast({
title: err,
icon:'none'
});
phoneCardErr=true
throw Error(err);
return;
}
if(!/^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/.test(item.idcard)){
let err = `${index + 1}个用户身份证号码填写有误`;
wx.showToast({
title: err,
icon:'none'
});
phoneCardErr=true
throw Error(err);
return;
}
if(item.gender==undefined||item.idcard==undefined||item.nickname==undefined||item.phone==undefined||item.realname==undefined||item.gender==''||item.nickname==''||item.realname==''){
isfl=true
}
});
} catch (error) {}
if(phoneCardErr) return;
if(isfl){
wx.showToast({
title: '请确保表单全部填写完成',

8
pages/index/myjoin/myjoin.wxml

@ -6,16 +6,16 @@
</view>
<view class="content">
<view class="contentCircle">
<view class="list">
<!-- <view class="list">
<view class="title">费用</view>
¥{{price}}
<!-- <view class="inputbox"><input placeholder="费用项"/></view> -->
</view>
<view class="list">
<view class="title">保险</view>
由主办方统一购买
<!-- <view class="inputbox"><input placeholder="保险费"/></view> -->
</view>
</view> -->
<!-- 昵称 -->
<view class="list">
<view class="title">昵称</view>

45
pages/index/order/order.js

@ -6,16 +6,12 @@ Page({
* 页面的初始数据
*/
data: {
groups:[
{name:'洒洒水',tel:'13222222222',price:'200'},
{name:'洒洒水',tel:'13222222222',price:'200'},
],
allTotal:400,
trueTotal:400,
checked:true,
groups:[],
checked:false,
id:'',
payType:'1',
orderId:'',
theOrderDetail: {}
},
/**
@ -60,11 +56,12 @@ Page({
"Content-Type": "application/x-www-form-urlencoded"
};
re.request(Api.getOrderPeople(), postData, header).then((res) => {
console.log(res)
// console.log('==>',res)
that.setData({
orderId:res.data.data[0].orderId
})
this.getOrderDetail(res.data.data[0].orderId)
orderId:res.data.data[0].orderId,
groups: res.data.data
});
this.getOrderDetail(res.data.data[0].orderId);
})
},
getOrderDetail:function(id){
@ -78,8 +75,10 @@ Page({
};
re.request(Api.getOrderDetail(), postData, header).then((res) => {
console.log(">>>",res)
// console.log(">>>",res.data.data)
this.setData({
theOrderDetail: res.data.data
})
// this.setData({
// allTotal:res.data.
// })
@ -87,8 +86,20 @@ Page({
})
},
checkboxChange(e){
this.setData({
checked: e.detail.value.length > 0
});
},
topay:function(){
var that = this;
if(!this.data.checked){
wx.showToast({
title: '请勾选协议',
icon: 'none'
});
return;
}
if(that.data.payType=='1'){
that.getwxpay()
}else if(that.data.payType=='3'){
@ -103,11 +114,11 @@ Page({
var postData = {
orderSerial :that.data.id,
openId:openId,
realCost:'0.01',
body:'备注',
cost:'0.01',
realCost: this.data.theOrderDetail.realCost,
body:'订单支付',
cost:this.data.theOrderDetail.cost,
payWay:that.data.payType,
subject:'我的订单'
subject:'参加活动'
};
var header = {
token: wx.getStorageSync('token'),

16
pages/index/order/order.wxml

@ -6,20 +6,20 @@
<view class="top">
<view class="other-top">
<image src="../../../images/left.png"></image>
报名成员(2
报名成员({{groups.length}}
</view>
</view>
<view class="groupList">
<block wx:for="{{groups}}" wx:key="groups">
<view class="list">
<view class="name">{{item.name}}-{{item.tel}}</view>
<view class="price">费用项目<text>¥{{item.price}}</text></view>
<view class="name">{{item.realname || ''}}-{{item.phone || ''}}</view>
<view class="price">费用项目<text>¥{{item.realCost || '0'}}</text></view>
</view>
</block>
</view>
<view class="first">
<view class="total">
总费用<text>¥{{allTotal}}</text>
总费用<text>¥{{theOrderDetail.realCost || '0'}}</text>
</view>
<!-- <view class="total">
现金优惠券<view>无可用<image src='../../../images/back.png'></image>
@ -69,9 +69,11 @@
</radio-group>
</view>
<view class="agree">
<checkbox-group bindchange="xieyi">
<checkbox name="box_check" value="{{checked}}"></checkbox>
我同意《XXX服务协议》,并确认活动真实性,同意支付报名
<checkbox-group bindchange="checkboxChange">
<label class="xieyi-class">
<checkbox checked="{{checked}}" name="box_check" value="{{checked}}" bind></checkbox>
我同意《XXX服务协议》,并确认活动真实性,同意支付报名
</label>
</checkbox-group>
</view>
<view class="bottom" bindtap="topay">

7
pages/index/order/order.wxss

@ -21,4 +21,9 @@ radio,checkbox{transform:scale(0.6);}
.agree{width:100%;margin-top:50rpx;font-size:24rpx;padding-left:12rpx;}
.agree text{color:#ffac0c}
.bottom{width:100%;margin-top:24rpx;background: #07C160;text-align: center;font-size:28rpx;
height:100rpx;line-height:100rpx;color:#fff;}
height:100rpx;line-height:100rpx;color:#fff;}
.xieyi-class{
display: flex;
align-items: center;
}

22
pages/release/addactive/addactive.js

@ -6,7 +6,7 @@ var util = require('../../../utils/util.js');
Page({
/**
* 页面的初始数据
* 页面的初始数据
*/
data: {
@ -346,13 +346,12 @@ console.log(startT);
startTFour: startTFour
})
},
onLoad: function (options) {
var nowDate = util.formatTimeTwo(new Date());
// 时间ONE
var start = nowDate;
var obj = dateTimePicker.dateTimePicker(2000,this.data.year,start);
var obj = dateTimePicker.dateTimePicker(new Date().getFullYear(),this.data.year, start);
this.setData({
dateTime: obj.dateTime,
dateTimeArray: obj.dateTimeArray
@ -365,7 +364,7 @@ console.log(startT);
// 时间Two
var startTwo = nowDate;
var objTwo = dateTimePicker.dateTimePicker(2000,this.data.year,startTwo);
var objTwo = dateTimePicker.dateTimePicker(new Date().getFullYear(),this.data.year,startTwo);
this.setData({
dateTimeTwo: objTwo.dateTime,
dateTimeArrayTwo: objTwo.dateTimeArray
@ -378,7 +377,7 @@ console.log(startT);
// 时间three
var startThree= nowDate;
var objThree = dateTimePicker.dateTimePicker(2000,this.data.year,startThree);
var objThree = dateTimePicker.dateTimePicker(new Date().getFullYear(),this.data.year,startThree);
this.setData({
dateTimeThree: objThree.dateTime,
dateTimeArrayThree: objThree.dateTimeArray
@ -391,7 +390,7 @@ console.log(startT);
// 时间Four
var startFour= nowDate;
var objFour = dateTimePicker.dateTimePicker(2000,this.data.year,startFour);
var objFour = dateTimePicker.dateTimePicker(new Date().getFullYear(),this.data.year,startFour);
this.setData({
dateTimeFour: objFour.dateTime,
dateTimeArrayFour: objFour.dateTimeArray
@ -504,6 +503,10 @@ console.log(startT);
})
for (var i = 0; i < tempFilePaths.length; i++) {
wx.showLoading({
title: `正在上传第${i + 1}张图片`,
mask: true
});
wx.uploadFile({
url: Api.uploadImg(),
filePath: res.tempFilePaths[i],
@ -511,11 +514,12 @@ console.log(startT);
formData: {
},
success: function (res) {
wx.hideLoading();
var sss = JSON.parse(res.data);
let showList = that.data.showList.concat(sss.msg);
that.setData({
showList: showList
})
});
}
})
}
@ -645,8 +649,8 @@ uploadfront: function (e) {
costListString:JSON.stringify(costLists),
questionListString:'[]'
};
console.log('send active data:', postData);
return;
// console.log('send active data:', postData);
// return;
var header = {
token: wx.getStorageSync('token'),
"Content-Type": "application/x-www-form-urlencoded"

6
project.config.json

@ -31,17 +31,15 @@
"disablePlugins": [],
"outputPath": ""
},
"enableEngineNative": false,
"useIsolateContext": true,
"useIsolateContext": false,
"userConfirmedBundleSwitch": false,
"packNpmManually": false,
"packNpmRelationList": [],
"minifyWXSS": true,
"disableUseStrict": false,
"minifyWXML": true,
"showES6CompileOption": false,
"useCompilerPlugins": false,
"minifyWXML": true,
"useStaticServer": true,
"ignoreUploadUnusedFiles": true
},
"compileType": "miniprogram",

Loading…
Cancel
Save