Kaynağa Gözat

活动报名详情页面 课程列表页面 课程详情页面 分包

lkg 11 ay önce
ebeveyn
işleme
419e78b40d

+ 15 - 0
common/api/activity.js

@@ -9,3 +9,18 @@ export const getActivityDetail = data => {
 export const getActivityList = data => {
     return request.post('/wechat/auth.activity/activities', data)
 }
+// 添加收藏
+export const addActivityEntry = data => {
+    return request.post('/wechat/auth.activity/entry', data)
+}
+
+
+export const getMyActivity = data => {
+    return request.get('/wechat/auth.activity/myActivity',data)
+}
+export const entryUpdate = data => {
+    return request.post('/wechat/auth.activity/entryUpdate', data)
+}
+
+
+

+ 10 - 0
common/api/course.js

@@ -0,0 +1,10 @@
+import request from '../utils/request.js'
+
+
+export const getCourseList = data => {
+    return request.get('/wechat/auth.activity/detail', data)
+}
+
+
+
+

+ 15 - 37
pages.json

@@ -41,6 +41,7 @@
 			}
 		},
 
+
 		{
 			"path": "pages/shoppingCart/shoppingCart",
 			"style": {
@@ -116,6 +117,13 @@
 					// "enablePullDownRefresh": false
 				}
 			},
+			{
+				"path": "course/course",
+				"style": {
+					"navigationBarTitleText": "课程列表",
+					"enablePullDownRefresh": false
+				}
+			},
 			{
 				"path": "orderDetail/orderDetail",
 				"style": {
@@ -148,6 +156,13 @@
 					"navigationBarTitleText": "商品详情"
 				}
 			},
