From 5642d57831019b028c083a021588128a209fc5c9 Mon Sep 17 00:00:00 2001
From: max <373170631@qq.com>
Date: Fri, 1 Jul 2022 17:16:23 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dbug-1?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pages/center/order/order.wxml | 2 +-
pages/center/orderdetail/orderdetail.wxss | 3 +-
pages/club/clubDetail/clubDetail.wxml | 4 +-
pages/club/manage/manage.js | 6 +++
pages/club/manage/manage.wxml | 6 +--
pages/dateTimePicker.js | 2 +-
pages/index/activeDetail/activeDetail.wxml | 4 +-
pages/index/index.wxml | 8 ++--
pages/index/myjoin/myjoin.js | 37 ++++++++++++++----
pages/index/myjoin/myjoin.wxml | 8 ++--
pages/index/order/order.js | 45 ++++++++++++++--------
pages/index/order/order.wxml | 16 ++++----
pages/index/order/order.wxss | 7 +++-
pages/release/addactive/addactive.js | 22 ++++++-----
project.config.json | 6 +--
15 files changed, 113 insertions(+), 63 deletions(-)
diff --git a/pages/center/order/order.wxml b/pages/center/order/order.wxml
index fa2db45..f2c563a 100644
--- a/pages/center/order/order.wxml
+++ b/pages/center/order/order.wxml
@@ -24,7 +24,7 @@
{{item.activityName}}
- {{item.startTime}} - {{item.endTime}}
+ 开始:{{item.startTime}} 结束:{{item.endTime}}
{{item.createdTime}}¥{{item.cost}}
diff --git a/pages/center/orderdetail/orderdetail.wxss b/pages/center/orderdetail/orderdetail.wxss
index 4a2e191..47b934d 100644
--- a/pages/center/orderdetail/orderdetail.wxss
+++ b/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;}
\ No newline at end of file
diff --git a/pages/club/clubDetail/clubDetail.wxml b/pages/club/clubDetail/clubDetail.wxml
index 4f5bc6e..e3b0695 100644
--- a/pages/club/clubDetail/clubDetail.wxml
+++ b/pages/club/clubDetail/clubDetail.wxml
@@ -12,7 +12,7 @@
{{company.clubName}}
-
+
活动:{{company.totalActivity?company.totalActivity:0}}
|
diff --git a/pages/club/manage/manage.js b/pages/club/manage/manage.js
index 7e1a7c5..2ee9941 100644
--- a/pages/club/manage/manage.js
+++ b/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);
diff --git a/pages/club/manage/manage.wxml b/pages/club/manage/manage.wxml
index 6dee8cf..a430005 100644
--- a/pages/club/manage/manage.wxml
+++ b/pages/club/manage/manage.wxml
@@ -40,7 +40,7 @@
俱乐部简介
-
+
设置加入方式
@@ -55,10 +55,10 @@
俱乐部消息
-->
-
+
diff --git a/pages/index/myjoin/myjoin.js b/pages/index/myjoin/myjoin.js
index f38809d..ce32318 100644
--- a/pages/index/myjoin/myjoin.js
+++ b/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: '请确保表单全部填写完成',
diff --git a/pages/index/myjoin/myjoin.wxml b/pages/index/myjoin/myjoin.wxml
index 10aa261..341645e 100644
--- a/pages/index/myjoin/myjoin.wxml
+++ b/pages/index/myjoin/myjoin.wxml
@@ -6,16 +6,16 @@
-
+
+
保险
由主办方统一购买
-
-
+
+ -->
昵称
diff --git a/pages/index/order/order.js b/pages/index/order/order.js
index 3cb2207..d613638 100644
--- a/pages/index/order/order.js
+++ b/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'),
diff --git a/pages/index/order/order.wxml b/pages/index/order/order.wxml
index 1f19a1a..100ee09 100644
--- a/pages/index/order/order.wxml
+++ b/pages/index/order/order.wxml
@@ -6,20 +6,20 @@
- 报名成员(2)
+ 报名成员({{groups.length}})
- {{item.name}}-{{item.tel}}
- 费用项目¥{{item.price}}
+ {{item.realname || ''}}-{{item.phone || ''}}
+ 费用项目¥{{item.realCost || '0'}}
- 总费用¥{{allTotal}}
+ 总费用¥{{theOrderDetail.realCost || '0'}}