zizhong.wang лет назад: 4
Родитель
Сommit
80e8bb827a

+ 18 - 0
pages.json

@@ -5,6 +5,24 @@
 			"style": {
 				"navigationBarTitleText": "农工笔记"
 			}
+		},
+		{
+			"path": "pages/index/self_info",
+			"style": {
+				"navigationBarTitleText": "个人信息"
+			}
+		},
+		{
+			"path": "pages/index/org_member",
+			"style": {
+				"navigationBarTitleText": "组织成员"
+			}
+		},
+		{
+			"path": "pages/index/back_login",
+			"style": {
+				"navigationBarTitleText": "后台登录"
+			}
 		}
 	    ,{
             "path" : "pages/index/upload/upload",

+ 153 - 0
pages/index/back_login.vue

@@ -0,0 +1,153 @@
+<template>
+  <view class="content">
+	<view>请在PC浏览器输入后台登录网址:</view>  
+	<view>https://ng.xazhima.com/ ;</view>
+	<view>使用下方“扫一扫”功能扫码登录</view>
+    
+	<view class="options">
+      <view  v-for="(item, idx) in list" :key="idx" class="options-item" @click="goDetailFn(idx, item.url)"  v-if="item.isShow">
+        <view class="img-box">
+          <img :src="item.icon" alt="" class="options-item-img" />
+        </view>
+        <view class="options-item-name">
+          {{ item.name }}
+        </view>
+      </view>
+    </view>
+  </view>
+</template>
+
+<script>
+import md5 from "@/common/md5.js";
+export default {
+	components: {
+	},
+  data() {
+    return {
+      isAuth: true,
+      userHeadImg: "",
+      userNickName: "",
+	  userscanCode:"",
+      list: [
+		 {
+		   icon: "/static/scan.png", 
+		   name: "扫一扫" ,
+		   // url: "/pages/index/scanCode/index",
+		   isShow:true,
+		  },
+      ],
+    };
+  },
+  onLoad() {
+  },
+  onShow() {
+  },
+  methods: {
+    codeReg(strs){
+			let reg = /\[(.*?)\]/gi;
+			let str = strs;
+			let tmp = str.match(reg) , result = '';
+			if (tmp) {
+				for (let i = 0; i < tmp.length; i++) {
+					 result = tmp[i].replace(reg, "$1")
+				}
+			} else {
+				console.log("no match.");
+			}
+			 console.log(result)
+			this.getScanCode(result)
+    },
+	getScanCode(codeRes) {
+	    let md5Sign = md5(
+	      "method=" +
+	        "user" +
+	        "&timestamp=" +
+	        getApp().globalData.globalTimestamp +
+	        "&secret=" +
+	        getApp().globalData.secret
+	    );
+	    let url =
+	      getApp().globalData.shareUrl +
+	      "api/api.php" +
+	      "?method=user&action=qrcode_login&timestamp=" +
+	      getApp().globalData.globalTimestamp +
+	      "&sign=" +
+	      md5Sign;
+	    uni.request({
+	      url: url,
+	      method: "POST",
+	      header: {
+	        "content-type": "application/x-www-form-urlencoded",
+	      },
+	      data: {
+	        openid:getApp().globalData.open_id,
+			qrcode:codeRes
+	      },
+	      success: (res) => {
+	        if (res.data.code === 200) {
+				uni.showToast({
+					title:res.data.msg,
+					icon:'none'
+				})
+	        } else {
+				uni.showToast({
+					title:res.data.msg,
+					icon:'none'
+				})
+			}
+	      },
+	      fail: () => {
+	        console.log("连接失败");
+	      },
+	    });
+	  },		
+    goDetailFn(index, url) {
+      let that = this;
+	  uni.scanCode({
+	      success: function (res) {
+	          console.log('条码类型:' + res.scanType);
+	          console.log('条码内容:' + res.result);
+	  		  that.codeReg(res.result)
+	      }
+	  });
+    },
+  },
+};
+</script>
+
+<style lang="scss" scoped>
+.content {
+	display: flex;
+    flex-direction: column;
+    padding: 40rpx;
+    color: #444;
+    font-size: 30rpx;
+  .options {
+     margin-top: 15%;
+    .options-item {
+		background-color: #fff;
+		display: flex;
+		box-shadow: 0px 4rpx 32rpx rgba(0, 0, 0, 0.1);
+		border-radius: 10rpx;
+		height: 120rpx;
+		align-items: center;
+      .img-box {
+        margin-left: 40rpx;
+        .options-item-img {
+          width: 56rpx;
+          height: 56rpx;
+        }
+      }
+      .options-item-name {
+        margin-left: 40rpx;
+        font-weight: 600;
+        font-size: 30rpx;
+        margin-bottom: 10rpx;
+      }
+    }
+  }
+}
+.fontGrey {
+  color: $uni-text-color-grey;
+}
+</style>

+ 196 - 64
pages/index/honor/honor.vue

@@ -1,6 +1,76 @@
 <template>
   <view class="content">
-     荣誉殿堂
+	 <view>
+		 <uni-segmented-control :current="current" :values="items" @clickItem="onClickItem" 
+		 styleType="text" activeColor="#1c9bdc"></uni-segmented-control>
+		 <view class="content">
+			 <view v-show="current == 0">
+				 <view class="active-title-box">
+				 	<uni-datetime-picker
+				 	    class="time-select-box"
+				 		type="date"
+				 		:value="single"
+				 		@change="change"
+				 		:clear-icon="false"
+				 	/>
+				    <picker @change="bindPickerChange" :value="index" :range="array">
+				 			<view class="uni-input">{{array[index]}}</view>
+				 			<image src="/static/arrow_down.svg" mode="aspectFit"></image>
+				    </picker>
+				    <button>+发布活动</button>
+				 </view>
+				 <view class="honor-box" v-for="(item,index) in honorList" :key="index">
+					    <view class="honor-name">{{item.name}}</view>
+						<image :src="item.img_url" mode="aspectFit"></image>
+					    <view class="honor-award">获奖人:{{item.award_name}}</view>
+						<view class="honor-info-box">
+							<text>{{item.date}}</text>
+							<text>|</text>
+							<text>{{item.level}}</text>
+							<text>|</text>
+							<text>{{item.honor_type}}</text>
+							<text>|</text>
+							<text>{{item.honor_self}}</text>
+						</view>
+				 </view>
+			 </view>
+			 <view v-show="current == 1">
+				 <view class="active-title-box">
+				 	<uni-datetime-picker
+				 	    class="time-select-box"
+				 		type="date"
+				 		:value="single"
+				 		@change="change"
+				 		:clear-icon="false"
+				 	/>
+				    <picker @change="bindPickerChange" :value="index" :range="array">
+				 			<view class="uni-input">{{array[index]}}</view>
+				 			<image src="/static/arrow_down.svg" mode="aspectFit"></image>
+				    </picker>
+				    <button>+发布活动</button>
+				 </view>
+				 <view class="honor-box" v-for="(item,index) in myHonorList" :key="index" style="position: relative;">
+						<view class="honor-name">{{item.name}}</view>
+						<image :src="item.img_url" mode="aspectFit"></image>
+						<view class="honor-award">获奖人:{{item.award_name}}</view>
+						<view class="honor-info-box">
+							<text>{{item.date}}</text>
+							<text>|</text>
+							<text>{{item.level}}</text>
+							<text>|</text>
+							<text>{{item.honor_type}}</text>
+							<text>|</text>
+							<text>{{item.honor_self}}</text>
+						</view>
+						<view class="edit-icon-box">
+							  <image src="/static/edit-icon.png" mode="aspectFit"></image>
+							  <image src="/static/del-icon.png" mode="aspectFit"></image>
+						</view>
+				 </view>  
+				 
+			 </view>
+		 </view>
+	 </view>
   </view>
 </template>
 
@@ -12,11 +82,52 @@ export default {
     return {
       id: "",
       details: "",
+	  items:['支部/组织荣誉','我的荣誉'],
+	  current:0,
+	  array:['中央','省级','市级','区级','单位'],
+	  index:2,
       imageList: [],
       time: "",
 	  globalUrl:getApp().globalData.shareUrl,
-	  pageList:[
-
+	  honorList:[
+           {
+			   name:'荣誉名称XXXX',
+			   award_name:'王谦 黄华',
+			   date:'2021年12月',
+			   level:'市级',
+			   honor_type:'党内荣誉',
+			   honor_self:'个人荣誉',
+			   img_url:'/static/logo.png',
+		   },
+		   {
+			   name:'荣誉名称XXXX',
+			   award_name:'灞桥区工委 肖亮 尹嗣瑜',
+			   date:'2021年12月',
+			   level:'市级',
+			   honor_type:'党内荣誉',
+			   honor_self:'个人荣誉',
+			   img_url:'/static/logo.png',
+		   }
+	  ],
+	  myHonorList:[
+	       {
+			   name:'荣誉名称XXXX111',
+			   award_name:'王谦 黄华',
+			   date:'2021年12月',
+			   level:'市级',
+			   honor_type:'党内荣誉',
+			   honor_self:'个人荣誉1',
+			   img_url:'/static/logo.png',
+	  		   },
+	  		{
+			   name:'荣誉名称XXXX222',
+			   award_name:'灞桥区工委 肖亮 尹嗣瑜',
+			   date:'2021年12月',
+			   level:'市级',
+			   honor_type:'党内荣誉',
+			   honor_self:'个人荣誉2',
+			   img_url:'/static/logo.png',
+	  		 }
 	  ]
     };
   },
@@ -24,71 +135,92 @@ export default {
    
   },
   methods: {
-
-
+    onClickItem(e){
+		this.current = e.currentIndex
+	},
+	change(e) {
+	  this.single = e;
+	  console.log("-change事件:", e);
+	 },
   },
 };
 </script>
 <style lang="scss" scoped>
-.flex-box {
-  display: flex;
-  flex-wrap: wrap;
-  width: 100%;
-}
-.view {
-  display: flex;
-}
 .content {
-  font-size: 32rpx;
-  .title {
-    margin: 4% 5%;
-  }
-  .details {
-    font-size: 28rpx;
-    width: 90%;
-    margin: 0 2%;
-    padding: 2% 3%;
-	border-bottom: 3px solid #f2f2f2;
-    // border-radius: 50rpx;
-    // box-shadow: rgba(100, 100, 111, 0.2) 0rpx 14rpx 50rpx 14rpx;
-    image {
-      width: 180rpx;
-      height: 150rpx;
-      border-radius: 30rpx;
-      margin: 0 2%;
-    }
-    .view {
-      margin: 3% 0;
-    }
-    .label {
-      display: inline-block;
-      width:150rpx;
-      vertical-align: middle;
-      margin-right: 10rpx;
-    }
-  }
-  .info {
-    font-size: 28rpx;
-    width: 90%;
-    margin: 4% 2%;
-    padding: 2% 3%;
-    border-radius: 40rpx;
-    box-shadow: rgba(100, 100, 111, 0.2) 0rpx 14rpx 50rpx 14rpx;
-    .title {
-      margin: 4% 0;
-      font-size: 32rpx;
-    }
-    .view {
-      display: flex;
-      align-items: center;
-      margin: 5% 0;
-    }
-    .label {
-      display: inline-block;
-      width: 150rpx;
-      vertical-align: middle;
-      margin-right: 10rpx;
-    }
-  }
+   .active-title-box {
+	   display: flex;
+       align-items: center;
+       margin-top: 10rpx;
+       font-size: 26rpx;
+       height: 100rpx;
+       border-bottom: 1px solid #d7d7d7;
+       margin-top: 10rpx;
+   		.time-select-box {
+   			width: 32%;
+   			margin-left: 5%;
+   		}
+   		picker {
+   		    width: 25%;
+   			border: 1px solid #d7d7d7;
+   			height: 60rpx;
+   			line-height: 60rpx;
+   			border-radius: 10rpx;
+   			margin-left: 20rpx;
+   			padding: 0 10rpx;
+   			position: relative;
+   			image {
+   				width: 20rpx;
+   				height: 20rpx;
+   				position: absolute;
+   				top: 11px;
+   				right: 5px;
+   			}
+   		}
+   		button {
+   			width: 24%;
+   			font-size: 25rpx;
+   			background: #4988fd;
+   			color: #fff;
+   			margin-left: 25rpx;
+   		}
+   }
+   
+   .honor-box {
+	   display: flex;
+	   flex-direction: column;
+	   padding: 20rpx 40rpx 20rpx 40rpx;
+	   border-bottom: 1px solid #d7d7d7;
+	   image {
+			width: 240rpx;
+			height: 160rpx;
+			margin: 20rpx auto;
+	   }
+	   .honor-award {
+		   color: #ccc;
+		   font-size: 28rpx;
+		   margin: 20rpx 0 10rpx 0;
+	   }
+	   .honor-info-box {
+		  display: flex;
+		  align-items: center;
+		  font-size: 26rpx;
+		  color: #ccc;
+		  text {
+			  margin-right: 20rpx;
+		  }
+	   }
+	   .edit-icon-box {
+		   position: absolute;
+		   right: 10px;
+		   top: 10px;
+		   image {
+		   	width: 35rpx;
+		   	height: 35rpx;
+		   	margin-right: 10rpx;	
+		   }
+	   }
+   }
+   
+   
 }
 </style>

+ 30 - 16
pages/index/index.vue

@@ -68,19 +68,19 @@ export default {
 		{
 		  icon: "/static/self-icon.png", 
 		  name: "个人信息" ,
-		 // url: "/pages/",
+		  url: "/pages/index/self_info",
 		  isShow:true,
 		 },
 		 {
 		   icon: "/static/org-icon.png", 
 		   name: "组织成员" ,
-		   // url: "/pages/index/scanCode/index",
+		   url: "/pages/index/org_member",
 		   isShow:true,
 		  },
-		{
+		 {
 		  icon: "/static/explain-icon.png", 
-		  name: "后台说明" ,
-		 // url: "/pages/index/record/record",
+		  name: "后台登录" ,
+		  url: "/pages/index/back_login",
 		  isShow:true,
 		 },
 		 {
@@ -262,17 +262,7 @@ export default {
 		  return;
 	  }
       switch (index) {
-        case 0: //内容上传
-			uni.navigateTo({
-			  url,
-			}); 
-          break;
-        case 1: //发布记录
-			uni.navigateTo({
-			  url,
-			}); 
-          break;
-		case 2: //扫一扫
+        case 0: //扫码
 		    uni.scanCode({
 		        success: function (res) {
 		            console.log('条码类型:' + res.scanType);
@@ -280,7 +270,31 @@ export default {
 					that.codeReg(res.result)
 		        }
 		    });
+          break;
+        case 1: //个人信息
+			uni.navigateTo({
+			  url,
+			}); 
+          break;
+		case 2: //组织成员
+		  uni.navigateTo({
+		    url,
+		  });
+		  break;  
+		case 3: //后台登录
+			uni.navigateTo({
+			  url,
+			});
+		  break;  
+		case 4: //退出登录
+			uni.navigateTo({
+			  url,
+			});
 		  break;  
+        default:
+			uni.navigateTo({
+			  url,
+			});
       }
     },
   

+ 239 - 0
pages/index/org_member.vue

@@ -0,0 +1,239 @@
+<template>
+  <view class="content">
+    <view>
+		<view class="active-title-box">
+		   <picker @change="bindPickerChange" :value="index" :range="array">
+					<view class="uni-input">{{array[index]}}</view>
+					<image src="/static/arrow_down.svg" mode="aspectFit"></image>
+		   </picker>
+		</view>
+		<view class="active-box" v-for="(item,index) in orgList" :key="index">
+			<view class="active-content-box">
+				<view class="active-content">
+					<view class="active-name">{{item.name}}</view>
+					<view class="active-date">({{item.company}})</view>
+				</view>
+				<view class="active-content" style="margin-top: 10rpx">
+					<view>{{item.phone}}</view>
+				</view>
+			</view>
+		</view>
+	</view>
+  </view>
+</template>
+
+<script>
+import md5 from "@/common/md5.js";
+export default {
+	components: {
+	},
+  data() {
+    return {
+      isAuth:getApp().globalData.globalAuth,
+      userHeadImg: getApp().globalData.user_headUrl,
+      userNickName:getApp().globalData.user_name,
+	  array: ['全部', '浐灞一支部', '浐灞二支部'],
+	  index: 0,
+	  orgList:[
+		  {
+		     name:'路小路',
+			 company:'西安芝麻开花科技有限公司',
+			 phone:'18442712329'
+		  },
+		  {
+		     name:'肖阳',
+			 company:'西安芝麻开花科技有限公司',
+			 phone:'18765670560'
+		  },
+		  {
+		     name:'刘森宇',
+			 company:'西安芝麻开花科技有限公司',
+			 phone:'13991322329'
+		  },
+		  {
+		     name:'张琪',
+			 company:'西安芝麻开花科技有限公司',
+			 phone:'15902958809'
+		  },
+	  ]
+    };
+  },
+  onShow() {
+  },
+  methods: {
+		  bindPickerChange: function(e) {
+			  console.log('picker发送选择改变,携带值为', e.target.value)
+			  this.index = e.target.value
+		  },
+		  change(e) {
+			  this.single = e;
+			  console.log("-change事件:", e);
+		  },
+  },
+};
+</script>
+
+<style lang="scss" scoped>
+.content {
+  display: flex;
+  flex-direction: column;
+  .self-inf {
+    // border-radius: 0rpx 0rpx 100% 100%;
+    .img-name-box {
+		height: 150rpx;
+		margin-top: 20rpx;
+		margin-bottom: 20rpx;
+		display: flex;
+		align-items: center;
+		width: 85%;
+      .auth-btn {
+		margin-left: 30rpx;
+		margin-top: 20rpx;
+        font-size: 28rpx;
+        background-color: #02a7f0;
+        color: #fff;
+      }
+      .heade-img {
+        z-index: 1;
+        width: 100rpx;
+        height: 100rpx;
+        border-radius: 50%;
+        // margin-left: 80rpx;
+      }
+    }
+    .nickname {
+      font-weight: 600;
+      font-size: 28rpx;
+      margin-left: 30rpx;
+      margin-top: 20rpx;
+      color: #555;
+      letter-spacing: 1rpx;
+    }
+  }
+}
+.antu-box {
+	display: flex;
+    flex-direction: column;
+    align-items: center;
+    background: #fff;
+    margin-left: 5%;
+    margin-top: 50rpx;
+    border-radius: 10rpx;
+    width: 90%;
+    color: #555;
+    box-shadow: 0px 2px 16px rgba(0, 0, 0, 0.2);
+}
+.org-info-box {
+    display: flex;
+    justify-content: space-evenly;
+    height: 80rpx;
+    align-items: center;
+    width: 100%;
+    border-top: 1px solid #d4d4d4;
+    color: #555;
+    font-size: 28rpx;
+    background: #fff;
+} 
+.org-line {
+	width: 1px;
+	height: 82rpx;
+	background: #d4d4d4;
+} 
+
+.active-title-box {
+	display: flex;
+    align-items: center;
+    margin-top: 10rpx;
+    font-size: 26rpx;
+    height: 100rpx;
+    border-bottom: 1px solid #d7d7d7;
+    margin-top: 10rpx;
+		.time-select-box {
+			width: 32%;
+			margin-left: 5%;
+		}
+		picker {
+		    width: 25%;
+			border: 1px solid #d7d7d7;
+			height: 60rpx;
+			line-height: 60rpx;
+			border-radius: 10rpx;
+			margin-left: 20rpx;
+			padding: 0 10rpx;
+			position: relative;
+			image {
+				width: 20rpx;
+				height: 20rpx;
+				position: absolute;
+				top: 11px;
+				right: 5px;
+			}
+		}
+		button {
+			width: 24%;
+			font-size: 25rpx;
+			background: #4988fd;
+			color: #fff;
+			margin-left: 25rpx;
+		}
+	
+	
+}
+.active-box {
+    display: flex;
+    align-items: center;
+    position: relative;
+    font-size: 28rpx;
+    padding: 15rpx;
+    border-bottom: 1px solid #d7d7d7;
+	.active-type {
+		width: 100rpx;
+		height: 100rpx;
+		border-radius: 50%;
+		background-color: yellow;
+		text-align: center;
+		display: flex;
+		align-items: center;
+		font-size: 26rpx;
+		color: #fff;
+	}
+	.active-content-box {
+		display: flex;
+		flex-direction: column;
+		margin-left: 10rpx;
+		width: 100%;
+	}
+	.active-content {
+		display: flex;
+		align-items: center;
+		height: 45rpx;
+		font-size: 28rpx;	
+		.active-name {
+			font-size: 30rpx;
+			width: 18%;
+		}
+		.active-date {
+			color: #999;
+		}
+	}
+	.edit-icon-box {
+		position: absolute;
+		right: 10px;
+		top: 10px;
+		image {
+			width: 35rpx;
+			height: 35rpx;
+			margin-right: 10rpx;	
+		}
+	}
+	.bg-yellow {
+		background-color: #ffdd40;
+	}
+	.bg-red {
+		background-color: #ec808d;
+	}
+	.bg-blue {
+		background-color: #81d3f8;
+	}
+}
+</style>

+ 611 - 0
pages/index/self_info.vue

@@ -0,0 +1,611 @@
+<template>
+	<view class="content-box">
+	<!--     <view class="header-box">
+			 <image src="/static/tips.png" mode="aspectFill"></image>
+			  <text>温馨提示:请填写以下信息,填写后信息不可修改</text>
+		 </view> -->
+		<form @submit="formSubmit" style="width: 100%"> 
+	<!--     <view class="self-title-box">
+			 <image src="/static/rect-icon.png" mode="aspectFill"></image>
+			 <text>登记信息</text>
+		 </view> -->
+		<view class="info-box">
+			<view class="info-title-box">
+				<!-- <image src="/static/require-icon.png" mode="aspectFill"></image> -->
+				<text>姓名</text>
+			</view>
+			<view class="info-value-box">
+				<input type="text" placeholder="请输入姓名" name="selfName">
+			</view>		
+		</view>
+		<view class="info-box">
+			<view class="info-title-box">
+				<!-- <image src="/static/require-icon.png" mode="aspectFill"></image> -->
+				<text>手机号</text>
+			</view>
+			<view class="info-value-box">
+				<input type="tel" placeholder="请输入手机号" name="selfTel">
+			</view>		
+		</view>
+		<view class="info-box">
+			<view class="info-title-box">
+				<!-- <image src="/static/require-icon.png" mode="aspectFill"></image> -->
+				<text>个人照片</text>
+			</view>
+			<view class="info-value-box">
+				<view class="update_button display-flex">
+				  <view class="upload-box" @click="getImage('album')">
+				    <view class="img">
+				      <image src="/static/photo.png" class="photo"></image>
+				    </view>
+				  </view>
+				  <view
+				    class="display-flex upload-box-photo"
+				    v-for="(item, index) in uploadList"
+				    :key="index"
+				  >
+				    <image :src="item" mode="aspectFit"  style="width: 100%; height: 100%" @click="showLarge(item)"/>
+				    <image src="/static/del.png" class="del-icon"mode="aspectFit" 
+							  style="width: 30rpx; height: 30rpx" @click="delPhoto(index)"></image>
+				  </view>
+				</view>
+			</view>		
+		</view>
+		
+		
+		<view class="info-box">
+			<view class="info-title-box">
+				<!-- <image src="/static/require-icon.png" mode="aspectFill"></image> -->
+				<text>入党年月</text>
+			</view>
+			<view class="info-value-box">
+				<view class="uni-list title-date-box">
+					<view class="uni-list-cell">
+						<view class="uni-list-cell-db display-flex-start">
+							<picker mode="date" fields="year"  @change="bindDateChange" class="picker-class">
+								<view class="uni-input display-between items-center">{{dateYear}}年<image src="/static/calendar_icon.svg" mode="aspectFit" style="top: 18rpx;"></image></view>
+							</picker>
+							<picker :range="arrayMonth" :value="dateMonth"  @change="bindDateMonthChange" class="picker-class" style="margin-left: 2%;">
+								<view class="uni-input display-between items-center" style="color: #707070;">{{dateMonth}}月<image src="/static/calendar_icon.svg" mode="aspectFit" style="top: 18rpx;"></image></view>
+							</picker>
+						</view>
+					</view>
+				</view>
+			</view>		
+		</view>
+		
+		<view class="info-box">
+			<view class="info-title-box">
+				<!-- <image src="/static/require-icon.png" mode="aspectFill"></image> -->
+				<text>民族</text>
+			</view>
+			<view class="info-value-box">
+				<input type="text" placeholder="请输入民族" name="selfName">
+			</view>		
+		</view>
+		
+		<view class="info-box">
+			<view class="info-title-box">
+				<!-- <image src="/static/require-icon.png" mode="aspectFill"></image> -->
+				<text>性别</text>
+			</view>
+			<view class="info-gender-box">
+				<radio-group @change="radioCheck" class="padding-left-2">
+					<label class="radio margin-right-10"><radio value="1" :checked="userSex==='1'" color="#00A1B4" class="form-radio"/>男</label>
+					<label class="radio"><radio value="0" :checked="userSex==='0'"  color="#00A1B4" class="form-radio"/>女</label>
+				</radio-group>
+			</view>		
+		</view>
+		
+		<view class="info-box">
+			<view class="info-title-box">
+				<!-- <image src="/static/require-icon.png" mode="aspectFill"></image> -->
+				<text>出生日期</text>
+			</view>
+			<view class="info-value-box">
+				<uni-datetime-picker
+				    class="time-select-box"
+					type="date"
+					:value="single"
+					@change="change"
+					:clear-icon="false"
+				/>
+			</view>		
+		</view>
+		<view class="info-box">
+			<view class="info-title-box">
+				<!-- <image src="/static/require-icon.png" mode="aspectFill"></image> -->
+				<text>学历</text>
+			</view>
+			<view class="info-value-box">
+				  <picker @change="bindPickerChange($event,'education')"  :range="educationArray" class="select-box" name="education">
+				        <view class="uni-input">{{educationValue}}</view>
+						<image src="/static/arrow_down.svg" mode="aspectFill"></image>
+				  </picker>
+			</view>		
+		</view>
+		<view class="info-box">
+			<view class="info-title-box">
+				<!-- <image src="/static/require-icon.png" mode="aspectFill"></image> -->
+				<text>工作单位</text>
+			</view>
+			<view class="info-value-box">
+				<input type="text" placeholder="西安芝麻开花科技有限公司" name="selfName">
+			</view>		
+		</view>
+		<view class="info-box">
+			<view class="info-title-box">
+				<!-- <image src="/static/require-icon.png" mode="aspectFill"></image> -->
+				<text>职务</text>
+			</view>
+			<view class="info-value-box">
+				<input type="text" placeholder="无" name="selfName">
+			</view>		
+		</view>
+		<view class="info-box">
+			<view class="info-title-box">
+				<!-- <image src="/static/require-icon.png" mode="aspectFill"></image> -->
+				<text>职称</text>
+			</view>
+			<view class="info-value-box">
+				<input type="text" placeholder="项目经理" name="selfName">
+			</view>		
+		</view>
+		<view style="display: flex;justify-content: space-evenly;">
+			<button type="default" class="submit-bth" style="background-color: #aaaaaa;">清空</button>
+			<button type="primary" class="submit-bth" style="background-color: #169bd5;" formType="submit">提交</button>
+		</view>
+	</form>	
+	</view>
+</template>
+
+<script>
+	import md5 from "@/common/md5.js";
+	// import pickerAddress from '@/components/liudx-pickerAddress/index.vue'
+	// var graceChecker = require("../../../common/graceChecker.js");
+	export default {
+		components: {
+		},
+		data() {
+			return {
+				dateYear:new Date().getFullYear(),
+				dateMonth:new Date().getMonth() + 1,
+				arrayMonth:["1", "2","3", "4","5", "6","7", "8","9", "10","11", "12"],
+				title: 'Hello',
+				detailObj:{},
+				shareContent:'',
+				shareCode:'',
+				storeImg:'',
+				isAuthPhone:getApp().globalData.user_phone,
+				userSex:'1',
+				txt: '请选择',
+				educationValue:'请选择',
+				educationArray: ['博士研究生','硕士研究生','本科','大专','中专'],
+				professionValue:'请选择',
+				professionArray:[],
+				endsValue:'请选择',
+				endsArray:[],
+				provinceArray: [],
+				addressShow: false,
+				form: {
+					province: '',
+					city: '',
+				},
+				address: '',
+				addressObj:{},
+				userBrand:'',
+				addressDetail:'',
+				loginObj:{},
+				uploadList: [],
+				imgIdList: [],
+			}
+		},
+		onLoad() {
+			//this.getTradeRequest();
+		},
+		onShow() {
+		},
+		// onShareAppMessage() {
+		// 	  return {
+		// 	      title: '分销小助手',
+		// 	      path:'/pages/index/index?scene=' + getApp().globalData.user_id
+		// 	    }
+		// },
+		methods: {
+			bindDateChange(e){
+						   this.dateYear = e.target.value
+						   
+			},
+			bindDateMonthChange(e){
+						   this.dateMonth = this.arrayMonth[e.target.value]
+			},
+			change(e) {
+			  this.single = e;
+			  console.log("-change事件:", e);
+			 },
+			getImage(type) {
+			  let that = this;
+			  // if (that.uploadList.length >= 9) {
+			  //   uni.showToast({
+			  //     title: "最多上传9张图片",
+			  //     icon: "none",
+			  //     duration: 2500,
+			  //   });
+			  //   return;
+			  // }
+			  uni.chooseImage({
+			    sourceType: [type],
+			    count: 1,
+			    sizeType: ["original", "compressed"], //可以指定是原图还是压缩图,默认二者都有
+			    success: (res) => {
+			      for (let i = 0; i < res.tempFilePaths.length; i++) {
+					 console.log(res.tempFilePaths[i]) 
+			        that.uploadList.push(res.tempFilePaths[i]);
+			        that.uploadFileRequest(res.tempFilePaths[i]);
+			      }
+			    },
+			  });
+			},
+			uploadFileRequest(fileVal) {
+			  uni.showLoading({
+			    title: "上传中",
+			    mask: true,
+			  });
+			  let that = this;
+			  let md5Sign = md5(
+			    "method=" +
+			      "upload" +
+			      "&timestamp=" +
+			      getApp().globalData.globalTimestamp +
+			      "&secret=" +
+			      getApp().globalData.secret
+			  );
+			  let url =
+			    getApp().globalData.shareUrl +
+			    "api/api.php" +
+			    "?method=upload&source=activity&id=1&timestamp=" +
+			    getApp().globalData.globalTimestamp +
+			    "&sign=" +
+			    md5Sign;
+			  uni.uploadFile({
+			    url: url, //需要设置为全局
+			    filePath: fileVal,
+			    name: "file",
+			    formData: {
+			      file: fileVal,
+			    },
+			    success: (res) => {
+			      let tmpres = JSON.parse(res.data);
+			      console.log(tmpres);
+			      uni.hideLoading();
+			      that.imgIdList.push(tmpres.data.id);
+			    },
+			    fail: (res) => {
+			      console.log("上传请求失败");
+			      console.log(res);
+			    },
+			  });
+			},
+			delPhoto(idx) {
+			  this.uploadList.splice(idx, 1);
+			  this.imgIdList.splice(idx, 1);
+			},
+			showLarge(src) {
+			  uni.previewImage({
+			    urls: [src],
+			    longPressActions: {
+			      itemList: ["发送给朋友", "保存图片"],
+			      success: function (data) {},
+			      fail: function (err) {
+			        console.log(err.errMsg);
+			      },
+			    },
+			  });
+			},
+			getProvinceRequest(){
+				 let that = this;
+			},
+			 getTradeRequest(){
+				 let that = this;
+			 },
+			 radioCheck(e){
+			 	console.log(e.target.value)
+			 	this.userSex = e.target.value;
+			 	//this.gender = e.target.value == '0' ? '男' : '女';
+			 },
+			 changeCity(data) {
+				 this.txt = data.data.join('')
+				 console.log(data.data.join(''))
+			  },
+			 bindPickerChange(e,type) {
+						 let that = this;
+						  switch (type){
+						  	case 'education':
+							 that.educationValue =  that.educationArray[e.target.value]
+							 console.log(that.educationValue)
+						  		break;
+						  	case 'profession':
+						  	 that.professionValue =  that.professionArray[e.target.value]
+						  		break;
+							case 'ends':
+							 that.endsValue =  that.endsArray[e.target.value]
+								break;	
+						  }
+			             
+			          },
+				testLength(){
+					 if(this.addressDetail.length > 25){
+						 uni.showToast({
+							title: '详细地址应为0-25个字符',
+							icon: 'none'
+						 });
+					}
+				}, 	  
+			  formSubmit(e) {
+				  //this.goCustomCardPage()
+			  	//将下列代码加入到对应的检查位置
+			  	//定义表单规则
+			  	var rule = [
+			  		{
+			  			name: "selfName",
+			  			checkType: "notnull",
+			  			errorMsg: "姓名不能为空"
+			  		},
+			  		// {
+			  		// 	name: "selfName",
+			  		// 	checkType: "string",
+			  		// 	checkRule: "2,15",
+			  		// 	errorMsg: "姓名不能少于2个汉字"
+			  		// },
+			  		{
+			  			name: "selfName",
+			  			checkType: "reg",
+			  			checkRule: "[\u4e00-\u9fa5]",
+			  			errorMsg: "姓名需为中文"
+			  		}
+					// {
+					// 	name: "trade",
+					// 	checkType: "notnull",
+					// 	errorMsg: "行业不能为空"
+					// }
+			  	];
+			  	//进行表单检查
+			  	var formData = e.detail.value;
+				console.log(formData)
+			  	var checkRes = graceChecker.check(formData, rule);
+			  	if (checkRes) {
+					this.txt === '请选择' ? 
+					uni.showToast({
+						title: '请选择地区',
+						icon: "none"
+					}):
+					this.submitRequest(formData);
+			  	} else {
+			  		uni.showToast({
+			  			title: graceChecker.error,
+			  			icon: "none"
+			  		});
+			  	}
+			  },
+			submitRequest(params){
+				   console.log(params)
+				 	 let that = this;
+			},  
+			goCustomCardPage(){
+				uni.redirectTo({
+					url: '/pages/index/successPage/index?types='+'custom', //游客成功页面
+					success: res => {},
+					fail: () => {},
+					complete: () => {}
+				})
+			}  
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	.content {
+		&_list{
+			display: flex;
+			flex-direction: row;
+			align-items: center;
+			justify-content:space-around;
+			&_lable{
+				
+			}
+			&_content{
+				flex: 1;
+				width: auto;
+				text-align: right;
+			}
+		}
+	}
+	.content-box {
+		width: 100%;
+		/* height: 100%; */
+		display: flex;
+		flex-direction: column;
+		align-items: center;
+		/* justify-content: center; */
+	}
+	.header-box {
+		width: 85%;
+		height:80rpx;
+		border: .5px dotted #00A1B4;
+		border-radius: 50rpx;
+		display: flex;
+		justify-content: center;
+		align-items: center;
+		font-size: 24rpx;
+		color:#00A1B4 ;
+		/* font-family: PingFangSC-Regular; */
+		margin-top: 2%;
+	}
+	.header-box image {
+		width: 36rpx;
+		height: 36rpx;
+		margin-right: 1%;
+	}
+	.self-title-box {
+		width: 90%;
+		display: flex;
+		align-items: center;
+		font-size: 32rpx;
+		letter-spacing: 2rpx;
+		color:#3C3C3C ;
+		/* font-family: SimHei; */
+		margin: 4% auto;
+		font-weight: bold;
+		height: 50rpx;
+		line-height: 50rpx;
+
+	}
+	.self-title-box image {
+		width: 6rpx;
+		height: 32rpx;
+		margin-right: 2%;
+	}
+	.info-box {
+		width: 90%;
+		margin: 3% auto;
+		display: flex;
+		align-items: center;
+		// height: 180rpx;
+	}
+	.info-title-box {
+		width: 20%;
+		display: flex;
+		align-items: center;
+		font-size: 26rpx;
+	}
+	.info-title-box image{
+		width: 15rpx;
+		height: 15rpx;
+		margin-right: 2%;
+	}
+	.info-value-box {
+		width: 75%;
+	}
+	.info-value-box input {
+		height: 88rpx;
+		background: #f7f7f7;
+		font-size: 28rpx;
+		padding-left: 4%;
+		margin: 2% auto;
+	}
+	.info-value-box picker {
+		position: relative;
+	}
+	.info-value-box picker image {
+		position: absolute;
+		width: 25rpx;
+		height: 25rpx;
+		right: 10px;
+		top: 30rpx;
+	}
+	.select-box {
+		height: 80rpx;
+		background: #f7f7f7;
+		font-size: 28rpx;
+		padding-left: 4%;
+		margin: 2% auto;
+		color: #888;
+		line-height: 88rpx;
+	}
+	.info-gender-box {
+		width: 75%;
+		font-size: 28rpx;
+	}
+	.form-radio {
+			 transform: scale(0.6);
+	}
+	.padding-left-2 {
+		// padding-left: 2%;
+	}
+	.margin-right-10 {
+		margin-right: 10%;
+	}
+	.border-line-box {
+		width: 100%;
+		height: 20rpx;
+		background: #f7f7f7;
+	}
+	.picker-box{
+		display: flex;
+		align-items: center;
+		justify-content: space-between;
+		height: 60rpx;
+		line-height: 60rpx;
+		background: #f7f7f7;
+		height: 88rpx;
+		line-height: 88rpx;
+		background: #f7f7f7;
+		font-size: 28rpx;
+		padding-left: 4%;
+	}
+	.uni-input image {
+		width: 40rpx;
+		height: 40rpx;
+		margin-right: 2%;
+		float: right;
+	}
+	.textarea-box {
+		background: #f7f7f7;
+		min-height: 120rpx;
+		font-size: 28rpx;
+		margin: 5% auto;
+		padding: 4%;
+		margin-bottom: 8%;
+	}
+	.upload-box {
+	  display: flex;
+	  flex-flow: column;
+	  width: 25%;
+	  background-color: #e0e0e0;
+	  height: 100rpx;
+	  border-radius: 10rpx;
+	  padding-top: 15rpx;
+	  image {
+		margin-top: 10rpx;
+	    width: 60rpx !important;
+	    height: 60rpx !important;
+	  }
+	}
+	.upload-box-photo {
+		width: 25%;
+		height: 100rpx;
+		border-radius: 10rpx;
+		padding-top: 15rpx;
+		position: relative;
+		margin-left: 10rpx;
+	}
+	.del-icon {
+	  position: absolute;
+	  right: 0;
+	  width: 30rpx;
+	  height: 30rpx;
+	}
+	
+	.update_button {
+	  text-align: center;
+	  display: flex;
+	  flex-wrap: wrap;
+	}
+	.picker-class {
+		border-radius: 10rpx;
+		padding: 10rpx;
+		width: 73%;
+		font-size: 28rpx;
+		background: #f5f5f5;
+	}
+	.picker-class image {
+		width: 26rpx;
+		height: 26rpx;
+	}
+	.submit-bth {
+		width: 25%;
+		font-size: 26rpx;
+		margin: 0 0 5% 0;
+		color: #fff;
+	}
+</style>

Разница между файлами не показана из-за своего большого размера
+ 6 - 0
static/calendar_icon.svg


BIN
static/rect-icon.png


+ 9 - 0
uni_modules/uni-segmented-control/changelog.md

@@ -0,0 +1,9 @@
+## 1.2.0(2021-11-19)
+- 优化 组件UI,并提供设计资源,详见:[https://uniapp.dcloud.io/component/uniui/resource](https://uniapp.dcloud.io/component/uniui/resource)
+- 文档迁移,详见:[https://uniapp.dcloud.io/component/uniui/uni-segmented-control](https://uniapp.dcloud.io/component/uniui/uni-segmented-control)
+## 1.1.0(2021-07-30)
+- 组件兼容 vue3,如何创建vue3项目,详见 [uni-app 项目支持 vue3 介绍](https://ask.dcloud.net.cn/article/37834)
+## 1.0.5(2021-05-12)
+- 新增 项目示例地址
+## 1.0.4(2021-02-05)
+- 调整为uni_modules目录规范

+ 145 - 0
uni_modules/uni-segmented-control/components/uni-segmented-control/uni-segmented-control.vue

@@ -0,0 +1,145 @@
+<template>
+	<view :class="[styleType === 'text'?'segmented-control--text' : 'segmented-control--button' ]"
+		:style="{ borderColor: styleType === 'text' ? '' : activeColor }" class="segmented-control">
+		<view v-for="(item, index) in values" :class="[ styleType === 'text' ? '': 'segmented-control__item--button',
+		index === currentIndex&&styleType === 'button' ? 'segmented-control__item--button--active': '',
+		index === 0&&styleType === 'button' ? 'segmented-control__item--button--first': '',
+			index === values.length - 1&&styleType === 'button' ? 'segmented-control__item--button--last': '' ]" :key="index"
+			:style="{ backgroundColor: index === currentIndex && styleType === 'button' ? activeColor : '',borderColor: index === currentIndex&&styleType === 'text'||styleType === 'button'?activeColor:'transparent' }"
+			class="segmented-control__item" @click="_onClick(index)">
+			<view>
+				<text :style="{color:
+				    index === currentIndex
+				      ? styleType === 'text'
+				        ? activeColor
+				        : '#fff'
+				      : styleType === 'text'
+				        ? '#000'
+				        : activeColor}" class="segmented-control__text" :class="styleType === 'text' && index === currentIndex ? 'segmented-control__item--text': ''">{{ item }}</text>
+			</view>
+
+		</view>
+	</view>
+</template>
+
+<script>
+	/**
+	 * SegmentedControl 分段器
+	 * @description 用作不同视图的显示
+	 * @tutorial https://ext.dcloud.net.cn/plugin?id=54
+	 * @property {Number} current 当前选中的tab索引值,从0计数
+	 * @property {String} styleType = [button|text] 分段器样式类型
+	 * 	@value button 按钮类型
+	 * 	@value text 文字类型
+	 * @property {String} activeColor 选中的标签背景色与边框颜色
+	 * @property {Array} values 选项数组
+	 * @event {Function} clickItem 组件触发点击事件时触发,e={currentIndex}
+	 */
+
+	export default {
+		name: 'UniSegmentedControl',
+		emits: ['clickItem'],
+		props: {
+			current: {
+				type: Number,
+				default: 0
+			},
+			values: {
+				type: Array,
+				default () {
+					return []
+				}
+			},
+			activeColor: {
+				type: String,
+				default: '#2979FF'
+			},
+			styleType: {
+				type: String,
+				default: 'button'
+			}
+		},
+		data() {
+			return {
+				currentIndex: 0
+			}
+		},
+		watch: {
+			current(val) {
+				if (val !== this.currentIndex) {
+					this.currentIndex = val
+				}
+			}
+		},
+		created() {
+			this.currentIndex = this.current
+		},
+		methods: {
+			_onClick(index) {
+				if (this.currentIndex !== index) {
+					this.currentIndex = index
+					this.$emit('clickItem', {
+						currentIndex: index
+					})
+				}
+			}
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	.segmented-control {
+		/* #ifndef APP-NVUE */
+		display: flex;
+		box-sizing: border-box;
+		/* #endif */
+		flex-direction: row;
+		height: 36px;
+		overflow: hidden;
+		/* #ifdef H5 */
+		cursor: pointer;
+		/* #endif */
+	}
+
+	.segmented-control__item {
+		/* #ifndef APP-NVUE */
+		display: inline-flex;
+		box-sizing: border-box;
+		/* #endif */
+		position: relative;
+		flex: 1;
+		justify-content: center;
+		align-items: center;
+	}
+
+	.segmented-control__item--button {
+		border-style: solid;
+		border-top-width: 1px;
+		border-bottom-width: 1px;
+		border-right-width: 1px;
+		border-left-width: 0;
+	}
+
+	.segmented-control__item--button--first {
+		border-left-width: 1px;
+		border-top-left-radius: 5px;
+		border-bottom-left-radius: 5px;
+	}
+
+	.segmented-control__item--button--last {
+		border-top-right-radius: 5px;
+		border-bottom-right-radius: 5px;
+	}
+
+	.segmented-control__item--text {
+		border-bottom-style: solid;
+		border-bottom-width: 2px;
+		padding: 6px 0;
+	}
+
+	.segmented-control__text {
+		font-size: 14px;
+		line-height: 20px;
+		text-align: center;
+	}
+</style>

+ 87 - 0
uni_modules/uni-segmented-control/package.json

@@ -0,0 +1,87 @@
+{
+  "id": "uni-segmented-control",
+  "displayName": "uni-segmented-control 分段器",
+  "version": "1.2.0",
+  "description": "分段器由至少 2 个分段控件组成,用作不同视图的显示",
+  "keywords": [
+    "uni-ui",
+    "uniui",
+    "分段器",
+    "segement",
+    "顶部选择"
+],
+  "repository": "https://github.com/dcloudio/uni-ui",
+  "engines": {
+    "HBuilderX": ""
+  },
+  "directories": {
+    "example": "../../temps/example_temps"
+  },
+  "dcloudext": {
+    "category": [
+      "前端组件",
+      "通用组件"
+    ],
+    "sale": {
+      "regular": {
+        "price": "0.00"
+      },
+      "sourcecode": {
+        "price": "0.00"
+      }
+    },
+    "contact": {
+      "qq": ""
+    },
+    "declaration": {
+      "ads": "无",
+      "data": "无",
+      "permissions": "无"
+    },
+    "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui"
+  },
+  "uni_modules": {
+    "dependencies": ["uni-scss"],
+    "encrypt": [],
+    "platforms": {
+      "cloud": {
+        "tcb": "y",
+        "aliyun": "y"
+      },
+      "client": {
+        "App": {
+          "app-vue": "y",
+          "app-nvue": "y"
+        },
+        "H5-mobile": {
+          "Safari": "y",
+          "Android Browser": "y",
+          "微信浏览器(Android)": "y",
+          "QQ浏览器(Android)": "y"
+        },
+        "H5-pc": {
+          "Chrome": "y",
+          "IE": "y",
+          "Edge": "y",
+          "Firefox": "y",
+          "Safari": "y"
+        },
+        "小程序": {
+          "微信": "y",
+          "阿里": "y",
+          "百度": "y",
+          "字节跳动": "y",
+          "QQ": "y"
+        },
+        "快应用": {
+          "华为": "u",
+          "联盟": "u"
+        },
+        "Vue": {
+            "vue2": "y",
+            "vue3": "y"
+        }
+      }
+    }
+  }
+}

+ 13 - 0
uni_modules/uni-segmented-control/readme.md

@@ -0,0 +1,13 @@
+
+
+## SegmentedControl 分段器
+> **组件名:uni-segmented-control**
+> 代码块: `uSegmentedControl`
+
+
+用作不同视图的显示
+
+### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-segmented-control)
+#### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839 
+
+