Browse Source

[拼团][修改]:[拼团增加问卷调查]

tags/河北版C.8.1.01
meo 5 years ago
parent
commit
7a48870ce4
3 changed files with 454 additions and 3 deletions
  1. +43
    -3
      pages/spellGroup/mySpellGroup/index.js
  2. +25
    -0
      pages/spellGroup/mySpellGroup/index.wxml
  3. +386
    -0
      pages/spellGroup/mySpellGroup/index.wxss

+ 43
- 3
pages/spellGroup/mySpellGroup/index.js View File

@@ -31,7 +31,11 @@ Page({
limitCondition: "",
minLimit: 0,
maxLimit: 0,
spellGroupOrder:false
spellGroupOrder:false,
opacity: 0,
queueData: null,
zIndex: 11,
display: "none",
},

/**
@@ -108,11 +112,47 @@ Page({
* 直接购买
*/
gotoBuy(e) {
let that = this;
this.setData({
canBuyIf: false,
formId: e.detail.formId
formId: e.detail.formId,
queueData: null
})
Http.get({
url: config.api.getQuestion,
data: {
couponType: JSON.stringify(that.data.data.type)
}
})
.then(res => {
wx.hideLoading();
if (res.data == undefined) {
// 立即购买
that.orderFunc();
} else if (res.data) {
var animation = wx.createAnimation({});
animation.translate((that.data.widthScreen - that.data.widthScreen), 0).scale(1).opacity(1).step({
duration: 500
})
that.setData({
queueData: animation.export(),
zIndex: 9,
opacity: 1,
display: "block",
questionnaire: JSON.parse(res.data.content),
questionId: res.data.id
});
}
})
.catch(err => {
wx.hideLoading();
wx.showToast({
title: err.message,
icon: 'none',
duration: 2000,
mask: false
});
})
this.orderFunc()
},
// 时间格式化输出,如11:03 25:19 每1s都会调用一次
dateformat(micro_second) {


+ 25
- 0
pages/spellGroup/mySpellGroup/index.wxml View File

@@ -105,5 +105,30 @@
</view>
</view>
</view>
<!-- 问卷调查 -->
<view class="b1" style="opacity:{{opacity}};display: {{display}};" animation="{{queueData}}">
<view id='con' class='con'>
<image class='wmclose' mode='widthFix' src="{{closedUrl}}" bindtap="closeQuestion"></image>
<image class='ques_gou' mode='widthFix' src="{{quesGouUrl}}"></image>
<image class='image' src="{{headbgUrl}}" mode='widthFix'></image>
<image class='img image' src="{{quesBgUrl}}" mode='widthFix'></image>
<view class='question'>
<text class='titles'>{{questionnaire.title}}</text>
<!-- 单选 -->
<radio-group class="radio-group" wx:if="{{questionnaire.flag=='single'}}" data-flags="single" bindchange="formSubmit" data-questionId="{{questionId}}">
<label class="radios" wx:for="{{questionnaire.answers}}" wx:key="{{index}}">
<radio value="{{item.id}}" checked="{{item.checked}}" />{{item.name}}
</label>
</radio-group>
<!-- 多选 -->
<checkbox-group bindchange="checkboxChange" wx:if="{{questionnaire.flag=='multi'}}" bindchange="checkboxChange">
<label class="radio ques" wx:for="{{questionnaire.answers}}" wx:key="index">
<checkbox value="{{item.id}}" />{{item.name}}
</label>
</checkbox-group>
<view class='ques btnss' wx:if="{{questionnaire.flag=='multi'}}" data-flags='multi' bindtap='formSubmit' data-questionId="{{questionId}}">确定</view>
</view>
</view>
</view>
</view>
</view>

+ 386
- 0
pages/spellGroup/mySpellGroup/index.wxss View File

@@ -578,4 +578,390 @@ line-height: 80rpx;
margin-top: 30rpx;
width: 90rpx;
height: 90rpx;
}

.b1 {
position: fixed;
top: 0px;
bottom: 0px;
left: 0px;
right: 0px;
background: rgba(0, 0, 0, 0.8);
overflow: hidden;
z-index: 10;
}

.con {
position: absolute;
top: 35rpx;
right: 0;
bottom: 0;
left: 0;
margin: auto;
width: 587rpx;
}

.con .image {
display: block;
width: 100%;
}

.img {
margin-top: -50rpx;
}

.question {
display: block;
width: 587rpx;
background: #fff;
border-bottom-left-radius: 22rpx;
border-bottom-right-radius: 22rpx;
overflow: hidden;
}

.ques {
display: block;
width: 511rpx;
margin: 0 auto;
height: 95rpx;
line-height: 95rpx;
font-size: 30rpx;
color: #333;
border-bottom: 1rpx solid #eee;
}

.titles {
width: 511rpx;
display: block;
text-align: center;
height: 50rpx;
margin: 0 auto;
padding-top: 10rpx;
padding-bottom: 20rpx;
font-size: 32rpx;
font-weight: bold;
line-height: 41rpx;
border-bottom: 1rpx solid #eee;
}

.quessss >view:last-child {
border-bottom: 0;
}

.wmclose {
position: relative;
z-index: 10000;
display: block;
width: 70rpx;
}

.ques_gou {
position: absolute;
width: 20rpx;
top: 160rpx;
left: 23rpx;
}

.btnss {
color: #f8755b;
font-weight: bold;
font-size: 30rpx !important;
text-align: center !important;
}

.radios {
display: block;
font-size: 28rpx;
height: 95rpx;
line-height: 95rpx;
color: #333;
text-indent: 0.5em;
}

.elecard {
display: inline-block;
margin-left: 6rpx;
color: #af6e34;
border: 1px solid #af6e34;
border-radius: 8rpx;
font-style: normal;
font-size: 30rpx;
line-height: 40rpx;
padding: 0 6rpx;
}

.applyshop {
font-size: 30rpx;
height: 70rpx;
line-height: 70rpx;
color: #333;
text-indent: 1em;
}

.btns {
/* padding: 0 33rpx; */
position: fixed;
left: 0;
right: 0;
bottom: 0;
padding-bottom: 37rpx;
padding-top: 37rpx;
z-index: 100;
background: #fff;
}

.btns .fr,.btns .fl {
width: 277rpx;
height: 95rpx;
border-radius: 48rpx;
text-align: center;
}

.btns .fl {
margin-left: 20rpx;
color: #fff;
background: rgba(255, 169, 2, 1);
box-shadow: 0px 8px 8px 1px rgba(255, 169, 2, 0.32);
}

.btns .fl text {
display: block;
font-size: 30rpx;
line-height: 34rpx;
}

.btns .fl text:nth-of-type(1) {
margin-top: 12rpx;
}

.btns .fr {
font-size: 30rpx;
color: #fff;
margin-right: 20rpx;
line-height: 95rpx;
background: rgba(236, 59, 45, 1);
box-shadow: 0px 8px 8px 1px rgba(246, 93, 51, 0.32);
}

.support-tansfer {
width: 60%;
border-radius: 50rpx;
margin-top: 30rpx;
background: #02c0ff !important;
}

.shaddow {
z-index: 100;
position: fixed;
width: 100%;
height: 100%;
top: 0px;
background: rgba(0, 0, 0, 0.8);
overflow: hidden;
}

.alert-box {
position: fixed;
top: 200rpx;
left: 10%;
width: 80%;
height: auto;
padding-bottom: 20rpx;
background: #fff;
z-index: 200;
border-radius: 20rpx;
}

.user-img {
position: absolute;
top: -50rpx;
left: 250rpx;
/* margin-left: -50rpx; */
width: 100rpx;
height: 100rpx;
z-index: 300;
border-radius: 50rpx;
background: #fff;
overflow: hidden;
}

.user-img image {
width: 100rpx;
height: 100rpx;
}

.close {
position: absolute;
z-index: 300;
right: 0;
top: 0;
width: 100rpx;
height: 100rpx;
overflow: hidden;
}

.close image {
display: block;
width: 26rpx;
height: 26rpx;
margin: 20rpx 0 0 52rpx;
}

.a-title {
text-align: center;
margin-top: 76rpx;
font-size: 36rpx;
font-family: PingFang-SC-Medium;
font-weight: 500;
color: rgba(51, 51, 51, 1);
line-height: 44rpx;
}

.a-img {
position: relative;
width: 80%;
border-radius: 20rpx;
height: 294rpx;
overflow: hidden;
text-align: center;
margin: 30rpx auto 0;
}

.a-received {
position: absolute;
width: 100%;
height: 294rpx;
top: 0;
left: 0;
text-align: center;
line-height: 294rpx;
z-index: 320;
background: rgba(255, 255, 255, 1);
border: 0px solid rgba(151, 57, 117, 1);
opacity: 0.91;
font-size: 36rpx;
color: rgba(255, 51, 50, 1);
font-family: PingFang-SC-Medium;
}

.a-img image {
width: 100%;
height: 100%;
}

.bottom {
text-align: center;
height: 70rpx;
line-height: 70rpx;
color: #999;
font-size: 32rpx;
}

.presslimit {
color: red;
font-size: 26rpx;
letter-spacing: 1.16rpx;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}

checkbox-group, radio-group {
height: 400rpx;
overflow-y: scroll;
}

.detailImg {
width: 92%;
margin: 10rpx auto 0;
}

.detailImg image {
display: block;
width: 100%;
margin-bottom: 20rpx;
}
.content {
margin: 0;
padding: 0;
width: 100%;
height: 100%;
background: #f3f3f3;
position: relative;
}
.poster{
width: 100%;
height: 100%;
padding: 20rpx;
position: absolute;
top: 0;
left: 0;
}
.bottomsave {
width: 100%;
height: 140rpx;
line-height: 140rpx;
margin: auto 0;
bottom:0;
left: 0;
right: 0;
border-top: 1px solid #ccc;
box-shadow: 0 0rpx 150rpx #ccc;
background: #fff;
}
.saveposter {
color: #fff;
width: 380rpx;
height: 80rpx;
border-radius: 50rpx;
background: #f08f04;
margin-top: 30rpx;
font-size: 32rpx;
}
.modal {
width: 100%;
height: 100%;
position: fixed;
top: 0;
left: 0;
background: rgba(0, 0, 0, 0.5);
overflow: hidden;
z-index: 10000;
color: #fff;
}

.modal-content {
width: 540rpx;
height: 233rpx;
line-height: 60rpx;
overflow: hidden;
position: fixed;
top: 50%;
left: 0;
z-index: 11;
background: #f9f9f9;
margin: -130rpx 105rpx;
border-radius: 36rpx;
display: flex;
}

.modal-content view {
display: inline-block;
flex: 1;
text-align: center;
}

.modal-content view>text {
color: #000;
display: block;
font-size: 30rpx;
}

.modal-content view>image {
margin-top: 40rpx;
width: 90rpx;
height: 90rpx;
}
.wx-swiper-dots{
margin-bottom: 30rpx;
}

Loading…
Cancel
Save