shenwu há 7 meses atrás
pai
commit
043031cac9

+ 31 - 0
src/pages/distribution/miniprogram/weChatInfo/formConfig.tsx

@@ -100,11 +100,42 @@ function formConfig(
     },
     {
       title: '小程序版本号',
+      tooltip: "线上版本号",
       dataIndex: 'appVersion',
       formItemProps: {
         style: { marginBottom: 10 },
       },
     },
+    {
+      valueType: 'dependency',
+      name: ['appVersion'],
+      columns: ({ appVersion }) => {
+        return [
+          {
+            title: 'ios支付版本号',
+            tooltip: "ios的特殊性,此版本号与IOS支付模块关联,小程序版本号<=此版本号IOS才会出现支付功能,(微信)小程序发布线上后必须设置",
+            dataIndex: 'iosPayment',
+            formItemProps: {
+              style: { marginBottom: 10 },
+              rules: [
+                {
+                  validator: (_, value) => {
+                    if (!value || !appVersion) {
+                      return Promise.resolve();
+                    }
+
+                    if (value > appVersion) {
+                      return Promise.reject(new Error('支付版本号不能大于小程序版本号'));
+                    }
+                    return Promise.resolve();
+                  },
+                },
+              ],
+            },
+          },
+        ]
+      }
+    },
     {
       dataIndex: 'configParamList',
       valueType: 'formList',

+ 13 - 1
src/pages/distribution/miniprogram/weChatInfo/tableConfig.tsx

@@ -1,5 +1,5 @@
 import { ProColumns } from '@ant-design/pro-components';
-import { Button, Popconfirm, Space, Switch, Tooltip } from 'antd';
+import { Tag, Button, Popconfirm, Space, Switch, Tooltip } from 'antd';
 
 export const columns = (
   edit: (b: boolean, v: any) => void,
@@ -60,6 +60,18 @@ export const columns = (
       align: 'center',
       hideInSearch: true,
     },
+    {
+      title: 'ios支付版本号',
+      width: 80,
+      ellipsis: true,
+      align: 'center',
+      tooltip: "ios的特殊性,此版本号与IOS支付模块关联,小程序版本号<=此版本号IOS才会出现支付功能,(微信)小程序发布线上后必须设置",
+      dataIndex: 'iosPayment',
+      hideInSearch: true,
+      render:(_,d)=>{
+        return d.iosPayment ?<Tag color="processing"  bordered={false}>{d.iosPayment}</Tag>  : <Tag color="error"  bordered={false}>IOS无法支付</Tag>
+      }
+    },
     {
       title: '小程序配置信息(json)',
       dataIndex: 'configParamList',