chenrong 1 рік тому
батько
коміт
83d28298de

+ 2 - 0
App.vue

@@ -6,12 +6,14 @@
 		},
 		onShow: function() {
 			console.log('App Show')
+			console.log(this.$fileBasUrl, 'appppp$fileBasUrl')
 			// uni.hideTabBar()
 		},
 		onHide: function() {
 			console.log('App Hide')
 		},
 		globalData: {
+			fileBasUrl: 'https://mall.rongtongh.cn/storage/img',
 			hasLogin: false,
 			inviteId: null,
 			orderConfirmIds: [],

+ 11 - 0
api/consumptionRecords.js

@@ -0,0 +1,11 @@
+import { request } from "@/api/config.js"
+
+
+// 消费记录
+export function orderListApi(data) {
+  return request({
+    url: '/wx/bkm/order/orderList',
+    method: 'get',
+    data: data
+  })
+}

+ 1 - 1
api/drawCard.js

@@ -36,7 +36,7 @@ export function prizeListApi(data) {
 }
 // 中奖记录
 // ​/wx/raffle/prize/user/list
-export function userPrizeListApi(data) {
+export function prizeUserListApi(data) {
   return request({
     url: '/wx/raffle/prize/user/list',
     method: 'get',

+ 1 - 1
component/noData.vue

@@ -1,6 +1,6 @@
 <template>
 	<view class="nodata">
-		<image class="img" src="https://mall.rongtongh.cn/storage/img/noData.png" mode="widthFix"></image>
+		<image class="img" :src="$fileUrl() + '/noData.png'" mode="widthFix"></image>
 		<view class="text">
 			啊哦,没有任何内容
 		</view>

+ 3 - 3
component/numImg.vue

@@ -1,8 +1,8 @@
 <template>
 	<view class="number">
-		<image class="numImg" :src="'https://mall.rongtongh.cn/storage/img/ka/num' + cardType(type, value) + '/' + num1() + '.png'" mode="heightFix"></image>
-		<image class="numImg" :src="'https://mall.rongtongh.cn/storage/img/ka/num' + cardType(type, value) + '/' + num2() + '.png'" mode="heightFix"></image>
-		<image class="numImg" :src="'https://mall.rongtongh.cn/storage/img/ka/num' + cardType(type, value) + '/' + num3() + '.png'" mode="heightFix"></image>
+		<image class="numImg" :src="$fileUrl() + '/ka/num' + cardType(type, value) + '/' + num1() + '.png'" mode="heightFix"></image>
+		<image class="numImg" :src="$fileUrl() + '/ka/num' + cardType(type, value) + '/' + num2() + '.png'" mode="heightFix"></image>
+		<image class="numImg" :src="$fileUrl() + '/ka/num' + cardType(type, value) + '/' + num3() + '.png'" mode="heightFix"></image>
 	</view>
 </template>
 

+ 25 - 6
component/paymentPopup.vue

@@ -62,14 +62,15 @@
 					<span>本人已满18岁且具备完全行为能力</span>
 				</view>
 
-				<image @click="submit" class="button" src="https://mall.rongtongh.cn/storage/img/first/button5.png" mode="widthFix"></image>
+				<image @click="submit" class="button" :src="$fileUrl() + '/first/button5.png'" mode="widthFix"></image>
 			</view>
 		</uni-popup>
 		<!-- 抽赏结果 -->
 		<uni-popup class="popup" 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" v-if="prizes.length > 0">
@@ -278,8 +279,15 @@
 					'success': function(res) {
 						console.log(res, "支付过程成功");
 						_this.close()
-						_this.$refs.popup2.open('center')
-						_this.getLotteryResults(res)
+						if (_this.info.type == 3) {
+							wx.showModal({
+								title: '抽奖成功',
+								content: '请耐心等待开奖结果。'
+							})
+						} else {
+							_this.$refs.popup2.open('center')
+							_this.getLotteryResults(res)
+						}
 						_this.$emit('callBack')
 					},
 					'fail': function(res) {
@@ -389,16 +397,27 @@
 		margin: 10px auto;
 		width: 210px;
 	}
-
+	.popup {
+		.bk {
+			width: 100vw;
+		}
+	}
 	.lotteryResults {
 		width: 90vw;
+		// padding-top: 65px;
 		background: #fff;
 		border-radius: 10px;
+		// position: absolute;
+		// top: 0;
+		// left: 50%;
+		// transform: translateX(-50%);
+		
 		> .title {
 			text-align: center;
 			padding: 15px;
 			font-weight: 600;
-		
+			// color: #fff;
+			
 			.close {
 				position: absolute;
 				right: 15px;

+ 22 - 3
main.js

@@ -13,12 +13,14 @@ import {
 import {
 	fileBasUrl
 } from '@/api/config.js'
-console.log(fileBasUrl, 'fileBasUrl')
+
+import {
+	fileUrl
+} from "@/utils/commonConfig.js"
 Vue.prototype.$navigateTo = navigateTo;
 Vue.prototype.$redirectTo = redirectTo;
 // 媒体文件地址
-Vue.prototype.$fileBasUrl = fileBasUrl;
-
+Vue.prototype.$fileUrl = fileUrl;
 Vue.prototype.$selectDictLabel = selectDictLabel;
 Vue.config.productionTip = false
 
@@ -30,6 +32,23 @@ const app = new Vue({
 app.$mount()
 // #endif
 
+// 时间过滤
+Date.prototype.Format = function (fmt) { //author: meizz
+    var o = {
+        "M+": this.getMonth() + 1, //月份
+        "d+": this.getDate(), //日
+        "h+": this.getHours(), //小时
+        "m+": this.getMinutes(), //分
+        "s+": this.getSeconds(), //秒
+        "q+": Math.floor((this.getMonth() + 3) / 3), //季度
+        "S": this.getMilliseconds() //毫秒
+    };
+    if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (this.getFullYear() + "").substr(4 - RegExp.$1.length));
+    for (var k in o)
+        if (new RegExp("(" + k + ")").test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length)));
+    return fmt;
+}
+
 // #ifdef VUE3
 import { createSSRApp } from 'vue'
 import App from './App.vue'

+ 1 - 1
manifest.json

@@ -54,7 +54,7 @@
             "urlCheck" : false
         },
         "usingComponents" : true,
-		"slotMultipleInstance" : true
+        "slotMultipleInstance" : true
     },
     "vueVersion" : "2"
 }

+ 24 - 3
pages.json

@@ -1,4 +1,7 @@
 {
+	"window": {
+	    "initialRenderingCache": "dynamic"
+	},
 	"pages": [{
 		"path": "pages/index/index",
 		"style": {
@@ -90,7 +93,7 @@
             "path" : "pages/drawCard_first/drawCard_first",
             "style" :                                                                                    
             {
-                "navigationBarTitleText": "first赏",
+                "navigationBarTitleText": "FIRST赏",
                 "enablePullDownRefresh": false
             }
             
@@ -153,7 +156,7 @@
             "path" : "pages/drawCard_last/drawCard_last",
             "style" :                                                                                    
             {
-                "navigationBarTitleText": "",
+                "navigationBarTitleText": "LAST赏",
                 "enablePullDownRefresh": false
             }
             
@@ -162,7 +165,7 @@
             "path" : "pages/message/message",
             "style" :                                                                                    
             {
-                "navigationBarTitleText": "",
+                "navigationBarTitleText": "消息",
                 "enablePullDownRefresh": false
             }
             
@@ -175,6 +178,24 @@
             }
             
         }
+        ,{
+            "path" : "pages/consumptionRecords/consumptionRecords",
+            "style" :                                                                                    
+            {
+                "navigationBarTitleText": "消费记录",
+                "enablePullDownRefresh": false
+            }
+            
+        }
+        ,{
+            "path" : "pages/drawCard_fullSet/drawCard_fullSet",
+            "style" :                                                                                    
+            {
+                "navigationBarTitleText": "全套赏",
+                "enablePullDownRefresh": false
+            }
+            
+        }
     ],
 	"globalStyle": {
 		"navigationBarTextStyle": "black",

+ 170 - 0
pages/consumptionRecords/consumptionRecords.vue

@@ -0,0 +1,170 @@
+<template>
+	<view class="container">
+		<view class="tabs">
+			<view :class="['tab', tabActive == 1?'active':'']" @click="tabClick(1)">
+				一番赏
+			</view>
+			<view :class="['tab', tabActive == 2?'active':'']" style="margin-left: 10px;" @click="tabClick(2)">
+				快递
+			</view>
+		</view>
+		<view class="list">
+			<view class="item" v-for="(item, index) in list">
+				<view class="tag">
+					已付款
+				</view>
+				<image v-if="item.order.orderType == 1" class="icon" :src="item.icon" mode="aspectFill"></image>
+				<image v-else class="icon" :src="$fileUrl() + '/consumptionRecords/expressDelivery.png'" mode="aspectFill"></image>
+				<view class="info">
+					<view class="row title">
+						<span v-if="item.order.orderType == 1">{{ item.name }}</span>
+						<span v-else>下单发货</span>
+					</view>
+					<view class="row" style="justify-content: space-between; font-size: 12px;">
+						<span class="textColor5">
+							¥{{item.order.goodsPrice}}
+						</span>
+						<span class="textColor3">
+							共 <span class="textColor5">{{item.num}}</span>件商品
+						</span>
+					</view>
+					<view class="row" style="justify-content: flex-end;">
+						<span>
+							实付金额: <span class="textColor5">{{item.order.actualPrice}}</span>
+						</span>
+					</view>
+				</view>
+			</view>
+		</view>
+		
+		<uni-load-more v-if="list.length > 0" :status="loadMore" @clickLoadMore="load" :contentText="contentText"></uni-load-more>
+		<noData v-else />
+	</view>
+</template>
+
+<script>
+	import noData from "@/component/noData.vue"
+	import {
+		orderListApi
+	} from "@/api/consumptionRecords.js"
+	export default {
+		components: {
+			noData
+		},
+		data() {
+			return {
+				tabActive: 1,
+				list: [],
+				loadMore: 'more',
+				contentText: {
+					contentdown: '点击加载更多',
+				},
+				params: {
+					limit: 10,
+					page: 1,
+					orderType: 1,
+				}
+			}
+		},
+		onShow() {
+			this.getList()
+		},
+		methods: {
+			tabClick(index) {
+				this.tabActive = index
+				this.params.orderType = index
+				this.list = []
+				this.getList()
+			},
+			load() {
+				if (this.loadMore == "more") {
+					this.params.page += 1
+					this.getList()
+				}
+			},
+			getList() {
+				orderListApi(this.params).then(res => {
+					console.log(res, '消费记录')
+					this.list.push(...res.data.list)
+					// 判断是否还有更多数据
+					let listNum = this.params.limit * this.params.page
+					let total = res.data.total
+					if (total > listNum) {
+						this.loadMore = "more"
+					} else {
+						this.loadMore = "noMore"
+					}
+				})
+			}
+		}
+	}
+</script>
+
+<style scoped lang="scss">
+	.container {
+		padding: 10px;
+	}
+	.tabs {
+		display: flex;
+		
+		.tab {
+			width: 68px;
+			height: 24px;
+			font-size: 14px;
+			background: #fff;
+			border-radius: 4px;
+			line-height: 24px;
+			text-align: center;
+		}
+		.active {
+			background: #FEA200;
+			color: #fff;
+		}
+	}
+	
+	.list {
+		padding: 10px 0;
+		
+		.item {
+			background: #fff;
+			border-radius: 4px;
+			display: flex;
+			padding: 10px;
+			margin-bottom: 10px;
+			font-size: 14px;
+			align-items: center;
+			position: relative;
+			
+			.tag {
+				background: #DEF2E4;
+				color: #00C537;
+				font-size: 16px;
+				padding: 2px 5px;
+				border-radius: 0 0 0 10px;
+				position: absolute;
+				right: 0;
+				top: 0;
+			}
+			.icon {
+				width: 75px;
+				height: 75px;
+				border-radius: 4px;
+			}
+			
+			.info {
+				display: flex;
+				flex-direction: column;
+				justify-content: flex-end;
+				align-items: center;
+				padding-left: 10px;
+				flex: 1;
+				
+				.row {
+					width: 100%;
+					margin-top: 10px;
+					display: flex;
+				}
+			}
+		}
+	}
+</style>

+ 23 - 21
pages/drawCard_first/drawCard_first.vue

@@ -1,7 +1,7 @@
 <template>
 	<view class="container">
 		<view class="head">
-			<image class="img" src="https://mall.rongtongh.cn/storage/img/ka.jpeg" mode="aspectFill"></image>
+			<image class="img" :src="$fileUrl() + '/ka.jpeg'" mode="aspectFill"></image>
 			<view class="info">
 				<view class="title row">
 					{{ detail.name }}
@@ -11,15 +11,15 @@
 						¥{{ detail.price }}
 						<span class="text fontPFR">/张明信片</span>
 					</view>
-					<image @click="$navigateTo('/pages/rule/rule', {type: 5})" class="button" src="https://mall.rongtongh.cn/storage/img/invite/button1.png" mode="widthFix"></image>
+					<image @click="$navigateTo('/pages/rule/rule', {type: 5})" 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="https://mall.rongtongh.cn/storage/img/Frame1.png"
+						<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">
-						<image src="https://mall.rongtongh.cn/storage/img/first/hot.png" mode="widthFix"></image>
+						<image :src="$fileUrl() + /first/hot.png" mode="widthFix"></image>
 						{{ detail.hotNum }}
 					</view> -->
 				</view>
@@ -27,31 +27,32 @@
 		</view>
 
 		<view class="cardList">
-			<image class="bk" src="https://mall.rongtongh.cn/storage/img/first/bk1.png" mode="widthFix"></image>
+			<image class="bk" :src="$fileUrl() + '/first/bk1.png'" mode="widthFix"></image>
 			<view class="leftButton" @click="left"></view>
 			<view class="rightButton" @click="right"></view>
 			<view class="list">
 				<view :class="['item', item.check ? 'active' : '']" v-for="(item,index) in cardList"
 					@click="clickCard(item)">
-					<image class="kaBk" :src="'https://mall.rongtongh.cn/storage/img/ka/kabk' + cardType(1, item) + '.png'" mode="widthFix">
+					<image v-if="item.check" class="kaBkActive" :src="$fileUrl() + '/ka/kabk' + cardType(1, item) + 'Active.png'" mode="heightFix"></image>
+					<image class="kaBk" :src="$fileUrl() + '/ka/kabk' + cardType(1, item) + '.png'" mode="widthFix">
 					</image>
 					<numImg class="num" :value="item" :type="1" />
 				</view>
 			</view>
 		</view>
 		<view class="buttons">
-			<image class="button1" @click="toKnapsack" src="https://mall.rongtongh.cn/storage/img/first/button6.png" mode="widthFix"></image>
+			<image class="button1" @click="toKnapsack" :src="$fileUrl() + '/first/button6.png'" mode="widthFix"></image>
 			<view class="">
-				<image class="button2" @click="submit" src="https://mall.rongtongh.cn/storage/img/first/button4.png" mode="widthFix"></image>
-				<!-- <image class="button2" src="https://mall.rongtongh.cn/storage/img/first/button1.png" mode="widthFix"></image> -->
+				<image class="button2" @click="submit" :src="$fileUrl() + '/first/button4.png'" mode="widthFix"></image>
+				<!-- <image class="button2" :src="$fileUrl() + /first/button1.png" mode="widthFix"></image> -->
 			</view>
-			<image @click="toWinningRecord" class="button1" src="https://mall.rongtongh.cn/storage/img/first/button3.png" mode="widthFix"></image>
+			<image @click="toWinningRecord" class="button1" :src="$fileUrl() + '/first/button3.png'" mode="widthFix"></image>
 		</view>
 
 		<view class="prizes" >
-			<image class="title" src="https://mall.rongtongh.cn/storage/img/first/title.png" mode="widthFix"></image>
+			<image class="title" :src="$fileUrl() + '/first/title.png'" mode="widthFix"></image>
 			<view class="prizesList" v-for="(item, index) in prizeList">
-				<image class="bk" src="https://mall.rongtongh.cn/storage/img/first/bk2.png" mode="scaleToFill"></image>
+				<image class="bk" :src="$fileUrl() + '/first/bk2.png'" mode="scaleToFill"></image>
 				<view class="prizesTitle">
 					{{ $selectDictLabel(rewardType, item.type) }}
 				</view>
@@ -67,7 +68,7 @@
 				</view>
 			</view>
 		</view>
-		<image class="refresh" @click="refresh" src="https://mall.rongtongh.cn/storage/img/first/refresh.png" mode="widthFix"></image>
+		<image class="refresh" @click="refresh" :src="$fileUrl() + '/first/refresh.png'" mode="widthFix"></image>
 		<paymentPopup ref="paymentPopup" @callBack="paymentSuccess" />
 	</view>
 </template>
@@ -379,25 +380,26 @@
 					align-items: center;
 					position: relative;
 					
+					.kaBkActive {
+						height: 132%;
+						width: 100%;
+						position: absolute;
+						z-index: 1;
+					}
 					.kaBk {
 						width: 70%;
 						border-radius: 4px;
+						z-index: 2;
 					}
-
+					
 					.num {
 						position: absolute;
 						width: 100%;
 						height: 100%;
 						top: 0;
+						z-index: 2;
 					}
 				}
-
-				.active {
-					.kaBk {
-						box-shadow: 0px 1px 6px 2px #0038FF;
-					}
-
-				}
 			}
 		}
 

+ 654 - 0
pages/drawCard_fullSet/drawCard_fullSet.vue

@@ -0,0 +1,654 @@
+<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">
+						<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">
+						<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;">
+						已选择 {{0}} 个
+					</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>
+				</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" :src="$fileUrl() + '/drawCard_fullSet/button5.png'" mode="heightFix"></image>
+		</view>
+		<view class="winningList" v-if="prizeUserList.length > 0">
+			<image class="winningListTitle" :src="$fileUrl() + '/drawCard_fullSet/icon2.png'" mode="widthFix"></image>
+			<view class="list">
+				<view class="item" v-for="(item, index) in prizeUserList">
+					<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,
+		drawCardSubmitApi,
+		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: 5,
+					page: 1,
+					raffleId: this.params.raffleId
+				}
+				prizeUserListApi(params).then(res => {
+					console.log(res, '中奖记录')
+					this.prizeUserList = res.data
+				})
+			},
+			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">
+	.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;
+				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;
+					
+					.photo {
+						width: 40px;
+						height: 40px;
+						border-radius: 50%;
+					}
+					
+					.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>

+ 14 - 14
pages/drawCard_last/drawCard_last.vue

@@ -1,7 +1,7 @@
 <template>
 	<view class="container">
 		<view class="head">
-			<image class="img" src="https://mall.rongtongh.cn/storage/img/ka.jpeg" mode="aspectFill"></image>
+			<image class="img" :src="$fileUrl() + '/ka.jpeg'" mode="aspectFill"></image>
 			<view class="info">
 				<view class="title row">
 					{{ detail.name }}
@@ -11,15 +11,15 @@
 						¥{{ detail.price }}
 						<span class="text fontPFR">/张明信片</span>
 					</view>
-					<image @click="$navigateTo('/pages/rule/rule', {type: 5})" class="button" src="https://mall.rongtongh.cn/storage/img/invite/button1.png" mode="widthFix"></image>
+					<image @click="$navigateTo('/pages/rule/rule', {type: 5})" 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="https://mall.rongtongh.cn/storage/img/Frame1.png"
+						<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">
-						<image src="https://mall.rongtongh.cn/storage/img/first/hot.png" mode="widthFix"></image>
+						<image :src="$fileUrl() + /first/hot.png" mode="widthFix"></image>
 						{{ detail.hotNum }}
 					</view> -->
 				</view>
@@ -27,32 +27,32 @@
 		</view>
 
 		<view class="cardList">
-			<image class="bk" src="https://mall.rongtongh.cn/storage/img/first/bk1.png" mode="widthFix"></image>
+			<image class="bk" :src="$fileUrl() + '/first/bk1.png'" mode="widthFix"></image>
 			<view class="leftButton" @click="left"></view>
 			<view class="rightButton" @click="right"></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="'https://mall.rongtongh.cn/storage/img/ka/kabk' + cardType(2, item) + 'Active.png'" mode="heightFix"></image>
-					<image class="kaBk" :src="'https://mall.rongtongh.cn/storage/img/ka/kabk' + cardType(2, item) + '.png'" mode="widthFix">
+					<image v-if="item.check" class="kaBkActive" :src="$fileUrl() + '/ka/kabk' + cardType(2, item) + 'Active.png'" mode="heightFix"></image>
+					<image class="kaBk" :src="$fileUrl() + '/ka/kabk' + cardType(2, item) + '.png'" mode="widthFix">
 					</image>
 					<numImg class="num" :value="item" :type="2" />
 				</view>
 			</view>
 		</view>
 		<view class="buttons">
-			<image class="button1" @click="toKnapsack" src="https://mall.rongtongh.cn/storage/img/first/button6.png" mode="widthFix"></image>
+			<image class="button1" @click="toKnapsack" :src="$fileUrl() + '/first/button6.png'" mode="widthFix"></image>
 			<view class="">
-				<image class="button2" @click="submit" src="https://mall.rongtongh.cn/storage/img/first/button4.png" mode="widthFix"></image>
-				<!-- <image class="button2" src="https://mall.rongtongh.cn/storage/img/first/button1.png" mode="widthFix"></image> -->
+				<image class="button2" @click="submit" :src="$fileUrl() + '/first/button4.png'" mode="widthFix"></image>
+				<!-- <image class="button2" :src="$fileUrl() + /first/button1.png" mode="widthFix"></image> -->
 			</view>
-			<image @click="toWinningRecord" class="button1" src="https://mall.rongtongh.cn/storage/img/first/button3.png" mode="widthFix"></image>
+			<image @click="toWinningRecord" class="button1" :src="$fileUrl() + '/first/button3.png'" mode="widthFix"></image>
 		</view>
 
 		<view class="prizes" >
-			<image class="title" src="https://mall.rongtongh.cn/storage/img/first/title.png" mode="widthFix"></image>
+			<image class="title" :src="$fileUrl() + '/first/title.png'" mode="widthFix"></image>
 			<view class="prizesList" v-for="(item, index) in prizeList">
-				<image class="bk" src="https://mall.rongtongh.cn/storage/img/first/bk2.png" mode="scaleToFill"></image>
+				<image class="bk" :src="$fileUrl() + '/first/bk2.png'" mode="scaleToFill"></image>
 				<view class="prizesTitle">
 					{{ $selectDictLabel(rewardType, item.type) }}
 				</view>
@@ -68,7 +68,7 @@
 				</view>
 			</view>
 		</view>
-		<image class="refresh" @click="refresh" src="https://mall.rongtongh.cn/storage/img/first/refresh.png" mode="widthFix"></image>
+		<image class="refresh" @click="refresh" :src="$fileUrl() + '/first/refresh.png'" mode="widthFix"></image>
 		<paymentPopup ref="paymentPopup" @callBack="paymentSuccess" />
 	</view>
 </template>

+ 9 - 9
pages/index/index --lod.vue

@@ -1,35 +1,35 @@
 <template>
 	<view class="container">
-		<image class="headImg" mode="aspectFill" src="https://mall.rongtongh.cn/storage/img/homeHead.jpeg"></image>
+		<image class="headImg" mode="aspectFill" :src="$fileUrl() + '/homeHead.jpeg'"></image>
 		<view class="headBarrage">
 
 		</view>
 
 		<view class="tabs">
 			<view class="tab">
-				<image src="https://mall.rongtongh.cn/storage/img/Frame3.png" alt="">
+				<image :src="$fileUrl() + '/Frame3.png'" alt="">
 					<span>全部</span>
 			</view>
 			<view class="tab" @click="$navigateTo('/pages/excellentValue/excellentValue')">
-				<image src="https://mall.rongtongh.cn/storage/img/Frame4.png" alt="">
+				<image :src="$fileUrl() + '/Frame4.png'" alt="">
 					<span>超值挑战</span>
 			</view>
 			<view class="tab">
-				<image src="https://mall.rongtongh.cn/storage/img/Frame2.png" alt="">
+				<image :src="$fileUrl() + '/Frame2.png'" alt="">
 					<span>拍卖专区</span>
 			</view>
 			<view class="tab">
-				<image src="https://mall.rongtongh.cn/storage/img/Frame1.png" alt="">
+				<image :src="$fileUrl() + '/Frame1.png'" alt="">
 					<span>VIP福利</span>
 			</view>
 		</view>
 		<view class="buttons">
 			<view class="left">
-				<image src="https://mall.rongtongh.cn/storage/img/button3.png" @click="toInvite"></image>
+				<image :src="$fileUrl() + '/button3.png'" @click="toInvite"></image>
 			</view>
 			<view class="right">
-				<image src="https://mall.rongtongh.cn/storage/img/button1.png"></image>
-				<image src="https://mall.rongtongh.cn/storage/img/button2.png"
+				<image :src="$fileUrl() + '/button1.png'"></image>
+				<image :src="$fileUrl() + '/button2.png'"
 					@click="$navigateTo('/pages/raffle/raffle')"></image>
 			</view>
 		</view>
@@ -39,7 +39,7 @@
 		<view class="list">
 			<view class="ka" v-for="(item, index) in kaList">
 				<view class="top">
-					<image mode="aspectFit" src="https://mall.rongtongh.cn/storage/img/ka.jpeg"></image>
+					<image mode="aspectFit" :src="$fileUrl() + '/ka.jpeg'"></image>
 				</view>
 				<view class="ka-info">
 					<view class="ka-name">

+ 9 - 9
pages/index/index.vue

@@ -1,6 +1,6 @@
 <template>
 	<view class="container">
-		<image class="headImg" mode="aspectFill" src="https://mall.rongtongh.cn/storage/img/homeHead.jpeg"></image>
+		<image class="headImg" mode="aspectFill" :src="$fileUrl() + '/homeHead.jpeg'"></image>
 		<view class="headBarrage">
 			<l-barrage :data="barrageData" :defer="1" :loopCount="6">
 				<!-- 自定义每条弹幕样式 content 为你传入的数据-->
@@ -12,29 +12,29 @@
 
 		<view class="tabs">
 			<view class="tab">
-				<image src="https://mall.rongtongh.cn/storage/img/Frame3.png" alt="">
+				<image :src="$fileUrl() + '/Frame3.png'" alt="">
 					<span>全部</span>
 			</view>
 			<view class="tab" @click="$navigateTo('/pages/excellentValue/excellentValue')">
-				<image src="https://mall.rongtongh.cn/storage/img/Frame4.png" alt="">
+				<image :src="$fileUrl() + '/Frame4.png'" alt="">
 					<span>超值挑战</span>
 			</view>
 			<view class="tab">
-				<image src="https://mall.rongtongh.cn/storage/img/Frame2.png" alt="">
+				<image :src="$fileUrl() + '/Frame2.png'" alt="">
 					<span>拍卖专区</span>
 			</view>
 			<view class="tab">
-				<image src="https://mall.rongtongh.cn/storage/img/Frame1.png" alt="">
+				<image :src="$fileUrl() + '/Frame1.png'" alt="">
 					<span>VIP福利</span>
 			</view>
 		</view>
 		<view class="buttons">
 			<view class="left">
-				<image src="https://mall.rongtongh.cn/storage/img/button3.png" @click="toInvite"></image>
+				<image :src="$fileUrl() + '/button3.png'" @click="toInvite"></image>
 			</view>
 			<view class="right">
-				<image src="https://mall.rongtongh.cn/storage/img/button1.png"></image>
-				<image src="https://mall.rongtongh.cn/storage/img/button2.png"
+				<image :src="$fileUrl() + '/button1.png'"></image>
+				<image :src="$fileUrl() + '/button2.png'"
 					@click="$navigateTo('/pages/raffle/raffle')"></image>
 			</view>
 		</view>
@@ -44,7 +44,7 @@
 		<view class="list">
 			<view class="ka" v-for="(item, index) in kaList">
 				<view class="top">
-					<image mode="aspectFit" src="https://mall.rongtongh.cn/storage/img/ka.jpeg"></image>
+					<image mode="aspectFit" :src="$fileUrl() + '/ka.jpeg'"></image>
 				</view>
 				<view class="ka-info">
 					<view class="ka-name">

+ 8 - 8
pages/invite/invite.vue

@@ -1,29 +1,29 @@
 <template>
 	<view class="container">
-		<image class="bk" src="https://mall.rongtongh.cn/storage/img/invite/bk.png" mode=""></image>
+		<image class="bk" :src="$fileUrl() + '/invite/bk.png'" mode=""></image>
 		<view class="page">
-			<image class="illustrate" @click="$navigateTo('/pages/rule/rule', {type: 6})" src="https://mall.rongtongh.cn/storage/img/invite/button1.png" mode=""></image>
+			<image class="illustrate" @click="$navigateTo('/pages/rule/rule', {type: 6})" :src="$fileUrl() + '/invite/button1.png'" mode=""></image>
 			<view class="box">
 				<view class="item">
-					<image mode="aspectFit" class="label1" src="https://mall.rongtongh.cn/storage/img/invite/text2.png"></image>
+					<image mode="aspectFit" class="label1" :src="$fileUrl() + '/invite/text2.png'"></image>
 					<view class="value">
 						{{person}}
-						<image mode="aspectFit" src="https://mall.rongtongh.cn/storage/img/invite/text3.png"></image>
+						<image mode="aspectFit" :src="$fileUrl() + '/invite/text3.png'"></image>
 					</view>
 				</view>
 				<view class="item">
-					<image mode="aspectFit" class="label2" src="https://mall.rongtongh.cn/storage/img/invite/text1.png"></image>
+					<image mode="aspectFit" class="label2" :src="$fileUrl() + '/invite/text1.png'"></image>
 					<view class="value">
 						{{reward}}
-						<image mode="aspectFit" src="https://mall.rongtongh.cn/storage/img/invite/text4.png"></image>
+						<image mode="aspectFit" :src="$fileUrl() + '/invite/text4.png'"></image>
 					</view>
 				</view>
 			</view>
 			<view class="buttons">
 				<button open-type="share" class="button">
-					<image class="button1" mode="aspectFit" src="https://mall.rongtongh.cn/storage/img/invite/button2.png"></image>
+					<image class="button1" mode="aspectFit" :src="$fileUrl() + '/invite/button2.png'"></image>
 				</button>
-				<image class="button2" mode="aspectFit" src="https://mall.rongtongh.cn/storage/img/invite/button3.png" @click="promotionCode">
+				<image class="button2" mode="aspectFit" :src="$fileUrl() + '/invite/button3.png'" @click="promotionCode">
 				</image>
 				<!-- 		<view class="m_button">
 					邀请好友

+ 9 - 9
pages/knapsack/knapsack.vue

@@ -2,7 +2,7 @@
 	<view class="container">
 		<view class="tabs">
 			<uni-transition ref="ani" class="tabsTransition" :styles="styles" :show="true">
-				<image class="tabsBk" src="https://mall.rongtongh.cn/storage/img/knapsack/tabBk.png" mode="widthFix"></image>
+				<image class="tabsBk" :src="$fileUrl() + '/knapsack/tabBk.png'" mode="widthFix"></image>
 			</uni-transition>
 
 			<view :class="['tab', activeIndex == 1 ? 'active' : '']" @click="tabClick(1)">
@@ -15,7 +15,7 @@
 
 		<view class="content" v-if="activeIndex == 1">
 			<view class="tabs2">
-				<image class="tabs2_bk" src="https://mall.rongtongh.cn/storage/img/knapsack/tabBk2.png" mode="widthFix"></image>
+				<image class="tabs2_bk" :src="$fileUrl() + '/knapsack/tabBk2.png'" mode="widthFix"></image>
 				<view class="tabs2_info">
 					<span class="text">选择排序方式:</span>
 					<uni-data-select class="select" v-model="params.sort" :localdata="sortList"></uni-data-select>
@@ -33,7 +33,7 @@
 						<view class="card">
 							<view class="row" style="margin-top: 10px;">
 								<view class="left">
-									<image class="img" src="https://mall.rongtongh.cn/storage/img/ka.jpeg" mode="aspectFill"></image>
+									<image class="img" :src="$fileUrl() + '/ka.jpeg'" mode="aspectFill"></image>
 								</view>
 								<view class="right" style="font-size: 14px;">
 									<view class="row title">
@@ -49,7 +49,7 @@
 									<view class="row button">
 										<span></span>
 										<span>
-											<image @click="decompose(item)" style="width: 44px;" src="https://mall.rongtongh.cn/storage/img/knapsack/button5.png"
+											<image @click="decompose(item)" style="width: 44px;" :src="$fileUrl() + '/knapsack/button5.png'"
 												mode="widthFix"></image>
 										</span>
 									</view>
@@ -61,17 +61,17 @@
 			</view>
 
 			<view class="buttons" v-if="!showCheck">
-				<image class="button" @click="clickCheckType(2)" src="https://mall.rongtongh.cn/storage/img/knapsack/button3.png" mode="heightFix"></image>
-				<image class="button" @click="clickCheckType(1)" src="https://mall.rongtongh.cn/storage/img/knapsack/button4.png"
+				<image class="button" @click="clickCheckType(2)" :src="$fileUrl() + '/knapsack/button3.png'" mode="heightFix"></image>
+				<image class="button" @click="clickCheckType(1)" :src="$fileUrl() + '/knapsack/button4.png'"
 					mode="heightFix">
 				</image>
 			</view>
 			<view class="bottom" v-if="showCheck">
 				<view class="left">
 					<image class="radio1" @click="clickCheckAll(true)" v-if="!allCheck"
-						src="https://mall.rongtongh.cn/storage/img/knapsack/check.png" mode="widthFix"></image>
+						:src="$fileUrl() + '/knapsack/check.png'" mode="widthFix"></image>
 					<image class="radio2" @click="clickCheckAll(false)" v-else
-						src="https://mall.rongtongh.cn/storage/img/knapsack/checkActive.png" mode="widthFix"></image>
+						:src="$fileUrl() + '/knapsack/checkActive.png'" mode="widthFix"></image>
 					<view class="text" style="color: #000;">
 						全选
 					</view>
@@ -94,7 +94,7 @@
 		</view>
 		<view class="content " v-if="activeIndex == 2">
 			<view class="tabs2 tabw">
-				<image class="tabs2_bk" style="width: 100%; height: 30px;" src="https://mall.rongtongh.cn/storage/img/knapsack/tabBk2.png"
+				<image class="tabs2_bk" style="width: 100%; height: 30px;" :src="$fileUrl() + '/knapsack/tabBk2.png'"
 					mode=""></image>
 				<view class="tabs2_info">
 					<view :class="['tabItem', tab2Active == 1 ? 'active': '']" @click="tabs2Click(1)">

+ 9 - 9
pages/knapsackTab/knapsack.vue

@@ -2,7 +2,7 @@
 	<view class="container">
 		<view class="tabs">
 			<uni-transition ref="ani" class="tabsTransition" :styles="styles" :show="true">
-				<image class="tabsBk" src="https://mall.rongtongh.cn/storage/img/knapsack/tabBk.png" mode="widthFix"></image>
+				<image class="tabsBk" :src="$fileUrl() + '/knapsack/tabBk.png'" mode="widthFix"></image>
 			</uni-transition>
 
 			<view :class="['tab', activeIndex == 1 ? 'active' : '']" @click="tabClick(1)">
@@ -15,7 +15,7 @@
 
 		<view class="content" v-if="activeIndex == 1">
 			<view class="tabs2">
-				<image class="tabs2_bk" src="https://mall.rongtongh.cn/storage/img/knapsack/tabBk2.png" mode="widthFix"></image>
+				<image class="tabs2_bk" :src="$fileUrl() + '/knapsack/tabBk2.png'" mode="widthFix"></image>
 				<view class="tabs2_info">
 					<span class="text">选择排序方式:</span>
 					<uni-data-select class="select" v-model="params.sort" :localdata="sortList"></uni-data-select>
@@ -33,7 +33,7 @@
 						<view class="card">
 							<view class="row" style="margin-top: 10px;">
 								<view class="left">
-									<image class="img" src="https://mall.rongtongh.cn/storage/img/ka.jpeg" mode="aspectFill"></image>
+									<image class="img" :src="$fileUrl() + '/ka.jpeg'" mode="aspectFill"></image>
 								</view>
 								<view class="right" style="font-size: 14px;">
 									<view class="row title">
@@ -49,7 +49,7 @@
 									<view class="row button">
 										<span></span>
 										<span>
-											<image @click="decompose(item)" style="width: 44px;" src="https://mall.rongtongh.cn/storage/img/knapsack/button5.png"
+											<image @click="decompose(item)" style="width: 44px;" :src="$fileUrl() + '/knapsack/button5.png'"
 												mode="widthFix"></image>
 										</span>
 									</view>
@@ -61,17 +61,17 @@
 			</view>
 
 			<view class="buttons" v-if="!showCheck">
-				<image class="button" @click="clickCheckType(2)" src="https://mall.rongtongh.cn/storage/img/knapsack/button3.png" mode="heightFix"></image>
-				<image class="button" @click="clickCheckType(1)" src="https://mall.rongtongh.cn/storage/img/knapsack/button4.png"
+				<image class="button" @click="clickCheckType(2)" :src="$fileUrl() + '/knapsack/button3.png'" mode="heightFix"></image>
+				<image class="button" @click="clickCheckType(1)" :src="$fileUrl() + '/knapsack/button4.png'"
 					mode="heightFix">
 				</image>
 			</view>
 			<view class="bottom" v-if="showCheck">
 				<view class="left">
 					<image class="radio1" @click="clickCheckAll(true)" v-if="!allCheck"
-						src="https://mall.rongtongh.cn/storage/img/knapsack/check.png" mode="widthFix"></image>
+						:src="$fileUrl() + '/knapsack/check.png'" mode="widthFix"></image>
 					<image class="radio2" @click="clickCheckAll(false)" v-else
-						src="https://mall.rongtongh.cn/storage/img/knapsack/checkActive.png" mode="widthFix"></image>
+						:src="$fileUrl() + '/knapsack/checkActive.png'" mode="widthFix"></image>
 					<view class="text" style="color: #000;">
 						全选
 					</view>
@@ -94,7 +94,7 @@
 		</view>
 		<view class="content " v-if="activeIndex == 2">
 			<view class="tabs2 tabw">
-				<image class="tabs2_bk" style="width: 100%; height: 30px;" src="https://mall.rongtongh.cn/storage/img/knapsack/tabBk2.png"
+				<image class="tabs2_bk" style="width: 100%; height: 30px;" :src="$fileUrl() + '/knapsack/tabBk2.png'"
 					mode=""></image>
 				<view class="tabs2_info">
 					<view :class="['tabItem', tab2Active == 1 ? 'active': '']" @click="tabs2Click(1)">

+ 8 - 4
pages/login/login.vue

@@ -1,8 +1,8 @@
 <template>
 	<view class="loginPage">
-		<image class="bk" src="https://mall.rongtongh.cn/storage/img/loginBk.png" mode="widthFix"></image>
+		<image class="bk" :src="$fileUrl() + '/loginBk.png'" mode="widthFix"></image>
 		<view class="box">
-			<image class="logo" src="https://mall.rongtongh.cn/storage/img/logo.png" mode="widthFix"></image>
+			<image class="logo" :src="$fileUrl() + '/logo.png'" mode="widthFix"></image>
 			<button @click="wxLogin" class="button" type="default">微信授权登录</button>
 			<view class="textButton" @click="noLogin">
 				暂不登录
@@ -26,11 +26,15 @@
 				checkbox1: false, 
 			}
 		},
