Browse Source

微信支付appId配置

qzy 4 weeks ago
parent
commit
990f761f59
3 changed files with 36 additions and 87 deletions
  1. 1 1
      common/style.scss
  2. 5 3
      manifest.json
  3. 30 83
      pages/personal/personal.vue

+ 1 - 1
common/style.scss

@@ -155,7 +155,7 @@
 	border-radius: 8px;
 	overflow: hidden;
 	.s_item {
-		padding: 5px;
+		padding: 2px 5px;
 		background-color: white;
 		color: $font-c;
 		overflow: hidden;

+ 5 - 3
manifest.json

@@ -20,7 +20,9 @@
             "delay" : 0
         },
         /* 模块配置 */
-        "modules" : {},
+        "modules" : {
+            "Payment" : {}
+        },
         /* 应用发布信息 */
         "distribute" : {
             /* android打包配置 */
@@ -61,8 +63,8 @@
             "sdkConfigs" : {
                 "payment" : {
                     "weixin" : {
-                        "__platform__" : [ "ios", "android" ],
-                        "appid" : "",
+                        "__platform__" : [ "android" ],
+                        "appid" : "wx0daaef365288a0db",
                         "UniversalLinks" : ""
                     }
                 },

+ 30 - 83
pages/personal/personal.vue

@@ -30,7 +30,7 @@
 				<text>人脸已认证<text style="color: blue;margin-left: 5px;"></text></text>
 			</view>
 			<!--用户信息-->
-			<view class="user">
+			<view class="user" style="display: flex;">
 				<image src="../../static/icon/user.png" mode="widthFix" class="head"></image>
 				<view class="con">
 					<view class="nickName omit">{{user.name}}({{ user.phone }})</view>
@@ -40,7 +40,8 @@
 					<view class="tag" v-if="user.userType == 4">司机</view>
 					<view class="tag" v-if="user.userType == 5">商户</view>
 					<view class="tag" v-if="user.userType == 6">合作社</view>
-					<view class="tag" style="margin-left: 0.5rem;" v-if="user.userType == 1" @click="go('/pages/wallet/wallet')">服务点数: {{ user.wallet }}</view>
+					<view class="tag" style="margin-left: 0.5rem;" v-if="user.userType == 1||user.userType == 2"
+						@click="go('/pages/wallet/wallet')">服务点数: {{ user.wallet }}</view>
 				</view>
 				<view class="clear"></view>
 			</view>
@@ -83,17 +84,16 @@
 				<view class="s_item ">
 					<text class="icon ic">&#xe622;</text>
 					<text class="title">APP版本 {{version}}</text>
-
 				</view>
 			</view>
 			<button class="btn exit" @click="exitLogin()">退出登录</button>
 			<button class="btn exit" @click="cancelAccount()">注销账号</button>
 		</view>
 		<view class="version">
-		<view>
-			<view>Copyright@2024-2030</view>
-			<view>天保国际物流投资有限公司版权所有</view>
-		</view>
+			<view>
+				<view>Copyright@2024-2030</view>
+				<view>天保国际物流投资有限公司版权所有</view>
+			</view>
 		</view>
 	</view>
 </template>
@@ -138,16 +138,18 @@
 					uni.setStorageSync('info', this.user);
 				}
 			});
-		};
-		if(this.user.userType===1){
-			this.http.request({
-				url: '/level-one-server/app/TbPeople/getById',
-				data: { id: this.user.fkId },
-				success: res => {
-					this.user.wallet = res.data.data.wallet;
-					uni.setStorageSync('info', this.user);
-				}
-			});
+			if (this.user.userType === 1) {
+				this.http.request({
+					url: '/level-one-server/app/TbPeople/getById',
+					data: {
+						id: this.user.fkId
+					},
+					success: res => {
+						this.user.wallet = res.data.data.wallet;
+						uni.setStorageSync('info', this.user);
+					}
+				});
+			}
 		},
 		methods: {
 			makePhoneCall(phone) {
@@ -181,6 +183,15 @@
 					});
 				}
 			},
+			
+			wallet() {
+				if (!this.hasAuth() && this.user.userType == 1) {
+					uni.navigateTo({
+						url: '/pages/wallet/wallet'
+					});
+					return;
+				}
+			},
 			go(url) {
 				if (!this.hasAuth() && this.user.userType == 5) {
 					uni.navigateTo({
@@ -248,72 +259,8 @@
 					}
 				});
 			}
-		}
-	};
-		}
 	},
-	methods: {
-		order() {
-			if (!this.hasAuth()) {
-				uni.navigateTo({ url: '/pages/authentication/index' });
-				return;
-			}
-			//组长
-			if (this.user.userType == 2) {
-				uni.navigateTo({ url: 'user' });
-			}
-			//外籍商户
-			if (this.user.userType == 5) {
-				uni.navigateTo({ url: '/pages/market/one/merchant/order/list' });
-			}
-			//收购商
-			if (this.user.userType == 3) {
-				uni.navigateTo({ url: '/pages/market/two/purchaser/order/list' });
-			}
-		},
-		wallet() {
-			if (!this.hasAuth() && this.user.userType == 1) {
-				uni.navigateTo({ url: '/pages/wallet/wallet' });
-				return;
-			}
-		},
-		go(url) {
-			if (!this.hasAuth() && this.user.userType == 5) {
-				uni.navigateTo({ url: '/pages/authentication/index' });
-				return;
-			}
-			if (!this.hasAuth() && this.user.userType == 3) {
-				uni.navigateTo({ url: '/pages/authentication/purchaser/index' });
-				return;
-			}
-			uni.navigateTo({ url: url });
-		},
-		exitLogin() {
-			let param = {
-				appUserId: this.getUser().id
-			};
-			uni.showModal({
-				title: '提示',
-				content: '确定注销登录?',
-				success: res => {
-					if (res.confirm) {
-						uni.removeStorageSync('token');
-						uni.removeStorageSync('info');
-						uni.removeStorageSync('menu');
-						uni.redirectTo({ url: '/pages/login/login' });
-						this.http.request({
-							url: '/sp-admin/app/AppUser/logout',
-							data: param,
-							success: res => {
-
-							}
-						});
-					}
-				}
-			});
-		}
-	}
-};
+	};
 </script>
 
 <style lang="scss">
@@ -389,4 +336,4 @@
 		color: #888484;
 		text-align: center;
 	}
-</style>
+</style>