소스 검색

提交小程序

wang_xy 1 년 전
부모
커밋
273e245697
7개의 변경된 파일33개의 추가작업 그리고 385개의 파일을 삭제
  1. 13 2
      package.json
  2. 18 10
      pages.json
  3. 0 173
      pages/delis.vue
  4. 0 76
      pages/index.vue
  5. 1 1
      pages/login.vue
  6. 0 122
      pages/my.vue
  7. 1 1
      permission.js

+ 13 - 2
package.json

@@ -1,3 +1,14 @@
 {
-  
-}
+  "name": "jnb_wechatapp",
+  "version": "1.0.0",
+  "main": "main.js",
+  "scripts": {
+    "test": "echo \"Error: no test specified\" && exit 1"
+  },
+  "author": "",
+  "license": "ISC",
+  "description": "",
+  "dependencies": {
+    "quill": "^1.3.7"
+  }
+}

+ 18 - 10
pages.json

@@ -1,29 +1,37 @@
 {
-	"pages": [{
-			"path": "pages/index",
+	"pages": [
+		{
+			"path": "pages/demo/index",
+			"style": {
+				"navigationBarTitleText": "通知公告",
+				"navigationStyle": "custom"
+			}
+		},
+		{
+			"path": "pages/login",
 			"style": {
 				"navigationBarTitleText": "登录",
 				"navigationStyle": "custom"
 			}
 		},
 		{
-			"path": "pages/delis",
+			"path": "pages/demo/my",
 			"style": {
-				"navigationBarTitleText": "详情",
+				"navigationBarTitleText": "我的",
 				"navigationStyle": "custom"
 			}
 		},
 		{
-			"path": "pages/login",
+			"path": "pages/demo/delis",
 			"style": {
-				"navigationBarTitleText": "通知公告",
+				"navigationBarTitleText": "详情",
 				"navigationStyle": "custom"
 			}
 		},
 		{
-			"path": "pages/my",
+			"path": "pages/demo/fwblz",
 			"style": {
-				"navigationBarTitleText": "我的",
+				"navigationBarTitleText": "详情",
 				"navigationStyle": "custom"
 			}
 		}
@@ -34,12 +42,12 @@
 		"borderStyle": "white",
 		"backgroundColor": "#ffffff",
 		"list": [{
-			"pagePath": "pages/index",
+			"pagePath": "pages/demo/index",
 			"iconPath": "static/images/tabbar/gg.png",
 			"selectedIconPath": "static/images/tabbar/gg_.png",
 			"text": "公告"
 		},{
-			"pagePath": "pages/my",
+			"pagePath": "pages/demo/my",
 			"iconPath": "static/images/tabbar/gg.png",
 			"selectedIconPath": "static/images/tabbar/gg_.png",
 			"text": "我的"

+ 0 - 173
pages/delis.vue

@@ -1,173 +0,0 @@
-<template>
-	<view class="gg-container">
-		<view class="gg-tit">
-			<view class="gg-title">
-				我的吉农宝<text>上个页面传过来的参数{{id}}</text>
-			</view>
-			<view>
-			<uni-section title="基本用法" type="line">
-						<view class="example">
-							<!-- 基础用法,不包含校验规则 -->
-							<uni-forms ref="baseForm" :modelValue="baseFormData">
-								<uni-forms-item label="姓名" required>
-									<uni-easyinput v-model="baseFormData.name" placeholder="请输入姓名" />
-								</uni-forms-item>
-								<uni-forms-item label="年龄" required>
-									<uni-easyinput v-model="baseFormData.age" placeholder="请输入年龄" />
-								</uni-forms-item>
-								<uni-forms-item label="性别" required>
-									<uni-data-checkbox v-model="baseFormData.sex" :localdata="sexs" />
-								</uni-forms-item>
-								<uni-forms-item label="兴趣爱好" required>
-									<uni-data-checkbox v-model="baseFormData.hobby" multiple :localdata="hobbys" />
-								</uni-forms-item>
-								<uni-forms-item label="自我介绍">
-									<uni-easyinput type="textarea" v-model="baseFormData.introduction" placeholder="请输入自我介绍" />
-								</uni-forms-item>
-								<uni-forms-item label="日期时间">
-									<uni-datetime-picker type="datetime" return-type="timestamp" v-model="baseFormData.datetimesingle"/>
-								</uni-forms-item>
-							</uni-forms>
-						</view>
-					</uni-section>
-					<uni-section title="多行文本" subTitle="指定属性 type=textarea 使用多行文本框" type="line" padding>
-						<uni-easyinput type="textarea" v-model="value" placeholder="请输入内容"></uni-easyinput>
-					</uni-section>
-							    <!-- 这张图片就是自定义的图片,地址填写自己本地的就行 -->
-					<image src="https://qiniu-web-assets.dcloud.net.cn/unidoc/zh/unicloudlogo.png" 
-					mode="widthFix" style="width: 112rpx;height: 110rpx;" @click="uploadImagePhoto()"></image>
-					
-				</view>
-		</view>
-	</view>
-</template>
-
-<script>
-	export default {
-		data() {
-			return {
-				baseFormData: {
-					name: '',
-					age: '',
-					introduction: '',
-					sex: 2,
-					hobby: [5],
-					datetimesingle: 1627529992399
-				},
-				// 单选数据源
-				sexs: [{
-					text: '男',
-					value: 0
-				}, {
-					text: '女',
-					value: 1
-				}, {
-					text: '保密',
-					value: 2
-				}],
-				// 多选数据源
-				hobbys: [{
-					text: '跑步',
-					value: 0
-				}, {
-					text: '游泳',
-					value: 1
-				}, {
-					text: '绘画',
-					value: 2
-				}, {
-					text: '足球',
-					value: 3
-				}, {
-					text: '篮球',
-					value: 4
-				}, {
-					text: '其他',
-					value: 5
-				}],
-				value: '',
-				password: '',
-				placeholderStyle: "color:#2979FF;font-size:14px",
-				styles: {
-					color: '#2979FF',
-					borderColor: '#2979FF'
-				},
-				id:'',
-				fileList1: []
-			}
-
-		},
-		onLoad(options) {
-			this.id = options.id;
-		},
-		onReady() {},
-		methods: {
-			input(e) {
-				console.log('输入内容:', e);
-			},
-			iconClick(type) {
-				uni.showToast({
-					title: `点击了${type==='prefix'?'左侧':'右侧'}的图标`,
-					icon: 'none'
-				})
-			},
-			uploadImagePhoto() {
-				uni.chooseImage({
-					count: 6, //默认9
-					sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
-					sourceType: ['album'], //从相册选择
-					success: function (res) {
-					}
-				});
-			},
-			// 新增图片
-			async afterRead(event) {
-				console.log(event)
-				// 当设置 mutiple 为 true 时, file 为数组格式,否则为对象格式
-				let lists = [].concat(event.file)
-				let fileListLen = this[`fileList${event.name}`].length
-				lists.map((item) => {
-					this[`fileList${event.name}`].push({
-						...item,
-						status: 'uploading',
-						message: '上传中'
-					})
-				})
-				for (let i = 0; i < lists.length; i++) {
-					const result = await this.uploadFilePromise(lists[i].url)
-					let item = this[`fileList${event.name}`][fileListLen]
-					this[`fileList${event.name}`].splice(fileListLen, 1, Object.assign(item, {
-						status: 'success',
-						message: '',
-						url: result
-					}))
-					fileListLen++
-				}
-			},
-			//上传图片
-			uploadFilePromise(url) {
-				return new Promise((resolve, reject) => {
-					let a = uni.uploadFile({
-						//url: this.$common.domain+'/api/common/upload', // 仅为示例,非真实的接口地址
-						// url:'http://192.168.2.21:7001/upload', // 仅为示例,非真实的接口地址
-						filePath: url,
-						name: 'file',
-						formData: {
-							user: 'test'
-						},
-						success: (res) => {
-							let data=JSON.parse(res.data) //最终传给的是字符串,这里需要转换格式
-							resolve(data.data.url)
-						}
-					});
-				})
-			}
-		}
-	}
-</script>
-
-<style scoped lang="scss">
-	.uni-mt-5 {
-		margin-top: 5px;
-	}
-</style>

+ 0 - 76
pages/index.vue

@@ -1,76 +0,0 @@
-<template>
-	<view class="gg-container">
-		<view class="gg-tit">
-			<view class="gg-title">
-				吉农宝
-			</view>
-			<view>
-				<uni-list>
-					<uni-list :border="true">
-						<!-- 显示圆形头像 -->
-						<uni-list-chat :avatar-circle="true" title="uni-app" avatar="https://qiniu-web-assets.dcloud.net.cn/unidoc/zh/unicloudlogo.png" note="您收到一条新的消息" time="2020-02-02 20:20" ></uni-list-chat>
-						<!-- 右侧带角标 -->
-						<uni-list-chat title="uni-app" avatar="https://qiniu-web-assets.dcloud.net.cn/unidoc/zh/unicloudlogo.png" note="您收到一条新的消息" time="2020-02-02 20:20" badge-text="12"></uni-list-chat>
-						<!-- 头像显示圆点 -->
-						<uni-list-chat title="uni-app" avatar="https://qiniu-web-assets.dcloud.net.cn/unidoc/zh/unicloudlogo.png" note="您收到一条新的消息" time="2020-02-02 20:20" badge-positon="left" badge-text="dot"></uni-list-chat>
-						<!-- 头像显示角标 -->
-						<uni-list-chat title="uni-app" avatar="https://qiniu-web-assets.dcloud.net.cn/unidoc/zh/unicloudlogo.png" note="您收到一条新的消息" time="2020-02-02 20:20" badge-positon="left" badge-text="99" to="/pages/delis?id=123"></uni-list-chat>
-						<!-- 显示多头像 -->
-						<uni-list-chat title="uni-app" :avatar-list="avatarList" note="您收到一条新的消息" time="2020-02-02 20:20" badge-positon="left" badge-text="dot"></uni-list-chat>
-						<!-- 自定义右侧内容 -->
-						<uni-list-chat title="uni-app" :avatar-list="avatarList" note="您收到一条新的消息" time="2020-02-02 20:20" badge-positon="left" badge-text="dot">
-							<view class="chat-custom-right">
-								<text class="chat-custom-text">刚刚</text>
-								<!-- 需要使用 uni-icons 请自行引入 -->
-								<uni-icons type="star-filled" color="#999" size="18"></uni-icons>
-							</view>
-						</uni-list-chat>
-					</uni-list>
-				</uni-list>
-			</view>
-		</view>
-	</view>
-</template>
-
-<script>
-	export default {
-		data() {
-			return {
-				avatarList: [{
-								url: 'https://qiniu-web-assets.dcloud.net.cn/unidoc/zh/unicloudlogo.png'
-							}, {
-								url: 'https://qiniu-web-assets.dcloud.net.cn/unidoc/zh/unicloudlogo.png'
-							}, {
-								url: 'https://qiniu-web-assets.dcloud.net.cn/unidoc/zh/unicloudlogo.png'
-							}]
-			}
-		},
-		onLoad(options) {
-			this.userInfo = getApp().globalData.userInfo
-		},
-		methods: {
-			tiaozhuan(){
-				uni.navigateTo({
-					url:"/pages/delis"
-				})
-			}
-		}
-	}
-</script>
-
-<style scoped lang="scss">
-	.chat-custom-right {
-		flex: 1;
-		/* #ifndef APP-NVUE */
-		display: flex;
-		/* #endif */
-		flex-direction: column;
-		justify-content: space-between;
-		align-items: flex-end;
-	}
-	
-	.chat-custom-text {
-		font-size: 12px;
-		color: #999;
-	}
-</style>

+ 1 - 1
pages/login.vue

@@ -33,7 +33,7 @@
 					 wxLogin(res.code).then(res => {
 						 _this.$modal.closeLoading()
 						uni.switchTab({
-							url:'/pages/index'
+							url:'/pages/demo/index'
 						})
 					 })
 		           } else {

+ 0 - 122
pages/my.vue

@@ -1,122 +0,0 @@
-<template>
-	<view class="gg-container">
-		<view class="gg-tit">
-			<view class="gg-title">
-				我的吉农宝
-			</view>
-			<view>
-			  <image class="userinfo-avatar" :src="userInfo.avatarUrl" mode="cover"></image>
-			  <text class="userinfo-nickname">{{userInfo.nickName}}</text>
-			</view>
-		</view>
-	</view>
-</template>
-
-<script>
-	export default {
-		components: {
-		},
-		data() {
-			return {
-				userInfo: {}
-			}
-		},
-		onLoad() {
-			this.userInfo = getApp().globalData.userInfo
-		},
-		methods: {
-		}
-	}
-</script>
-
-<style scoped lang="scss">
-	.gg-container {
-		background-color: #fff;
-		display: flex;
-		flex-direction: column;
-	}
-
-	.gg-tit {
-		width: 100%;
-		position: relative;
-		top: 0;
-		height: 40vh;
-		display: flex;
-		justify-content: center;
-		align-items: center;
-	}
-
-	.gg-body {
-		display: flex;
-		position: absolute;
-		bottom: 25rpx;
-		width: 728rpx;
-		height: 80rpx;
-		background: linear-gradient(0deg, #90BDFF, #3F93FD, #20B9D5);
-		border-radius: 40rpx;
-		justify-content: center;
-		align-items: center;
-
-		.gg-body-tt {
-			text-align: left;
-			margin-left: 5px;
-			width: 25%;
-			display: flex;
-			align-items: center;
-			color: #FFFFFF;
-			font-weight: bold;
-			font-size: 30rpx;
-		}
-	}
-
-	.content {
-		display: flex;
-		flex-direction: column;
-		align-items: center;
-		justify-content: center;
-	}
-
-	.background {
-		border: 15px solid hsla(0, 0%, 100%, .5);
-		background: white;
-		background-clip: padding-box;
-		/*从padding开始往外面裁剪背景*/
-
-	}
-
-	.container {
-		display: flex;
-		margin-left: 10px;
-		margin-top: 10px;
-		margin-right: 10px;
-		align-items: flex-start;
-		justify-content: space-between;
-	}
-
-	.gg-title {
-		width: 100%;
-		position: absolute;
-		z-index: 1;
-		display: flex;
-		justify-content: center;
-		align-items: center;
-		font-size: 40rpx;
-		font-weight: bold;
-		color: #FFFFFF;
-	}
-
-
-
-	.notice {
-		margin: 20rpx;
-		padding: 20rpx;
-		background: #FFFFFF;
-		box-shadow: 0rpx 8rpx 17rpx 0rpx rgba(0, 0, 0, 0.04);
-		border-radius: 10rpx;
-	}
-
-	.text {
-		border-left: 15rpx solid #3857F3;
-		padding-left: 20rpx;
-	}
-</style>

+ 1 - 1
permission.js

@@ -5,7 +5,7 @@ const loginPage = "/pages/login"
   
 // 页面白名单
 const whiteList = [
-  '/pages/login', '/pages/index', '/pages/my','/pages/delis'
+  '/pages/login', '/pages/demo/index', '/pages/demo/my','/pages/demo/fwblz'
 ]
 
 // 检查地址白名单