+		onShow() {
+			console.log(getCurrentPages(), '宋宋宋宋宋宋宋')
+			
+		},
 		methods: {
 			noLogin() {
 				console.log('sssssssss')
-				wx.switchTab({
-					url: '/pages/index/index'
+				wx.navigateBack({
+					delta: 1
 				})
 			},
 			wxLogin: function(e) {

+ 1 - 1
pages/message/message.vue

@@ -50,7 +50,7 @@
 		},
 		methods: {
 			load() {
-				if (this.loadMore = "more") {
+				if (this.loadMore == "more") {
 					this.params.page += 1
 					this.getList()
 				}

+ 9 - 9
pages/mine/mine.vue

@@ -6,7 +6,7 @@
 				<uni-badge class="message" :text="massageNum" absolute="rightTop" size="small" :max-num="99" :offset="[4, 4]">
 					<image 
 						class="icon" 
-						src="https://mall.rongtongh.cn/storage/img/mine/massage.png" 
+						:src="$fileUrl() + '/mine/massage.png'" 
 						mode="widthFix" 
 						@click="$navigateTo('/pages/message/message')"
 					></image>
@@ -44,31 +44,31 @@
 		</view>
 		<view class="menus">
 			<view class="title">
-				<image src="https://mall.rongtongh.cn/storage/img/mine/title.png" mode=""></image>
+				<image :src="$fileUrl() + '/mine/title.png'" mode=""></image>
 			</view>
 			<view class="menuList">
 				<view class="menu" @click="pageTo('/pages/addressManage/addressManage')">
-					<image src="https://mall.rongtongh.cn/storage/img/mine/menu1.png"></image>
+					<image :src="$fileUrl() + '/mine/menu1.png'"></image>
 					<span>地址管理</span>
 				</view>
-				<view class="menu">
-					<image src="https://mall.rongtongh.cn/storage/img/mine/menu2.png"></image>
+				<view class="menu" @click="pageTo('/pages/consumptionRecords/consumptionRecords')">
+					<image :src="$fileUrl() + '/mine/menu2.png'"></image>
 					<span>消费记录</span>
 				</view>
 				<view class="menu">
-					<image src="https://mall.rongtongh.cn/storage/img/mine/menu3.png"></image>
+					<image :src="$fileUrl() + '/mine/menu3.png'"></image>
 					<span>加群交流</span>
 				</view>
 				<view class="menu">
-					<image src="https://mall.rongtongh.cn/storage/img/mine/menu4.png"></image>
+					<image :src="$fileUrl() + '/mine/menu4.png'"></image>
 					<span>游戏规则</span>
 				</view>
 				<view class="menu">
-					<image src="https://mall.rongtongh.cn/storage/img/mine/menu5.png"></image>
+					<image :src="$fileUrl() + '/mine/menu5.png'"></image>
 					<span>用户协议</span>
 				</view>
 				<view class="menu">
-					<image src="https://mall.rongtongh.cn/storage/img/mine/menu6.png"></image>
+					<image :src="$fileUrl() + '/mine/menu6.png'"></image>
 					<span>联系客服</span>
 				</view>
 			</view>

+ 8 - 8
pages/orderConfirm/orderConfirm.vue

@@ -4,11 +4,11 @@
 			<view class="card" style="height: 60px; align-items: center;" @click="toAddress" v-if="!addressId">
 				<view class="row">
 					<view class="left">
-						<image class="icon" src="https://mall.rongtongh.cn/storage/img/orderConfirm/icon1.png" mode="widthFix"></image>
+						<image class="icon" :src="$fileUrl() + '/orderConfirm/icon1.png'" mode="widthFix"></image>
 						<span class="text1" style="margin-left: 5px;">添加地址</span>
 					</view>
 					<view class="">
-						<image class="icon" src="https://mall.rongtongh.cn/storage/img/orderConfirm/icon2.png" mode="widthFix"></image>
+						<image class="icon" :src="$fileUrl() + '/orderConfirm/icon2.png'" mode="widthFix"></image>
 					</view>
 				</view>
 			</view>
@@ -33,7 +33,7 @@
 			<view class="card" v-for="(item, index) in list">
 				<view class="row" style="margin-top: 10px;">
 					<view class="left">
-						<image class="img" src="https://mall.rongtongh.cn/storage/img/ka.jpeg" mode="aspectFill"></image>
+						<image class="img" :src="$fileUrl() + '/ka.jpeg'" mode="aspectFill"></image>
 					</view>
 					<view class="right" style="font-size: 14px;">
 						<view class="row title">
@@ -49,7 +49,7 @@
 						<!-- 						<view class="row button">
 							<span></span>
 							<span>
-								<image style="width: 44px;" src="https://mall.rongtongh.cn/storage/img/knapsack/button5.png" mode="widthFix"></image>
+								<image style="width: 44px;" :src="$fileUrl() + /knapsack/button5.png" mode="widthFix"></image>
 							</span>
 						</view> -->
 					</view>
@@ -63,7 +63,7 @@
 				</view>
 			</view>
 			<view class="right">
-				<image class="button" @click="clickSubmit" src="https://mall.rongtongh.cn/storage/img/orderConfirm/button.png" mode="heightFix"></image>
+				<image class="button" @click="clickSubmit" :src="$fileUrl() + '/orderConfirm/button.png'" mode="heightFix"></image>
 			</view>
 		</view>
 		<uni-popup ref="popup" type="bottom" background-color="#fff" safe-area>
@@ -87,7 +87,7 @@
 					</view>
 				</view>
 				
-				<image class="button" @click="payment" src="https://mall.rongtongh.cn/storage/img/orderConfirm/button2.png" mode="heightFix"></image>
+				<image class="button" @click="payment" :src="$fileUrl() + '/orderConfirm/button2.png'" mode="heightFix"></image>
 			</view>
 		</uni-popup>
 	</view>
@@ -207,8 +207,8 @@
 							icon: 'success',
 						})
 						_this.close()
-						wx.switchTab({
-							url: '/pages/knapsack/knapsack'
+						wx.navigateBack({
+							delta: 1
 						})
 					},
 					'fail': function(res) {

+ 78 - 9
pages/raffle/raffle.vue

@@ -4,13 +4,13 @@
 			:dots-styles="dotsStyles" field="content">
 			<swiper class="swiper-box" @change="change" :current="swiperDotIndex">
 				<swiper-item>
-					<image class="swiperItem" src="https://mall.rongtongh.cn/storage/img/raffle/2.jpg" mode="aspectFill">
+					<image class="swiperItem" :src="$fileUrl() + '/raffle/2.jpg'" mode="aspectFill">
 				</swiper-item>
 				<swiper-item>
-					<image class="swiperItem" src="https://mall.rongtongh.cn/storage/img/raffle/3.jpg" mode="aspectFill">
+					<image class="swiperItem" :src="$fileUrl() + '/raffle/3.jpg'" mode="aspectFill">
 				</swiper-item>
 				<swiper-item>
-					<image class="swiperItem" src="https://mall.rongtongh.cn/storage/img/raffle/1.jpg" mode="aspectFill">
+					<image class="swiperItem" :src="$fileUrl() + '/raffle/1.jpg'" mode="aspectFill">
 				</swiper-item>
 			</swiper>
 		</uni-swiper-dot>
@@ -31,17 +31,35 @@
 		<view class="list" v-if="tabActive == 1">
 			
 		</view>
-		<view class="list2" v-if="tabActive != 1">
-			<view class="ka" v-for="(item, index) in list" @click="$navigateTo('/pages/drawCard_last/drawCard_last', {id: item.id})">
+		<view class="list2" v-if="tabActive == 2">
+			<view class="ka" v-for="(item, index) in list" @click="toDrawCard({id: item.id})">
 				<view class="top">
-					<image mode="aspectFit" :src="item.icon"></image>
+					<image mode="widthFix" :src="item.icon"></image>
 				</view>
 				<view class="ka-info">
 					<view class="ka-name">
 						{{item.name}}
 					</view>
 					<view class="row">
-						<uni-tag text="创意热销" inverted type="default"></uni-tag>
+						<uni-tag class="tag" text="创意热销" inverted type="default"></uni-tag>
+						<view class="money">
+							¥{{item.price}}
+						</view>
+					</view>
+				</view>
+			</view>
+		</view>
+		<view class="list2 three" v-if="tabActive > 2">
+			<view class="ka" v-for="(item, index) in list" @click="toDrawCard({id: item.id})">
+				<view class="top">
+					<image mode="widthFix" :src="item.icon"></image>
+				</view>
+				<view class="ka-info">
+					<view class="ka-name">
+						{{item.name}}
+					</view>
+					<view class="row">
+						<uni-tag class="tag" text="创意热销" inverted type="default"></uni-tag>
 						<view class="money">
 							¥{{item.price}}
 						</view>
@@ -79,6 +97,19 @@
 			this.getList()
 		},
 		methods: {
+			toDrawCard(params) {
+				let url = ''
+				if (this.tabActive == 1) {
+					url = 'xxx'
+				} else if (this.tabActive == 2) {
+					url = '/pages/drawCard_last/drawCard_last'
+				} else if (this.tabActive == 3) {
+					url = '/pages/drawCard_fullSet/drawCard_fullSet'
+				} else if (this.tabActive == 4) {
+					url = '/pages/drawCard_fullSet/drawCard_fullSet'
+				}
+				this.$navigateTo(url, params)
+			},
 			getList () {
 				let params = {
 					limit: 999,
@@ -135,6 +166,7 @@
 		grid-template-columns: 1fr 1fr;
 		grid-gap: 10px;
 		padding: 10px;
+		width: calc(100% - 20px);
 		
 		.ka {
 			width: calc(50vw - 15px);
@@ -150,23 +182,33 @@
 				justify-content: center;
 				
 				image {
-					width: 35vw;
+					width: 80%;
 					height: 50vw;
+					// height: 50vw;
 				}
 			}
 			.ka-info {
 				padding: 10px;
+				
 				.ka-name {
 					font-size: 15px;
 					font-weight: 600;
+					width: 100%;
+					white-space: nowrap;
+					overflow: hidden;
+					text-overflow: ellipsis;
 				}
 				.row {
+					position: relative;
 					margin-top: 5px;
 					display: flex;
 					justify-content: space-between;
 					
+					.tag {
+						
+					}
 					.money {
-						font-size: 16px;
+						font-size: 12px;
 						font-weight: 600;
 						color: #FF2C43;
 					}
@@ -174,4 +216,31 @@
 			}
 		}
 	}
+	.three {
+		grid-template-columns: 1fr 1fr 1fr;
+		
+		.ka {
+			width: 100%;
+			.top {
+				image {
+					width: 80%;
+					height: 30vw;
+				}
+			}
+			.ka-info {
+				padding: 5px 5px 10px 5px;
+				.ka-name {
+					font-size: 12px;
+				}
+				.row {
+					margin-top: 2px;
+					justify-content: flex-end;
+					.tag {
+						display: none;
+					}
+
+				}
+			}
+		}
+	}
 </style>

+ 1 - 1
pages/user/user.vue

@@ -14,7 +14,7 @@
 					@success="success" 
 					@fail="fail" 
 				 >
-					<image class="icon" src="https://mall.rongtongh.cn/storage/img/mine/icon1.png" mode="widthFix"></image>
+					<image class="icon" :src="$fileUrl() + '/mine/icon1.png'" mode="widthFix"></image>
 				</uni-file-picker>
 			</view>
 			<uni-list class="list">

+ 2 - 2
pages/winningRecord/winningRecord.vue

@@ -26,7 +26,7 @@
 
 <script>
 	import {
-		userPrizeListApi
+		prizeUserListApi
 	} from "@/api/drawCard.js"
 	import {
 		rewardType
@@ -56,7 +56,7 @@
 					page: 1,
 					raffleId: this.raffleId
 				}
-				userPrizeListApi(params).then(res => {
+				prizeUserListApi(params).then(res => {
 					console.log(res, 'res中奖记录')
 					this.list = res.data
 				})

Різницю між файлами не показано, бо вона завелика
+ 0 - 0
unpackage/dist/dev/mp-weixin/pages/knapsack/knapsack.wxml


+ 4 - 0
utils/commonConfig.js

@@ -1,3 +1,7 @@
+export function fileUrl () {
+	let fileUrl = 'https://mall.rongtongh.cn/storage/img'
+	return fileUrl
+}
 export const rewardType = [
 	{
 		label: 'S赏',

+ 48 - 0
utils/utils.js

@@ -54,4 +54,52 @@ export function selectDictLabel(datas, value) {
         }
     })
     return actions.join('');
+}
+
+// 时间戳转时分秒
+export const formatSeconds = (value) => {
+	if (value === 0 || value < 1000) return '00:00:00';
+	var timestamp = parseInt(value) / 1000; // 毫秒转秒
+	// 小时取余数
+	const remainder = timestamp % 3600
+	// 时、分、秒
+	let hour, minute, second;
+	if (remainder === 0) { // 整除 小时
+		hour = parseInt(timestamp / 3600);
+	} else {
+		hour = parseInt(timestamp / 3600);
+		let remainderMinute = remainder % 60;
+		if (remainderMinute === 0) { // 整除 分钟
+			minute = parseInt(remainder / 60);
+		} else {
+			minute = parseInt(remainder / 60);
+			second = parseInt(remainderMinute);
+		}
+	}
+	let text = '';
+	if (hour > 0) {
+		if (hour < 10) {
+			text += '0';
+		}
+		text += hour + ':';
+	} else {
+		text += '00' + ':';
+	}
+	if (minute > 0) {
+		if (minute < 10) {
+			text += '0';
+		}
+		text += minute + ':';
+	} else {
+		text += '00' + ':';
+	}
+	if (second > 0) {
+		if (second < 10) {
+			text += '0';
+		}
+		text += second;
+	} else {
+		text += '00';
+	}
+	return text;
 }

Деякі файли не було показано, через те що забагато файлів було змінено