zhengkaixin 1 éve
szülő
commit
8ace2f5d0c

+ 3 - 1
README.md

@@ -1 +1,3 @@
-[](https://modao.cc/proto/s1QFMhkss7n1emgHHRAr0E/sharing?view_mode=read_only)
+[](https://modao.cc/proto/s1QFMhkss7n1emgHHRAr0E/sharing?view_mode=read_only)
+
+[](https://xpgj.xiaoxinda.com/xpgj/test/jp-housekeep-hall/#/)

+ 74 - 0
apis/pagejs/invoiceApi.js

@@ -0,0 +1,74 @@
+import request from '@/apis/utils/request'
+
+export function invoiceList(data) {
+	var url = '/mobile/invoiceApi/invoiceList';
+	return request({
+		method: 'post',
+		data: data,
+		url: url
+	})
+}
+
+export function deleteInvoiceType(data) {
+	var url = '/mobile/invoiceApi/deleteInvoiceType';
+	return request({
+		method: 'post',
+		data: data,
+		url: url
+	})
+}
+
+export function invoiceDetail(data) {
+	var url = '/mobile/invoiceApi/invoiceDetail';
+	return request({
+		method: 'post',
+		data: data,
+		url: url
+	})
+}
+
+export function invoiceTypeDetail(data) {
+	var url = '/mobile/invoiceApi/invoiceTypeDetail';
+	return request({
+		method: 'post',
+		data: data,
+		url: url
+	})
+}
+
+export function invoiceTypes(data) {
+	var url = '/mobile/invoiceApi/invoiceTypes';
+	return request({
+		method: 'post',
+		data: data,
+		url: url
+	})
+}
+
+export function saveInvoiceType(data) {
+	var url = '/mobile/invoiceApi/saveInvoiceType';
+	return request({
+		method: 'post',
+		data: data,
+		url: url
+	})
+}
+
+export function openInvoiceByRecordIds(data) {
+	var url = '/mobile/invoiceApi/openInvoiceByRecordIds';
+	return request({
+		method: 'post',
+		data: data,
+		url: url
+	})
+}
+
+
+export function saveInvoiceByRecordIds(data) {
+	var url = '/mobile/invoiceApi/saveInvoiceByRecordIds';
+	return request({
+		method: 'post',
+		data: data,
+		url: url
+	})
+}

+ 86 - 68
apis/pagejs/user.js

@@ -1,70 +1,88 @@
-import request from '@/apis/utils/request'
- import requestWhite from '@/apis/utils/requestWhite'
- 
- export function changePassword(data) {
- 	var url='/mobile/tenantUser/changePassword';
- 	return request({
- 		method: 'post',
- 		data: data,
- 		url: url
- 	})
- }
- 
- 
- export function changePhone(data) {
- 	var url='/mobile/tenantUser/changePhone';
- 	return request({
- 		method: 'post',
- 		data: data,
- 		url: url
- 	})
- }
- export function getVerifyCode(data) {
- 	var url='/mobile/tenantUser/getVerifyCode';
- 	return request({
- 		method: 'post',
- 		data: data,
- 		url: url
- 	})
- }
- export function logout(data) {
- 	var url='/mobile/tenantUser/logout';
- 	return request({
- 		method: 'post',
- 		data: data,
- 		url: url
- 	})
- }
+import request from '@/apis/utils/request'
+import requestWhite from '@/apis/utils/requestWhite'
+
+export function changePassword(data) {
+	var url = '/mobile/tenantUser/changePassword';
+	return request({
+		method: 'post',
+		data: data,
+		url: url
+	})
+}
+
+
+export function changePhone(data) {
+	var url = '/mobile/tenantUser/changePhone';
+	return request({
+		method: 'post',
+		data: data,
+		url: url
+	})
+}
+export function getVerifyCode(data) {
+	var url = '/mobile/tenantUser/getVerifyCode';
+	return requestWhite({
+		method: 'post',
+		data: data,
+		url: url
+	})
+}
+export function logout(data) {
+	var url = '/mobile/tenantUser/logout';
+	return request({
+		method: 'post',
+		data: data,
+		url: url
+	})
+}
+
+export function validateCode(data) {
+	var url = '/mobile/tenantUser/validateCode';
+	return request({
+		method: 'post',
+		data: data,
+		url: url
+	})
+}
 
 
- export function validateCode(data) {
- 	var url='/mobile/tenantUser/validateCode';
- 	return request({
- 		method: 'post',
- 		data: data,
- 		url: url
- 	})
- }
- 
-  
-  export function findByOpenId(data) {
-  	var url='/mobile/tenantUser/findByOpenId';
-  	return requestWhite({
-  		method: 'get',
-  		data: data,
-  		url: url
-  	})
-  }
-  
+export function personalCenter(data) {
+	var url = '/mobile/employee/personalCenter';
+	return request({
+		method: 'post',
+		data: data,
+		url: url
+	})
+}
 
 
-  
-  export function login(data) {
-  	var url='/mobile/tenantUser/login';
-  	return requestWhite({
-  		method: 'post',
-  		data: data,
-  		url: url
-  	})
-  }
-  
- 
-  
+
+
+export function findByOpenId(data) {
+	var url = '/mobile/tenantUser/findByOpenId';
+	return requestWhite({
+		method: 'get',
+		data: data,
+		url: url
+	})
+}
+
+
+
+export function login(data) {
+	var url = '/mobile/tenantUser/login';
+	return requestWhite({
+		method: 'post',
+		data: data,
+		url: url
+	})
+}
+
+
+
+export function retrievePassword(data) {
+	var url = '/mobile/tenantUser/retrievePassword';
+	return requestWhite({
+		method: 'post',
+		data: data,
+		url: url
+	})
+}

+ 3 - 8
apis/utils/mixin.js

@@ -1,14 +1,9 @@
-var role="businessHall"
 
 
-var prefix = 'jp-housekeep-electric-'+role+'-' + process.car.NODE_ENV + '_';
+
+var prefix = 'jp-housekeep-hall-' + process.car.NODE_ENV + '_';
 
 
 var app = {
 var app = {
-	setRole(key){
-		role=key;
-		prefix = 'jp-housekeep-electric-'+role+'-' + process.car.NODE_ENV + '_';
-		uni.setStorageSync("jp-housekeep-electric", role)
-		
-	},
+	
 	getGzDate : (key) => {
 	getGzDate : (key) => {
 		var tdate=new Date( ).toJSON().substr(0,10).replace("T"," ")
 		var tdate=new Date( ).toJSON().substr(0,10).replace("T"," ")
 		var date= uni.getStorageSync( prefix + "is_gz_date")
 		var date= uni.getStorageSync( prefix + "is_gz_date")

+ 0 - 6
components/bobo-router/index.js

@@ -48,13 +48,7 @@ const router = new Router()
 // 路由全局拦截器 在这里处理登录、授权等相关操作
 // 路由全局拦截器 在这里处理登录、授权等相关操作
 router.beforeEach(function(to, from, next) {
 router.beforeEach(function(to, from, next) {
 	
 	
-	if(from.page.indexOf('/pages/businessHall/')==0){
-		carhelp.setRole("businessHall")
-	}
 	
 	
-	if(from.page.indexOf('/pages/energyCenter/')==0){
-		carhelp.setRole("energyCenter")
-	}
 	routerBeforeEach(to, from, next);
 	routerBeforeEach(to, from, next);
 
 
 })
 })

+ 3 - 3
config/.env.dev.js

@@ -1,6 +1,6 @@
 const UNI_APP = {  
 const UNI_APP = {  
 	ProjectName :"荆鹏电管家",
 	ProjectName :"荆鹏电管家",
-	//BASE_URL: 'http://36.134.122.108/railroad-server/',
+	//BASE_URL: 'https://charging.xiaoxinda.com/electric-manager-api/',
 
 
 	
 	
 	BASE_URL:'http://192.168.77.162:8081/electric-manager-api/',
 	BASE_URL:'http://192.168.77.162:8081/electric-manager-api/',
@@ -8,8 +8,8 @@ const UNI_APP = {
 	
 	
 	NODE_ENV :"dev",
 	NODE_ENV :"dev",
 	SIMPLE_RUN:true,// 无视权限控制跳转页面   , 用于样式人员快速访问各种功能 ,快速测试等
 	SIMPLE_RUN:true,// 无视权限控制跳转页面   , 用于样式人员快速访问各种功能 ,快速测试等
-	//openId:"1234",//开发人员2
-	openId:"55555",//测试人员 开发环境
+	//openId:"111111",//zq
+	//openId:"55555",//测试人员 开发环境
 	//openId:"oK9Wr57rAcNzihDN2PEdptprT0As", 
 	//openId:"oK9Wr57rAcNzihDN2PEdptprT0As", 
 	// openId:"oK9Wr54VbEh3xvWYmD_zT5NbH4AY",
 	// openId:"oK9Wr54VbEh3xvWYmD_zT5NbH4AY",
 	openId:"oLowyuOJvTszgk96C0f8j0XfcEXg",//zkx
 	openId:"oLowyuOJvTszgk96C0f8j0XfcEXg",//zkx

+ 2 - 1
config/.env.prod.js

@@ -1,6 +1,7 @@
 const UNI_APP = {  	
 const UNI_APP = {  	
 	ProjectName :"荆鹏电管家",
 	ProjectName :"荆鹏电管家",
-	BASE_URL: 'http://36.134.122.108/railroad-server/',
+	//BASE_URL: 'http://36.134.122.108/railroad-server/',
+	BASE_URL: 'http://dgj.hbjp.com.cn/electric-manager-api/',
 	
 	
 	NODE_ENV :"prod",
 	NODE_ENV :"prod",
 	SIMPLE_RUN:false,
 	SIMPLE_RUN:false,

+ 8 - 3
pages/deductionRecord/deductionRecord.vue

@@ -1,7 +1,7 @@
 <template>
 <template>
 	<view>
 	<view>
 		<u-navbar title="扣费记录"  title-color="#101010" >
 		<u-navbar title="扣费记录"  title-color="#101010" >
-			<view class="slot" slot="right">
+			<view class="slot" slot="right"  @click="gotoUrl('/pages/invoiceManagement/invoiceManagement')" >
 				开发票
 				开发票
 
 
 			</view>
 			</view>
@@ -38,6 +38,8 @@
 			<view class="time">
 			<view class="time">
 				{{queryMonth}}  合计扣费  {{jpAmount(sumAmount)}}元
 				{{queryMonth}}  合计扣费  {{jpAmount(sumAmount)}}元
 			</view>
 			</view>
+			
+				
 			<view class="details" v-for="(item,i) in list" :key="i" >
 			<view class="details" v-for="(item,i) in list" :key="i" >
 				<view class="icon">
 				<view class="icon">
 					<image class="img" v-if="item.remark.indexOf('水')>-1" src="@/assets/img/wImage@1x.png" mode=""></image>
 					<image class="img" v-if="item.remark.indexOf('水')>-1" src="@/assets/img/wImage@1x.png" mode=""></image>
@@ -60,7 +62,8 @@
 				</view>
 				</view>
 			</view>
 			</view>
 			
 			
-			
+			<u-divider :isnone="list.length==0"  nonetext="没有找到相关内容"
+				border-color="#CFD2D5">已经到底了</u-divider>
 			
 			
 		</view>
 		</view>
 		
 		
@@ -301,7 +304,9 @@
 				
 				
 			},
 			},
 			deductionRecord(){
 			deductionRecord(){
-				
+				uni.showLoading({
+					mask:true,title:'加载中...'
+				})
 				API.deductionRecord(this.formData).then((response) => {
 				API.deductionRecord(this.formData).then((response) => {
 					uni.hideLoading();
 					uni.hideLoading();
 					this.list=response.data.data;
 					this.list=response.data.data;

+ 28 - 4
pages/invoiceManagement/InvoiceTitleManagement.vue

@@ -2,7 +2,8 @@
 	<view>
 	<view>
 		<u-navbar title="发票抬头管理"  title-color="#101010" ></u-navbar>
 		<u-navbar title="发票抬头管理"  title-color="#101010" ></u-navbar>
 		<!-- 企业单位 -->
 		<!-- 企业单位 -->
-		<view class="enterprise">
+		
+		<view class="enterprise"  v-for="(item,i) in companyTypes" :key="i" >
 			<view class="title">
 			<view class="title">
 				企业单位
 				企业单位
 				
 				
@@ -19,7 +20,7 @@
 			</view>
 			</view>
 		</view>
 		</view>
 		<!-- 非企业 -->
 		<!-- 非企业 -->
-		<view class="nonbusiness">
+		<view class="nonbusiness" v-for="(item,i) in personTypes" :key="i">
 			<view class="title">
 			<view class="title">
 				企业单位
 				企业单位
 				
 				
@@ -33,6 +34,10 @@
 				
 				
 			</view>
 			</view>
 		</view>
 		</view>
+		
+		<u-divider :isnone="companyTypes.length==0&&personTypes.length==0"   nonetext="没有找到相关内容"
+			border-color="#CFD2D5">已经到底了</u-divider>
+			
 		<!-- 底部 -->
 		<!-- 底部 -->
 		<view class="bottom">
 		<view class="bottom">
 			<button class="add"  @click="gotoUrl('/pages/invoiceManagement/addInvoiceTitle')" >新增发票抬头</button>
 			<button class="add"  @click="gotoUrl('/pages/invoiceManagement/addInvoiceTitle')" >新增发票抬头</button>
@@ -41,14 +46,33 @@
 </template>
 </template>
 
 
 <script>
 <script>
+	import * as API from '@/apis/pagejs/invoiceApi.js'
+	
 	export default {
 	export default {
 		data() {
 		data() {
 			return {
 			return {
-				
+				companyTypes:[],
+				personTypes:[],
 			}
 			}
 		},
 		},
+		onLoad() {
+			this.getInvoiceList()
+		},
 		methods: {
 		methods: {
-			
+			getInvoiceList(){
+				uni.showLoading({
+					mask:true,title:'加载中...'
+				})
+				API.invoiceTypes().then((response) => {
+					uni.hideLoading();
+					//this.list=response.data.data;
+					this.companyTypes=response.data.companyTypes;
+					this.personTypes=response.data.personTypes;
+				}).catch(error => {
+					uni.hideLoading();
+					
+				})
+			},
 		}
 		}
 	}
 	}
 </script>
 </script>

+ 69 - 12
pages/invoiceManagement/addInvoiceTitle.vue

@@ -5,11 +5,11 @@
 		<view class="main">
 		<view class="main">
 			<u-cell-group>
 			<u-cell-group>
 				<u-cell-item  title="抬头类型" required :arrow="false" >
 				<u-cell-item  title="抬头类型" required :arrow="false" >
-					<u-radio-group v-model="value" @change="radioGroupChange">
+					<u-radio-group v-model="form.headerType" @change="radioGroupChange">
 								<u-radio 
 								<u-radio 
 									@change="radioChange" 
 									@change="radioChange" 
 									v-for="(item, index) in list" :key="index" 
 									v-for="(item, index) in list" :key="index" 
-									:name="item.name"
+									:name="item.id"
 									:disabled="item.disabled"
 									:disabled="item.disabled"
 								>
 								>
 									{{item.name}}
 									{{item.name}}
@@ -17,12 +17,12 @@
 							</u-radio-group>
 							</u-radio-group>
 					
 					
 				</u-cell-item>
 				</u-cell-item>
-				<u-cell-item  title="发票类型" required :arrow="false">
-					<u-radio-group v-model="value" @change="radioGroupChange">
+				<u-cell-item  title="发票类型" required :arrow="false" v-show="setparameter('type')" >
+					<u-radio-group v-model="form.type" @change="radioGroupChange">
 								<u-radio 
 								<u-radio 
 									@change="radioChange" 
 									@change="radioChange" 
 									v-for="(item, index) in list2" :key="index" 
 									v-for="(item, index) in list2" :key="index" 
-									:name="item.name"
+									:name="item.id"
 									:disabled="item.disabled"
 									:disabled="item.disabled"
 								>
 								>
 									{{item.name}}
 									{{item.name}}
@@ -34,26 +34,30 @@
 		<!-- 其他信息 -->
 		<!-- 其他信息 -->
 		<view class="main">
 		<view class="main">
 			<u-cell-group>
 			<u-cell-group>
-				<u-cell-item  title="公司名称" value="" required :arrow="false" >
+				<u-cell-item  title="发票抬头" value="" required :arrow="false"   v-show="setparameter('title')" >
 					<u-input placeholder="请填写发票抬头" ></u-input>
 					<u-input placeholder="请填写发票抬头" ></u-input>
 				</u-cell-item>
 				</u-cell-item>
-				<u-cell-item  title="公司税号" value="" required :arrow="false" >
+				<u-cell-item  title="公司税号" value="" required :arrow="false"   v-show="setparameter('companyTaxNo')" >
 					<u-input placeholder="请填写纳税人税号" ></u-input>
 					<u-input placeholder="请填写纳税人税号" ></u-input>
 				</u-cell-item>
 				</u-cell-item>
-				<u-cell-item  title="开户银行" value="" required :arrow="false" >
+				<u-cell-item  title="开户银行" value=""  :required="setparameter('bankName')==2" :arrow="false" v-show="setparameter('bankName')" >
 					<u-input placeholder="请填写开户银行全称" ></u-input>
 					<u-input placeholder="请填写开户银行全称" ></u-input>
 				</u-cell-item>
 				</u-cell-item>
-				<u-cell-item  title="银行账户" value="" required :arrow="false" >
+				<u-cell-item  title="银行账户" value=""  :required="setparameter('accountNo')==2" :arrow="false" v-show="setparameter('accountNo')" >
 					<u-input placeholder="请填写银行账户" ></u-input>
 					<u-input placeholder="请填写银行账户" ></u-input>
 				</u-cell-item>
 				</u-cell-item>
-				<u-cell-item  title="公司地址" value="" required :arrow="false" >
+				<u-cell-item  title="公司地址" value="" :required="setparameter('companyAddress')==2" :arrow="false" v-show="setparameter('companyAddress')" >
 					<u-input placeholder="请填写公司详细地址" ></u-input>
 					<u-input placeholder="请填写公司详细地址" ></u-input>
 				</u-cell-item>
 				</u-cell-item>
+				
+				<u-cell-item  title="身份证号" value="" required :arrow="false" v-show="setparameter('idCard')" >
+					<u-input placeholder="请填写身份证号" ></u-input>
+				</u-cell-item>
 			</u-cell-group>
 			</u-cell-group>
 		</view>
 		</view>
 		
 		
 		<view class="main">
 		<view class="main">
-			<u-cell-item  title="联系电话" value="" required :arrow="false" >
+			<u-cell-item  title="联系电话" value="" required :arrow="false"  v-show="setparameter('companyTelephone')"  >
 				<u-input placeholder="请填写联系电话" ></u-input>
 				<u-input placeholder="请填写联系电话" ></u-input>
 			</u-cell-item>
 			</u-cell-item>
 		</view>
 		</view>
@@ -75,36 +79,89 @@ export default {
 			checked:true,
 			checked:true,
 			list: [
 			list: [
 				{
 				{
+					id:1,
 					name: '企业单位',
 					name: '企业单位',
 					disabled: false
 					disabled: false
 				},
 				},
 				{
 				{
+					id:2,
 					name: '个人/非企业单位',
 					name: '个人/非企业单位',
 					disabled: false
 					disabled: false
 				}
 				}
 			],
 			],
 			list2: [
 			list2: [
 				{
 				{
+					id:1,
 					name: '增值税专票',
 					name: '增值税专票',
 					disabled: false
 					disabled: false
 				},
 				},
 				{
 				{
+					id:2,
 					name: '增值税普票',
 					name: '增值税普票',
 					disabled: false
 					disabled: false
 				}
 				}
 			],
 			],
 			
 			
 			value: 'orange',
 			value: 'orange',
+			form:{
+				headerType:'',//专票必填
+				type:"",//专票必填
+				//companyName:"",//专票必填
+				companyTaxNo:"",//专票必填
+				bankName:"",
+				accountNo:"",
+				companyAddress:"",
+				companyTelephone:"",
+				defaultHeader:"",
+				title:"",//个人
+				idCard:"",//个人
+			}
 		};
 		};
 	},
 	},
+	computed:{
+		ruleReqlist(){
+			if(this.form.headerType==2){
+				return ["title","idCard"]
+			}else if(this.form.headerType==1&&this.form.type==2){
+				return ["headerType","type","title","companyTaxNo",
+			"companyTelephone","defaultHeader"]
+			}else{
+				return ["headerType","type","title","companyTaxNo",
+			"bankName","accountNo","companyAddress",
+			"companyTelephone","defaultHeader"]
+			}
+		},
+		rulelist(){
+			if(this.form.headerType==1&&this.form.type==2){
+				return ["bankName","accountNo","companyAddress"]
+			}else {
+				return []
+			}
+		}
+	
+	},
 	methods: {
 	methods: {
+		setparameter(key){
+			
+			if(this.ruleReqlist.indexOf(key)!=-1){
+				//console.log(2,key,this.ruleReqlist)
+				return 2
+			}
+			if(this.rulelist.indexOf(key)!=-1){
+				//console.log(1,key,this.rulelist)
+				return 1
+			}
+			//console.log(0,key)
+			return 0
+		},
 		// 选中某个单选框时,由radio时触发
 		// 选中某个单选框时,由radio时触发
 		radioChange(e) {
 		radioChange(e) {
 			// console.log(e);
 			// console.log(e);
 		},
 		},
 		// 选中任一radio时,由radio-group触发
 		// 选中任一radio时,由radio-group触发
 		radioGroupChange(e) {
 		radioGroupChange(e) {
-			// console.log(e);
+			
+			
 		}
 		}
 	}
 	}
 };
 };

+ 10 - 1
pages/invoiceManagement/invoiceManagement.vue

@@ -44,6 +44,8 @@
 					</view>
 					</view>
 				</view>
 				</view>
 			</view>
 			</view>
+			<u-divider :isnone="list1.length==0"  v-if="list1.length==recordsTotal" nonetext="没有找到相关内容"
+				border-color="#CFD2D5">已经到底了</u-divider>
 		</view>
 		</view>
 		
 		
 		<!-- 已开发票 -->
 		<!-- 已开发票 -->
@@ -132,6 +134,8 @@
 					</view>
 					</view>
 				</view>
 				</view>
 			</view>
 			</view>
+			<u-divider :isnone="list2.length==0"  v-if="list2.length==recordsTotal2" nonetext="没有找到相关内容"
+				border-color="#CFD2D5">已经到底了</u-divider>
 		</view>
 		</view>
 		<!-- 底部 -->
 		<!-- 底部 -->
 		<view class="bottom" v-if="current==0">
 		<view class="bottom" v-if="current==0">
@@ -164,7 +168,12 @@
 				}, {
 				}, {
 					name: '已开发票'
 					name: '已开发票'
 				}],
 				}],
-				current: 0
+				current: 0,
+				
+				list1:[],
+				recordsTotal1:0,
+				list2:[],
+				recordsTotal2:0
 			}
 			}
 		},
 		},
 		methods: {
 		methods: {

+ 1 - 1
pages/login/login.vue

@@ -39,7 +39,7 @@
 			}
 			}
 		},
 		},
 		onLoad(){
 		onLoad(){
-			this.carhelp.setRole("businessHall");
+			
 			this.query()
 			this.query()
 		},
 		},
 		methods: {
 		methods: {

+ 4 - 1
pages/message/messageList.vue

@@ -10,6 +10,8 @@
 					2024-01-02 10:00  园区办公室
 					2024-01-02 10:00  园区办公室
 				</view>
 				</view>
 			</view>
 			</view>
+			<u-divider :isnone="list.length==0"  v-if="list.length==recordsTotal" nonetext="没有找到相关内容"
+				border-color="#CFD2D5">已经到底了</u-divider>
 		</view>
 		</view>
 		
 		
 	</view>
 	</view>
@@ -19,7 +21,8 @@
 	export default {
 	export default {
 		data() {
 		data() {
 			return {
 			return {
-				
+				list:[],
+				recordsTotal:0
 			}
 			}
 		},
 		},
 		methods: {
 		methods: {

+ 163 - 5
pages/mine/findBackPassword.vue

@@ -3,29 +3,187 @@
 		<u-navbar title="找回密码" title-color="#101010"></u-navbar>
 		<u-navbar title="找回密码" title-color="#101010"></u-navbar>
 		<view class="main">
 		<view class="main">
 			<view class="original-password">
 			<view class="original-password">
-				<text>手机号码</text><u-input  v-model="password" style="padding: 0 0 0 20px"  maxlength="11" type="number"  placeholder="请填写手机号"  />
+				<text>手机号码</text><u-input  v-model="form.telephone" style="padding: 0 0 0 20px"  maxlength="11" type="number"  placeholder="请填写手机号"  />
 			</view>
 			</view>
 			<view class="new-password">
 			<view class="new-password">
-				<text>验证码</text><u-input  v-model="password" style="padding: 0 0 0 20px" maxlength="6" type="number"  placeholder="6位验证码"  /><text class="verification-code">获取验证码</text>
+				<text>验证码</text><u-input  v-model="form.verifyCode" style="padding: 0 0 0 20px" maxlength="6" type="number"  placeholder="6位验证码"  />
+				<text class="verification-code" :style="isCodeTipsColor ? 'color: #999999;' : ''" @click="getCode" >{{codeTips}}</text>
 			</view>
 			</view>
 			<view class="new-password">
 			<view class="new-password">
-				<text>新密码</text><u-input  v-model="password" style="padding: 0 0 0 20px" class="password-input" type="password"  placeholder="创建6-16位组合新密码" :password-icon="true" />
+				<text>新密码</text><u-input  v-model="form.password" style="padding: 0 0 0 20px" class="password-input" type="password"  placeholder="创建6-16位组合新密码" :password-icon="true" />
 			</view>
 			</view>
 		</view>
 		</view>
+		<u-verification-code :seconds="sendMsgSecond" ref="uCode" @change="codeChange" @end="end" @start="start"
+			change-text="(Xs)">
+		</u-verification-code>
 		<!-- 确认修改 -->
 		<!-- 确认修改 -->
-		<button class="confirm">提交</button>
+		<button class="confirm"  @click="retrievePassword" >提交</button>
 	</view>
 	</view>
 </template>
 </template>
 
 
 <script>
 <script>
+	import * as API from '@/apis/pagejs/user.js'
+	import {
+		checkPhone
+	} from '@/apis/utils'
 	export default {
 	export default {
 		data() {
 		data() {
 			return {
 			return {
-				
+				form: {
+					verifyCode:"",
+					telephone: '',
+					password: '',
+				},
+				isSendMsgIng: false,
+				isCodeTipsColor: false,
+				sendMsgSecond: 60,
+				codeTips: '',
+			}
+		},
+		onReady() {
+			var time = this.carhelp.get("getvcodetime");
+			if (time) {
+				//this.$refs.uCode.start();
+				var nowtime = new Date().getTime()
+				var differ = (nowtime - time) / 1000
+				if (differ < 2 * 60) {
+					this.sendMsgSecond = 2 * 60 - parseInt(differ)
+					this.isSendMsgIng = true;
+					this.$refs.uCode.start();
+					this.isCodeTipsColor = true;
+				}
 			}
 			}
 		},
 		},
 		methods: {
 		methods: {
+			retrievePassword(){
+				
+				var checkPhoneResult = checkPhone(this.form.telephone);
+				
+				if (!this.form.telephone || checkPhoneResult != true) {
+					uni.showToast({
+						title: checkPhoneResult,
+						icon: "none"
+					})
+					return;
+				}
+				
+				if (!this.form.telephone) {
+					uni.showToast({
+						title: "请输入手机号",
+						icon: "none"
+					})
+					return
+				}
+				if (!this.form.verifyCode) {
+					uni.showToast({
+						title: "请输入验证码",
+						icon: "none"
+					})
+					return
+				}
+				if (!this.form.password) {
+					uni.showToast({
+						title: "请输入新密码",
+						icon: "none"
+					})
+					return
+				}
+				if (this.form.password.length<6||this.form.password.length>16) {
+					uni.showToast({
+						title: "请输入6-16位组合新密码",
+						icon: "none"
+					})
+					return
+				}
+				uni.showLoading({
+					title: "加载中",
+					mask: true,
+				})
+				API.retrievePassword(this.form).then((response) => {
+					uni.hideLoading();
+					// this.form.password=""
+					// this.form.oldPassword=""
+					uni.showModal({
+						title:"提示",
+						content:"密码修改成功!",
+						showCancel:false,
+						success() {
+							uni.reLaunch({
+								url:"/pages/login/login"
+							})
+						}
+					})
+					
+					
+				}).catch(error => {
+					uni.showToast({
+						title: error,
+						icon: "none"
+					})
+				})
+				
+			},
+			codeChange(text) {
+				this.codeTips = text;
+			},
+			//倒计时
+			end() {
+				this.sendMsgSecond = 60;
+				this.isSendMsgIng = false;
+				this.isCodeTipsColor = false;
+			},
+			// 获取验证码
+			getCode() {
+				if (this.$refs.uCode.canGetCode) {} else {
+					uni.showToast({
+						title: '倒计时结束后再发送',
+						icon: "none"
+					})
+					return
+				}
+			
+				var checkPhoneResult = checkPhone(this.form.telephone);
+			
+				if (checkPhoneResult !== true) {
+					uni.showToast({
+						icon: "none",
+						title: checkPhoneResult,
+					})
+					return;
+				}
+				this.$refs.uCode.start();
+				this.isCodeTipsColor = true;
+			},
+			start() {
+				if (!this.isSendMsgIng) {
+					uni.showLoading({
+						title: "加载中",
+						mask: true,
+					})
+					API.getVerifyCode(this.form).then((response) => {
+						uni.hideLoading();
+						this.carhelp.set("getvcodetime", new Date().getTime());
 			
 			
+						if (!"") {
+							//倒计时
+							uni.showToast({
+								icon: "none",
+								title: "发送成功"
+							})
+						} else {
+							uni.showToast({
+								icon: "none",
+								title: "您的验证码已经发送[5分钟有效],请勿重复点击"
+							})
+						}
+					}).catch(error => {
+						uni.showToast({
+							title: error,
+							icon: "none"
+						})
+					})
+				}
+			},
 		}
 		}
 	}
 	}
 </script>
 </script>

+ 20 - 2
pages/mine/mine.vue

@@ -11,7 +11,7 @@
 						{{personInfo.contacts}}
 						{{personInfo.contacts}}
 					</view>
 					</view>
 					<view class="company">
 					<view class="company">
-						{{personInfo.companyName}}
+						{{companyInfo.name}}
 					</view>
 					</view>
 					
 					
 				</view>
 				</view>
@@ -131,6 +131,7 @@
 
 
 <script>
 <script>
 	import * as API from '@/apis/pagejs/index.js'
 	import * as API from '@/apis/pagejs/index.js'
+	import * as API_user from '@/apis/pagejs/user.js'
 	
 	
 	import Tabbar from '@/components/Tabbar.vue'
 	import Tabbar from '@/components/Tabbar.vue'
 	export default {
 	export default {
@@ -139,13 +140,30 @@
 		},
 		},
 		data() {
 		data() {
 			return {
 			return {
-				
+				companyInfo:{},
 			}
 			}
 		},
 		},
 		onLoad() {
 		onLoad() {
 			this.homePage()
 			this.homePage()
+			//this.personalCenter()
 		},
 		},
 		methods: {
 		methods: {
+			personalCenter(){
+				uni.showLoading({
+					title: "加载中",
+					mask: true,
+				})
+				
+				API_user.personalCenter({
+					
+				}).then((response) => {
+					uni.hideLoading();
+					//this.companyInfo=response.data.companyInfo;
+				}).catch(error => {
+					uni.hideLoading();
+					
+				})
+			},
 			homePage(){
 			homePage(){
 				uni.showLoading({
 				uni.showLoading({
 					title: "加载中",
 					title: "加载中",

+ 5 - 2
pages/recharge/rechargeRecord.vue

@@ -42,7 +42,8 @@
 
 
 				</view>
 				</view>
 			</view>
 			</view>
-
+			<u-divider :isnone="list.length==0"  nonetext="没有找到相关内容"
+				border-color="#CFD2D5">已经到底了</u-divider>
 		</view>
 		</view>
 	</view>
 	</view>
 </template>
 </template>
@@ -279,7 +280,9 @@
 				
 				
 			},
 			},
 			rechargeRecord(){
 			rechargeRecord(){
-				
+				uni.showLoading({
+					mask:true,title:'加载中...'
+				})
 				API.rechargeRecord(this.formData).then((response) => {
 				API.rechargeRecord(this.formData).then((response) => {
 					uni.hideLoading();
 					uni.hideLoading();
 					this.list=response.data.data;
 					this.list=response.data.data;