Jelajahi Sumber

feat:活动页面

zhanghui 1 tahun lalu
induk
melakukan
c58087391c

+ 5 - 2
manifest.json

@@ -43,7 +43,9 @@
                 ]
             },
             /* ios打包配置 */
-            "ios" : {},
+            "ios" : {
+                "dSYMs" : false
+            },
             /* SDK配置 */
             "sdkConfigs" : {
                 "payment" : {
@@ -52,7 +54,8 @@
                         "appid" : "wx9e86b549db43d624",
                         "UniversalLinks" : ""
                     }
-                }
+                },
+                "ad" : {}
             }
         }
     },

+ 111 - 0
orderPages/activityDetail/activityDetail.vue

@@ -0,0 +1,111 @@
+<template>
+  <view>
+    <view class="out1">
+      <view class="flex-col top">
+        <view class="flex-row title">
+          <text>活动名称</text>
+        </view>
+        <view class="flex-row price">
+          <text>¥98.00</text>
+        </view>
+        <view class="flex-row">
+          <text>活动时间:</text>
+          <text>2024年8月10日 至 2099年10月1日</text>
+        </view>
+        <view class="flex-row">
+          <text>是否退款:</text>
+          <text>是</text>
+        </view>
+        <view class="flex-row">
+          <text>
+            活动描述活动描述活动描述活动描述活动描述活动描述活动描述活动描述活动描述活动描述活动描述活动描述活动描述活动描述活动描述活动描述活动描述活动描述活动描述
+          </text>
+        </view>
+      </view>
+    </view>
+
+    <view class="out1">
+      <view class="flex-col top1">
+        <view class="flex-row justify-center title">
+          <text>退款策略(模块标题)</text>
+        </view>
+        <view class="flex-row">
+          <text>
+            活动描述活动描述活动描述活动描述活动描述活动描述活动描述活动描述活动描述活动描述活动描述活动描述活动描述活动描述活动描述活动描述活动描述活动描述活动描述
+          </text>
+        </view>
+      </view>
+    </view>
+
+
+    <view class="out2">
+      <view class="flex-col ticket">
+        <view class="flex-row justify-center title">
+          <text>赠送优惠券</text>
+        </view>
+
+        <view class="flex-row ticketList" v-for="(i,index) in 2">
+          <view class="h-text flex-col justify-center ">
+            <text class="money">什么券</text>
+            <text class="desc">满100可用</text>
+          </view>
+
+          <view class="h-center-content flex-col justify-around">
+            <view class="h-value">
+              <text>{{ item.name }}</text>
+            </view>
+            <view class="ticketMsg">
+              使用平台:
+              <text>全平台</text>
+            </view>
+            <view class="ticketMsg">
+              使用次数:99
+            </view>
+            <view class="ticketMsg">
+              领取后30天内有效
+            </view>
+<!--            <view class="ticketMsg flex-row">-->
+<!--              <text @click.stop="showRemark(item)">使用规则</text>-->
+<!--              <u-icon v-if="item.id == showRemarkId" name="arrow-down-fill" color="" size="12"></u-icon>-->
+<!--              <u-icon v-else name="play-right-fill" color="" size="12"></u-icon>-->
+<!--            </view>-->
+          </view>
+
+          <view class="h-right-content flex-col justify-center ">
+            <view class="btn">
+              <text>立即领取</text>
+            </view>
+          </view>
+        </view>
+      </view>
+
+      <view class="flex-row justify-between link">
+        <text>跳转一</text>
+        <u-icon  name="arrow-right" color="" size="12"></u-icon>
+      </view>
+
+      <view class="flex-row justify-between link">
+        <text>跳转一</text>
+        <u-icon name="arrow-right" color="" size="12"></u-icon>
+      </view>
+
+    </view>
+
+
+  </view>
+</template>
+
+<script>
+export default {
+  data() {
+    return {}
+  },
+  methods: {}
+}
+</script>
+
+
+<style lang="scss" scoped>
+@import '/common/css/common.css';
+@import './index.rpx.scss';
+</style>

