Qukatie hace 4 semanas
padre
commit
c64c91f9f5
Se han modificado 3 ficheros con 8 adiciones y 8 borrados
  1. 1 1
      api/user.js
  2. 2 2
      pages/home/insurance/index.vue
  3. 5 5
      pages/login/index.vue

+ 1 - 1
api/user.js

@@ -65,7 +65,7 @@ const wechartToken = (params) => {
 		method: 'POST',
 		params: {
 			...params,
-			grant_type: "password",
+			grant_type: "wechat",
 			scope: "all",
 			type: 'account'
 		}

+ 2 - 2
pages/home/insurance/index.vue

@@ -29,7 +29,7 @@
 								<view class="">
 									轮胎:{{item.tireQuantity||0}}条
 								</view>
-								
+
 							</view>
 							<view class="list-item">
 								<view style="">
@@ -278,4 +278,4 @@
 			}
 		}
 	}
-</style>
+</style>

+ 5 - 5
pages/login/index.vue

@@ -96,19 +96,19 @@
 											telCode: e.detail.code,
 											loginCode: res.code,
 										}).then(rest => {
+                      console.info('rest----', rest)
 											uni.setStorageSync('phoneInfo',rest.data.phoneNumber)
 											uni.showLoading({
 												title: '登录中',
 												mask: true
 											});
 											this_.$u.api.wechartToken({
-												username: rest.data.phoneNumber,
+												phone: rest.data.phoneNumber,
 												union_id: rest.data.unionid,
 												open_id: rest.data.openid,
 												storeId: '1995319740020559873',
-												applets_id: uni.getAccountInfoSync()
-													.miniProgram.appId,
-												password: md5('123456')
+												applets_id: uni.getAccountInfoSync().miniProgram.appId,
+												// password: md5('123456')
 											}).then(data => {
 												uni.hideLoading();
 												uni.showToast({
@@ -303,4 +303,4 @@
 		height: 0;
 		content: '\20';
 	}
-</style>
+</style>