quanwei
2025-11-28 3ea53e61cc23fdb3ddf8b38a199ca60a6da8c407
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
<?php
 
namespace app\common\enum\settings;
 
use MyCLabs\Enum\Enum;
use app\common\enum\order\OrderPayTypeEnum;
 
/**
 * 支付方式枚举类
 */
class PlatformEnum extends Enum
{
    // 纯h5
    const H5 = 'h5';
    // 公众号
    const MP = 'mp';
    // 微信小程序
    const WX = 'wx';
    // IOS
    const IOS = 'ios';
    // ANDROID
    const ANDROID = 'android';
    /**
     * 获取枚举数据
     */
    public static function data()
    {
        return [
            self::H5 => [
                'name' => 'H5',
                'value' => self::H5,
                'pay_type' => array_keys(OrderPayTypeEnum::data())
            ],
            self::MP => [
                'name' => '微信公众号',
                'value' => self::MP,
                'pay_type' => array_keys(OrderPayTypeEnum::data())
            ],
            self::WX => [
                'name' => '微信小程序',
                'value' => self::WX,
                'pay_type' => array_keys(OrderPayTypeEnum::data())
            ],
            self::IOS => [
                'name' => 'ios',
                'value' => self::IOS,
                'pay_type' => array_keys(OrderPayTypeEnum::data())
            ],
            self::ANDROID => [
                'name' => 'android',
                'value' => self::ANDROID,
                'pay_type' => array_keys(OrderPayTypeEnum::data())
            ],
        ];
    }
}