chenrong 1 år sedan
förälder
incheckning
dda4b37f60
4 ändrade filer med 1897 tillägg och 1716 borttagningar
  1. 9 0
      api/drawCard.js
  2. 620 568
      component/paymentPopup.vue
  3. 696 691
      pages/drawCard_fullSet/drawCard_fullSet.vue
  4. 572 457
      pages/drawCard_infinite/drawCard_infinite.vue

+ 9 - 0
api/drawCard.js

@@ -70,3 +70,12 @@ export function orderPriceApi(data) {
     data: data,
   })
 }
+
+// 用户连击数
+export function combosApi(data) {
+  return request({
+    url: '/wx/raffle/user/combos',
+    method: 'get',
+    data: data,
+  })
+}

+ 620 - 568
component/paymentPopup.vue

@@ -1,577 +1,629 @@
 <template>
-  <view class="content">
-    <uni-popup class="popup" ref="popup" type="bottom" background-color="#F8F8F8">
-      <view class="popupContent">
-        <view class="title">
-          购买卡牌
-          <uni-icons class="close" @click="close()" type="closeempty" size="20"></uni-icons>
-        </view>
-        <view class="row">
-          <view class="label">单价</view>
-          <view class="value price">¥{{ info.price || 0 }}</view>
-        </view>
-
-        <view class="row">
-          <view class="label">选中卡牌号码</view>
-          <view class="value number">
-            <view class="item" v-for="(item, index) in params.raffleNumList">
-              {{ item }}
-            </view>
-          </view>
-        </view>
-
-        <view class="row">
-          <view class="label">优惠卷</view>
-          <view class="value">
-            <view v-if="!selestCouponId && couponList.length > 0" class="hasCoupon" @click="showPopup3">
-              选择优惠券
-              <uni-icons type="right" color="#FF2C43" size="20"></uni-icons>
-            </view>
-            <view v-if="!selestCouponId && couponList.length == 0" class="noCoupon">暂无可用优惠券</view>
-            <view class="coupon price" v-if="selestCouponId">-¥{{ selestCoupon.discount }}</view>
-          </view>
-        </view>
-
-        <view class="row">
-          <view class="label">
-            抵扣(余额
-            <span class="price">0</span>
-            )
-          </view>
-          <view class="value price">¥0</view>
-        </view>
-
-        <view class="row">
-          <view class="label"></view>
-          <view class="value">
-            小计:
-            <span class="price">¥{{ priceAll }}</span>
-          </view>
-        </view>
-
-        <view class="tip">
-          <radio class="radio" :checked="checkbox1" @click="checkbox1 = !checkbox1" />
-          <span>
-            我已阅读并同意
-            <span style="color: #ff8e21">《用户协议》</span>
-          </span>
-        </view>
-
-        <view class="tip">
-          <radio class="radio" :checked="checkbox2" @click="checkbox2 = !checkbox2" />
-          <span>本人已满18岁且具备完全行为能力</span>
-        </view>
-
-        <image @click="submit" class="button" :src="$fileUrl() + '/first/button5.png'" mode="widthFix"></image>
-      </view>
-    </uni-popup>
-    <!-- 抽赏结果 -->
-    <uni-popup class="popup2" ref="popup2" type="center">
-      <image class="bk" :src="$fileUrl() + '/winningLottery/bk.png'" mode="widthFix"></image>
-      <view class="lotteryResults">
-        <view class="title">
-          中奖详情
-          <!-- <uni-icons class="close" @click="close2()" type="closeempty" size="20"></uni-icons> -->
-        </view>
-        <view class="prizes">
-          <view class="item" v-for="(item, index) in prizes">
-            <image class="img" :src="item.prizeIcon" mode="aspectFill"></image>
-            <view class="info">
-              <view class="row name">
-                <span style="margin-right: 10px">{{ item.prizeName }}</span>
-                <span v-if="item.prizeType == 4">随机</span>
-                <span>{{ item.prizeNum }}张</span>
-              </view>
-              <view class="row type">
-                {{ $selectDictLabel(rewardType, item.prizeType) }}
-              </view>
-            </view>
-          </view>
-          <Mloading class="loading" text="抽奖中..." v-if="prizes.length == 0" />
-        </view>
-        <image class="Rectangle" :src="$fileUrl() + '/winningLottery/Rectangle.png'" mode="widthFix"></image>
-        <view class="text">已放入背包,可前往背包查看~</view>
-        <image class="close" @click="close2" :src="$fileUrl() + '/winningLottery/icon.png'" mode="widthFix"></image>
-      </view>
-    </uni-popup>
-    <!-- 选则优惠券 -->
-    <uni-popup class="popup" ref="popup3" type="bottom" background-color="#F8F8F8">
-      <view class="popupContent">
-        <view class="title">
-          <!-- 选择优惠券 -->
-          <uni-icons class="close" @click="close3()" type="closeempty" size="20"></uni-icons>
-        </view>
-      </view>
-      <view class="popupList">
-        <view class="card" v-for="(item, index) in couponList" @click="clickSelestCoupon(item)">
-          <view class="leftIcon"></view>
-          <view class="left">
-            ¥
-            <span style="font-size: 18px">{{ item.discount }}</span>
-          </view>
-          <view class="right">
-            <view class="row title">
-              {{ item.name }}
-            </view>
-            <view class="row endTime">{{ item.endTime }}到期</view>
-            <view class="row desc">
-              {{ item.desc }}
-            </view>
-          </view>
-        </view>
-      </view>
-    </uni-popup>
-  </view>
+	<view class="content">
+		<uni-popup class="popup" ref="popup" type="bottom" background-color="#F8F8F8">
+			<view class="popupContent">
+				<view class="title">
+					购买卡牌
+					<uni-icons class="close" @click="close()" type="closeempty" size="20"></uni-icons>
+				</view>
+				<view class="row">
+					<view class="label">单价</view>
+					<view class="value price">¥{{ info.price || 0 }}</view>
+				</view>
+
+				<view class="row" v-if="params.raffleNumList.length > 0">
+					<view class="label">选中卡牌号码</view>
+					<view class="value number">
+						<view class="item" v-for="(item, index) in params.raffleNumList">
+							{{ item }}
+						</view>
+					</view>
+				</view>
+				<view class="row" v-if="params.raffleNum">
+					<view class="label">数量</view>
+					<view class="value number">
+						<view :class="['item', params.raffleNum == 1?'numBerActive':'']" @click="numChange(1)">
+							一发
+						</view>
+						<view :class="['item', params.raffleNum == 3?'numBerActive':'']" @click="numChange(3)">
+							三发
+						</view>
+						<view :class="['item', params.raffleNum == 5?'numBerActive':'']" @click="numChange(5)">
+							五发
+						</view>
+						<view :class="['item', params.raffleNum == 10?'numBerActive':'']" @click="numChange(10)">
+							十发
+						</view>
+					</view>
+				</view>
+				
+				<view class="row">
+					<view class="label">优惠卷</view>
+					<view class="value">
+						<view v-if="!selestCouponId && couponList.length > 0" class="hasCoupon" @click="showPopup3">
+							选择优惠券
+							<uni-icons type="right" color="#FF2C43" size="20"></uni-icons>
+						</view>
+						<view v-if="!selestCouponId && couponList.length == 0" class="noCoupon">暂无可用优惠券</view>
+						<view class="coupon price" v-if="selestCouponId">-¥{{ selestCoupon.discount }}</view>
+					</view>
+				</view>
+
+				<view class="row">
+					<view class="label">
+						抵扣(余额
+						<span class="price">0</span>
+						)
+					</view>
+					<view class="value price">¥0</view>
+				</view>
+
+				<view class="row">
+					<view class="label"></view>
+					<view class="value">
+						小计:
+						<span class="price">¥{{ priceAll }}</span>
+					</view>
+				</view>
+
+				<view class="tip">
+					<radio class="radio" :checked="checkbox1" @click="checkbox1 = !checkbox1" />
+					<span>
+						我已阅读并同意
+						<span style="color: #ff8e21">《用户协议》</span>
+					</span>
+				</view>
+
+				<view class="tip">
+					<radio class="radio" :checked="checkbox2" @click="checkbox2 = !checkbox2" />
+					<span>本人已满18岁且具备完全行为能力</span>
+				</view>
+
+				<image @click="submit" class="button" :src="$fileUrl() + '/first/button5.png'" mode="widthFix"></image>
+			</view>
+		</uni-popup>
+		<!-- 抽赏结果 -->
+		<uni-popup class="popup2" ref="popup2" type="center">
+			<image class="bk" :src="$fileUrl() + '/winningLottery/bk.png'" mode="widthFix"></image>
+			<view class="lotteryResults">
+				<view class="title">
+					中奖详情
+					<!-- <uni-icons class="close" @click="close2()" type="closeempty" size="20"></uni-icons> -->
+				</view>
+				<view class="prizes">
+					<view class="item" v-for="(item, index) in prizes">
+						<image class="img" :src="item.prizeIcon" mode="aspectFill"></image>
+						<view class="info">
+							<view class="row name">
+								<span style="margin-right: 10px">{{ item.prizeName }}</span>
+								<span v-if="item.prizeType == 4">随机</span>
+								<span>{{ item.prizeNum }}张</span>
+							</view>
+							<view class="row type">
+								{{ $selectDictLabel(rewardType, item.prizeType) }}
+							</view>
+						</view>
+					</view>
+					<Mloading class="loading" text="抽奖中..." v-if="prizes.length == 0" />
+				</view>
+				<image class="Rectangle" :src="$fileUrl() + '/winningLottery/Rectangle.png'" mode="widthFix"></image>
+				<view class="text">已放入背包,可前往背包查看~</view>
+				<image class="close" @click="close2" :src="$fileUrl() + '/winningLottery/icon.png'" mode="widthFix">
+				</image>
+			</view>
+		</uni-popup>
+		<!-- 选则优惠券 -->
+		<uni-popup class="popup" ref="popup3" type="bottom" background-color="#F8F8F8">
+			<view class="popupContent">
+				<view class="title">
+					<!-- 选择优惠券 -->
+					<uni-icons class="close" @click="close3()" type="closeempty" size="20"></uni-icons>
+				</view>
+			</view>
+			<view class="popupList">
+				<view class="card" v-for="(item, index) in couponList" @click="clickSelestCoupon(item)">
+					<view class="leftIcon"></view>
+					<view class="left">
+						¥
+						<span style="font-size: 18px">{{ item.discount }}</span>
+					</view>
+					<view class="right">
+						<view class="row title">
+							{{ item.name }}
+						</view>
+						<view class="row endTime">{{ item.endTime }}到期</view>
+						<view class="row desc">
+							{{ item.desc }}
+						</view>
+					</view>
+				</view>
+			</view>
+		</uni-popup>
+	</view>
 </template>
 
 <script>
