Ver código fonte

经办+页面配置

Tang 1 ano atrás
pai
commit
d231bd88df

+ 4 - 4
common/config.js

@@ -1,14 +1,14 @@
 // test 测试环境
 const test = {
-	// BASE_URL: "https://testapi.xyyxt.net",
-	BASE_URL: "http://120.79.166.78:19012",
+	BASE_URL: "https://testapi.xyyxt.net",
+	// BASE_URL: "http://120.79.166.78:19012",
 	BASE_IMG_URL: "https://file-dev.xyyxt.net/",
 	domain: "h.xyyxt.net",
 	tenantId: "867735392558919680", //详粤云学堂
 	appid: "wxd3c8ae80cf43a305", 
 };
-const index = 0; // 测试环境
-// const index = 1; // 祥粤云学堂1 
+// const index = 0; // 测试环境
+const index = 1; // 祥粤云学堂1 
 // const index = 2 // 祥粤学堂
 // const index = 3 // 勘设云学堂1
 // const index = 4 // 中正学堂1

+ 8 - 2
components/nav-bar/nav-logo.vue

@@ -3,8 +3,14 @@
 		<u-navbar :class="title ? 'navbarL' : 'navbarC'" :is-back="false" :title="title" :border-bottom="false"
 			:height="height" title-color="#ffffff" back-icon-color="#ffffff" :background="background">
 			<view class="slot-wrap" v-if="isShowLogo">
-				<image :src="$method.splitImgHost(config.h5Logo)" @load="load"
+				<!-- #ifdef MP-WEIXIN -->
+				<image :src="$method.splitImgHost(header.wxlogo)" @load="load"
 					:style="{ width: imgwidth + 'rpx', height: imgheight + 'rpx' }" />
+				<!-- #endif -->
+				<!-- #ifdef H5 -->
+				<image :src="$method.splitImgHost(header.h5logo)" @load="load"
+					:style="{ width: imgwidth + 'rpx', height: imgheight + 'rpx' }" />
+				<!-- #endif -->
 			</view>
 		</u-navbar>
 	</view>
