Browse Source

边民交易/上架订单、与我的页签优化

linbl 6 months ago
parent
commit
15c90ff468

+ 272 - 0
js_sdk/wa-permission/permission.js

@@ -0,0 +1,272 @@
+/**
+ * 本模块封装了Android、iOS的应用权限判断、打开应用权限设置界面、以及位置系统服务是否开启
+ */
+
+var isIos
+// #ifdef APP-PLUS
+isIos = (plus.os.name == "iOS")
+// #endif
+
+// 判断推送权限是否开启
+function judgeIosPermissionPush() {
+	var result = false;
+	var UIApplication = plus.ios.import("UIApplication");
+	var app = UIApplication.sharedApplication();
+	var enabledTypes = 0;
+	if (app.currentUserNotificationSettings) {
+		var settings = app.currentUserNotificationSettings();
+		enabledTypes = settings.plusGetAttribute("types");
+		console.log("enabledTypes1:" + enabledTypes);
+		if (enabledTypes == 0) {
+			console.log("推送权限没有开启");
+		} else {
+			result = true;
+			console.log("已经开启推送功能!")
+		}
+		plus.ios.deleteObject(settings);
+	} else {
+		enabledTypes = app.enabledRemoteNotificationTypes();
+		if (enabledTypes == 0) {
+			console.log("推送权限没有开启!");
+		} else {
+			result = true;
+			console.log("已经开启推送功能!")
+		}
+		console.log("enabledTypes2:" + enabledTypes);
+	}
+	plus.ios.deleteObject(app);
+	plus.ios.deleteObject(UIApplication);
+	return result;
+}
+
+// 判断定位权限是否开启
+function judgeIosPermissionLocation() {
+	var result = false;
+	var cllocationManger = plus.ios.import("CLLocationManager");
+	var status = cllocationManger.authorizationStatus();
+	result = (status != 2)
+	console.log("定位权限开启:" + result);
+	// 以下代码判断了手机设备的定位是否关闭,推荐另行使用方法 checkSystemEnableLocation
+	/* var enable = cllocationManger.locationServicesEnabled();
+	var status = cllocationManger.authorizationStatus();
+	console.log("enable:" + enable);
+	console.log("status:" + status);
+	if (enable && status != 2) {
+		result = true;
+		console.log("手机定位服务已开启且已授予定位权限");
+	} else {
+		console.log("手机系统的定位没有打开或未给予定位权限");
+	} */
+	plus.ios.deleteObject(cllocationManger);
+	return result;
+}
+
+// 判断麦克风权限是否开启
+function judgeIosPermissionRecord() {
+	var result = false;
+	var avaudiosession = plus.ios.import("AVAudioSession");
+	var avaudio = avaudiosession.sharedInstance();
+	var permissionStatus = avaudio.recordPermission();
+	console.log("permissionStatus:" + permissionStatus);
+	if (permissionStatus == 1684369017 || permissionStatus == 1970168948) {
+		console.log("麦克风权限没有开启");
+	} else {
+		result = true;
+		console.log("麦克风权限已经开启");
+	}
+	plus.ios.deleteObject(avaudiosession);
+	return result;
+}
+
+// 判断相机权限是否开启
+function judgeIosPermissionCamera() {
+	var result = false;
+	var AVCaptureDevice = plus.ios.import("AVCaptureDevice");
+	var authStatus = AVCaptureDevice.authorizationStatusForMediaType('vide');
+	console.log("authStatus:" + authStatus);
+	if (authStatus == 3) {
+		result = true;
+		console.log("相机权限已经开启");
+	} else {
+		console.log("相机权限没有开启");
+	}
+	plus.ios.deleteObject(AVCaptureDevice);
+	return result;
+}
+
+// 判断相册权限是否开启
+function judgeIosPermissionPhotoLibrary() {
+	var result = false;
+	var PHPhotoLibrary = plus.ios.import("PHPhotoLibrary");
+	var authStatus = PHPhotoLibrary.authorizationStatus();
+	console.log("authStatus:" + authStatus);
+	if (authStatus == 3) {
+		result = true;
+		console.log("相册权限已经开启");
+	} else {
+		console.log("相册权限没有开启");
+	}
+	plus.ios.deleteObject(PHPhotoLibrary);
+	return result;
+}
+
+// 判断通讯录权限是否开启
+function judgeIosPermissionContact() {
+	var result = false;
+	var CNContactStore = plus.ios.import("CNContactStore");
+	var cnAuthStatus = CNContactStore.authorizationStatusForEntityType(0);
+	if (cnAuthStatus == 3) {
+		result = true;
+		console.log("通讯录权限已经开启");
+	} else {
+		console.log("通讯录权限没有开启");
+	}
+	plus.ios.deleteObject(CNContactStore);
+	return result;
+}
+
+// 判断日历权限是否开启
+function judgeIosPermissionCalendar() {
+	var result = false;
+	var EKEventStore = plus.ios.import("EKEventStore");
+	var ekAuthStatus = EKEventStore.authorizationStatusForEntityType(0);
+	if (ekAuthStatus == 3) {
+		result = true;
+		console.log("日历权限已经开启");
+	} else {
+		console.log("日历权限没有开启");
+	}
+	plus.ios.deleteObject(EKEventStore);
+	return result;
+}
+
+// 判断备忘录权限是否开启
+function judgeIosPermissionMemo() {
+	var result = false;
+	var EKEventStore = plus.ios.import("EKEventStore");
+	var ekAuthStatus = EKEventStore.authorizationStatusForEntityType(1);
+	if (ekAuthStatus == 3) {
+		result = true;
+		console.log("备忘录权限已经开启");
+	} else {
+		console.log("备忘录权限没有开启");
+	}
+	plus.ios.deleteObject(EKEventStore);
+	return result;
+}
+
+// Android权限查询
+function requestAndroidPermission(permissionID) {
+	return new Promise((resolve, reject) => {
+		plus.android.requestPermissions(
+			[permissionID], // 理论上支持多个权限同时查询,但实际上本函数封装只处理了一个权限的情况。有需要的可自行扩展封装
+			function(resultObj) {
+				var result = 0;
+				for (var i = 0; i < resultObj.granted.length; i++) {
+					var grantedPermission = resultObj.granted[i];
+					console.log('已获取的权限:' + grantedPermission);
+					result = 1
+				}
+				for (var i = 0; i < resultObj.deniedPresent.length; i++) {
+					var deniedPresentPermission = resultObj.deniedPresent[i];
+					console.log('拒绝本次申请的权限:' + deniedPresentPermission);
+					result = 0
+				}
+				for (var i = 0; i < resultObj.deniedAlways.length; i++) {
+					var deniedAlwaysPermission = resultObj.deniedAlways[i];
+					console.log('永久拒绝申请的权限:' + deniedAlwaysPermission);
+					result = -1
+				}
+				resolve(result);
+				// 若所需权限被拒绝,则打开APP设置界面,可以在APP设置界面打开相应权限
+				// if (result != 1) {
+				// gotoAppPermissionSetting()
+				// }
+			},
+			function(error) {
+				console.log('申请权限错误:' + error.code + " = " + error.message);
+				resolve({
+					code: error.code,
+					message: error.message
+				});
+			}
+		);
+	});
+}
+
+// 使用一个方法,根据参数判断权限
+function judgeIosPermission(permissionID) {
+	if (permissionID == "location") {
+		return judgeIosPermissionLocation()
+	} else if (permissionID == "camera") {
+		return judgeIosPermissionCamera()
+	} else if (permissionID == "photoLibrary") {
+		return judgeIosPermissionPhotoLibrary()
+	} else if (permissionID == "record") {
+		return judgeIosPermissionRecord()
+	} else if (permissionID == "push") {
+		return judgeIosPermissionPush()
+	} else if (permissionID == "contact") {
+		return judgeIosPermissionContact()
+	} else if (permissionID == "calendar") {
+		return judgeIosPermissionCalendar()
+	} else if (permissionID == "memo") {
+		return judgeIosPermissionMemo()
+	}
+	return false;
+}
+
+// 跳转到**应用**的权限页面
+function gotoAppPermissionSetting() {
+	if (isIos) {
+		var UIApplication = plus.ios.import("UIApplication");
+		var application2 = UIApplication.sharedApplication();
+		var NSURL2 = plus.ios.import("NSURL");
+		// var setting2 = NSURL2.URLWithString("prefs:root=LOCATION_SERVICES");		
+		var setting2 = NSURL2.URLWithString("app-settings:");
+		application2.openURL(setting2);
+
+		plus.ios.deleteObject(setting2);
+		plus.ios.deleteObject(NSURL2);
+		plus.ios.deleteObject(application2);
+	} else {
+		// console.log(plus.device.vendor);
+		var Intent = plus.android.importClass("android.content.Intent");
+		var Settings = plus.android.importClass("android.provider.Settings");
+		var Uri = plus.android.importClass("android.net.Uri");
+		var mainActivity = plus.android.runtimeMainActivity();
+		var intent = new Intent();
+		intent.setAction(Settings.ACTION_APPLICATION_DETAILS_SETTINGS);
+		var uri = Uri.fromParts("package", mainActivity.getPackageName(), null);
+		intent.setData(uri);
+		mainActivity.startActivity(intent);
+	}
+}
+
+// 检查系统的设备服务是否开启
+// var checkSystemEnableLocation = async function () {
+function checkSystemEnableLocation() {
+	if (isIos) {
+		var result = false;
+		var cllocationManger = plus.ios.import("CLLocationManager");
+		var result = cllocationManger.locationServicesEnabled();
+		console.log("系统定位开启:" + result);
+		plus.ios.deleteObject(cllocationManger);
+		return result;
+	} else {
+		var context = plus.android.importClass("android.content.Context");
+		var locationManager = plus.android.importClass("android.location.LocationManager");
+		var main = plus.android.runtimeMainActivity();
+		var mainSvr = main.getSystemService(context.LOCATION_SERVICE);
+		var result = mainSvr.isProviderEnabled(locationManager.GPS_PROVIDER);
+		console.log("系统定位开启:" + result);
+		return result
+	}
+}
+
+module.exports = {
+	judgeIosPermission: judgeIosPermission,
+	requestAndroidPermission: requestAndroidPermission,
+	checkSystemEnableLocation: checkSystemEnableLocation,
+	gotoAppPermissionSetting: gotoAppPermissionSetting
+}

