Просмотр исходного кода

Merge pull request #645 from jetlinks/next-wzy

Next wzy
hear 3 лет назад
Родитель
Сommit
5c37378868

+ 2 - 2
src/pages/device/Product/Detail/BaseInfo/index.tsx

@@ -257,11 +257,11 @@ const BaseInfo = (props: BaseInfoProps) => {
         </Descriptions.Item>
         <Descriptions.Item
           label={intl.formatMessage({
-            id: 'pages.device.productDetail.updateTime',
+            id: 'pages.device.productDetail.modifyTime',
             defaultMessage: '更新时间',
           })}
         >
-          {getDateFormat(productModel.current?.updateTime)}
+          {getDateFormat(productModel.current?.modifyTime)}
         </Descriptions.Item>
         <Descriptions.Item
           span={3}

+ 1 - 0
src/pages/device/Product/typings.d.ts

@@ -29,6 +29,7 @@ export type ProductItem = {
   photoUrl?: string;
   storePolicy?: string;
   accessProvider?: string;
+  modifyTime?: string;
 };
 
 export type ConfigProperty = {

+ 4 - 3
src/pages/oauth/index.tsx

@@ -65,10 +65,11 @@ const Oauth = () => {
         // setLoading(false);
       });
   };
-  const goOAuth2 = async () => {
-    const res = await Service.getOAuth2(params);
+  const goOAuth2 = async (data?: any) => {
+    const res = await Service.getOAuth2(params || data);
     if (res.status === 200) {
       window.location.href = res.result;
+      console.log(res.result);
     } else {
       getCode();
     }
@@ -133,7 +134,7 @@ const Oauth = () => {
       setIsLogin(true);
       initApplication(data.client_id || params.client_id);
       if (data.internal === 'true' || internal === 'true') {
-        goOAuth2();
+        goOAuth2(data);
       }
     } else if (res.status === 401) {
       setIsLogin(false);