浏览代码

新增免费抽奖模块

DELL 3 年之前
父节点
当前提交
0d64e68574
共有 4 个文件被更改,包括 267 次插入0 次删除
  1. 10 0
      components/custom-tab-bar/custom-tab-bar.vue
  2. 22 0
      packageOperate/activity/index.vue
  3. 6 0
      pages.json
  4. 229 0
      pages/activity/index.vue

+ 10 - 0
components/custom-tab-bar/custom-tab-bar.vue

@@ -38,6 +38,10 @@
 					uni.switchTab({
 					uni.switchTab({
 						url: '/pages/core/index'
 						url: '/pages/core/index'
 					})
 					})
+				} else if (e == 'activity') {
+					uni.switchTab({
+						url: '/pages/activity/index'
+					})
 				} else if (e == 'user') {
 				} else if (e == 'user') {
 					uni.switchTab({
 					uni.switchTab({
 						url: '/pages/user/index'
 						url: '/pages/user/index'
@@ -57,6 +61,12 @@
 						selectedIconPath: "../../static/tabbar/core_select.png",
 						selectedIconPath: "../../static/tabbar/core_select.png",
 						text: "兑换大厅"
 						text: "兑换大厅"
 					},
 					},
+					{
+						name: "activity",
+						iconPath: "../../static/tabbar/core.png",
+						selectedIconPath: "../../static/tabbar/core_select.png",
+						text: "免费抽奖"
+					},
 					{
 					{
 						name: "user",
 						name: "user",
 						iconPath: "../../static/tabbar/user.png",
 						iconPath: "../../static/tabbar/user.png",

+ 22 - 0
packageOperate/activity/index.vue

@@ -0,0 +1,22 @@
+<template>
+	<view>
+		11111111111111111111
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				
+			}
+		},
+		methods: {
+			
+		}
+	}
+</script>
+
+<style>
+
+</style>

+ 6 - 0
pages.json

@@ -19,6 +19,9 @@
 		},
 		},
 		{
 		{
 			"path": "pages/ticketBox/detail"
 			"path": "pages/ticketBox/detail"
+		},
+		{
+			"path": "pages/activity/index"
 		}
 		}
 	],
 	],
 	"subPackages": [{
 	"subPackages": [{
@@ -138,6 +141,9 @@
 		}, {
 		}, {
 			"pagePath": "pages/core/index",
 			"pagePath": "pages/core/index",
 			"text": "兑奖大厅"
 			"text": "兑奖大厅"
+		}, {
+			"pagePath": "pages/activity/index",
+			"text": "免费抽奖"
 		}, {
 		}, {
 			"pagePath": "pages/user/index",
 			"pagePath": "pages/user/index",
 			"text": "我的"
 			"text": "我的"

+ 229 - 0
pages/activity/index.vue

@@ -0,0 +1,229 @@
+<template>
+	<view>
+		<u-navbar leftIconSize="0" :placeholder="true" bgColor="#ffffff">
+			<view class="u-nav-slot" slot="left">
+				<u-tabs @change="changeTab" :scrollable="false" :list="statusArr" lineWidth="30" lineHeight="1"
+					lineColor="#E96737" :activeStyle="{
+										color: '#E96737',
+										transform: 'scale(1)',
+										width: '65px',
+										
+									}" :inactiveStyle="{
+										color: '#333',
+										transform: 'scale(1)',
+										width: '65px'
+									}" itemStyle="padding-left: 11px; padding-right: 11px; height: 44px;text-align: center;">
+				</u-tabs>
+			</view>
+		</u-navbar>
+		<view class="order-list">
+			<view class="order-list-data">
+				<view class="order-list-data-item" v-for="(item, index) in list" :key="index">
+					<view class="order-list-data-item__info">
+						<view class="flex order-list-data-item__info__title">
+							<view class="number">
+								<text>订单编号:</text>
+								<text>{{ item.orderId }}</text>
+							</view>
+							<view class="success" v-if="item.status.value == 1">{{ item.status.desc }}</view>
+							<view v-else>{{ item.status.desc }}</view>
+						</view>
+						<navigator :url="`/packageGoods/order/detail?id=${ item.orderId }`" hover-class="navigator-hover">
+							<view class="flex order-list-data-item__info__detail"
+								v-for="(items, index) in item.items" :key="index">
+								<view class="order-list-data-item__info__detail__left">
+									<view class="img">
+										<image class="img" :src="items.picUrl" mode="aspectFill">
+										</image>
+									</view>
+								</view>
+								<view class="order-list-data-item__info__detail__right">
+									<view class="ells title">{{ items.title }}</view>
+									<view class="sku" v-if="items.properties">规格:{{ items.properties }}</view>
+									<view class="num">数量:{{ items.goodsNum }}</view>
+								</view>
+							</view>
+						</navigator>
+		
+						<view class="order-list-data-item__info__total">
+							<view>共{{ item.orderNum }}个商品</view>
+							<view class="money">
+								<text v-if="item.status.value == 0">应付:</text>
+								<text v-else>实付:</text>
+								<text>¥{{ $numberFormat(item.payAmt) }}</text>
+							</view>
+						</view>
+
+						<view class="order-list-data-item__info__btn" v-if="item.status.value == 0">
+							<text @click="cancelOrder(item.orderId)" style="border-color: #666;">取消订单</text>
+							<text @click="payOrder(item)">去支付</text>
+						</view>
+					</view>
+				</view>
+			</view>
+			<view class="flex empty" v-if="!list.length && !loading">
+				<u-empty text="活动为空" mode="order" />
+			</view>
+		</view>
+		<custom-tab-bar :activeValue="'activity'" />
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				list:[],
+				statusArr: [{
+					name: '正在进行'
+				}, {
+					name: '已开奖',
+				} ],
+			}
+		},
+		methods: {
+			changeTab(e) {
+				if (e.index == 0) {
+					this.status = null
+				} else if (e.index == 1) {
+					this.status = '0'
+				}
+				// this.pageList()
+			},
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+.order-list {
+			background-color: #F8F8F8;
+			margin: 0rpx 10rpx 0;
+			padding-top: 100rpx;
+
+			&-data {
+
+				navigator {
+					margin-bottom: 10rpx;
+				}
+
+				navigator:last-child {
+					margin-bottom: 0;
+				}
+
+				&-item {
+					margin-bottom: 10rpx;
+					padding: 20rpx 30rpx;
+					background-color: #FFFFFF;
+					justify-content: space-between;
+					background-color: #FFFFFF;
+				}
+
+				&-item {
+					&__info {
+
+						&__title {
+							justify-content: space-between;
+
+							.number {
+								line-height: 40rpx;
+							}
+
+							.success {
+								color: $uni-text-color;
+							}
+						}
+
+						&__detail {
+							padding: 20rpx 0;
+							justify-content: space-between;
+							border-bottom: 1px solid rgba(236, 236, 236, 100);
+
+							&__left {
+								display: flex;
+								height: 170rpx;
+
+								.img {
+									image {
+										width: 170rpx;
+										height: 170rpx;
+										margin-right: 20rpx;
+									}
+								}
+							}
+
+							&__right {
+								flex: 1;
+								display: flex;
+								height: 170rpx;
+								flex-direction: column;
+								justify-content: space-between;
+								align-items: flex-start;
+								font-size: 30rpx;
+								
+								.title{
+									font-weight: bold;
+								}
+
+								.sku {
+									color: #848484;
+								}
+							}
+
+						}
+
+						&__detail:last-child {
+							border: none;
+						}
+
+						&__total {
+							display: flex;
+							align-items: center;
+							justify-content: flex-end;
+							padding: 10rpx 0;
+
+							.money {
+								font-weight: bold;
+								margin-left: 54rpx;
+							}
+						}
+
+						&__btn {
+							display: flex;
+							align-items: center;
+							justify-content: flex-end;
+							padding-top: 10rpx;
+							border-top: 1px solid rgba(236, 236, 236, 100);
+
+							text {
+								display: block;
+								box-sizing: border-box;
+								margin: 0 0 0 40rpx;
+								width: 160rpx;
+								height: 60rpx;
+								line-height: 60rpx;
+								text-align: center;
+								font-size: 24rpx;
+								border-radius: 8rpx;
+								border: none;
+							}
+
+							text:first-child {
+								background-color: #fff;
+								line-height: 56rpx;
+								border: 2rpx solid $uni-bg-color;
+							}
+
+							text:last-child {
+								background-color: $uni-bg-color;
+								color: #FFFFFF;
+							}
+						}
+					}
+				}
+			}
+		}
+
+		.empty {
+			height: 60vh;
+		}
+</style>