Quellcode durchsuchen

Signed-off-by: liuboyan <632697560@qq.com>
配置

liuboyan vor 4 Jahren
Ursprung
Commit
edbfca608e
3 geänderte Dateien mit 53 neuen und 34 gelöschten Zeilen
  1. 4 8
      manifest.json
  2. 8 2
      pages/index/index.vue
  3. 41 24
      pages/index/register.vue

+ 4 - 8
manifest.json

@@ -1,5 +1,5 @@
 {
-    "name" : "千家地",
+    "name" : "千家地商户端",
     "appid" : "__UNI__ECFC1F2",
     "description" : "千家地用户端",
     "versionName" : "1.0.0",
@@ -11,8 +11,7 @@
         /* 5+App特有相关 */
         "modules" : {
             "Payment" : {},
-            "OAuth" : {},
-            "Messaging" : {}
+            "OAuth" : {}
         },
         /* 模块配置 */
         "distribute" : {
@@ -37,14 +36,11 @@
                     "<uses-permission android:name=\"android.permission.READ_CONTACTS\"/>",
                     "<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
                     "<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
-                    "<uses-permission android:name=\"android.permission.READ_SMS\"/>",
                     "<uses-permission android:name=\"android.permission.RECORD_AUDIO\"/>",
-                    "<uses-permission android:name=\"android.permission.SEND_SMS\"/>",
                     "<uses-permission android:name=\"android.permission.VIBRATE\"/>",
                     "<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
                     "<uses-permission android:name=\"android.permission.WRITE_CONTACTS\"/>",
-                    "<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>",
-                    "<uses-permission android:name=\"android.permission.WRITE_SMS\"/>"
+                    "<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
                 ]
             },
             "ios" : {},
@@ -61,7 +57,7 @@
                 "oauth" : {
                     "weixin" : {
                         "appid" : "wx0c8f390063292c1f",
-                        "appsecret" : "",
+                        "appsecret" : "a76551aa0e55d3717285180ee4017160",
                         "UniversalLinks" : ""
                     }
                 }

+ 8 - 2
pages/index/index.vue

@@ -81,13 +81,19 @@
 							headImage: res.extra.auth2.merchantImg,
 							userName: res.data.name,
 							userId: res.data.userId,
-							isMaster: res.extra.auth.isMaster
+							isMaster: res.extra.auth.isMaster,
+							registerFlag: res.extra.auth.registerFlag,
+							auditState: res.extra.auth.auditState,
 						}
 					})