+ 117 - 0
orderPages/activityDetail/index.rpx.scss

@@ -0,0 +1,117 @@
+.out1{
+  background: #ffffff;
+  padding: 0 32rpx;
+}
+.top{
+  background: #ffffff;
+  padding: 20rpx 0;
+  font-size: 28rpx;
+  color: #999999;
+  line-height: 50rpx;
+  border-bottom: 2rpx solid #f1f1f1;
+}
+
+.top1{
+  background: #ffffff;
+  padding: 20rpx 0;
+  font-size: 28rpx;
+  color: #999999;
+  line-height: 50rpx;
+}
+
+.title{
+  font-size: 30rpx;
+  font-weight: bold;
+  color: #000000;
+}
+
+.price{
+  font-size: 32rpx;
+  font-weight: bold;
+  color: #ed569f;
+}
+
+.out2{
+  background: #f7f7f7;
+  padding: 0 32rpx 30rpx 32rpx;
+}
+.ticket{
+  padding: 20rpx 0;
+}
+
+.ticketList{
+  width: 686rpx;
+  height: 188rpx;
+  margin-top: 24rpx;
+  background-image: url('/static/coupon/u210.png');
+  background-repeat: no-repeat;
+  background-size: cover;
+}
+.h-text{
+  width: 200rpx;
+  height: 188rpx;
+}
+.money{
+  height: 52rpx;
+  font-size: 36rpx;
+  font-family: DINAlternate-Bold, DINAlternate;
+  font-weight: bold;
+  color: #333333;
+  line-height: 52rpx;
+  text-align: center;
+}
+.desc{
+  height: 36rpx;
+  font-size: 20rpx;
+  font-weight: 400;
+  color: #333333;
+  line-height: 36rpx;
+  text-align: center;
+}
+.h-center-content{
+  width: 298rpx;
+  height: 188rpx;
+}
+
+.h-value{
+  font-size: 28rpx;
+  font-weight: bold;
+  color: #333333;
+  line-height: 44rpx;
+  margin-top: 24rpx;
+  margin-left: 24rpx;
+}
+
+.ticketMsg{
+  font-size: 24rpx;
+  font-weight: 400;
+  color: #999999;
+  line-height: 36rpx;
+  margin-left: 24rpx;
+}
+
+.h-right-content{
+  width: 188rpx;
+  height: 188rpx;
+}
+.btn{
+  width: 156rpx;
+  height: 64rpx;
+  background: #93D21A;
+  border-radius: 32rpx;
+
+  font-size: 24rpx;
+  font-weight: 400;
+  color: #FFFFFF;
+  line-height: 64rpx;
+  text-align: center;
+}
+
+.link{
+  background: #FFFFFF;
+ padding: 10rpx 24rpx;
+  margin-top: 20rpx;
+  line-height: 60rpx;
+  font-size: 28rpx;
+  color: #999999;
+}

+ 32 - 0
orderPages/activityList/activityList.vue

@@ -0,0 +1,32 @@
+<template>
+  <view class="page">
+    <mescroll-item ref="MescrollItem" :i="0"  :index="0" :height="windowHeight">
+    </mescroll-item>
+  </view>
+</template>
+
+<script>
+
+import MescrollItem from "./module/mescrollUni-item.vue";
+export default {
+  components: {
+    MescrollItem
+  },
+
+  data() {
+    return {
+      windowHeight: '',
+    }
+  },
+  onLoad(e) {
+    let sysInfo = uni.getSystemInfoSync()
+    this.windowHeight = sysInfo.windowHeight + 'px'
+  },
+  methods: {}
+}
+</script>
+
+<style lang="scss" scoped>
+@import '/common/css/common.css';
+@import './index.rpx.scss';
+</style>

+ 4 - 0
orderPages/activityList/index.rpx.scss

@@ -0,0 +1,4 @@
+.page{
+  padding: 0 24rpx;
+  background: #f7f7f7;
+}

+ 31 - 0
orderPages/activityList/module/index.rpx.css