+			{
+				"path": "courseDetail/courseDetail",
+				"style": {
+					"navigationBarTitleText": "课程详情",
+					"enablePullDownRefresh": false
+				}
+			},
 			{
 				"path": "activityDetail/activityDetail",
 				"style": {
@@ -491,56 +506,19 @@
 		"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-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-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": { //模式配置,仅开发期间生效
 		"current": 0, //当前激活的模式(list 的索引项)

+ 1 - 2
pages/activity/activity.vue

@@ -14,7 +14,7 @@
               <van-image
                   class="huodongText2-img"
                   height="264rpx"
-                  :src="item2.cover"
+                  :src="item2.pic"
                   width="650rpx"
               />
             </view>
@@ -65,7 +65,6 @@
 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 {

+ 28 - 15
pages/home/index.vue

@@ -44,7 +44,7 @@
             />
             <view style=" margin-top: 14rpx">芳香好物</view>
           </view>
-          <view class="goods-list-item" @click="jumpPage()">
+          <view class="goods-list-item" @click="jumpPage('xueyuan')">
             <van-image
                 height="136rpx"
                 src="/static/hd2.png"
@@ -53,7 +53,7 @@
             <view style=" margin-top: 14rpx"> 芳香学院</view>
           </view>
 
-          <view class="goods-list-item" @click="jumpPage()">
+          <view class="goods-list-item" @click="jumpPage('huodong')">
             <van-image
                 height="136rpx"
                 src="/static/hd3.png"
@@ -90,18 +90,18 @@
           />
         </view>
         <view class="content-box">
-          <view :style="{width: '95%', margin: '0rpx auto', height: '378rpx' ,borderRadius: '24rpx 24rpx 24rpx 24rpx',backgroundColor: '#F2FAF2'}"
-                @click="toHuodong()">
+          <view v-for="(item, index) in activityList" :key="index"  :style="{width: '95%', margin: '0rpx auto', height: '378rpx' ,borderRadius: '24rpx 24rpx 24rpx 24rpx',backgroundColor: '#F2FAF2'}"
+                @click="toHuodong(item)">
             <van-image
                 height="280rpx"
-                src="/static/hdlist1.png"
+                :src="item.pic"
                 width="100%"
             />
-            <view>
+            <view >
               <van-row>
                 <van-col span="16">
                   <view class="huodongText">
-                    芬芳小溪-健康生活态游园会
+                    {{ item.name }}
                   </view>
                 </van-col>
                 <van-col span="8">
@@ -113,7 +113,7 @@
                             height="28rpx"
                             src="/static/hdlist2.png" width="28rpx"
                         />
-                        500
+                        {{item.hits }}
                       </view>
                     </van-col>
                     <van-col span="12">
@@ -123,13 +123,12 @@
                             height="28rpx"
                             src="/static/hdlist3.png" width="28rpx"
                         />
-                        160
+                        {{item.entry_num }}
                       </view>
                     </van-col>
                   </van-row>
                 </van-col>
               </van-row>
-
             </view>
           </view>
           <view class="biaoti">
@@ -191,6 +190,7 @@ import {
 import {
   getNewsList
 } from "@/common/api/news.js";
+import {getActivityList} from "@/common/api/activity";
 import Toast from "wxcomponents/vant/dist/toast/toast";
 // 获取系统状态栏的高度
 let systemInfo = uni.getSystemInfoSync();
@@ -260,7 +260,8 @@ export default {
       prevData: [],
       advList: [],
       goods_class: [],
-      sourceBanner: []
+      sourceBanner: [],
+      activityList:[]
     };
   },
   computed: {
@@ -307,6 +308,7 @@ export default {
   },
   onLoad() {
     this.getBanner();
+    this.getActivityList();
     this.getNewsList();
   },
   onShow() {
@@ -402,16 +404,22 @@ export default {
         uni.switchTab({
           url: '/pages/productCenter/productCenter',
         })
+      } else if( type == "xueyuan"){
+        uni.navigateTo({url: `/subPages/course/course`,})
+      } else if( type == "huodong"){
+        uni.switchTab({
+              url: '/pages/activity/activity',
+         })
       } else {
         Toast('敬请期待');
       }
     },
 
-    toHuodong(type) {
-      Toast('敬请期待');
+    toHuodong(item) {
+      uni.navigateTo({url: `/subPages/activityDetail/activityDetail?activityId=${ item.id}`,})
     },
-    toKecheng(type) {
-      Toast('敬请期待');
+    toKecheng(item) {
+      uni.navigateTo({url: `/subPages/courseDetail/courseDetail?goods_code=${ item.code}`,})
     },
     bannerClick(index) {
       const currentUrl = this.sourceBanner[index].pic_url
@@ -482,6 +490,11 @@ export default {
         url: "/subPages/searchList/searchList",
       });
     },
+    getActivityList() {
+      getActivityList({ page: 1, pageSize: 1}).then(({ data }) => {
+        this.activityList =data.list
+      });
+    },
     getMsData() {
       uni.showLoading({
         title: "加载中",

+ 0 - 832
pages/home/index2.vue

@@ -1,832 +0,0 @@
-<template>
-  <view class="ps-wrapper">
-    <view id="headerBox" ref="headerBox" :class="[mpCommonClass]" :style="{
-        background: `url(${bgImg}) no-repeat center top`,
-        backgroundSize: '100% 400rpx',
-        backgroundColor: '#F7F7F7',
-      }" class="header-box">
-      <view>
-        <view :height=" '1225rpx'" class="banner-container">
-          <u-swiper :autoplay="true" :current="current" :height=" '1225rpx'" :list="bannerList" circular
-                    duration="1000" interval="5000" @change="(data) => (current = data.current)" @click="bannerClick">
-            <template #indicator>
-              <view class="custom-indicator">
-                <text v-for="item in bannerList.length" v-show="bannerList.length > 0" :key="item"
-                      :class="{ 'banner-active': item === current }" class="custom-indicator-item"></text>
-              </view>
-            </template>
-          </u-swiper>
-          <view class="logo-search-container">
-            <view class="centered-image">
-              <van-image
-                  :src="logoImg"
-                  fit="contain"
-                  height="16px"
-                  width="83px"
-              />
-            </view>
-            <view :style="{
-                width: '100%',
-                height: '100%',
-             }" class="search-box" @click="toSearchList">
-              <u-icon name="search" size="20"></u-icon>
-              <text>请输入关键词</text>
-            </view>
-          </view>
-        </view>
-        <!-- 商品分类 -->
-        <view class="goods-list">
-          <view class="goods-list-item" @click="">
-            <van-image
-                height="136rpx"
-                src="/static/hd1.png"
-                width="84rpx"
-            />
-            <view style=" margin-top: 14rpx">芳香好物</view>
-          </view>
-          <view class="goods-list-item" @click="">
-            <van-image
-                height="136rpx"
-                src="/static/hd2.png"
-                width="84rpx"
-            />
-            <view style=" margin-top: 14rpx"> 芳香学院</view>
-          </view>
-
-          <view class="goods-list-item" @click="">
-            <van-image
-                height="136rpx"
-                src="/static/hd3.png"
-                width="84rpx"
-            />
-            <view style=" margin-top: 14rpx"> 芳香活动</view>
-          </view>
-
-          <view class="goods-list-item" @click="">
-            <van-image
-                height="136rpx"
-                src="/static/hd5.png"
-                width="84rpx"
-            />
-            <view style=" margin-top: 14rpx"> 芳香生活
-            </view>
-          </view>
-
-          <view class="goods-list-item" @click="">
-            <van-image
-                height="136rpx"
-                src="/static/hd4.png"
-                width="84rpx"
-            />
-
-            <view style=" margin-top: 14rpx">陪伴营</view>
-          </view>
-        </view>
-        <view class="biaoti">
-          <van-image
-              height="85.94rpx"
-              src="/static/biaoti1.png"
-              width="171.3rpx"
-          />
-        </view>
-
-
-        <view class="content-box">
-          <view
-              :style="{width: '95%', margin: '0rpx auto', height: '378rpx' ,borderRadius: '24rpx 24rpx 24rpx 24rpx',backgroundColor: '#F2FAF2'}">
-            <van-image
-                height="280rpx"
-                src="/static/hdlist1.png"
-                width="100%"
-            />
-            <view>
-              <van-row>
-                <van-col span="16">
-                  <view class="huodongText">
-                    芬芳小溪-健康生活态游园会
-                  </view>
-                </van-col>
-                <van-col span="8">
-                  <van-row>
-                    <van-col span="12">
-                      <view class="huodongText2">
-                        <van-image
-                            class="huodongText2-img"
-                            height="28rpx"
-                            src="/static/hdlist2.png" width="28rpx"
-                        />
-                        500
-                      </view>
-                    </van-col>
-                    <van-col span="12">
-                      <view class="huodongText2">
-                        <van-image
-                            class="huodongText2-img"
-                            height="28rpx"
-                            src="/static/hdlist3.png" width="28rpx"
-                        />
-                        160
-                      </view>
-                    </van-col>
-                  </van-row>
-                </van-col>
-              </van-row>
-
-            </view>
-          </view>
-          <view class="biaoti">
-            <van-image
-                height="85.94rpx"
-                src="/static/biaoti2.png"
-                width="171.3rpx"
-            />
-          </view>
-          <view
-              :style="{width: '95%', margin: '0rpx auto'}">
-            <view style="width: 100%;">
-              <view style="margin-bottom: 24rpx">
-                <van-image
-                    height="200rpx"
-                    src="/static/kecheng1.png"
-                    width="100%"
-                />
-              </view>
-              <view style="margin-bottom: 24rpx">
-                <van-image
-                    height="200rpx"
-                    src="/static/kecheng2.png"
-                    width="100%"
-                />
-              </view>
-            </view>
-          </view>
-          <view class="biaoti">
-            <van-image
-                height="85.94rpx"
-                src="/static/biaoti3.png"
-                width="171.3rpx"
-            />
-          </view>
-          <view
-              :style="{width: '95%', margin: '0rpx auto'}">
-            <CommercePart :data="commonDataList"></CommercePart>
-            <!-- 赠品专区 -->
-            <image v-if="giftBanner.pic" :src="giftBanner.pic" mode="aspectFill"
-                   style="width: 100%; height: 206rpx" @click="toSubpages('giftZone')">
-            </image>
-          </view>
-        </view>
-      </view>
-    </view>
-    <tabbarCom current="0"></tabbarCom>
-  </view>
-
-</template>
-
-<script>
-import tabbarCom from "@/components/tabbar/tabbar.vue"
-import CommercePart from "@/components/CommercePart.vue";
-// import FlowPart from "@/components/FlowPart.vue";
-import {
-  goodsList
-} from "./config";
-import {
-  getBanner
-} from "@/common/api/home.js";
-import {
-  getNewsList
-} from "@/common/api/news.js";
-// 获取系统状态栏的高度
-let systemInfo = uni.getSystemInfoSync();
-let menuButtonInfo = {};
-// 如果是小程序,获取右上角胶囊的尺寸信息,避免导航栏右侧内容与胶囊重叠(支付宝小程序非本API,尚未兼容)
-// #ifdef MP-WEIXIN || MP-BAIDU || MP-TOUTIAO || MP-QQ
-menuButtonInfo = uni.getMenuButtonBoundingClientRect();
-// #endif
-export default {
-  components: {
-    tabbarCom,
-    CommercePart
-  },
-  data() {
-    return {
-      bgImg: '',
-      logoImg: '',
-      shopName: '',
-      shopShareImg: '',
-      ponitsBanner: {}, // 积分兑换
-      giftBanner: {}, // 赠品
-      partGoodsList: [],
-      msGoodsList: [],
-      bannerList: [],
-      topData: {
-        top: 0,
-        height: 0,
-      },
-      current: 0,
-      titleTabCurrentIndex: 0,
-      goodsList: goodsList,
-      imageUrl: this.$C.imageUrl,
-      userInfo: {},
-      keyword: "",
-      commonPage: {
-        pageNum: 1,
-        pageSize: 4,
-        total: 0,
-      },
-      flowPage: {
-        pageNum: 1,
-        pageSize: 4,
-        total: 0,
-      },
-      status: "loadmore",
-      filterData: {},
-      loadText: {
-        loadmore: "点击加载更多",
-        loading: "努力加载中",
-        nomore: "没有更多了",
-      },
-      selectedType: "",
-      activeTabStyle: {
-        fontSize: "36rpx",
-        fontWeight: "600",
-      },
-      mainHeightStyle: {},
-      mainHeight: "",
-      commonDataList: [],
-      flowDataList: [],
-      statusBarHeight: systemInfo.statusBarHeight,
-      menuButtonInfo: menuButtonInfo,
-      searchInputStyle: {
-        backgroundColor: "transparent",
-        color: "#1D161F",
-      },
-      prevData: [],
-      advList: [],
-      goods_hot: [],
-      sourceBanner: []
-    };
-  },
-  computed: {
-    // 导航栏内部盒子的样式
-    navbarInnerStyle() {
-      let style = {};
-      // 导航栏宽度,如果在小程序下,导航栏宽度为胶囊的左边到屏幕左边的距离
-      style.height = this.navbarHeight + "px";
-      // // 如果是各家小程序,导航栏内部的宽度需要减少右边胶囊的宽度
-      // #ifdef MP
-      let rightButtonWidth = systemInfo.windowWidth - menuButtonInfo.left;
-      style.marginRight = rightButtonWidth + "px";
-      // #endif
-      return style;
-    },
-    // 转换字符数值为真正的数值
-    navbarHeight() {
-      // #ifdef APP-PLUS || H5
-      return this.height ? this.height : 44;
-      // #endif
-      // #ifdef MP
-      // 小程序特别处理,让导航栏高度 = 胶囊高度 + 两倍胶囊顶部与状态栏底部的距离之差(相当于同时获得了导航栏底部与胶囊底部的距离)
-      // 此方法有缺陷,暂不用(会导致少了几个px),采用直接固定值的方式
-      // return menuButtonInfo.height + (menuButtonInfo.top - this.statusBarHeight) * 2;//导航高度
-      let height = systemInfo.platform == "ios" ? 44 : 48;
-      return this.height ? this.height : height;
-      // #endif
-    },
-    token() {
-      return this.$U.getStorage("token");
-    },
-    mpCommonClass() {
-      console.log(this.$C)
-      return this.$C.mpCommonClass || ''
-    }
-  },
-  watch: {
-    titleTabCurrentIndex() {
-      if (this.titleTabCurrentIndex == 0) {
-        this.getCommonData(true);
-      } else {
-        this.getFlowData(true);
-      }
-    },
-  },
-  onLoad() {
-    this.getBanner();
-    this.getNewsList();
-  },
-  onShow() {
-    uni
-        .createSelectorQuery()
-        .in(this)
-        .select("#headerBox")
-        .boundingClientRect((data) => {
-          let height = (data.height + 20) * 2 + "rpx";
-          this.mainHeight = `calc(100vh - ${height})`;
-        })
-        .exec();
-    const topData = uni.getMenuButtonBoundingClientRect();
-    this.topData.top = topData.top;
-    this.topData.height = topData.height;
-    if (this.token) {
-      this.userInfo = this.$U.getStorage("userInfo");
-    }
-
-    // this.getMsData()
-    // this.getCommonData(true);
-  },
-  onReachBottom() {
-    this.getCommonData();
-  },
-  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
-      }
-    }
-    return {
-      title: this.shopName,
-      path: `/pages/home/index${this.$stringPageOptions(params)}`,
-      imageUrl: this.shopShareImg,
-    }
-  },
-  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
-      }
-    }
-    return {
-      title: this.shopName,
-      imageUrl: this.shopShareImg,
-      path: `/pages/home/index${this.$stringPageOptions(params)}`
-    }
-  },
-  methods: {
-    toMsList() {
-      uni.navigateTo({
-        url: `/subPages/msGoodsList/msGoodsList`,
-      });
-    },
-    toMsDetail(item) {
-      // 秒杀详情
-      uni.navigateTo({
-        url: `/subPages/goodsDetail/goodsDetail?code=${item.id}&type=msGoods`,
-      });
-    },
-
-    toDetails(item) {
-      // 秒杀详情
-      uni.navigateTo({
-        url: `/subPages/goodsDetail/goodsDetail?code=${item.code}&type=common`,
-      });
-    },
-    toSubpages(type) {
-      if (type == "pointsZone") {
-        uni.navigateTo({
-          url: `/subPages/pointsZone/pointsZone?id=${this.ponitsBanner.pstn_id}`,
-        });
-      } else {
-        uni.navigateTo({
-          url: `/subPages/giftZone/giftZone?id=${this.giftBanner.pstn_id}`,
-        });
-      }
-    },
-    bannerClick(index) {
-      const currentUrl = this.sourceBanner[index].pic_url
-      if (currentUrl != '#') {
-        uni.navigateTo({
-          url: currentUrl
-        })
-      }
-    },
-    getBanner() {
-      getBanner().then((res) => {
-        const {
-          slider = [],
-          goods_hot = [],
-          goods_cate = [],
-          goods_new = [],
-          seckill_goods = [],
-          integral_page = [],
-          gifts_page = [],
-          shop_name,
-          shop_logo,
-          shop_share_img,
-          shop_bgimg
-        } = res.data;
-        const configs = uni.getStorageSync("configs");
-        console.log("getConfigzj=>", configs);
-        if (configs) {
-          this.logoImg = configs.shop_logo
-          this.bgImg = configs.shop_bgimg
-          this.shopName = configs.shop_share_title
-          this.shopShareImg = configs.shop_share_img
-        } else {
-          this.logoImg = shop_logo
-          this.bgImg = shop_bgimg
-          this.shopName = shop_name
-          this.shopShareImg = shop_share_img
-        }
-        this.bannerList = slider.map(item => item.pic);
-        this.sourceBanner = slider
-        console.log(23333, this.bannerList)
-        this.goodsList = goods_cate;
-        this.commonDataList = goods_new;
-        this.msGoodsList = seckill_goods;
-        this.goods_hot = goods_hot;
-        this.ponitsBanner = integral_page.length && integral_page[0];
-        this.giftBanner = gifts_page.length && gifts_page[0];
-        uni.setStorageSync('mpInfo', {
-          shopName: this.shopName,
-          shareImg: this.shopShareImg
-        })
-      });
-      // const data = {
-      // 	name: 'sliderread'
-      // };
-      // this.$api.getData(data)
-      // 	.then((res) => {
-      // 		uni.hideLoading();
-      // 		console.log("getBanner==>", res.data)
-      // 		if (res.data) {
-      // 			this.bannerList = res.data;
-      // 		} else {}
-      // 	})
-      // 	.catch(() => {
-      // 		uni.hideLoading();
-      // 	});
-    },
-    toSearchList() {
-      uni.navigateTo({
-        url: "/subPages/searchList/searchList",
-      });
-    },
-    getMsData() {
-      uni.showLoading({
-        title: "加载中",
-      });
-      this.$api
-          .getPSMsList()
-          .then((res) => {
-            uni.hideLoading();
-            // this.msGoodsList = res.data && res.data.list || []
-          })
-          .catch(() => {
-            uni.hideLoading();
-          });
-    },
-    getNewsList() {
-      getNewsList({
-        cid: 1,
-        page: 1,
-        pageSize: 100,
-      }).then(({
-                 data = {}
-               }) => {
-        this.advList = data.list || [];
-      });
-    },
-    getCommonData(initFlag) {
-      if (!initFlag) {
-        if (
-            this.commonPage.pageNum * this.commonPage.pageSize <
-            this.commonPage.total
-        ) {
-          this.commonPage.pageNum++;
-        } else {
-          return;
-        }
-      } else {
-        this.commonPage.pageNum = 1;
-        this.commonPage.total = 0;
-        this.commonDataList = [];
-      }
-      let sendData = {
-        limit: this.commonPage.pageSize,
-        page: this.commonPage.pageNum,
-      };
-      uni.showLoading({
-        title: "加载中",
-      });
-      this.$api
-          .getPSGoodsList(sendData)
-          .then((res) => {
-            uni.hideLoading();
-            if (res.code == 1) {
-              const {
-                list = [], page = {}
-              } = res.data;
-              this.commonDataList = this.commonDataList.concat(list);
-              this.commonPage.total = page.total;
-            }
-          })
-          .catch((err) => {
-            uni.hideLoading();
-          });
-    },
-    getFlowData(initFlag) {
-      if (!initFlag) {
-        if (
-            this.flowPage.pageNum * this.flowPage.pageSize <
-            this.flowPage.total
-        ) {
-          this.flowPage.pageNum++;
-        } else {
-          return;
-        }
-      } else {
-        this.flowPage.pageNum = 1;
-        this.flowPage.total = 0;
-        this.flowDataList = [];
-      }
-      let sendData = {
-        limit: this.flowPage.pageSize,
-        page: this.flowPage.pageNum,
-      };
-      uni.showLoading({
-        title: "加载中",
-      });
-      this.$api
-          .getFlowData(sendData)
-          .then((res) => {
-            uni.hideLoading();
-            if (res.code == 1) {
-              const {
-                list = [], page = {}
-              } = res.data;
-              this.flowDataList = this.flowDataList.concat(list);
-              this.flowPage.total = page.total;
-            }
-          })
-          .catch((err) => {
-            uni.hideLoading();
-          });
-    },
-    searchChange() {
-    },
-
-    toDetail(item) {
-      uni.navigateTo({
-        url: "../../subPages/commerceDetail/commerceDetail?id=" + item.id,
-      });
-    },
-    toList(item) {
-      console.log("cateid=====>", item);
-      uni.setStorageSync('currentCateid', item.id)
-      uni.switchTab({
-        url: `/pages/productCenter/productCenter?cateid=${item.id}`,
-      });
-    },
-    handleAdv(index) {
-      const activeAdv = this.advList[index];
-      uni.navigateTo({
-        url: `/pages/article/article?id=${activeAdv.id}`,
-      });
-    },
-  },
-};
-</script>
-
-<style lang="scss" scoped>
-.ps-wrapper {
-  background-color: $primary-bg-color;
-
-  .adv-box {
-    position: relative;
-    // padding: 0 33rpx 20rpx;
-    height: 64rpx;
-    background-color: white;
-    padding: 0 20rpx0;
-    border-radius: 16rpx;
-    margin: 40rpx0 20rpx;
-    font-weight: 500;
-
-    .adv-icon {
-      position: absolute;
-      left: 6rpx;
-      top: 50%;
-      transform: translateY(-50%);
-    }
-
-    ::v-deep {
-      .u-notice__left-icon {
-        width: 19px;
-
-        .u-icon__icon {
-          display: none;
-        }
-      }
-    }
-  }
-
-  .custom-indicator {
-    position: absolute;
-    left: 0rpx;
-    right: 0rpx;
-    bottom: 29rpx;
-    width: 712rpx;
-    display: flex;
-    margin: 0 20rpx0 20rpx;
-    flex-direction: row;
-    justify-content: center;
-    transform: translateX(-48rpx);
-
-    .custom-indicator-item {
-      width: 16rpx;
-      height: 16rpx;
-      margin: 0 6rpx;
-      border-radius: 12rpx;
-      background-color: #666666;
-    }
-
-    .banner-active {
-      width: 48rpx;
-      background-color: #222222;
-    }
-  }
-
-
-  .slot-wrap {
-    background-color: red;
-  }
-
-  .content-box {
-    // overflow-y: auto;
-    background-color: $primary-bg-color;
-    padding: 20rpx0 0;
-
-    .part-box {
-      background: linear-gradient(180deg, #fdd118 0%, #f7f7f7 100%);
-      border-radius: 10rpx10rpx10rpx10rpx;
-      padding: 18rpx14rpx;
-
-      .part-list {
-        display: flex !important;
-        flex-direction: row !important;
-        // justify-content: space-between;
-        background-color: #fff;
-        border-radius: 10rpx;
-        padding: 15rpx15rpx30rpx;
-        font-size: 24rpx;
-        color: #1d161f;
-        margin-top: 15rpx;
-
-        &-item {
-          width: calc(33% - 10rpx);
-          margin-right: 10rpx;
-        }
-      }
-    }
-  }
-
-  .header-box {
-    width: 100%;
-
-    .banner-container {
-      position: relative;
-      width: 100%;
-
-      .logo-search-container {
-        position: absolute;
-        top: 59px;
-        left: 0;
-        width: 100%;
-        display: flex;
-        justify-content: space-between;
-        align-items: center;
-        padding: 0 20rpx;
-        box-sizing: border-box;
-
-        .search-box {
-          margin: 0 auto 0rpx;
-          height: 61rpx;
-          background: rgba(255, 255, 255, 0.3);
-          border-radius: 30rpx;
-          opacity: 1;
-          display: flex;
-          align-items: center;
-          flex-direction: row;
-
-          text {
-            font-size: 24rpx;
-            font-family: PingFang SC-Regular, PingFang SC;
-            font-weight: 400;
-            color: #9D9D9D;
-            line-height: 61rpx;
-            margin-left: 11rpx;
-          }
-        }
-      }
-
-      .centered-image {
-        display: flex;
-        justify-content: center;
-        align-items: center;
-        height: 61rpx;
-      }
-    }
-
-    .content {
-      width: 100%;
-      z-index: 50;
-      // margin-top: -60rpx;s
-      .title-tab {
-        font-size: 34rpx;
-        color: #aca9af;
-        font-style: italic;
-        font-weight: 700;
-        margin-bottom: 26rpx;
-        padding: 0 20rpx;
-
-        &-item {
-          margin-right: 30rpx;
-        }
-
-        &-actived {
-          color: #000;
-        }
-      }
-    }
-  }
-
-
-  .goods-list {
-    display: flex;
-    flex-wrap: wrap;
-    justify-content: flex-start;
-    background-color: #FFFFFF;;
-    padding: 0 20rpx;
-    padding-top: 40rpx;
-
-    &-item {
-      width: 20%;
-      flex-shrink: 0;
-      text-align: center;
-      margin-bottom: 30rpx;
-      color: #1d161f;
-      font-size: 26rpx;
-    }
-  }
-
-  .biaoti {
-    width: 100%;
-    height: 180rpx;
-    display: flex;
-    justify-content: center;
-    align-items: center
-  }
-
-  .huodongText {
-    font-family: PingFang SC, PingFang SC;
-    font-weight: 400;
-    font-size: 26rpx;
-    color: #333333;
-    line-height: 36rpx; // 修正拼写错误
-    text-align: left; // 如果需要水平居中,可以改为 'center'
-    font-style: normal;
-    text-transform: none;
-    height: 98rpx;
-    display: flex; // 添加 flex 布局
-    align-items: center; // 垂直居中
-    margin-left: 30rpx; // 添加左边距
-  }
-
-  .huodongText2 {
-    font-family: PingFang SC, PingFang SC;
-    font-weight: 400;
-    font-size: 20rpx;
-    color: #666666;
-    height: 98rpx;
-    line-height: 28rpx;
-    text-align: left;
-    font-style: normal;
-    display: flex; // 添加 flex 布局
-    align-items: center; // 垂直居中
-    text-transform: none;
-
-    .huodongText2-img {
-      margin-right: 15rpx;
-      margin-left: 15rpx
-    }
-  }
-
-}
-</style>
-
-<style lang="scss">
-page {
-  height: 100vh;
-}
-</style>

+ 7 - 3
pages/productCenter/productCenter.vue

@@ -1,7 +1,7 @@
 <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>
+      <van-image :src="bgImg" 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;" >
@@ -49,6 +49,7 @@
 				data: [],
         selectedIndexes: [],
         goodsList: [],
+        bgImg:""
 			};
 		},
     onLoad() {
@@ -168,10 +169,13 @@
         return {color: '#666666',marginTop: "14rpx"}
       },
       getGoodCate() {
-        getGoodCate().then(({
+        let configs = uni.getStorageSync('configs') || {}
+        this.bgImg = configs.shop_bgimg
+
+        configs.btn_color = configs.btn_color || '#C79C53'
+        getGoodCate({goods_kind:"线上商品"}).then(({
                               data = []
                             }) => {
-
           // 只取前五个
           this.goodsList = data.slice(0, 5);
         });

BIN
static/baoming.png


BIN
static/biaoti1.png


BIN
static/biaoti2.png


BIN
static/biaoti3.png


BIN
static/haowu-a.png


BIN
static/hd-if-a.png


BIN
static/hd1.png


BIN
static/hd2.png


BIN
static/hd3.png


BIN
static/hd4.png


BIN
static/hd5.png


BIN
static/hdlist1.png


BIN
static/item_cart.png


BIN
static/miaoshu.png


BIN
static/order-bg.png


+ 27 - 9
subPages/activityDetail/activityDetail.vue

@@ -27,7 +27,7 @@
         <view class="activity-start-time" style="margin-top: 40rpx;">
           <van-image
               height="28rpx"
-              src="/static/hd-if-a.png"
+              src="/static/huodong-a.png"
               width="28rpx"
               style="display: flex;align-items: center;"
           />
@@ -54,11 +54,13 @@
           </view>
         </view>
         <view class="activity-describe" style="margin-top: 30rpx; ">
-          <van-image
-              height="28rpx"
-              src="/static/hd-if-c.png"
-              width="28rpx"
-          />
+          <bm-view style="height:28rpx;width:28rpx;padding-top: 5rpx; ">
+            <van-image
+                height="28rpx"
+                src="/static/hd-if-c.png"
+                width="28rpx"
+            />
+          </bm-view>
           <view style="margin-left: 16rpx; width: 100rpx;margin-right: 30rpx;">
             活动描述
           </view>
@@ -93,9 +95,9 @@
     <view  class="activity-content-title">
       活动介绍
     </view>
-    <view   id="activity-content"  ref="activityContent" style="margin-bottom: 100rpx;width: 100%;" v-html="activityInfo.content">
+    <view   id="activity-content"  ref="activityContent" style="width: 95%;margin: 0 auto;" v-html="activityInfo.content">
     </view>
-    <view  style="width: 100%;height: 65rpx" > </view>
+    <view  style="width: 100%;height: 165rpx" > </view>
     <van-toast id="van-toast"/>
     <view class="bottom-navigation">
       <view class="bottom-navigation-div">
@@ -176,6 +178,7 @@ export default {
       entry_num:0,
       entry_max:0,
       entry_balance:0,
+      is_entry:false,
     };
   },
 
@@ -225,6 +228,10 @@ export default {
       });
     },
     handleRegister() {
+      if (this.is_entry){
+        Toast.fail('您已报名,请勿重复报名');
+        return
+      }
       uni.navigateTo({url: `/subPages/activityDetail/activitySave?activityId=${ this.activityId}`,})
     },
     getActivityDetail() {
@@ -239,7 +246,12 @@ export default {
         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
-
+        this.activityInfo.start_time = (new Date(this.activityInfo.start_time.replace(' ', 'T'))).toISOString().slice(0, 16).replace('T', ' ');
+        this.activityInfo.end_time = (new Date(this.activityInfo.end_time.replace(' ', 'T'))).toISOString().slice(0, 16).replace('T', ' ');
+        this.activityInfo.entry_end = entryEnd.toISOString().slice(0, 16).replace('T', ' ');
+        if (data.entry_info != []&&data.entry_info.id) {
+          this.is_entry=true
+        }
         if (data.entry_num&&data.entry_num>0){
           if (data.entry_num>5){
             this.entry_num=5
@@ -319,6 +331,12 @@ export default {
         uni.switchTab({
           url:'/pages/home/index'
         });
+      }else if(index==2){
+        if (!this.is_entry){
+          Toast.fail('你暂未报名,无法查询报名信息!');
+          return
+        }
+        uni.navigateTo({url: `/subPages/activityDetail/activitySave?activityId=${ this.activityId}`,})
       }
 
     },

+ 78 - 20
subPages/activityDetail/activitySave.vue

@@ -1,11 +1,11 @@
 <template>
   <view style="height: 100%; background: #F8F9FA;">
     <view class="huodong-ccontent" >
-      <view style=" height:144rpx;width:224rpx">
+      <view style=" height:176rpx;width:176rpx">
         <van-image
-            height="144rpx"
-            :src="activityInfo.pic"
-            width="224rpx"
+            height="176rpx"
+            :src="activityInfo.cover"
+            width="176rpx"
         />
       </view>
       <view class="activity-content">
@@ -29,48 +29,60 @@
           v-model="formData.username"
           label="姓名"
           placeholder="请填写联系人姓名"
+          :readonly="is_entry&&MyActivityInfo.status==3"
           input-align="right"
-          @input="val => formData.username = val.detail"
+          @change="onChangeUsername"
       />
       <van-field
           v-model="formData.mobile"
+          :readonly="is_entry&&MyActivityInfo.status==3"
           label="联系电话"
           type="number"
           placeholder="请填写电话号码"
           input-align="right"
-          @input="val => formData.mobile = val.detail"
+          @change="onChangeMobiler"
       />
       <van-cell title="报名人数" >
         <template #default>
-          <van-stepper  v-model="formData.num" @change="onChangeStepper"/>
+          <van-stepper  v-model="formData.num" :disabled="is_entry"  @change="onChangeStepper"/>
         </template>
       </van-cell>
+      <van-cell title="报名时间"  v-if="is_entry" :value="activityInfo.entry_info.created_at"/>
     </van-cell-group>
     <van-toast id="van-toast"/>
     <view class="bottom-navigation">
-      <view class="bottom-navigation-div">
+      <view class="bottom-navigation-div" v-if="!is_entry">
         应付款: <span>¥<span style="font-size: 40rpx;">{{ activityInfo.fee * formData.num}}</span></span>
       </view>
-      <button  class="activity-button" @click="handleRegister">立即报名</button>
+      <view class="bottom-navigation-div" v-else-if="is_entry&&MyActivityInfo.status!=3">
+        应付款: <span>¥<span style="font-size: 40rpx;">{{ MyActivityInfo.amount_real}}</span></span>
+      </view>
+      <view class="bottom-navigation-div" v-else-if="is_entry&&MyActivityInfo.status==3">
+        已付款: <span>¥<span style="font-size: 40rpx;">{{ MyActivityInfo.amount_real}}</span></span>
+      </view>
+      <button  class="activity-button" v-if="!is_entry" @click="handleRegister">立即报名</button>
+      <button  class="activity-button" v-else-if="is_entry&&MyActivityInfo.status!=3" @click="handleEntryUpdate">修改报名信息</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";
+import {getActivityDetail,addActivityEntry,getMyActivity,entryUpdate} from "../../common/api/activity";
 
 
 export default {
   components: {
-    tabbarCom,
   },
   data() {
     return {
       data: [],
       activityId: 0,
       activityInfo:{},
+      MyActivityInfo:{},
+      is_entry:false,
+      entryId:0,
       formData:{
         mobile:"",
         username:'',
@@ -84,6 +96,8 @@ export default {
   onLoad: function (option) {
     this.activityId = option.activityId
     this.getActivityDetail()
+
+
   },
   onShow() {
     this.$nextTick(() => {
@@ -121,10 +135,26 @@ export default {
     getActivityDetail() {
       getActivityDetail({id: this.activityId}).then(({data}) => {
         this.activityInfo = data
-        console.log(this.activityId)
-        console.log(data)
+        this.activityInfo.start_time = (new Date(this.activityInfo.start_time.replace(' ', 'T'))).toISOString().slice(0, 16).replace('T', ' ');
+        this.activityInfo.end_time = (new Date(this.activityInfo.end_time.replace(' ', 'T'))).toISOString().slice(0, 16).replace('T', ' ');
+        this.activityInfo.entry_end = (new Date(this.activityInfo.entry_end.replace(' ', 'T'))).toISOString().slice(0, 16).replace('T', ' ');
+        if (data.entry_info != []&&data.entry_info.id) {
+          this.entryId=data.entry_info.id
+          this.is_entry=true
+          this.getMyActivity()
+        }
+      });
+    },
+    getMyActivity() {
+      getMyActivity({id:this.entryId}).then(({data}) => {
+        this.MyActivityInfo = data
+        this.formData.username=data.username
+        this.formData.mobile=data.mobile
+        this.formData.num=data.num
       });
     },
+
+
     handleRegister() {
       if (!this.formData.username){
         Toast('请输入姓名');
@@ -132,10 +162,43 @@ export default {
       if (!this.formData.mobile){
         Toast('请输入手机号');
       }
-
+      // 正则判断纯数字
+      if (!/^[0-9]*$/.test(this.formData.mobile)) {
+        Toast('手机号格式不正确');
+        return;
+      }
+      this.formData.id=this.activityId
+      addActivityEntry(this.formData).then(({data}) => {
+        Toast('报名成功');
+        this.getActivityDetail()
+      });
+    },
+    handleEntryUpdate() {
+      if (!this.formData.username){
+        Toast('请输入姓名');
+      }
+      if (!this.formData.mobile){
+        Toast('请输入手机号');
+      }
+      // 正则判断纯数字
+      if (!/^[0-9]*$/.test(this.formData.mobile)) {
+        Toast('手机号格式不正确');
+        return;
+      }
+      this.formData.id=this.entryId
+      entryUpdate(this.formData).then(({data}) => {
+        Toast('修改成功');
+        this.getActivityDetail()
+      });
     },
     onChangeStepper(event){
       this.formData.num=event.detail
+    },
+    onChangeMobiler(event){
+      this.formData.mobile=event.detail
+    },
+    onChangeUsername(event){
+      this.formData.username=event.detail
     }
 
   },
@@ -152,7 +215,6 @@ export default {
   // 文字垂直居中
   display: flex;
   align-items: center;
-  justify-content: center;
   bottom: 0;
   height: 100rpx;
   width: calc(100% - 40rpx);
@@ -276,10 +338,6 @@ export default {
     }
 
 
-
-
-
-
   }
 
 }

+ 239 - 0
subPages/course/course.vue

@@ -0,0 +1,239 @@
+<template>
+  <view style="height: 100%; background: #F8F9FA;">
+    <van-tabs :active="active" color="#C29556" title-active-color="#C29556" :duration="0.2" :ellipsis="false"  @change="onTabChange" >
+      <van-tab v-for="(item, index) in courseTypeList" :key="index" :name="item.id" :title="item.name">
+        <view class="common-page"    >
+          <view class="huodong-ccontent" v-for="(item2, index2) in courseList" :key="index2"   @click="toDetail(item2)" v-if="active==index" >
+            <view class="huodong-ccontent-img">
+              <van-image
+                  class="huodongText2-img"
+                  height="264rpx"
+                  :src="item2.cover"
+                  width="650rpx"
+              />
+            </view>
+            <view class="course-content">
+              <view class="course-title">{{item2.goods_name}}</view>
+              <view class="course-date">
+                <view style="padding-top: 7rpx;width:28rpx;height: 28rpx ">
+                  <van-image
+                      class="huodongText2-img"
+                      height="28rpx"
+                      src="/static/miaoshu.png"
+                      width="28rpx"
+                      style="display: flex;"
+                  />
+                </view>
+                <span style="padding: 0 20rpx">{{item2.remark}}</span>
+              </view>
+              <view class="course-price" style="position: relative;">
+                <view style="padding-top: 8rpx;width:28rpx;height: 28rpx ">
+                  <van-image
+                      class="huodongText2-img"
+                      height="28rpx"
+                      src="/static/baoming.png"
+                      width="28rpx"
+                      style="display: flex;"
+                  />
+                </view>
+                <span style="padding-left: 20rpx">已报名 &nbsp;{{item2.stock_sales}}</span>
+                <span style="position: absolute;right:20rpx;font-size: 22rpx;color:#333333;">¥<span style="font-size: 32rpx;font-weight: bold;">{{item2.price_selling}}</span></span>
+              </view>
+            </view>
+          </view>
+        </view>
+      </van-tab>
+    </van-tabs>
+    <van-toast id="van-toast"/>
+  </view>
+</template>
+
+<script>
+import {
+  getGoodList,getGoodCate
+} from "@/common/api/good.js";
+import Toast from "../../wxcomponents/vant/dist/toast/toast";
+
+
+export default {
+  components: {
+  },
+  data() {
+    return {
+      page: 1,
+      pageSize: 9999,
+      active: 0,
+      courseTypeList: [],
+      courseList: [],
+      GoodCateId:0,
+    };
+  },
+
+  onLoad: function(option) {
+    const type = option.type || 0;
+    this.active = type * 1;
+
+    this.getGoodCate();
+    this.getGoodList();
+    console.log(this.courseTypeList);
+  },
+  onShow() {
+    this.$nextTick(() => {});
+  },
+
+  onReachBottom() {},
+  onShareAppMessage(res) {
+    let configs = uni.getStorageSync('configs') || {};
+    return {
+      title: configs.shop_share_title,
+      imageUrl: configs.shop_share_img,
+      path: `/subPages/course/course`
+    };
+  },
+  onShareTimeline(res) {
+    let configs = uni.getStorageSync('configs') || {};
+    return {
+      title: configs.shop_share_title,
+      imageUrl: configs.shop_share_img,
+      path: `/subPages/course/course`
+    };
+  },
+  computed: {},
+  watch: {},
+  methods: {
+    getGoodCate() {
+      getGoodCate({ goods_kind:"课程商品" }).then(({ data }) => {
+        this.courseTypeList = data;
+
+      });
+    },
+    toDetail(item) {
+      console.log("跳转到详情页");
+      uni.navigateTo({url: `/subPages/courseDetail/courseDetail?goods_code=${item.code}`,})
+
+    },
+    getGoodList() {
+      getGoodList({ page: this.page, pageSize: this.pageSize, cateid: this.GoodCateId, goods_kind:"课程商品" }).then(({ data }) => {
+        this.courseList =data.list
+        console.log(data);
+      });
+    },
+    leftClick() {
+      uni.switchTab({
+        url: '/pages/home/index'
+      });
+    },
+
+
+
+    onTabChange(event) {
+      console.log(event.detail)
+      this.active = event.detail.index; // 更新 active 的值
+      this.GoodCateId = event.detail.name; // 更新 active 的值
+      this.getGoodList();
+    }
+  },
+};
+</script>
+
+<style lang="scss" scoped>
+.common-page {
+  height: 100%;
+  padding: 30rpx;
+}
+
+.huodong-ccontent {
+  position: relative; /* 相对定位 */
+  width: 690rpx;
+  padding: 0rpx;
+  margin:0 auto;
+  margin-bottom: 30rpx;
+  background: #FFFFFF;
+  padding-bottom: 20rpx;
+  border-radius: 16rpx 16rpx 16rpx 16rpx;
+
+  .huodong-ccontent-img{
+    height: 284rpxrpx;
+    width: 690rpx;
+    padding-top: 20rpx;
+    padding-left: 20rpx;
+  }
+}
+
+.course-content {
+  margin: 30rpx 0rpx 0rpx 30rpx;
+
+  .course-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: 16rpx;
+  }
+
+  .course-date {
+    font-family: 苹方, 苹方;
+    font-size: 26rpx;
+    color: #666666;
+    line-height: 40rpx;
+    text-align: left;
+    font-style: normal;
+    text-transform: none;
+    font-weight: 400;
+    margin-bottom: 10rpx;
+    display: flex;
+  }
+  .course-price {
+    height: 44rpx;
+    font-weight: 400;
+    font-size: 24rpx;
+    color: #666666;
+    line-height: 40rpx;
+    text-align: left;
+    font-style: normal;
+    text-transform: none;
+    display: flex;
+    //align-items: center;
+  }
+}
+
+/* 分割线样式 */
+.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>

+ 425 - 0
subPages/courseDetail/courseDetail.vue

@@ -0,0 +1,425 @@
+<template>
+  <view style="height: 100%; background: #F8F9FA;">
+    <van-image
+        class="huodongText2-img"
+        height="360rpx"
+        :src="courseInfo.cover"
+        width="100%"
+        style="display: flex;align-items: center;"
+    />
+    <view class="huodong-ccontent" >
+      <view class="course-content">
+        <view class="course-title">{{ courseInfo.goods_name }}</view>
+        <view class="course-date">
+          <view style="padding-top: 7rpx;width:28rpx;height: 28rpx ">
+            <van-image
+                class="huodongText2-img"
+                height="28rpx"
+                src="/static/miaoshu.png"
+                width="28rpx"
+                style="display: flex;"
+            />
+          </view>
+          <span style="padding: 0 20rpx">{{courseInfo.remark}}</span>
+        </view>
+        <view class="course-price" style="position: relative;">
+          <span style="font-size: 24rpx; color: #C29556;">¥&nbsp;</span><span style="font-size: 36rpx;color: #C29556;">{{courseInfo.price_selling}}</span>
+          <view style="position: absolute;right:0rpx;font-size: 22rpx;color:#888888;  display: flex;">
+            <view style="padding-top: 8rpx;width:28rpx;height: 28rpx ">
+              <van-image
+                  class="huodongText2-img"
+                  height="28rpx"
+                  src="/static/baoming.png"
+                  width="28rpx"
+                  style="display: flex;"
+              />
+            </view>
+            <span style="padding-left: 20rpx;"> &nbsp;{{courseInfo.stock_sales}}&nbsp;人已学习</span>
+          </view>
+        </view>
+
+      </view>
+    </view>
+    <view  class="course-content-title">
+      课程介绍
+    </view>
+    <view   id="course-content"  ref="courseContent" style="width: 95%;margin: 0 auto;" v-html="courseInfo.content">
+    </view>
+    <view  style="width: 100%;height: 165rpx" > </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: 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="course-button" @click="handleRegister">立即报名</button>
+    </view>
+  </view>
+
+</template>
+
+<script>
+import {getConfigData} from '@/common/api/common.js';
+
+import Toast from "../../wxcomponents/vant/dist/toast/toast";
+import {getGoodsDetail} from "../../common/api";
+
+
+export default {
+  components: {},
+  data() {
+    return {
+      page: 1,
+      pageSize: 10,
+      courseTypeList: [],
+      goods_code: 0,
+      courseInfo: {},
+      entry_end: 0,
+      remainingImages: [],
+      entry_num:0,
+      entry_max:0,
+      entry_balance:0,
+      is_entry:false,
+    };
+  },
+
+  onLoad: function (option) {
+    this.goods_code = option.goods_code
+    this.getCourseDetail()
+    this.setImgWidth()
+  },
+  onShow() {
+    this.$nextTick(() => {
+    });
+  },
+  onReachBottom() {
+  },
+  onShareAppMessage(res) {
+    let params = {};
+    params = {
+      goods_code: this.goods_code
+    };
+    let configs = uni.getStorageSync('configs') || {};
+    return {
+      title: configs.shop_share_title,
+      imageUrl: configs.shop_share_img,
+      path: `/subPages/courseDetail/courseDetail${this.$stringPageOptions(params)}`
+    };
+  },
+  onShareTimeline(res) {
+    let params = {};
+    params = {
+      goods_code: this.goods_code
+    };
+    let configs = uni.getStorageSync('configs') || {};
+    return {
+      title: configs.shop_share_title,
+      imageUrl: configs.shop_share_img,
+      path: `/subPages/courseDetail/courseDetail${this.$stringPageOptions(params)}`
+    };
+  },
+  computed: {},
+  watch: {},
+  methods: {
+    getConfigDatalist() {
+      getConfigData({dict_id: 36}).then(({data}) => {
+        this.courseTypeList = data.reverse();
+      });
+    },
+    handleRegister() {
+      Toast('敬请期待');
+      // if (this.is_entry){
+      //   Toast.fail('您已报名,请勿重复报名');
+      //   return
+      // }
+      // uni.navigateTo({url: `/subPages/courseDetail/courseSave?goods_code=${ this.goods_code}`,})
+    },
+    getCourseDetail() {
+      getGoodsDetail({goods_code: this.goods_code}).then(({data}) => {
+        console.log(data)
+        this.courseInfo = data.goods
+        if (this.courseInfo.content) {
+          this.courseInfo.content = this.courseInfo.content.replace(/\/apihttps:/g, 'https:');
+        }
+        // 修正 courseInfo.content 中的 src 属性值
+        if (this.courseInfo.content) {
+          this.courseInfo.content = this.courseInfo.content.replace(/\/apihttps:/g, 'https:');
+          // 使用正则表达式匹配和修改 img 标签的 style 属性
+          this.courseInfo.content = this.courseInfo.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%;"');
+            }
+
+
+          });
+
+          // 使用正则表达式匹配和修改 p 标签的 style 属性
+          this.courseInfo.content = this.courseInfo.content.replace(/<p([^>]*)>/gi, (match, attributes) => {
+            // 检查是否已经存在 style 属性
+            if (attributes.includes('style')) {
+              // 如果存在 style 属性,添加新的样式
+              return match.replace(/style="([^"]*)"/i, (styleMatch, styleContent) => {
+                const newStyles = 'font-weight: 400; font-size: 24rpx; color: #666666; line-height: 36rpx;';
+                if (!styleContent.includes(newStyles)) {
+                  return `style="${styleContent}; ${newStyles}"`;
+                }
+                return styleMatch;
+              });
+            } else {
+              // 如果不存在 style 属性,添加 style 属性
+              const newStyles = 'font-weight: 400; font-size: 24rpx; color: #666666; line-height: 36rpx;';
+              return match.replace(/<p/i, `<p style="${newStyles}"`);
+            }
+          });
+        }
+        // 确保在数据更新后调用 setImgWidth
+        this.$nextTick(() => {
+          this.setImgWidth();
+        });
+      });
+
+    },
+    setImgWidth() {
+      this.$nextTick(() => {
+        if (this.$refs.courseContent) {
+          const imgElements = this.$refs.courseContent.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'
+        });
+      }else if(index==2){
+      }
+    },
+  },
+};
+</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;
+}
+
+
+.course-content {
+  margin-top: 30 rp;
+
+  .course-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;
+  }
+  .course-date {
+    font-family: 苹方, 苹方;
+    font-size: 26rpx;
+    color: #666666;
+    line-height: 40rpx;
+    text-align: left;
+    font-style: normal;
+    text-transform: none;
+    font-weight: 400;
+    margin-bottom: 10rpx;
+    display: flex;
+  }
+
+
+
+  .course-price {
+    font-family: 苹方, 苹方;
+    font-weight: 400;
+    font-size: 24rpx;
+    color: #666666;
+    line-height: 40rpx;
+    text-align: justify;
+    font-style: normal;
+    text-transform: none;
+    display: flex;
+  }
+
+}
+
+
+
+.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;
+    }
+
+  }
+
+
+  .course-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;
+}
+.course-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;
+}
+#course-content img{
+  width: 100%!important;
+}
+/* 添加 van-tab 标题的字体大小样式 */
+/deep/ .van-tab__text {
+  font-family: PingFang SC, PingFang SC;
+  font-weight: 400;
+  font-size: 28rpx;
+}
+</style>

+ 4 - 1
subPages/orderDetail/orderDetail.vue

@@ -1,7 +1,7 @@
 <template>
 	<view class="common-page">
 		<view class="header-box" :style="{
-			background: `url(/static/order-bg.png) no-repeat 100% 100%`,
+			background: `url(${bgImg}) no-repeat 100% 100%`,
 				paddingBottom: '30rpx'
 		  }" id="headerBox" ref="headerBox">
 			<view class="navbar-box display-flex-content-center" :style="{
@@ -169,6 +169,7 @@
 			return {
 				data: { status: 1 },
 				mAddress: {},
+        bgImg:'',
 				usePoints: [],
 				value1: '',
 				goodsList: [],
@@ -239,6 +240,8 @@
 		onLoad(options) {
 			this.pageOptions = options
 			this.orderNo = options.orderNo
+      let configs = uni.getStorageSync('configs') || {}
+      this.bgImg = configs.shop_bgimg
 			this.getDetail()
 		},
 		onShow() {