-					if (res.extra.auth.registerFlag == 1) {
+					if (res.extra.auth.registerFlag == 1 && res.extra.auth.auditState == 2) {
 						uni.switchTab({
 							url: '/pages/index/home'
 						})
+					} else if (res.extra.auth.registerFlag == 1 && res.extra.auth.auditState != 2) {
+						uni.navigateTo({
+							url: '/pages/index/registerState'
+						})
 					} else {
 						uni.navigateTo({
 							url: '/pages/index/authorize'

+ 41 - 24
pages/index/register.vue

@@ -8,29 +8,29 @@
 					 @on-error="uploadError" max-count="1"></u-upload>
 				</view>
 			</u-cell-item>
-			<u-cell-item title="请上传店铺主图(0/3)" :arrow="false">
+			<u-cell-item title="请上传店铺主图(0/3)" :arrow="false" class="all-width">
 				<view slot="label">
 					<u-upload :action="uploadUrl" :file-list="defaultList2" :form-data="uploadData" @on-success="uploadSuccess"
 					 @on-error="uploadError" @on-remove="uploadRemove" max-count="3"></u-upload>
 				</view>
 			</u-cell-item>
-			<u-cell-item title="请上传身份证正反面" :arrow="false">
+			<u-cell-item title="请上传身份证正反面" :arrow="false" class="all-width">
 				<view slot="label" class="id-card-box">
 					<u-upload :action="uploadUrl" :file-list="defaultList3" :form-data="uploadData" @on-success="uploadIdCardSuccess1"
-					 @on-error="uploadError" :custom-btn="true" max-count="1">
-						<view slot="addBtn" class="id-card card-img1">拍摄正面</view>
+					 @on-error="uploadError" :custom-btn="true" max-count="1" :style="{width: cWidth + 'px'}">
+						<view slot="addBtn" class="id-card card-img1" :style="{width: cWidth + 'px'}">拍摄正面</view>
 					</u-upload>
 					<u-upload :action="uploadUrl" :file-list="defaultList4" :form-data="uploadData" @on-success="uploadIdCardSuccess2"
-					 @on-error="uploadError" :custom-btn="true" max-count="1">
-						<view slot="addBtn" class="id-card card-img1">拍摄反面</view>
+					 @on-error="uploadError" :custom-btn="true" max-count="1" :style="{width: cWidth + 'px'}">
+						<view slot="addBtn" class="id-card card-img1" :style="{width: cWidth + 'px'}">拍摄反面</view>
 					</u-upload>
 				</view>
 			</u-cell-item>
-			<u-cell-item title="请上传营业执照照片" :arrow="false">
+			<u-cell-item title="请上传营业执照照片" :arrow="false" class="all-width">
 				<view slot="label" class="license-box">
 					<u-upload :action="uploadUrl" :file-list="defaultList5" :form-data="uploadData" @on-success="uploadLicenseSuccess"
-					 @on-error="uploadError" :custom-btn="true" max-count="1">
-						<view slot="addBtn" class="license-img"></view>
+					 @on-error="uploadError" :custom-btn="true" max-count="1" class="diy-upload">
+						<image slot="addBtn" class="license-img" src="../../static/images/license-img.png"></image>
 					</u-upload>
 					<view class="license-text"> 营业执照</view>
 				</view>
@@ -59,6 +59,7 @@
 	export default {
 		data() {
 			return {
+				cWidth: 0,
 				type: '',
 				shopInfo: {
 					name: '',
@@ -90,6 +91,7 @@
 			}
 		},
 		onLoad(options) {
+			this.cWidth = (uni.upx2px(750) - 40) / 2;
 			this.uploadUrl = API.uploadFile
 			this.type = options.type
 			if (options.type == 'edit') {
@@ -225,7 +227,8 @@
 					NET.request(API.editShopRegisterInfo, {
 						...this.shopInfo,
 						address: this.shopInfo.companyAddressProvince + '-' + this.shopInfo.companyAddressCity + '-' + this.shopInfo.companyAddressDistrict,
-						companyAddress: this.shopInfo.companyAddressProvince + '-' + this.shopInfo.companyAddressCity + '-' + this.shopInfo.companyAddressDistrict,
+						companyAddress: this.shopInfo.companyAddressProvince + '-' + this.shopInfo.companyAddressCity + '-' + this.shopInfo
+							.companyAddressDistrict,
 						storeImgUrl: this.fileList.join(',')
 					}, 'PUT').then(res => {
 						this.$refs.uTips.show({
@@ -233,7 +236,7 @@
 							type: 'success',
 						})
 						setTimeout(() => {
-							uni.switchTab({
+							uni.redirectTo({
 								url: '/pages/index/registerState'
 							});
 						}, 1000)
@@ -247,7 +250,8 @@
 					NET.request(API.submitShopRegisterInfo, {
 						...this.shopInfo,
 						address: this.shopInfo.companyAddressProvince + '-' + this.shopInfo.companyAddressCity + '-' + this.shopInfo.companyAddressDistrict,
-						companyAddress: this.shopInfo.companyAddressProvince + '-' + this.shopInfo.companyAddressCity + '-' + this.shopInfo.companyAddressDistrict,
+						companyAddress: this.shopInfo.companyAddressProvince + '-' + this.shopInfo.companyAddressCity + '-' + this.shopInfo
+							.companyAddressDistrict,
 						storeImgUrl: this.fileList.join(',')
 					}, 'POST').then(res => {
 						this.$refs.uTips.show({
@@ -255,7 +259,7 @@
 							type: 'success',
 						})
 						setTimeout(() => {
-							uni.navigateTo({
+							uni.redirectTo({
 								url: '/pages/index/registerState'
 							});
 						}, 1000)
@@ -299,13 +303,12 @@
 				display: flex;
 
 				.id-card {
-					width: 164px;
 					height: 140px;
+					margin-right: 10px;
 					box-sizing: border-box;
 					padding-top: 110px;
-					margin-right: 14px;
 					background-color: #51A539;
-					background-size: 164px 110px;
+					background-size: 100% 110px;
 					background-position: center top;
 					background-repeat: no-repeat;
 					border-radius: 6px;
@@ -325,30 +328,36 @@
 				}
 
 				/deep/.u-list-item {
-					width: 164px !important;
+					width: 100% !important;
 					height: 110px !important;
 				}
 			}
 
 			.license-box {
+				width: 100%;
+				height: 175px;
+				position: relative;
+
+				.diy-upload {
+					width: 100%;
+					height: 145px;
+					position: absolute;
+				}
 
 				.license-img {
-					width: 345px;
+					width: 100%;
 					height: 145px;
-					background-size: 345px 145px;
-					background-position: center top;
-					background-repeat: no-repeat;
-					background-image: url(@/static/images/license-img.png);
+					position: absolute;
 				}
 
 				/deep/.u-list-item {
-					width: 345px !important;
+					width: 100% !important;
 					height: 145px !important;
 				}
 			}
 
 			.license-text {
-				width: 345px;
+				width: 100%;
 				height: 30px;
 				margin-top: 5px;
 				font-size: 15px;
@@ -356,6 +365,8 @@
 				color: #656565;
 				line-height: 30px;
 				text-align: center;
+				position: relative;
+				top: 145px;
 			}
 		}
 
@@ -375,4 +386,10 @@
 			// }
 		}
 	}
+
+	.all-width {
+		/deep/.u-cell_title {
+			width: 100% !important;
+		}
+	}
 </style>