+ 4 - 4
pages.json

@@ -105,7 +105,7 @@
 				"enablePullDownRefresh": true
 			}
 
-		}, 
+		},
 		{
 			"path": "pages/news/detail",
 			"style": {
@@ -120,7 +120,7 @@
 				"navigationBarTitleText": "申请入组",
 				"enablePullDownRefresh": false
 			}
-		
+
 		},
 		{
 			"path": "pages/market/two/purchaser/buy/list",
@@ -619,7 +619,7 @@
 		{
 			"path": "pages/market/one/leader/noPayOrder",
 			"style": {
-				"navigationBarTitleText": "未支付订单",
+				"navigationBarTitleText": "边民交易订单",
 				"enablePullDownRefresh": true
 			}
 
@@ -627,7 +627,7 @@
 		{
 			"path": "pages/market/one/leader/noUpOrder",
 			"style": {
-				"navigationBarTitleText": "上架订单",
+				"navigationBarTitleText": "边民上架订单",
 				"enablePullDownRefresh": true
 			}
 

+ 2 - 2
pages/index/index.vue

@@ -91,7 +91,7 @@
 					</view>
 
 					<view style="text-indent: 2rem;line-height: 60rpx;">
-						根据相关规定,边民进行互市贸易需要确保为本人实际操作,为了确保后续交易的合规合法,需要您先录入人脸!</view>
+						根据相关规定,边民进行互市贸易需要确保为本人实际操作,为了确保后续交易的合规合法,需要您先录入人脸!</view>
 				</view>
 				<button class="btn" @click="go('/pages/face/faceRegister')">马上录入</button>
 			</view>
@@ -490,4 +490,4 @@
 			}
 		}
 	}
