achao 2 éve
szülő
commit
d5018c841c

+ 1 - 1
App.vue

@@ -296,7 +296,7 @@
 			// #endif
 			// this.$socket.initWebIM(this.$ws, true, true)
 			let userInfo = uni.getStorageSync('userInfo') || '';
-			if (userInfo&&userInfo.id) {
+			if (userInfo && userInfo.id) {
 				//更新登陆状态
 				uni.getStorage({
 					key: 'userInfo',

+ 212 - 29
common/helper.js

@@ -57,39 +57,39 @@ const contactCustomerService = (phone) => {
 	}
 	const res = uni.getSystemInfoSync();
 	// ios系统默认有个模态框
-	if(res.platform=='ios'){
+	if (res.platform == 'ios') {
 		uni.makePhoneCall({
-		phoneNumber:phone,
-		success(){
-			console.log('拨打成功了');
-		},
-		fail() {
-			console.log('拨打失败了');
-		}
-	})
-	}else{
-	//安卓手机手动设置一个showActionSheet
+			phoneNumber: phone,
+			success() {
+				console.log('拨打成功了');
+			},
+			fail() {
+				console.log('拨打失败了');
+			}
+		})
+	} else {
+		//安卓手机手动设置一个showActionSheet
 		uni.showActionSheet({
-			itemList: [phone,'呼叫'],
-			success:function(res){
+			itemList: [phone, '呼叫'],
+			success: function(res) {
 				console.log(res);
-			   if(res.tapIndex==1){
-				uni.makePhoneCall({
-				  phoneNumber: phone,
-				success: (res) => {
-					console.log('调用成功!')
-					
-				},
-			  
-				// 失败回调
-				fail: (res) => {
-					console.log('调用失败!')
-					// contactCustomerService(item)
+				if (res.tapIndex == 1) {
+					uni.makePhoneCall({
+						phoneNumber: phone,
+						success: (res) => {
+							console.log('调用成功!')
+
+						},
+
+						// 失败回调
+						fail: (res) => {
+							console.log('调用失败!')
+							// contactCustomerService(item)
+						}
+					})
 				}
-				})
-			  }
 			}
-		  })
+		})
 	}
 	// console.log("联系客服")
 	// uni.makePhoneCall({
@@ -147,7 +147,7 @@ const getNowNumFormatDate = (num) => {
 	var seperator1 = "-";
 	var year = date.getFullYear();
 	var month = date.getMonth() + 1;
-	var strDate = date.getDate()+num;
+	var strDate = date.getDate() + num;
 	if (month >= 1 && month <= 9) {
 		month = "0" + month;
 	}
@@ -330,7 +330,190 @@ const filterArea = (q) => {
 }
 const fUN_AmapLocation = uni.requireNativePlugin('FUN-AmapLocation');
 
+function getDates() {
+	// var new_Date = new Date(t2)
+	var new_Date = new Date()
+	var timesStamp = new_Date.getTime()
+	var currenDay = new_Date.getDay()
+	var dates = []
+	for (var i = 0; i < 7; i++) {
+		dates.push(new Date(timesStamp + 24 * 60 * 60 * 1000 * (i - (currenDay + 6) % 7)).toLocaleDateString().replace(
+			/[年月]/g, '-').replace(/[日上下午]/g, ''));
+	}
+	var weekStar = new Date(dates[0] + ' 00:00:00').getTime()
+	var weekEnd = new Date(dates[dates.length - 1] + ' 23:59:59').getTime()
+	var week = [weekStar, weekEnd]
+	return week
+}
+//判断是否是今天,昨天,明天
+function isToday(str, type) {
+	//type == 0 判断是否是今天,type == 1 判断是否是昨天,type == 2 判断是否是明天
+	if (type == 0) {
+		if (new Date(str).toDateString() === new Date().toDateString()) {
+			// console.log('今天');
+			return true
+		} else {
+			// console.log('不是今天');
+			return false
+		}
+	}
+	if (type == 1) {
+		if (new Date(str).toDateString() === new Date(new Date().getTime() - 1000 * 60 * 60 * 24).toDateString()) {
+			// console.log('昨天');
+			return true
+		} else {
+			// console.log('不是昨天');
+			return false
+		}
+	}
+	if (type == 2) {
+		if (new Date(str).toDateString() === new Date(new Date().getTime() + 1000 * 60 * 60 * 24).toDateString()) {
+			// console.log('明天');
+			return true
+		} else {
+			// console.log('不是明天');
+			return false
+		}
+	}
+}
+const changeTime = (t1) => {
+	// console.log(t1)
+	// t1截止时间  t2当前时间
+	// 调用getDtes函数把当前时间传过去,获取本周一和本周日时间戳
+	// var weeks = getDates(t2)
+	var weeks = getDates()
+	// console.log(weeks)
+	var dateBegin = new Date(t1.replace(/-/g, '/')) //解决ios时new Date(2021-04-17 09:50:20)报错
+	// var dateEnd = new Date(t2)
+	var dateEnd = new Date()
+	// 时间戳
+	var end = dateBegin.getTime()
+	// console.log(end)
+	var nows = dateEnd.getTime()
+	// console.log(nows)
+	// 获取当天0点时间戳todayStar
+	const start = new Date(new Date(dateEnd).toLocaleDateString())
+	start.setTime(start.getTime())
+	var todayStar = new Date(start).getTime()
+	// console.log(todayStar)
+	// 获取当天23点59分59秒时间戳todayEnd
+	var ends = new Date(new Date(new Date(dateEnd).toLocaleDateString()).getTime() + 24 * 60 * 60 * 1000 - 1)
+	var todayEnd = new Date(ends).getTime()
+	// console.log(todayEnd)
+	// 时间差的毫秒数
+	var dateDiff = Math.abs(dateBegin.getTime() - dateEnd.getTime())
+	// 计算出相差天数
+	var dayDiff = Math.floor(dateDiff / (24 * 3600 * 1000))
+	// console.log(dayDiff);
+	// 计算天数后剩余的毫秒数
+	var leave1 = dateDiff % (24 * 3600 * 1000)
+	// 计算出小时数
+	var hours = Math.floor(leave1 / (3600 * 1000))
+	// console.log(hours);
+	// 计算相差分钟数
+	var leave2 = leave1 % (3600 * 1000) // 计算小时数后剩余的毫秒数
+	// 计算相差分钟数
+	var minutes = Math.floor(leave2 / (60 * 1000))
+	// console.log(minutes);
+	// t1截止时间  t2当前时间
+
+	if (dateEnd < dateBegin) {
+		if ((dayDiff === 0)) {
+			if (hours === 0) {
+				if (minutes < 30 || minutes == 30) {
+					return minutes + '分钟后'
+				} else {
+					return '今天' + t1.substring(10, 16)
+				}
+			} else {
+				if (isToday(end, 0)) {
+					return '今天' + t1.substring(10, 16)
+				} else {
+					return '明天' + t1.substring(10, 16)
+				}
+			}
+		} else if (dayDiff === 1) {
+			if (isToday(end, 2)) {
+				return '明天' + t1.substring(10, 16)
+			} else {
+				if ((weeks[0] < end || weeks[0] == end) && (weeks[1] > end || weeks[1] == end)) {
+					var weekArray = new Array('日', '一', '二', '三', '四', '五', '六')
+					var week = weekArray[new Date(t1.replace(/-/g, '/')).getDay()] // 注意此处必须是先new一个Date
+					return '周' + week + t1.substring(10, 16)
+				} else {
+					return t1.substring(0, 16).replace(/-/g, '/')
+				}
+			}
+		} else {
+			if ((weeks[0] < end || weeks[0] == end) && (weeks[1] > end || weeks[1] == end)) {
+				var weekArray = new Array('日', '一', '二', '三', '四', '五', '六')
+				var week = weekArray[new Date(t1.replace(/-/g, '/')).getDay()] // 注意此处必须是先new一个Date
+				return '周' + week + t1.substring(10, 16)
+			} else {
+				return t1.substring(0, 16).replace(/-/g, '/')
+			}
+		}
+	}
+	if (dateEnd === dateBegin) {
+		return '刚刚'
+	}
+	if (dateEnd > dateBegin) {
+		if (dayDiff === 0) {
+			if (hours === 0) {
+				if (minutes < 60 || minutes == 60) {
+					if (minutes < 5 || minutes == 5) {
+						return '刚刚'
+					} else {
+						return minutes + '分钟前'
+					}
+				} else {
+					return '今天' + t1.substring(10, 16)
+				}
+			} else {
+				if (isToday(end, 0)) {
+					return hours + '小时前'
+				} else {
+
+					return '昨天' + t1.substring(10, 16)
+				}
+			}
+		} else if (dayDiff === 1) {
+			if (isToday(end, 1)) {
+				// return '昨天' + t1.substring(10, 16)
+				return dayDiff + '天前'
+			} else {
+				if ((weeks[0] < end || weeks[0] == end) && (weeks[1] > end || weeks[1] == end)) {
+					var weekArray = new Array('日', '一', '二', '三', '四', '五', '六')
+					var week = weekArray[new Date(t1.replace(/-/g, '/')).getDay()] // 注意此处必须是先new一个Date
+					return '周' + week + t1.substring(10, 16)
+				} else {
+					return t1.substring(0, 16).replace(/-/g, '/')
+				}
+			}
+		} else if (dayDiff < 30) {
+			// return  dayDiff +'天前'+ t1.substring(10, 16)
+			return dayDiff + '天前'
+
+		} else if (dayDiff > 30 && dayDiff < 365) {
+			return t1.substring(5, 10)
+
+		} else if (dayDiff > 365) {
+
+			return t1.substring(0, 4)
+
+		} else {
+			if ((weeks[0] < end || weeks[0] == end) && (weeks[1] > end || weeks[1] == end)) {
+				var weekArray = new Array('日', '一', '二', '三', '四', '五', '六')
+				var week = weekArray[new Date(t1.replace(/-/g, '/')).getDay()] // 注意此处必须是先new一个Date
+				return '周' + week + t1.substring(10, 16)
+			} else {
+				return t1.substring(0, 16).replace(/-/g, '/')
+			}
+		}
+	}
+}
 export default {
+	changeTime,
 	detailData,
 	selectContractNo,
 	contactCustomerService,

A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 192 - 167
components/mehaotian-search-revision.vue


+ 409 - 0
components/search.vue

@@ -0,0 +1,409 @@
+<template>
+	<view class="content">
+		<view class="search-box">
+			<!-- mSearch组件 如果使用原样式,删除组件元素-->
+			<mSearch class="mSearch-input-box" :mode="2" button="inside" :placeholder="defaultKeyword"
+				@search="doSearch(false)" @input="inputChange" @confirm="doSearch(false)" v-model="keyword"></mSearch>
+			<view class="cancel" @click="cancel">
+				取消
+			</view>
+			<!-- 原样式 如果使用原样式,恢复下方注销代码 -->
+			<!-- 						
+			<view class="input-box">
+				<input type="text" :adjust-position="true" :placeholder="defaultKeyword" @input="inputChange" v-model="keyword" @confirm="doSearch(false)"
+				 placeholder-class="placeholder-class" confirm-type="search">
+			</view>
+			<view class="search-btn" @tap="doSearch(false)">搜索</view> 
+			 -->
+			<!-- 原样式 end -->
+		</view>
+		<view class="search-keyword">
+			<scroll-view class="keyword-list-box" v-show="isShowKeywordList" scroll-y>
+				<block v-for="(row,index) in keywordList" :key="index">
+					<view class="keyword-entry" hover-class="keyword-entry-tap">
+						<view class="keyword-text" @tap.stop="doSearch(keywordList[index].keyword)">
+							<rich-text :nodes="row.htmlStr"></rich-text>
+						</view>
+						<view class="keyword-img" @tap.stop="setKeyword(keywordList[index].keyword)">
+							<image src="/static/HM-search/back.png"></image>
+						</view>
+					</view>
+				</block>
+
+			</scroll-view>
+			<scroll-view class="keyword-box" v-show="!isShowKeywordList" scroll-y>
+				<view class="keyword-block" v-if="oldKeywordList.length>0">
+					<view class="keyword-list-header">
+						<view style="font-size: 32rpx; font-weight: 700;">最近搜索</view>
+						<view>
+							<image @tap="oldDelete" src="/static/HM-search/delete.png"></image>
+						</view>
+					</view>
+					<view class="keyword">
+						<view v-for="(keyword,index) in oldKeywordList" @tap="doSearch(keyword)" :key="index">
+							{{keyword}}
+						</view>
+					</view>
+				</view>
+				<view class="keyword-block">
+					<view class="keyword-list-header">
+						<view style="font-size: 32rpx; font-weight: 700;">推荐搜索</view>
+						<view>
+							<image @tap="hotToggle" :src="'/static/HM-search/attention'+forbid+'.png'"></image>
+						</view>
+					</view>
+					<view class="keyword" v-if="forbid==''">
+						<view v-for="(keyword,index) in hotKeywordList" @tap="doSearch(keyword)" :key="index">
+							{{keyword}}
+						</view>
+					</view>
+					<view class="hide-hot-tis" v-else>
+						<view>当前搜热门搜索已隐藏</view>
+					</view>
+				</view>
+			</scroll-view>
+		</view>
+	</view>
+</template>
+
+<script>
+	import mSearch from '@/components/mehaotian-search-revision.vue';
+	export default {
+		name: "search",
+		data() {
+			return {
+				defaultKeyword: "请输入作物名称或用户名称",
+				keyword: "",
+				oldKeywordList: [],
+				hotKeywordList: [],
+				keywordList: [],
+				forbid: '',
+				isShowKeywordList: false
+			};
+		},
+		components: {
+			//引用mSearch组件,如不需要删除即可
+			mSearch
+		},
+		mounted() {
+			this.init();
+		},
+		methods: {
+			cancel() {
+				this.$emit('searchVal', '')
+			},
+			init() {
+				this.loadDefaultKeyword();
+				this.loadOldKeyword();
+				this.loadHotKeyword();
+
+			},
+			blur() {
+				uni.hideKeyboard()
+			},
+			//加载默认搜索关键字
+			loadDefaultKeyword() {
+				//定义默认搜索关键字,可以自己实现ajax请求数据再赋值,用户未输入时,以水印方式显示在输入框,直接不输入内容搜索会搜索默认关键字
+				// this.defaultKeyword = "默认关键字";
+			},
+			//加载历史搜索,自动读取本地Storage
+			loadOldKeyword() {
+				uni.getStorage({
+					key: 'OldKeys',
+					success: (res) => {
+						var OldKeys = JSON.parse(res.data);
+						this.oldKeywordList = OldKeys;
+					}
+				});
+			},
+			//加载热门搜索
+			loadHotKeyword() {
+				//定义热门搜索关键字,可以自己实现ajax请求数据再赋值
+				this.hotKeywordList = ['键盘', '鼠标', '显示器', '电脑主机', '蓝牙音箱', '笔记本电脑', '鼠标垫', 'USB', 'USB3.0'];
+			},
+			//监听输入
+			inputChange(event) {
+				//兼容引入组件时传入参数情况
+				var keyword = event.detail ? event.detail.value : event;
+				if (!keyword) {
+					this.keywordList = [];
+					this.isShowKeywordList = false;
+					return;
+				}
+				this.isShowKeywordList = true;
+				//以下示例截取淘宝的关键字,请替换成你的接口
+				uni.request({
+					url: 'https://suggest.taobao.com/sug?code=utf-8&q=' + keyword, //仅为示例
+					success: (res) => {
+						this.keywordList = [];
+						this.keywordList = this.drawCorrelativeKeyword(res.data.result, keyword);
+
+					}
+				});
+			},
+			//高亮关键字
+			drawCorrelativeKeyword(keywords, keyword) {
+				var len = keywords.length,
+					keywordArr = [];
+				for (var i = 0; i < len; i++) {
+					var row = keywords[i];
+					//定义高亮#9f9f9f
+					var html = row[0].replace(keyword, "<span style='color: #9f9f9f;'>" + keyword + "</span>");
+					html = '<div>' + html + '</div>';
+					var tmpObj = {
+						keyword: row[0],
+						htmlStr: html
+					};
+					keywordArr.push(tmpObj)
+				}
+				return keywordArr;
+			},
+			//顶置关键字
+			setKeyword(index) {
+				this.keyword = this.keywordList[index].keyword;
+			},
+			//清除历史搜索
+			oldDelete() {
+				uni.showModal({
+					content: '确定清除历史搜索记录?',
+					success: (res) => {
+						if (res.confirm) {
+							console.log('用户点击确定');
+							this.oldKeywordList = [];
+							uni.removeStorage({
+								key: 'OldKeys'
+							});
+						} else if (res.cancel) {
+							console.log('用户点击取消');
+						}
+					}
+				});
+			},
+			//热门搜索开关
+			hotToggle() {
+				this.forbid = this.forbid ? '' : '_forbid';
+			},
+			//执行搜索
+			doSearch(keyword) {
+				keyword = keyword === false ? this.keyword : keyword;
+				this.keyword = keyword;
+				this.saveKeyword(keyword); //保存为历史 
+				// uni.showToast({
+				// 	title: keyword,
+				// 	icon: 'none',
+				// 	duration: 2000
+				// });
+				this.$emit('searchVal', this.keyword)
+				//以下是示例跳转淘宝搜索,可自己实现搜索逻辑
+				/*
+				//#ifdef APP-PLUS
+				plus.runtime.openURL(encodeURI('taobao://s.taobao.com/search?q=' + keyword));
+				//#endif
+				//#ifdef H5
+				window.location.href = 'taobao://s.taobao.com/search?q=' + keyword
+				//#endif
+				*/
+			},
+			//保存关键字到历史记录
+			saveKeyword(keyword) {
+				uni.getStorage({
+					key: 'OldKeys',
+					success: (res) => {
+						var OldKeys = JSON.parse(res.data);
+						var findIndex = OldKeys.indexOf(keyword);
+						if (findIndex == -1) {
+							OldKeys.unshift(keyword);
+						} else {
+							OldKeys.splice(findIndex, 1);
+							OldKeys.unshift(keyword);
+						}
+						//最多10个纪录
+						OldKeys.length > 10 && OldKeys.pop();
+						uni.setStorage({
+							key: 'OldKeys',
+							data: JSON.stringify(OldKeys)
+						});
+						this.oldKeywordList = OldKeys; //更新历史搜索
+					},
+					fail: (e) => {
+						var OldKeys = [keyword];
+						uni.setStorage({
+							key: 'OldKeys',
+							data: JSON.stringify(OldKeys)
+						});
+						this.oldKeywordList = OldKeys; //更新历史搜索
+					}
+				});
+			}
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	view {
+		// display: block;
+	}
+
+	.content {
+		overflow: hidden;
+		background: #fff;
+	}
+
+	.cancel {
+		font-size: 28rpx;
+		color: #333333;
+	}
+
+	.search-box {
+		width: 100%;
+		background-color: #fff;
+		padding: 15upx 2.5%;
+		display: flex;
+		justify-content: space-between;
+		position: sticky;
+		top: 0;
+		align-items: center;
+	}
+
+	.search-box .mSearch-input-box {
+		width: 90%;
+	}
+
+	.search-box .input-box {
+		width: 85%;
+		flex-shrink: 1;
+		display: flex;
+		justify-content: center;
+		align-items: center;
+	}
+
+	.search-box .search-btn {
+		width: 15%;
+		margin: 0 0 0 2%;
+		display: flex;
+		justify-content: center;
+		align-items: center;
+		flex-shrink: 0;
+		font-size: 28upx;
+		color: #fff;
+		background: linear-gradient(to right, #ff9801, #ff570a);
+		border-radius: 60upx;
+	}
+
+	.search-box .input-box>input {
+		width: 100%;
+		height: 60upx;
+		font-size: 32upx;
+		border: 0;
+		border-radius: 60upx;
+		-webkit-appearance: none;
+		-moz-appearance: none;
+		appearance: none;
+		padding: 0 3%;
+		margin: 0;
+		background-color: #ffffff;
+	}
+
+	.placeholder-class {
+		color: #9e9e9e;
+	}
+
+	.search-keyword {
+		width: 100%;
+		background-color: rgb(242, 242, 242);
+	}
+
+	.keyword-list-box {
+		height: calc(100vh - 110upx);
+		padding-top: 10upx;
+		border-radius: 20upx 20upx 0 0;
+		background-color: #fff;
+	}
+
+	.keyword-entry-tap {
+		background-color: #eee;
+	}
+
+	.keyword-entry {
+		width: 94%;
+		height: 80upx;
+		margin: 0 3%;
+		font-size: 30upx;
+		color: #333;
+		display: flex;
+		justify-content: space-between;
+		align-items: center;
+		border-bottom: solid 1upx #e7e7e7;
+	}
+
+	.keyword-entry image {
+		width: 60upx;
+		height: 60upx;
+	}
+
+	.keyword-entry .keyword-text,
+	.keyword-entry .keyword-img {
+		height: 80upx;
+		display: flex;
+		align-items: center;
+	}
+
+	.keyword-entry .keyword-text {
+		width: 90%;
+	}
+
+	.keyword-entry .keyword-img {
+		width: 10%;
+		justify-content: center;
+	}
+
+	.keyword-box {
+		height: calc(100vh - 280rpx);
+		background-color: #fff;
+	}
+
+	.keyword-box .keyword-block {
+		padding: 10upx 0;
+	}
+
+	.keyword-box .keyword-block .keyword-list-header {
+		width: 94%;
+		padding: 10upx 3%;
+		font-size: 27upx;
+		color: #333;
+		display: flex;
+		justify-content: space-between;
+	}
+
+	.keyword-box .keyword-block .keyword-list-header image {
+		width: 40upx;
+		height: 40upx;
+	}
+
+	.keyword-box .keyword-block .keyword {
+		width: 100%;
+		padding: 3px 3%;
+		display: flex;
+		flex-flow: wrap;
+		justify-content: flex-start;
+	}
+
+	.keyword-box .keyword-block .hide-hot-tis {
+		display: flex;
+		justify-content: center;
+		font-size: 28upx;
+	}
+
+	.keyword-box .keyword-block .keyword>view {
+		display: flex;
+		justify-content: center;
+		align-items: center;
+		border-radius: 60upx;
+		padding: 0 20upx;
+		margin: 10upx 20upx 10upx 0;
+		height: 56rpx;
+		font-size: 24rpx;
+		background-color: #F5F6F9;
+		color: #333333;
+	}
+</style>

+ 2 - 1
components/selectAddress.vue

@@ -58,6 +58,7 @@
 				this.multiArray[0].push(address[i])
 
 			}
+			// this.$emit('selectAddress', '')
 		},
 		methods: {
 			columnchange(e) {
@@ -88,7 +89,7 @@
 				let _address = ''
 				let _showVal = ''
 				if (this.multiArray[0][e.detail.value[0]].label == '全国') {
-					_address = ""
+					_address = "全国"
 					_showVal = '全国'
 				} else if (this.multiArray[1][e.detail.value[1]]
 					.label == '全部') {

+ 12 - 4
components/upload_small.vue

@@ -87,8 +87,8 @@
 			},
 			// 最大上传数量
 			maxCount: {
-				type: [String, Number],
-				default: 52
+				type: Number,
+				default: 9
 			},
 			//  是否显示进度条
 			showProgress: {
@@ -259,7 +259,7 @@
 				// 设置为只选择图片的时候使用 chooseImage 来实现
 				chooseFile = new Promise((resolve, reject) => {
 					uni.chooseImage({
-						count: multiple ? (newMaxCount > 9 ? 9 : newMaxCount) : 1,
+						count: multiple ? (newMaxCount >= 9 ? 9 : newMaxCount) : 1,
 						sourceType: sourceType,
 						sizeType,
 						success: resolve,
@@ -277,6 +277,7 @@
 								this.$emit('on-oversize', val, this.lists);
 								this.showToast('超出允许的文件大小');
 							} else {
+								console.log(1)
 								if (maxCount <= lists.length) {
 									this.$emit('on-exceed', val, this.lists);
 									this.showToast('超出最大允许的文件个数');
@@ -338,9 +339,15 @@
 			},
 			// 上传图片
 			async uploadFile(index = 0) {
+
+				console.log(2)
+				console.log("index", index)
+				console.log("this.disabled", this.disabled)
+				console.log("uploading", this.uploading)
 				if (this.disabled) return;
 				if (this.uploading) return;
 				// 全部上传完成
+				console.log("this.lists.length", this.lists.length)
 				if (index >= this.lists.length) {
 					this.$emit('on-uploaded', this.lists);
 					return;
@@ -373,7 +380,8 @@
 					}
 				}
 				this.lists[index].error = false;
-				this.uploading = true;
+				// this.uploading = true;
+				console.log(3)
 				uploadImage(this.lists[index].url, 'appData/',
 					result => {
 						// 上传成功

+ 2 - 3
config/index.js

@@ -5,9 +5,8 @@ const dev = {
 	// baseUrlNew: 'http://192.168.1.118:8090/',
 	// baseUrlNew: 'http://192.168.110.9:9100/',
 	// baseUrlNew: 'http://192.168.110.138:8090/',
-	// baseUrlNew: 'http://192.168.110.82:8099/',
-	 // baseUrlNew: 'http://192.168.110.82:8090/',
-	baseUrlNew: 'http://192.168.110.202:8090/',
+	baseUrlNew: 'http://192.168.110.82:8090/',
+	// baseUrlNew: 'http://192.168.110.202:8090/',
 	// baseUrlNew: 'http://192.168.110.138:8090/',
 	// 上传图片的
 	// baseUrlNew: 'https://api2.eliangeyun.com/',

+ 48 - 8
pages.json

@@ -713,15 +713,23 @@
 			}
 
 		},
-		// {
-		// 	"path": "pages/business/businessNew",
-		// 	"style": {
-		// 		"navigationStyle": "custom",
-		// 		"navigationBarTitleText": "交易",
-		// 		"enablePullDownRefresh": true
-		// 	}
+		{
+			"path": "pages/business/businessNew",
+			"style": {
+				"navigationBarTitleText": "交易",
+				"titleNView": {
+					"autoBackButton": false,
+					"backgroundColor": "#fff",
+					"buttons": [{
+						"fontSrc": "/static/followIicon/iconfont.ttf",
+						"float": "right",
+						"text": "\uff2d",
+						"fontSize": "22px"
+					}]
+				}
+			}
 
-		// },
+		},
 
 		{
 			"path": "pages/release/release",
@@ -1646,6 +1654,38 @@
 				"enablePullDownRefresh": false
 			}
 
+		}, {
+			"path": "pages/business/release",
+			"style": {
+				"navigationBarTitleText": "发布",
+				"enablePullDownRefresh": false,
+				"app-plus": {
+					"titleNView": {
+						"buttons": [{
+							"float": "right",
+							"fontSize": "14px",
+							"text": "记录",
+							"color": "#333333",
+							"width": "40px"
+						}]
+					}
+
+				}
+			}
+		}, {
+			"path": "pages/business/record",
+			"style": {
+				"navigationBarTitleText": "发布记录",
+				"enablePullDownRefresh": false
+			}
+
+		}, {
+			"path": "pages/business/myAttention",
+			"style": {
+				"navigationBarTitleText": "我的关注",
+				"enablePullDownRefresh": false
+			}
+
 		}
 	],
 	"subpackages": [{

+ 342 - 51
pages/business/businessNew.vue

@@ -1,55 +1,136 @@
 <template>
 	<view>
-		<u-navbar back-text="" title="交易" title-size='36' back-icon-name='search' :title-bold='true'
-			:border-bottom='false' back-icon-color='#333333' title-color='#000000'>
-			<view class="slot-wrap" slot="right">
-				我的关注
+		<view v-if="!isShowSearch">
+			<view class="top-warp">
+				<view class="search">
+					<view class="place">
+						<selectAddress @selectAddress='selectAddress'></selectAddress>
+						<!-- 					<picker @change="bindPickerChange" :value="multiIndex" :range="multiArray" range-key='label'
+							mode="multiSelector" @columnchange='columnchange'>
+							<view class="text">{{searchPlace}}</view>
+						</picker> -->
+						<u-icon name="arrow-down" color="#333333" size="17" bold style='margin-left: 6rpx;'></u-icon>
+					</view>
+					<u-search placeholder="请输入作物名称或用户名称" v-model="keyword" :input-style='inputStyle'
+						:show-action="false" disabled @click='toSearch'>
+					</u-search>
+				</view>
+				<me-tabs v-model="tabIndex" :tabs="tabs" @change="tabChange"></me-tabs>
 			</view>
-		</u-navbar>
-		<view class="top-warp">
-			<me-tabs v-model="tabIndex" :tabs="tabs" @change="tabChange"></me-tabs>
-		</view>
-		<mescroll-body ref="mescrollRef" @init="mescrollInit" top="80" @down="downCallback" :up="upOption"
-			@up="upCallback" @emptyclick="emptyClick">
-			<!-- 数据列表 -->
-			<view class="list" v-if="goods.length!=0">
-				<view class="list-item" v-for="(item,index) in goods">
-					<view class="row1 flex jcsb alc">
-						<view class="left flex alc">
-							<image src="../../static/img/face/27.png" mode="widthFix" class="head-img"></image>
-							<view class="">
-								<view class="title">
-									中天昊元粮库
-								</view>
-								<view class="bottom">
-									<text class="color1">采购</text>
-									<text class="color2">销售</text>
-									<text class="color3">5分钟前</text>
+			<mescroll-body ref="mescrollRef" @init="mescrollInit" top="180" @down="downCallback" :up="upOption"
+				@up="upCallback" @emptyclick="emptyClick">
+				<!-- 数据列表 -->
+				<view class="list" v-if="goods.length!=0">
+					<view class="list-item" v-for="(item,index) in goods">
+						<view class="row1 flex jcsb alc">
+							<view class="left flex alc">
+								<image
+									:src="item.commonUser.avatarUrl?item.commonUser.avatarUrl:'../../static/img/face/27.png'"
+									mode="widthFix" class="head-img"></image>
+								<view class="">
+									<view class="title">
+										{{item.publisher}}
+									</view>
+									<view class="bottom" style="margin-top: 6rpx;">
+										<text class="color1" v-if="item.tranType=='采购'">采购</text>
+										<text class="color2" v-if="item.tranType=='销售'">销售</text>
+										<text class="color3">{{$helper.changeTime(item.updateDate)}}</text>
+									</view>
 								</view>
 							</view>
+							<view class="right" v-if="item.followed==1" @click="follow(item,1)">
+								<text class="case" style="color:#878C9C;">已关注</text>
+							</view>
+							<view class="right" v-else @click="follow(item,2)">
+								<u-icon name="plus" color="#333333" size="17" bold></u-icon><text class="case">关注</text>
+							</view>
+
+						</view>
+						<view class="row2">
+							<mote-lines-divide :dt="item.publishingContent" :line="3" expandText="展开" foldHint="收起" />
+						</view>
+						<view class="row3">
+							<image :src="item1" mode="aspectFill" v-for="(item1,index) in item.imgList" class="img">
+							</image>
+							<!-- 	<u-row justify="space-between" gutter="10">
+								<u-col span="4">
+									<view class="demo-layout bg-purple">
+										<image src="../../static/img/liangmai/bg.png" mode="aspectFill"
+											style="width: 100%;height: 100%;"></image>
+									</view>
+								</u-col>
+								<u-col span="4">
+									<view class="demo-layout bg-purple-light">
+										<image src="../../static/img/liangmai/bg.png" mode="aspectFill"
+											style="width: 100%;height: 100%;"></image>
+									</view>
+								</u-col>
+								<u-col span="4">
+									<view class="demo-layout bg-purple">
+										<image src="../../static/img/liangmai/bg.png" mode="aspectFill"
+											style="width: 100%;height: 100%;"></image>
+									</view>
+								</u-col>
+							</u-row> -->
 						</view>
-						<view class="right">
-							<u-icon name="plus" color="#333333" size="17"></u-icon><text class="case">关注</text>
+						<view class="row4">
+							<u-icon name="map-fill" color="#AFB3BF" size="28" bold></u-icon>
+							<text class="text">{{item.placeDelivery}}</text>
 						</view>
 					</view>
 				</view>
-			</view>
 
-			<!-- <good-list :list="goods"></good-list> -->
-		</mescroll-body>
+				<!-- <good-list :list="goods"></good-list> -->
+			</mescroll-body>
+			<view class="add" @click="release">
+				<u-icon name="plus" color="#fff" size="34" bold></u-icon>
+			</view>
+			<u-modal v-model="show" content="确定不在关注?" :show-title='false' :show-cancel-button='true'
+				:content-style="contentStyle" showCancelButton='true'></u-modal>
+		</view>
+		<search v-if="isShowSearch" @searchVal='searchVal'></search>
+		<u-modal v-model="isShowAlert" :title-style="{fontSize: '18px',fontWeight:'500'}"
+			:content-style="{fontSize: '14px',fontWeight:'400'}" confirm-color='#22C572' confirm-text='确定' title='提示'
+			showCancelButton='false' content="尚未登录,是否立即登录" @confirm="alertBtn" @cancel="cancelClick"></u-modal>
+		<u-toast ref="uToast" />
 	</view>
 </template>
 
 <script>
 	import MescrollMixin from "@/components/mescroll-uni/mescroll-mixins.js";
+	import MoteLinesDivide from "@/components/text-over-flow"
+	import selectAddress from "@/components/selectAddress.vue"
+	import search from "@/components/search.vue"
 	import {
 		apiGoods
 	} from "@/api/mock.js"
-
+	import {
+		mapState
+	} from 'vuex';
 	export default {
+		components: {
+			MoteLinesDivide,
+			selectAddress,
+			search
+		},
 		mixins: [MescrollMixin], // 使用mixin
 		data() {
 			return {
+				canReset: false,
+				selectPlace: '',
+				mescroll: null,
+				isShowAlert: false,
+				contentStyle: {
+					"font-weight": 700
+				},
+				isShowSearch: false,
+				selectItem: {},
+				show: false,
+				keyword: '',
+				inputStyle: {
+					// "padding-left": '30rpx'
+				},
+				content: '上半年,普陀区开展“绿剑”系列执法行动二次,共计出动执法人员120余人次,检有关经营主体87余家次,发放宣传资料等200余份;加强农产品和农业…上半年,普陀区开展“绿剑”系列执法行动二次,共计出动执法人员120余人次,检有关经营主体87余家次,发放宣传资料等200余份;加强农产品和农业…',
 				upOption: {
 					// page: {
 					// 	num: 0, // 当前页码,默认0,回调之前会加1,即callback(page)会从1开始
@@ -78,7 +159,9 @@
 				tabIndex: 0 // tab下标
 			}
 		},
-
+		computed: {
+			...mapState(['hasLogin', 'userInfo', 'clientId']),
+		},
 
 		onShow() {
 			uni.showTabBar()
@@ -118,27 +201,131 @@
 					});
 				}
 			})
-		},
-		onLoad(options) {
+			this.$nextTick(function() {
+				this.canReset && this.mescroll.resetUpScroll() // 重置列表数据为第一页  
+				this.canReset && this.mescroll.scrollTo(0, 0) // 重置列表数据为第一页时,建议把滚动条也重置到顶部,避免无法再次翻页的问题  
+				this.canReset = true // 过滤第一次的onShow事件,避免初始化界面时重复触发upCallback, 无需配置auto:false
+			});
 
 		},
-
+		onLoad(options) {},
+		onNavigationBarButtonTap(e) {
+			console.log(e)
+			uni.navigateTo({
+				url: 'myAttention'
+			})
+		},
 
 		methods: {
-			/*上拉加载的回调: 其中page.num:当前页 从1开始, page.size:每页数据条数,默认10 */
+			mescrollInit(mescroll) {
+				console.log("mescroll", mescroll)
+				this.mescroll = mescroll;
+			},
+			cancelClick() {
+				this.isShowAlert = false
+			},
+			alertBtn() {
+				uni.navigateTo({
+					url: '/pages/public/login'
+				})
+			},
+			searchVal(e) {
+				console.log(e)
+				this.isShowSearch = false
+				this.keyword = e
+			},
+			toSearch() {
+				this.isShowSearch = true
+			},
+			follow(val, type) {
+				// 2关注
+				this.selectItem = val
+				if (type == 1) {
+					this.show = true
+				} else {
+					let _obj = {
+						userId: this.userInfo.id,
+						followedId: val.userId
+					}
+					uni.showLoading({
+						title: '数据加载中',
+						mask: true
+					})
+					this.$api.doRequest('post', '/followInformation/api/addInfo', _obj).then(res => {
+						if (res.data.code == 200) {
+							this.$refs.uToast.show({
+								title: '关注成功',
+								type: 'success',
+							})
+							this.mescroll.resetUpScroll()
+						}
+						uni.hideLoading()
+					})
+				}
+
+			},
+			selectAddress(val) {
+				this.selectPlace = val
+				this.mescroll.resetUpScroll() // 再刷新列表数据
+				console.log(val)
+			},
+			release() {
+				if (!this.hasLogin) {
+					this.isShowAlert = true;
+
+				} else {
+					uni.navigateTo({
+						url: 'release'
+					})
+				}
+
+			},
+			downCallback() {
+				this.mescroll.resetUpScroll();
+			},
 			upCallback(page) {
-				//联网加载数据
-				let curTab = this.tabs[this.tabIndex]
-				let keyword = curTab.name // 具体项目中,您可能取的是tab中的type,status等字段
-				apiGoods(page.num, page.size, keyword).then(res => {
-					//联网成功的回调,隐藏下拉刷新和上拉加载的状态;
-					this.mescroll.endSuccess(res.list.length);
-					//设置列表数据
-					if (page.num == 1) this.goods = []; //如果是第一页需手动制空列表
-					this.goods = this.goods.concat(res.list); //追加新数据
-				}).catch(() => {
-					//联网失败, 结束加载
-					this.mescroll.endErr();
+				uni.showLoading({
+					title: '数据加载中',
+					mask: true
+				})
+				console.log("this.selectPlace", this.selectPlace)
+				console.log("this.selectType", this.selectType)
+				let _obj = {
+
+				}
+				if (this.selectType == '关注') {
+					_obj = {
+						pageSize: page.size,
+						currentPage: page.num,
+						placeDelivery: this.selectPlace,
+						tranType: this.selectType,
+						userIdFollow: this.userInfo.id,
+						nowUserId: this.userInfo.id
+					}
+				} else {
+					_obj = {
+						pageSize: page.size,
+						currentPage: page.num,
+						placeDelivery: this.selectPlace,
+						tranType: this.selectType,
+						nowUserId: this.userInfo.id
+					}
+				}
+				this.$api.doRequest('get', '/transactionExchangeInfo/selectTransactionExchangeInfo', _obj).then(res => {
+					console.log(res.data.data.records)
+					if (res.data.code == 200) {
+						let curPageData = res.data.data.records;
+						let curPageLen = curPageData.length;
+						let totalPage = res.data.data.total;
+						if (page.num == 1) this.goods = [];
+						this.goods = this.goods.concat(curPageData);
+						console.log(curPageLen, totalPage)
+						this.mescroll.endByPage(curPageLen, totalPage);
+						for (let i = 0; i < this.goods.length; i++) {
+							this.goods[i].imgList = this.goods[i].urlImg.split(',')
+						}
+					}
+					uni.hideLoading()
 				})
 			},
 			//点击空布局按钮的回调
@@ -149,8 +336,16 @@
 			},
 
 			// 切换菜单
-			tabChange() {
+			tabChange(e) {
 				this.goods = [] // 先置空列表,显示加载进度
+
+
+				if (this.tabs[e].name == '全部') {
+					this.selectType = ''
+				} else {
+					this.selectType = this.tabs[e].name
+				}
+				console.log(this.selectType)
 				this.mescroll.resetUpScroll() // 再刷新列表数据
 			}
 
@@ -181,7 +376,7 @@
 	}
 
 	.top-warp {
-		z-index: 9990;
+		z-index: 998;
 		position: fixed;
 		top: --window-top;
 		/* css变量 */
@@ -217,7 +412,6 @@
 
 				.head-img {
 					width: 72rpx;
-					background-color: red;
 					border-radius: 8rpx;
 					margin-right: 22rpx;
 				}
@@ -257,10 +451,107 @@
 				}
 
 				.right {
-
+					padding: 10rpx 20rpx;
 					border: 1px solid #CDCDCD;
+					border-radius: 50rpx;
+				}
+			}
+
+			.row2 {
+				margin-top: 20rpx;
+				/* 		overflow: hidden;
+				text-overflow: ellipsis;
+				width: 100%;
+				display: -webkit-box;
+				-webkit-box-orient: vertical;
+				-webkit-line-clamp: 3;
+				word-break: break-all; */
+			}
+
+			.row3 {
+				/* padding: 30rpx 30rpx 0 30rpx; */
+				margin-top: 18rpx;
+				display: flex;
+				align-items: center;
+				/* justify-content: space-between; */
+				flex-wrap: wrap;
+				/* background: #bbb; */
+
+
+				.img {
+					display: flex;
+					align-items: center;
+					justify-content: center;
+					width: 214rpx;
+					height: 214rpx;
+					margin-bottom: 20rpx;
+					background: lightblue;
+					list-style: none;
+					border-radius: 10rpx;
+					margin-right: 16rpx;
+				}
+
+				.img:nth-of-type(3),
+				.img:nth-of-type(6),
+				.img:nth-of-type(9) {
+					margin-right: 0;
 				}
 			}
+
+			.row4 {
+				margin-top: 4rpx;
+
+				.text {
+					color: #878C9C;
+					font-size: 24rpx;
+				}
+			}
+		}
+
+		.case {
+			font-weight: 700;
+			margin-left: 6rpx;
 		}
 	}
+
+	.add {
+		position: fixed;
+		bottom: 250rpx;
+		right: 32rpx;
+		background: #22C572;
+		z-index: 999;
+		width: 84rpx;
+		height: 84rpx;
+		border-radius: 50%;
+		display: flex;
+		align-items: center;
+		justify-content: center;
+	}
+
+	.search {
+		display: flex;
+		align-items: center;
+		position: relative;
+		margin: 20rpx 28rpx 20rpx 28rpx;
+
+		.text {
+			width: 90rpx;
+			overflow: hidden;
+			white-space: nowrap;
+			text-overflow: ellipsis;
+
+		}
+	}
+
+	/deep/.u-content {
+		padding-left: 170rpx;
+	}
+
+	.place {
+		display: flex;
+		align-items: center;
+		left: 28rpx;
+		position: absolute;
+		font-weight: 700;
+	}
 </style>

+ 214 - 0
pages/business/myAttention.vue

@@ -0,0 +1,214 @@
+<template>
+	<view>
+		<view class="content1">
+			<u-search placeholder="搜索用户名称" v-model="keyword" :show-action='false' bg-color="#F5F6FA"></u-search>
+		</view>
+
+		<mescroll-body ref="mescrollRef" @init="mescrollInit" top="0" @down="downCallback" :up="upOption"
+			@up="upCallback" @emptyclick="emptyClick">
+			<!-- 数据列表 -->
+			<view class="list" v-if="goods.length!=0">
+				<view class="list-item" v-for="(item,index) in goods">
+					<view class="left">
+						<image src="../../static/img/face/27.png" mode="aspectFill" class="head-img"></image>
+						<view class="name">
+							李师傅1334248520
+						</view>
+					</view>
+					<view class="right">
+						<u-icon name="plus" color="#333333" size="17" bold></u-icon><text class="case">关注</text>
+					</view>
+					<view class="right" @click="follow(item)">
+						<text class="case" style="color:#878C9C;">已关注</text>
+					</view>
+				</view>
+			</view>
+		</mescroll-body>
+		<u-modal v-model="show" :content="content" :show-title='false' :show-cancel-button='true'
+			:content-style="contentStyle"></u-modal>
+
+	</view>
+</template>
+
+<script>
+	import MescrollMixin from "@/components/mescroll-uni/mescroll-mixins.js";
+
+	import {
+		apiGoods
+	} from "@/api/mock.js"
+	export default {
+		components: {
+
+		},
+		mixins: [MescrollMixin], // 使用mixin
+		data() {
+			return {
+				selectItem: {},
+				contentStyle: {
+					"font-weight": 700
+				},
+				show: false,
+				content: '确定不在关注?',
+				keyword: '',
+				inputStyle: {
+					// "padding-left": '30rpx'
+				},
+				upOption: {
+					// page: {
+					// 	num: 0, // 当前页码,默认0,回调之前会加1,即callback(page)会从1开始
+					// 	size: 10 // 每页数据的数量
+					// },
+					noMoreSize: 4, //如果列表已无数据,可设置列表的总数量要大于半页才显示无更多数据;避免列表数据过少(比如只有一条数据),显示无更多数据会不好看; 默认5
+					empty: {
+						tip: '~ 搜索无数据 ~', // 提示
+						btnText: '去看看'
+					}
+				},
+				goods: [], //列表数据
+			}
+		},
+
+
+		onShow() {
+			uni.showTabBar()
+			uni.hideKeyboard()
+			var userInfo = uni.getStorageSync("userInfo")
+			var that = this
+			console.log("userInfo", userInfo)
+			// setTimeout(function() {
+			// 	that.$api.doRequest('get', '/appVersion/test', {
+			// 		userId: "7e83070d05fc4d50aaa46e00a3ee03d8"
+			// 	}).then(res => {
+
+			// 	})
+			// }, 500);
+			uni.removeTabBarBadge({
+				index: 4
+			})
+			this.$api.doRequest('get', '/newNoticeTask/query/noticeTasks').then(res => {
+				if (res.data.data) {
+					let name = 'myTip';
+					let value = res.data.data.total;
+					that.$store.commit('$uStore', {
+						name,
+						value
+					});
+					if (value != 0 && value) {
+						uni.setTabBarBadge({
+							index: 4,
+							text: value + ""
+						})
+					}
+					name = 'taskTip';
+					value = res.data.data.total;
+					that.$store.commit('$uStore', {
+						name,
+						value
+					});
+				}
+			})
+		},
+		onLoad(options) {},
+
+
+		methods: {
+			follow(val) {
+				this.selectItem = val
+				this.show = true
+			},
+			edit() {},
+			del() {},
+			selectAddress(val) {
+				console.log(val)
+			},
+			release() {
+				uni.navigateTo({
+					url: 'release'
+				})
+			},
+			/*上拉加载的回调: 其中page.num:当前页 从1开始, page.size:每页数据条数,默认10 */
+			upCallback(page) {
+				apiGoods(page.num, page.size).then(res => {
+					//联网成功的回调,隐藏下拉刷新和上拉加载的状态;
+					this.mescroll.endSuccess(res.list.length);
+					//设置列表数据
+					if (page.num == 1) this.goods = []; //如果是第一页需手动制空列表
+					this.goods = this.goods.concat(res.list); //追加新数据
+					this.co
+				}).catch(() => {
+					//联网失败, 结束加载
+					this.mescroll.endErr();
+				})
+			},
+			//点击空布局按钮的回调
+			emptyClick() {
+				uni.showToast({
+					title: '点击了按钮,具体逻辑自行实现'
+				})
+			},
+
+			// 切换菜单
+			tabChange() {
+				this.goods = [] // 先置空列表,显示加载进度
+				this.mescroll.resetUpScroll() // 再刷新列表数据
+			}
+
+		}
+	}
+</script>
+
+<style lang='scss'>
+	.head-img {
+		width: 76rpx;
+		height: 76rpx;
+		background: red;
+		border-radius: 50%;
+	}
+
+	page {
+		background: #fff !important;
+	}
+
+	.content1 {
+		padding: 20rpx;
+	}
+
+	.list {
+		padding: 0 22rpx;
+
+		.left {
+			display: flex;
+			align-items: center;
+
+			.name {
+				font-size: 32rpx;
+				font-weight: 400;
+				color: #262626;
+				margin-left: 26rpx;
+			}
+		}
+
+		.right {
+			width: 124rpx;
+			height: 58rpx;
+			background: #FFFFFF;
+			border-radius: 29rpx;
+			border: 1px solid #CDCDCD;
+			line-height: 58rpx;
+			text-align: center;
+
+			.case {
+				font-weight: 700;
+			}
+		}
+
+		.list-item {
+
+			display: flex;
+			justify-content: space-between;
+			align-items: center;
+			padding: 34rpx 0;
+			border-bottom: 1px solid #E6E6E6;
+		}
+	}
+</style>

+ 400 - 0
pages/business/record.vue

@@ -0,0 +1,400 @@
+<template>
+	<view>
+		<mescroll-body ref="mescrollRef" @init="mescrollInit" top="20" @down="downCallback" :up="upOption"
+			@up="upCallback" @emptyclick="emptyClick">
+			<!-- 数据列表 -->
+			<view class="list" v-if="goods.length!=0">
+				<view class="list-item" v-for="(item,index) in goods">
+					<view class="row1 flex jcsb alc">
+						<view class="left flex alc">
+							<view class="bottom" style="margin-top: 6rpx;">
+								<text class="color1">采购</text>
+								<text class="color2">销售</text>
+								<text class="color3">2022.09.01 08:28</text>
+							</view>
+						</view>
+						<view class="right" style="color: #FE6430;">审核中</view>
+						<view class="right" style="color: #FB2323;">已驳回</view>
+						<view class="right" style="color: #22C572;">已通过</view>
+					</view>
+					<view class="row2">
+						<mote-lines-divide :dt="content" :line="3" expandText="展开" foldHint="收起" />
+					</view>
+					<view class="row3">
+						<image src="../../static/img/splash3.png" mode="aspectFill" v-for="(item,index) in 9"
+							class="img"></image>
+					</view>
+					<view class="row4">
+						<u-icon name="map-fill" color="#AFB3BF" size="28" bold></u-icon>
+						<text class="text">辽宁省营口市鲅鱼圈区xx路108号</text>
+					</view>
+					<view class="row5">
+						<view class="del btn" @click="del(item)">
+							删除
+						</view>
+						<view class="edit btn" @click="edit(item)">
+							编辑
+						</view>
+					</view>
+				</view>
+			</view>
+		</mescroll-body>
+		<view class="add" @click="release">
+			<u-icon name="plus" color="#fff" size="34" bold></u-icon>
+		</view>
+
+	</view>
+</template>
+
+<script>
+	import MescrollMixin from "@/components/mescroll-uni/mescroll-mixins.js";
+	import MoteLinesDivide from "@/components/text-over-flow"
+	import selectAddress from "@/components/selectAddress.vue"
+	import {
+		apiGoods
+	} from "@/api/mock.js"
+	export default {
+		components: {
+			MoteLinesDivide,
+			selectAddress
+		},
+		mixins: [MescrollMixin], // 使用mixin
+		data() {
+			return {
+
+				keyword: '',
+				inputStyle: {
+					// "padding-left": '30rpx'
+				},
+				content: '上半年,普陀区开展“绿剑”系列执法行动二次,共计出动执法人员120余人次,检有关经营主体87余家次,发放宣传资料等200余份;加强农产品和农业…上半年,普陀区开展“绿剑”系列执法行动二次,共计出动执法人员120余人次,检有关经营主体87余家次,发放宣传资料等200余份;加强农产品和农业…',
+				upOption: {
+					// page: {
+					// 	num: 0, // 当前页码,默认0,回调之前会加1,即callback(page)会从1开始
+					// 	size: 10 // 每页数据的数量
+					// },
+					noMoreSize: 4, //如果列表已无数据,可设置列表的总数量要大于半页才显示无更多数据;避免列表数据过少(比如只有一条数据),显示无更多数据会不好看; 默认5
+					empty: {
+						tip: '~ 搜索无数据 ~', // 提示
+						btnText: '去看看'
+					}
+				},
+				goods: [], //列表数据
+				tabs: [{
+					name: '全部',
+					type: 'xx'
+				}, {
+					name: '采购',
+					type: 'xx'
+				}, {
+					name: '销售',
+					type: 'xx'
+				}, {
+					name: '关注',
+					type: 'xx'
+				}],
+				tabIndex: 0 // tab下标
+			}
+		},
+
+
+		onShow() {
+			uni.showTabBar()
+			uni.hideKeyboard()
+			var userInfo = uni.getStorageSync("userInfo")
+			var that = this
+			console.log("userInfo", userInfo)
+			// setTimeout(function() {
+			// 	that.$api.doRequest('get', '/appVersion/test', {
+			// 		userId: "7e83070d05fc4d50aaa46e00a3ee03d8"
+			// 	}).then(res => {
+
+			// 	})
+			// }, 500);
+			uni.removeTabBarBadge({
+				index: 4
+			})
+			this.$api.doRequest('get', '/newNoticeTask/query/noticeTasks').then(res => {
+				if (res.data.data) {
+					let name = 'myTip';
+					let value = res.data.data.total;
+					that.$store.commit('$uStore', {
+						name,
+						value
+					});
+					if (value != 0 && value) {
+						uni.setTabBarBadge({
+							index: 4,
+							text: value + ""
+						})
+					}
+					name = 'taskTip';
+					value = res.data.data.total;
+					that.$store.commit('$uStore', {
+						name,
+						value
+					});
+				}
+			})
+		},
+		onLoad(options) {},
+
+
+		methods: {
+			edit() {},
+			del() {},
+			selectAddress(val) {
+				console.log(val)
+			},
+			release() {
+				uni.navigateTo({
+					url: 'release'
+				})
+			},
+			/*上拉加载的回调: 其中page.num:当前页 从1开始, page.size:每页数据条数,默认10 */
+			upCallback(page) {
+				//联网加载数据
+				let curTab = this.tabs[this.tabIndex]
+				let keyword = curTab.name // 具体项目中,您可能取的是tab中的type,status等字段
+				apiGoods(page.num, page.size, keyword).then(res => {
+					//联网成功的回调,隐藏下拉刷新和上拉加载的状态;
+					this.mescroll.endSuccess(res.list.length);
+					//设置列表数据
+					if (page.num == 1) this.goods = []; //如果是第一页需手动制空列表
+					this.goods = this.goods.concat(res.list); //追加新数据
+					this.co
+				}).catch(() => {
+					//联网失败, 结束加载
+					this.mescroll.endErr();
+				})
+			},
+			//点击空布局按钮的回调
+			emptyClick() {
+				uni.showToast({
+					title: '点击了按钮,具体逻辑自行实现'
+				})
+			},
+
+			// 切换菜单
+			tabChange() {
+				this.goods = [] // 先置空列表,显示加载进度
+				this.mescroll.resetUpScroll() // 再刷新列表数据
+			}
+
+		}
+	}
+</script>
+
+<style lang='scss'>
+	page,
+	.content {
+		background: #F5F6FA;
+	}
+
+	.flex {
+		display: flex;
+	}
+
+	.alc {
+		align-items: center;
+	}
+
+	.jcse {
+		justify-content: space-evenly;
+	}
+
+	.jcsb {
+		justify-content: space-between;
+	}
+
+	.top-warp {
+		z-index: 998;
+		position: fixed;
+		top: --window-top;
+		/* css变量 */
+		left: 0;
+		width: 100%;
+		/* height: 120upx; */
+		background-color: white;
+	}
+
+
+	.top-warp .tip {
+		font-size: 28upx;
+		height: 60upx;
+		line-height: 60upx;
+		text-align: center;
+	}
+
+	.slot-wrap {
+		margin-right: 45rpx;
+		font-size: 32rpx;
+	}
+
+	.list {
+		margin: 0 20rpx;
+
+		.list-item {
+			padding: 20rpx;
+			background: #fff;
+			margin-bottom: 20rpx;
+			border-radius: 20rpx;
+
+			.row1 {
+
+				.head-img {
+					width: 72rpx;
+					background-color: red;
+					border-radius: 8rpx;
+					margin-right: 22rpx;
+				}
+
+				.left {
+					.title {
+						font-weight: 700;
+						color: #333333;
+					}
+
+					.bottom {
+						.color1 {
+							font-size: 24rpx;
+							padding: 4rpx 10rpx;
+							color: #fff;
+							display: inline-block;
+							background: linear-gradient(180deg, #607AE0 0%, #516CDC 100%);
+							border-radius: 4rpx;
+						}
+
+						.color2 {
+							font-size: 24rpx;
+							padding: 4rpx 10rpx;
+							color: #fff;
+							display: inline-block;
+							background: linear-gradient(180deg, #FD714F 0%, #FD613C 100%);
+							border-radius: 4rpx;
+						}
+
+						.color3 {
+							font-size: 28rpx;
+							/* color: #AFB3BF; */
+							margin-left: 14rpx;
+
+						}
+					}
+				}
+
+				.right {
+					/* padding: 10rpx 20rpx; */
+				}
+			}
+
+			.row2 {
+				margin-top: 20rpx;
+				/* 		overflow: hidden;
+				text-overflow: ellipsis;
+				width: 100%;
+				display: -webkit-box;
+				-webkit-box-orient: vertical;
+				-webkit-line-clamp: 3;
+				word-break: break-all; */
+			}
+
+			.row3 {
+				/* padding: 30rpx 30rpx 0 30rpx; */
+				margin-top: 18rpx;
+				display: flex;
+				align-items: center;
+				justify-content: space-between;
+				flex-wrap: wrap;
+				/* background: #bbb; */
+
+
+				.img {
+					display: flex;
+					align-items: center;
+					justify-content: center;
+					width: 32%;
+					height: 210rpx;
+					margin-bottom: 20rpx;
+					background: lightblue;
+					list-style: none;
+					border-radius: 10rpx;
+				}
+			}
+
+			.row4 {
+				margin-top: 4rpx;
+
+				.text {
+					color: #878C9C;
+					font-size: 24rpx;
+				}
+			}
+		}
+
+		.case {
+			font-weight: 700;
+			margin-left: 6rpx;
+		}
+	}
+
+	.add {
+		position: fixed;
+		bottom: 250rpx;
+		right: 32rpx;
+		background: #22C572;
+		z-index: 999;
+		width: 84rpx;
+		height: 84rpx;
+		border-radius: 50%;
+		display: flex;
+		align-items: center;
+		justify-content: center;
+	}
+
+	.search {
+		display: flex;
+		align-items: center;
+		position: relative;
+		margin: 20rpx 28rpx 20rpx 28rpx;
+
+		.text {
+			width: 90rpx;
+			overflow: hidden;
+			white-space: nowrap;
+			text-overflow: ellipsis;
+
+		}
+	}
+
+	/deep/.u-content {
+		padding-left: 170rpx;
+	}
+
+	.place {
+		display: flex;
+		align-items: center;
+		left: 28rpx;
+		position: absolute;
+		font-weight: 700;
+	}
+
+	.row5 {
+		display: flex;
+		justify-content: flex-end;
+		margin-top: 20rpx;
+
+		.btn {
+			width: 120rpx;
+			height: 66rpx;
+			background: #FFFFFF;
+			border-radius: 33px;
+			border: 1px solid #CDCDCD;
+			font-size: 28rpx;
+			font-weight: 400;
+			color: #333333;
+			line-height: 66rpx;
+			text-align: center;
+			margin-left: 24rpx;
+		}
+	}
+</style>

+ 169 - 11
pages/business/release.vue

@@ -2,23 +2,23 @@
 	<view class="content">
 		<view class="content1">
 			<view class="top">
-				<textarea v-model="value" placeholder="请发布粮食类商品交易信息,建议包含联系方" maxlength='200'
+				<textarea v-model="dataObj.publishingContent" placeholder="请发布粮食类商品交易信息,建议包含联系方" maxlength='200'
 					placeholder-class='placeholder-class' class="textarea" />
 				<view class="number">
-					{{value.length}}/200个字
+					{{dataObj.publishingContent.length}}/200个字
 				</view>
 			</view>
 			<view style="padding-left: 10rpx;">
 				<upload :file-list='businesslicense' class="upload" ref="upload" :action="action" :max-size="maxSize"
 					delIconSize='30' delBgColor='rgba(0,0,0,0.4)' delIcon="trash" :max-count="9"
 					:size-type="['compressed']" @on-success="getImgUrl" @on-remove="onRemove"
-					@on-uploaded="isAdd = true" :before-upload="filterFileType"></upload>
+					:before-upload="filterFileType"></upload>
 			</view>
 		</view>
 		<view class="content2">
 			<u-cell-group class='wrap'>
 				<u-cell-item title="交易类型" :arrow="false" :title-style="titleStyle">
-					<u-radio-group v-model="value1">
+					<u-radio-group v-model="dataObj.tranType">
 						<u-radio @change="radioChange" v-for="(item, index) in list" :key="index" :name="item.name"
 							:disabled="item.disabled" active-color="#303030">
 							{{item.name}}
@@ -28,20 +28,35 @@
 				<u-cell-item title="交易地" :title-style="titleStyle">
 					<selectAddress @selectAddress='selectAddress' series='3' :textStyle='textStyle'></selectAddress>
 				</u-cell-item>
-				<u-cell-item title="发布者昵称" :title-style="titleStyle" :border-bottom='false'>
+				<u-cell-item title="发布者昵称" :title-style="titleStyle" :border-bottom='false' @click="editNicknamee">
 					<view :style='textStyle'>
-						我是昵称
+						{{dataObj.publisher}}
 					</view>
 					<!-- <selectAddress @selectAddress='selectAddress' series='3' :textStyle='textStyle'></selectAddress> -->
 				</u-cell-item>
 			</u-cell-group>
 		</view>
+		<view class="submit" @click="submit">
+			发布
+		</view>
+		<u-popup v-model="showNickname" mode='center' border-radius="14" width='70%' @close='closePopup'>
+			<view class="edit-nickname">
+				<view>昵称长度限制在2-24个字符内</view>
+				<u-input v-model="dataObj.publisher" border class='nickname-input' />
+				<view style="text-align: center;">
+					<u-button type="success" size="medium" class="nickname-btn" @click="nickNamesubmit">保存</u-button>
+				</view>
+			</view>
+		</u-popup>
 	</view>
 </template>
 
 <script>
 	import upload from '@/components/upload_small.vue';
 	import selectAddress from "@/components/selectAddress.vue"
+	import {
+		mapState
+	} from 'vuex';
 	export default {
 		components: {
 			upload,
@@ -49,6 +64,16 @@
 		},
 		data() {
 			return {
+				imgList: [],
+				showNickname: false,
+				dataObj: {
+					userId: '',
+					tranType: '采购',
+					placeDelivery: '',
+					urlImg: '',
+					publishingContent: '',
+					publisher: '',
+				},
 				titleStyle: {
 					"font-size": "28rpx",
 					"color": "#333333",
@@ -61,16 +86,14 @@
 					"margin-right": '27rpx'
 				},
 				list: [{
-						name: 'apple',
+						name: '采购',
 						disabled: false
 					},
 					{
-						name: 'orange',
+						name: '销售',
 						disabled: false
 					}
 				],
-				// u-radio-group的v-model绑定的值如果设置为某个radio的name,就会被默认选中
-				value1: 'orange',
 				businesslicense: [],
 				value: '',
 				action: this.$uploadUrl,
@@ -78,9 +101,113 @@
 				isAdd: false,
 			};
 		},
+		onLoad() {
+			console.log("user", this.userInfo)
+			this.dataObj.userId = this.userInfo.id
+			this.dataObj.publisher = this.userInfo.wechatNo
+		},
+		onNavigationBarButtonTap(e) {
+			console.log(e)
+			uni.navigateTo({
+				url: 'record'
+			})
+		},
+		computed: {
+			...mapState(['hasLogin', 'userInfo', 'clientId']),
+		},
+
 		methods: {
+			closePopup() {
+				this.dataObj.publisher = this.userInfo.wechatNo
+			},
+			nickNamesubmit() {
+				if (this.dataObj.publisher == null || this.dataObj.publisher == "") {
+					this.$api.msg('请输入昵称!')
+					return
+				}
+				if (this.dataObj.publisher.length < 2 || this.dataObj.publisher.length > 24) {
+					this.$api.msg('请正确输入昵称!')
+					return
+				}
+				let _obj = {
+					wechatNo: this.dataObj.publisher,
+					id: this.userInfo.id
+				}
+				uni.showLoading({
+					title: '数据加载中',
+					mask: true
+				})
+				let that = this
+				that.$api.doRequest('post', '/commonUser/editUserInfo', _obj).then(
+						res => {
+							if (res.data.code == 200) {
+								uni.showToast({
+									title: '修改成功!',
+									icon: 'success',
+									duration: 2000,
+									success() {
+										setTimeout(() => {
+											var _student = uni.getStorageSync('userInfo');
+											_student.wechatNo = that.dataObj.publisher;
+											uni.setStorageSync('userInfo', _student);
+											var name = 'userInfo';
+											var value = _student;
+											that.$store.commit('$uStore', {
+												name,
+												value
+											});
+											uni.hideLoading()
+											that.showNickname = false
+										}, 2000)
+									}
+								})
+							}
+						})
+					.catch(res => {
+						if (res.errmsg) {
+							uni.showToast({
+								title: res.errmsg,
+								icon: 'none',
+								duration: 2000
+							})
+						} else {
+							uni.showToast({
+								title: "系统异常,请联系管理员",
+								icon: 'none',
+								duration: 2000
+							})
+						}
+					});
+			},
+			editNicknamee() {
+				this.showNickname = true
+			},
+			submit() {
+				uni.showLoading({
+					title: '数据加载中',
+					mask: true
+
+				})
+
+				this.dataObj.urlImg = this.imgList.toString()
+				this.$api.doRequest('post', '/transactionExchangeInfo/addInfo', this.dataObj).then(res => {
+					console.log(res)
+					if (res.data.code == 200) {
+						uni.navigateBack({
+							delta: 1
+						})
+					} else {
+						uni.showToast({
+							title: "系统异常,请联系管理员",
+							icon: 'none',
+							duration: 2000
+						})
+					}
+				})
+			},
 			selectAddress(val) {
 				console.log(val)
+				this.dataObj.placeDelivery = val
 			},
 			radioChange(e) {
 				// console.log(e);
@@ -101,6 +228,8 @@
 			getImgUrl(res) {
 				console.log(res)
 				console.log('------------res-----------')
+				this.imgList.push(res)
+				console.log(this.imgList)
 
 			},
 			onUploaded(lists) {
@@ -119,7 +248,7 @@
 
 <style lang="scss" scoped>
 	.content {
-		overflow: hidden;
+		// overflow: hidden;
 	}
 
 	.content1 {
@@ -161,4 +290,33 @@
 	/deep/.u-cell-box {
 		border-radius: 20rpx;
 	}
+
+	.submit {
+		width: 654rpx;
+		height: 92rpx;
+		background: #22C572;
+		border-radius: 46rpx;
+		font-size: 34rpx;
+		font-weight: 400;
+		color: #FFFFFF;
+		line-height: 92rpx;
+		text-align: center;
+		position: fixed;
+		bottom: 76rpx;
+		left: 0;
+		right: 0;
+		margin: auto;
+	}
+
+	.edit-nickname {
+		padding: 40rpx 80rpx;
+	}
+
+	.nickname-input {
+		margin: 20rpx 0;
+	}
+
+	.nickname-btn {
+		margin-top: 20rpx;
+	}
 </style>

+ 539 - 0
static/followIicon/demo.css

@@ -0,0 +1,539 @@
+/* Logo 字体 */
+@font-face {
+  font-family: "iconfont logo";
+  src: url('https://at.alicdn.com/t/font_985780_km7mi63cihi.eot?t=1545807318834');
+  src: url('https://at.alicdn.com/t/font_985780_km7mi63cihi.eot?t=1545807318834#iefix') format('embedded-opentype'),
+    url('https://at.alicdn.com/t/font_985780_km7mi63cihi.woff?t=1545807318834') format('woff'),
+    url('https://at.alicdn.com/t/font_985780_km7mi63cihi.ttf?t=1545807318834') format('truetype'),
+    url('https://at.alicdn.com/t/font_985780_km7mi63cihi.svg?t=1545807318834#iconfont') format('svg');
+}
+
+.logo {
+  font-family: "iconfont logo";
+  font-size: 160px;
+  font-style: normal;
+  -webkit-font-smoothing: antialiased;
+  -moz-osx-font-smoothing: grayscale;
+}
+
+/* tabs */
+.nav-tabs {
+  position: relative;
+}
+
+.nav-tabs .nav-more {
+  position: absolute;
+  right: 0;
+  bottom: 0;
+  height: 42px;
+  line-height: 42px;
+  color: #666;
+}
+
+#tabs {
+  border-bottom: 1px solid #eee;
+}
+
+#tabs li {
+  cursor: pointer;
+  width: 100px;
+  height: 40px;
+  line-height: 40px;
+  text-align: center;
+  font-size: 16px;
+  border-bottom: 2px solid transparent;
+  position: relative;
+  z-index: 1;
+  margin-bottom: -1px;
+  color: #666;
+}
+
+
+#tabs .active {
+  border-bottom-color: #f00;
+  color: #222;
+}
+
+.tab-container .content {
+  display: none;
+}
+
+/* 页面布局 */
+.main {
+  padding: 30px 100px;
+  width: 960px;
+  margin: 0 auto;
+}
+
+.main .logo {
+  color: #333;
+  text-align: left;
+  margin-bottom: 30px;
+  line-height: 1;
+  height: 110px;
+  margin-top: -50px;
+  overflow: hidden;
+  *zoom: 1;
+}
+
+.main .logo a {
+  font-size: 160px;
+  color: #333;
+}
+
+.helps {
+  margin-top: 40px;
+}
+
+.helps pre {
+  padding: 20px;
+  margin: 10px 0;
+  border: solid 1px #e7e1cd;
+  background-color: #fffdef;
+  overflow: auto;
+}
+
+.icon_lists {
+  width: 100% !important;
+  overflow: hidden;
+  *zoom: 1;
+}
+
+.icon_lists li {
+  width: 100px;
+  margin-bottom: 10px;
+  margin-right: 20px;
+  text-align: center;
+  list-style: none !important;
+  cursor: default;
+}
+
+.icon_lists li .code-name {
+  line-height: 1.2;
+}
+
+.icon_lists .icon {
+  display: block;
+  height: 100px;
+  line-height: 100px;
+  font-size: 42px;
+  margin: 10px auto;
+  color: #333;
+  -webkit-transition: font-size 0.25s linear, width 0.25s linear;
+  -moz-transition: font-size 0.25s linear, width 0.25s linear;
+  transition: font-size 0.25s linear, width 0.25s linear;
+}
+
+.icon_lists .icon:hover {
+  font-size: 100px;
+}
+
+.icon_lists .svg-icon {
+  /* 通过设置 font-size 来改变图标大小 */
+  width: 1em;
+  /* 图标和文字相邻时,垂直对齐 */
+  vertical-align: -0.15em;
+  /* 通过设置 color 来改变 SVG 的颜色/fill */
+  fill: currentColor;
+  /* path 和 stroke 溢出 viewBox 部分在 IE 下会显示
+      normalize.css 中也包含这行 */
+  overflow: hidden;
+}
+
+.icon_lists li .name,
+.icon_lists li .code-name {
+  color: #666;
+}
+
+/* markdown 样式 */
+.markdown {
+  color: #666;
+  font-size: 14px;
+  line-height: 1.8;
+}
+
+.highlight {
+  line-height: 1.5;
+}
+
+.markdown img {
+  vertical-align: middle;
+  max-width: 100%;
+}
+
+.markdown h1 {
+  color: #404040;
+  font-weight: 500;
+  line-height: 40px;
+  margin-bottom: 24px;
+}
+
+.markdown h2,
+.markdown h3,
+.markdown h4,
+.markdown h5,
+.markdown h6 {
+  color: #404040;
+  margin: 1.6em 0 0.6em 0;
+  font-weight: 500;
+  clear: both;
+}
+
+.markdown h1 {
+  font-size: 28px;
+}
+
+.markdown h2 {
+  font-size: 22px;
+}
+
+.markdown h3 {
+  font-size: 16px;
+}
+
+.markdown h4 {
+  font-size: 14px;
+}
+
+.markdown h5 {
+  font-size: 12px;
+}
+
+.markdown h6 {
+  font-size: 12px;
+}
+
+.markdown hr {
+  height: 1px;
+  border: 0;
+  background: #e9e9e9;
+  margin: 16px 0;
+  clear: both;
+}
+
+.markdown p {
+  margin: 1em 0;
+}
+
+.markdown>p,
+.markdown>blockquote,
+.markdown>.highlight,
+.markdown>ol,
+.markdown>ul {
+  width: 80%;
+}
+
+.markdown ul>li {
+  list-style: circle;
+}
+
+.markdown>ul li,
+.markdown blockquote ul>li {
+  margin-left: 20px;
+  padding-left: 4px;
+}
+
+.markdown>ul li p,
+.markdown>ol li p {
+  margin: 0.6em 0;
+}
+
+.markdown ol>li {
+  list-style: decimal;
+}
+
+.markdown>ol li,
+.markdown blockquote ol>li {
+  margin-left: 20px;
+  padding-left: 4px;
+}
+
+.markdown code {
+  margin: 0 3px;
+  padding: 0 5px;
+  background: #eee;
+  border-radius: 3px;
+}
+
+.markdown strong,
+.markdown b {
+  font-weight: 600;
+}
+
+.markdown>table {
+  border-collapse: collapse;
+  border-spacing: 0px;
+  empty-cells: show;
+  border: 1px solid #e9e9e9;
+  width: 95%;
+  margin-bottom: 24px;
+}
+
+.markdown>table th {
+  white-space: nowrap;
+  color: #333;
+  font-weight: 600;
+}
+
+.markdown>table th,
+.markdown>table td {
+  border: 1px solid #e9e9e9;
+  padding: 8px 16px;
+  text-align: left;
+}
+
+.markdown>table th {
+  background: #F7F7F7;
+}
+
+.markdown blockquote {
+  font-size: 90%;
+  color: #999;
+  border-left: 4px solid #e9e9e9;
+  padding-left: 0.8em;
+  margin: 1em 0;
+}
+
+.markdown blockquote p {
+  margin: 0;
+}
+
+.markdown .anchor {
+  opacity: 0;
+  transition: opacity 0.3s ease;
+  margin-left: 8px;
+}
+
+.markdown .waiting {
+  color: #ccc;
+}
+
+.markdown h1:hover .anchor,
+.markdown h2:hover .anchor,
+.markdown h3:hover .anchor,
+.markdown h4:hover .anchor,
+.markdown h5:hover .anchor,
+.markdown h6:hover .anchor {
+  opacity: 1;
+  display: inline-block;
+}
+
+.markdown>br,
+.markdown>p>br {
+  clear: both;
+}
+
+
+.hljs {
+  display: block;
+  background: white;
+  padding: 0.5em;
+  color: #333333;
+  overflow-x: auto;
+}
+
+.hljs-comment,
+.hljs-meta {
+  color: #969896;
+}
+
+.hljs-string,
+.hljs-variable,
+.hljs-template-variable,
+.hljs-strong,
+.hljs-emphasis,
+.hljs-quote {
+  color: #df5000;
+}
+
+.hljs-keyword,
+.hljs-selector-tag,
+.hljs-type {
+  color: #a71d5d;
+}
+
+.hljs-literal,
+.hljs-symbol,
+.hljs-bullet,
+.hljs-attribute {
+  color: #0086b3;
+}
+
+.hljs-section,
+.hljs-name {
+  color: #63a35c;
+}
+
+.hljs-tag {
+  color: #333333;
+}
+
+.hljs-title,
+.hljs-attr,
+.hljs-selector-id,
+.hljs-selector-class,
+.hljs-selector-attr,
+.hljs-selector-pseudo {
+  color: #795da3;
+}
+
+.hljs-addition {
+  color: #55a532;
+  background-color: #eaffea;
+}
+
+.hljs-deletion {
+  color: #bd2c00;
+  background-color: #ffecec;
+}
+
+.hljs-link {
+  text-decoration: underline;
+}
+
+/* 代码高亮 */
+/* PrismJS 1.15.0
+https://prismjs.com/download.html#themes=prism&languages=markup+css+clike+javascript */
+/**
+ * prism.js default theme for JavaScript, CSS and HTML
+ * Based on dabblet (http://dabblet.com)
+ * @author Lea Verou
+ */
+code[class*="language-"],
+pre[class*="language-"] {
+  color: black;
+  background: none;
+  text-shadow: 0 1px white;
+  font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
+  text-align: left;
+  white-space: pre;
+  word-spacing: normal;
+  word-break: normal;
+  word-wrap: normal;
+  line-height: 1.5;
+
+  -moz-tab-size: 4;
+  -o-tab-size: 4;
+  tab-size: 4;
+
+  -webkit-hyphens: none;
+  -moz-hyphens: none;
+  -ms-hyphens: none;
+  hyphens: none;
+}
+
+pre[class*="language-"]::-moz-selection,
+pre[class*="language-"] ::-moz-selection,
+code[class*="language-"]::-moz-selection,
+code[class*="language-"] ::-moz-selection {
+  text-shadow: none;
+  background: #b3d4fc;
+}
+
+pre[class*="language-"]::selection,
+pre[class*="language-"] ::selection,
+code[class*="language-"]::selection,
+code[class*="language-"] ::selection {
+  text-shadow: none;
+  background: #b3d4fc;
+}
+
+@media print {
+
+  code[class*="language-"],
+  pre[class*="language-"] {
+    text-shadow: none;
+  }
+}
+
+/* Code blocks */
+pre[class*="language-"] {
+  padding: 1em;
+  margin: .5em 0;
+  overflow: auto;
+}
+
+:not(pre)>code[class*="language-"],
+pre[class*="language-"] {
+  background: #f5f2f0;
+}
+
+/* Inline code */
+:not(pre)>code[class*="language-"] {
+  padding: .1em;
+  border-radius: .3em;
+  white-space: normal;
+}
+
+.token.comment,
+.token.prolog,
+.token.doctype,
+.token.cdata {
+  color: slategray;
+}
+
+.token.punctuation {
+  color: #999;
+}
+
+.namespace {
+  opacity: .7;
+}
+
+.token.property,
+.token.tag,
+.token.boolean,
+.token.number,
+.token.constant,
+.token.symbol,
+.token.deleted {
+  color: #905;
+}
+
+.token.selector,
+.token.attr-name,
+.token.string,
+.token.char,
+.token.builtin,
+.token.inserted {
+  color: #690;
+}
+
+.token.operator,
+.token.entity,
+.token.url,
+.language-css .token.string,
+.style .token.string {
+  color: #9a6e3a;
+  background: hsla(0, 0%, 100%, .5);
+}
+
+.token.atrule,
+.token.attr-value,
+.token.keyword {
+  color: #07a;
+}
+
+.token.function,
+.token.class-name {
+  color: #DD4A68;
+}
+
+.token.regex,
+.token.important,
+.token.variable {
+  color: #e90;
+}
+
+.token.important,
+.token.bold {
+  font-weight: bold;
+}
+
+.token.italic {
+  font-style: italic;
+}
+
+.token.entity {
+  cursor: help;
+}

+ 211 - 0
static/followIicon/demo_index.html

@@ -0,0 +1,211 @@
+<!DOCTYPE html>
+<html>
+<head>
+  <meta charset="utf-8"/>
+  <title>iconfont Demo</title>
+  <link rel="shortcut icon" href="//img.alicdn.com/imgextra/i4/O1CN01Z5paLz1O0zuCC7osS_!!6000000001644-55-tps-83-82.svg" type="image/x-icon"/>
+  <link rel="icon" type="image/svg+xml" href="//img.alicdn.com/imgextra/i4/O1CN01Z5paLz1O0zuCC7osS_!!6000000001644-55-tps-83-82.svg"/>
+  <link rel="stylesheet" href="https://g.alicdn.com/thx/cube/1.3.2/cube.min.css">
+  <link rel="stylesheet" href="demo.css">
+  <link rel="stylesheet" href="iconfont.css">
+  <script src="iconfont.js"></script>
+  <!-- jQuery -->
+  <script src="https://a1.alicdn.com/oss/uploads/2018/12/26/7bfddb60-08e8-11e9-9b04-53e73bb6408b.js"></script>
+  <!-- 代码高亮 -->
+  <script src="https://a1.alicdn.com/oss/uploads/2018/12/26/a3f714d0-08e6-11e9-8a15-ebf944d7534c.js"></script>
+  <style>
+    .main .logo {
+      margin-top: 0;
+      height: auto;
+    }
+
+    .main .logo a {
+      display: flex;
+      align-items: center;
+    }
+
+    .main .logo .sub-title {
+      margin-left: 0.5em;
+      font-size: 22px;
+      color: #fff;
+      background: linear-gradient(-45deg, #3967FF, #B500FE);
+      -webkit-background-clip: text;
+      -webkit-text-fill-color: transparent;
+    }
+  </style>
+</head>
+<body>
+  <div class="main">
+    <h1 class="logo"><a href="https://www.iconfont.cn/" title="iconfont 首页" target="_blank">
+      <img width="200" src="https://img.alicdn.com/imgextra/i3/O1CN01Mn65HV1FfSEzR6DKv_!!6000000000514-55-tps-228-59.svg">
+      
+    </a></h1>
+    <div class="nav-tabs">
+      <ul id="tabs" class="dib-box">
+        <li class="dib active"><span>Unicode</span></li>
+        <li class="dib"><span>Font class</span></li>
+        <li class="dib"><span>Symbol</span></li>
+      </ul>
+      
+      <a href="https://www.iconfont.cn/manage/index?manage_type=myprojects&projectId=3817974" target="_blank" class="nav-more">查看项目</a>
+      
+    </div>
+    <div class="tab-container">
+      <div class="content unicode" style="display: block;">
+          <ul class="icon_lists dib-box">
+          
+            <li class="dib">
+              <span class="icon iconfont">&#xff2d;</span>
+                <div class="name">关注</div>
+                <div class="code-name">&amp;#xff2d;</div>
+              </li>
+          
+          </ul>
+          <div class="article markdown">
+          <h2 id="unicode-">Unicode 引用</h2>
+          <hr>
+
+          <p>Unicode 是字体在网页端最原始的应用方式,特点是:</p>
+          <ul>
+            <li>支持按字体的方式去动态调整图标大小,颜色等等。</li>
+            <li>默认情况下不支持多色,直接添加多色图标会自动去色。</li>
+          </ul>
+          <blockquote>
+            <p>注意:新版 iconfont 支持两种方式引用多色图标:SVG symbol 引用方式和彩色字体图标模式。(使用彩色字体图标需要在「编辑项目」中开启「彩色」选项后并重新生成。)</p>
+          </blockquote>
+          <p>Unicode 使用步骤如下:</p>
+          <h3 id="-font-face">第一步:拷贝项目下面生成的 <code>@font-face</code></h3>
+<pre><code class="language-css"
+>@font-face {
+  font-family: 'iconfont';
+  src: url('iconfont.woff2?t=1670566588649') format('woff2'),
+       url('iconfont.woff?t=1670566588649') format('woff'),
+       url('iconfont.ttf?t=1670566588649') format('truetype');
+}
+</code></pre>
+          <h3 id="-iconfont-">第二步:定义使用 iconfont 的样式</h3>
+<pre><code class="language-css"
+>.iconfont {
+  font-family: "iconfont" !important;
+  font-size: 16px;
+  font-style: normal;
+  -webkit-font-smoothing: antialiased;
+  -moz-osx-font-smoothing: grayscale;
+}
+</code></pre>
+          <h3 id="-">第三步:挑选相应图标并获取字体编码,应用于页面</h3>
+<pre>
+<code class="language-html"
+>&lt;span class="iconfont"&gt;&amp;#x33;&lt;/span&gt;
+</code></pre>
+          <blockquote>
+            <p>"iconfont" 是你项目下的 font-family。可以通过编辑项目查看,默认是 "iconfont"。</p>
+          </blockquote>
+          </div>
+      </div>
+      <div class="content font-class">
+        <ul class="icon_lists dib-box">
+          
+          <li class="dib">
+            <span class="icon iconfont icon-guanzhu"></span>
+            <div class="name">
+              关注
+            </div>
+            <div class="code-name">.icon-guanzhu
+            </div>
+          </li>
+          
+        </ul>
+        <div class="article markdown">
+        <h2 id="font-class-">font-class 引用</h2>
+        <hr>
+
+        <p>font-class 是 Unicode 使用方式的一种变种,主要是解决 Unicode 书写不直观,语意不明确的问题。</p>
+        <p>与 Unicode 使用方式相比,具有如下特点:</p>
+        <ul>
+          <li>相比于 Unicode 语意明确,书写更直观。可以很容易分辨这个 icon 是什么。</li>
+          <li>因为使用 class 来定义图标,所以当要替换图标时,只需要修改 class 里面的 Unicode 引用。</li>
+        </ul>
+        <p>使用步骤如下:</p>
+        <h3 id="-fontclass-">第一步:引入项目下面生成的 fontclass 代码:</h3>
+<pre><code class="language-html">&lt;link rel="stylesheet" href="./iconfont.css"&gt;
+</code></pre>
+        <h3 id="-">第二步:挑选相应图标并获取类名,应用于页面:</h3>
+<pre><code class="language-html">&lt;span class="iconfont icon-xxx"&gt;&lt;/span&gt;
+</code></pre>
+        <blockquote>
+          <p>"
+            iconfont" 是你项目下的 font-family。可以通过编辑项目查看,默认是 "iconfont"。</p>
+        </blockquote>
+      </div>
+      </div>
+      <div class="content symbol">
+          <ul class="icon_lists dib-box">
+          
+            <li class="dib">
+                <svg class="icon svg-icon" aria-hidden="true">
+                  <use xlink:href="#icon-guanzhu"></use>
+                </svg>
+                <div class="name">关注</div>
+                <div class="code-name">#icon-guanzhu</div>
+            </li>
+          
+          </ul>
+          <div class="article markdown">
+          <h2 id="symbol-">Symbol 引用</h2>
+          <hr>
+
+          <p>这是一种全新的使用方式,应该说这才是未来的主流,也是平台目前推荐的用法。相关介绍可以参考这篇<a href="">文章</a>
+            这种用法其实是做了一个 SVG 的集合,与另外两种相比具有如下特点:</p>
+          <ul>
+            <li>支持多色图标了,不再受单色限制。</li>
+            <li>通过一些技巧,支持像字体那样,通过 <code>font-size</code>, <code>color</code> 来调整样式。</li>
+            <li>兼容性较差,支持 IE9+,及现代浏览器。</li>
+            <li>浏览器渲染 SVG 的性能一般,还不如 png。</li>
+          </ul>
+          <p>使用步骤如下:</p>
+          <h3 id="-symbol-">第一步:引入项目下面生成的 symbol 代码:</h3>
+<pre><code class="language-html">&lt;script src="./iconfont.js"&gt;&lt;/script&gt;
+</code></pre>
+          <h3 id="-css-">第二步:加入通用 CSS 代码(引入一次就行):</h3>
+<pre><code class="language-html">&lt;style&gt;
+.icon {
+  width: 1em;
+  height: 1em;
+  vertical-align: -0.15em;
+  fill: currentColor;
+  overflow: hidden;
+}
+&lt;/style&gt;
+</code></pre>
+          <h3 id="-">第三步:挑选相应图标并获取类名,应用于页面:</h3>
+<pre><code class="language-html">&lt;svg class="icon" aria-hidden="true"&gt;
+  &lt;use xlink:href="#icon-xxx"&gt;&lt;/use&gt;
+&lt;/svg&gt;
+</code></pre>
+          </div>
+      </div>
+
+    </div>
+  </div>
+  <script>
+  $(document).ready(function () {
+      $('.tab-container .content:first').show()
+
+      $('#tabs li').click(function (e) {
+        var tabContent = $('.tab-container .content')
+        var index = $(this).index()
+
+        if ($(this).hasClass('active')) {
+          return
+        } else {
+          $('#tabs li').removeClass('active')
+          $(this).addClass('active')
+
+          tabContent.hide().eq(index).fadeIn()
+        }
+      })
+    })
+  </script>
+</body>
+</html>

+ 19 - 0
static/followIicon/iconfont.css

@@ -0,0 +1,19 @@
+@font-face {
+  font-family: "iconfont"; /* Project id 3817974 */
+  src: url('iconfont.woff2?t=1670566588649') format('woff2'),
+       url('iconfont.woff?t=1670566588649') format('woff'),
+       url('iconfont.ttf?t=1670566588649') format('truetype');
+}
+
+.iconfont {
+  font-family: "iconfont" !important;
+  font-size: 16px;
+  font-style: normal;
+  -webkit-font-smoothing: antialiased;
+  -moz-osx-font-smoothing: grayscale;
+}
+
+.icon-guanzhu:before {
+  content: "\ff2d";
+}
+

A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 0 - 0
static/followIicon/iconfont.js


+ 16 - 0
static/followIicon/iconfont.json

@@ -0,0 +1,16 @@
+{
+  "id": "3817974",
+  "name": "ac",
+  "font_family": "iconfont",
+  "css_prefix_text": "icon-",
+  "description": "",
+  "glyphs": [
+    {
+      "icon_id": "25687448",
+      "name": "关注",
+      "font_class": "guanzhu",
+      "unicode": "ff2d",
+      "unicode_decimal": 65325
+    }
+  ]
+}

BIN
static/followIicon/iconfont.ttf


BIN
static/followIicon/iconfont.woff


BIN
static/followIicon/iconfont.woff2


Nem az összes módosított fájl került megjelenítésre, mert túl sok fájl változott