Selaa lähdekoodia

新增资讯列表,资讯详情

李书文 1 vuosi sitten
vanhempi
commit
a93af199b3

+ 1 - 1
App.vue

@@ -50,7 +50,7 @@ button::after {
 /**挂载iconfont字体图标*/
 @font-face {
 	font-family: 'iconfont';
-	src: url('https://at.alicdn.com/t/c/font_4191999_c41m8qip7hc.ttf?t=1690883017178') format('truetype');
+	src: url('https://at.alicdn.com/t/c/font_4191999_0q6n1g5foot.ttf?t=1690960741973') format('truetype');
 	/* src: url('~@/static/font/iconfont.ttf') format('truetype'); */
 }
 .icon {

+ 3 - 1
common/style.scss

@@ -415,7 +415,9 @@
 .news_item {
 	background-color: white;
 	border-bottom: 1px solid #f0f2f7;
-	padding: 10px;
+	padding: 12px;
+	margin-bottom: 10px;
+	border-radius:10px;
 	&:last-child {
 		border: 0px;
 	}

+ 14 - 0
pages.json

@@ -190,6 +190,20 @@
 				"navigationBarTitleText": "图片裁剪",
 				"navigationBarBackgroundColor": "#000000"
 			}
+		}, {
+			"path": "pages/news/list",
+			"style": {
+				"navigationBarTitleText": "资讯列表",
+				"enablePullDownRefresh": true
+			}
+
+		}, {
+			"path": "pages/news/detail",
+			"style": {
+				"navigationBarTitleText": "资讯详情",
+				"enablePullDownRefresh": false
+			}
+
 		}
 	],
 	"tabBar": {

+ 26 - 9
pages/authentication/audit.vue

@@ -1,19 +1,36 @@
 <template>
-	<view>
-		
+	<view class="cmain">
+		<view class="icon">&#xe638;</view>
+		<view class="title">您的资料已经提交审核,</view>
+		<view class="desc">请耐心等待。</view>
+		<button class="btn">返回首页</button>
 	</view>
 </template>
 
 <script>
-	export default {
-		data() {
-			return {
-				
-			};
-		}
+export default {
+	data() {
+		return {};
 	}
+};
 </script>
 
 <style lang="scss">
-
+.cmain {
+	text-align: center;
+	padding: 40px;
+	color: $font-c;
+	.icon {
+		font-size: 150px;
+	}
+	.title {
+		margin-bottom: 5px;
+	}
+	.desc {
+		margin-top: -5px;
+	}
+	.btn {
+		margin-top: 30px;
+	}
+}
 </style>

+ 61 - 8
pages/authentication/index.vue

@@ -1,19 +1,72 @@
 <template>
-	<view>
-		
+	<view class="cmain">
+		<view class="item">
+			<card v-model="item.pic" pic="../../static/images/sfz1.png"></card>
+		</view>
+		<view class="title">上传您的身份证头像面</view>
+		<view class="item">
+			<card v-model="item.pic" pic="../../static/images/sfz2.png"></card>
+		</view>
+		<view class="title">上传您的身份证国徽面</view>
+		<button class="btn">人脸认证</button>
 	</view>
 </template>
 
 <script>
-	export default {
-		data() {
-			return {
-				
-			};
+export default {
+	data() {
+		return {
+			item: {}
+		};
+	},
+	onLoad(e) {},
+	methods: {
+		save() {
+			let rule = [
+				{ name: 'typeCode', checkType: 'notnull', errorMsg: '请输入编码' },
+				{ name: 'typeName', checkType: 'notnull', errorMsg: '请输入名称' },
+				{ name: 'status', checkType: 'notnull', errorMsg: '请选择状态' }
+			];
+			if (!this.verify.check(this.item, rule)) {
+				uni.showModal({ content: this.verify.error, showCancel: false });
+				return false;
+			}
+			this.http.request({
+				url: '/project/projectType',
+				method: this.item.id ? 'PUT' : 'POST',
+				data: this.item,
+				success: res => {
+					uni.showToast({ title: '操作成功' });
+					setTimeout(() => {
+						uni.$emit('ctype');
+						uni.navigateBack();
+					}, 1000);
+				}
+			});
 		}
 	}
+};
 </script>
 
 <style lang="scss">
-
+.item {
+	text-align: center;
+	padding: 20px;
+	background-color: #f7f8fa;
+	border-radius: 15px;
+	image {
+		width: 100%;
+		border-radius: 5px;
+	}
+}
+.title {
+	padding: 20px;
+	text-align: center;
+	font-weight: bold;
+	color: $font-c;
+	font-size: 17px;
+}
+.btn{
+	margin-top: 20px;
+}
 </style>

+ 3 - 3
pages/index/index.vue

@@ -31,7 +31,7 @@
 				<view class="vlabel">
 					<view class="tag"></view>
 					<text class="title">最新资讯</text>
-					<text class="more">更多</text>
+					<text class="more" @click="navTo('/pages/news/list')">更多</text>
 					<view class="clear"></view>
 				</view>
 				<view class="list">
@@ -98,7 +98,7 @@ export default {
 			this.http.request({
 				url: '/sp-admin/AppMenu/getList',
 				success: res => {
-					let data = res.data.data
+					let data = res.data.data;
 					menu.map((item2, index1) => {
 						data.map((item1, index) => {
 							if (parseInt(item1.id) == parseInt(item2)) {
@@ -119,7 +119,7 @@ export default {
 			});
 		},
 		navTo(path) {
-			this.$common.to(path);
+			uni.navigateTo({ url: path });
 		}
 	}
 };

+ 29 - 0
pages/news/detail.vue

@@ -0,0 +1,29 @@
+<template>
+	<view class="cmain">
+		<u-divider :dot="true"></u-divider>
+		<u-parse :content="content"></u-parse>
+	</view>
+</template>
+
+<script>
+export default {
+	data() {
+		return {
+			content:''
+		};
+	},
+	onLoad(e) {
+		if (e.id) {
+			this.http.request({
+				url: '/level-one-server/app/TbPortNews/getPortNewsDetails',
+				data: { id: e.id },
+				success: res => {
+					this.content = res.data.data;
+				}
+			});
+		}
+	}
+};
+</script>
+
+<style lang="scss"></style>

+ 80 - 0
pages/news/list.vue

@@ -0,0 +1,80 @@
+<template>
+	<view>
+		<view class="list">
+			<view class="news_item" v-for="(item, index) in list" :key="index" @click="detail(item)">
+				<image src="../../static/news.jpg" mode="aspectFill" class="img"></image>
+				<view class="con">
+					<view class="title ellip">广西边境口岸城市年中经济新观察边贸旺 旅游热 产业稳广西边境口岸城市年中经济新观察边贸旺 旅游热 产业稳</view>
+					<view class="date">
+						<text class="icon">&#xe65c;</text>
+						<text>{{ item.readCount }}</text>
+					</view>
+					<text class="releaseTime">{{ item.releaseTime }}</text>
+				</view>
+				<view class="clear"></view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+export default {
+	data() {
+		return {
+			list: [],
+			param: { pageNum: 1, pageSize: 10, orderByColumn: 'createTime', isAsc: 'desc' },
+			loadMore: true
+		};
+	},
+	onLoad(e) {
+		this.getData();
+	},
+	methods: {
+		getData() {
+			this.http.request({
+				url: '/level-one-server/app/TbPortNews/getPortNewsList',
+				data: this.param,
+				loading: 'false',
+				success: res => {
+					this.list.push(...res.data.data);
+				}
+			});
+		},
+		detail(item) {
+			uni.navigateTo({
+				url: '/pages/news/detail?id=' + item.id
+			});
+		},
+		//刷新数据
+		refresh() {
+			this.loadMore = true;
+			this.param.pageNum = 1;
+			this.list = [];
+			this.getData();
+		}
+	},
+	//下拉刷新
+	onPullDownRefresh() {
+		setTimeout(() => {
+			this.refresh();
+			uni.stopPullDownRefresh();
+		}, 1000);
+	},
+	//上拉加载
+	onReachBottom() {
+		if (this.loadMore) {
+			this.param.pageNum++;
+			this.getData();
+		}
+	}
+};
+</script>
+
+<style lang="scss">
+page {
+	background-color: #f5f5f5;
+}
+.list {
+	padding: 12px;
+}
+</style>

+ 91 - 7
pages/twoMarket/purchaser/product/list.vue

@@ -1,19 +1,103 @@
 <template>
 	<view>
-		
+		<view class="list">
+			<view class="search">
+				<u-search placeholder="搜索商品名称" v-model="param.customerName" @search="refresh()" :animation="true" actionText="取消" @clear="refresh()"></u-search>
+			</view>
+			<view class="item">
+				<view class="title">广西京东自营店南宁分店</view>
+				<image src="../../../../static/news.jpg" mode="aspectFill" class="pic"></image>
+				<view class="con">
+					<view class="productName">八角茴香(未磨)(可食用)</view>
+					<view class="spec">50吨</view>
+					<view class="clear"></view>
+				</view>
+			</view>
+		</view>
+		<view class="mfooter">
+			<view class="flex">
+				<view class="f"><button class="btn" @click="save()">市场</button></view>
+				<view class="f"><button class="btn" @click="save()">购物车</button></view>
+				<view class="f"><button class="btn" @click="save()">订单列表</button></view>
+			</view>
+		</view>
 	</view>
 </template>
 
 <script>
-	export default {
-		data() {
-			return {
-				
-			};
+export default {
+	data() {
+		return {
+			list: [],
+			param: { pageNum: 1, pageSize: 10, orderByColumn: 'createTime', isAsc: 'desc' },
+			loadMore: true
+		};
+	},
+	onLoad(e) {
+		//this.getData();
+	},
+	methods: {
+		getData() {
+			this.http.request({
+				url: this.http.urls.help_list,
+				data: this.param,
+				loading: 'false',
+				success: res => {
+					this.loadMore = res.data.pages > this.param.pageNum ? true : false;
+				}
+			});
+		},
+		detail(item) {
+			uni.navigateTo({
+				url: '/pages/help/detail?id=' + item.id
+			});
+		},
+		//刷新数据
+		refresh() {
+			this.loadMore = true;
+			this.param.pageNum = 1;
+			this.list = [];
+			this.getData();
+		}
+	},
+	//下拉刷新
+	onPullDownRefresh() {
+		setTimeout(() => {
+			this.refresh();
+			uni.stopPullDownRefresh();
+		}, 1000);
+	},
+	//上拉加载
+	onReachBottom() {
+		if (this.loadMore) {
+			this.param.pageNum++;
+			this.getData();
 		}
 	}
+};
 </script>
 
 <style lang="scss">
-
+.list {
+	padding: 10px;
+	.item {
+		padding: 10px;
+		color: $font-c;
+		.title {
+			font-size: 15px;
+			margin-bottom: 10px;
+		}
+		.pic {
+			float: left;
+			width: 80px;
+			height: 80px;
+			border-radius: 3px;
+		}
+		.con {
+			float: left;
+			width: 60%;
+			padding-left: 10px;
+		}
+	}
+}
 </style>

+ 74 - 9
pages/twoMarket/twoMarket.vue

@@ -1,22 +1,87 @@
 <template>
 	<view>
-		
+		<view class="list">
+			<view class="search">
+				<u-search placeholder="搜索商品名称" v-model="param.customerName" @search="refresh()" :animation="true" actionText="取消" @clear="refresh()"></u-search>
+			</view>
+			<view class="item">
+				<view class="title">广西京东自营店南宁分店</view>
+				<image src="../../static/news.jpg" mode="widthFix" class="pic"></image>
+				<view class="con">
+					<view class="productName">八角茴香(未磨)(可食用)</view>
+					<view class="spec">50吨</view>
+					<view class="price">¥50000</view>
+					<view class=""></view>
+				</view>
+			</view>
+		</view>
+		<view class="mfooter">
+			<view class="flex">
+				<view class="f"><button class="btn" @click="save()">市场</button></view>
+				<view class="f"><button class="btn" @click="save()">购物车</button></view>
+				<view class="f"><button class="btn" @click="save()">订单列表</button></view>
+			</view>
+		</view>
 	</view>
 </template>
 
 <script>
-	export default {
-		data() {
-			return {
-				
-			}
+export default {
+	data() {
+		return {
+			list: [],
+			param: { pageNum: 1, pageSize: 10, orderByColumn: 'createTime', isAsc: 'desc' },
+			loadMore: true
+		};
+	},
+	onLoad(e) {
+		//this.getData();
+	},
+	methods: {
+		getData() {
+			this.http.request({
+				url: this.http.urls.help_list,
+				data: this.param,
+				loading: 'false',
+				success: res => {
+					this.loadMore = res.data.pages > this.param.pageNum ? true : false;
+				}
+			});
 		},
-		methods: {
-			
+		detail(item) {
+			uni.navigateTo({
+				url: '/pages/help/detail?id=' + item.id
+			});
+		},
+		//刷新数据
+		refresh() {
+			this.loadMore = true;
+			this.param.pageNum = 1;
+			this.list = [];
+			this.getData();
+		}
+	},
+	//下拉刷新
+	onPullDownRefresh() {
+		setTimeout(() => {
+			this.refresh();
+			uni.stopPullDownRefresh();
+		}, 1000);
+	},
+	//上拉加载
+	onReachBottom() {
+		if (this.loadMore) {
+			this.param.pageNum++;
+			this.getData();
 		}
 	}
+};
 </script>
 
 <style>
-
+.list {
+	padding: 10px;
+	.item {
+	}
+}
 </style>

BIN
static/empty.png


BIN
static/images/sfz1.png


BIN
static/images/sfz2.png


BIN
static/images/yyzz.png


+ 77 - 105
uview-ui/components/u-empty/u-empty.vue

@@ -1,128 +1,100 @@
 <template>
-	<view
-	    class="u-empty"
-	    :style="[emptyStyle]"
-	    v-if="show"
-	>
-		<u-icon
-		    v-if="!isSrc"
-		    :name="mode === 'message' ? 'chat' : `empty-${mode}`"
-		    :size="iconSize"
-		    :color="iconColor"
-		    margin-top="14"
-		></u-icon>
+	<view class="u-empty" :style="[emptyStyle]" v-if="show">
+		<view class="icon" v-if="!isSrc" :name="mode === 'message' ? 'chat' : `empty-${mode}`" :size="iconSize" :color="iconColor" margin-top="14"></view>
 		<image
-		    v-else
-		    :style="{
+			:style="{
 				width: $u.addUnit(width),
-				height: $u.addUnit(height),
+				height: $u.addUnit(height)
 			}"
-		    :src="icon"
-		    mode="widthFix"
+			src="../../../../static/empty.png"
+			mode="widthFix"
 		></image>
-		<text
-		    class="u-empty__text"
-		    :style="[textStyle]"
-		>{{text ? text : icons[mode]}}</text>
-		<view class="u-empty__wrap" v-if="$slots.default || $slots.$default">
-			<slot />
-		</view>
+		<text class="u-empty__text" :style="[textStyle]">{{ text ? text : icons[mode] }}</text>
+		<view class="u-empty__wrap" v-if="$slots.default || $slots.$default"><slot /></view>
 	</view>
 </template>
 
 <script>
-	import props from './props.js';
+import props from './props.js';
 
-	/**
-	 * empty 内容为空
-	 * @description 该组件用于需要加载内容,但是加载的第一页数据就为空,提示一个"没有内容"的场景, 我们精心挑选了十几个场景的图标,方便您使用。
-	 * @tutorial https://www.uviewui.com/components/empty.html
-	 * @property {String}			icon		内置图标名称,或图片路径,建议绝对路径
-	 * @property {String}			text		提示文字
-	 * @property {String}			textColor	文字颜色 (默认 '#c0c4cc' )
-	 * @property {String | Number}	textSize	文字大小 (默认 14 )
-	 * @property {String}			iconColor	图标的颜色 (默认 '#c0c4cc' )
-	 * @property {String | Number}	iconSize	图标的大小 (默认 90 )
-	 * @property {String}			mode		选择预置的图标类型 (默认 'data' )
-	 * @property {String | Number}	width		图标宽度,单位px (默认 160 )
-	 * @property {String | Number}	height		图标高度,单位px (默认 160 )
-	 * @property {Boolean}			show		是否显示组件 (默认 true )
-	 * @property {String | Number}	marginTop	组件距离上一个元素之间的距离,默认px单位 (默认 0 )
-	 * @property {Object}			customStyle	定义需要用到的外部样式
-	 * 
-	 * @event {Function} click 点击组件时触发
-	 * @event {Function} close 点击关闭按钮时触发
-	 * @example <u-empty text="所谓伊人,在水一方" mode="list"></u-empty>
-	 */
-	export default {
-		name: "u-empty",
-		mixins: [uni.$u.mpMixin, uni.$u.mixin, props],
-		data() {
-			return {
-				icons: {
-					car: '购物车为空',
-					page: '页面不存在',
-					search: '没有搜索结果',
-					address: '没有收货地址',
-					wifi: '没有WiFi',
-					order: '订单为空',
-					coupon: '没有优惠券',
-					favor: '暂无收藏',
-					permission: '无权限',
-					history: '无历史记录',
-					news: '无新闻列表',
-					message: '消息列表为空',
-					list: '列表为空',
-					data: '数据为空',
-					comment: '暂无评论',
-				}
+/**
+ * empty 内容为空
+ * @description 该组件用于需要加载内容,但是加载的第一页数据就为空,提示一个"没有内容"的场景, 我们精心挑选了十几个场景的图标,方便您使用。
+ * @tutorial https://www.uviewui.com/components/empty.html
+ * @property {String}			icon		内置图标名称,或图片路径,建议绝对路径
+ * @property {String}			text		提示文字
+ * @property {String}			textColor	文字颜色 (默认 '#c0c4cc' )
+ * @property {String | Number}	textSize	文字大小 (默认 14 )
+ * @property {String}			iconColor	图标的颜色 (默认 '#c0c4cc' )
+ * @property {String | Number}	iconSize	图标的大小 (默认 90 )
+ * @property {String}			mode		选择预置的图标类型 (默认 'data' )
+ * @property {String | Number}	width		图标宽度,单位px (默认 160 )
+ * @property {String | Number}	height		图标高度,单位px (默认 160 )
+ * @property {Boolean}			show		是否显示组件 (默认 true )
+ * @property {String | Number}	marginTop	组件距离上一个元素之间的距离,默认px单位 (默认 0 )
+ * @property {Object}			customStyle	定义需要用到的外部样式
+ *
+ * @event {Function} click 点击组件时触发
+ * @event {Function} close 点击关闭按钮时触发
+ * @example <u-empty text="所谓伊人,在水一方" mode="list"></u-empty>
+ */
+export default {
+	name: 'u-empty',
+	mixins: [uni.$u.mpMixin, uni.$u.mixin, props],
+	data() {
+		return {
+			icons: {
+				car: '购物车为空',
+				data: '数据为空',
+				comment: '暂无评论'
 			}
+		};
+	},
+	computed: {
+		// 组件样式
+		emptyStyle() {
+			const style = {};
+			style.marginTop = uni.$u.addUnit(this.marginTop);
+			// 合并customStyle样式,此参数通过mixin中的props传递
+			return uni.$u.deepMerge(uni.$u.addStyle(this.customStyle), style);
 		},
-		computed: {
-			// 组件样式
-			emptyStyle() {
-				const style = {}
-				style.marginTop = uni.$u.addUnit(this.marginTop)
-				// 合并customStyle样式,此参数通过mixin中的props传递
-				return uni.$u.deepMerge(uni.$u.addStyle(this.customStyle), style)
-			},
-			// 文本样式
-			textStyle() {
-				const style = {}
-				style.color = this.textColor
-				style.fontSize = uni.$u.addUnit(this.textSize)
-				return style
-			},
-			// 判断icon是否图片路径
-			isSrc() {
-				return this.icon.indexOf('/') >= 0
-			}
+		// 文本样式
+		textStyle() {
+			const style = {};
+			style.color = this.textColor;
+			style.fontSize = uni.$u.addUnit(this.textSize);
+			return style;
+		},
+		// 判断icon是否图片路径
+		isSrc() {
+			return this.icon.indexOf('/') >= 0;
 		}
 	}
+};
 </script>
 
 <style lang="scss" scoped>
-	@import '../../libs/css/components.scss';
-	$u-empty-text-margin-top:20rpx !default;
-	$u-empty-slot-margin-top:20rpx !default;
+@import '../../libs/css/components.scss';
+$u-empty-text-margin-top: 20rpx !default;
+$u-empty-slot-margin-top: 20rpx !default;
+
+.u-empty {
+	@include flex;
+	flex-direction: column;
+	justify-content: center;
+	align-items: center;
 
-	.u-empty {
+	&__text {
 		@include flex;
-		flex-direction: column;
 		justify-content: center;
 		align-items: center;
-
-		&__text {
-			@include flex;
-			justify-content: center;
-			align-items: center;
-			margin-top: $u-empty-text-margin-top;
-		}
+		margin-top: -10px;
 	}
-		.u-slot-wrap {
-			@include flex;
-			justify-content: center;
-			align-items: center;
-			margin-top:$u-empty-slot-margin-top;
-		}
+}
+.u-slot-wrap {
+	@include flex;
+	justify-content: center;
+	align-items: center;
+	margin-top: $u-empty-slot-margin-top;
+}
 </style>