-</style>
+</style>

+ 118 - 62
pages/market/one/leader/noPayOrder.vue

@@ -1,33 +1,49 @@
 <template>
 	<view>
-		<!--<view class="tab">
+		<view class="tab">
 			<u-tabs :list="tab" @click="click" :lineHeight="5"></u-tabs>
-		</view>-->
+		</view>
 		<view class="goodsList">
-			<view class="item" v-for="(item, index) in list" :key="index" @click="detail(item)">
-				<view class="title">{{ item.enterpriseName }}
-					<!--<view class="state"
-						v-if="item.finishStatus == 0">
+			<view class="item" v-for="(item, index) in list" :key="index">
+				<view class="title">{{ item.buyUserName }}
+					<view class="state" v-if="item.finishStatus == 0 && item.peopleConfirmStatus == 0">
+						<text class="icon">&#xe830;</text>
+						<text>未支付</text>
+					</view>
+					<view class="state" v-else-if="item.finishStatus == 0 && item.peopleConfirmStatus == 1 && item.applyConfirmStatus == 0">
+						<text class="icon">&#xe830;</text>
+						<text>未申报</text>
+					</view>
+					<view class="state" v-else-if="item.finishStatus == 0 && item.Sxb010Status == 1">
+						<text class="icon" style="color: #13ce66">&#xe830;</text>
+						<text>扣款成功</text>
+					</view>
+					<view class="state" v-else-if="item.finishStatus == 0 && item.Sxb010Status == 2">
 						<text class="icon">&#xe830;</text>