-import { rewardType } from '@/utils/commonConfig.js'
-import { couponListApi } from '@/api/coupon.js'
-import { drawCardSubmitApi, submittResultApi, orderPriceApi } from '@/api/drawCard.js'
-
-import Mloading from '@/component/Mloading.vue'
-export default {
-  components: {
-    Mloading,
-  },
-  emits: ['callBack'],
-  props: {
-    value: {
-      type: Object,
-      default: {},
-    },
-  },
-  computed: {},
-  data() {
-    return {
-      priceAll: 0,
-      rewardType: rewardType,
-      checkbox1: false,
-      checkbox2: false,
-      params: {
-        raffleNumList: [],
-        raffleId: null,
-      },
-      orderId: null,
-      prizes: [],
-      // prizes: [
-      // 	{
-      // 		prizeType: 1,
-      // 		prizeIcon: 'https://mall.rongtongh.cn/storage/raffle1.jpg',
-      // 		prizeName: 'S赏',
-      // 		prizeNum: 12
-      // 	},
-      // 	{
-      // 		prizeType: 4,
-      // 		prizeIcon: 'https://mall.rongtongh.cn/storage/raffle1.jpg',
-      // 		prizeName: 'S赏',
-      // 		prizeNum: 12
-      // 	},
-      // 	{
-      // 		prizeType: 1,
-      // 		prizeIcon: 'https://mall.rongtongh.cn/storage/raffle1.jpg',
-      // 		prizeName: 'S赏',
-      // 		prizeNum: 12
-      // 	}
-      // ],
-      getApiNum: 0,
-      info: {},
-      // 优惠券
-      couponList: [],
-      // 选中的优惠券
-      selestCouponId: null,
-      selestCoupon: {},
-    }
-  },
-  mounted() {
-    // this.$refs.popup2.open('center')
-    // this.getLotteryResults()
-  },
-  methods: {
-    getPrice() {
-      let params = {
-        orderNum: this.params.raffleNumList.length,
-        orderThirdId: this.params.raffleId,
-        orderType: 1,
-        userCouponId: this.selestCouponId || '',
-      }
-      orderPriceApi(params).then(res => {
-        console.log(res, '订单价格')
-        this.priceAll = res.data
-      })
-    },
-    show(id, list, info) {
-      this.refresh()
-      console.log(list, 'list')
-      this.params.raffleId = id
-      this.params.raffleNumList = list
-      this.info = info
-      this.$refs.popup.open('bottom')
-      //计算订单价格
-      this.getPrice()
-      // 获取优惠券列表
-      this.getCoupon()
-    },
-    refresh() {
-      // 刷新组件状态
-      ;(this.selestCouponId = null), (this.selestCoupon = {})
-      this.prizes = []
-      this.checkbox1 = false
-      this.checkbox2 = false
-      this.orderId = null
-    },
-    close() {
-      this.$refs.popup.close()
-    },
-    close2() {
-      this.$refs.popup2.close()
-    },
-    showPopup3() {
-      // if (this.couponList.length > 0) {
-      this.$refs.popup3.open()
-      // }
-    },
-    close3() {
-      this.$refs.popup3.close()
-    },
-    // 获取优惠券
-    getCoupon() {
-      let params = {
-        limit: 999,
-        page: 1,
-        status: 0,
-        raffleId: this.params.raffleId,
-      }
-      couponListApi(params).then(res => {
-        this.couponList = res.data.list
-      })
-    },
-    // 选择优惠券
-    clickSelestCoupon(item) {
-      this.selestCoupon = item
-      this.selestCouponId = item.id
-      this.getPrice()
-      this.close3()
-    },
-    submit() {
-      let _this = this
-      if (this.selestCouponId) {
-        this.params.couponId = this.selestCouponId
-      }
-      drawCardSubmitApi(this.params).then(res => {
-        console.log(res, '提交购买卡牌')
-        this.orderId = res.data.orderId
-        // 如果不需要付钱,直接进入抽卡结果
-        if (res.data.orderStatus == 201) {
-          _this.close()
-          _this.$refs.popup2.open('center')
-          _this.getLotteryResults(res)
-          _this.$emit('callBack')
-          return
-        }
-        // 唤起支付
-        this.wxPayment(res.data)
-      })
-    },
-    getLotteryResults() {
-      let params = {
-        orderId: this.orderId,
-        raffleId: this.params.raffleId,
-      }
-      submittResultApi(params).then(res => {
-        console.log(res, 'res抽奖结果')
-        this.prizes = res.data
-      })
-    },
-    wxPayment(data) {
-      let _this = this
-      wx.requestPayment({
-        timeStamp: data.timeStamp,
-        nonceStr: data.nonceStr,
-        package: data.packageValue,
-        signType: data.signType,
-        paySign: data.paySign,
-        success: function (res) {
-          console.log(res, '支付过程成功')
-          _this.close()
-          if (_this.info.type == 3) {
-            wx.showModal({
-              title: '抽奖成功',
-              content: '请耐心等待开奖结果。',
-            })
-          } else {
-            _this.$refs.popup2.open('center')
-            _this.getLotteryResults(res)
-          }
-          _this.$emit('callBack')
-        },
-        fail: function (res) {
-          console.log('支付过程失败')
-          util.showErrorToast('支付失败')
-        },
-        complete: function (res) {
-          console.log('支付过程结束')
-        },
-      })
-    },
-  },
-}
+	import {
+		rewardType
+	} from '@/utils/commonConfig.js'
+	import {
+		couponListApi
+	} from '@/api/coupon.js'
+	import {
+		drawCardSubmitApi,
+		submittResultApi,
+		orderPriceApi
+	} from '@/api/drawCard.js'
+
+	import Mloading from '@/component/Mloading.vue'
+	export default {
+		components: {
+			Mloading,
+		},
+		emits: ['callBack'],
+		props: {
+			value: {
+				type: Object,
+				default: {},
+			},
+		},
+		computed: {},
+		data() {
+			return {
+				priceAll: 0,
+				rewardType: rewardType,
+				checkbox1: false,
+				checkbox2: false,
+				params: {
+					raffleNumList: [],
+					raffleNum: null,
+					raffleId: null,
+				},
+				orderId: null,
+				prizes: [],
+				// prizes: [
+				// 	{
+				// 		prizeType: 1,
+				// 		prizeIcon: 'https://mall.rongtongh.cn/storage/raffle1.jpg',
+				// 		prizeName: 'S赏',
+				// 		prizeNum: 12
+				// 	},
+				// 	{
+				// 		prizeType: 4,
+				// 		prizeIcon: 'https://mall.rongtongh.cn/storage/raffle1.jpg',
+				// 		prizeName: 'S赏',
+				// 		prizeNum: 12
+				// 	},
+				// 	{
+				// 		prizeType: 1,
+				// 		prizeIcon: 'https://mall.rongtongh.cn/storage/raffle1.jpg',
+				// 		prizeName: 'S赏',
+				// 		prizeNum: 12
+				// 	}
+				// ],
+				getApiNum: 0,
+				info: {},
+				// 优惠券
+				couponList: [],
+				// 选中的优惠券
+				selestCouponId: null,
+				selestCoupon: {},
+			}
+		},
+		mounted() {
+			// this.$refs.popup2.open('center')
+			// this.getLotteryResults()
+		},
+		methods: {
+			getPrice() {
+				let params = {
+					orderNum: this.params.raffleNumList.length || this.params.raffleNum,
+					orderThirdId: this.params.raffleId,
+					orderType: 1,
+					userCouponId: this.selestCouponId || '',
+				}
+				orderPriceApi(params).then(res => {
+					console.log(res, '订单价格')
+					this.priceAll = res.data
+				})
+			},
+			numChange(num) {
+				this.params.raffleNum = num
+				//计算订单价格
+				this.getPrice()
+			},
+			show(id, list, info) {
+				this.refresh()
+				console.log(list, 'list')
+				this.params.raffleId = id
+				console.log(toString.call(list), 'toString')
+				if (toString.call(list) == '[object Array]') {
+					this.params.raffleNumList = list
+				} else if (toString.call(list) == '[object Number]') {
+					this.params.raffleNum = list
+				}
+				this.info = info
+				this.$refs.popup.open('bottom')
+				//计算订单价格
+				this.getPrice()
+				// 获取优惠券列表
+				this.getCoupon()
+			},
+			refresh() {
+				// 刷新组件状态
+				(this.selestCouponId = null), (this.selestCoupon = {})
+				this.prizes = []
+				this.checkbox1 = false
+				this.checkbox2 = false
+				this.orderId = null
+			},
+			close() {
+				this.$refs.popup.close()
+			},
+			close2() {
+				this.$refs.popup2.close()
+			},
+			showPopup3() {
+				// if (this.couponList.length > 0) {
+				this.$refs.popup3.open()
+				// }
+			},
+			close3() {
+				this.$refs.popup3.close()
+			},
+			// 获取优惠券
+			getCoupon() {
+				let params = {
+					limit: 999,
+					page: 1,
+					status: 0,
+					raffleId: this.params.raffleId,
+				}
+				couponListApi(params).then(res => {
+					this.couponList = res.data.list
+				})
+			},
+			// 选择优惠券
+			clickSelestCoupon(item) {
+				this.selestCoupon = item
+				this.selestCouponId = item.id
+				this.getPrice()
+				this.close3()
+			},
+			submit() {
+				let _this = this
+				if (this.selestCouponId) {
+					this.params.couponId = this.selestCouponId
+				}
+				drawCardSubmitApi(this.params).then(res => {
+					console.log(res, '提交购买卡牌')
+					this.orderId = res.data.orderId
+					// 如果不需要付钱,直接进入抽卡结果
+					if (res.data.orderStatus == 201) {
+						_this.close()
+						_this.$refs.popup2.open('center')
+						_this.getLotteryResults(res)
+						_this.$emit('callBack')
+						return
+					}
+					// 唤起支付
+					this.wxPayment(res.data)
+				})
+			},
+			getLotteryResults() {
+				let params = {
+					orderId: this.orderId,
+					raffleId: this.params.raffleId,
+				}
+				submittResultApi(params).then(res => {
+					console.log(res, 'res抽奖结果')
+					this.prizes = res.data
+				})
+			},
+			wxPayment(data) {
+				let _this = this
+				wx.requestPayment({
+					timeStamp: data.timeStamp,
+					nonceStr: data.nonceStr,
+					package: data.packageValue,
+					signType: data.signType,
+					paySign: data.paySign,
+					success: function(res) {
+						console.log(res, '支付过程成功')
+						_this.close()
+						if (_this.info.type == 3) {
+							wx.showModal({
+								title: '抽奖成功',
+								content: '请耐心等待开奖结果。',
+							})
+						} else {
+							_this.$refs.popup2.open('center')
+							_this.getLotteryResults(res)
+						}
+						_this.$emit('callBack')
+					},
+					fail: function(res) {
+						console.log('支付过程失败')
+						util.showErrorToast('支付失败')
+					},
+					complete: function(res) {
+						console.log('支付过程结束')
+					},
+				})
+			},
+		},
+	}
 </script>
 
 <style scoped lang="scss">
