فهرست منبع

商城精油好物页面
商城活动首页页面
商城活动详情页面
商城活动报名页面

lkg 1 سال پیش
والد
کامیت
a206047e5c

+ 0 - 0
.idea/sonarlint/issuestore/f/a/fa288d1472d29beccb489a676f68739ad365fc47


+ 0 - 4
App.vue

@@ -6,7 +6,6 @@ const getConfigData = () => {
       .then((res) => {
         if (res.code == 200) {
           uni.setStorageSync("configs", res.data)
-          console.log("getConfig=>", res.data);
         }
       })
       .catch((err) => {
@@ -14,15 +13,12 @@ const getConfigData = () => {
 }
 export default {
   onLaunch: async (options) => {
-    console.log("App Launch");
     uni.hideTabBar()
     getConfigData()
   },
   onShow: function () {
-    console.log("App Show");
   },
   onHide: function () {
-    console.log("App Hide");
 		},
 	};
 </script>

+ 11 - 0
common/api/activity.js

@@ -0,0 +1,11 @@
+import request from '../utils/request.js'
+
+
+export const getActivityDetail = data => {
+    return request.get('/wechat/auth.activity/detail', data)
+}
+
+// 添加收藏
+export const getActivityList = data => {
+    return request.post('/wechat/auth.activity/activities', data)
+}

+ 0 - 7
common/utils/request.js

@@ -35,7 +35,6 @@ export default {
 			options.header['api-token'] = uni.getStorageSync('token')
 		}
 		options.timeout = 10000
-		console.log('options===', options)
 
 		uni.showLoading()
 		// 请求
@@ -58,7 +57,6 @@ export default {
 						if (data.code === 200) {
 							res(data)
 						} else if (data.code === 401) {
-							console.log('登陆已过期')
 							uni.removeStorageSync('userInfo')
 							uni.removeStorage({
 								key: 'token',
@@ -70,7 +68,6 @@ export default {
 							})
 							return rej(data)
 						} else if (data.code === 403) {
-							console.log('登陆已过期')
 							uni.removeStorageSync('userInfo')
 							uni.removeStorage({
 								key: 'token',
@@ -98,7 +95,6 @@ export default {
 							return rej(data)
 						}
 					} else if (statusCode == 401 || statusCode == 403 || statusCode == 204) {
-						console.log('登陆已过期')
 						// uni.removeStorageSync(`userInfo`)
 						// uni.removeStorage({
 						// 	key: `token`,
@@ -121,7 +117,6 @@ export default {
 					}
 				},
 				fail: error => {
-					console.log('error', error)
 					uni.hideLoading()
 					if (error.errMsg && error.errMsg.indexOf('fail timeout') != -1 || error
 						.errMsg && error.errMsg.indexOf('请求超时') != -1) {
@@ -218,7 +213,6 @@ export default {
 					if (res.statusCode === 200) {
 						result(message.data)
 					} else if (res.statusCode === 401) {
-						console.log(res)
 						uni.showToast({
 							title: message.msg,
 							icon: 'none'
@@ -234,7 +228,6 @@ export default {
 					}
 				},
 				fail: err => {
-					console.log(err)
 					uni.hideLoading()
 					reject(err)
 				}

+ 157 - 154
components/CommercePart.vue

@@ -1,18 +1,19 @@
 <template>
-	<view class="commerce-part">
-		<view class="main-content">
-			<view v-if="false" class="not-login-box">
-				<u-empty text="暂无搜索内容哦~"> </u-empty>
-			</view>
-			<view v-else class="activity-box">
-				<view class="activity-list" v-for="(item, index) in data" :key="index" @click="toDetail(item)">
-					<image :src="item.cover" mode="aspectFill"
+  <view class="commerce-part">
+    <view class="main-content">
+      <view v-if="false" class="not-login-box">
+        <u-empty text="暂无搜索内容哦~"></u-empty>
+      </view>
+      <view v-else class="activity-box">
+        <view class="activity-list" v-for="(item, index) in data" :key="index" @click="toDetail(item)">
+          <image :src="item.cover" mode="aspectFill"
                  style="width: 100%; height: 330rpx; border-radius: 20rpx 20rpx 0 0">
           </image>
-					<view class="list-content text-overflow2">
-            <view class="text-overflow-single mb5 mt10">{{ item.goods_name }}</view>
-            <view class="display-flex-between">
-              <text class="fs13 fw600 list-content-text2" style="color: #C29556;">¥{{ item.price_selling }}</text>
+          <view class="list-content text-overflow2">
+            <view class="text-overflow-single mb5 mt10 ml10" style="font-family: PingFang SC, PingFang SC;font-weight: 400;font-size: 28rpx;color: #333333;line-height: 40rpx;">{{ item.goods_name }}
+            </view>
+            <view class="display-flex-between .mr10 ">
+              <text class="fs13 fw600 list-content-text2 ml10" >¥{{ item.price_selling }}</text>
               <!--							<text class="text-through fs12 color-ca">¥{{item.price_market}}</text>-->
               <van-image
                   height="60rpx"
@@ -20,162 +21,164 @@
                   width="60rpx"
               />
             </view>
-					</view>
-				</view>
-				<view style="width: 100%">
-				</view>
-			</view>
-		</view>
-	</view>
+          </view>
+        </view>
+        <view style="width: 100%">
+        </view>
+      </view>
+    </view>
+  </view>
 </template>
 
 <script>
-	export default {
-		name: "CommercePart",
-		props: {
-			type: {
-				type: String,
-				default: "common",
-			},
-			data: {
-				type: Array,
-				default: () => {
-					return [];
-				},
-			},
-		},
-		data() {
-			return {
-				imageUrl: this.$C.imageUrl,
-				cateList: [],
-				cateCurrent: "",
-				sortCurrent: "",
-			};
-		},
-		watch: {
-			type: {
-				handler() {
-					if (this.type == "list") {
-						this.getCateList();
-					}
-				},
-				immediate: true,
-			},
-		},
-		mounted() {
-			if (this.$refs.cateItem) {
-				this.$refs.cateItem.top = "50px";
-				this.$refs.sortItem.top = "50px";
-			}
-		},
-		methods: {
-			cateChange(item, key) {
-				this[key] = item.id;
-				this.$refs.cateItem.show = false;
-				this.$refs.cateItem.setContentAnimate(0);
-				this.$refs.sortItem.show = false;
-				this.$refs.sortItem.setContentAnimate(0);
-				this.$emit("filterChange", {
-					cateids: this.cateCurrent,
-					sort: this.sortCurrent,
-				});
-			},
-			getCateList() {
-				uni.showLoading({
-					title: "加载中",
-				});
-				this.$api
-					.getGoodsCate()
-					.then((res) => {
-						uni.hideLoading();
-						if (res.code == 1) {
-							this.cateList = res.data;
-						}
-					})
-					.catch(() => {
-						uni.hideLoading();
-					});
-			},
-			toDetail(item) {
-				uni.navigateTo({
-					url: `../../subPages/goodsDetail/goodsDetail?code=${item.code}&type=${this.type}`
-				});
-			},
-		},
-	};
+export default {
+  name: "CommercePart",
+  props: {
+    type: {
+      type: String,
+      default: "common",
+    },
+    data: {
+      type: Array,
+      default: () => {
+        return [];
+      },
+    },
+  },
+  data() {
+    return {
+      imageUrl: this.$C.imageUrl,
+      cateList: [],
+      cateCurrent: "",
+      sortCurrent: "",
+    };
+  },
+  watch: {
+    type: {
+      handler() {
+        if (this.type == "list") {
+          this.getCateList();
+        }
+      },
+      immediate: true,
+    },
+  },
+  mounted() {
+    if (this.$refs.cateItem) {
+      this.$refs.cateItem.top = "50px";
+      this.$refs.sortItem.top = "50px";
+    }
+  },
+  methods: {
+    cateChange(item, key) {
+      this[key] = item.id;
+      this.$refs.cateItem.show = false;
+      this.$refs.cateItem.setContentAnimate(0);
+      this.$refs.sortItem.show = false;
+      this.$refs.sortItem.setContentAnimate(0);
+      this.$emit("filterChange", {
+        cateids: this.cateCurrent,
+        sort: this.sortCurrent,
+      });
+    },
+    getCateList() {
+      uni.showLoading({
+        title: "加载中",
+      });
+      this.$api
+          .getGoodsCate()
+          .then((res) => {
+            uni.hideLoading();
+            if (res.code == 1) {
+              this.cateList = res.data;
+            }
+          })
+          .catch(() => {
+            uni.hideLoading();
+          });
+    },
+    toDetail(item) {
+      uni.navigateTo({
+        url: `../../subPages/goodsDetail/goodsDetail?code=${item.code}&type=${this.type}`
+      });
+    },
+  },
+};
 </script>
 
 <style lang="scss" scoped>
-	.title-box {
-		padding: 30rpx 0;
-		display: flex;
-		justify-content: center;
-		align-items: center;
-	}
+.title-box {
+  padding: 30rpx 0;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+}
 
-	.tabs-box {
-		height: 90rpx;
-		background-color: #fff;
-		margin-bottom: 20rpx;
+.tabs-box {
+  height: 90rpx;
+  background-color: #fff;
+  margin-bottom: 20rpx;
 
-		::v-deep {
-			.u-dropdown__menu__item {
-				justify-content: flex-start;
-			}
-		}
-	}
+  ::v-deep {
+    .u-dropdown__menu__item {
+      justify-content: flex-start;
+    }
+  }
+}
 
-	.sort-content {
-		.sort-list {
-			height: 82rpx;
-			align-items: center;
-			padding: 0 20rpx;
-			border-top: 1rpx solid #e6e6e6;
-			font-size: 28rpx;
-			color: #595959;
+.sort-content {
+  .sort-list {
+    height: 82rpx;
+    align-items: center;
+    padding: 0 20rpx;
+    border-top: 1rpx solid #e6e6e6;
+    font-size: 28rpx;
+    color: #595959;
 
-			&-active {
-				color: #7856ff;
-				font-weight: bold;
-			}
-		}
-	}
+    &-active {
+      color: #7856ff;
+      font-weight: bold;
+    }
+  }
+}
 
-	.main-content {
-		// height: calc(100vh - 420rpx);
-		// overflow-y: auto;
-		// padding: 0 20rpx;
+.main-content {
+  // height: calc(100vh - 420rpx);
+  // overflow-y: auto;
+  // padding: 0 20rpx;
 
-		.activity-box {
-			display: flex;
-			flex-wrap: wrap;
-			justify-content: space-between;
+  .activity-box {
+    display: flex;
+    flex-wrap: wrap;
+    justify-content: space-between;
 
-			.activity-list {
-				width: calc(50% - 11rpx);
-				background-color: #fff;
-				border-radius: 20rpx;
-				margin-bottom: 22rpx;
-				padding-bottom: 30rpx;
-				font-size: 24rpx;
+    .activity-list {
+      width: calc(50% - 11rpx);
+      background-color: #fff;
+      border-radius: 20rpx;
+      margin-bottom: 22rpx;
+      padding-bottom: 30rpx;
+      font-size: 24rpx;
 
-				.list-title {
-					font-size: 30rpx;
-					padding: 0 16rpx 8rpx;
-				}
+      .list-title {
+        font-size: 30rpx;
+        padding: 0 16rpx 8rpx;
+      }
 
-				.list-content {
-          color: #2c2c2c;
-          padding: 10rpx16rpx0;
-          // display: flex;
-          .list-content-text2 {
-            font-family: D-DIN, D-DIN;
-            color: #C29556;
-            font-style: normal;
-            text-transform: none;
-          }
+      .list-content {
+        color: #2c2c2c;
+        padding: 10rpx16rpx0;
+        // display: flex;
+        .list-content-text2 {
+          font-family: D-DIN, D-DIN;
+          //font-weight: 400;
+          font-size: 28rpx;
+          color: #C29556;
+          //line-height: 30rpx;
+          text-transform: none;
         }
-			}
-		}
-	}
+      }
+    }
+  }
+}
 </style>

+ 1 - 2
components/tabbar/tabbar.vue

@@ -34,7 +34,7 @@ export default {
         },
         {
           id: 2,
-          pagePath: "pages/productCenter2/productCenter",
+          pagePath: "pages/activity/activity",
           text: "活动",
           iconPath: "../../static/hd-a.png",
           selectedIconPath: "../../static/hd-b.png"
@@ -63,7 +63,6 @@ export default {
     }
   },
   mounted() {
-    console.log("current==================》", this.current)
 
     // const configs = uni.getStorageSync("configs");
     // console.log("getConfigzj=>", configs);

+ 62 - 7
pages.json

@@ -61,17 +61,17 @@
 			}
 		},
 		{
-			"path": "pages/productCenter2/productCenter",
+			"path": "pages/activity/activity",
 			"style": {
 				"navigationBarTitleText": "活动",
 				"enablePullDownRefresh": false,
 				"navigationStyle": "custom",
 				"app-plus": {
-					// 将回弹属性关掉
 					"bounce": "none"
 				}
 			}
 		},
+
 		{
 			"path": "pages/searchList/index",
 			"style": {
@@ -124,6 +124,7 @@
 					"enablePullDownRefresh": false
 				}
 			},
+
 			{
 				"path": "afterSales/afterSales",
 				"style": {
@@ -147,6 +148,20 @@
 					"navigationBarTitleText": "商品详情"
 				}
 			},
+			{
+				"path": "activityDetail/activityDetail",
+				"style": {
+					"navigationBarTitleText": "活动详情",
+					"enablePullDownRefresh": false
+				}
+			},
+			{
+				"path": "activityDetail/activitySave",
+				"style": {
+					"navigationBarTitleText": "活动报名",
+					"enablePullDownRefresh": false
+				}
+			},
 			{
 				"path": "addAddress/addAddress",
 				"style": {
@@ -450,7 +465,7 @@
 				"selectedIconPath": "static/pd-b.png"
 			},
 			{
-				"pagePath": "pages/productCenter2/productCenter",
+				"pagePath": "pages/activity/activity",
 				"text": "活动",
 				"iconPath": "static/hd-a.png",
 				"selectedIconPath": "static/hd-b.png"
@@ -476,15 +491,55 @@
 		"fontSize": "13px",
 		"backgroundColor": "#F8F8F8",
 		"usingComponents": {
+			"van-action-sheet": "/wxcomponents/vant/dist/action-sheet/index",
+			"van-area": "/wxcomponents/vant/dist/area/index",
 			"van-button": "/wxcomponents/vant/dist/button/index",
-			"van-tab": "/wxcomponents/vant/dist/tab/index",
-			"van-row": "/wxcomponents/vant/dist/row/index",
+			"van-card": "/wxcomponents/vant/dist/card/index",
+			"van-cell": "/wxcomponents/vant/dist/cell/index",
+			"van-cell-group": "/wxcomponents/vant/dist/cell-group/index",
+			"van-checkbox": "/wxcomponents/vant/dist/checkbox/index",
+			"van-checkbox-group": "/wxcomponents/vant/dist/checkbox-group/index",
 			"van-col": "/wxcomponents/vant/dist/col/index",
+			"van-dialog": "/wxcomponents/vant/dist/dialog/index",
+			"van-field": "/wxcomponents/vant/dist/field/index",
+			"van-goods-action": "/wxcomponents/vant/dist/goods-action/index",
+			"van-goods-action-icon": "/wxcomponents/vant/dist/goods-action-icon/index",
+			"van-goods-action-button": "/wxcomponents/vant/dist/goods-action-button/index",
+			"van-icon": "/wxcomponents/vant/dist/icon/index",
+			"van-image": "/wxcomponents/vant/dist/image/index",
+			"van-loading": "/wxcomponents/vant/dist/loading/index",
+			"van-nav-bar": "/wxcomponents/vant/dist/nav-bar/index",
+			"van-notice-bar": "/wxcomponents/vant/dist/notice-bar/index",
+			"van-notify": "/wxcomponents/vant/dist/notify/index",
+			"van-panel": "/wxcomponents/vant/dist/panel/index",
+			"van-popup": "/wxcomponents/vant/dist/popup/index",
+			"van-progress": "/wxcomponents/vant/dist/progress/index",
+			"van-radio": "/wxcomponents/vant/dist/radio/index",
+			"van-radio-group": "/wxcomponents/vant/dist/radio-group/index",
+			"van-row": "/wxcomponents/vant/dist/row/index",
+			"van-search": "/wxcomponents/vant/dist/search/index",
+			"van-slider": "/wxcomponents/vant/dist/slider/index",
+			"van-stepper": "/wxcomponents/vant/dist/stepper/index",
+			"van-steps": "/wxcomponents/vant/dist/steps/index",
+			"van-submit-bar": "/wxcomponents/vant/dist/submit-bar/index",
+			"van-swipe-cell": "/wxcomponents/vant/dist/swipe-cell/index",
+			"van-switch": "/wxcomponents/vant/dist/switch/index",
+			"van-tab": "/wxcomponents/vant/dist/tab/index",
 			"van-tabs": "/wxcomponents/vant/dist/tabs/index",
+			"van-tabbar": "/wxcomponents/vant/dist/tabbar/index",
+			"van-tabbar-item": "/wxcomponents/vant/dist/tabbar-item/index",
+			"van-tag": "/wxcomponents/vant/dist/tag/index",
 			"van-toast": "/wxcomponents/vant/dist/toast/index",
-			"van-image": "/wxcomponents/vant/dist/image/index"
-			// 其他需要全局引入的组件
+			"van-transition": "/wxcomponents/vant/dist/transition/index",
+			"van-tree-select": "/wxcomponents/vant/dist/tree-select/index",
+			"van-datetime-picker": "/wxcomponents/vant/dist/datetime-picker/index",
+			"van-rate": "/wxcomponents/vant/dist/rate/index",
+			"van-collapse": "/wxcomponents/vant/dist/collapse/index",
+			"van-collapse-item": "/wxcomponents/vant/dist/collapse-item/index",
+			"van-picker": "/wxcomponents/vant/dist/picker/index",
+			"van-count-down": "/wxcomponents/vant/dist/count-down/index"
 		}
+
 		// "navigationStyle": "custom"
 	},
 	"condition": { //模式配置,仅开发期间生效

+ 355 - 0
pages/activity/activity.vue

@@ -0,0 +1,355 @@
+<template>
+  <view style="height: 100%; background: #F8F9FA;">
+    <van-nav-bar
+      title="活动"
+      left-arrow
+      @click-left="leftClick()"
+    />
+    <van-tabs :active="active" color="#C29556" title-active-color="#C29556" :duration="0.2" :ellipsis="false"  @change="onTabChange" >
+      <van-tab v-for="(item, index) in activityTypeList" :key="index" :title="item">
+        <view class="common-page"    >
+          <view class="huodong-ccontent" v-for="(item2, index2) in activityList" :key="index2"   @click="toDetail(item2)" v-if="active==index" >
+            <view :class="[getClass(item2)]" >{{item2.status_text}}</view>
+            <view class="huodong-ccontent-img">
+              <van-image
+                  class="huodongText2-img"
+                  height="264rpx"
+                  :src="item2.cover"
+                  width="650rpx"
+              />
+            </view>
+            <view class="activity-content">
+              <view class="activity-title">{{item2.name}}</view>
+              <view class="activity-date">
+                <van-image
+                    class="huodongText2-img"
+                    height="28rpx"
+                    src="/static/huodong-a.png"
+                    width="28rpx"
+                    style="display: flex;align-items: center;"
+                />
+                <span style="padding-left: 20rpx">{{item2.start_time}}</span>
+              </view>
+              <view class="activity-price">
+                <van-image
+                    class="huodongText2-img"
+                    height="28rpx"
+                    src="/static/huodong-b.png"
+                    width="28rpx"
+                    style="display: flex;align-items: center;"
+                />
+                <span style="padding-left: 20rpx">报名费:<span style="font-size: 32rpx;color: #C29556">¥{{item2.fee}}</span></span>
+              </view>
+              <!-- 替换为水平分割线 -->
+              <div class="horizontal-line"></div>
+              <view class="activity-stats-and-button">
+                <view class="activity-stats" v-if="item2.entry_max==0">
+                  已报名 {{item2.entry_num}} 名额 / 无限制
+                </view>
+                <view class="activity-stats" v-if="item2.entry_max!=0">
+                  已报名 {{item2.entry_num}} 名额 / 共 {{item2.entry_max}} 个名额
+                </view>
+                <button  class="activity-button" @click.stop="handleRegister(item2)" >立即报名</button>
+              </view>
+            </view>
+          </view>
+        </view>
+      </van-tab>
+    </van-tabs>
+    <tabbarCom current="2"></tabbarCom>
+    <van-toast id="van-toast"/>
+  </view>
+</template>
+
+<script>
+import tabbarCom from "@/components/tabbar/tabbar.vue";
+import { getConfigData } from '@/common/api/common.js';
+import {getActivityList} from "@/common/api/activity";
+import Toast from "../../wxcomponents/vant/dist/toast/toast";
+
+
+export default {
+  components: {
+    tabbarCom,
+  },
+  data() {
+    return {
+      page: 1,
+      pageSize: 10,
+      total: 0,
+      search: "",
+      sort: "",
+      cateid: "",
+      subCateId: '',
+      sortType: "",
+      data: [],
+      active: 0,
+      activityTypeList: [],
+      activityList: [],
+      progressPercentage: 24.01,
+      progressText: '24.01%',
+      enrolledCount: 23,
+      totalSlots: 100,
+    };
+  },
+
+  onLoad: function(option) {
+    const type = option.type || 0;
+    this.active = type * 1;
+
+    this.getConfigDatalist();
+    this.getActivityList();
+    console.log(this.activityTypeList);
+  },
+  onShow() {
+    this.$nextTick(() => {});
+  },
+
+  onReachBottom() {},
+  onShareAppMessage(res) {
+    let configs = uni.getStorageSync('configs') || {};
+    return {
+      title: configs.shop_share_title,
+      imageUrl: configs.shop_share_img,
+      path: `/pages/activity/activity`
+    };
+  },
+  onShareTimeline(res) {
+
+    let configs = uni.getStorageSync('configs') || {};
+    return {
+      title: configs.shop_share_title,
+      imageUrl: configs.shop_share_img,
+      path: `/pages/activity/activity`
+    };
+  },
+  computed: {},
+  watch: {},
+  methods: {
+    getConfigDatalist() {
+      getConfigData({ dict_id: 36 }).then(({ data }) => {
+        this.activityTypeList = data.reverse();
+        console.log(data);
+      });
+    },
+    toDetail(item) {
+      console.log("跳转到详情页");
+      uni.navigateTo({url: `/subPages/activityDetail/activityDetail?activityId=${item.id}`,})
+
+    },
+    getActivityList() {
+      getActivityList({ page: 1, pageSize: 9999, type: this.active +1}).then(({ data }) => {
+        this.activityList =data.list
+        console.log(data);
+      });
+    },
+    leftClick() {
+      uni.switchTab({
+        url: '/pages/home/index'
+      });
+    },
+    getClass(row) {
+      if (row.status == 1||row.status == 4){
+        return "status-tag-start"
+      }
+      return "status-tag"
+    },
+    handleRegister(item2) {
+      uni.navigateTo({url: `/subPages/activityDetail/activitySave?activityId=${ item2.id}`,})
+    },
+
+    onTabChange(event) {
+      console.log('Tab changed to:', event.detail.index);
+      this.active = event.detail.index; // 更新 active 的值
+      this.getActivityList();
+    }
+  },
+};
+</script>
+
+<style lang="scss" scoped>
+.common-page {
+  height: 100%;
+  padding: 30rpx;
+}
+
+.huodong-ccontent {
+  position: relative; /* 相对定位 */
+  height: 624rpx;
+  width: 690rpx;
+  padding: 0rpx;
+  margin:0 auto;
+  margin-bottom: 30rpx;
+  background: #FFFFFF;
+
+  border-radius: 16rpx 16rpx 16rpx 16rpx;
+  .status-tag{
+    position: absolute;
+    top: 0px; /* 距离父级元素顶部20px */
+    left: 0px; /* 距离父级元素左边20px */
+    z-index: 1;
+    width: 120rpx;
+    height: 40rpx;
+    background: #E1E1E1;
+    border-radius: 16rpx 0rpx 16rpx 0rpx;
+    font-family: 苹方, 苹方;
+    font-weight: 400;
+    font-size: 20rpx;
+    color: #888888;
+    line-height: 28rpx;
+    text-align: left;
+    font-style: normal;
+    text-transform: none;
+    display: flex;
+    align-items: center;
+    justify-content: center;
+  }
+  .status-tag-start{
+    position: absolute;
+    top: 0px; /* 距离父级元素顶部20px */
+    left: 0px; /* 距离父级元素左边20px */
+    z-index: 1;
+    width: 120rpx;
+    height: 40rpx;
+    background: #C29556;
+    border-radius: 16rpx 0rpx 16rpx 0rpx;
+    font-family: 苹方, 苹方;
+    font-weight: 400;
+    font-size: 20rpx;
+    color: #FFFFFF;
+    line-height: 28rpx;
+    text-align: left;
+    font-style: normal;
+    text-transform: none;
+    display: flex;
+    align-items: center;
+    justify-content: center;
+  }
+  .huodong-ccontent-img{
+    height: 284rpxrpx;
+    width: 690rpx;
+    padding-top: 20rpx;
+    padding-left: 20rpx;
+  }
+}
+
+.activity-content {
+  margin: 30rpx 0rpx 0rpx 30rpx;
+
+  .activity-title {
+    font-family: PingFang SC, PingFang SC;
+    font-weight: 400;
+    font-size: 28rpx;
+    color: #333333;
+    line-height: 40rpx;
+    text-align: left;
+    font-style: normal;
+    text-transform: none;
+    font-weight: bold;
+    margin-bottom: 10rpx;
+  }
+
+  .activity-date {
+    height: 44rpx;
+    font-weight: 400;
+    font-size: 28rpx;
+    color: #666666;
+    line-height: 40rpx;
+    text-align: left;
+    font-style: normal;
+    text-transform: none;
+    margin-bottom: 10rpx;
+    display: flex;
+    align-items: center;
+  }
+  .activity-price {
+    height: 44rpx;
+    font-weight: 400;
+    font-size: 24rpx;
+    color: #666666;
+    line-height: 40rpx;
+    text-align: left;
+    font-style: normal;
+    text-transform: none;
+    margin-bottom: 24rpx;
+    display: flex;
+    align-items: center;
+  }
+
+  .activity-stats-and-button {
+    display: flex;
+    align-items: center;
+    justify-content: space-between;
+    height: 128rpx;
+
+  }
+
+  .activity-stats {
+    width: 330rpx;
+    font-size: 24rpx;
+    color: #666666;
+  }
+
+  .activity-button {
+    width: 258rpx;
+    height: 68rpx;
+    background: linear-gradient( 315deg, #CA9359 0%, #E2B98E 100%);
+    border-radius: 292rpx 292rpx 292rpx 292rpx;
+    font-family: PingFang SC, PingFang SC;
+    font-weight: 400;
+    font-size: 28rpx;
+    color: #FFFFFF;
+    line-height: 36rpx;
+    text-align: center;
+    font-style: normal;
+    text-transform: none;
+    // 文字垂直居中
+    display: flex;
+    align-items: center;
+    justify-content: center;
+  }
+
+  /* 水平分割线 */
+  .horizontal-line {
+    width: 630rpx;
+    height: 0rpx;
+    border: 1rpx dashed #DDDDDD;
+    margin: 20rpx 0 0rpx 0;
+  }
+}
+
+/* 分割线样式 */
+.separator {
+  height: 1px;
+  background-color: #e0e0e0;
+  margin: 20rpx 0;
+}
+
+/* 定义 CSS 变量 */
+:root {
+  --nav-bar-icon-color: black;
+  --nav-bar-arrow-size: 16px;
+  --tab-font-size: 28rpx;
+}
+
+/* 确保 van-nav-bar 内部的内容能够正确适应新的高度 */
+/deep/ .van-nav-bar__title {
+  font-family: PingFang SC, PingFang SC !important;
+  font-weight: 400 !important;
+  font-size: 36rpx !important;
+  color: #333333 !important;
+  text-align: center;
+  // 加粗
+  // font-weight: bold;
+}
+/deep/ .van-nav-bar__content {
+  text-align: center;
+}
+
+/* 添加 van-tab 标题的字体大小样式 */
+/deep/ .van-tab__text {
+  font-family: PingFang SC, PingFang SC;
+  font-weight: 400;
+  font-size: 28rpx;
+}
+</style>

+ 0 - 1
pages/article/article.vue

@@ -15,7 +15,6 @@ export default {
     };
   },
   onLoad(options) {
-    console.log("options====>", options);
     uni.hideShareMenu({});
     if (options.id) {
       this.id = options.id;

+ 0 - 4
pages/home/index.vue

@@ -293,7 +293,6 @@ export default {
       return this.$U.getStorage("token");
     },
     mpCommonClass() {
-      console.log(this.$C)
       return this.$C.mpCommonClass || ''
     }
   },
@@ -335,7 +334,6 @@ export default {
   },
   onShareAppMessage(res) {
     if (res.from === 'button') { // 来自页面内分享按钮
-      console.log(res.target)
     }
     let userInfo = uni.getStorageSync('userInfo')
     userInfo = userInfo && JSON.parse(userInfo) || {}
@@ -353,7 +351,6 @@ export default {
   },
   onShareTimeline(res) {
     if (res.from === 'button') { // 来自页面内分享按钮
-      console.log(res.target)
     }
     let userInfo = uni.getStorageSync('userInfo')
     userInfo = userInfo && JSON.parse(userInfo) || {}
@@ -595,7 +592,6 @@ export default {
       });
     },
     toList(item) {
-      console.log("cateid=====>", item);
       uni.setStorageSync('currentCateid', item.id)
       uni.switchTab({
         url: `/pages/productCenter/productCenter?cateid=${item.id}`,

+ 0 - 1
pages/mine/index.vue

@@ -290,7 +290,6 @@
 		},
 		created() {
 			const configs = uni.getStorageSync("configs");
-			console.log("getConfigzj=>", configs);
 			if (configs) {
 				this.shopName = configs.shop_name
 				this.bgImg = configs.ucenter_bg

+ 72 - 73
pages/productCenter/filterBar.vue

@@ -6,39 +6,39 @@
 		      item.type,
 		      {
 		        active:
-		          selectType === item.type || (item.type === 'classify' && cateValue),
+		          selectType === item.type ,
 		      },
 		    ]" v-for="item in filterList" :key="item.type" @click="handleFilter(item)">
 				<view class="name">
 					{{ item.name }}
 				</view>
-				<u-icon v-if="item.type === 'classify'" name="grid" color="#767676"></u-icon>
 				<view v-if="item.type === 'price'" class="price-icon">
 					<u-icon name="arrow-up-fill" :size="7" :color="
-		          selectType === 'price' && priceType === 'asc' ? '#000' : '#767676'
+		          selectType === 'price' && priceType === 'asc' ? '#C79C53' : '#767676'
 		        "></u-icon>
 					<u-icon name="arrow-down-fill" :size="7" :color="
-		          selectType === 'price' && priceType === 'desc' ? '#000' : '#767676'
+		          selectType === 'price' && priceType === 'desc' ? '#C79C53' : '#767676'
 		        "></u-icon>
 				</view>
+        <view v-if="item.type === 'sales_num'" class="price-icon">
+          <u-icon name="arrow-up-fill" :size="7" :color="
+		          selectType === 'sales_num' && salesType === 'asc' ? '#C79C53' : '#767676'
+		        "></u-icon>
+          <u-icon name="arrow-down-fill" :size="7" :color="
+		          selectType === 'sales_num' && salesType === 'desc' ? '#C79C53' : '#767676'
+		        "></u-icon>
+        </view>
+        <view v-if="item.type === 'sales_num2'" class="price-icon">
+          <u-icon name="arrow-up-fill" :size="7" :color="
+		          selectType === 'sales_num2' && salesType2 === 'asc' ? '#C79C53' : '#767676'
+		        "></u-icon>
+          <u-icon name="arrow-down-fill" :size="7" :color="
+		          selectType === 'sales_num2' && salesType2 === 'desc' ? '#C79C53' : '#767676'
+		        "></u-icon>
+        </view>
+        <view class="div-a" v-if="item.type != 'sales_num2'"> </view>
 			</view>
 			<view class="mark-pop" v-show="showCatePop" @click="onClose"> </view>
-			<view class="cate-popup" ref="catePopRef" v-show="showCatePop">
-				<view class="cate-select-wrap">
-					<view :class="['cate-item', { active: cateValue === item.id }]" v-for="item in cateList"
-						:key="item.id" @click="onSelectCate(item)">
-						{{ item.name }}
-					</view>
-				</view>
-			</view>
-		</view>
-		<!-- 二级分类 -->
-		<view class="sub-cate">
-			<view class="sub-cate-list" :class="[subCateId === item.id ? 'sub-cate-active' : '']"
-				:style="{background:`${btn_color && subCateId === item.id ? btn_color : null}`}"
-				v-for="(item, index) in subCateList" @click="subCateHandler(item)" v-if="item.name">
-				<text>{{item.name}}</text>
-			</view>
 		</view>
 	</view>
 
@@ -55,6 +55,18 @@
 				type: [String, Number]
 			}
 		},
+    watch: {
+      currentCateId(newVal, oldVal) {
+        if (newVal){
+          if ("0"==newVal){
+            newVal=null
+          }
+          this.cateValue = newVal
+          this.currentCateId = newVal
+        }
+
+      }
+    },
 		data() {
 			return {
 				cateValue: "",
@@ -64,34 +76,29 @@
 				showCatePop: false,
 				selectType: "synthesis",
 				priceType: "asc",
+        salesType: "asc",
+        salesType2: "asc",
 				data: [],
 				filterList: [{
-						name: "综合",
+						name: "最新",
 						type: "synthesis",
 					},
-					{
-						name: "销量",
-						type: "sales_num",
-					},
 					{
 						name: "价格",
 						type: "price",
 					},
-					{
-						name: "分类",
-						type: "classify",
-					},
+          {
+            name: "销量",
+            type: "sales_num",
+          },
+          {
+            name: "人气",
+            type: "sales_num2",
+          },
 				],
 			};
 		},
 		computed: {
-			subCateList() {
-				const data = this.cateList.find(item => item.id == this.currentCateId)
-				return data ? [{
-					id: '',
-					name: '全部'
-				}].concat(data.sub) : []
-			}
 		},
 		created() {
 			this._getGoodCate();
@@ -105,32 +112,17 @@
 			this.cateValue = this.currentCateId
 		},
 		methods: {
-			subCateHandler(item) {
-				this.subCateId = item.id
-				this.$emit("change", {
-					sort: this.selectType === "synthesis" ? "" : this.selectType,
-					sortType: this.selectType === "price" ? this.priceType : "",
-					cateid: this.cateValue,
-					subCateId: this.subCateId
-				});
-			},
 			_getGoodCate() {
 				getGoodCate().then(({
 					data = []
 				}) => {
 					this.cateList = data;
-					console.log(99999, data)
 				});
 			},
 			handleFilter(item) {
-				if (item.type === "classify") {
-					console.log(8999, this.currentCateId)
-					this.showCatePop = !this.showCatePop;
-					if (this.showCatePop) {
-						this.cateValue = this.currentCateId
-					}
-					return;
-				}
+        if (!this.cateValue){
+          this.cateValue = this.currentCateId
+        }
 				if (this.showCatePop) {
 					this.onClose();
 				}
@@ -140,23 +132,22 @@
 				} else {
 					this.priceType = "asc";
 				}
+        if (item.type === "sales_num") {
+          this.salesType = this.salesType === "asc" ? "desc" : "asc";
+        } else {
+          this.salesType = "asc";
+        }
+        if (item.type === "sales_num2") {
+          this.salesType2 = this.salesType2 === "asc" ? "desc" : "asc";
+        } else {
+          this.salesType2 = "asc";
+        }
 				this.$emit("change", {
 					sort: this.selectType === "synthesis" ? "" : this.selectType,
 					sortType: this.selectType === "price" ? this.priceType : "",
 					cateid: this.cateValue,
 				});
 			},
-			onSelectCate(item) {
-				this.cateValue = this.cateValue === item.id ? "" : item.id;
-				this.subCateId = ''
-				this.$emit("change", {
-					sort: this.selectType === "synthesis" ? "" : this.selectType,
-					sortType: this.selectType === "price" ? this.priceType : "",
-					cateid: this.cateValue,
-					subCateId: this.subCateId
-				});
-				this.onClose();
-			},
 			onClose() {
 				this.showCatePop = false;
 			},
@@ -172,33 +163,33 @@
 		padding: 33rpx 0 30rpx 0;
 
 		.item {
+      position: relative;
 			display: flex;
 			justify-content: center;
 			align-items: center;
-			font-size: 24rpx;
-			font-weight: 500;
+      font-family: PingFang SC, PingFang SC;
+      font-weight: 400;
+      font-size: 28rpx;
 			color: #767676;
 			line-height: 34rpx;
-
+      width: 25%;
 			&.sales_num {
 				flex: 1;
-				margin-left: 20rpx;
 			}
 
 			&.price {
 				flex: 1;
-				margin-right: 20rpx;
 			}
 
 			&.synthesis,
+
 			&.classify {
-				padding: 0 24rpx;
 				flex-shrink: 0;
 			}
 
 			&.active {
 				font-weight: 600;
-				color: #000000;
+				color: #C79C53;
 			}
 
 			.price-icon {
@@ -214,6 +205,14 @@
 			height: 100vh;
 			background-color: rgba(0, 0, 0, 0.6);
 		}
+    .div-a {
+      position: absolute;
+      right: 0;
+      height: 100%;
+      width: 2rpx;
+      background: #EEEEEE;
+      border-radius: 0rpx 0rpx 0rpx 0rpx;
+    }
 
 		.cate-popup {
 			position: absolute;
@@ -268,4 +267,4 @@
 			color: #fff;
 		}
 	}
-</style>
+</style>

+ 84 - 19
pages/productCenter/productCenter.vue

@@ -1,15 +1,26 @@
 <template>
+  <view >
+    <view style="width:100%; height: 316rpx; margin-top: 25rpx; position: relative;">
+      <van-image src="/static/haowu-a.png" height="316rpx" width="750rpx"></van-image>
+      <view class="goods-list" style="position: absolute; top: 124rpx;">
+        <view class="goods-list-item" v-for="(item, index) in goodsList" :key="index"          @click="toggleSelect(index,item)">
+          <view style="height: 98rpx; display: flex; justify-content: center; align-items: center;" >
+            <image :style="[getStyles(index)]" :src="item.logo">
+            </image>
+          </view>
+          <view style="" :style="[getStylesText(index)]" >{{ item.name }}</view>
+        </view>
+      </view>
+    </view>
 	<view class="common-page">
-		<!-- <view class="search-box" @click="toSearchList">
 
-    </view> -->
-		<u-search v-model="search" bgColor="#fff" placeholder="请输入关键词"></u-search>
 		<FilterBar :currentCateId="cateid" @change="handleFilter" />
 		<view class="list-box">
 			<CommercePart :data="data"></CommercePart>
 		</view>
 		<tabbarCom current="1"></tabbarCom>
-	</view>
+  </view>
+  </view>
 </template>
 
 <script>
@@ -17,7 +28,7 @@
 	import CommercePart from "@/components/CommercePart.vue";
 	import FilterBar from "./filterBar.vue";
 	import {
-		getGoodList
+		getGoodList,getGoodCate
 	} from "@/common/api/good.js";
 	export default {
 		components: {
@@ -36,25 +47,23 @@
 				subCateId: '',
 				sortType: "",
 				data: [],
+        selectedIndexes: [],
+        goodsList: [],
 			};
 		},
+    onLoad() {
+      this.getGoodCate();
+    },
 		onShow() {
-			const currentCateid = uni.getStorageSync('currentCateid')
-			if (currentCateid) {
-				this.cateid = currentCateid
-			} else {
-				this.cateid = ""
-				this.$nextTick(() => {
-					this._getGoodList(true);
-				})
-			}
+      this.$nextTick(() => {
+        this._getGoodList(true);
+      })
 		},
 		onReachBottom() {
 			this._getGoodList();
 		},
 		onShareAppMessage(res) {
 			if (res.from === 'button') { // 来自页面内分享按钮
-				console.log(res.target)
 			}
 			let userInfo = uni.getStorageSync('userInfo')
 			userInfo = userInfo && JSON.parse(userInfo) || {}
@@ -71,9 +80,9 @@
 				path: `/pages/productCenter/productCenter${this.$stringPageOptions(params)}`
 			}
 		},
+
 		onShareTimeline(res) {
 			if (res.from === 'button') { // 来自页面内分享按钮
-				console.log(res.target)
 			}
 			let userInfo = uni.getStorageSync('userInfo')
 			userInfo = userInfo && JSON.parse(userInfo) || {}
@@ -135,13 +144,44 @@
 					this.total = data.page.total
 				});
 			},
+      toggleSelect(index,item) {
+        const indexInSelected = this.selectedIndexes.indexOf(index);
+        if (indexInSelected !== -1) {
+          this.selectedIndexes.splice(indexInSelected, 1); // 取消选中
+          this.cateid="0";
+        } else {
+          this.selectedIndexes=[]
+          this.selectedIndexes.push(index); // 选中
+          this.cateid=item.id;
+        }
+      },
+      getStyles(index) {
+        if (this.selectedIndexes.includes(index)) {
+          return {width: '96rpx', height: '96rpx',borderRadius: '96rpx' ,border: '1rpx solid #C79C53'}
+        }
+        return {width: '88rpx', height: '88rpx',borderRadius: '88rpx'}
+      },
+      getStylesText(index) {
+        if (this.selectedIndexes.includes(index)) {
+          return {color: '#333333',marginTop: "14rpx",fontWeight: 'bold'}
+        }
+        return {color: '#666666',marginTop: "14rpx"}
+      },
+      getGoodCate() {
+        getGoodCate().then(({
+                              data = []
+                            }) => {
+
+          // 只取前五个
+          this.goodsList = data.slice(0, 5);
+        });
+      },
 			handleFilter({
 				sort,
 				sortType,
 				cateid,
 				subCateId
 			}) {
-				console.log(cateid, subCateId)
 				this.sort = sort;
 				this.sortType = sortType;
 				this.cateid = cateid || "";
@@ -153,8 +193,33 @@
 
 <style lang="scss" scoped>
 	.common-page {
-		padding: 25rpx 20rpx;
+		padding: 0rpx 20rpx  25rpx 20rpx ;
 		height: 100vh;
-		background-color: $primary-bg-color;
+		background-color: #F8F9FA;
 	}
+
+  .goods-list {
+    display: flex;
+    width: 94%;
+    flex-wrap: wrap;
+    justify-content: flex-start;
+    background-color: transparent;
+    padding: 0 20rpx 0 20rpx;
+
+    &-item {
+      height: 138rpx;
+      width: 20%;
+      flex-shrink: 0;
+      text-align: center;
+      margin-bottom: 30rpx;
+      color: #1d161f;
+      font-family: PingFang SC, PingFang SC;
+      font-weight: 400;
+      font-size: 26rpx;
+      transition: width 0.3s, height 0.3s, border 0.3s; // 添加过渡效果
+    }
+
+
+  }
+
 </style>

+ 0 - 272
pages/productCenter2/filterBar.vue

@@ -1,272 +0,0 @@
-<template>
-  <view class="filterbar-box">
-    <view class="filterbar">
-      <view v-for="item in filterList" :key="item.type" :class="[
-		      'item',
-		      item.type,
-		      {
-		        active:
-		          selectType === item.type || (item.type === 'classify' && cateValue),
-		      },
-		    ]" @click="handleFilter(item)">
-        <view class="name">
-          {{ item.name }}
-        </view>
-        <u-icon v-if="item.type === 'classify'" color="#767676" name="grid"></u-icon>
-        <view v-if="item.type === 'price'" class="price-icon">
-          <u-icon :color="
-		          selectType === 'price' && priceType === 'asc' ? '#000' : '#767676'
-		        " :size="7" name="arrow-up-fill"></u-icon>
-          <u-icon :color="
-		          selectType === 'price' && priceType === 'desc' ? '#000' : '#767676'
-		        " :size="7" name="arrow-down-fill"></u-icon>
-        </view>
-      </view>
-      <view v-show="showCatePop" class="mark-pop" @click="onClose"></view>
-      <view v-show="showCatePop" ref="catePopRef" class="cate-popup">
-        <view class="cate-select-wrap">
-          <view v-for="item in cateList" :key="item.id"
-                :class="['cate-item', { active: cateValue === item.id }]" @click="onSelectCate(item)">
-            {{ item.name }}
-          </view>
-        </view>
-      </view>
-    </view>
-    <!-- 二级分类 -->
-    <view class="sub-cate">
-      <view v-for="(item, index) in subCateList" v-if="item.name"
-            :class="[subCateId === item.id ? 'sub-cate-active' : '']"
-            :style="{background:`${btn_color && subCateId === item.id ? btn_color : null}`}" class="sub-cate-list" @click="subCateHandler(item)">
-        <text>{{ item.name }}</text>
-      </view>
-    </view>
-  </view>
-
-</template>
-
-<script>
-import {
-  getGoodCate
-} from "@/common/api/good.js";
-
-export default {
-  name: 'FilterBar',
-  props: {
-    currentCateId: {
-      type: [String, Number]
-    }
-  },
-  data() {
-    return {
-      cateValue: "",
-      subCateId: '',
-      btn_color: "",
-      cateList: [],
-      showCatePop: false,
-      selectType: "synthesis",
-      priceType: "asc",
-      data: [],
-      filterList: [{
-        name: "综合",
-        type: "synthesis",
-      },
-        {
-          name: "销量",
-          type: "sales_num",
-        },
-        {
-          name: "价格",
-          type: "price",
-        },
-        {
-          name: "分类",
-          type: "classify",
-        },
-      ],
-    };
-  },
-  computed: {
-    subCateList() {
-      const data = this.cateList.find(item => item.id == this.currentCateId)
-      return data ? [{
-        id: '',
-        name: '全部'
-      }].concat(data.sub) : []
-    }
-  },
-  created() {
-    this._getGoodCate();
-
-    const configs = uni.getStorageSync('configs')
-    if (configs) {
-      this.btn_color = configs.btn_color
-    }
-  },
-  mounted() {
-    this.cateValue = this.currentCateId
-  },
-  methods: {
-    subCateHandler(item) {
-      this.subCateId = item.id
-      this.$emit("change", {
-        sort: this.selectType === "synthesis" ? "" : this.selectType,
-        sortType: this.selectType === "price" ? this.priceType : "",
-        cateid: this.cateValue,
-        subCateId: this.subCateId
-      });
-    },
-    _getGoodCate() {
-      getGoodCate().then(({
-                            data = []
-                          }) => {
-        this.cateList = data;
-        console.log(99999, data)
-      });
-    },
-    handleFilter(item) {
-      if (item.type === "classify") {
-        console.log(8999, this.currentCateId)
-        this.showCatePop = !this.showCatePop;
-        if (this.showCatePop) {
-          this.cateValue = this.currentCateId
-        }
-        return;
-      }
-      if (this.showCatePop) {
-        this.onClose();
-      }
-      this.selectType = item.type;
-      if (item.type === "price") {
-        this.priceType = this.priceType === "asc" ? "desc" : "asc";
-      } else {
-        this.priceType = "asc";
-      }
-      this.$emit("change", {
-        sort: this.selectType === "synthesis" ? "" : this.selectType,
-        sortType: this.selectType === "price" ? this.priceType : "",
-        cateid: this.cateValue,
-      });
-    },
-    onSelectCate(item) {
-      this.cateValue = this.cateValue === item.id ? "" : item.id;
-      this.subCateId = ''
-      this.$emit("change", {
-        sort: this.selectType === "synthesis" ? "" : this.selectType,
-        sortType: this.selectType === "price" ? this.priceType : "",
-        cateid: this.cateValue,
-        subCateId: this.subCateId
-      });
-      this.onClose();
-    },
-    onClose() {
-      this.showCatePop = false;
-    },
-  },
-};
-</script>
-
-<style lang="scss" scoped>
-.filterbar {
-  position: relative;
-  display: flex;
-  align-items: center;
-  padding: 33rpx0 30rpx0;
-
-  .item {
-    display: flex;
-    justify-content: center;
-    align-items: center;
-    font-size: 24rpx;
-    font-weight: 500;
-    color: #767676;
-    line-height: 34rpx;
-
-    &.sales_num {
-      flex: 1;
-      margin-left: 20rpx;
-    }
-
-    &.price {
-      flex: 1;
-      margin-right: 20rpx;
-    }
-
-    &.synthesis,
-    &.classify {
-      padding: 0 24rpx;
-      flex-shrink: 0;
-    }
-
-    &.active {
-      font-weight: 600;
-      color: #000000;
-    }
-
-    .price-icon {
-      margin-left: 4rpx;
-    }
-  }
-
-  .mark-pop {
-    position: absolute;
-    left: 0;
-    right: 0;
-    top: 100%;
-    height: 100vh;
-    background-color: rgba(0, 0, 0, 0.6);
-  }
-
-  .cate-popup {
-    position: absolute;
-    left: 0;
-    right: 0;
-    top: 100%;
-    background-color: #fff;
-  }
-
-  .cate-select-wrap {
-    padding: 20rpx10rpx40rpx;
-    display: flex;
-    flex-wrap: wrap;
-
-    .cate-item {
-      font-size: 24rpx;
-      border: 2rpxsolid #2979ff;
-      color: #2979ff;
-      padding: 4rpx28rpx;
-      margin: 10rpx;
-      border-radius: 72rpx;
-
-      &.active {
-        color: #fff;
-        background-color: #2979ff;
-      }
-    }
-  }
-}
-
-.sub-cate {
-  display: flex;
-  flex-wrap: wrap;
-
-  &-list {
-    width: 166rpx;
-    height: 55rpx;
-    font-size: 24rpx;
-    border-radius: 12rpx;
-    background-color: #fff;
-    color: #626262;
-    overflow: hidden;
-    line-height: 55rpx;
-    text-overflow: ellipsis;
-    text-align: center;
-    margin-right: 15rpx;
-    margin-bottom: 23rpx;
-  }
-
-  &-active {
-    background-color: #F39800;
-    color: #fff;
-  }
-}
-</style>

+ 0 - 161
pages/productCenter2/productCenter.vue

@@ -1,161 +0,0 @@
-<template>
-  <view class="common-page">
-    <!-- <view class="search-box" @click="toSearchList">
-
-    </view> -->
-    <u-search v-model="search" bgColor="#fff" placeholder="请输入关键词"></u-search>
-    <FilterBar :currentCateId="cateid" @change="handleFilter"/>
-    <view class="list-box">
-      <CommercePart :data="data"></CommercePart>
-    </view>
-    <tabbarCom current="2"></tabbarCom>
-  </view>
-</template>
-
-<script>
-import tabbarCom from "@/components/tabbar/tabbar.vue"
-import CommercePart from "@/components/CommercePart.vue";
-import FilterBar from "./filterBar.vue";
-import {
-  getGoodList
-} from "@/common/api/good.js";
-
-export default {
-  components: {
-    tabbarCom,
-    CommercePart,
-    FilterBar
-  },
-  data() {
-    return {
-      page: 1,
-      pageSize: 10,
-      total: 0,
-      search: "",
-      sort: "",
-      cateid: "",
-      subCateId: '',
-      sortType: "",
-      data: [],
-    };
-  },
-  onShow() {
-    const currentCateid = uni.getStorageSync('currentCateid')
-    if (currentCateid) {
-      this.cateid = currentCateid
-    } else {
-      this.cateid = ""
-      this.$nextTick(() => {
-        this._getGoodList(true);
-      })
-    }
-  },
-  onReachBottom() {
-    this._getGoodList();
-  },
-  onShareAppMessage(res) {
-    if (res.from === 'button') { // 来自页面内分享按钮
-      console.log(res.target)
-    }
-    let userInfo = uni.getStorageSync('userInfo')
-    userInfo = userInfo && JSON.parse(userInfo) || {}
-    let params = {}
-    if (userInfo.id) {
-      params = {
-        id: userInfo.id
-      }
-    }
-    let configs = uni.getStorageSync('configs') || {}
-    return {
-      title: configs.shop_share_title,
-      imageUrl: configs.shop_share_img,
-      path: `/pages/productCenter/productCenter${this.$stringPageOptions(params)}`
-    }
-  },
-  onShareTimeline(res) {
-    if (res.from === 'button') { // 来自页面内分享按钮
-      console.log(res.target)
-    }
-    let userInfo = uni.getStorageSync('userInfo')
-    userInfo = userInfo && JSON.parse(userInfo) || {}
-    let params = {}
-    if (userInfo.id) {
-      params = {
-        id: userInfo.id
-      }
-    }
-    let configs = uni.getStorageSync('configs') || {}
-    return {
-      title: configs.shop_share_title,
-      imageUrl: configs.shop_share_img,
-      path: `/pages/productCenter/productCenter${this.$stringPageOptions(params)}`
-    }
-  },
-  computed: {
-    getGoodListParam() {
-      return {
-        cateid: this.cateid,
-        subCateId: this.subCateId,
-        sort: this.sort,
-        sortType: this.sortType,
-        name: this.search,
-      }
-    }
-  },
-  watch: {
-    getGoodListParam() {
-      this._getGoodList(true);
-    },
-  },
-  methods: {
-    _getGoodList(initFlag) {
-      if (!initFlag) {
-        if (this.page * this.pageSize < this.total) {
-          this.page++
-        } else {
-          return
-        }
-      } else {
-        this.page = 1
-        this.total = 0
-        this.data = []
-      }
-      let params = {
-        cateid: this.cateid && this.subCateId ? this.subCateId : this.cateid,
-        sort: this.sort,
-        sortType: this.sortType,
-        page: this.page,
-        pageSize: this.pageSize,
-        goods_kind: "线上商品",
-        name: this.search,
-      }
-      getGoodList(params).then(({
-                                  data = {}
-                                }) => {
-        this.data = this.data.concat(data.list)
-        this.total = data.page.total
-      });
-    },
-    handleFilter({
-                   sort,
-                   sortType,
-                   cateid,
-                   subCateId
-                 }) {
-      console.log(cateid, subCateId)
-      this.sort = sort;
-      this.sortType = sortType;
-      this.cateid = cateid || "";
-      this.subCateId = subCateId || ''
-    },
-  },
-};
-</script>
-
-<style lang="scss" scoped>
-.common-page {
-  padding: 25rpx20rpx;
-  height: 100vh;
-  background-color: $primary-bg-color;
-}
-</style>

BIN
static/cart-b.png


BIN
static/haowu-a.png


BIN
static/hd-icon-a.png


BIN
static/hd-icon-b.png


BIN
static/hd-icon-c.png


BIN
static/hd-if-a.png


BIN
static/hd-if-b.png


BIN
static/hd-if-c.png


BIN
static/hd-time.png


BIN
static/huodong-a.png


BIN
static/huodong-b.png


BIN
static/tx-1.png


BIN
static/tx-2.png


BIN
static/tx-3.png


BIN
static/tx-4.png


+ 600 - 0
subPages/activityDetail/activityDetail.vue

@@ -0,0 +1,600 @@
+<template>
+  <view style="height: 100%; background: #F8F9FA;">
+    <van-image
+        class="huodongText2-img"
+        height="360rpx"
+        :src="activityInfo.pic"
+        width="100%"
+        style="display: flex;align-items: center;"
+    />
+    <view class="huodong-ccontent" >
+      <view class="activity-content">
+        <view class="activity-title">{{ activityInfo.name }}</view>
+        <view class="activity-price"><span style="font-size: 24rpx">¥&nbsp;</span>{{ activityInfo.fee }}</view>
+        <view class="activity-date">
+          <van-image
+              class="huodongText2-img"
+              height="28rpx"
+              src="/static/hd-time.png"
+              width="28rpx"
+              style="display: flex;align-items: center;"
+          />
+          <view class="activity-date-text">
+            距报名截止仅剩:
+          </view>
+          <van-count-down :time="entry_end" format="DD 天 HH 时 mm 分 ss 秒"/>
+        </view>
+        <view class="activity-start-time" style="margin-top: 40rpx;">
+          <van-image
+              height="28rpx"
+              src="/static/hd-if-a.png"
+              width="28rpx"
+              style="display: flex;align-items: center;"
+          />
+          <view style="margin-left: 16rpx; width: 100rpx;margin-right: 30rpx;">
+            活动时间
+          </view>
+          <view style="color: #444444;width: 474rpx">
+            {{ activityInfo.start_time }}&nbsp;到&nbsp;{{ activityInfo.end_time }}
+          </view>
+        </view>
+
+        <view class="activity-start-time" style="margin-top: 30rpx;">
+          <van-image
+              height="28rpx"
+              src="/static/hd-if-b.png"
+              width="28rpx"
+              style="display: flex;align-items: center;"
+          />
+          <view style="margin-left: 16rpx; width: 100rpx;margin-right: 30rpx;">
+            活动地点
+          </view>
+          <view style="color: #444444;width: 474rpx ">
+            {{ activityInfo.address }}
+          </view>
+        </view>
+        <view class="activity-describe" style="margin-top: 30rpx; ">
+          <van-image
+              height="28rpx"
+              src="/static/hd-if-c.png"
+              width="28rpx"
+          />
+          <view style="margin-left: 16rpx; width: 100rpx;margin-right: 30rpx;">
+            活动描述
+          </view>
+          <view style="color: #444444; width: 474rpx">
+            {{ activityInfo.remark }}
+          </view>
+        </view>
+      </view>
+    </view>
+    <view class="huodong-ccontent" style="height: 80rpx;display: flex;  position: relative; /* 相对定位 */">
+      <view>
+        <view class="baoming-num">
+          <span >{{activityInfo.entry_num}} </span> 人已报名
+        </view >
+        <view class="baoming-num2" v-if="activityInfo.entry_max>0">
+          剩余{{  entry_balance }}个名额
+        </view>
+        <view class="baoming-num2" v-else>
+          人数无限制
+        </view>
+      </view>
+      <view :style="[getStyles(index)]" v-for="(image, index) in remainingImages" :key="index">
+        <van-image
+            height="84rpx"
+            :src="image"
+            width="84rpx"
+            round
+        />
+      </view>
+
+    </view>
+    <view  class="activity-content-title">
+      活动介绍
+    </view>
+    <view   id="activity-content"  ref="activityContent" style="margin-bottom: 100rpx;width: 100%;" v-html="activityInfo.content">
+    </view>
+    <view  style="width: 100%;height: 65rpx" > </view>
+    <van-toast id="van-toast"/>
+    <view class="bottom-navigation">
+      <view class="bottom-navigation-div">
+        <view  style="width: 40rpx;margin-right: 30rpx"   @click="toJump( 1)" >
+          <van-image
+              height="36rpx"
+              src="/static/hd-icon-a.png"
+              width="36rpx"
+              style="display: flex;align-items: center;  justify-content: center;"
+          />
+          <span>
+            首页
+          </span>
+        </view>
+        <view style="width: 80rpx;margin-right: 30rpx" @click="toJump( 2)" >
+          <van-image
+              height="36rpx"
+              src="/static/hd-icon-b.png"
+              width="36rpx"
+              style="display: flex;align-items: center;  justify-content: center;"
+          />
+          <span>
+             报名信息
+          </span>
+        </view>
+        <view  style="width: 40rpx;position:relative"  open-type="contact">
+          <van-image
+              height="36rpx"
+              src="/static/hd-icon-c.png"
+              width="36rpx"
+              style="display: flex;align-items: center;  justify-content: center;"
+          />
+          <span>
+              客服
+          </span>
+          <button style="position: absolute;width: 100%;height: 100%;z-index: 999;opacity: 0;top:0;"
+                   open-type="contact" ></button>
+        </view>
+      </view>
+      <button  class="activity-button" @click="handleRegister">立即报名</button>
+    </view>
+  </view>
+
+</template>
+
+<script>
+import tabbarCom from "@/components/tabbar/tabbar.vue";
+import {getConfigData} from '@/common/api/common.js';
+import {getActivityDetail} from "@/common/api/activity";
+import Toast from "../../wxcomponents/vant/dist/toast/toast";
+
+
+export default {
+  components: {
+    tabbarCom,
+  },
+  data() {
+    return {
+      page: 1,
+      pageSize: 10,
+      total: 0,
+      search: "",
+      sort: "",
+      cateid: "",
+      subCateId: '',
+      sortType: "",
+      data: [],
+      active: 0,
+      activityTypeList: [],
+      activityId: 0,
+      progressPercentage: 24.01,
+      progressText: '24.01%',
+      enrolledCount: 23,
+      totalSlots: 100,
+      activityInfo: {},
+      entry_end: 0,
+      remainingImages: [],
+      entry_num:0,
+      entry_max:0,
+      entry_balance:0,
+    };
+  },
+
+  onLoad: function (option) {
+    this.activityId = option.activityId
+    this.getActivityDetail()
+    this.setImgWidth()
+
+
+  },
+  onShow() {
+    this.$nextTick(() => {
+    });
+  },
+  onReachBottom() {
+  },
+  onShareAppMessage(res) {
+    let params = {};
+    params = {
+      activityId: this.activityId
+    };
+    let configs = uni.getStorageSync('configs') || {};
+    return {
+      title: configs.shop_share_title,
+      imageUrl: configs.shop_share_img,
+      path: `/subPages/activityDetail/activityDetail${this.$stringPageOptions(params)}`
+    };
+  },
+  onShareTimeline(res) {
+    let params = {};
+    params = {
+      activityId: this.activityId
+    };
+    let configs = uni.getStorageSync('configs') || {};
+    return {
+      title: configs.shop_share_title,
+      imageUrl: configs.shop_share_img,
+      path: `/subPages/activityDetail/activityDetail${this.$stringPageOptions(params)}`
+    };
+  },
+  computed: {},
+  watch: {},
+  methods: {
+    getConfigDatalist() {
+      getConfigData({dict_id: 36}).then(({data}) => {
+        this.activityTypeList = data.reverse();
+      });
+    },
+    handleRegister() {
+      uni.navigateTo({url: `/subPages/activityDetail/activitySave?activityId=${ this.activityId}`,})
+    },
+    getActivityDetail() {
+      getActivityDetail({id: this.activityId}).then(({data}) => {
+        this.activityInfo = data
+        // 计算    activityInfo.entry_end  格式是2025-01-20 20:00:00这样的 到现在时间的时间戳 毫秒
+        const entryEnd = new Date(data.entry_end.replace(' ', 'T'));
+        this.entry_end = entryEnd.getTime();// 我想获取 现在到entryEnd时间戳
+        const now = new Date().getTime();
+        // 计算从现在到 entryEnd 的时间差(毫秒)
+        this.entry_end = entryEnd.getTime() - now;
+        this.entry_num = data.entry_num?data.entry_num:0
+        this.entry_max = data.entry_max?data.entry_max:0
+        this.entry_balance=this.entry_max-this.entry_num
+
+        if (data.entry_num&&data.entry_num>0){
+          if (data.entry_num>5){
+            this.entry_num=5
+          }else{
+            this.entry_num=data.entry_num
+          }
+          for (let i = 0; i < this.entry_num; i++) {
+            // 生成 1 到 4 之间的随机数
+            const randomNum = Math.floor(Math.random() * 4)+1
+            this.remainingImages.push("/static/tx-"+randomNum+".png");
+          }
+        }
+        // 修正 activityInfo.content 中的 src 属性值
+        if (this.activityInfo.content) {
+          this.activityInfo.content = this.activityInfo.content.replace(/\/apihttps:/g, 'https:');
+        }
+        // 修正 activityInfo.content 中的 src 属性值
+        if (this.activityInfo.content) {
+          this.activityInfo.content = this.activityInfo.content.replace(/\/apihttps:/g, 'https:');
+          // 使用正则表达式匹配和修改 img 标签的 style 属性
+          this.activityInfo.content = this.activityInfo.content.replace(/<img([^>]*)>/gi, (match, attributes) => {
+            // 检查是否已经存在 style 属性
+            if (attributes.includes('style')) {
+              // 如果存在 style 属性,添加 width: 100%;
+              return match.replace(/style="([^"]*)"/i, (styleMatch, styleContent) => {
+                if (!styleContent.includes('width: 100%')) {
+                  return `style="${styleContent}; width: 100%;"`;
+                }
+                return styleMatch;
+              });
+            } else {
+              // 如果不存在 style 属性,添加 style="width: 100%;"
+              return match.replace(/<img/i, '<img style="width: 100%;"');
+            }
+          });
+        }
+        // 确保在数据更新后调用 setImgWidth
+        this.$nextTick(() => {
+          this.setImgWidth();
+        });
+      });
+
+    },
+    setImgWidth() {
+      this.$nextTick(() => {
+        if (this.$refs.activityContent) {
+          const imgElements = this.$refs.activityContent.querySelectorAll('img');
+          imgElements.forEach(img => {
+            img.style.width = '100%';
+          });
+        } else {
+          console.log(this.$refs)
+        }
+      });
+    },
+    getStyles(index=0) {
+      let le =28
+      let  py=30
+      if (this.entry_num%2==1){
+        py+= 224/2-(84/2)-(le*Math.floor(this.entry_num / 2 ))-le/2
+      }else{
+        py+=224/2-(84/2)-(le*this.entry_num/2)
+      }
+      let right= index*le+py
+      var newVar = {
+        position: 'absolute',
+        width: '84rpx',
+        height: '84rpx',
+        borderRadius: '84rpx',
+        top: '30rpx',
+        right: right+'rpx',
+      };
+      return newVar
+    },
+    toJump( index) {
+      if(index==1){
+        uni.switchTab({
+          url:'/pages/home/index'
+        });
+      }
+
+    },
+  },
+};
+</script>
+
+<style lang="scss" scoped>
+.common-page {
+  height: 100%;
+  padding: 30rpx;
+}
+
+.huodong-ccontent {
+  position: relative; /* 相对定位 */
+  width: 650rpx;
+  padding: 0rpx;
+  margin: 30rpx auto;
+  margin-bottom: 0;
+  padding: 30rpx;
+  background: #FFFFFF;
+  border-radius: 16rpx 16rpx 16rpx 16rpx;
+
+  .baoming-num{
+    font-family: 苹方, 苹方;
+    font-weight: 400;
+    font-size: 24rpx;
+    color: #333333;
+    line-height: 32rpx;
+    font-style: normal;
+    text-transform: none;
+    span{
+      font-family: D-DIN, D-DIN;
+      font-weight: 700;
+      font-size: 36rpx;
+      color: #C29556;
+      line-height: 40rpx;
+      text-align: left;
+      font-style: normal;
+      text-transform: none;
+    }
+
+
+  }
+
+}
+.baoming-num2{
+  font-family: 苹方, 苹方;
+  font-weight: 400;
+  font-size: 24rpx;
+  color: #888888;
+  line-height: 32rpx;
+  text-align: center;
+  font-style: normal;
+  text-transform: none;
+}
+.remaining-seats-images {
+  display: flex;
+  gap: 10rpx;
+  position: absolute;
+  top: 30rpx;
+  right: 30rpx;
+}
+
+.activity-content {
+  margin-top: 30 rp;
+
+  .activity-title {
+    font-family: PingFang SC, PingFang SC;
+    font-weight: 400;
+    font-size: 32rpx;
+    color: #333333;
+    line-height: 40rpx;
+    text-align: left;
+    font-style: normal;
+    text-transform: none;
+    font-weight: bold;
+    margin-bottom: 16rpx;
+  }
+
+  .activity-date {
+    background: #F4F4F4;
+    border-radius: 16rpx 16rpx 16rpx 16rpx;
+    width: 630rpx;
+    height: 68rpx;
+    padding-left: 20rpx;
+    // 垂直居中
+    display: flex;
+    align-items: center;
+
+    &-text {
+      font-family: 苹方, 苹方;
+      font-weight: 400;
+      font-size: 24rpx;
+      color: #777777;
+      line-height: 36rpx;
+      text-align: center;
+      font-style: normal;
+      text-transform: none;
+      margin: 0 32rpx 0 24rpx;
+    }
+  }
+
+  .activity-start-time {
+    // 垂直居中
+    display: flex;
+    align-items: center;
+    width: 650rpx;
+    font-family: 苹方, 苹方;
+    font-weight: 400;
+    font-size: 24rpx;
+    color: #777777;
+    line-height: 36rpx;
+    font-style: normal;
+    text-transform: none;
+  }
+  .activity-describe {
+       // 垂直居中
+       display: flex;
+       width: 650rpx;
+       font-family: 苹方, 苹方;
+       font-weight: 400;
+       font-size: 24rpx;
+       color: #777777;
+       line-height: 36rpx;
+       font-style: normal;
+       text-transform: none;
+  }
+
+
+
+  .activity-price {
+    font-family: 苹方, 苹方;
+    font-weight: 400;
+    font-size: 36rpx;
+    color: #C29556;
+    line-height: 40rpx;
+    text-align: left;
+    font-style: normal;
+    text-transform: none;
+    margin-bottom: 30rpx;
+  }
+
+  .activity-stats-and-button {
+    display: flex;
+    align-items: center;
+    justify-content: space-between;
+    height: 128rpx;
+
+  }
+
+  .activity-stats {
+    width: 330rpx;
+    font-size: 24rpx;
+    color: #666666;
+  }
+
+
+
+  /* 水平分割线 */
+  .horizontal-line {
+    width: 630rpx;
+    height: 0rpx;
+    border: 1rpx dashed #DDDDDD;
+    margin: 20rpx 0 0rpx 0;
+  }
+}
+
+/* 分割线样式 */
+.separator {
+  height: 1px;
+  background-color: #e0e0e0;
+  margin: 20rpx 0;
+}
+
+.bottom-navigation{
+  position: fixed;
+  // 文字垂直居中
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  bottom: 0;
+  height: 100rpx;
+  width: calc(100% - 40rpx);
+  background: #FFFFFF;
+  box-shadow: 0rpx -2rpx 0rpx 0rpx #F1F3F6;
+  border-radius: 24rpx 24rpx 0rpx 0rpx;
+  border: 0rpx solid #979797;
+  padding: 20rpx 20rpx 68rpx 20rpx ;
+  &-div{
+    height: 76rpx;
+    width: 404rpx;
+    // 文字垂直居中
+    display: flex;
+    align-items: center;
+    padding-left: 30rpx;
+
+    span{
+      font-family: PingFang SC, PingFang SC;
+      font-weight: 400;
+      font-size: 20rpx;
+      color: #333333;
+      line-height: 32rpx;
+      text-align: left;
+      font-style: normal;
+      text-transform: none;
+    }
+
+  }
+
+
+  .activity-button {
+    width: 264rpx;
+    height: 80rpx;
+    background: linear-gradient(315deg, #CA9359 0%, #E2B98E 100%);
+    border-radius: 292rpx 292rpx 292rpx 292rpx;
+    font-family: PingFang SC, PingFang SC;
+    font-weight: 400;
+    font-size: 28rpx;
+    color: #FFFFFF;
+    line-height: 36rpx;
+    text-align: center;
+    font-style: normal;
+    text-transform: none;
+    // 文字垂直居中
+    display: flex;
+    align-items: center;
+    justify-content: center;
+  }
+}
+/* 设置 v-html 渲染的内容中的 img 标签宽度为 100% */
+[v-html] img {
+  width: 100%!important;
+}
+/* 定义 CSS 变量 */
+:root {
+  --nav-bar-icon-color: black;
+  --nav-bar-arrow-size: 16px;
+  --tab-font-size: 28rpx;
+}
+.activity-content-title {
+  margin: 30rpx auto;
+  width: 680rpx;
+  // 垂直居中
+  font-family: PingFang SC, PingFang SC;
+  font-weight: 400;
+  font-size: 28rpx;
+  color: #333333;
+  line-height: 40rpx;
+  font-style: normal;
+  text-transform: none;
+  margin-bottom: 20rpx;
+  // 加粗
+  font-weight: bold;
+}
+/* 确保 van-nav-bar 内部的内容能够正确适应新的高度 */
+/deep/ .van-nav-bar__title {
+  font-family: PingFang SC, PingFang SC !important;
+  font-weight: 400 !important;
+  font-size: 36rpx !important;
+  color: #333333 !important;
+  text-align: center;
+  // 加粗
+  // font-weight: bold;
+}
+
+/deep/ .van-nav-bar__content {
+  text-align: center;
+}
+#activity-content img{
+  width: 100%!important;
+}
+/* 添加 van-tab 标题的字体大小样式 */
+/deep/ .van-tab__text {
+  font-family: PingFang SC, PingFang SC;
+  font-weight: 400;
+  font-size: 28rpx;
+}
+</style>

+ 287 - 0
subPages/activityDetail/activitySave.vue

@@ -0,0 +1,287 @@
+<template>
+  <view style="height: 100%; background: #F8F9FA;">
+    <view class="huodong-ccontent" >
+      <view style=" height:144rpx;width:224rpx">
+        <van-image
+            height="144rpx"
+            :src="activityInfo.pic"
+            width="224rpx"
+        />
+      </view>
+      <view class="activity-content">
+        <view class="activity-title">{{activityInfo.name}}</view>
+        <view class="activity-date">
+          <span >{{activityInfo.start_time}}</span>
+
+        </view>
+        <view class="activity-price">
+          <span ><span style="font-size: 32rpx;color: #C29556">¥{{activityInfo.fee}}</span></span>
+        </view>
+
+      </view>
+
+    </view>
+    <view  class="activity-content-title">
+      活动介绍
+    </view>
+    <van-cell-group>
+      <van-field
+          v-model="formData.username"
+          label="姓名"
+          placeholder="请填写联系人姓名"
+          input-align="right"
+          @input="val => formData.username = val.detail"
+      />
+      <van-field
+          v-model="formData.mobile"
+          label="联系电话"
+          type="number"
+          placeholder="请填写电话号码"
+          input-align="right"
+          @input="val => formData.mobile = val.detail"
+      />
+      <van-cell title="报名人数" >
+        <template #default>
+          <van-stepper  v-model="formData.num" @change="onChangeStepper"/>
+        </template>
+      </van-cell>
+    </van-cell-group>
+    <van-toast id="van-toast"/>
+    <view class="bottom-navigation">
+      <view class="bottom-navigation-div">
+        应付款: <span>¥<span style="font-size: 40rpx;">{{ activityInfo.fee * formData.num}}</span></span>
+      </view>
+      <button  class="activity-button" @click="handleRegister">立即报名</button>
+    </view>
+  </view>
+</template>
+
+<script>
+import tabbarCom from "@/components/tabbar/tabbar.vue";
+import Toast from "../../wxcomponents/vant/dist/toast/toast";
+import {getActivityDetail} from "../../common/api/activity";
+
+
+export default {
+  components: {
+    tabbarCom,
+  },
+  data() {
+    return {
+      data: [],
+      activityId: 0,
+      activityInfo:{},
+      formData:{
+        mobile:"",
+        username:'',
+        num:1,
+      }
+
+
+    };
+  },
+
+  onLoad: function (option) {
+    this.activityId = option.activityId
+    this.getActivityDetail()
+  },
+  onShow() {
+    this.$nextTick(() => {
+    });
+  },
+  onReachBottom() {
+  },
+  onShareAppMessage(res) {
+    let params = {};
+    params = {
+      activityId: this.activityId
+    };
+    let configs = uni.getStorageSync('configs') || {};
+    return {
+      title: configs.shop_share_title,
+      imageUrl: configs.shop_share_img,
+      path: `/subPages/activityDetail/activityDetail${this.$stringPageOptions(params)}`
+    };
+  },
+  onShareTimeline(res) {
+    let params = {};
+    params = {
+      activityId: this.activityId
+    };
+    let configs = uni.getStorageSync('configs') || {};
+    return {
+      title: configs.shop_share_title,
+      imageUrl: configs.shop_share_img,
+      path: `/subPages/activityDetail/activityDetail${this.$stringPageOptions(params)}`
+    };
+  },
+  computed: {},
+  watch: {},
+  methods: {
+    getActivityDetail() {
+      getActivityDetail({id: this.activityId}).then(({data}) => {
+        this.activityInfo = data
+        console.log(this.activityId)
+        console.log(data)
+      });
+    },
+    handleRegister() {
+      if (!this.formData.username){
+        Toast('请输入姓名');
+      }
+      if (!this.formData.mobile){
+        Toast('请输入手机号');
+      }
+
+    },
+    onChangeStepper(event){
+      this.formData.num=event.detail
+    }
+
+  },
+};
+</script>
+
+<style lang="scss" scoped>
+.common-page {
+  height: 100%;
+  padding: 30rpx;
+}
+.bottom-navigation{
+  position: fixed;
+  // 文字垂直居中
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  bottom: 0;
+  height: 100rpx;
+  width: calc(100% - 40rpx);
+  background: #FFFFFF;
+  box-shadow: 0rpx -2rpx 0rpx 0rpx #F1F3F6;
+  border-radius: 24rpx 24rpx 0rpx 0rpx;
+  border: 0rpx solid #979797;
+  padding: 20rpx 20rpx 68rpx 20rpx ;
+  &-div{
+    height: 76rpx;
+    width: 404rpx;
+    // 文字垂直居中
+    font-family: PingFang SC, PingFang SC;
+    font-weight: 400;
+    font-size: 28rpx;
+    color: #333333;
+    line-height: 40rpx;
+    text-align: left;
+    font-style: normal;
+    text-transform: none;
+    display: flex;
+    align-items: center;
+    span{
+      font-family: PingFang SC, PingFang SC;
+      font-weight: 400;
+      font-size: 24rpx;
+      color: #C29556;
+      line-height: 32rpx;
+      text-align: left;
+      font-style: normal;
+      text-transform: none;
+    }
+
+  }
+
+
+  .activity-button {
+    width: 264rpx;
+    height: 80rpx;
+    background: linear-gradient(315deg, #CA9359 0%, #E2B98E 100%);
+    border-radius: 292rpx 292rpx 292rpx 292rpx;
+    font-family: PingFang SC, PingFang SC;
+    font-weight: 400;
+    font-size: 28rpx;
+    color: #FFFFFF;
+    line-height: 36rpx;
+    text-align: center;
+    font-style: normal;
+    text-transform: none;
+    // 文字垂直居中
+    display: flex;
+    align-items: center;
+    justify-content: center;
+  }
+}
+.activity-content-title {
+  margin: 30rpx auto;
+  width: 680rpx;
+  // 垂直居中
+  font-family: PingFang SC, PingFang SC;
+  font-weight: 400;
+  font-size: 32rpx;
+  color: #333333;
+  line-height: 40rpx;
+  text-align: left;
+  font-style: normal;
+  text-transform: none;
+
+}
+.huodong-ccontent {
+  position: relative; /* 相对定位 */
+  width: 650rpx;
+  padding: 0rpx;
+  margin: 30rpx auto;
+  margin-bottom: 0;
+  padding: 30rpx;
+  background: #FFFFFF;
+  border-radius: 16rpx 16rpx 16rpx 16rpx;
+  display: flex;
+  align-items: center;
+  .activity-content {
+    margin: 30rpx 0rpx 0rpx 30rpx;
+
+    .activity-title {
+      font-family: PingFang SC, PingFang SC;
+      font-weight: 400;
+      font-size: 28rpx;
+      color: #333333;
+      line-height: 40rpx;
+      text-align: left;
+      font-style: normal;
+      text-transform: none;
+      font-weight: bold;
+      margin-bottom: 10rpx;
+    }
+
+    .activity-date {
+      font-weight: 400;
+      font-size: 24rpx;
+      color: #666666;
+      line-height: 36rpx;
+      text-align: left;
+      font-style: normal;
+      text-transform: none;
+      margin-bottom: 10rpx;
+      display: flex;
+      align-items: center;
+    }
+    .activity-price {
+      height: 44rpx;
+      font-weight: 400;
+      font-size: 22rpx;
+      color: #666666;
+      line-height: 40rpx;
+      text-align: left;
+      font-style: normal;
+      text-transform: none;
+      margin-bottom: 24rpx;
+      display: flex;
+      align-items: center;
+    }
+
+
+
+
+
+
+  }
+
+}
+
+</style>

+ 2 - 2
subPages/goodsDetail/goodsDetail.vue

@@ -500,7 +500,7 @@
 				})
 			},
 			toAddCert() {
-				// 加入购物车	
+				// 加入购物车
 				if (!this.isUserRegister) {
 					this.showUserRegister = true
 					return
@@ -919,4 +919,4 @@
 			}
 		}
 	}
-</style>
+</style>