xhj 2 gadi atpakaļ
vecāks
revīzija
6f9c1e3920

+ 32 - 0
components/bind-jobnum/index.css

@@ -0,0 +1,32 @@
+.ceng{position: fixed;top: 0;left: 0;right: 0;bottom: 0;background-color: rgba(0,0,0,.5);z-index: 99;}
+.update-pop{position: fixed;top: 50%;left: 50%;transform: translate(-50%,-50%);background-color: #fff;border-radius: 15rpx;width: 600rpx;z-index: 100;padding-bottom: 70rpx;}
+.update-img{width: 180rpx;height: 180rpx;margin: -42rpx auto 0;}
+.update-avatar{width: 150rpx !important;height: 150rpx !important;margin: 50rpx auto 0 !important;}
+.update-avatar image{width: 100%;height: 100%;}
+.update-avatars{border-radius: 50%;}
+.update-tip{font-size: 34rpx;color: #333;text-align: center;padding: 0 30rpx;margin: 34rpx 0 0;}
+.update-btn{width: 460rpx !important;height: 80rpx !important;background: #04C562;border-radius: 50rpx !important;font-size: 32rpx;color: #fff;margin: 56rpx auto 0 !important;text-align: center;line-height: 80rpx !important;}
+.update-close{width: 65rpx;height: 65rpx;position: absolute;left: 50%;transform: translateX(-50%);bottom: -110rpx;}
+.update-form{margin: 50rpx;}
+.update-label{font-size: 30rpx;color: #333;margin-right: 20rpx;}
+.update-ipt{font-size: 28rpx;color: #333;border-bottom: 1rpx solid #e9e9e9;padding: 25rpx 0;}
+.update-placeholder{color: #999;}
+.bind-title{
+	line-height: 59rpx;
+	font-size: 42rpx;
+	font-family: PingFang SC-Bold, PingFang SC;
+	font-weight: bold;
+	color: #333333;
+	text-align: center;
+	margin-top: 60rpx;
+}
+.bind-text{
+	font-size: 32rpx;
+	font-family: PingFang SC-Regular, PingFang SC;
+	font-weight: 400;
+	color: #999999;
+	line-height: 45rpx;
+	padding: 0 30rpx;
+	text-align: center;
+	margin-top: 15rpx;
+}

+ 62 - 0
components/bind-jobnum/index.vue

@@ -0,0 +1,62 @@
+<template>
+	<view>
+		<view class="ceng"></view>
+		<view class="update-pop">
+			<block>
+				<view class="ddflex" style="justify-content: center;margin-top: 90rpx;">
+					<image style="width: 120rpx;height: 120rpx;" src="../../static/pages/images/userimg.png"></image>
+					<image style="width: 53rpx;height: 11rpx;margin: 0 30rpx;" src="/static/images/sl.png"></image>
+					<image style="width: 120rpx;height: 120rpx;" src="/static/images/userimg2.png"></image>
+				</view>
+				<view class="bind-title">
+					绑定工号
+				</view>
+				<view class="bind-text">
+					绑定工号后可管理微页和名片等操作
+					<view>仅限公司内部员工绑定</view>
+				</view>
+				<view class="update-btn" @click="confirm()">立即绑定</view>
+			</block>
+			<image :src="picUrlss+'update_close.png'" class="update-close" @click="closeUpdate"></image>
+		</view>
+	</view>
+</template>
+
+<script>
+	const app = getApp();
+	const req = require("../../utils/request.js");
+
+	export default {
+		data() {
+			return {
+				picUrlss: req.public.picUrls,
+			};
+		},
+
+		components: {},
+		props: {
+		},
+		watch: {},
+
+		mounted() {
+			
+		},
+
+		methods: {
+			
+			confirm() {
+				uni.navigateTo({
+					url:'/mine/bindNumber/bindNumber'
+				})
+				this.closeUpdate()
+			},
+			closeUpdate(){
+				this.$emit('closeBind');
+			},
+		}
+	};
+</script>
+
+<style>
+	@import "./index.css";
+</style>

+ 39 - 0
mine/bindNumber/bindNumber.css

@@ -0,0 +1,39 @@
+page{
+	background-color: #fff;
+}
+input{
+	font-size: 32rpx;
+	margin:80rpx 30rpx 97rpx;
+	text-align: center;
+	padding: 30rpx;
+	border-bottom: 2rpx solid #DEDEDE;;
+}
+.phone{
+	line-height: 67rpx;
+	font-size: 48rpx;
+	font-family: PingFang SC-Bold, PingFang SC;
+	font-weight: bold;
+	color: #000000;
+	text-align: center;
+}
+.input-placeholder{
+	font-size: 32rpx;
+	font-family: PingFang SC-Regular, PingFang SC;
+	font-weight: 400;
+	color: #A1A1A1;
+}
+.btn{
+	width: 594rpx;
+	height: 84rpx;
+	line-height: 84rpx;
+	background: #27D699;
+	border-radius: 42rpx 42rpx 42rpx 42rpx;
+	opacity: 1;
+	border: 1rpx solid rgba(0,0,0,0);
+	margin: auto;
+	font-size: 32rpx;
+	font-family: PingFang SC-Regular, PingFang SC;
+	font-weight: 400;
+	color: #FFFFFF;
+	text-align: center;
+}

+ 67 - 0
mine/bindNumber/bindNumber.vue

@@ -0,0 +1,67 @@
+<template>
+	<view>
+		<view style="margin-top: 300rpx;">
+			<view v-if="userInfo&&userInfo.mobile" class="phone">{{userInfo.mobile.substring(0,3)}}****{{userInfo.mobile.substring(userInfo.mobile.length-4,3)}}</view>
+			<input v-model="saleNo" placeholder-class="input-placeholder" placeholder="请输入工号"/>
+		</view>
+		<view class="btn" @click="submit">确认绑定</view>
+	</view>
+</template>
+
+<script>
+import { setTimeout } from "timers";
+	const app = getApp();
+	const req = require("../../utils/request.js");
+
+	export default {
+		components: {},
+		props: {},
+		data() {
+			return {
+				userInfo:{},
+				systems: {},
+				isTop:0,
+				saleNo:''
+			}
+		},
+		onLoad(options) {
+			this.userInfo = req.getStorage('userInfo')
+		},
+		onShow() {
+			
+		},
+		methods: {
+			submit(){
+				if(!this.saleNo) req.msg("请输入工号")
+				req.postRequest('/api/user/bindSaleNo',{saleNo:this.saleNo},res=>{
+					req.msg("绑定成功")
+					setTimeout(()=>{
+						uni.navigateBack()
+					},1000)
+				})
+			}
+		},
+		mounted() {
+			const systemInfo = uni.getSystemInfoSync();
+			// px转换到rpx的比例
+			let pxToRpxScale = 750 / systemInfo.windowWidth;
+			let systems = {
+				ktxStatusHeight: systemInfo.statusBarHeight * pxToRpxScale, // 状态栏的高度
+				navigationHeight: 44 * pxToRpxScale // 导航栏的高度
+			};
+			systems.barHeight = systems.ktxStatusHeight + systems.navigationHeight;
+			this.systems = systems;
+		},
+		onPageScroll: function(e) {
+			if (e.scrollTop > this.systems.barHeight) {
+				this.isTop = 1;
+			} else {
+				this.isTop = 0;
+			}
+		}
+	}
+</script>
+
+<style>
+	@import "./bindNumber.css";
+</style>

+ 1 - 1
mine/userinfo/userinfo.vue

@@ -273,7 +273,7 @@
 					req.loadIng('保存中');
 					isShowLoading = true;
 				}
-				await requsetmessage.remindIntegral().then(res => {});
+				// await requsetmessage.remindIntegral().then(res => {});
 				req.postRequest('/api/user/save', d, res => {
 					// req.msg('保存成功', () => {
 					//   this.getInfo()

+ 5 - 0
pages.json

@@ -611,6 +611,11 @@
 					"style": {
 						"navigationBarTitleText": "消息列表"
 					}
+				},{
+					"path": "bindNumber/bindNumber",
+					"style": {
+						"navigationBarTitleText": "绑定工号"
+					}
 				}
 			]
 		},

+ 20 - 20
pages/user/user.vue

@@ -9,21 +9,19 @@
 			<image src="../../static/pages/images/userBg.png" class="wdbg" @click="jumpUrl('mine/userinfo/userinfo')">
 			</image>
 			<view class="minec">
-				<view class="minec-img" @click="jumpUrl('mine/set/index')">
+				<view class="minec-img" @click="jumpUrl('mine/userinfo/userinfo')">
 					<image :src="userInfos.avatar ? userInfos.avatar : '/static/pages/images/userimg.png'"
 						mode="aspectFit" class="user"></image>
 				</view>
-				<view class="mines" @click="jumpUrl('mine/set/index')" v-if="isLogin">
+				<view class="mines" @click="jumpUrl('mine/userinfo/userinfo')" v-if="isLogin">
 					<view class="ddflex">
 						{{ userInfos.nickName }}
-						<!-- <image src="../../static/pages/images/rz_qy_h.png" class="auth-img"
-							v-if="userInfos.authStatus == 2"></image>
-						<image src="../../static/pages/images/rz_qy.png" class="auth-img" v-else></image>
-						<image src="../../static/pages/images/rz_gr_h.png" class="auth-img"
-							v-if="userInfos.companyStatus == 2"></image>
-						<image src="../../static/pages/images/rz_gr.png" class="auth-img" v-else></image> -->
+						<view class="ddflex" style="font-size: 24rpx;font-weight: 400;" @click.stop="isShowBind=true" v-if="userInfos.userType!=1">
+							<image style="width: 23rpx;height: 22rpx;margin-right: 10rpx;" src="/static/images/bind.png" class="auth-img"></image>
+							绑定工号
+						</view>
 					</view>
-					<text class="edu" v-if="userInfos.mobile">{{ styleHintPhoneText(userInfos.mobile) }}</text>
+					<text class="edu" v-if="userInfos.mobile">{{ userInfos.mobile }}</text>
 				</view>
 				<view class="flex" v-else><text class="login-btn" @click="jumpUrl('')">点击登录</text></view>
 				<view class="rule dflex" @click="isSign == 0 || sign == 1 ? jumpUrl('') : signFun()" v-if="isShowSign">
@@ -121,7 +119,7 @@
 								</view>
 								<view class="service-person-option ddflex">
 									<image src="/static/pages/images/cy_hui.png"></image>
-									<view>入司{{recommendCard.inDate?getAge(recommendCard.inDate):1}}年</view>
+									<view>入司{{recommendCard.inDate?getAgeFn(recommendCard.inDate):1}}年</view>
 								</view>
 								<view class="service-person-option ddflex">
 									<image src="/static/pages/images/fw_hui.png"></image>
@@ -212,7 +210,8 @@
 				复制微信号
 			</view>
 		</view>
-		
+
+		<bindJobnum v-if="isShowBind" @closeBind="closeBind()"></bindJobnum>
 	</view>
 </template>
 
@@ -224,6 +223,7 @@
 	const route = require('../../utils/route');
 	import foot from '../../components/nav-bar/index';
 	import footerCopyright from '../../components/footer-copyright/footer-copyright';
+	import bindJobnum from '../../components/bind-jobnum/index.vue';
 
 	export default {
 		data() {
@@ -264,13 +264,15 @@
 				isUpdateInfo: false, //更新用户信息
 				isUpdateMobile: false, //绑定手机号
 				recommendCard:{},
-				isShowCodePop:false
+				isShowCodePop:false,
+				isShowBind:false
 			};
 		},
 
 		components: {
 			foot,
-			footerCopyright
+			footerCopyright,
+			bindJobnum
 		},
 		props: {},
 
@@ -325,11 +327,6 @@
 				
 				return getApp().globalData.unReadMessageNum;
 			},
-			
-			styleHintPhoneText(phone) {
-				var phones = util.styleHintPhoneText(phone);
-				return phones;
-			},
 
 			jumpUrl(url) {
 				if (req.isLogins(true)) {
@@ -430,7 +427,9 @@
 				this.isUpdateMobile = e;
 				this.getMy();
 			},
-
+			closeBind(){
+				this.isShowBind = false;
+			},
 
 			jumpConversation() {
 				req.jumpConversation();
@@ -462,7 +461,8 @@
 					this.recommendCard = res
 				})
 			},
-			getAge(date){
+			getAgeFn(date){
+				console.log('getAge',date)
 				return util.getAge(date)
 			},
 			// 拨打电话

BIN
static/images/bind.png


BIN
static/images/sl.png


BIN
static/images/userimg2.png