浏览代码

新加更新功能 未审核提示

Qukatie 3 月之前
父节点
当前提交
f66fe709b7

+ 1 - 1
common/setting.js

@@ -10,7 +10,7 @@ module.exports = {
 	version: '1.0.0',
 	// 开发环境接口Url
 	// devUrl: 'http://192.168.0.111:1080',
-	// devUrl: 'http://192.168.8.126:1080',
+	// devUrl: 'http://192.168.8.103:1080',
 	// devUrl: 'https://td.echepei.com/api', 
 	devUrl: 'https://lt.echepei.com/api',   // 鑫畅途的
 	// devUrl: 'http://jxy.natapp1.cc/api',

+ 1 - 1
manifest.json

@@ -125,7 +125,7 @@
     "quickapp" : {},
     /* 小程序特有相关 */
     "mp-weixin" : {
-        "appid" : "wxfe9b989440d87124",
+        "appid" : "wxc08fe60dd3bf316d",
         "setting" : {
             "urlCheck" : false,
             "postcss" : true,

+ 55 - 16
pages/integralMall/classification.vue

@@ -1,11 +1,30 @@
 <template>
 	<view>
 		<view style="background-color: #E75F37;padding: 20rpx;">
-			<u-search placeholder="请输入商品名称" bgColor="#fff" :showAction="false" searchIconColor='#E75F37'
-				:searchIconSize='24' v-model="name" @click="inSearch" disabled></u-search>
+			<u-search placeholder="请输入商品名称" bgColor="#fff" searchIconColor='#E75F37' :actionStyle="{color:'#FFF'}"
+				:searchIconSize='24' v-model="name" @search="custom()" @custom="custom()"></u-search>
 		</view>
 		<scroll-view @scrolltolower="lowerBottom" scroll-y="true" style="max-height: 82vh;" @scroll="scroll"
 			:scroll-top="scrollTop">
+			<view class="recentSearches" v-if="recentSearches.length != 0">
+				<view class="recentSearches-head">
+					<view class="recentSearches-headLeft">
+						<u-icon name="clock" color="#C4C4C4"></u-icon>
+						<view style="font-size: 26rpx;margin-left: 6rpx;">最近搜索</view>
+					</view>
+					<view class="recentSearches-headRight">
+						<u-icon name="trash" size="20px" @click="searchDeleteShow = true" color="#C4C4C4"></u-icon>
+					</view>
+				</view>
+				<view class="recentSearches-text">
+					<u-tag v-for="(item,index) in recentSearches" :key="index" :text="item" bgColor="#EFEFEF"
+						color="#414141" borderColor="#EFEFEF" size="medium" closable :show="item" @close="tagClose(index)"
+						shape="circle" @click.stop="tagSearches(item)"></u-tag>
+				</view>
+				<u-modal :show="searchDeleteShow" content="确认删除搜索记录吗?" showCancelButton @confirm="searchDeletefun"
+					@cancel="searchDeleteShow = false" ref="uModal" :asyncClose="true">
+				</u-modal>
+			</view>
 			<view class="tag-calss">
 				<view style="margin:0 12rpx;">
 					<u-tag text="品牌" bgColor="#fff" borderColor='#E75F37' color="#E75F37" @click="openBrand"
@@ -14,13 +33,13 @@
 				</view>
 				<view style="margin:0 12rpx;width: 2rpx;height: 43rpx;background: #E75F37;border-radius: 1rpx;"></view>
 				<view style="margin:0 12rpx;">
-					<u-tag text="清空" bgColor="#F8AA09" borderColor='#F8AA09' color="#fff" @click="emptyfun" size="mini">
+					<u-tag text="重置" bgColor="#F8AA09" borderColor='#F8AA09' color="#fff" @click="emptyfun" size="mini">
 					</u-tag>
 				</view>
 			</view>
 			<view v-for="(item, index) in dataList" :key="index">
 				<view class="card" @click="selectProduct(item)">
-					<image :src="item.filesList[0].url" class="cardImg" mode="scaleToFill">
+					<image :src="item.url" class="cardImg" mode="scaleToFill">
 					</image>
 					<view class="">
 						<view style="display: flex;align-items: center;">
@@ -31,7 +50,6 @@
 								style="width: 54rpx;height: 54rpx;margin-left: 32rpx;" mode="scaleToFill">
 							</image>
 						</view>
-
 						<view style="display: flex;align-items: center;">
 							<view class="cardTab">
 								<image src="/static/images/tabBar/280@2x.png" style="width: 142rpx;height: 36rpx;"
@@ -155,7 +173,7 @@
 		created() {
 			// 获取最近搜索数据
 			if (uni.getStorageSync('recentSearches')) {
-				this.recentSearches = uni.getStorageSync('recentSearches');
+				this.recentSearches = uni.getStorageSync('recentSearches').slice(0, 8);
 			}
 			// 获取审核状态
 			details().then(res => {
@@ -345,19 +363,13 @@
 			// 最近搜索点击关闭按钮
 			tagClose(index) {
 				this.recentSearches.splice(index, 1)
-				uni.setStorageSync('recentSearches', this.recentSearches);
+				uni.setStorageSync('recentSearches', this.recentSearches.slice(0, 8));
 			},
 			selectProduct(item) {
 				uni.$u.route('/pages/integralMall/buyGoods/commodityDetails', {
 					id: item.id
 				});
 			},
-			// 搜索全部删除
-			searchDeletefun() {
-				this.recentSearches = []
-				uni.setStorageSync('recentSearches', this.recentSearches);
-				this.searchDeleteShow = false
-			},
 			// 点击搜索
 			inSearch() {
 				uni.navigateTo({
@@ -385,8 +397,8 @@
 					this.recentSearches.unshift(this.name)
 					// 去重
 					this.recentSearches = this.recentSearches.filter((item, index) => this.recentSearches.indexOf(item) ===
-						index);
-					uni.setStorageSync('recentSearches', this.recentSearches);
+						index).slice(0, 8);
+					uni.setStorageSync('recentSearches', this.recentSearches.slice(0, 8));
 				}
 				delete this.search.brandId
 				this.search.cname = this.name
@@ -454,7 +466,7 @@
 
 	.tag-calss {
 		display: flex;
-		padding: 41rpx 63rpx;
+		padding: 8rpx 63rpx 18rpx 63rpx;
 		background-color: #fff;
 		justify-content: flex-end;
 
@@ -517,4 +529,31 @@
 			font-weight: 500;
 		}
 	}
+	.recentSearches {
+		padding: 8rpx 12rpx;
+		background-color: #fff;
+	
+		.recentSearches-head {
+			display: flex;
+			align-items: center;
+			justify-content: space-between;
+			color: #C4C4C4;
+	
+			.recentSearches-headLeft {
+				display: flex;
+				align-items: center;
+			}
+	
+			.recentSearches-headRight {}
+		}
+	
+		.recentSearches-text {
+			display: flex;
+			flex-wrap: wrap;
+			align-items: baseline;
+			::v-deep .u-tag__close{
+				z-index: 99 !important;
+			}
+		}
+	}
 </style>

+ 5 - 3
pages/integralMall/home.vue

@@ -6,9 +6,11 @@
 				mode="scaleToFill"></image>
 			<view>
 				<view style="display: flex;align-items: center;">
-					<u-search placeholder="请输入商品名称" bgColor="#fff" readonly :showAction="false"
+				<!-- 	<u-search placeholder="请输入商品名称" bgColor="#fff" readonly :showAction="false"
 						searchIconColor='#E75F37' :searchIconSize='24' margin='20rpx' disabled
-						@click="goSearch"></u-search>
+						@click="goSearch"></u-search> -->
+						<u-search placeholder="请输入商品名称" bgColor="#fff" searchIconColor='#E75F37' :actionStyle="{color:'#FFF'}"
+							:searchIconSize='24' margin='20rpx'  disabled @click="goSearch"></u-search>
 				</view>
 
 			</view>
@@ -59,7 +61,7 @@
 										mode="aspectFit" class='imgIcon' />
 									<image v-if="item.billType == 1" src="/static/images/tabBar/crd2x.png"
 										mode="aspectFit" class='imgIcon' />
-									<image :src="item.filesList[0].url" mode="aspectFit"
+									<image :src="item.url" mode="aspectFit"
 										style="width:300rpx;height:300rpx;border-radius:20rpx;border: 2rpx #E7E7E7 solid;" />
 									<text class="text">{{item.cname}}</text>
 									<text

+ 3 - 3
pages/integralMall/index.vue

@@ -72,9 +72,9 @@
 			},
 			goSearch() {
 				this.value = 1
-				setTimeout(() => {
-					this.$refs.goods.inSearch()
-				}, 200)
+				// setTimeout(() => {
+				// 	this.$refs.goods.inSearch()
+				// }, 200)
 			}
 		}
 	}

+ 28 - 0
pages/tabBar/activity/index.vue

@@ -33,6 +33,7 @@
 			// this.activityListfun()
 		},
 		onShow() {
+			this.getUpdate()
 			shoppingCartList({	whetherIntegral: '0'}).then(res => {
 			let num=0
 			res.data.forEach(e=>{
@@ -59,6 +60,33 @@
 			}
 		},
 		methods: {
+			getUpdate() {
+				const updateManager = uni.getUpdateManager();
+				updateManager.onCheckForUpdate(function(res) {
+					// 请求完新版本信息的回调
+					if (res.hasUpdate) {
+						updateManager.onUpdateReady(function() {
+							uni.showModal({
+								title: '更新提示',
+								content: '新版本已经准备好,是否重启应用?',
+								success: function(res) {
+									if (res.confirm) {
+										// 新的版本已经下载好,调用 applyUpdate 应用新版本并重启
+										updateManager.applyUpdate();
+									}
+								}
+							});
+						});
+						updateManager.onUpdateFailed(function() {
+							// 新的版本下载失败
+							uni.showModal({
+								title: '已经有新版本了哟~',
+								content: '新版本已经上线啦~,请您删除当前小程序,重新搜索打开哟~'
+							});
+						});
+					}
+				});
+			},
 			// 跳转详情
 			jumpDetails(row) {
 				uni.navigateTo({

+ 29 - 0
pages/tabBar/center.vue

@@ -164,6 +164,7 @@
 			}
 		},
 		onShow() {
+			this.getUpdate()
 			if (uni.getStorageSync('userInfo').tenant_id == '000000') {
 				this.adminShow = true
 			}
@@ -177,6 +178,34 @@
 			})
 		},
 		methods: {
+			getUpdate() {
+				const updateManager = uni.getUpdateManager();
+				updateManager.onCheckForUpdate(function(res) {
+					// 请求完新版本信息的回调
+					if (res.hasUpdate) {
+						updateManager.onUpdateReady(function() {
+							uni.showModal({
+								title: '更新提示',
+								content: '新版本已经准备好,是否重启应用?',
+								success: function(res) {
+									if (res.confirm) {
+										// 新的版本已经下载好,调用 applyUpdate 应用新版本并重启
+										updateManager.applyUpdate();
+									}
+								}
+							});
+						});
+			
+						updateManager.onUpdateFailed(function() {
+							// 新的版本下载失败
+							uni.showModal({
+								title: '已经有新版本了哟~',
+								content: '新版本已经上线啦~,请您删除当前小程序,重新搜索打开哟~'
+							});
+						});
+					}
+				});
+			},
 			// 确认
 			adminConfirm() {
 				uni.clearStorageSync();

+ 174 - 71
pages/tabBar/classification.vue

@@ -2,10 +2,29 @@
 	<view>
 		<view style="background-color: #E75F37;padding: 20rpx;">
 			<u-search placeholder="请输入商品名称" bgColor="#fff" searchIconColor='#E75F37' :actionStyle="{color:'#FFF'}"
-				:searchIconSize='24' v-model="name" @click="inSearch" disabled @custom="inSearch()"></u-search>
+				:searchIconSize='24' v-model="name" @search="custom()" @custom="custom()"></u-search>
 		</view>
 		<scroll-view @scrolltolower="lowerBottom" scroll-y="true" style="max-height: 92vh;" @scroll="scroll"
 			:scroll-top="scrollTop">
+			<view class="recentSearches" v-if="recentSearches.length != 0">
+				<view class="recentSearches-head">
+					<view class="recentSearches-headLeft">
+						<u-icon name="clock" color="#C4C4C4"></u-icon>
+						<view style="font-size: 26rpx;margin-left: 6rpx;">最近搜索</view>
+					</view>
+					<view class="recentSearches-headRight">
+						<u-icon name="trash" size="20px" @click="searchDeleteShow = true" color="#C4C4C4"></u-icon>
+					</view>
+				</view>
+				<view class="recentSearches-text">
+					<u-tag v-for="(item,index) in recentSearches" :key="index" :text="item" bgColor="#EFEFEF"
+						color="#414141" borderColor="#EFEFEF" size="medium" closable :show="item" @close="tagClose(index)"
+						shape="circle" @click.stop="tagSearches(item)"></u-tag>
+				</view>
+				<u-modal :show="searchDeleteShow" content="确认删除搜索记录吗?" showCancelButton @confirm="searchDeletefun"
+					@cancel="searchDeleteShow = false" ref="uModal" :asyncClose="true">
+				</u-modal>
+			</view>
 			<view class="tagClass">
 				<view v-for="(item, index) in radios" :key="index" style="margin:0 6rpx;">
 					<u-tag :text="item.label" :bgColor="item.checked?'#E75F37':'#fff'" borderColor='#E75F37'
@@ -19,7 +38,7 @@
 				</view>
 				<view style="margin:0 6rpx;width: 2rpx;height: 43rpx;background: #E75F37;border-radius: 1rpx;"></view>
 				<view style="margin:0 6rpx;">
-					<u-tag text="清空" bgColor="#F8AA09" borderColor='#F8AA09' color="#fff" @click="emptyfun" size="mini">
+					<u-tag text="重置" bgColor="#F8AA09" borderColor='#F8AA09' color="#fff" @click="emptyfun" size="mini">
 					</u-tag>
 				</view>
 			</view>
@@ -67,7 +86,7 @@
 
 							</view>
 							<view class="cardPrice">
-								¥{{item.mallPrice}}
+								¥{{checkStatus == '通过'?item.mallPrice:'***'}}
 							</view>
 						</view>
 					</view>
@@ -92,7 +111,7 @@
 				</scroll-view>
 			</view>
 		</uni-popup>
-		<view v-if="userInfo.tenant_id != '000000'" class="suspensionBox" @click="salesmanShow=true">
+		<view v-if="userInfo.tenant_id != '000000'" class="suspensionBox" @click="opensalesman">
 			<u-icon name="server-fill" color="#2979ff" size="30"></u-icon>
 		</view>
 		<u-modal :show="salesmanShow" title="业务员联系方式" showCancelButton confirmText="拨号" cancelText="关闭"
@@ -168,31 +187,6 @@
 		},
 		mounted() {},
 		onLoad(data) {
-			// 获取审核状态
-			details().then(res => {
-				this.checkStatus = res.data.checkStatus
-				uni.setStorageSync('checkStatus', res.data.checkStatus);
-				if (this.checkStatus != '通过') {
-					// uni.showToast({
-					// 	title: "当前用户未授权,请联系客服",
-					// 	icon: "none",
-					// 	mask:true
-					// });
-					uni.switchTab({
-						url: '/pages/tabBar/home'
-					})
-					return
-				}
-				this.salesmanName = res.data.salesmanName
-				// 查询业务员详情拿取手机号
-				if (!this.phoneNumber) {
-					nameDetail({
-						id: res.data.salesmanId
-					}).then(res => {
-						this.phoneNumber = res.data.phone
-					})
-				}
-			})
 			listAll2({
 				type: 'PP',
 				enableOrNot: '1',
@@ -208,13 +202,7 @@
 					current: 1
 				}
 				this.dataList = []
-				// let searchCache = 
-				// uni.removeStorageSync('homeSearch')
-				if (uni.getStorageSync('homeSearch')) {
-					this.name = JSON.parse(JSON.stringify(uni.getStorageSync('homeSearch')))
-					this.custom()
-
-				} else if (uni.getStorageSync('cname')) {
+				if (uni.getStorageSync('cname')) {
 					this.$set(this.search, 'cname', JSON.parse(JSON.stringify(uni.getStorageSync('cname'))))
 					uni.removeStorage('cname')
 					this.page = {
@@ -232,41 +220,92 @@
 					this.search = {
 						whether: '0',
 					}
-					console.log(1111)
 					this.onSearch()
 				}
 			})
-			uni.$on('searchData', (data) => {
-				this.radios.map((item, index) => {
-					item.checked = false
-				});
-				this.checkboxValue = []
-				this.dataList = []
-				this.search.originalFactory = null
-				this.search.selfRecovery = null
-				this.search.explosionProof = null
-				this.name = data
-				setTimeout(() => {
-					this.custom()
-				}, 400);
-
-			})
-		},
-		onUnload() {
-			// uni.$off('searchData', (data) => {
-
-			// })
 		},
 		onShow() {
+			this.getUpdate()
+			// 获取审核状态
+			details().then(res => {
+				this.checkStatus = res.data.checkStatus
+				uni.setStorageSync('checkStatus', res.data.checkStatus);
+				// if (this.checkStatus != '通过') {
+				// 	uni.showToast({
+				// 		title: "当前用户未授权,请联系客服",
+				// 		icon: "none",
+				// 		mask:true
+				// 	});
+				// 	// uni.switchTab({
+				// 	// 	url: '/pages/tabBar/home'
+				// 	// })
+				// 	return
+				// }
+				this.salesmanName = res.data.salesmanName
+				// 查询业务员详情拿取手机号
+				if (!this.phoneNumber) {
+					nameDetail({
+						id: res.data.salesmanId
+					}).then(res => {
+						this.phoneNumber = res.data.phone
+					})
+				}
+			})
 			this.userInfo = uni.getStorageSync('userInfo')
 			// 获取最近搜索数据
 			if (uni.getStorageSync('recentSearches')) {
-				this.recentSearches = uni.getStorageSync('recentSearches');
+				this.recentSearches = uni.getStorageSync('recentSearches').slice(0, 8);
 			}
-
 		},
 		methods: {
+			getUpdate() {
+				const updateManager = uni.getUpdateManager();
+				updateManager.onCheckForUpdate(function(res) {
+					// 请求完新版本信息的回调
+					if (res.hasUpdate) {
+						updateManager.onUpdateReady(function() {
+							uni.showModal({
+								title: '更新提示',
+								content: '新版本已经准备好,是否重启应用?',
+								success: function(res) {
+									if (res.confirm) {
+										// 新的版本已经下载好,调用 applyUpdate 应用新版本并重启
+										updateManager.applyUpdate();
+									}
+								}
+							});
+						});
+			
+						updateManager.onUpdateFailed(function() {
+							// 新的版本下载失败
+							uni.showModal({
+								title: '已经有新版本了哟~',
+								content: '新版本已经上线啦~,请您删除当前小程序,重新搜索打开哟~'
+							});
+						});
+					}
+				});
+			},
+			opensalesman(){
+				if (this.checkStatus != '通过') {
+					uni.showToast({
+						title: "当前用户未授权,请联系客服",
+						icon: "none",
+						mask: true
+					});
+					return
+				}
+				this.salesmanShow=true
+			},
 			openBrand() {
+				if (this.checkStatus != '通过') {
+					uni.showToast({
+						title: "当前用户未授权,请联系客服",
+						icon: "none",
+						mask:true
+					});
+					return
+				}
 				this.$refs.popup.open('bottom')
 			},
 			goTop(e) {
@@ -320,6 +359,14 @@
 				this.onSearch()
 			},
 			checkboxChange(value, index) {
+				if (this.checkStatus != '通过') {
+					uni.showToast({
+						title: "当前用户未授权,请联系客服",
+						icon: "none",
+						mask:true
+					});
+					return
+				}
 				this.radios.map((item, index) => {
 					item.checked = item.label === value ? true : false;
 				});
@@ -346,7 +393,14 @@
 			},
 			// 加入购物车
 			shoppingCartfun(row) {
-				console.log(row, 166);
+				if (this.checkStatus != '通过') {
+					uni.showToast({
+						title: "当前用户未授权,请联系客服",
+						icon: "none",
+						mask:true
+					});
+					return
+				}
 				if (row.inventory == 0) {
 					uni.showToast({
 						title: "当前商品库存为零",
@@ -437,17 +491,25 @@
 			// 最近搜索点击关闭按钮
 			tagClose(index) {
 				this.recentSearches.splice(index, 1)
-				uni.setStorageSync('recentSearches', this.recentSearches);
+				uni.setStorageSync('recentSearches', this.recentSearches.slice(0, 8));
 			},
 			selectProduct(item) {
+				if (this.checkStatus != '通过') {
+					uni.showToast({
+						title: "当前用户未授权,请联系客服",
+						icon: "none",
+						mask:true
+					});
+					return
+				}
 				uni.$u.route('/pages/views/buyGoods/commodityDetails', {
 					id: item.id
 				});
 			},
 			inSearch() {
-				uni.navigateTo({
-					url: `/pages/tabBar/searchPage?searchData=${this.name?this.name:''}`
-				})
+				// uni.navigateTo({
+				// 	url: `/pages/tabBar/searchPage?searchData=${this.name?this.name:''}`
+				// })
 			},
 			lowerBottom() {
 				this.status = 'loading'
@@ -460,7 +522,21 @@
 			},
 			// 搜索
 			custom() {
-				uni.removeStorageSync('homeSearch')
+				if(this.userInfo.tenant_id=='000000'){
+					uni.showToast({
+						title: '请点右下角<我的> 授权登录!',
+						icon :'none'
+					});
+					return
+				}
+				if (this.checkStatus != '通过') {
+					uni.showToast({
+						title: "当前用户未授权,请联系客服",
+						icon: "none",
+						mask:true
+					});
+					return
+				}
 				this.current = -1
 				this.page = {
 					total: 0,
@@ -471,8 +547,8 @@
 					this.recentSearches.unshift(this.name)
 					// 去重
 					this.recentSearches = this.recentSearches.filter((item, index) => this.recentSearches.indexOf(item) ===
-						index);
-					uni.setStorageSync('recentSearches', this.recentSearches);
+						index).slice(0, 8);
+					uni.setStorageSync('recentSearches', this.recentSearches.slice(0, 8));
 				}
 				delete this.search.brandId
 				this.search.cname = this.name
@@ -573,7 +649,7 @@
 
 	.tagClass {
 		display: flex;
-		padding: 41rpx 63rpx;
+		padding: 8rpx 63rpx 18rpx 63rpx;
 		background-color: #fff;
 		justify-content: space-around;
 
@@ -619,13 +695,13 @@
 			.cardKc {
 				text-align: center;
 				position: absolute;
-				right: 4rpx;
+				right: 0rpx;
 				top: 3rpx;
 				font-size: 22rpx;
 				color: #FFFFFF;
 				font-weight: 500;
-				width: 43rpx;
-				height: 28rpx;
+				width: 49rpx;
+				height: 26rpx;
 			}
 		}
 
@@ -636,4 +712,31 @@
 			font-weight: 500;
 		}
 	}
+	.recentSearches {
+		padding: 8rpx 12rpx;
+		background-color: #fff;
+	
+		.recentSearches-head {
+			display: flex;
+			align-items: center;
+			justify-content: space-between;
+			color: #C4C4C4;
+	
+			.recentSearches-headLeft {
+				display: flex;
+				align-items: center;
+			}
+	
+			.recentSearches-headRight {}
+		}
+	
+		.recentSearches-text {
+			display: flex;
+			flex-wrap: wrap;
+			align-items: baseline;
+			::v-deep .u-tag__close{
+				z-index: 99 !important;
+			}
+		}
+	}
 </style>

+ 79 - 6
pages/tabBar/home.vue

@@ -85,7 +85,7 @@
 			</view>
 			<u-loadmore v-if="page.total !== 0 && dataList.length != 0" :status="status" />
 			<u-back-top :scroll-top="scrollTop"></u-back-top>
-			<view v-if="userInfo.tenant_id != '000000'" class="suspensionBox" @click="salesmanShow=true">
+			<view v-if="userInfo.tenant_id != '000000'" class="suspensionBox" @click="opensalesman">
 				<u-icon name="server-fill" color="#2979ff" size="30"></u-icon>
 			</view>
 			<u-modal :show="salesmanShow" title="业务员联系方式" showCancelButton confirmText="拨号" cancelText="关闭"
@@ -309,6 +309,7 @@
 			uni.hideLoading();
 		},
 		onShow() {
+			this.getUpdate()
 			activityList({
 				current: 1,
 				size: 10,
@@ -346,10 +347,37 @@
 						this.phoneNumber = res.data.phone
 					})
 				}
-
 			})
 		},
 		methods: {
+			getUpdate() {
+				const updateManager = uni.getUpdateManager();
+				updateManager.onCheckForUpdate(function(res) {
+					// 请求完新版本信息的回调
+					if (res.hasUpdate) {
+						updateManager.onUpdateReady(function() {
+							uni.showModal({
+								title: '更新提示',
+								content: '新版本已经准备好,是否重启应用?',
+								success: function(res) {
+									if (res.confirm) {
+										// 新的版本已经下载好,调用 applyUpdate 应用新版本并重启
+										updateManager.applyUpdate();
+									}
+								}
+							});
+						});
+
+						updateManager.onUpdateFailed(function() {
+							// 新的版本下载失败
+							uni.showModal({
+								title: '已经有新版本了哟~',
+								content: '新版本已经上线啦~,请您删除当前小程序,重新搜索打开哟~'
+							});
+						});
+					}
+				});
+			},
 			refreshData() {
 				listAll({
 					type: 'PP',
@@ -381,13 +409,28 @@
 				this.onSearch()
 			},
 			insearchPage() {
-				uni.$emit('homeSearch', true)
-				uni.navigateTo({
-					url: '/pages/tabBar/homeSearch'
-				})
+				if (this.checkStatus != '通过') {
+					uni.showToast({
+						title: "当前用户未授权,请联系客服",
+						icon: "none",
+						mask: true
+					});
+					return
+				}
+				uni.switchTab({
+					url: '/pages/tabBar/classification'
+				});
 			},
 			// 车型
 			clickVehicle() {
+				if (this.checkStatus != '通过') {
+					uni.showToast({
+						title: "当前用户未授权,请联系客服",
+						icon: "none",
+						mask: true
+					});
+					return
+				}
 				this.$u.route('/pages/tabBar/vehicleModel');
 			},
 			swiperChange(e) {
@@ -548,6 +591,14 @@
 			},
 
 			click(name) {
+				if (this.checkStatus != '通过') {
+					uni.showToast({
+						title: "当前用户未授权,请联系客服",
+						icon: "none",
+						mask: true
+					});
+					return
+				}
 				if (name != undefined) {
 					this.page = {
 						total: 0,
@@ -588,7 +639,29 @@
 					id: item.id
 				});
 			},
+			opensalesman() {
+				if (this.checkStatus != '通过') {
+					uni.showToast({
+						title: "当前用户未授权,请联系客服",
+						icon: "none",
+						mask: true
+					});
+					return
+				}
+				this.salesmanShow = true
+			},
 			inIntegralMall() {
+				if (this.checkStatus != '通过') {
+					uni.showToast({
+						title: "当前用户未授权,请联系客服",
+						icon: "none",
+						mask: true
+					});
+					// uni.switchTab({
+					// 	url: '/pages/tabBar/home'
+					// })
+					return
+				}
 				uni.$u.route('/pages/integralMall/index');
 			}
 		}

+ 4 - 1
pages/tabBar/searchPage.vue

@@ -2,7 +2,7 @@
 	<view>
 		<view style="background-color: #E75F37;padding: 20rpx;">
 			<u-search placeholder="请输入商品名称" bgColor="#fff" searchIconColor='#E75F37' :actionStyle="{color:'#FFF'}"
-				:searchIconSize='24' v-model="keyword" @search="goBack()" @custom="goBack()" focus></u-search>
+				:searchIconSize='24' v-model="keyword" @search="goBack()" @custom="goBack()" focus @clear='clear'></u-search>
 		</view>
 		<view class="recentSearches" v-if="recentSearches.length != 0">
 			<view class="recentSearches-head">
@@ -42,6 +42,9 @@
 			this.keyword = data.searchData
 		},
 		methods: {
+			clear(){
+				console.log(11111)
+			},
 			goBack() {
 			uni.$emit('searchData', this.keyword)
 			uni.navigateBack({})

+ 30 - 1
pages/tabBar/shoppingCart.vue

@@ -29,7 +29,7 @@
 									:src="li.url" style="width: 200rpx;height: 200rpx;border-radius: 20rpx;">
 								</image>
 							</view>
-							<view style="width: 100%;margin-left: 8rpx;">
+							<view style="width: 100%;margin-left: 8rpx ;">
 								<view style="display: flex;justify-content: space-between;">
 									<u--text :text="ite.goodsName" size="24rpx" color='#797979' lines="2"></u--text>
 									<u-icon name="trash" size="40rpx" color='#C9C9C9'
@@ -141,6 +141,7 @@
 			}
 		},
 		onShow() {
+			this.getUpdate()
 			activityList({
 				current: 1,
 				size: 10,
@@ -235,6 +236,34 @@
 
 		},
 		methods: {
+			getUpdate() {
+				const updateManager = uni.getUpdateManager();
+				updateManager.onCheckForUpdate(function(res) {
+					// 请求完新版本信息的回调
+					if (res.hasUpdate) {
+						updateManager.onUpdateReady(function() {
+							uni.showModal({
+								title: '更新提示',
+								content: '新版本已经准备好,是否重启应用?',
+								success: function(res) {
+									if (res.confirm) {
+										// 新的版本已经下载好,调用 applyUpdate 应用新版本并重启
+										updateManager.applyUpdate();
+									}
+								}
+							});
+						});
+			
+						updateManager.onUpdateFailed(function() {
+							// 新的版本下载失败
+							uni.showModal({
+								title: '已经有新版本了哟~',
+								content: '新版本已经上线啦~,请您删除当前小程序,重新搜索打开哟~'
+							});
+						});
+					}
+				});
+			},
 			// 库存弹窗
 			inventoryfun(arr) {
 				let sum = ''