目录


1、前端将参数转换为JSON字符串

            let ids = new Array();
            ...
            this.$request({
                url: this.BASE_URL + '/api/user/receive',
                method: 'POST',
                isAuth: true,
                data: {
                    ids: JSON.stringify(ids)
                }
            })

2、后端将字符串转换为php关联数组

$ids = json_decode(request()->post('ids'), true);
©本文为原创文章,著作权归博主所有,转载请联系博主获得授权

发表评论