@@ -0,0 +1,31 @@
+.outView{
+    background: #FFFFFF;
+    border-radius: 15px;
+    padding: 20rpx;
+    margin-top: 20rpx;
+}
+
+.title{
+    font-size: 30rpx;
+    font-weight: bold;
+}
+.item{
+    margin-top: 20rpx;
+    font-size: 28rpx;
+    color: #999999;
+}
+.price{
+    color: #ed569f;
+}
+.detail{
+    margin-top: 20rpx;
+    width: 190rpx;
+    height: 50rpx;
+    border: 2rpx solid #f0f0f0;
+    border-radius: 30rpx;
+
+    font-size: 26rpx;
+    line-height: 50rpx;
+    text-align: center;
+    color: #999999;
+}

+ 164 - 0
orderPages/activityList/module/mescrollUni-item.vue

@@ -0,0 +1,164 @@
+<template>
+	<!--
+    swiper中的transfrom会使fixed失效,此时用height固定高度;
+    swiper中无法触发mescroll-mixins.js的onPageScroll和onReachBottom方法,只能用mescroll-uni,不能用mescroll-body
+    -->
+	<!-- ref动态生成: 字节跳动小程序编辑器不支持一个页面存在相同的ref (如不考虑字节跳动小程序可固定值为 ref="mescrollRef") -->
+	<!-- top的高度等于悬浮菜单tabs的高度 -->
+	<mescroll-uni :ref="'mescrollRef' + i" @init="mescrollInit" :height="height" :down="downOption" @down="downCallback"
+		:up="upOption" @up="upCallback" @emptyclick="emptyClick">
+
+
+
+    <view class="flex-col justify-start">
+
+      <view class="flex-col justify-start outView" v-for="(i,index) in 10" :key="index">
+        <view class="title">
+          <text>活动名称活动名称活动名称活动名称活动名称</text>
+        </view>
+        <view class="flex-row justify-start item">
+          <text>活动价格:</text>
+          <text class="price">98.22元</text>
+        </view>
+        <view class="flex-row justify-start item">
+          <text>活动时间:</text>
+          <text>2024年8月10日 至 2099年10月1日</text>
+        </view>
+        <view class="flex-row justify-center">
+          <view class="detail" @click="goDetail">活动详情></view>
+        </view>
+      </view>
+
+    </view>
+
+	</mescroll-uni>
+</template>
+
+<script>
+import MescrollMixin from "@/uni_modules/mescroll-uni/components/mescroll-uni/mescroll-mixins.js";
+import MescrollMoreItemMixin from "@/uni_modules/mescroll-uni/components/mescroll-uni/mixins/mescroll-more-item.js"
+export default {
+	mixins: [MescrollMixin, MescrollMoreItemMixin], // 注意此处还需使用MescrollMoreItemMixin (必须写在MescrollMixin后面)
+	components: {
+	},
+
+	data() {
+		return {
+			showRemarkId:'',
+			downOption: {
+				auto: false // 不自动加载 (mixin已处理第一个tab触发downCallback)
+			},
+			upOption: {
+				auto: false, // 不自动加载
+				// page: {
+				// 	num: 0, // 当前页码,默认0,回调之前会加1,即callback(page)会从1开始
+				// 	size: 10 // 每页数据的数量
+				// },
+				noMoreSize: 4, //如果列表已无数据,可设置列表的总数量要大于半页才显示无更多数据;避免列表数据过少(比如只有一条数据),显示无更多数据会不好看; 默认5
+				empty: {
+					icon: '/static/imageIcon/empty.png',
+					tip: '暂无内容', // 提示
+					// btnText: '去看看'
+				},
+				textNoMore: '没有更多了'
+			},
+			list: [],
+		}
+	},
+	props: {
+		i: Number, // 每个tab页的专属下标 (除了支付宝小程序必须在这里定义, 其他平台都可不用写, 因为已在MescrollMoreItemMixin定义)
+		index: { // 当前tab的下标 (除了支付宝小程序必须在这里定义, 其他平台都可不用写, 因为已在MescrollMoreItemMixin定义)
+			type: Number,
+			default() {
+				return 0
+			}
+		},
+		dataTime: {
+			type: String,
+			default() {
+				return ''
+			}
+		},
+
+		tabs: { // 为了请求数据,演示用,可根据自己的项目判断是否要传
+			type: Array,
+			default() {
+				return []
+			}
+		},
+		height: [Number, String], // mescroll的高度
+
+	},
+	watch: {
+
+	},
+
+	created() {
+	},
+
+	methods: {
+
+    goDetail(){
+      uni.navigateTo({
+        url:'/orderPages/activityDetail/activityDetail'
+      })
+    },
+
+
+
+
+		/*下拉刷新的回调 */
+		downCallback() {
+			// 这里加载你想下拉刷新的数据, 比如刷新轮播数据
+			// loadSwiper();
+			// 下拉刷新的回调,默认重置上拉加载列表为第一页 (自动执行 page.num=1, 再触发upCallback方法 )
+			this.mescroll.resetUpScroll()
+		},
+		/*上拉加载的回调: 其中page.num:当前页 从1开始, page.size:每页数据条数,默认10 */
+		upCallback(page) {
+
+			//联网加载数据
+			let httpData = {
+				pageNum: page.num,
+				pageSize: 10,
+				type: this.index
+			}
+      this.mescroll.endSuccess(0, false);
+			// this.$api.getMyCouponList(httpData).then((res) => {
+			// 	//联网成功的回调,隐藏下拉刷新和上拉加载的状态;
+			// 	this.mescroll.endSuccess(res.data.rows.length, res.data.rows.length === 10);
+			// 	//设置列表数据
+			// 	if (page.num === 1) this.list = []; //如果是第一页需手动制空列表
+			// 	this.list = this.list.concat(res.data.rows); //追加新数据
+			// 	console.log(this.list)
+			// }).catch((err) => {
+			// 	//联网失败, 结束加载
+			// 	this.mescroll.endErr();
+			// })
+
+
+		},
+
+		//点击空布局按钮的回调
+		emptyClick() {
+			uni.showToast({
+				title: '点击了按钮,具体逻辑自行实现'
+			})
+		},
+		// 搜索
+		doSearch() {
+			this.list = []; // 先清空列表,显示加载进度
+			this.mescroll.resetUpScroll();
+		},
+
+		gotoUseCoupon(item){
+			console.log(item)
+		}
+
+	}
+}
+</script>
+<style>
+@import '/common/css/common.css';
+@import './index.rpx.css';
+</style>