@@ -39,7 +45,7 @@
 
 		mounted() {},
 		computed: {
-			...mapGetters(["userInfo", "config"]),
+			...mapGetters(["userInfo", "header"]),
 		},
 		methods: {
 			load(e) {

+ 220 - 4
components/tabbar/index.vue

@@ -1,9 +1,65 @@
 <template>
-	<u-tabbar v-model="current" :before-switch="beforeSwitch" :list="list" @change="change" active-color="#007aff"
-		:height="Headers"></u-tabbar>
+	<view class="">
+		<view class="fixed" v-if="consultMobile.consultationStatus == 1">
+			<view class="we_t" v-if="show">
+				<view class="child" v-if="consultMobile.serviceHotlineStatus == 1">
+					<img src="https://file.xyyxt.net/web/static/img/icon/servers.png" alt=""
+						@click="activeIn == 1 ? activeIn = 0 : activeIn = 1">
+					<text class="text" @click="activeIn == 1 ? activeIn = 0 : activeIn = 1">热线</text>
+					<view class="fix" v-if="activeIn == 1">
+						<view style="font-weight: bold;">
+							服务时间
+						</view>
+						<view style="margin:14rpx;font-size: 26rpx;white-space: nowrap;color: #AAAAAA;">
+							{{consultMobile.servicingTime}}
+						</view>
+						<view style="font-weight: bold;line-height: 46rpx;white-space: pre-wrap;" @click="copy(consultMobile.serviceNumber)">
+							{{consultMobile.serviceNumber}}
+						</view>
+					</view>
+				</view>
+				<view class="child" v-if="consultMobile.serviceWechatStatus == 1">
+					<img src="https://file.xyyxt.net/web/static/img/icon/wechat.png" alt=""
+						@click="activeIn == 2 ? activeIn = 0 : activeIn = 2">
+					<text class="text" @click="activeIn == 2 ? activeIn = 0 : activeIn = 2">微信</text>
+					<view class="fix" v-if="activeIn == 2">
+						<img style="width:260rpx;height:260rpx;"
+							:src="$method.splitImgHost(consultMobile.serviceWechatImg)" alt="">
+						<view style="margin-top:10rpx;text-align:center;font-weight: bold;font-size: 30rpx;"
+							@click="copy(consultMobile.serviceWechatNumber)">
+							微信号:{{consultMobile.serviceWechatNumber}}
+						</view>
+					</view>
+				</view>
+				<view class="child" v-if="consultMobile.shoppingCarStatus == 1 && $method.isLogin()"
+					@click="jumpShopCar">
+					<img src="https://file.xyyxt.net/web/static/img/icon/shoppingCar.png" alt="" @click="activeIn = 0">
+					<text class="text" @click="activeIn =0">购物车</text>
+					<view class="fix_car" v-if="false">
+						{{shoppingNum > 99 ?'99+':shoppingNum}}
+					</view>
+				</view>
+				<view class="child" @click="show = !show">
+					<img src="https://file.xyyxt.net/web/static/img/icon/close.png" alt="" @click="activeIn =0">
+				</view>
+			</view>
+			<view class="we_l" v-if="!show" @click="show = !show">
+				<img src="https://file.xyyxt.net/web/static/img/icon/we.png" alt="" @click="activeIn = 0">
+			</view>
+			<view class="up" @click="backTop">
+				<img src="https://file.xyyxt.net/web/static/img/icon/backTop.png" alt="">
+			</view>
+		</view>
+		<u-tabbar v-model="current" :before-switch="beforeSwitch" :list="list" @change="change" active-color="#007aff"
+			:height="Headers"></u-tabbar>
+	</view>
+
 </template>
 <script>
 	import config from "@/common/config";
+	import {
+		mapGetters,
+	} from "vuex";
 	export default {
 		name: "myTabbar",
 		options: {
@@ -11,6 +67,8 @@
 		},
 		data() {
 			return {
+				activeIn: 0,
+				show: false,
 				list: [{
 						pagePath: "/pages/index/index",
 						iconPath: require("@/static/modIcon/home-1.png"),
@@ -53,15 +111,37 @@
 			};
 		},
 
-		mounted() {
+		computed: {
+			...mapGetters(["consultMobile", "shoppingNum"]),
 		},
+		mounted() {},
 		onShow() {},
 		methods: {
+			backTop() {
+				const pages = getCurrentPages();
+				const currentPage = pages[pages.length - 1];
+				const currentRoute = currentPage.route;
+				if (currentRoute.includes('pages/course/index')) {
+					uni.$emit('backTop', 1)
+				} else {
+					uni.pageScrollTo({
+						scrollTop: 0,
+						duration: 300
+					});
+				}
+			},
+			jumpShopCar() {
+				uni.navigateTo({
+					url: "/pages4/shopping/shoppingCart",
+				});
+				this.activeIn = 0
+			},
 			beforeSwitch(index) {
 				return true; // 或者根据逻辑返回false
 			},
 			change(index) {
-				this.current = index;
+				this.current = index
+				this.show = false
 				// if (index === 4) {
 				//   this.toInformation();
 				// }
@@ -71,6 +151,11 @@
 					url: "/pages/information/index",
 				});
 			},
+			copy(text) {
+				uni.setClipboardData({
+					data: text
+				});
+			}
 		},
 	};
 </script>
@@ -81,4 +166,135 @@
 			z-index: 10000 !important;
 		}
 	}
+
+	.fixed {
+		position: fixed;
+		right: 20rpx;
+		display: flex;
+		flex-direction: column;
+		justify-content: end;
+		bottom: 40vh;
+
+		.we {
+			// background-color: #007aff;
+			// border-radius: 50%;
+			// width: 80rpx;
+			// height: 80rpx;
+			// display: flex;
+			// align-items: center;
+			// justify-content: center;
+			// margin-bottom: 20rpx;
+
+			// img {
+			// 	width: 40rpx;
+			// 	height: 40rpx;
+			// }
+			.we_children {
+				background-color: #007aff;
+				border-radius: 50%;
+				width: 80rpx;
+				height: 80rpx;
+				display: flex;
+				flex-direction: column;
+				align-items: center;
+				justify-content: center;
+
+				&:last-child {
+					margin-bottom: 20rpx;
+				}
+
+				img {
+					width: 40rpx;
+					height: 40rpx;
+				}
+			}
+
+			.we_children_show {
+				visibility: hidden;
+			}
+		}
+
+		.we_sty {
+			background-color: #007aff;
+			border-radius: 50px;
+		}
+
+		.we_t {
+			border-radius: 50px;
+			background-color: #007aff;
+			padding: 10rpx 0rpx;
+
+			.child {
+				display: flex;
+				flex-direction: column;
+				justify-content: center;
+				align-items: center;
+				padding: 14rpx 0rpx;
+				position: relative;
+
+				img {
+					width: 40rpx;
+					height: 40rpx;
+					margin-bottom: 6rpx;
+				}
+
+				.text {
+					color: #fff;
+					font-size: 22rpx;
+				}
+
+				.fix {
+					box-shadow: 0rpx 0rpx 20rpx 11rpx rgba(0, 0, 0, 0.2);
+					position: absolute;
+					top: 0rpx;
+					right: 110%;
+					padding: 26rpx;
+					border-radius: 8px;
+					background-color: #fff;
+				}
+
+				.fix_car {
+					position: absolute;
+					top: 0rpx;
+					right: 0rpx;
+					padding: 0rpx 8rpx;
+					border-radius: 100px;
+					color: #fff;
+					font-size: 20rpx;
+					background-color: #f56c6c;
+				}
+			}
+		}
+
+		.we_l {
+			background-color: #007aff;
+			border-radius: 50%;
+			width: 90rpx;
+			height: 90rpx;
+			display: flex;
+			align-items: center;
+			justify-content: center;
+
+			img {
+				width: 40rpx;
+				height: 40rpx;
+			}
+		}
+
+		.up {
+			background-color: #007aff;
+			border-radius: 50%;
+			width: 90rpx;
+			height: 90rpx;
+			display: flex;
+			align-items: center;
+			justify-content: center;
+			margin-top: 20rpx;
+
+			img {
+				width: 40rpx;
+				height: 40rpx;
+			}
+		}
+	}
 </style>

+ 32 - 8
pages/course/index.vue

@@ -3,8 +3,8 @@
 		<nav-logo title="选购中心"></nav-logo>
 		<view class="body_course">
 			<view class="top">
-				<u-tabs :list="courseLists" height="100" :current="current" @change="change"
-					:scrollable="false" font-size="32" active-color="#333"></u-tabs>
+				<u-tabs :list="courseLists" height="100" :current="current" @change="change" :scrollable="false"
+					font-size="32" active-color="#333"></u-tabs>
 				<view class="search_box">
 					<u-search class="u_search" :show-action="false" @clear="search"
 						:placeholder="`请输入${current == 4 ? '商品':courseLists[current].name}名称`"
@@ -16,7 +16,8 @@
 				</view>
 			</view>
 			<view class="content">
-				<scroll-view scroll-y="true" class="scroll-Y" @scrolltolower="lower">
+				<scroll-view scroll-y="true" class="scroll-Y" @scrolltolower="lower" :scroll-top="scrollTop"
+					@scroll="scroll" scroll-with-animation>
 					<view class="noGoods" v-if="goodsList.length == 0">
 						<img src="https://file.xyyxt.net/web/static/img/no-content.png" alt="">
 						<view class="">
@@ -39,14 +40,18 @@
 								<view class="price">
 									<text class="price1" v-if="!item.specTemplateId ||
 					(!item.maxPrice && !item.minPrice)"><text v-if="item.standPrice"
-											style="font-size: 28rpx;font-weight: 400;">¥</text><text v-if="item.standPrice">{{item.standPrice | formatPrice}}</text><text v-else>免费</text></text>
+											style="font-size: 28rpx;font-weight: 400;">¥</text><text
+											v-if="item.standPrice">{{item.standPrice | formatPrice}}</text><text
+											v-else>免费</text></text>
 									<text class="price1" v-else><text
 											style="font-size: 28rpx;font-weight: 400;">¥</text>{{item.minPrice | formatPrice}}
 										<template v-if="item.minPrice != item.maxPrice">
 											<text>-</text>
-											<text style="font-size: 28rpx;font-weight: 400;">¥</text>{{ item.maxPrice | formatPrice }}
+											<text
+												style="font-size: 28rpx;font-weight: 400;">¥</text>{{ item.maxPrice | formatPrice }}
 										</template></text>
-									<text class="price2" v-if="item.linePrice">原价:¥{{item.linePrice | formatPrice}}</text>
+									<text class="price2"
+										v-if="item.linePrice">原价:¥{{item.linePrice | formatPrice}}</text>
 								</view>
 							</view>
 						</view>
@@ -56,7 +61,7 @@
 		</view>
 		<!-- tabbar -->
 		<myTabbar></myTabbar>
-		<filter-show-status ref="filterShowStatus" @backFunc="backFunc"></filter-show-status>
+		<filter-show-status ref="filterShowStatus"></filter-show-status>
 	</view>
 </template>
 <script>
@@ -70,6 +75,7 @@
 		},
 		data() {
 			return {
+				scrollTop: 0,
 				courseLists: [{
 						name: "课程",
 						type: 1
@@ -101,6 +107,7 @@
 					showStatus: 1
 				},
 				total: 0,
+				oldScrollTop: 0,
 				activeData: {
 					educationId: "",
 					projectId: "",
@@ -119,6 +126,17 @@
 		onLoad(option) {
 			uni.hideTabBar();
 			this.initList()
+			uni.$on('backTop', res => {
+				//视图会发生重新渲染
+				this.scrollTop = this.oldScrollTop
+				//当视图渲染结束 重新设置为0
+				this.$nextTick(() => {
+					this.scrollTop = 0
+				});
+			})
+		},
+		onUnload() {
+			uni.$off('backTop')
 		},
 		watch: {
 			"current"(newVal, oldVal) {
@@ -135,12 +153,18 @@
 				this.initList()
 			}
 		},
-		computed:{...mapGetters(["current"])},
+		computed: {
+			...mapGetters(["current"])
+		},
 		methods: {
 			backFunc(item) {
 				this.activeData = item
 				this.search()
 			},
+			scroll(e) {
+				//记录scroll  位置
+				this.oldScrollTop = e.detail.scrollTop
+			},
 			openFilterBox() {
 				this.$refs.filterShowStatus.openBoxs(this.activeData)
 			},

+ 13 - 11
pages/index/index.vue

@@ -4,7 +4,7 @@
 		<view class="header_box">
 			<u-swiper :list="list" :autoplay="autoplay" :interval="interval" :duration="duration" :height="swiperHeight"
 				img-mode="scaleToFill" @click="swiperClick"></u-swiper>
-			<view class="getStudy" v-if="tenantId == '867735392558919680'">
+			<view class="getStudy" v-if="other.tagH5 == 1">
 				<view class="left">
 					<img src="@/static/modIcon/plan.png" alt="">
 					<text>获取定制学习规划</text>
@@ -13,14 +13,14 @@
 					立即获取
 				</view>
 			</view>
-			<view class="jumpList">
+			<view class="jumpList" v-if="other.entranceH5 == 1">
 				<view class="list_li" v-for="(item,index) in jumpList" :key="index" @click="tabListFunc(item)">
 					<img :src="item.imgName" alt="">
 					<text>{{item.label}}</text>
 				</view>
 			</view>
 		</view>
-		<view class="content" v-if="recommendCourse.length > 0">
+		<view class="content" v-if="other.courseH5 == 1 && recommendCourse.length > 0">
 			<view class="header_top">
 				<text class="left">推荐课程</text>
 				<u-tabs class="u-tabs" :list="recommendCourse" :current="currentCourse" bg-color="transparent" :show-bar="false"
@@ -66,7 +66,7 @@
 				</view>
 			</view>
 		</view>
-		<view class="content" v-if="recommendBank.length > 0">
+		<view class="content" v-if="other.bankH5 == 1 &&recommendBank.length > 0">
 			<view class="header_top">
 				<text class="left">推荐题库</text>
 				<u-tabs class="u-tabs"  :list="recommendBank" :current="currentBank" bg-color="transparent" :show-bar="false"
@@ -109,7 +109,7 @@
 				</view>
 			</view>
 		</view>
-		<view class="content" v-if="tenantId == '867735392558919680'">
+		<view class="content" v-if="other.teamH5 == 1">
 			<view class="header_top">
 				<text class="left">师资团队</text>
 				<text class="right">左右滑动</text>
@@ -141,7 +141,7 @@
 				</swiper>
 			</view>
 		</view>
-		<view class="content" v-if="tenantId == '867735392558919680'">
+		<view class="content" v-if="other.certificateH5 == 1">
 			<view class="header_top">
 				<text class="left">资质证书</text>
 				<text class="right">左右滑动</text>
@@ -380,13 +380,15 @@
 				recommendBank: [],
 				isFollow: null, //是否关注过,不是1就是没关注
 				curClose: true, // 当天时是否关闭过
+				version:null,//当前版本号
 			};
 		},
 		async onLoad(option) {
+			let self = this
 			uni.hideTabBar();
 			// #ifdef H5
 			uni.setNavigationBarTitle({
-				title: this.config.companyName,
+				title: this.header.companyName,
 			});
 			// #endif
 			this.getLocation();
@@ -407,8 +409,8 @@
 
 			wx.getSystemInfo({
 				success: function(res) {
-					let version = res.SDKVersion;
-					console.log("该版本号为: ", version);
+					self.version = res.SDKVersion;
+					console.log("该版本号为: ", self.version);
 				},
 			});
 		},
@@ -416,7 +418,7 @@
 			this.getInfo(); // 判断有没有关注公众号
 			this.isClickOff(); //关注公众号,每天最多显示1次;当天学员关闭弹窗后,无需再显示
 			this.appCommonConfig({
-				version: this.config.version,
+				version: this.version,
 			});
 		},
 		onShareAppMessage(res) {
@@ -427,7 +429,7 @@
 			};
 		},
 		computed: {
-			...mapGetters(["config", "dictObj", "userInfo", "tenantId"]),
+			...mapGetters(["header","other", "dictObj", "userInfo", "tenantId"]),
 			filterNum: function() {
 				return function(list) {
 					if (list && list.length > 0) {

+ 17 - 12
pages/learn/index.vue

@@ -244,30 +244,30 @@
 							<div v-if="
                   (item.periodStatus == 0 || item.periodStatus == -1)
                 ">
-				<span v-if="$method.GetRTime(item.classEndTime) >= 0">
-				温馨提示:当前学习有效期至{{
+								<span v-if="$method.GetRTime(item.classEndTime) >= 0">
+									温馨提示:当前学习有效期至{{
 				  $method.timestampToTime(item.classEndTime)
 				}},超期学时无效,为防审核异常请于{{
 				  $method.timestampToTime(item.classEndTime - 864000, false)
 				}}
-								前完成学习,当前剩余有效学习时间为{{
+									前完成学习,当前剩余有效学习时间为{{
 				  $method.GetRTime(item.classEndTime) < 0
 				    ? 0
 				    : $method.GetRTime(item.classEndTime)
 				}}天。
-				</span>
-				<span v-else-if="$method.GetRTime(item.serviceEndTime) >= 0">
-				温馨提示:当前学习有效期至{{
+								</span>
+								<span v-else-if="$method.GetRTime(item.serviceEndTime) >= 0">
+									温馨提示:当前学习有效期至{{
 				  $method.timestampToTime(item.serviceEndTime)
 				}},超期学时无效,为防审核异常请于{{
 				  $method.timestampToTime(item.serviceEndTime - 864000, false)
 				}}
-								前完成学习,当前剩余有效学习时间为{{
+									前完成学习,当前剩余有效学习时间为{{
 				  $method.GetRTime(item.serviceEndTime) < 0
 				    ? 0
 				    : $method.GetRTime(item.serviceEndTime)
 				}}天。
-				</span>
+								</span>
 							</div>
 							<div v-if="
                   item.gradeStatus == 1 &&
@@ -376,8 +376,8 @@
 									<view style="display: flex; align-items: center; padding: 20rpx">
 										<view>
 											<u-radio shape="circle" :name="index" :disabled="
-                          item.studentNum > 0 &&
-                          item.studentNum == item.studentUpper
+                          item.studentNumAll > 0 &&
+                          item.studentNumAll == item.studentUpper
                         ">
 												<view :class="
                             item.checked ? 'white-box blue-box' : 'white-box'
@@ -754,7 +754,7 @@
 									goodsName,
 									subscribeSign
 								} = goods;
-								console.log(goods,'goods')
+								console.log(goods, 'goods')
 								let text =
 									`您七大员新考【${goodsName}】课程` +
 									(subscribeSign == 1 ?
@@ -1168,6 +1168,11 @@
 					noLoading: load ? true : false,
 				}).then((res) => {
 					if (res.data.code == 200) {
+						if (res.data.rows && res.data.rows.length > 0) {
+							res.data.rows = res.data.rows.filter(i => {
+								return !(i.studentNumAll > 0 && i.studentNumAll == i.studentUpper)
+							})
+						}
 						this.gradeList = res.data.rows;
 						if (this.gradeList.length == 0) {
 							let item = {
@@ -1178,7 +1183,7 @@
 						} else {
 							let isGradeFull = this.gradeList.every(
 								(item) =>
-								item.studentNum > 0 && item.studentNum == item.studentUpper
+								item.studentNumAll > 0 && item.studentNumAll == item.studentUpper
 							);
 							//所有班级都满了
 							if (isGradeFull) {

+ 12 - 8
pages2/invoice/index.vue

@@ -21,13 +21,17 @@
               prop="type"
             >
               <u-radio-group v-model="form.type" @change="formTypeChange">
-                <u-radio
-                  v-for="(item, index) in typeList"
-                  :key="index"
-                  :name="item.value"
-                >
-                  {{ item.name }}
-                </u-radio>
+				<u-radio
+				  name="1"
+				>
+				  普通发票
+				</u-radio>
+				<u-radio
+				v-if="other.invoiceH5 == 1"
+				  name="2"
+				>
+				  增值税专用发票
+				</u-radio>
               </u-radio-group>
             </u-form-item>
 
@@ -1203,7 +1207,7 @@ export default {
     },
   },
   computed: {
-    ...mapGetters(["userInfo"]),
+    ...mapGetters(["userInfo","other"]),
     filterOrderList() {
       return this.orderList.filter((i) => i.disabled) || [];
     },

+ 3 - 4
pages2/order/confirm_success.vue

@@ -23,8 +23,8 @@
         </view>
         <!-- #ifdef H5 -->
         <view class="collect">
-          <view class="fl" v-if="config.gzhImage">
-            <image :src="$method.splitImgHost(config.gzhImage)" mode="" />
+          <view class="fl" v-if="consultPc.accountsStatus">
+            <image :src="$method.splitImgHost(consultPc.accountsImg)" mode="" />
             <text>长按二维码,关注公众号 <br />方便下次进入学习哦 </text>
           </view>
           <view class="fl" v-else>
@@ -97,7 +97,6 @@ export default {
     }
   },
   onShow() {
-    console.log(this.config.gzhImage);
     /* if(this.current === 2 && this.$method.isLogin()){
 			this.$refs.refMy.init();
 		} */
@@ -157,7 +156,7 @@ export default {
   },
   onReachBottom() {},
   computed: {
-    ...mapGetters(["userInfo", "shoppingCartList", "config"]),
+    ...mapGetters(["userInfo", "shoppingCartList", "consultPc"]),
     isHaveJy() {
       return this.shoppingCartList.some((e) => e.goodsType == 8);
     },

+ 1 - 1
pages4/shopping/shoppingCart.vue

@@ -1,6 +1,6 @@
 <template>
   <view>
-    <nav-logo title="购物车"></nav-logo>
+    <nav-bar title="购物车"></nav-bar>
     <view v-show="isLogin">
       <view v-if="!list.length"
         ><u-empty text="购物车为空" margin-top="500" mode="car"></u-empty

+ 50 - 10
store/index.js

@@ -33,11 +33,20 @@ const store = new Vuex.Store({
 		sysTime: 0, //系统时间
 		scene: 0, //进入小程序的场景值
 		sac: "",
-		config: {},
 		educationType: null,
 		businessLevel: null,
 		sujectType: null,
 		tenantId: "",
+		//---------------
+		consultPc: {},
+		consultMobile: {},
+		header: {},
+		nav: {},
+		other: {},
+		shoppingNum: 0,
+		//---------------
+		config: {},
+
 	},
 	getters: {
 		tenantId(state) {
@@ -143,7 +152,14 @@ const store = new Vuex.Store({
 		playVID: (state) => state.playVID,
 		liveLast: (state) => state.liveLast,
 		sac: (state) => state.sac,
+		consultMobile: (state) => state.consultMobile,
+		consultPc: (state) => state.consultPc,
+		header: (state) => state.header,
+		nav: (state) => state.nav,
+		other: (state) => state.other,
+		shoppingNum: (state) => state.shoppingNum || 0,
 		config: (state) => state.config,
+
 	},
 	mutations: {
 		commonSystemTime(state, time) {
@@ -208,6 +224,12 @@ const store = new Vuex.Store({
 			state.sac = sac;
 		},
 		setConfig(state, config) {
+			console.log(config, 'config')
+			for (let k in config) {
+				state[k] = config[k]
+			}
+		},
+		setConfigs(state, config) {
 			state.config = config;
 		},
 
@@ -247,6 +269,7 @@ const store = new Vuex.Store({
 			return new Promise(async (resolve) => {
 				const resdata = await api.getInfo();
 				if (resdata.data.code == 200) {
+					context.dispatch('getShoppingNum')
 					context.state.userInfo = resdata.data.data;
 					method.setUuid(new Date().valueOf() + "");
 					resolve();
@@ -264,18 +287,25 @@ const store = new Vuex.Store({
 		}) {
 			return new Promise(async (resolve) => {
 				let config = {};
+				let configs = {};
 				api.mobileConfig().then((res) => {
-					let data = res.data.rows.find((e) => e.configKey == "home.mobile");
+					let data = res.data.rows.find((e) => e.configKey == "client.config");
 					if (data) {
-						config = {
-							...config,
-							...JSON.parse(data.configValue)
+						config = JSON.parse(data.configValue) || {}
+					}
+					commit("setConfig", config);
+
+					let datas = res.data.rows.find((e) => e.configKey == "home.mobile");
+					if (datas) {
+						configs = {
+							...configs,
+							...JSON.parse(datas.configValue)
 						};
 					}
 					let header = res.data.rows.find((e) => e.configKey == "home.header");
 					if (header) {
-						config = {
-							...config,
+						configs = {
+							...configs,
 							companyName: JSON.parse(header.configValue).companyName,
 						};
 					}
@@ -283,16 +313,26 @@ const store = new Vuex.Store({
 						(e) => e.configKey == "home.footer.record"
 					);
 					if (foot) {
-						config = {
-							...config,
+						configs = {
+							...configs,
 							...JSON.parse(foot.configValue)
 						};
 					}
-					commit("setConfig", config);
+					commit("setConfigs", configs);
+
 					resolve(config);
 				});
 			});
 		},
+		getShoppingNum(context) {
+			return new Promise(async (resolve) => {
+				api.cartList().then((res) => {
+					let total = res.data.total || 0
+					context.state.shoppingNum = total
+					resolve(total);
+				});
+			});
+		},
 	},
 });
 async function getUserInfo(state) {