-						<text>未过卡3</text>
+						<text>扣款失败</text>
 					</view>
-					<view class="state"
-						v-if="item.finishStatus == 1">
+					<view class="state" v-else>
 						<text class="icon">&#xe830;</text>
-						<text>已过卡3</text>
-					</view>-->
+						<text>扣款中</text>
+					</view>
 				</view>
+				<view class="title">{{ item.phone }}</view>
 				<view class="con">
-					<view class="productName omit">{{ item.goodsNames }}</view>
-					<view class="desc omit">
-						<text>重量 {{ item.totalWeight }}{{ item.goodsUnit }}</text>
-						<text>{{ item.tradeAreaName }}</text>
+					<view style="font-size: 16px;padding-top: 7px;color: #a0a2a6;">
+						<text>订单 {{ item.tradeNo }}</text>
+					</view>
+					<view class="desc">
+						<text>{{ item.goodsNames }} {{ item.totalWeight }}{{ item.goodsUnit }}</text>
 					</view>
 					<view class="price">¥ {{ item.totalPrice }}</view>
 				</view>
 				<view class="clear"></view>
 				<view class="op">
 					<view class="date">{{ item.createTime }}</view>
+					<template v-if="item.phone">
+						<!-- <view class="state" style="color: #3c9cff;" @click="callNumber(item.phone)">拨打电话</view> -->
+						<a :href="'tel:'+item.phone" class="an down_btn">拨打电话</a>
+					</template>
 				</view>
 			</view>
 			<view class="loading" v-if="loadMore"><u-loadmore :status="loadMore ? 'loading' : 'nomore'" /></view>
@@ -37,6 +53,7 @@
 </template>
 
 <script>
+	import permision from "@/js_sdk/wa-permission/permission.js"
 	export default {
 		data() {
 			return {
@@ -45,24 +62,38 @@
 						name: '全部',
 						peopleConfirmStatus: '', //边民确认状态
 						cooperEntrustStatus: '', //互助委托申报确认状态
-						applyConfirmStatus: '', //进口申报确认状态
-						finishStatus: '', //订单完成状态
-						resaleStatus: '' //订单转售状态
+						applyConfirmStatus: '',  //进口申报确认状态
+						finishStatus: 0, //订单完成状态
+						upStatus: '', 	  //订单上架状态
+						resaleStatus: '', //订单转售状态
+						Sxb010Status: '', //扣款回执状态
 					},
 					{
-						name: '未过卡3',
+						name: '未支付',
+						peopleConfirmStatus: 0,
 						finishStatus: 0,
 					},
 					{
-						name: '已过卡3',
-						finishStatus: 1,
-
+						name: '未申报',
+						peopleConfirmStatus: 1,
+						applyConfirmStatus: 0,
+						finishStatus: 0,
 					},
+					{
+						name: '扣款成功',
+						Sxb010Status: 1,
+						finishStatus: 0,
+					},
+					{
+						name: '扣款失败',
+						Sxb010Status: 2,
+						finishStatus: 0,
+					}
 				],
 				param: {
 					pageNo: 1,
 					pageSize: 10,
-					Sxb010Status: 0
+					finishStatus: 0
 				},
 				list: [],
 				loadMore: true,
@@ -70,38 +101,6 @@
 				flag: '',
 			};
 		},