+ 15 - 0
pages.json

@@ -177,6 +177,21 @@
 						"navigationBarTitleText": "服务对象",
 						"enablePullDownRefresh": false
 					}
+				},
+				{
+					"path" : "activityList/activityList",
+					"style" : 
+					{
+						"navigationBarTitleText" : "活动列表",
+						"enablePullDownRefresh": false
+					}
+				},
+				{
+					"path" : "activityDetail/activityDetail",
+					"style" : 
+					{
+						"navigationBarTitleText" : "活动详情"
+					}
 				}
 			]
 		},

+ 15 - 1
pages/index/index.vue

@@ -174,6 +174,16 @@
 									</view>
 								</view>
 							</view>
+              <view class="button-wrap">
+                <view @click="goActivity()" class="btn">
+                  <view class="icon">
+                    <u-icon name="/static/index/huodong.png" color="red" size="30"></u-icon>
+                  </view>
+                  <view class="name">
+                    活动中心
+                  </view>
+                </view>
+              </view>
 						</view>
 					</view>
 
@@ -379,7 +389,11 @@
 					url: '/pages/qrCode/index'
 				})
 			},
-
+      goActivity(){
+        uni.navigateTo({
+          url:'/orderPages/activityList/activityList'
+        })
+      },
 			goRights() {
 				uni.navigateTo({
 					url: '/storePages/rights/index'

TEMPAT SAMPAH
static/index/huodong.png