瀏覽代碼

前端小程序 sdy

zhongtianhaoyuan 3 年之前
父節點
當前提交
6c2900fefb
共有 4 個文件被更改,包括 129 次插入79 次删除
  1. 5 1
      main.js
  2. 112 72
      pageD/identity/companyIdentityLook.vue
  3. 7 2
      pages/attestation/index.vue
  4. 5 4
      pages/release/release.vue

+ 5 - 1
main.js

@@ -175,6 +175,10 @@ const request = (_gp, _mt, data = {}, failCallback) => {
 // 现app调用方式
 
 const doRequest = (method, url, data,header)=> {
+	var contentheader='application/json'
+	if(header){
+		contentheader=header
+	}
 	// let baseUrl = config.def().baseUrl
 	let baseUrl = config.def().baseUrlNew
         // 如果data为空
@@ -190,7 +194,7 @@ const doRequest = (method, url, data,header)=> {
                 data: arr[0],
                 // data:data
                 header: {
-                    'content-type': 'application/json'//'application/x-www-form-urlencoded; charset=UTF-8',
+                    'content-type': contentheader //'application/x-www-form-urlencoded; charset=UTF-8',
                 },
                 success: function(result) {
                     // resolve调用后,即可传递到调用方使用then或者async+await同步方式进行处理逻辑

+ 112 - 72
pageD/identity/companyIdentityLook.vue

@@ -1,77 +1,81 @@
 <template>
 	<view class="center">
 		<view>
-			<label class="radio" v-model="radios">
+			<image @click='consent' style='width:14px;height:14px;position:relative;top:2px;margin-right:5px;' :src="consentStatus==true?'../../static/img/login/select@2x.png':'../../static/img/login/selected2.png'" alt=""></image>
+			<text>公司</text>
+			<image @click='consent' style='width:14px;height:14px;position:relative;top:2px;margin-right:5px;' :src="consentStatus1==true?'../../static/img/login/select@2x.png':'../../static/img/login/selected2.png'" alt=""></image>
+			<text>个人</text>
+			<!-- <label class="radio" v-model="radios">
 				<radio value="1" name="radios" /><text>公司</text>
 				<radio value="2" name="radios" /><text>个人</text>
-			</label>
+			</label> -->
 		</view>
-		<view v-if="radios == 1">
-		<view>
-			<button type="default">上传营业执照</button>
-		</view>
-		<view class="c-row b-b">
-			<text class="tit">公司名称</text>
-			<view class="con-list">
-				<input placeholder="请填写公司名称" name="input" @input="addressInput"></input>
+		<view v-if="consentStatus == true">
+			<view>
+				<button type="default">营业执照</button>
 			</view>
-		</view>
-		<view class="c-row b-b">
-			<text class="tit">纳税人识别号</text>
-			<view class="con-list">
-				<input placeholder="请填写纳税人识别号" name="input" @input="addressInput"></input>
+			<view class="c-row b-b">
+				<text class="tit">公司名称</text>
+				<view class="con-list">
+					{{deptList.compName}}
+				</view>
 			</view>
-		</view>
-		<view>
-			<button type="default">上传身份证正面</button>
-			<button type="default">上传身份证反面</button>
-		</view>
-		<view class="c-row b-b">
-			<text class="tit">姓名</text>
-			<view class="con-list">
-				<input placeholder="请填写姓名" name="input" @input="addressInput"></input>
+			<view class="c-row b-b">
+				<text class="tit">纳税人识别号</text>
+				<view class="con-list">
+				{{deptList.payTaxesCard}}
+				</view>
 			</view>
-		</view>
-		<view class="c-row b-b">
-			<text class="tit">身份证号</text>
-			<view class="con-list">
-				<input placeholder="请填写身份证号" name="input" @input="addressInput"></input>
+			<view>
+				<button type="default">身份证正面</button>
+				<button type="default">身份证反面</button>
 			</view>
-		</view>
-		<view>
-			<button type="default">上传银行卡正面</button>
-			<button type="default">上传银行卡反面</button>
-		</view>
-		<view class="c-row b-b">
-			<text class="tit">银行卡号</text>
-			<view class="con-list">
-				<input placeholder="请填写银行卡号" name="input" @input="addressInput"></input>
+			<view class="c-row b-b">
+				<text class="tit">姓名</text>
+				<view class="con-list">
+					{{deptList.customerName}}
+				</view>
 			</view>
-		</view>
-		<view class="c-row b-b">
-			<text class="tit">开户行</text>
-			<view class="con-list">
-				<input placeholder="请填写开户行" name="input" @input="addressInput"></input>
+			<view class="c-row b-b">
+				<text class="tit">身份证号</text>
+				<view class="con-list">
+					{{deptList.customerNumberCard}}
+				</view>
 			</view>
-		</view>
-		<view class="c-row b-b">
-			<text class="tit">开户支行</text>
-			<view class="con-list">
-				<input placeholder="请填写开户支行" name="input" @input="addressInput"></input>
+			<view>
+				<button type="default">银行卡正面</button>
+				<button type="default">银行卡反面</button>
 			</view>
-		</view>
-		<view class="c-row b-b">
-			<text class="tit">手机号</text>
-			<view class="con-list">
-				<input placeholder="请填写手机号" name="input" @input="addressInput"></input>
+			<view class="c-row b-b">
+				<text class="tit">银行卡号</text>
+				<view class="con-list">
+					{{deptList.bankCard}}
+				</view>
 			</view>
-		</view>
-		<view class="c-row b-b">
-			<text class="tit">公司地址</text>
-			<view class="con-list">
-				<input placeholder="请填写公司地址" name="input" @input="addressInput"></input>
+			<view class="c-row b-b">
+				<text class="tit">开户行</text>
+				<view class="con-list">
+					{{deptList.bankDeposit}}
+				</view>
+			</view>
+			<view class="c-row b-b">
+				<text class="tit">开户支行</text>
+				<view class="con-list">
+					{{deptList.bankDepositBranch}}
+				</view>
+			</view>
+			<view class="c-row b-b">
+				<text class="tit">手机号</text>
+				<view class="con-list">
+					{{deptList.customerPhone}}
+				</view>
+			</view>
+			<view class="c-row b-b">
+				<text class="tit">公司地址</text>
+				<view class="con-list">
+					{{deptList.compAddress}}
+				</view>
 			</view>
-		</view>
 		</view>
 		<view v-else>
 			<view>
@@ -81,13 +85,13 @@
 			<view class="c-row b-b">
 				<text class="tit">姓名</text>
 				<view class="con-list">
-					<input placeholder="请填写姓名" name="input" @input="addressInput"></input>
+					{{deptList.customerName}}
 				</view>
 			</view>
 			<view class="c-row b-b">
 				<text class="tit">身份证号</text>
 				<view class="con-list">
-					<input placeholder="请填写身份证号" name="input" @input="addressInput"></input>
+					{{deptList.customerNumberCard}}
 				</view>
 			</view>
 			<view>
@@ -97,43 +101,43 @@
 			<view class="c-row b-b">
 				<text class="tit">银行卡号</text>
 				<view class="con-list">
-					<input placeholder="请填写银行卡号" name="input" @input="addressInput"></input>
+					{{deptList.bankCard}}
 				</view>
 			</view>
 			<view class="c-row b-b">
 				<text class="tit">开户行</text>
 				<view class="con-list">
-					<input placeholder="请填写开户行" name="input" @input="addressInput"></input>
+					{{deptList.bankDeposit}}
 				</view>
 			</view>
 			<view class="c-row b-b">
 				<text class="tit">开户支行</text>
 				<view class="con-list">
-					<input placeholder="请填写开户支行" name="input" @input="addressInput"></input>
+					{{deptList.bankDepositBranch}}
 				</view>
 			</view>
 			<view class="c-row b-b">
 				<text class="tit">收款人姓名</text>
 				<view class="con-list">
-					<input placeholder="请填写收款人姓名" name="input" @input="addressInput"></input>
+					{{ deptList.payeeName}}
 				</view>
 			</view>
 			<view class="c-row b-b">
 				<text class="tit">收款人身份证号</text>
 				<view class="con-list">
-					<input placeholder="请填写收款身份证号" name="input" @input="addressInput"></input>
+					{{deptList.payeeNumberCard}}
 				</view>
 			</view>
 			<view class="c-row b-b">
 				<text class="tit">手机号</text>
 				<view class="con-list">
-					<input placeholder="请填写手机号" name="input" @input="addressInput"></input>
+					{{deptList.customerPhone}}
 				</view>
 			</view>
 			<view class="c-row b-b">
 				<text class="tit">联系地址</text>
 				<view class="con-list">
-					<input placeholder="请填写联系地址" name="input" @input="addressInput"></input>
+					{{deptList.compAddress}}
 				</view>
 			</view>
 		</view>
@@ -141,16 +145,52 @@
 </template>
 
 <script>
+	import {
+	    mapState 
+	} from 'vuex';
 	export default {
 		name: "buy",
 		data() {
 			return {
 				radios: 2,
-	
+				deptList:{},
+				id:"2c4b2845e9dc47ca95c05ad471881be0",
+				consentStatus:true,
+				consentStatus1:false,
+
 			};
 		},
+		onLoad() {
+			this.getList()
+		},
+		computed: {
+			...mapState(['hasLogin','userInfo'])
+		},
 		methods: {
-		
+			getList() {
+				
+				this.$api.doRequest('get', '/identityAuthenticationInfo/api/getIdentityAuthenticationInfo', {id:this.id}, 'application/json;').then(res => {
+						console.log("成功连接")
+						this.procurementPlanInfos = res.data.data
+					})
+					.catch(res => {
+						uni.showToast({
+							title: res.errmsg,
+							icon: 'none',
+							duration: 2000
+						})
+					});
+			},
+			consent(){
+				if(this.consentStatus == false && this.consentStatus1 == true){
+					this.consentStatus = true
+					this.consentStatus1 = false
+				}else if(this.consentStatus == true && this.consentStatus1 == false){
+					this.consentStatus = false
+					this.consentStatus1 = true
+				}
+				
+			}
 		}
 	}
 </script>
@@ -159,7 +199,7 @@
 	.center {
 		padding: 10px 20px;
 	}
-	
+
 	.c-row {
 		display: -webkit-box;
 		display: -webkit-flex;
@@ -170,7 +210,7 @@
 		padding: 20rpx 30rpx;
 		position: relative;
 	}
-	
+
 	.con-list {
 		-webkit-box-flex: 1;
 		-webkit-flex: 1;

+ 7 - 2
pages/attestation/index.vue

@@ -64,6 +64,7 @@
 				identityAuthenticationInfo:{
 					pageSize:10,
 					currentPage:1,
+					commonId:"",
 				},
 			};
 		},
@@ -75,9 +76,13 @@
 		},
 		methods: {
 			getList(){
+				
 				this.identityAuthenticationInfo.commonId = this.userInfo.id
-			this.$api.doRequest('get', '/identityAuthenticationInfo/selectIdentityAuthenticationInfo', this.identityAuthenticationInfo).then(res => {
-					console.log("添加成功")
+				console.log(12313)
+			this.$api.doRequest('get', '/identityAuthenticationInfo/selectIdentityAuthenticationInfo', {pageSize:10,
+					currentPage:1,
+					commonId:this.userInfo.id},'application/json;charset=UTF-8').then(res => {
+				console.log("成功连接")
 					this.procurementPlanInfos = res.data.data
 				})
 				.catch(res => {

+ 5 - 4
pages/release/release.vue

@@ -51,7 +51,7 @@
 		methods: {
 			switch1(item){
 				console.log(125489)
-				if (!this.hasLogin) {
+				// if (!this.hasLogin) {
 					uni.showModal({
 						// title: '登录提示',
 						content: '隐藏后该信息不再展示给其他用户,是否确定隐藏?',
@@ -77,12 +77,12 @@
 						fail: () => {},
 						complete: () => {}
 					})
-				}
+				// }
 			},
 			
 			
 			deleteRelease(item){
-				if (!this.hasLogin) {
+				// if (!this.hasLogin) {
 					uni.showModal({
 						// title: '登录提示',
 						content: '确定删除该信息?',
@@ -93,6 +93,7 @@
 								this.procurementPlanInfos = res.data.data.records
 								if (res.errmsg == "Success") {
 									this.$api.msg('删除成功!')
+									this.getList()
 									return
 								}
 								
@@ -108,7 +109,7 @@
 						fail: () => {},
 						complete: () => {}
 					})
-				}	
+					// }
 			},
 			releaseChange(e){
 				this.receivePrivate = e.detail.value