|
|
@@ -14,12 +14,21 @@
|
|
|
</picker>
|
|
|
</view>
|
|
|
</view>
|
|
|
+ <view class="box-item" v-if="intention == '其他'">
|
|
|
+ <!-- <view class="box-left">
|
|
|
+ <text class="imp">*</text>捐款意向
|
|
|
+ </view> -->
|
|
|
+ <!-- <view class="box-right"> -->
|
|
|
+ <!-- <picker :value="index" @change="PickerDire" :range="chooseDire" class="box-right" @click="addType"> -->
|
|
|
+ <input type="text" placeholder="请输入捐款意向" v-model="jkyx" />
|
|
|
+ <!-- </picker> -->
|
|
|
+ <!-- </view> -->
|
|
|
+ </view>
|
|
|
<view class="box-item">
|
|
|
<view class="box-left">
|
|
|
<text class="imp">*</text>捐款方式
|
|
|
</view>
|
|
|
<view class="box-right">
|
|
|
- <!-- <input type="text" placeholder="请选择捐款方式" /> -->
|
|
|
<picker @change="PickerType" :value="index" :range="chooseType" class="box-right">
|
|
|
<text>{{ way || '请选择捐款方式'}}</text>
|
|
|
</picker>
|
|
|
@@ -51,7 +60,7 @@
|
|
|
</view>
|
|
|
|
|
|
<view class="box-bottom">
|
|
|
- 个人满500,单位满2000可打印纸质证书
|
|
|
+ 个人捐款500元以上,单位捐款2000元以上可寄送纸质证书
|
|
|
</view>
|
|
|
</view>
|
|
|
|
|
|
@@ -88,16 +97,18 @@
|
|
|
实名公开
|
|
|
</view>
|
|
|
<view class="switch-right">
|
|
|
- <switch :checked="is_public" color='#E63931' style="transform: scale(0.7,0.7)" @change="switch1Change" />
|
|
|
+ <switch :checked="is_public" color='#E63931' style="transform: scale(0.7,0.7)"
|
|
|
+ @change="switch1Change" />
|
|
|
</view>
|
|
|
</view>
|
|
|
|
|
|
<view class="switch-box">
|
|
|
<view class="switch-left">
|
|
|
- 寄发票
|
|
|
+ 寄证书
|
|
|
</view>
|
|
|
<view class="switch-right">
|
|
|
- <switch :checked="is_receipts" color='#E63931' style="transform: scale(0.7,0.7)" @change="switch2Change" />
|
|
|
+ <switch :checked="is_receipts" color='#E63931' style="transform: scale(0.7,0.7)"
|
|
|
+ @change="switch2Change" />
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
@@ -150,31 +161,31 @@
|
|
|
|
|
|
</view>
|
|
|
</uni-popup>
|
|
|
- <uni-popup ref="popup1" type="center">
|
|
|
- <view class="popup-box">
|
|
|
- <!-- <view class="img">
|
|
|
- <image src="../../static/img/WechatIMG662.png" mode=""></image>
|
|
|
- </view> -->
|
|
|
- <view class="mian">
|
|
|
- <view class="delivery">
|
|
|
- 支付失败
|
|
|
- <!-- {{ i18n.qrhwsdm }} -->
|
|
|
- </view>
|
|
|
- <view class="nocancel">
|
|
|
- 请退出页面,重新登录
|
|
|
- <!-- {{ i18n.wfcx }} -->
|
|
|
- </view>
|
|
|
- <view class="comfirm-box">
|
|
|
- <view class="cancel" @click="cancel1">
|
|
|
- 取消
|
|
|
- </view>
|
|
|
- <view class="comfirm" @click="comfirmExit()">
|
|
|
- 确认
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
-
|
|
|
+ <uni-popup ref="popup1" type="center">
|
|
|
+ <view class="popup-box">
|
|
|
+ <!-- <view class="img">
|
|
|
+ <image src="../../static/img/WechatIMG662.png" mode=""></image>
|
|
|
+ </view> -->
|
|
|
+ <view class="mian">
|
|
|
+ <view class="delivery">
|
|
|
+ 支付失败
|
|
|
+ <!-- {{ i18n.qrhwsdm }} -->
|
|
|
+ </view>
|
|
|
+ <view class="nocancel">
|
|
|
+ 请退出页面,重新登录
|
|
|
+ <!-- {{ i18n.wfcx }} -->
|
|
|
+ </view>
|
|
|
+ <view class="comfirm-box">
|
|
|
+ <view class="cancel" @click="cancel1">
|
|
|
+ 取消
|
|
|
+ </view>
|
|
|
+ <view class="comfirm" @click="comfirmExit()">
|
|
|
+ 确认
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+
|
|
|
</uni-popup>
|
|
|
</view>
|
|
|
</template>
|
|
|
@@ -216,6 +227,7 @@
|
|
|
// elsemoney: '', // 其他金额
|
|
|
popmoney: '', // 按钮金额 弹窗金额
|
|
|
is_show: true,
|
|
|
+ jkyx: '', //手动输入捐款意向
|
|
|
moneyList: [{
|
|
|
id: 0,
|
|
|
money: 500
|
|
|
@@ -337,9 +349,9 @@
|
|
|
},
|
|
|
cancel() {
|
|
|
this.$refs.popup.close();
|
|
|
- },
|
|
|
- cancel1() {
|
|
|
- this.$refs.popup1.close();
|
|
|
+ },
|
|
|
+ cancel1() {
|
|
|
+ this.$refs.popup1.close();
|
|
|
},
|
|
|
comfirm1: function() {
|
|
|
let obj = this
|
|
|
@@ -351,14 +363,14 @@
|
|
|
obj.popmoney = ''
|
|
|
this.$refs.popup.close();
|
|
|
}
|
|
|
- },
|
|
|
- comfirmExit() {
|
|
|
- console.log('点击comfirmExit')
|
|
|
- this.$refs.popup1.close()
|
|
|
- uni.switchTab({
|
|
|
- url: '/pages/home/home'
|
|
|
- });
|
|
|
-
|
|
|
+ },
|
|
|
+ comfirmExit() {
|
|
|
+ console.log('点击comfirmExit')
|
|
|
+ this.$refs.popup1.close()
|
|
|
+ uni.switchTab({
|
|
|
+ url: '/pages/home/home'
|
|
|
+ });
|
|
|
+
|
|
|
},
|
|
|
// 是否实名公开
|
|
|
switch1Change(e) {
|
|
|
@@ -373,6 +385,15 @@
|
|
|
// 提交
|
|
|
confirm: async function() {
|
|
|
let obj = this
|
|
|
+ if(!obj.intention) {
|
|
|
+ return this.$api.msg('请选择捐款意向!');
|
|
|
+ }else {
|
|
|
+ if(obj.intention == '其他') {
|
|
|
+ if(obj.jkyx == '') {
|
|
|
+ return this.$api.msg('请输入捐款意向!');
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
if (!obj.way) {
|
|
|
this.$api.msg('请选择捐款方式!');
|
|
|
return;
|
|
|
@@ -411,7 +432,7 @@
|
|
|
}
|
|
|
createOrderkey({
|
|
|
money: obj.money, //捐款金额
|
|
|
- intention: obj.intention, //捐款意向
|
|
|
+ intention: obj.intention == '其他' ? obj.jkyx : obj.intention, //捐款意向
|
|
|
way: obj.way, //捐款方式
|
|
|
is_public: obj.is_public, //是否实名公开
|
|
|
is_receipts: obj.is_receipts, //是否开发票
|
|
|
@@ -421,7 +442,7 @@
|
|
|
}).then(({
|
|
|
data
|
|
|
}) => {
|
|
|
- console.log(345, data)
|
|
|
+ console.log(345, data)
|
|
|
console.log(666, obj)
|
|
|
let res = data.result.jsConfig;
|
|
|
console.log(res)
|
|
|
@@ -436,13 +457,16 @@
|
|
|
// obj.$api.msg('支付成功')
|
|
|
let date = new Date()
|
|
|
let year = date.getFullYear()
|
|
|
- let month = date.getMonth() >= 9 ? date.getMonth() + 1 : '0'+(date.getMonth() +1 )
|
|
|
+ let month = date.getMonth() >= 9 ? date.getMonth() + 1 : '0' + (date
|
|
|
+ .getMonth() + 1)
|
|
|
let day = date.getDate() >= 10 ? date.getDate() : '0' + date.getDate()
|
|
|
- uni.navigateTo({
|
|
|
- url: '/pages/form/donaSuccess?money=' + obj.money + '&name=' + obj.donate_er + '&time=' + year + '年' + month + '月' + day +'日'
|
|
|
+ uni.navigateTo({
|
|
|
+ url: '/pages/form/donaSuccess?money=' + obj.money +
|
|
|
+ '&name=' + obj.donate_er + '&time=' + year + '年' +
|
|
|
+ month + '月' + day + '日'
|
|
|
})
|
|
|
},
|
|
|
- fail: function(res) {
|
|
|
+ fail: function(res) {
|
|
|
this.$refs.popup1.open()
|
|
|
console.log(res, "失败")
|
|
|
console.log(res.errMsg)
|
|
|
@@ -469,27 +493,32 @@
|
|
|
}
|
|
|
|
|
|
.box {
|
|
|
- margin-top: 10rpx;
|
|
|
- .box-item2{
|
|
|
- background-color: #FFFFFF;
|
|
|
- padding: 18rpx 24rpx;
|
|
|
- // display: flex;
|
|
|
- border-bottom: 1rpx solid #F2F2F2;
|
|
|
- .box-left{
|
|
|
- color: #E63931;
|
|
|
- }
|
|
|
- .box-info{
|
|
|
- text-indent: 68rpx;
|
|
|
- margin-top: 16rpx;
|
|
|
- color: #7b7b7b;
|
|
|
- }
|
|
|
- .box-phone{
|
|
|
- text-indent: 68rpx;
|
|
|
- margin-top: 6rpx;
|
|
|
- // text-align: center;
|
|
|
- color: #7b7b7b;
|
|
|
- }
|
|
|
+ margin-top: 10rpx;
|
|
|
+
|
|
|
+ .box-item2 {
|
|
|
+ background-color: #FFFFFF;
|
|
|
+ padding: 18rpx 24rpx;
|
|
|
+ // display: flex;
|
|
|
+ border-bottom: 1rpx solid #F2F2F2;
|
|
|
+
|
|
|
+ .box-left {
|
|
|
+ color: #E63931;
|
|
|
+ }
|
|
|
+
|
|
|
+ .box-info {
|
|
|
+ text-indent: 68rpx;
|
|
|
+ margin-top: 16rpx;
|
|
|
+ color: #7b7b7b;
|
|
|
+ }
|
|
|
+
|
|
|
+ .box-phone {
|
|
|
+ text-indent: 68rpx;
|
|
|
+ margin-top: 6rpx;
|
|
|
+ // text-align: center;
|
|
|
+ color: #7b7b7b;
|
|
|
+ }
|
|
|
}
|
|
|
+
|
|
|
.box-item1 {
|
|
|
background-color: #FFFFFF;
|
|
|
padding: 18rpx 24rpx;
|
|
|
@@ -665,78 +694,79 @@
|
|
|
background-color: #E63931;
|
|
|
}
|
|
|
}
|
|
|
- }
|
|
|
- .popup-box {
|
|
|
- width: 522rpx;
|
|
|
- height: 605rpx;
|
|
|
- background-color: #FFFFFF;
|
|
|
- border-radius: 20rpx;
|
|
|
-
|
|
|
- .img {
|
|
|
- border-radius: 20rpx 20rpx 0 0;
|
|
|
- width: 522rpx;
|
|
|
- height: 307rpx;
|
|
|
-
|
|
|
- image {
|
|
|
- border-radius: 20rpx 20rpx 0 0;
|
|
|
- width: 522rpx;
|
|
|
- height: 307rpx;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- .mian {
|
|
|
- display: flex;
|
|
|
- flex-direction: column;
|
|
|
- align-items: center;
|
|
|
- padding: 32rpx 32rpx;
|
|
|
- background-color: #FFFFFF;
|
|
|
- border-radius: 0 0 20rpx 20rpx;
|
|
|
- text-align: center;
|
|
|
-
|
|
|
- .delivery {
|
|
|
- font-size: 36rpx;
|
|
|
- color: #333333;
|
|
|
- // margin-top: 46rpx;
|
|
|
- }
|
|
|
-
|
|
|
- .nocancel {
|
|
|
- font-size: 30rpx;
|
|
|
- color: #999999;
|
|
|
- margin-top: 26rpx;
|
|
|
- }
|
|
|
-
|
|
|
- .comfirm-box {
|
|
|
- margin-top: 52rpx;
|
|
|
- display: flex;
|
|
|
- // margin-bottom: 32rpx;
|
|
|
-
|
|
|
- // justify-content: space-around;
|
|
|
- .cancel {
|
|
|
- display: flex;
|
|
|
- align-items: center;
|
|
|
- justify-content: center;
|
|
|
- width: 197rpx;
|
|
|
- height: 61rpx;
|
|
|
- border: 1px solid #C90F1B;
|
|
|
- border-radius: 31rpx;
|
|
|
-
|
|
|
- font-size: 24rpx;
|
|
|
- color: #C90F1B;
|
|
|
- }
|
|
|
-
|
|
|
- .comfirm {
|
|
|
- margin-left: 32rpx;
|
|
|
- display: flex;
|
|
|
- align-items: center;
|
|
|
- justify-content: center;
|
|
|
- width: 197rpx;
|
|
|
- height: 61rpx;
|
|
|
- background: #FA7E67;
|
|
|
- border-radius: 31px;
|
|
|
- font-size: 24rpx;
|
|
|
- color: #FFFFFF;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
+ }
|
|
|
+
|
|
|
+ .popup-box {
|
|
|
+ width: 522rpx;
|
|
|
+ height: 605rpx;
|
|
|
+ background-color: #FFFFFF;
|
|
|
+ border-radius: 20rpx;
|
|
|
+
|
|
|
+ .img {
|
|
|
+ border-radius: 20rpx 20rpx 0 0;
|
|
|
+ width: 522rpx;
|
|
|
+ height: 307rpx;
|
|
|
+
|
|
|
+ image {
|
|
|
+ border-radius: 20rpx 20rpx 0 0;
|
|
|
+ width: 522rpx;
|
|
|
+ height: 307rpx;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .mian {
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ align-items: center;
|
|
|
+ padding: 32rpx 32rpx;
|
|
|
+ background-color: #FFFFFF;
|
|
|
+ border-radius: 0 0 20rpx 20rpx;
|
|
|
+ text-align: center;
|
|
|
+
|
|
|
+ .delivery {
|
|
|
+ font-size: 36rpx;
|
|
|
+ color: #333333;
|
|
|
+ // margin-top: 46rpx;
|
|
|
+ }
|
|
|
+
|
|
|
+ .nocancel {
|
|
|
+ font-size: 30rpx;
|
|
|
+ color: #999999;
|
|
|
+ margin-top: 26rpx;
|
|
|
+ }
|
|
|
+
|
|
|
+ .comfirm-box {
|
|
|
+ margin-top: 52rpx;
|
|
|
+ display: flex;
|
|
|
+ // margin-bottom: 32rpx;
|
|
|
+
|
|
|
+ // justify-content: space-around;
|
|
|
+ .cancel {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: center;
|
|
|
+ width: 197rpx;
|
|
|
+ height: 61rpx;
|
|
|
+ border: 1px solid #C90F1B;
|
|
|
+ border-radius: 31rpx;
|
|
|
+
|
|
|
+ font-size: 24rpx;
|
|
|
+ color: #C90F1B;
|
|
|
+ }
|
|
|
+
|
|
|
+ .comfirm {
|
|
|
+ margin-left: 32rpx;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: center;
|
|
|
+ width: 197rpx;
|
|
|
+ height: 61rpx;
|
|
|
+ background: #FA7E67;
|
|
|
+ border-radius: 31px;
|
|
|
+ font-size: 24rpx;
|
|
|
+ color: #FFFFFF;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
</style>
|