-.popupContent {
-  background-color: #f8f8f8;
-  border-radius: 10px 10px 0 0;
-
-  > .row {
-    margin: 10px 20px 0 20px;
-    display: flex;
-    justify-content: space-between;
-    padding: 12px;
-    background: #fff;
-    border-radius: 6px;
-    font-size: 14px;
-    color: #666666;
-
-    .price {
-      color: #ff2c43;
-      font-weight: 600;
-    }
-
-    .label {
-      margin-right: 10px;
-    }
-
-    .number {
-      display: flex;
-      flex: 1;
-      overflow: auto;
-      max-width: 60%;
-
-      // justify-content: flex-end;
-      .item {
-        width: 48px;
-        height: 24px;
-        background: #dddddd;
-        border-radius: 51px;
-        color: #000000;
-        line-height: 24px;
-        text-align: center;
-        font-size: 12px;
-        margin-right: 5px;
-
-        flex-grow: 0;
-        flex-shrink: 0;
-      }
-    }
-    .value {
-      .hasCoupon {
-        display: flex;
-        align-items: center;
-        color: #ff2c43;
-        font-size: 12px;
-      }
-      .noCoupon {
-        display: flex;
-        align-items: center;
-        color: #8c8c8c;
-        font-size: 12px;
-      }
-    }
-  }
-  > .title {
-    text-align: center;
-    padding: 15px;
-    font-weight: 600;
-
-    .close {
-      position: absolute;
-      right: 15px;
-      top: 15px;
-    }
-  }
-}
-
-.tip {
-  margin: 10px 20px 0 20px;
-  color: #000000;
-  font-size: 12px;
-  display: flex;
-  align-items: center;
-
-  .radio {
-    transform: scale(0.7);
-  }
-}
-
-.button {
-  margin: 10px auto;
-  width: 210px;
-}
-.popup2 {
-  .bk {
-    position: relative;
-    top: -10vh;
-    width: 100vw;
-  }
-}
-.lotteryResults {
-  width: 76vw;
-  padding-top: 62px;
-  // background: #fff;
-  border-radius: 10px;
-  position: absolute;
-  top: -10vh;
-  left: 50%;
-  transform: translateX(-50%);
-
-  > .title {
-    text-align: center;
-    padding: 16px;
-    height: 20px;
-    font-weight: 600;
-    color: #fff;
-
-    .close {
-      position: absolute;
-      right: 15px;
-      top: 15px;
-    }
-  }
-  .Rectangle {
-    width: calc(100% - 1px);
-    position: absolute;
-    bottom: 45px;
-    left: 3px;
-  }
-  .text {
-    width: calc(100% - 1px);
-    height: 50px;
-    line-height: 50px;
-    position: absolute;
-    bottom: 45px;
-    left: 3px;
-    text-align: center;
-    color: #fff;
-    text-shadow: 0px 1px 0px rgba(0, 0, 0, 0.5);
-    font-size: 12px;
-  }
-  .close {
-    width: 30px;
-    height: 30px;
-    margin-top: 50px;
-    position: relative;
-    z-index: 4;
-    left: 50%;
-    transform: translateX(-50%);
-  }
-  .prizes {
-    margin: 30px 15px 10px 19px;
-    position: relative;
-    height: calc(85vw - 30px);
-    background: linear-gradient(180deg, #f77d4d 0%, #feae81 100%);
-    border-radius: 8px;
-    padding: 10px 15px;
-    overflow: auto;
-
-    .loading {
-      position: absolute;
-      top: 50%;
-      left: 50%;
-      transform: translateY(-50%) translateX(-50%);
-    }
-
-    .item {
-      display: flex;
-      // flex-direction: column;
-      align-items: center;
-      justify-content: center;
-      text-align: center;
-      // margin-right: 5px;
-      background: #fff;
-      padding: 13px 15px;
-      margin-bottom: 10px;
-      border-radius: 8px;
-
-      .img {
-        width: 70px;
-        height: 70px;
-        border-radius: 5px;
-      }
-      .info {
-        display: flex;
-        flex-direction: column;
-        // align-items: center;
-        justify-content: center;
-        flex: 1;
-
-        .row {
-          // width: 100%;
-        }
-        .name {
-          font-size: 14px;
-        }
-      }
-    }
-  }
-}
-
-.popupList {
-  max-height: 50vh;
-  min-height: 30vh;
-  overflow: auto;
-  background: #f8f8f8;
-  padding: 10px;
-
-  .card {
-    background: #fff;
-    border-radius: 8px;
-    overflow: hidden;
-    display: flex;
-
-    .leftIcon {
-      height: auto;
-      width: 8px;
-      background: #ff2c43;
-    }
-
-    .left {
-      width: 80px;
-      display: inline-flex;
-      justify-content: center;
-      align-items: center;
-      color: #ff2c43;
-      font-weight: 600;
-    }
-
-    .right {
-      padding: 10px;
-      color: #8e4a21;
-
-      .row {
-        margin-bottom: 4px;
-        font-size: 12px;
-      }
-
-      .title {
-        font-size: 14px;
-        font-weight: 600;
-      }
-
-      .endTime {
-        color: #ff2c43;
-      }
-
-      .desc {
-        margin-top: 5px;
-        color: #8c8c8c;
-      }
-    }
-  }
-}
+	.popupContent {
+		background-color: #f8f8f8;
+		border-radius: 10px 10px 0 0;
+
+		>.row {
+			margin: 10px 20px 0 20px;
+			display: flex;
+			justify-content: space-between;
+			padding: 12px;
+			background: #fff;
+			border-radius: 6px;
+			font-size: 14px;
+			color: #666666;
+
+			.price {
+				color: #ff2c43;
+				font-weight: 600;
+			}
+
+			.label {
+				margin-right: 10px;
+			}
+
+			.number {
+				display: flex;
+				flex: 1;
+				overflow: auto;
+				max-width: 70%;
+
+				// justify-content: flex-end;
+				.item {
+					width: 48px;
+					height: 24px;
+					background: #dddddd;
+					border-radius: 51px;
+					color: #000000;
+					line-height: 24px;
+					text-align: center;
+					font-size: 12px;
+					margin-right: 5px;
+
+					flex-grow: 0;
+					flex-shrink: 0;
+				}
+				.numBerActive {
+					background: linear-gradient(180deg, #FFAD3D 0%, #FF740A 100%);
+					color: #fff;
+				}
+			}
+
+			.value {
+				.hasCoupon {
+					display: flex;
+					align-items: center;
+					color: #ff2c43;
+					font-size: 12px;
+				}
+
+				.noCoupon {
+					display: flex;
+					align-items: center;
+					color: #8c8c8c;
+					font-size: 12px;
+				}
+			}
+		}
+
+		>.title {
+			text-align: center;
+			padding: 15px;
+			font-weight: 600;
+
+			.close {
+				position: absolute;
+				right: 15px;
+				top: 15px;
+			}
+		}
+	}
+
+	.tip {
+		margin: 10px 20px 0 20px;
+		color: #000000;
+		font-size: 12px;
+		display: flex;
+		align-items: center;
+
+		.radio {
+			transform: scale(0.7);
+		}
+	}
+
+	.button {
+		margin: 10px auto;
+		width: 210px;
+	}
+
+	.popup2 {
+		.bk {
+			position: relative;
+			top: -10vh;
+			width: 100vw;
+		}
+	}
+
+	.lotteryResults {
+		width: 76vw;
+		padding-top: 62px;
+		// background: #fff;
+		border-radius: 10px;
+		position: absolute;
+		top: -10vh;
+		left: 50%;
+		transform: translateX(-50%);
+
+		>.title {
+			text-align: center;
+			padding: 16px;
+			height: 20px;
+			font-weight: 600;
+			color: #fff;
+
+			.close {
+				position: absolute;
+				right: 15px;
+				top: 15px;
+			}
+		}
+
+		.Rectangle {
+			width: calc(100% - 1px);
+			position: absolute;
+			bottom: 45px;
+			left: 3px;
+		}
+
+		.text {
+			width: calc(100% - 1px);
+			height: 50px;
+			line-height: 50px;
+			position: absolute;
+			bottom: 45px;
+			left: 3px;
+			text-align: center;
+			color: #fff;
+			text-shadow: 0px 1px 0px rgba(0, 0, 0, 0.5);
+			font-size: 12px;
+		}
+
+		.close {
+			width: 30px;
+			height: 30px;
+			margin-top: 50px;
+			position: relative;
+			z-index: 4;
+			left: 50%;
+			transform: translateX(-50%);
+		}
+
+		.prizes {
+			margin: 30px 15px 10px 19px;
+			position: relative;
+			height: calc(85vw - 30px);
+			background: linear-gradient(180deg, #f77d4d 0%, #feae81 100%);
+			border-radius: 8px;
+			padding: 10px 15px;
+			overflow: auto;
+
+			.loading {
+				position: absolute;
+				top: 50%;
+				left: 50%;
+				transform: translateY(-50%) translateX(-50%);
+			}
+
+			.item {
+				display: flex;
+				// flex-direction: column;
+				align-items: center;
+				justify-content: center;
+				text-align: center;
+				// margin-right: 5px;
+				background: #fff;
+				padding: 13px 15px;
+				margin-bottom: 10px;
+				border-radius: 8px;
+
+				.img {
+					width: 15vw;
+					height: 15vw;
+					border-radius: 5px;
+				}
+
+				.info {
+					display: flex;
+					flex-direction: column;
+					// align-items: center;
+					justify-content: center;
+					flex: 1;
+
+					.row {
+						// width: 100%;
+					}
+
+					.name {
+						font-size: 14px;
+					}
+				}
+			}
+		}
+	}
+
+	.popupList {
+		max-height: 50vh;
+		min-height: 30vh;
+		overflow: auto;
+		background: #f8f8f8;
+		padding: 10px;
+
+		.card {
+			background: #fff;
+			border-radius: 8px;
+			overflow: hidden;
+			display: flex;
+
+			.leftIcon {
+				height: auto;
+				width: 8px;
+				background: #ff2c43;
+			}
+
+			.left {
+				width: 80px;
+				display: inline-flex;
+				justify-content: center;
+				align-items: center;
+				color: #ff2c43;
+				font-weight: 600;
+			}
+
+			.right {
+				padding: 10px;
+				color: #8e4a21;
+
+				.row {
+					margin-bottom: 4px;
+					font-size: 12px;
+				}
+
+				.title {
+					font-size: 14px;
+					font-weight: 600;
+				}
+
+				.endTime {
+					color: #ff2c43;
+				}
+
+				.desc {
+					margin-top: 5px;
+					color: #8c8c8c;
+				}
+			}
+		}
+	}
 </style>
 <style scoped>
-.popup2 >>> .uni-popup__wrapper {
-  top: -8vh;
-}
-</style>
+	.popup2>>>.uni-popup__wrapper {
+		top: -8vh;
+	}
+</style>

+ 696 - 691
pages/drawCard_fullSet/drawCard_fullSet.vue

@@ -1,704 +1,709 @@
 <template>
-  <view class="container">
-    <view class="head">
-      <image class="img" :src="$fileUrl() + '/ka.jpeg'" mode="aspectFill"></image>
-      <view class="info">
-        <view class="title row">
-          {{ detail.name }}
-        </view>
-        <view class="row">
-          <view class="price">
-            ¥{{ detail.price }}
-            <span class="text fontPFR">/张明信片</span>
-          </view>
-          <image
-            @click="$navigateTo('/pages/rule/rule', { type: 3 })"
-            class="button"
-            :src="$fileUrl() + '/invite/button1.png'"
-            mode="widthFix"
-          ></image>
-        </view>
-        <view class="row">
-          <!-- <view class="users">
+	<view class="container">
+		<view class="head">
+			<image class="img" :src="$fileUrl() + '/ka.jpeg'" mode="aspectFill"></image>
+			<view class="info">
+				<view class="title row">
+					{{ detail.name }}
+				</view>
+				<view class="row">
+					<view class="price">
+						¥{{ detail.price }}
+						<span class="text fontPFR">/张明信片</span>
+					</view>
+					<image @click="$navigateTo('/pages/rule/rule', { type: 3 })" class="button"
+						:src="$fileUrl() + '/invite/button1.png'" mode="widthFix"></image>
+				</view>
+				<view class="row">
+					<!-- <view class="users">
 						<image class="photo" :style="'left:' + index * 11 + 'px'" :src="$fileUrl() + '/Frame1.png'"
 							v-for="(item, index) in userList" mode="widthFix"></image>
 					</view> -->
-          <!-- <view class="hot">
+					<!-- <view class="hot">
 						<image :src="$fileUrl() + /first/hot.png" mode="widthFix"></image>
 						{{ detail.hotNum }}
 					</view> -->
-        </view>
-      </view>
-    </view>
-
-    <view class="cardList">
-      <image class="itemHead" :src="$fileUrl() + '/drawCard_fullSet/headBk.png'" mode="widthFix"></image>
-      <view class="countdown textColor5">
-        {{ countdown }}
-      </view>
-      <view class="title">
-        <view class="left">
-          <image class="text1" :src="$fileUrl() + '/drawCard_fullSet/icon1.png'" mode="widthFix"></image>
-          <view class="row text2" style="font-size: 14px">已选择 {{ selectIndex.length }} 个</view>
-        </view>
-        <view class="right">
-          <view class="text">
-            分享福袋有几率提高
-            <span style="color: #63fff6">S赏</span>
-            概率
-          </view>
-          <!-- <image class="button" :src="$fileUrl() + '/drawCard_fullSet/button1.png'" mode="widthFix"></image> -->
-          <button open-type="share" class="share_btn">
-            <image class="button" :src="$fileUrl() + '/drawCard_fullSet/button1.png'" mode="widthFix"></image>
-          </button>
-        </view>
-      </view>
-      <view class="list">
-        <view :class="['item', item.check ? 'active' : '']" v-for="(item, index) in cardList" @click="clickCard(item)">
-          <image
-            v-if="item.check"
-            class="kaBkActive"
-            :src="$fileUrl() + '/ka/kabk' + cardType(3, item) + 'Active.png'"
-            mode="heightFix"
-          ></image>
-          <image class="kaBk" :src="$fileUrl() + '/ka/kabk' + cardType(3, item) + '.png'" mode="widthFix"></image>
-          <numImg class="num" :value="item" :type="3" />
-        </view>
-      </view>
-      <image
-        class="buyButton"
-        @click="submit"
-        :src="$fileUrl() + '/drawCard_fullSet/button2.png'"
-        mode="widthFix"
-      ></image>
-    </view>
-    <view class="buttons">
-      <image
-        class="button1"
-        @click="toKnapsack"
-        :src="$fileUrl() + '/drawCard_fullSet/button3.png'"
-        mode="heightFix"
-      ></image>
-      <!-- <image class="button1" :src="$fileUrl() + '/drawCard_fullSet/button4.png'" mode="heightFix"></image> -->
-      <image
-        class="button1"
-        @click="$navigateTo('/pages/drawCard_fullSet/goods', { raffleId: params.raffleId })"
-        :src="$fileUrl() + '/drawCard_fullSet/button5.png'"
-        mode="heightFix"
-      ></image>
-    </view>
-    <view
-      class="winningList"
-      v-if="prizeUserList.length > 0"
-      @click="$navigateTo('/pages/drawCard_fullSet/winningList', { raffleId: params.raffleId })"
-    >
-      <image class="winningListTitle" :src="$fileUrl() + '/drawCard_fullSet/icon2.png'" mode="widthFix"></image>
-      <view class="list">
-        <view class="item" v-for="(item, index) in prizeUserList.slice(0, 5)">
-          <image class="photo" :src="item.userAvtar" mode="aspectFill"></image>
-          <view class="name">
-            {{ item.userName }}
-          </view>
-        </view>
-        <view class="item" v-if="prizeUserList.length > 5">
-          <image class="photo" :src="$fileUrl() + '/drawCard_fullSet/icon3.png'" mode="aspectFill"></image>
-          <view class="name" style="color: #6478fd">查看更多</view>
-        </view>
-      </view>
-    </view>
-    <view class="prizes" style="display: none">
-      <image class="title" :src="$fileUrl() + '/first/title.png'" mode="widthFix"></image>
-      <view class="prizesList" v-for="(item, index) in prizeList">
-        <image class="bk" :src="$fileUrl() + '/first/bk2.png'" mode="scaleToFill"></image>
-        <view class="prizesTitle">
-          {{ $selectDictLabel(rewardType, item.type) }}
-        </view>
-        <view class="prizesImgOne" v-if="item.type == 22">
-          <view class="image" v-for="(item2, index2) in item.prizeList">
-            <image :class="item2.leftNum == 0 ? 'grey' : ''" :src="item2.icon" mode="aspectFill"></image>
-          </view>
-        </view>
-        <view class="prizesImg" v-else>
-          <view class="image" v-for="(item2, index2) in item.prizeList">
-            <image :class="item2.leftNum == 0 ? 'grey' : ''" :src="item2.icon" mode="aspectFill"></image>
-          </view>
-        </view>
-      </view>
-    </view>
-    <image class="refresh" @click="refresh" :src="$fileUrl() + '/first/refresh.png'" mode="widthFix"></image>
-    <paymentPopup ref="paymentPopup" @callBack="paymentSuccess" />
-  </view>
+				</view>
+			</view>
+		</view>
+
+		<view class="cardList">
+			<image class="itemHead" :src="$fileUrl() + '/drawCard_fullSet/headBk.png'" mode="widthFix"></image>
+			<view class="countdown textColor5">
+				{{ countdown }}
+			</view>
+			<view class="title">
+				<view class="left">
+					<image class="text1" :src="$fileUrl() + '/drawCard_fullSet/icon1.png'" mode="widthFix"></image>
+					<view class="row text2" style="font-size: 14px">已选择 {{ selectIndex.length }} 个</view>
+				</view>
+				<view class="right">
+					<view class="text">
+						分享福袋有几率提高
+						<span style="color: #63fff6">S赏</span>
+						概率
+					</view>
+					<!-- <image class="button" :src="$fileUrl() + '/drawCard_fullSet/button1.png'" mode="widthFix"></image> -->
+					<button open-type="share" class="share_btn">
+						<image class="button" :src="$fileUrl() + '/drawCard_fullSet/button1.png'" mode="widthFix">
+						</image>
+					</button>
+				</view>
+			</view>
+			<view class="list">
+				<view :class="['item', item.check ? 'active' : '']" v-for="(item, index) in cardList"
+					@click="clickCard(item)">
+					<image v-if="item.check" class="kaBkActive"
+						:src="$fileUrl() + '/ka/kabk' + cardType(3, item) + 'Active.png'" mode="heightFix"></image>
+					<image class="kaBk" :src="$fileUrl() + '/ka/kabk' + cardType(3, item) + '.png'" mode="widthFix">
+					</image>
+					<numImg class="num" :value="item" :type="3" />
+				</view>
+			</view>
+			<image class="buyButton" @click="submit" :src="$fileUrl() + '/drawCard_fullSet/button2.png'"
+				mode="widthFix"></image>
+		</view>
+		<view class="buttons">
+			<image class="button1" @click="toKnapsack" :src="$fileUrl() + '/drawCard_fullSet/button3.png'"
+				mode="heightFix"></image>
+			<!-- <image class="button1" :src="$fileUrl() + '/drawCard_fullSet/button4.png'" mode="heightFix"></image> -->
+			<image class="button1" @click="$navigateTo('/pages/drawCard_fullSet/goods', { raffleId: params.raffleId })"
+				:src="$fileUrl() + '/drawCard_fullSet/button5.png'" mode="heightFix"></image>
+		</view>
+		<view class="winningList" v-if="prizeUserList.length > 0"
+			@click="$navigateTo('/pages/drawCard_fullSet/winningList', { raffleId: params.raffleId })">
+			<image class="winningListTitle" :src="$fileUrl() + '/drawCard_fullSet/icon2.png'" mode="widthFix"></image>
+			<view class="list">
+				<view class="item" v-for="(item, index) in prizeUserList.slice(0, 5)">
+					<image class="photo" :src="item.userAvtar" mode="aspectFill"></image>
+					<view class="name">
+						{{ item.userName }}
+					</view>
+				</view>
+				<view class="item" v-if="prizeUserList.length > 5">
+					<image class="photo" :src="$fileUrl() + '/drawCard_fullSet/icon3.png'" mode="aspectFill"></image>
+					<view class="name" style="color: #6478fd">查看更多</view>
+				</view>
+			</view>
+		</view>
+		<view class="prizes" style="display: none">
+			<image class="title" :src="$fileUrl() + '/first/title.png'" mode="widthFix"></image>
+			<view class="prizesList" v-for="(item, index) in prizeList">
+				<image class="bk" :src="$fileUrl() + '/first/bk2.png'" mode="scaleToFill"></image>
+				<view class="prizesTitle">
+					{{ $selectDictLabel(rewardType, item.type) }}
+				</view>
+				<view class="prizesImgOne" v-if="item.type == 22">
+					<view class="image" v-for="(item2, index2) in item.prizeList">
+						<image :class="item2.leftNum == 0 ? 'grey' : ''" :src="item2.icon" mode="aspectFill"></image>
+					</view>
+				</view>
+				<view class="prizesImg" v-else>
+					<view class="image" v-for="(item2, index2) in item.prizeList">
+						<image :class="item2.leftNum == 0 ? 'grey' : ''" :src="item2.icon" mode="aspectFill"></image>
+					</view>
+				</view>
+			</view>
+		</view>
+		<image class="refresh" @click="refresh" :src="$fileUrl() + '/first/refresh.png'" mode="widthFix"></image>
+		<paymentPopup ref="paymentPopup" @callBack="paymentSuccess" />
+	</view>
 </template>
 
 <script>
-import { rewardType } from '@/utils/commonConfig.js'
-import { prizePoolStatusApi, raffleDetailApi, prizeListApi, prizeUserListApi } from '@/api/drawCard.js'
-
-import { cardType, formatSeconds } from '@/utils/utils.js'
-
-import numImg from '@/component/numImg.vue'
-import paymentPopup from '@/component/paymentPopup.vue'
-
-export default {
-  components: {
-    numImg,
-    paymentPopup,
-  },
-  data() {
-    return {
-      countdown: '',
-      countdownInfinity: null,
-      cardType: cardType,
-      rewardType: rewardType,
-      params: {
-        raffleId: '',
-        limit: 20,
-        page: 1,
-      },
-      detail: {},
-      total: 0,
-      userList: 8,
-      cardList: [],
-      selectIndex: [],
-      prizeList: [],
-      prizeUserList: [],
-    }
-  },
-  onLoad(query) {
-    console.log(query, 'query')
-    if (query.id) {
-      this.params.raffleId = query.id
-      this.init()
-    }
-    this.paymentSuccess()
-  },
-  onHide() {
-    if (!this.countdownInfinity) {
-      clearInterval(this.countdownInfinity)
-    }
-  },
-  methods: {
-    init() {
-      // 获取卡牌商品列表
-      this.getCardList()
-      // 获取卡包详情
-      this.getDetail()
-      //获取奖池
-      this.getPrizeList()
-      // 获取中奖记录
-      this.getPrizeUserList()
-    },
-    toKnapsack() {
-      // 跳转背包界面
-      wx.navigateTo({
-        url: '/pages/knapsack/knapsack',
-      })
-    },
-    refresh() {
-      wx.showLoading()
-      setTimeout(function () {
-        wx.hideLoading()
-      }, 1000)
-      this.init()
-      this.selectIndex = []
-      for (var i = 0; i < this.cardList.length; i++) {
-        this.cardList[i].check = false
-      }
-    },
-    getPrizeUserList() {
-      let params = {
-        limit: 999,
-        page: 1,
-        raffleId: this.params.raffleId,
-      }
-      prizeUserListApi(params).then(res => {
-        console.log(res, '中奖记录')
-        let userIds = []
-        let list = []
-        for (var i = 0; i < res.data.length; i++) {
-          let item = res.data[i]
-          if (userIds.indexOf(item.userId) == -1) {
-            userIds.push(item.userId)
-            console.log(userIds.indexOf(item.userId))
-            let index = userIds.indexOf(item.userId)
-            list[index] = {
-              userId: item.userId,
-              userAvtar: item.userAvtar,
-              userName: item.userName,
-              prizes: [],
-            }
-            list[index].prizes.push(item)
-          } else {
-            let index = userIds.indexOf(item.userId)
-            list[index].prizes.push(item)
-          }
-        }
-        this.userIds = userIds
-        this.prizeUserList = list
-      })
-    },
-    getPrizeList() {
-      let params = {
-        raffleId: this.params.raffleId,
-      }
-      prizeListApi(params).then(res => {
-        console.log(res, '奖池预览')
-        let newArray = res.data
-        for (var i = 0; i < res.data.length; i++) {
-          if (res.data[i].type == 21) {
-            newArray = []
-            newArray.push(res.data[i])
-            res.data.splice(i, 1)
-            newArray.push(...res.data)
-            break
-          }
-        }
-        this.prizeList = newArray
-      })
-    },
-    toWinningRecord() {
-      let params = {
-        raffleId: this.params.raffleId,
-      }
-      this.$navigateTo('/pages/winningRecord/winningRecord', params)
-    },
-    getDetail() {
-      let params = {
-        raffleId: this.params.raffleId,
-      }
-      raffleDetailApi(params).then(res => {
-        console.log(res, '详情')
-        this.detail = res.data
-        this.endTime = new Date(this.detail.endTime).getTime()
-        // this.endTime = new Date('2023-11-10 14:48:00').getTime()
-        // 初始化倒计时
-        this.initCountdown()
-        if (this.countdown != '已结束') {
-          this.countdownInfinity = setInterval(() => {
-            if (this.countdown == '已结束') {
-              clearInterval(this.countdownInfinity)
-              this.countdownInfinity = null
-              return
-            }
-            this.initCountdown()
-          }, 1000)
-        }
-      })
-    },
-    initCountdown() {
-      let nowTime = new Date().getTime()
-      let endTime = this.endTime
-      let countdownText = ''
-      let countdown = endTime - nowTime
-      if (countdown <= 0) {
-        countdownText = '已结束'
-      } else {
-        countdownText = formatSeconds(countdown)
-      }
-      // console.log(countdownText, 'countdownText')
-      this.countdown = countdownText
-    },
-    submit() {
-      if (this.selectIndex.length == 0) {
-        wx.showToast({
-          title: '请选则要购买的卡牌。',
-          icon: 'none',
-        })
-        return
-      }
-      this.$refs.paymentPopup.show(this.params.raffleId, this.selectIndex, this.detail)
-    },
-    // 支付成功后回调
-    paymentSuccess() {
-      let _this = this
-      console.log('刷新抽卡界面')
-      // 刷新界面
-      _this.refresh()
-    },
-    // 选中取消选中卡牌
-    clickCard(item) {
-      if (item.status == 0) {
-        item.check = !item.check
-      }
-      // 如果是选中
-      let index = this.selectIndex.indexOf(item.number)
-      if (item.check && index == -1) {
-        this.selectIndex.push(item.number)
-      } else if (!item.check && index != -1) {
-        this.selectIndex.splice(index, 1)
-      }
-    },
-    // 标记已经选中卡牌
-    selectFormat() {
-      for (var i = 0; i < this.cardList.length; i++) {
-        if (this.selectIndex.includes(this.cardList[i].number)) {
-          this.cardList[i].check = true
-        }
-      }
-    },
-    getCardList() {
-      prizePoolStatusApi(this.params).then(res => {
-        console.log(res, '卡牌分页')
-        for (var i = 0; i < res.data.list.length; i++) {
-          res.data.list[i].check = false
-        }
-        this.cardList = res.data.list
-        this.selectFormat()
-        this.total = res.data.total
-      })
-    },
-    left() {
-      console.log('上一页')
-      if (this.params.page > 1) {
-        this.params.page = this.params.page - 1
-      }
-      this.getCardList()
-    },
-    right() {
-      console.log('下一页')
-      let pages = Math.ceil(this.total / this.params.limit)
-      if (this.params.page < pages) {
-        this.params.page = this.params.page + 1
-      }
-      this.getCardList()
-    },
-  },
-}
+	import {
+		rewardType
+	} from '@/utils/commonConfig.js'
+	import {
+		prizePoolStatusApi,
+		raffleDetailApi,
+		prizeListApi,
+		prizeUserListApi
+	} from '@/api/drawCard.js'
+
+	import {
+		cardType,
+		formatSeconds
+	} from '@/utils/utils.js'
+
+	import numImg from '@/component/numImg.vue'
+	import paymentPopup from '@/component/paymentPopup.vue'
+
+	export default {
+		components: {
+			numImg,
+			paymentPopup,
+		},
+		data() {
+			return {
+				countdown: '',
+				countdownInfinity: null,
+				cardType: cardType,
+				rewardType: rewardType,
+				params: {
+					raffleId: '',
+					limit: 20,
+					page: 1,
+				},
+				detail: {},
+				total: 0,
+				userList: 8,
+				cardList: [],
+				selectIndex: [],
+				prizeList: [],
+				prizeUserList: [],
+			}
+		},
+		onLoad(query) {
+			console.log(query, 'query')
+			if (query.id) {
+				this.params.raffleId = query.id
+				this.init()
+			}
+			this.paymentSuccess()
+		},
+		onHide() {
+			if (!this.countdownInfinity) {
+				clearInterval(this.countdownInfinity)
+			}
+		},
+		methods: {
+			init() {
+				// 获取卡牌商品列表
+				this.getCardList()
+				// 获取卡包详情
+				this.getDetail()
+				//获取奖池
+				this.getPrizeList()
+				// 获取中奖记录
+				this.getPrizeUserList()
+			},
+			toKnapsack() {
+				// 跳转背包界面
+				wx.navigateTo({
+					url: '/pages/knapsack/knapsack',
+				})
+			},
+			refresh() {
+				wx.showLoading()
+				setTimeout(function() {
+					wx.hideLoading()
+				}, 1000)
+				this.init()
+				this.selectIndex = []
+				for (var i = 0; i < this.cardList.length; i++) {
+					this.cardList[i].check = false
+				}
+			},
+			getPrizeUserList() {
+				let params = {
+					limit: 999,
+					page: 1,
+					raffleId: this.params.raffleId,
+				}
+				prizeUserListApi(params).then(res => {
+					console.log(res, '中奖记录')
+					let userIds = []
+					let list = []
+					for (var i = 0; i < res.data.length; i++) {
+						let item = res.data[i]
+						if (userIds.indexOf(item.userId) == -1) {
+							userIds.push(item.userId)
+							console.log(userIds.indexOf(item.userId))
+							let index = userIds.indexOf(item.userId)
+							list[index] = {
+								userId: item.userId,
+								userAvtar: item.userAvtar,
+								userName: item.userName,
+								prizes: [],
+							}
+							list[index].prizes.push(item)
+						} else {
+							let index = userIds.indexOf(item.userId)
+							list[index].prizes.push(item)
+						}
+					}
+					this.userIds = userIds
+					this.prizeUserList = list
+				})
+			},
+			getPrizeList() {
+				let params = {
+					raffleId: this.params.raffleId,
+				}
+				prizeListApi(params).then(res => {
+					console.log(res, '奖池预览')
+					let newArray = res.data
+					for (var i = 0; i < res.data.length; i++) {
+						if (res.data[i].type == 21) {
+							newArray = []
+							newArray.push(res.data[i])
+							res.data.splice(i, 1)
+							newArray.push(...res.data)
+							break
+						}
+					}
+					this.prizeList = newArray
+				})
+			},
+			toWinningRecord() {
+				let params = {
+					raffleId: this.params.raffleId,
+				}
+				this.$navigateTo('/pages/winningRecord/winningRecord', params)
+			},
+			getDetail() {
+				let params = {
+					raffleId: this.params.raffleId,
+				}
+				raffleDetailApi(params).then(res => {
+					console.log(res, '详情')
+					this.detail = res.data
+					this.endTime = new Date(this.detail.endTime).getTime()
+					// this.endTime = new Date('2023-11-10 14:48:00').getTime()
+					// 初始化倒计时
+					this.initCountdown()
+					if (this.countdown != '已结束') {
+						this.countdownInfinity = setInterval(() => {
+							if (this.countdown == '已结束') {
+								clearInterval(this.countdownInfinity)
+								this.countdownInfinity = null
+								return
+							}
+							this.initCountdown()
+						}, 1000)
+					}
+				})
+			},
+			initCountdown() {
+				let nowTime = new Date().getTime()
+				let endTime = this.endTime
+				let countdownText = ''
+				let countdown = endTime - nowTime
+				if (countdown <= 0) {
+					countdownText = '已结束'
+				} else {
+					countdownText = formatSeconds(countdown)
+				}
+				// console.log(countdownText, 'countdownText')
+				this.countdown = countdownText
+			},
+			submit() {
+				if (this.selectIndex.length == 0) {
+					wx.showToast({
+						title: '请选则要购买的卡牌。',
+						icon: 'none',
+					})
+					return
+				}
+				this.$refs.paymentPopup.show(this.params.raffleId, this.selectIndex, this.detail)
+			},
+			// 支付成功后回调
+			paymentSuccess() {
+				let _this = this
+				console.log('刷新抽卡界面')
+				// 刷新界面
+				_this.refresh()
+			},
+			// 选中取消选中卡牌
+			clickCard(item) {
+				if (item.status == 0) {
+					item.check = !item.check
+				}
+				// 如果是选中
+				let index = this.selectIndex.indexOf(item.number)
+				if (item.check && index == -1) {
+					this.selectIndex.push(item.number)
+				} else if (!item.check && index != -1) {
+					this.selectIndex.splice(index, 1)
+				}
+			},
+			// 标记已经选中卡牌
+			selectFormat() {
+				for (var i = 0; i < this.cardList.length; i++) {
+					if (this.selectIndex.includes(this.cardList[i].number)) {
+						this.cardList[i].check = true
+					}
+				}
+			},
+			getCardList() {
+				prizePoolStatusApi(this.params).then(res => {
+					console.log(res, '卡牌分页')
+					for (var i = 0; i < res.data.list.length; i++) {
+						res.data.list[i].check = false
+					}
+					this.cardList = res.data.list
+					this.selectFormat()
+					this.total = res.data.total
+				})
+			},
+			left() {
+				console.log('上一页')
+				if (this.params.page > 1) {
+					this.params.page = this.params.page - 1
+				}
+				this.getCardList()
+			},
+			right() {
+				console.log('下一页')
+				let pages = Math.ceil(this.total / this.params.limit)
+				if (this.params.page < pages) {
+					this.params.page = this.params.page + 1
+				}
+				this.getCardList()
+			},
+		},
+	}
 </script>
 
 <style scoped lang="scss">
-.share_btn {
-  background-color: transparent;
-  border-width: 0 !important;
-  border-radius: 0;
-  overflow: initial;
-  text-align: start;
-  padding: 0;
-  box-shadow: none !important;
-  -webkit-tap-highlight-color: transparent;
-  &::after {
-    border: none;
-  }
-}
-.container {
-  background: #9ec8f9;
-  padding-top: 15px;
-  overflow: auto;
-
-  .refresh {
-    position: fixed;
-    display: none;
-    right: 4px;
-    top: 75%;
-    width: 40px;
-    z-index: 5;
-  }
-
-  .head {
-    background: #fff;
-    border: 10px;
-    padding: 15px;
-    border-radius: 10px 10px 0 0;
-    display: flex;
-    justify-content: space-between;
-    margin-bottom: 20px;
-
-    .img {
-      width: 106px;
-      height: 106px;
-      border-radius: 5px;
-      overflow: hidden;
-      margin-right: 10px;
-    }
-
-    .info {
-      display: flex;
-      flex-direction: column;
-      justify-content: start;
-      flex: 1;
-      .row {
-        margin: 5px 0;
-        display: flex;
-        justify-content: space-between;
-        color: #999999;
-
-        .button {
-          width: 67px;
-        }
-
-        .hot {
-          display: flex;
-          font-size: 12px;
-          color: #999999;
-
-          image {
-            width: 16px;
-          }
-        }
-
-        .users {
-          position: relative;
-
-          .photo {
-            position: absolute;
-            width: 20px;
-            height: 20px;
-            border-radius: 50%;
-          }
-        }
-      }
-
-      .title {
-        font-weight: 600;
-        color: #000;
-      }
-
-      .price {
-        font-size: 16px;
-        font-weight: 600;
-        color: #ff2c43;
-
-        .text {
-          font-size: 14px;
-          color: #999999;
-          font-weight: 500;
-        }
-      }
-    }
-  }
-
-  .cardList {
-    margin: 10px;
-    border-radius: 12px;
-    position: relative;
-    background: linear-gradient(180deg, #31b7fd 10%, #6478fd 90%);
-    // overflow: scroll;
-    padding-bottom: 1px;
-    .countdown {
-      position: absolute;
-      top: 1px;
-      padding-left: 70px;
-      font-size: 15px;
-    }
-    .itemHead {
-      position: relative;
-      left: -10px;
-      top: -10px;
-      width: calc(100% + 10px);
-    }
-    .title {
-      display: flex;
-      justify-content: space-between;
-      color: #fff;
-      padding: 0 15px 6px 15px;
-
-      .left {
-        .text1 {
-          width: 6.5rem;
-          // font-size: 24px;
-          // font-weight: 600;
-          // text-shadow: 1px 1px 0px #0A57BA;
-          // font-family: YouSheBiaoTiHei-Regular, YouSheBiaoTiHei;
-        }
-        .text2 {
-          font-family:
-            Alimama FangYuanTi VF-Medium-Round,
-            Alimama FangYuanTi VF-Medium;
-        }
-      }
-      .right {
-        display: flex;
-        .text {
-          width: 100px;
-          font-size: 12px;
-          text-align: right;
-        }
-        .button {
-          width: 72px;
-          height: 30px;
-        }
-      }
-    }
-    .bk {
-      width: 100%;
-    }
-
-    .list {
-      background: #fff;
-      padding: 15px;
-      border-radius: 12px;
-      // width: calc(100% - 80px);
-      // height: calc(100% - 70px);
-      // position: absolute;
-      // top: 0;
-      display: grid;
-      grid-template-columns: 1fr 1fr 1fr 1fr 1fr;
-      grid-template-rows: 1fr 1fr 1fr;
-      grid-gap: 15px;
-
-      .item {
-        display: inline-flex;
-        justify-content: center;
-        align-items: center;
-        position: relative;
-
-        .kaBkActive {
-          height: 142%;
-          width: 100%;
-          position: absolute;
-          z-index: 1;
-        }
-        .kaBk {
-          width: 100%;
-          border-radius: 4px;
-          z-index: 2;
-        }
-
-        .num {
-          position: absolute;
-          width: 100%;
-          height: 100%;
-          top: 0;
-          z-index: 2;
-        }
-      }
-    }
-
-    .buyButton {
-      width: 40%;
-      margin: 10px auto;
-    }
-  }
-
-  .winningList {
-    margin: 20px 10px;
-    padding: 15px;
-    background: linear-gradient(180deg, #31b7fd 10%, #6478fd 90%);
-    border-radius: 12px;
-
-    .winningListTitle {
-      width: 92px;
-      margin-bottom: 12px;
-    }
-
-    .list {
-      position: relative;
-      padding: 12px 7px 12px 12px;
-      border-radius: 12px;
-      background: #fff;
-      display: flex;
-
-      .item {
-        width: calc(100% / 6 - 5px);
-        // margin: 0 auto;
-        position: relative;
-        display: inline-flex;
-        flex-direction: column;
-        justify-content: center;
-        align-items: center;
-        margin-right: 5px;
-
-        .photo {
-          width: 40px;
-          height: 40px;
-          border-radius: 50%;
-          background: #b6b6b6;
-        }
-
-        .name {
-          margin-top: 5px;
-          display: inline-block;
-          font-size: 11px;
-          max-width: 100%;
-          overflow: hidden;
-          white-space: nowrap;
-          text-overflow: ellipsis;
-        }
-      }
-    }
-  }
-
-  .buttons {
-    display: flex;
-    justify-content: center;
-    align-items: flex-start;
-    padding: 0 10px;
-
-    .button1 {
-      height: 40px;
-    }
-  }
-
-  .prizes {
-    .title {
-      width: 103px;
-      margin: 0 auto;
-    }
-
-    .prizesList {
-      margin: 20px;
-      position: relative;
-      overflow: hidden;
-      // z-index: 5;
-
-      .bk {
-        width: 100%;
-        height: 100%;
-        position: absolute;
-        top: 0;
-      }
-      .prizesTitle {
-        position: relative;
-        height: 30px;
-        line-height: 30px;
-        width: 100%;
-        margin-left: 1px;
-        margin-top: 15px;
-        padding-left: 15px;
-        color: #fff;
-        font-weight: 800;
-        background: linear-gradient(90deg, rgba(89, 166, 255, 0.8) 0%, rgba(158, 200, 249, 0) 100%);
-      }
-      .prizesImg {
-        position: relative;
-        display: grid;
-        grid-template-columns: 1fr 1fr;
-        margin: 15px;
-        white-space: wrap;
-        text-align: center;
-        // overflow: auto;
-
-        .image {
-          text-align: center;
-
-          image {
-            display: inline-block;
-            width: 36vw;
-            height: 36vw;
-            border-radius: 10px;
-            margin: 0 5px;
-          }
-        }
-      }
-      .prizesImgOne {
-        position: relative;
-        display: flex;
-        justify-content: center;
-        margin: 15px;
-
-        .image {
-          text-align: center;
-
-          image {
-            display: inline-block;
-            width: 45vw;
-            height: 45vw;
-            border-radius: 10px;
-            margin: 0 5px;
-          }
-        }
-      }
-    }
-  }
-}
-</style>
+	.share_btn {
+		background-color: transparent;
+		border-width: 0 !important;
+		border-radius: 0;
+		overflow: initial;
+		text-align: start;
+		padding: 0;
+		box-shadow: none !important;
+		-webkit-tap-highlight-color: transparent;
+
+		&::after {
+			border: none;
+		}
+	}
+
+	.container {
+		background: #9ec8f9;
+		padding-top: 15px;
+		overflow: auto;
+
+		.refresh {
+			position: fixed;
+			display: none;
+			right: 4px;
+			top: 75%;
+			width: 40px;
+			z-index: 5;
+		}
+
+		.head {
+			background: #fff;
+			border: 10px;
+			padding: 15px;
+			border-radius: 10px 10px 0 0;
+			display: flex;
+			justify-content: space-between;
+			margin-bottom: 20px;
+
+			.img {
+				width: 106px;
+				height: 106px;
+				border-radius: 5px;
+				overflow: hidden;
+				margin-right: 10px;
+			}
+
+			.info {
+				display: flex;
+				flex-direction: column;
+				justify-content: start;
+				flex: 1;
+
+				.row {
+					margin: 5px 0;
+					display: flex;
+					justify-content: space-between;
+					color: #999999;
+
+					.button {
+						width: 67px;
+					}
+
+					.hot {
+						display: flex;
+						font-size: 12px;
+						color: #999999;
+
+						image {
+							width: 16px;
+						}
+					}
+
+					.users {
+						position: relative;
+
+						.photo {
+							position: absolute;
+							width: 20px;
+							height: 20px;
+							border-radius: 50%;
+						}
+					}
+				}
+
+				.title {
+					font-weight: 600;
+					color: #000;
+				}
+
+				.price {
+					font-size: 16px;
+					font-weight: 600;
+					color: #ff2c43;
+
+					.text {
+						font-size: 14px;
+						color: #999999;
+						font-weight: 500;
+					}
+				}
+			}
+		}
+
+		.cardList {
+			margin: 10px;
+			border-radius: 12px;
+			position: relative;
+			background: linear-gradient(180deg, #31b7fd 10%, #6478fd 90%);
+			// overflow: scroll;
+			padding-bottom: 1px;
+
+			.countdown {
+				position: absolute;
+				top: 1px;
+				padding-left: 70px;
+				font-size: 15px;
+			}
+
+			.itemHead {
+				position: relative;
+				left: -10px;
+				top: -10px;
+				width: calc(100% + 10px);
+			}
+
+			.title {
+				display: flex;
+				justify-content: space-between;
+				color: #fff;
+				padding: 0 15px 6px 15px;
+
+				.left {
+					.text1 {
+						width: 6.5rem;
+						// font-size: 24px;
+						// font-weight: 600;
+						// text-shadow: 1px 1px 0px #0A57BA;
+						// font-family: YouSheBiaoTiHei-Regular, YouSheBiaoTiHei;
+					}
+
+					.text2 {
+						font-family:
+							Alimama FangYuanTi VF-Medium-Round,
+							Alimama FangYuanTi VF-Medium;
+					}
+				}
+
+				.right {
+					display: flex;
+
+					.text {
+						width: 100px;
+						font-size: 12px;
+						text-align: right;
+					}
+
+					.button {
+						width: 72px;
+						height: 30px;
+					}
+				}
+			}
+
+			.bk {
+				width: 100%;
+			}
+
+			.list {
+				background: #fff;
+				padding: 15px;
+				border-radius: 12px;
+				// width: calc(100% - 80px);
+				// height: calc(100% - 70px);
+				// position: absolute;
+				// top: 0;
+				display: grid;
+				grid-template-columns: 1fr 1fr 1fr 1fr 1fr;
+				grid-template-rows: 1fr 1fr 1fr;
+				grid-gap: 15px;
+
+				.item {
+					display: inline-flex;
+					justify-content: center;
+					align-items: center;
+					position: relative;
+
+					.kaBkActive {
+						height: 142%;
+						width: 100%;
+						position: absolute;
+						z-index: 1;
+					}
+
+					.kaBk {
+						width: 100%;
+						border-radius: 4px;
+						z-index: 2;
+					}
+
+					.num {
+						position: absolute;
+						width: 100%;
+						height: 100%;
+						top: 0;
+						z-index: 2;
+					}
+				}
+			}
+
+			.buyButton {
+				width: 40%;
+				margin: 10px auto;
+			}
+		}
+
+		.winningList {
+			margin: 20px 10px;
+			padding: 15px;
+			background: linear-gradient(180deg, #31b7fd 10%, #6478fd 90%);
+			border-radius: 12px;
+
+			.winningListTitle {
+				width: 92px;
+				margin-bottom: 12px;
+			}
+
+			.list {
+				position: relative;
+				padding: 12px 7px 12px 12px;
+				border-radius: 12px;
+				background: #fff;
+				display: flex;
+
+				.item {
+					width: calc(100% / 6 - 5px);
+					// margin: 0 auto;
+					position: relative;
+					display: inline-flex;
+					flex-direction: column;
+					justify-content: center;
+					align-items: center;
+					margin-right: 5px;
+
+					.photo {
+						width: 40px;
+						height: 40px;
+						border-radius: 50%;
+						background: #b6b6b6;
+					}
+
+					.name {
+						margin-top: 5px;
+						display: inline-block;
+						font-size: 11px;
+						max-width: 100%;
+						overflow: hidden;
+						white-space: nowrap;
+						text-overflow: ellipsis;
+					}
+				}
+			}
+		}
+
+		.buttons {
+			display: flex;
+			justify-content: center;
+			align-items: flex-start;
+			padding: 0 10px;
+
+			.button1 {
+				height: 40px;
+			}
+		}
+
+		.prizes {
+			.title {
+				width: 103px;
+				margin: 0 auto;
+			}
+
+			.prizesList {
+				margin: 20px;
+				position: relative;
+				overflow: hidden;
+				// z-index: 5;
+
+				.bk {
+					width: 100%;
+					height: 100%;
+					position: absolute;
+					top: 0;
+				}
+
+				.prizesTitle {
+					position: relative;
+					height: 30px;
+					line-height: 30px;
+					width: 100%;
+					margin-left: 1px;
+					margin-top: 15px;
+					padding-left: 15px;
+					color: #fff;
+					font-weight: 800;
+					background: linear-gradient(90deg, rgba(89, 166, 255, 0.8) 0%, rgba(158, 200, 249, 0) 100%);
+				}
+
+				.prizesImg {
+					position: relative;
+					display: grid;
+					grid-template-columns: 1fr 1fr;
+					margin: 15px;
+					white-space: wrap;
+					text-align: center;
+					// overflow: auto;
+
+					.image {
+						text-align: center;
+
+						image {
+							display: inline-block;
+							width: 36vw;
+							height: 36vw;
+							border-radius: 10px;
+							margin: 0 5px;
+						}
+					}
+				}
+
+				.prizesImgOne {
+					position: relative;
+					display: flex;
+					justify-content: center;
+					margin: 15px;
+
+					.image {
+						text-align: center;
+
+						image {
+							display: inline-block;
+							width: 45vw;
+							height: 45vw;
+							border-radius: 10px;
+							margin: 0 5px;
+						}
+					}
+				}
+			}
+		}
+	}
+</style>

+ 572 - 457
pages/drawCard_infinite/drawCard_infinite.vue

@@ -1,470 +1,585 @@
 <template>
-  <view class="container">
-    <view class="head">
-      <image class="img" :src="$fileUrl() + '/ka.jpeg'" mode="aspectFill"></image>
-      <view class="info">
-        <view class="title row">
-          {{ detail.name }}
-        </view>
-        <view class="row">
-          <view class="price">
-            ¥{{ detail.price }}
-            <span class="text fontPFR">/张明信片</span>
-          </view>
-          <image
-            @click="$navigateTo('/pages/rule/rule', { type: 3 })"
-            class="button"
-            :src="$fileUrl() + '/invite/button1.png'"
-            mode="widthFix"
-          ></image>
-        </view>
-        <view class="row">
-          <!-- <view class="users">
+	<view class="container">
+		<view class="head">
+			<image class="img" :src="$fileUrl() + '/ka.jpeg'" mode="aspectFill"></image>
+			<view class="info">
+				<view class="title row">
+					{{ detail.name }}
+				</view>
+				<view class="row">
+					<view class="price">
+						¥{{ detail.price }}
+						<span class="text fontPFR">/张明信片</span>
+					</view>
+					<image @click="$navigateTo('/pages/rule/rule', { type: 3 })" class="button"
+						:src="$fileUrl() + '/invite/button1.png'" mode="widthFix"></image>
+				</view>
+				<view class="row">
+					<!-- <view class="users">
 						<image class="photo" :style="'left:' + index * 11 + 'px'" :src="$fileUrl() + '/Frame1.png'"
 							v-for="(item, index) in userList" mode="widthFix"></image>
 					</view> -->
-          <!-- <view class="hot">
+					<!-- <view class="hot">
 						<image :src="$fileUrl() + /first/hot.png" mode="widthFix"></image>
 						{{ detail.hotNum }}
 					</view> -->
-        </view>
-      </view>
-    </view>
-    <view class="box">
-      <view class="boxContent">
-        <view class="boxLeft">
-          <view class="row1">
-            <view class="text">连击 × 0</view>
-            <view class="text">
-              0
-              <span class="text1">/300</span>
-            </view>
-          </view>
-          <view class="row2">
-            <view class="row2content">
-              <p>每连击300发未出传说赏,可获得一个宝箱。</p>
-              <p>如果中间抽出传说赏,则清空连击次数。</p>
-            </view>
-          </view>
-        </view>
-        <view class="boxRiaht">
-          <image class="icon" :src="$fileUrl() + '/drawCard_infinite/icon1.png'" mode="widthFix"></image>
-        </view>
-      </view>
-    </view>
-    <view class="buttons1">
-      <image
-        class="button"
-        @click="tabClick(1)"
-        style="margin-right: 20px"
-        :src="$fileUrl() + `/drawCard_infinite/button1${active1 == 1 ? 'A' : ''}.png`"
-        mode="widthFix"
-      ></image>
-      <image
-        class="button"
-        @click="tabClick(2)"
-        :src="$fileUrl() + `/drawCard_infinite/button2${active1 == 2 ? 'A' : ''}.png`"
-        mode="widthFix"
-      ></image>
-    </view>
-    <view class="prizeList" v-if="active1 == 1">
-      <view class="prizeRow" v-for="(item, index) in prizeList">
-        <image class="bk" :src="$fileUrl() + '/drawCard_infinite/bk.png'" mode="scaleToFill"></image>
-        <view class="prizeRowContent">
-          <view class="prizesTitle">
-            <span>
-              <span style="font-size: 18px; margin-right: 5px; font-weight: 600">
-                {{ $selectDictLabel(rewardType, item.type) }}
-              </span>
-              <span style="font-weight: 600">概率0.21%</span>
-            </span>
-            <span class="sp">各类别赏中赏概率不代表具体产品中赏概率</span>
-          </view>
-          <view class="prizesItems">
-            <view class="prize" v-for="(item2, index2) in item.prizeList">
-              <view class="kaImg">
-                <image class="kabk" :src="$fileUrl() + '/drawCard_infinite/kaBk.png'" mode="widthFix"></image>
-                <image class="img" :src="item2.icon" mode="aspectFit"></image>
-              </view>
-              <view class="kaName">
-                {{ item2.name }}
-              </view>
-              <view class="price">
-                <span class="priceText">¥{{ detail.price }}</span>
-                参考价
-              </view>
-            </view>
-          </view>
-        </view>
-      </view>
-    </view>
-    <view class="">
-      <button>抽一发</button>
-      <button>抽三发</button>
-      <button>抽五发</button>
-      <button>抽十发</button>
-    </view>
-    <paymentPopup ref="paymentPopup" @callBack="paymentSuccess" />
-  </view>
+				</view>
+			</view>
+		</view>
+		<view class="box">
+			<view class="boxContent">
+				<view class="boxLeft">
+					<view class="row1">
+						<view class="text">连击 × {{combos}}</view>
+						<view class="text">
+							{{combos}}
+							<span class="text1">/300</span>
+						</view>
+					</view>
+					<view class="row2">
+						<view class="row2content">
+							<p>每连击300发未出传说赏,可获得一个宝箱。</p>
+							<p>如果中间抽出传说赏,则清空连击次数。</p>
+						</view>
+					</view>
+				</view>
+				<view class="boxRiaht">
+					<image class="icon" :src="$fileUrl() + '/drawCard_infinite/icon1.png'" mode="widthFix"></image>
+				</view>
+			</view>
+		</view>
+		<view class="buttons1">
+			<image class="button" @click="tabClick(1)" style="margin-right: 20px"
+				:src="$fileUrl() + `/drawCard_infinite/button1${active1 == 1 ? 'A' : ''}.png`" mode="widthFix"></image>
+			<image class="button" @click="tabClick(2)"
+				:src="$fileUrl() + `/drawCard_infinite/button2${active1 == 2 ? 'A' : ''}.png`" mode="widthFix"></image>
+		</view>
+		<view class="prizeList" v-if="active1 == 1">
+			<view class="prizeRow" v-for="(item, index) in prizeList">
+				<image class="bk" :src="$fileUrl() + '/drawCard_infinite/bk.png'" mode="scaleToFill"></image>
+				<view class="prizeRowContent">
+					<view class="prizesTitle">
+						<span>
+							<span style="font-size: 18px; margin-right: 5px; font-weight: 600">
+								{{ $selectDictLabel(rewardType, item.type) }}
+							</span>
+							<span style="font-weight: 600">概率 {{item.probability}}%</span>
+						</span>
+						<span class="sp">各类别赏中赏概率不代表具体产品中赏概率</span>
+					</view>
+					<view class="prizesItems">
+						<view class="prize" v-for="(item2, index2) in item.prizeList">
+							<view class="kaImg">
+								<image class="kabk" :src="$fileUrl() + '/drawCard_infinite/kaBk.png'" mode="widthFix">
+								</image>
+								<image class="img" :src="item2.icon" mode="aspectFit"></image>
+							</view>
+							<view class="kaName">
+								{{ item2.name }}
+							</view>
+							<view class="price">
+								<span class="priceText">¥{{ detail.price }}</span>
+								参考价
+							</view>
+						</view>
+					</view>
+				</view>
+			</view>
+		</view>
+
+		<view class="winningRecord" v-if="active1 == 2">
+			<view class="card" v-for="(item, index) in winningRecordList" :key="index">
+				<view class="row">
+					<view class="left">
+						<image class="photo" :src="item.userAvtar" mode="aspectFill"></image>
+						<span class="name">{{ item.userName }}</span>
+					</view>
+					<view class="right text1">
+						<span style="margin-right: 5px">{{ item.creatTime }}</span>
+						<span>No.{{ item.id }}</span>
+					</view>
+				</view>
+				<view class="row" style="margin-top: 10px">
+					<view class="left">
+						<image class="img" :src="item.prizeIcon" mode="aspectFill"></image>
+						<span class="name">{{ item.prizeName }}</span>
+					</view>
+					<view class="right" style="font-size: 14px">{{ $selectDictLabel(rewardType, item.prizeType) }} × 1
+					</view>
+				</view>
+			</view>
+			<noData v-if="winningRecordList.length == 0" />
+		</view>
+		<view class="buttons2">
+			<view class="button" @click="submit(1)">
+				<p>一发</p>
+			</view>
+			<view class="button" @click="submit(3)">
+				<p>三发</p>
+			</view>
+			<view class="button" @click="submit(5)">
+				<p>五发</p>
+			</view>
+			<view class="button" @click="submit(10)">
+				<p>十发</p>
+			</view>
+		</view>
+		<paymentPopup ref="paymentPopup" @callBack="paymentSuccess" />
+		<view style="width: 100%; height: 100px;"></view>
+	</view>
 </template>
 
 <script>
-import { rewardType } from '@/utils/commonConfig.js'
-import { raffleDetailApi, prizeListApi, prizeUserListApi } from '@/api/drawCard.js'
-
-import { cardType, formatSeconds } from '@/utils/utils.js'
-
-import paymentPopup from '@/component/paymentPopup.vue'
-
-export default {
-  components: {
-    paymentPopup,
-  },
-  onLoad(query) {
-    console.log(query, 'query')
-    if (query.id) {
-      this.raffleId = query.id
-      this.init()
-    }
-    this.paymentSuccess()
-  },
-  data() {
-    return {
-      rewardType: rewardType,
-      active1: 1,
-      detail: {},
-      raffleId: null,
-      prizeList: [],
-      userIds: [],
-      prizeUserList: [],
-    }
-  },
-  methods: {
-    init() {
-      // 获取卡包详情
-      this.getDetail()
-      this.tabClick(1)
-    },
-    clickDrawCard() {
-      this.$refs.paymentPopup.show(this.params.raffleId, this.selectIndex, this.detail)
-    },
-    tabClick(index) {
-      this.active1 = index
-      if (index == 1) {
-        //获取奖池
-        this.getPrizeList()
-      } else if (index == 2) {
-        // 获取中奖记录
-        // this.getPrizeUserList()
-      }
-    },
-    getDetail() {
-      let params = {
-        raffleId: this.raffleId,
-      }
-      raffleDetailApi(params).then(res => {
-        console.log(res, '详情')
-        this.detail = res.data
-      })
-    },
-    getPrizeList() {
-      let params = {
-        raffleId: this.raffleId,
-      }
-      prizeListApi(params).then(res => {
-        console.log(res, '奖池预览')
-        let newArray = res.data
-        for (var i = 0; i < res.data.length; i++) {
-          if (res.data[i].type == 21) {
-            newArray = []
-            newArray.push(res.data[i])
-            res.data.splice(i, 1)
-            newArray.push(...res.data)
-            break
-          }
-        }
-        this.prizeList = newArray
-      })
-    },
-    getPrizeUserList() {
-      let params = {
-        limit: 999,
-        page: 1,
-        raffleId: this.raffleId,
-      }
-      prizeUserListApi(params).then(res => {
-        console.log(res, '中奖记录')
-        let userIds = []
-        let list = []
-        for (var i = 0; i < res.data.length; i++) {
-          let item = res.data[i]
-          if (userIds.indexOf(item.userId) == -1) {
-            userIds.push(item.userId)
-            console.log(userIds.indexOf(item.userId))
-            let index = userIds.indexOf(item.userId)
-            list[index] = {
-              userId: item.userId,
-              userAvtar: item.userAvtar,
-              userName: item.userName,
-              prizes: [],
-            }
-            list[index].prizes.push(item)
-          } else {
-            let index = userIds.indexOf(item.userId)
-            list[index].prizes.push(item)
-          }
-        }
-        this.userIds = userIds
-        this.prizeUserList = list
-      })
-    },
-  },
-}
+	import noData from '@/component/noData.vue'
+	import {
+		rewardType
+	} from '@/utils/commonConfig.js'
+	import {
+		raffleDetailApi,
+		prizeListApi,
+		prizeUserListApi,
+		combosApi
+	} from '@/api/drawCard.js'
+
+	import {
+		cardType,
+		formatSeconds
+	} from '@/utils/utils.js'
+
+	import paymentPopup from '@/component/paymentPopup.vue'
+
+	export default {
+		components: {
+			paymentPopup,
+			noData
+		},
+		onLoad(query) {
+			console.log(query, 'query')
+			if (query.id) {
+				this.raffleId = query.id
+				this.init()
+			}
+			this.paymentSuccess()
+		},
+		data() {
+			return {
+				rewardType: rewardType,
+				active1: 1,
+				detail: {},
+				raffleId: null,
+				prizeList: [],
+				userIds: [],
+				prizeUserList: [],
+				winningRecordList: [],
+				combos: 0
+			}
+		},
+		methods: {
+			init() {
+				// 获取卡包详情
+				this.getDetail()
+				this.tabClick(1)
+				this.getCombos()
+			},
+			// 支付成功后回调
+			paymentSuccess() {
+				let _this = this
+				this.getCombos()
+			},
+			clickDrawCard() {
+				this.$refs.paymentPopup.show(this.raffleId, this.selectIndex, this.detail)
+			},
+			tabClick(index) {
+				this.active1 = index
+				if (index == 1) {
+					//获取奖池
+					this.getPrizeList()
+				} else if (index == 2) {
+					// 获取中奖记录
+					this.getPrizeUserList()
+				}
+			},
+			getDetail() {
+				let params = {
+					raffleId: this.raffleId,
+				}
+				raffleDetailApi(params).then(res => {
+					console.log(res, '详情')
+					this.detail = res.data
+				})
+			},
+			getPrizeList() {
+				let params = {
+					raffleId: this.raffleId,
+				}
+				prizeListApi(params).then(res => {
+					console.log(res, '奖池预览')
+					let newArray = res.data
+					for (var i = 0; i < res.data.length; i++) {
+						if (res.data[i].type == 21) {
+							newArray = []
+							newArray.push(res.data[i])
+							res.data.splice(i, 1)
+							newArray.push(...res.data)
+							break
+						}
+					}
+					this.prizeList = newArray
+				})
+			},
+			getPrizeUserList() {
+				let params = {
+					limit: 999,
+					page: 1,
+					raffleId: this.raffleId,
+				}
+				prizeUserListApi(params).then(res => {
+					this.winningRecordList = res.data
+				})
+			},
+			getCombos() {
+				let params = {
+					raffleId: this.raffleId,
+				}
+				combosApi(params).then(res => {
+					console.log(res, '连击数')
+					this.combos = res.data.combos
+				})
+			},
+			submit(number) {
+				this.$refs.paymentPopup.show(this.raffleId, number, this.detail)
+			},
+		},
+	}
 </script>
 
 <style scoped lang="scss">
-.container {
-  background: #9ec8f9;
-  padding-top: 15px;
-  overflow: auto;
-
-  .head {
-    background: #fff;
-    border: 10px;
-    padding: 15px;
-    border-radius: 10px 10px 0 0;
-    display: flex;
-    justify-content: space-between;
-    margin-bottom: 20px;
-
-    .img {
-      width: 106px;
-      height: 106px;
-      border-radius: 5px;
-      overflow: hidden;
-      margin-right: 10px;
-    }
-
-    .info {
-      display: flex;
-      flex-direction: column;
-      justify-content: start;
-      flex: 1;
-
-      .row {
-        margin: 5px 0;
-        display: flex;
-        justify-content: space-between;
-        color: #999999;
-
-        .button {
-          width: 67px;
-        }
-
-        .hot {
-          display: flex;
-          font-size: 12px;
-          color: #999999;
-
-          image {
-            width: 16px;
-          }
-        }
-
-        .users {
-          position: relative;
-
-          .photo {
-            position: absolute;
-            width: 20px;
-            height: 20px;
-            border-radius: 50%;
-          }
-        }
-      }
-
-      .title {
-        font-weight: 600;
-        color: #000;
-      }
-
-      .price {
-        font-size: 16px;
-        font-weight: 600;
-        color: #ff2c43;
-
-        .text {
-          font-size: 14px;
-          color: #999999;
-          font-weight: 500;
-        }
-      }
-    }
-  }
-
-  .box {
-    margin: 0 10px 10px 10px;
-    padding: 2px;
-    background: linear-gradient(90deg, rgba(211, 252, 111, 1), rgba(61, 248, 255, 1));
-    box-shadow: 0px 2px 6px 0px rgba(176, 123, 255, 0.3);
-    border-radius: 24px;
-    .boxContent {
-      background: linear-gradient(90deg, #a4fcff 0%, #d3fc6e 100%);
-      border-radius: 24px;
-      opacity: 1;
-      display: flex;
-      padding: 8px 15px;
-      .boxLeft {
-        position: relative;
-        flex: 1;
-        .row1 {
-          display: flex;
-          justify-content: space-between;
-          font-size: 18px;
-          margin-bottom: 4px;
-
-          .text {
-            color: #000000;
-            font-weight: 600;
-            text-shadow: -2px -1px 0px rgba(255, 255, 255, 1);
-            font-family: auto;
-          }
-          .text1 {
-            text-shadow: none;
-            font-weight: 500;
-          }
-        }
-
-        .row2 {
-          position: relative;
-          top: 3px;
-          height: 12vw;
-          border-radius: 6vw;
-          background: linear-gradient(90deg, #65c3e5 0%, #b1ff29 100%);
-
-          .row2content {
-            position: relative;
-            top: -3px;
-            background: #0d2a2c;
-            height: 12vw;
-            border-radius: 6vw;
-            font-size: 10px;
-            color: rgba(255, 255, 255, 0.9);
-            display: flex;
-            flex-direction: column;
-            justify-content: center;
-            align-items: flex-start;
-            padding: 0 13px;
-          }
-        }
-      }
-      .boxRiaht {
-        padding-left: 30px;
-        padding-right: 15px;
-        display: flex;
-        align-items: center;
-
-        .icon {
-          width: 12vw;
-          height: 12vw;
-        }
-      }
-    }
-  }
-  .buttons1 {
-    display: flex;
-    justify-content: center;
-
-    .button {
-      width: 38vw;
-      height: 10vw;
-    }
-  }
-
-  .prizeList {
-    .prizeRow {
-      position: relative;
-      margin: 0 10px 10px 10px;
-      padding-bottom: 10px;
-
-      .bk {
-        position: relative;
-        width: 100%;
-        height: 100%;
-        position: absolute;
-        top: 0;
-        z-index: 1;
-      }
-      .prizeRowContent {
-        position: relative;
-        width: calc(100% - 30px);
-        padding: 10px 15px;
-        z-index: 2;
-
-        .prizesTitle {
-          font-size: 12px;
-          padding-bottom: 5px;
-          width: 100%;
-          color: #fff;
-          display: flex;
-          justify-content: space-between;
-
-          .sp {
-            color: rgba(255, 255, 255, 0.7);
-            padding-top: 8px;
-            font-size: 10px;
-          }
-        }
-
-        .prizesItems {
-          background: #fffbe8;
-          display: flex;
-          width: calc(100% - 16px);
-          padding: 8px;
-          border-radius: 8px;
-
-          .prize {
-            width: 22vw;
-
-            .kaImg {
-              position: relative;
-              .kabk {
-                width: 100%;
-                height: 100%;
-              }
-              .img {
-                position: absolute;
-                top: 0;
-                width: 70%;
-                height: 80%;
-                left: 50%;
-                top: 50%;
-                transform: translateX(-46%) translateY(-50%);
-              }
-            }
-            .kaName {
-              width: 100%;
-              overflow: hidden;
-              white-space: nowrap;
-              text-overflow: ellipsis;
-              font-size: 12px;
-              font-weight: 600;
-              text-align: center;
-            }
-            .price {
-              text-align: center;
-              font-size: 10px;
-              color: #999999;
-              .priceText {
-                color: #ff2c43;
-                font-weight: 600;
-                font-size: 12px;
-              }
-            }
-          }
-        }
-      }
-    }
-  }
-}
-</style>
+	.container {
+		background: #9ec8f9;
+		padding-top: 15px;
+		overflow: auto;
+
+		.head {
+			background: #fff;
+			border: 10px;
+			padding: 15px;
+			border-radius: 10px 10px 0 0;
+			display: flex;
+			justify-content: space-between;
+			margin-bottom: 20px;
+
+			.img {
+				width: 106px;
+				height: 106px;
+				border-radius: 5px;
+				overflow: hidden;
+				margin-right: 10px;
+			}
+
+			.info {
+				display: flex;
+				flex-direction: column;
+				justify-content: start;
+				flex: 1;
+
+				.row {
+					margin: 5px 0;
+					display: flex;
+					justify-content: space-between;
+					color: #999999;
+
+					.button {
+						width: 67px;
+					}
+
+					.hot {
+						display: flex;
+						font-size: 12px;
+						color: #999999;
+
+						image {
+							width: 16px;
+						}
+					}
+
+					.users {
+						position: relative;
+
+						.photo {
+							position: absolute;
+							width: 20px;
+							height: 20px;
+							border-radius: 50%;
+						}
+					}
+				}
+
+				.title {
+					font-weight: 600;
+					color: #000;
+				}
+
+				.price {
+					font-size: 16px;
+					font-weight: 600;
+					color: #ff2c43;
+
+					.text {
+						font-size: 14px;
+						color: #999999;
+						font-weight: 500;
+					}
+				}
+			}
+		}
+
+		.box {
+			margin: 0 10px 10px 10px;
+			padding: 2px;
+			background: linear-gradient(90deg, rgba(211, 252, 111, 1), rgba(61, 248, 255, 1));
+			box-shadow: 0px 2px 6px 0px rgba(176, 123, 255, 0.3);
+			border-radius: 24px;
+
+			.boxContent {
+				background: linear-gradient(90deg, #a4fcff 0%, #d3fc6e 100%);
+				border-radius: 24px;
+				opacity: 1;
+				display: flex;
+				padding: 8px 15px;
+
+				.boxLeft {
+					position: relative;
+					flex: 1;
+
+					.row1 {
+						display: flex;
+						justify-content: space-between;
+						font-size: 18px;
+						margin-bottom: 4px;
+
+						.text {
+							color: #000000;
+							font-weight: 600;
+							text-shadow: -2px -1px 0px rgba(255, 255, 255, 1);
+							font-family: auto;
+						}
+
+						.text1 {
+							text-shadow: none;
+							font-weight: 500;
+						}
+					}
+
+					.row2 {
+						position: relative;
+						top: 3px;
+						height: 12vw;
+						border-radius: 6vw;
+						background: linear-gradient(90deg, #65c3e5 0%, #b1ff29 100%);
+
+						.row2content {
+							position: relative;
+							top: -3px;
+							background: #0d2a2c;
+							height: 12vw;
+							border-radius: 6vw;
+							font-size: 10px;
+							color: rgba(255, 255, 255, 0.9);
+							display: flex;
+							flex-direction: column;
+							justify-content: center;
+							align-items: flex-start;
+							padding: 0 13px;
+						}
+					}
+				}
+
+				.boxRiaht {
+					padding-left: 8vw;
+					padding-right: 15px;
+					display: flex;
+					align-items: center;
+
+					.icon {
+						width: 12vw;
+						height: 12vw;
+					}
+				}
+			}
+		}
+
+		.buttons1 {
+			display: flex;
+			justify-content: center;
+
+			.button {
+				width: 38vw;
+				height: 10vw;
+			}
+		}
+
+		.prizeList {
+			.prizeRow {
+				position: relative;
+				margin: 0 10px 10px 10px;
+				padding-bottom: 10px;
+
+				.bk {
+					position: relative;
+					width: 100%;
+					height: 100%;
+					position: absolute;
+					top: 0;
+					z-index: 1;
+				}
+
+				.prizeRowContent {
+					position: relative;
+					width: calc(100% - 30px);
+					padding: 10px 15px;
+					z-index: 2;
+
+					.prizesTitle {
+						font-size: 12px;
+						padding-bottom: 5px;
+						width: 100%;
+						color: #fff;
+						display: flex;
+						justify-content: space-between;
+
+						.sp {
+							color: rgba(255, 255, 255, 0.7);
+							padding-top: 8px;
+							font-size: 10px;
+						}
+					}
+
+					.prizesItems {
+						background: #fffbe8;
+						display: flex;
+						width: calc(100% - 16px);
+						padding: 8px;
+						border-radius: 8px;
+
+						.prize {
+							width: 22vw;
+
+							.kaImg {
+								position: relative;
+
+								.kabk {
+									width: 100%;
+									height: 100%;
+								}
+
+								.img {
+									position: absolute;
+									top: 0;
+									width: 70%;
+									height: 80%;
+									left: 52%;
+									top: 50%;
+									transform: translateX(-50%) translateY(-50%);
+								}
+							}
+
+							.kaName {
+								width: 100%;
+								overflow: hidden;
+								white-space: nowrap;
+								text-overflow: ellipsis;
+								font-size: 12px;
+								font-weight: 600;
+								text-align: center;
+							}
+
+							.price {
+								text-align: center;
+								font-size: 10px;
+								color: #999999;
+
+								.priceText {
+									color: #ff2c43;
+									font-weight: 600;
+									font-size: 12px;
+								}
+							}
+						}
+					}
+				}
+			}
+		}
+
+		.buttons2 {
+			position: fixed;
+			bottom: 10vw;
+			display: flex;
+			z-index: 4;
+			justify-content: space-around;
+			width: 100%;
+
+			.button {
+				width: 13vw;
+				height: 13vw;
+				font-size: 16px;
+				color: #fff;
+				background: linear-gradient(270deg, #531DBB 0%, #6E2FE5 100%);
+				text-align: center;
+				line-height: 13vw;
+				border-radius: 4px;
+				box-shadow: inset 0px 2px 3px 0px rgba(255, 255, 255, 0.25);
+				position: relative;
+				transform: rotate(45deg);
+				font-weight: 600;
+
+				p {
+					transform: rotate(-45deg);
+				}
+			}
+		}
+
+		.winningRecord {
+			.card {
+				margin: 10px 10px 0 10px;
+				border-radius: 8px;
+				background: #fff;
+				padding: 10px;
+
+				.row {
+					display: flex;
+					justify-content: space-between;
+					align-items: center;
+
+					.left {
+						display: flex;
+						align-items: center;
+
+						.photo {
+							margin-right: 5px;
+							width: 30px;
+							height: 30px;
+							border-radius: 50%;
+						}
+
+						.name {
+							font-size: 14px;
+							font-weight: 600;
+						}
+
+						.img {
+							width: 40px;
+							height: 40px;
+							border-radius: 2px;
+							margin-right: 5px;
+						}
+					}
+
+					.text1 {
+						color: #666666;
+						font-size: 12px;
+					}
+				}
+			}
+		}
+	}
+</style>