-		onLoad() {
-			this.user = this.getUser()
-			uni.$on('face', res => {
-				if (this.flag == 1) {
-					this.http.request({
-						url: '/level-one-server/app/TbOrder/confirmOrder',
-						data: {
-							orderId: this.id
-						},
-						success: resp => {
-							uni.showToast({
-								title: '订单确认成功'
-							});
-							this.refresh();
-						}
-					});
-				} else if (this.flag == 2) {
-					this.http.request({
-						url: '/level-one-server/app/TbOrder/applyOrder',
-						data: {
-							orderId: this.id
-						},
-						success: resp => {
-							uni.showToast({
-								title: '进口申报确认成功'
-							});
-							this.refresh();
-						}
-					});
-				}
-			})
-		},
 		onShow() {
 			this.getData();
 		},
@@ -128,20 +127,69 @@
 				this.param.finishStatus = e.finishStatus;
 				this.param.resaleStatus = e.resaleStatus;
 				this.param.upStatus = e.upStatus;
+				this.param.Sxb010Status = e.Sxb010Status;
 				this.refresh();
 			},
-			detail(item) {
-				uni.navigateTo({
-					url: '/pages/market/one/leader/detail?id=' + item.id
-				});
-			},
 			// 刷新数据
 			refresh() {
 				this.loadMore = true;
 				this.param.pageNo = 1;
 				this.list = [];
 				this.getData();
-			}
+			},
+			callNumber(phone) {
+				permision.gotoAppPermissionSetting();
+				uni.makePhoneCall({
+					phoneNumber: phone,
+					success: function(ress) {
+						console.log("拨打电话成功!",JSON.stringify(ress))
+					},
+					fail: function() {
+						console.log("拨打电话失败!")
+					}
+				})
+				/* plus.android.requestPermissions(
+					["android.permission.CALL_PHONE"],
+					function(resultObj) {
+						var result = 0;
+						for (var i = 0; i < resultObj.granted.length; i++) {
+							var grantedPermission = resultObj.granted[i];
+							console.log('已获取的权限:' + grantedPermission);
+							result = 1
+						}
+						for (var i = 0; i < resultObj.deniedPresent.length; i++) {
+							var deniedPresentPermission = resultObj.deniedPresent[i];
+							console.log('拒绝本次申请的权限:' + deniedPresentPermission);
+							result = 0
+						}
+						for (var i = 0; i < resultObj.deniedAlways.length; i++) {
+							var deniedAlwaysPermission = resultObj.deniedAlways[i];
+							console.log('永久拒绝申请的权限:' + deniedAlwaysPermission);
+							result = -1
+						}
+						console.log(result);
+						if(result == 1){
+							uni.makePhoneCall({
+								 phoneNumber: "10086",//电话号码
+								success(ress) {
+									console.log("拨打电话成功",JSON.stringify(ress))
+								},
+								fail(err) {
+									console.log("拨打电话失败",'err')
+								}
+							});
+						}else{
+							uni.showToast({
+								title:"请开启拨号权限",
+								icon:"error",
+							})
+						}
+					},
+					function(error) {
+						console.log('申请权限错误:' + error.code + " = " + error.message);
+					}
+				); */
+			},
 		},
 		//下拉刷新
 		onPullDownRefresh() {
@@ -164,7 +212,15 @@
 	page {
 		background-color: $pg;
 	}
-
+	.down_btn {
+		color: #f0f4f7;
+		width: 66px;
+		background-color: #3c9cff;
+		text-align: center;
+		border-radius: 10px;
+		font-size: 14px;
+		padding: 3px 5px;
+	}
 	.state {
 		margin-right: -70px;
 	}

+ 110 - 64
pages/market/one/leader/noUpOrder.vue

@@ -1,33 +1,46 @@
 <template>
 	<view>
-		<!--<view class="tab">
+		<view class="tab">
 			<u-tabs :list="tab" @click="click" :lineHeight="5"></u-tabs>
-		</view>-->
+		</view>
 		<view class="goodsList">
-			<view class="item" v-for="(item, index) in list" :key="index" @click="detail(item)">
-				<view class="title">{{ item.enterpriseName }}
-					<!--<view class="state"
-						v-if="item.finishStatus == 0">
+			<view class="item" v-for="(item, index) in list" :key="index">
+				<view class="title">{{ item.buyUserName }}
+					<view class="state" v-if="item.finishStatus == 1 && item.upStatus == 1">
+						<text class="icon">&#xe830;</text>
+						<text>未上架</text>
+					</view>
+					<view class="state" v-else-if="item.finishStatus == 1 && item.upStatus == 3">
 						<text class="icon">&#xe830;</text>
-						<text>未过卡3</text>
+						<text>已下架</text>
 					</view>
-					<view class="state"
-						v-if="item.finishStatus == 1">
+					<view class="state" v-else-if="item.finishStatus == 1 && item.upStatus == 2 && item.resaleStatus == 0">
 						<text class="icon">&#xe830;</text>
-						<text>已过卡3</text>
-					</view>-->
+						<text>未转售</text>
+					</view>
+					<view class="state" v-else>
+						<text class="icon" style="color: #13ce66">&#xe830;</text>
+						<text>已完成</text>
+					</view>
 				</view>
+				<view class="title">{{ item.phone }}</view>
 				<view class="con">
-					<view class="productName omit">{{ item.goodsNames }}</view>
-					<view class="desc omit">
-						<text>重量 {{ item.totalWeight }}{{ item.goodsUnit }}</text>
-						<text>{{ item.tradeAreaName }}</text>
+					<view style="font-size: 16px;padding-top: 7px;color: #a0a2a6;">
+						<text>订单 {{ item.tradeNo }}</text>
+					</view>
+					<view class="desc">
+						<text>{{ item.goodsNames }} {{ item.totalWeight }}{{ item.goodsUnit }}</text>
 					</view>
 					<view class="price">¥ {{ item.totalPrice }}</view>
 				</view>
 				<view class="clear"></view>
 				<view class="op">
 					<view class="date">{{ item.createTime }}</view>
+					<template v-if="item.phone">
+						<!-- <view class="state" style="color: #3c9cff;" @click="callNumber(item.phone)">拨打电话</view> -->
+						<a :href="'tel:'+item.phone" class="an down_btn">拨打电话</a>
+					</template>
+
 				</view>
 			</view>
 			<view class="loading" v-if="loadMore"><u-loadmore :status="loadMore ? 'loading' : 'nomore'" /></view>
@@ -37,33 +50,41 @@
 </template>
 
 <script>
+	import permision from "@/js_sdk/wa-permission/permission.js"
 	export default {
 		data() {
 			return {
-				user: {},
 				tab: [{
 						name: '全部',
 						peopleConfirmStatus: '', //边民确认状态
 						cooperEntrustStatus: '', //互助委托申报确认状态
-						applyConfirmStatus: '', //进口申报确认状态
-						finishStatus: '', //订单完成状态
-						resaleStatus: '' //订单转售状态
+						applyConfirmStatus: '',  //进口申报确认状态
+						finishStatus: 1, //订单完成状态
+						upStatus: '', 	  //订单上架状态(1=未上架,2=上架,3=已下架)
+						resaleStatus: '', //订单转售状态
+						Sxb010Status: '', //扣款回执状态
 					},
 					{
-						name: '未过卡3',
-						finishStatus: 0,
+						name: '未上架',
+						finishStatus: 1,
+						upStatus: 1,
 					},
 					{
-						name: '已过卡3',
+						name: '已下架',
 						finishStatus: 1,
-
+						upStatus: 3,
 					},
+					{
+						name: '未转售',
+						finishStatus: 1,
+						upStatus: 2,
+						resaleStatus: 0
+					}
 				],
 				param: {
 					pageNo: 1,
 					pageSize: 10,
-					finishStatus: 1,
-					upStatus: 1
+					finishStatus: 1
 				},
 				list: [],
 				loadMore: true,
@@ -71,38 +92,6 @@
 				flag: '',
 			};
 		},
-		onLoad() {
-			this.user = this.getUser()
-			uni.$on('face', res => {
-				if (this.flag == 1) {
-					this.http.request({
-						url: '/level-one-server/app/TbOrder/confirmOrder',
-						data: {
-							orderId: this.id
-						},
-						success: resp => {
-							uni.showToast({
-								title: '订单确认成功'
-							});
-							this.refresh();
-						}
-					});
-				} else if (this.flag == 2) {
-					this.http.request({
-						url: '/level-one-server/app/TbOrder/applyOrder',
-						data: {
-							orderId: this.id
-						},
-						success: resp => {
-							uni.showToast({
-								title: '进口申报确认成功'
-							});
-							this.refresh();
-						}
-					});
-				}
-			})
-		},
 		onShow() {
 			this.getData();
 		},
@@ -129,20 +118,69 @@
 				this.param.finishStatus = e.finishStatus;
 				this.param.resaleStatus = e.resaleStatus;
 				this.param.upStatus = e.upStatus;
+				this.param.Sxb010Status = e.Sxb010Status;
 				this.refresh();
 			},
-			detail(item) {
-				uni.navigateTo({
-					url: '/pages/market/one/leader/detail?id=' + item.id
-				});
-			},
 			// 刷新数据
 			refresh() {
 				this.loadMore = true;
 				this.param.pageNo = 1;
 				this.list = [];
 				this.getData();
-			}
+			},
+			callNumber(phone) {
+				permision.gotoAppPermissionSetting();
+				uni.makePhoneCall({
+					phoneNumber: phone,
+					success: function(ress) {
+						console.log("拨打电话成功!",JSON.stringify(ress))
+					},
+					fail: function() {
+						console.log("拨打电话失败!")
+					}
+				})
+				/* plus.android.requestPermissions(
+					["android.permission.CALL_PHONE"],
+					function(resultObj) {
+						var result = 0;
+						for (var i = 0; i < resultObj.granted.length; i++) {
+							var grantedPermission = resultObj.granted[i];
+							console.log('已获取的权限:' + grantedPermission);
+							result = 1
+						}
+						for (var i = 0; i < resultObj.deniedPresent.length; i++) {
+							var deniedPresentPermission = resultObj.deniedPresent[i];
+							console.log('拒绝本次申请的权限:' + deniedPresentPermission);
+							result = 0
+						}
+						for (var i = 0; i < resultObj.deniedAlways.length; i++) {
+							var deniedAlwaysPermission = resultObj.deniedAlways[i];
+							console.log('永久拒绝申请的权限:' + deniedAlwaysPermission);
+							result = -1
+						}
+						console.log(result);
+						if(result == 1){
+							uni.makePhoneCall({
+								 phoneNumber: "10086",//电话号码
+								success(ress) {
+									console.log("拨打电话成功",JSON.stringify(ress))
+								},
+								fail(err) {
+									console.log("拨打电话失败",'err')
+								}
+							});
+						}else{
+							uni.showToast({
+								title:"请开启拨号权限",
+								icon:"error",
+							})
+						}
+					},
+					function(error) {
+						console.log('申请权限错误:' + error.code + " = " + error.message);
+					}
+				); */
+			},
 		},
 		//下拉刷新
 		onPullDownRefresh() {
@@ -165,7 +203,15 @@
 	page {
 		background-color: $pg;
 	}
-
+	.down_btn {
+		color: #f0f4f7;
+		width: 66px;
+		background-color: #3c9cff;
+		text-align: center;
+		border-radius: 10px;
+		font-size: 14px;
+		padding: 3px 5px;
+	}
 	.state {
 		margin-right: -70px;
 	}

+ 3 - 3
pages/personal/my.vue

@@ -34,9 +34,9 @@
 				<input class="r" v-model="person.address" :disabled="enable" />
 			</view>
 		</view>
-		<view>
+		<!-- <view>
 			<button class="btn" @click="edit">编辑资料</button>
-		</view>
+		</view> -->
 	</view>
 </template>
 
@@ -104,7 +104,7 @@
 	page {
 		background-color: $pg;
 	}
-	
+
 	.con{
 		background-color: #fff;
 		margin: 20px;

+ 5 - 2
pages/personal/personal.vue

@@ -24,7 +24,10 @@
 				<text class="icon">&#xe78d;</text>
 				<text>你还未人脸认证,请先人脸认证</text>
 				<text class="icon" style="float: right">&#xe8f2;</text>
-
+			</view>
+			<view class="message _info" v-if="(user.userType == 1 || user.userType == 2) && user.face == 1">
+				<text class="icon">&#xe78d;</text>
+				<text>人脸认证成功</text>
 			</view>
 			<!--用户信息-->
 			<view class="user">
@@ -385,4 +388,4 @@
 		background-color: white;
 		color: #f44336;
 	}
-</style>
+</style>