<?php namespace app\index\controller; use app\common\controller\Frontend; use fast\DbAdapter; use fast\WXBizDataCrypt; use think\Db; use think\Config; use addons\alisms\library\Alisms; class Index extends Frontend{ protected $noNeedLogin = '*'; protected $noNeedRight = '*'; protected $layout = ''; /** * 获取媒体列表接口 * 用于相册列表页展示所有图片及基本信息 */ public function getMediaList() { $adapter = new DbAdapter(); $params = $adapter->processParametersFromConfig(); try { // 3. 查询媒体列表,只获取状态正常的数据 $mediaList = Db::name('chedai_media') ->order('ctime', 'desc') // 按创建时间倒序排列 ->select(); // 4. 处理图片路径(如果需要) foreach ($mediaList as &$item) { // 可以在这里对图片路径进行处理,如拼接完整URL等 // $item['url_image'] = $this->request->domain() . $item['url_image']; } // 5. 返回成功结果 return $adapter->success($mediaList); } catch (Exception $e) { // 6. 捕获异常并返回错误信息 return $adapter->error(403, '获取媒体列表失败:' . $e->getMessage()); } } }
getUserInfo() { this.$http.postRequest('user/getUserInfo', { token: uni.getStorageSync('token') }) .then(res => { if (res.code == 200) { this.user = res.data } else { uni.showToast({ title: res.msg, icon: 'none' }); } }) } 涉及上传图片的示例 chooseImage() { uni.chooseImage({ count: 1, sizeType: ['compressed'], sourceType: ['album', 'camera'], success: (res) => { const tempFilePaths = res.tempFilePaths[0]; var that = this; uni.uploadFile({ url: this.siteroot + '/Index/index/upload', filePath: res.tempFilePaths[0], fileType: 'image', name: 'file', success: (uploadRes) => { const resData = JSON.parse(uploadRes.data); if (resData.code == 200) { that.battleImage = resData.data; } else { uni.showToast({ title: resData.msg || '上传失败', icon: 'none' }); } }, }); } }); },
/* Navicat Premium Data Transfer Source Server : 分销商城 Source Server Type : MySQL Source Server Version : 50650 (5.6.50-log) Source Host : 8.141.13.49:3306 Source Schema : fenxiao_fraise_s Target Server Type : MySQL Target Server Version : 50650 (5.6.50-log) File Encoding : 65001 Date: 25/11/2025 10:09:09 */ SET NAMES utf8mb4; SET FOREIGN_KEY_CHECKS = 0; -- ---------------------------- -- Table structure for ims_fx_address -- ---------------------------- DROP TABLE IF EXISTS `ims_fx_address`; CREATE TABLE `ims_fx_address` ( `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '地址ID(主键)', `user_id` bigint(20) unsigned NOT NULL COMMENT '用户ID', `receiver_name` varchar(50) NOT NULL COMMENT '收货人', `receiver_phone` varchar(20) NOT NULL COMMENT '手机号', `province` varchar(20) NOT NULL COMMENT '省份', `city` varchar(20) NOT NULL COMMENT '城市', `district` varchar(20) NOT NULL COMMENT '区县', `detail_address` varchar(255) NOT NULL COMMENT '详细地址', `lng` decimal(10,6) DEFAULT NULL COMMENT '经度', `lat` decimal(10,6) DEFAULT NULL COMMENT '纬度', `is_default` tinyint(4) NOT NULL DEFAULT '0' COMMENT '是否默认:1-是', `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8mb4 COMMENT='用户地址表'; -- ---------------------------- -- Table structure for ims_fx_advert -- ---------------------------- DROP TABLE IF EXISTS `ims_fx_advert`; CREATE TABLE `ims_fx_advert` ( `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '广告ID(主键)', `img_url` varchar(255) NOT NULL COMMENT '图片地址', `link_url` varchar(255) DEFAULT NULL COMMENT '跳转地址', `row_num` tinyint(4) NOT NULL COMMENT '所在行数', `col_num` tinyint(4) NOT NULL COMMENT '所在列数', `status` tinyint(4) NOT NULL DEFAULT '1' COMMENT '状态:1-启用', PRIMARY KEY (`id`), UNIQUE KEY `idx_row_col` (`row_num`,`col_num`) ) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8mb4 COMMENT='首页广告图表'; -- ---------------------------- -- Table structure for ims_fx_banner -- ---------------------------- DROP TABLE IF EXISTS `ims_fx_banner`; CREATE TABLE `ims_fx_banner` ( `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '轮播图ID(主键)', `img_url` varchar(255) NOT NULL COMMENT '图片地址', `link_url` varchar(255) DEFAULT NULL COMMENT '跳转地址', `sort` int(11) NOT NULL DEFAULT '0' COMMENT '排序', `status` tinyint(4) NOT NULL DEFAULT '1' COMMENT '状态:1-启用', PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COMMENT='首页轮播图表'; -- ---------------------------- -- Table structure for ims_fx_commission_record -- ---------------------------- DROP TABLE IF EXISTS `ims_fx_commission_record`; CREATE TABLE `ims_fx_commission_record` ( `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '佣金记录ID(主键)', `user_id` bigint(20) unsigned NOT NULL COMMENT '邀请人ID', `order_no` varchar(32) NOT NULL COMMENT '关联订单号', `commission_amount` decimal(10,2) NOT NULL COMMENT '佣金金额', `status` tinyint(4) NOT NULL DEFAULT '1' COMMENT '状态:1-已到账,2-已扣除', `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COMMENT='佣金记录表'; -- ---------------------------- -- Table structure for ims_fx_invite_record -- ---------------------------- DROP TABLE IF EXISTS `ims_fx_invite_record`; CREATE TABLE `ims_fx_invite_record` ( `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '邀请记录ID(主键)', `inviter_id` bigint(20) unsigned NOT NULL COMMENT '邀请人ID', `invitee_id` bigint(20) unsigned NOT NULL COMMENT '被邀请人ID', `is_valid` tinyint(4) NOT NULL DEFAULT '0' COMMENT '是否有效下线:1-是', `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '邀请时间', PRIMARY KEY (`id`), UNIQUE KEY `idx_invitee_id` (`invitee_id`) ) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COMMENT='邀请记录表'; -- ---------------------------- -- Table structure for ims_fx_notice -- ---------------------------- DROP TABLE IF EXISTS `ims_fx_notice`; CREATE TABLE `ims_fx_notice` ( `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '公告ID(主键)', `title` varchar(100) NOT NULL COMMENT '标题', `content` varchar(500) NOT NULL COMMENT '简短内容', `full_content` text COMMENT '完整内容', `sort` int(11) NOT NULL DEFAULT '0' COMMENT '排序', `status` tinyint(4) NOT NULL DEFAULT '1' COMMENT '状态:1-启用', PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COMMENT='公告表'; -- ---------------------------- -- Table structure for ims_fx_order -- ---------------------------- DROP TABLE IF EXISTS `ims_fx_order`; CREATE TABLE `ims_fx_order` ( `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '订单ID(主键)', `order_no` varchar(32) NOT NULL COMMENT '订单编号', `user_id` bigint(20) unsigned NOT NULL COMMENT '用户ID', `product_id` bigint(20) unsigned NOT NULL COMMENT '商品ID', `spec_id` bigint(20) unsigned NOT NULL COMMENT '规格ID(关联ims_fx_product_spec.id)', `product_name` varchar(100) NOT NULL COMMENT '商品名称', `product_img` varchar(255) NOT NULL COMMENT '商品图片', `spec_name` varchar(50) DEFAULT '默认规格' COMMENT '商品规格', `price` decimal(10,2) NOT NULL COMMENT '商品单价', `quantity` int(11) NOT NULL DEFAULT '1' COMMENT '购买数量', `total_amount` decimal(10,2) NOT NULL COMMENT '订单总金额', `receiver_name` varchar(50) NOT NULL COMMENT '收货人', `receiver_phone` varchar(20) NOT NULL COMMENT '手机号', `receiver_address` varchar(255) NOT NULL COMMENT '收货地址', `order_status` tinyint(4) NOT NULL COMMENT '状态:1-待付款,2-待发货,3-待收货,4-已完成,5-已取消', `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `discount_amount` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '折扣金额', `pay_amount` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '实付金额', `pay_type` varchar(20) DEFAULT '' COMMENT '支付方式(wechat/alipay)', `remark` varchar(500) DEFAULT '' COMMENT '订单备注', PRIMARY KEY (`id`), UNIQUE KEY `idx_order_no` (`order_no`) ) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8mb4 COMMENT='订单表(简化版)'; -- ---------------------------- -- Table structure for ims_fx_order_goods -- ---------------------------- DROP TABLE IF EXISTS `ims_fx_order_goods`; CREATE TABLE `ims_fx_order_goods` ( `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键ID', `order_no` varchar(32) NOT NULL COMMENT '关联订单编号(关联ims_fx_order.order_no)', `product_id` bigint(20) unsigned NOT NULL COMMENT '商品ID', `spec_id` bigint(20) unsigned NOT NULL COMMENT '规格ID', `product_name` varchar(100) NOT NULL COMMENT '商品名称', `product_img` varchar(255) NOT NULL COMMENT '商品图片', `spec_name` varchar(50) DEFAULT '默认规格' COMMENT '规格名称', `price` decimal(10,2) NOT NULL COMMENT '商品单价', `quantity` int(11) NOT NULL DEFAULT '1' COMMENT '购买数量', `subtotal` decimal(10,2) NOT NULL COMMENT '商品小计金额', PRIMARY KEY (`id`), KEY `idx_order_no` (`order_no`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='订单商品关联表(一个订单对应多个商品)'; -- ---------------------------- -- Table structure for ims_fx_product -- ---------------------------- DROP TABLE IF EXISTS `ims_fx_product`; CREATE TABLE `ims_fx_product` ( `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '商品ID(主键)', `name` varchar(100) NOT NULL COMMENT '商品名称', `cover_img` varchar(255) NOT NULL COMMENT '封面图', `price` decimal(10,2) NOT NULL COMMENT '售价', `original_price` decimal(10,2) DEFAULT NULL COMMENT '原价', `sales` int(11) NOT NULL DEFAULT '0' COMMENT '已售数量', `stock` int(11) NOT NULL DEFAULT '0' COMMENT '库存', `category_id` bigint(20) unsigned NOT NULL COMMENT '分类ID', `subtitle` varchar(255) DEFAULT '' COMMENT '副标题', `is_hot` tinyint(4) NOT NULL DEFAULT '0' COMMENT '是否热门:1-是', `status` tinyint(4) NOT NULL DEFAULT '1' COMMENT '状态:1-上架', `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=86 DEFAULT CHARSET=utf8mb4 COMMENT='商品表'; -- ---------------------------- -- Table structure for ims_fx_product_category -- ---------------------------- DROP TABLE IF EXISTS `ims_fx_product_category`; CREATE TABLE `ims_fx_product_category` ( `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '分类ID(主键)', `name` varchar(50) NOT NULL COMMENT '分类名称', `parent_id` bigint(20) unsigned DEFAULT '0' COMMENT '父分类ID(0为一级)', `sort` int(11) NOT NULL DEFAULT '0' COMMENT '排序', `status` tinyint(4) NOT NULL DEFAULT '1' COMMENT '状态:1-启用', PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=utf8mb4 COMMENT='商品分类表'; -- ---------------------------- -- Table structure for ims_fx_product_collection -- ---------------------------- DROP TABLE IF EXISTS `ims_fx_product_collection`; CREATE TABLE `ims_fx_product_collection` ( `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '收藏ID(主键)', `user_id` bigint(20) unsigned NOT NULL COMMENT '用户ID', `product_id` bigint(20) unsigned NOT NULL COMMENT '商品ID', `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '收藏时间', PRIMARY KEY (`id`), UNIQUE KEY `idx_user_product` (`user_id`,`product_id`) ) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8mb4 COMMENT='商品收藏表'; -- ---------------------------- -- Table structure for ims_fx_product_comment -- ---------------------------- DROP TABLE IF EXISTS `ims_fx_product_comment`; CREATE TABLE `ims_fx_product_comment` ( `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '评价ID(主键)', `order_id` bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT '关联订单ID', `product_id` bigint(20) unsigned NOT NULL COMMENT '商品ID', `user_id` bigint(20) unsigned NOT NULL COMMENT '用户ID', `user_name` varchar(50) NOT NULL COMMENT '用户名', `comment_text` text NOT NULL COMMENT '评价内容', `rating` tinyint(4) NOT NULL DEFAULT '5' COMMENT '评分(1-5)', `img_urls` varchar(1000) DEFAULT '' COMMENT '评价图片(逗号分隔)', `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '评价时间', PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COMMENT='商品评价表'; -- ---------------------------- -- Table structure for ims_fx_product_slider -- ---------------------------- DROP TABLE IF EXISTS `ims_fx_product_slider`; CREATE TABLE `ims_fx_product_slider` ( `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '轮播图ID(主键)', `product_id` bigint(20) unsigned NOT NULL COMMENT '商品ID', `img_url` varchar(255) NOT NULL COMMENT '图片地址', `sort` int(11) NOT NULL DEFAULT '0' COMMENT '排序', PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COMMENT='商品轮播图表'; -- ---------------------------- -- Table structure for ims_fx_product_spec -- ---------------------------- DROP TABLE IF EXISTS `ims_fx_product_spec`; CREATE TABLE `ims_fx_product_spec` ( `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '规格ID(主键)', `product_id` bigint(20) unsigned NOT NULL COMMENT '商品ID', `spec_name` varchar(50) NOT NULL COMMENT '规格名称(如:39码、黑色)', `price` decimal(10,2) NOT NULL COMMENT '规格单价', `stock` int(11) NOT NULL DEFAULT '0' COMMENT '规格库存', `sort` int(11) NOT NULL DEFAULT '0' COMMENT '规格排序', PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=68 DEFAULT CHARSET=utf8mb4 COMMENT='商品规格表'; -- ---------------------------- -- Table structure for ims_fx_product_spec_copy1 -- ---------------------------- DROP TABLE IF EXISTS `ims_fx_product_spec_copy1`; CREATE TABLE `ims_fx_product_spec_copy1` ( `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '规格ID(主键)', `product_id` bigint(20) unsigned NOT NULL COMMENT '商品ID', `spec_name` varchar(50) NOT NULL COMMENT '规格名称(如:39码、黑色)', PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COMMENT='商品规格表'; -- ---------------------------- -- Table structure for ims_fx_recharge_order -- ---------------------------- DROP TABLE IF EXISTS `ims_fx_recharge_order`; CREATE TABLE `ims_fx_recharge_order` ( `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '订单ID', `order_no` varchar(32) NOT NULL COMMENT '订单编号(RC前缀)', `user_id` bigint(20) unsigned NOT NULL COMMENT '用户ID', `amount` decimal(10,2) NOT NULL COMMENT '充值金额', `status` tinyint(4) NOT NULL DEFAULT '1' COMMENT '状态:1-待支付,2-已支付,3-已取消', `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `pay_time` datetime DEFAULT NULL COMMENT '支付时间', PRIMARY KEY (`id`), UNIQUE KEY `idx_order_no` (`order_no`), KEY `idx_user_id` (`user_id`) ) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COMMENT='充值订单表'; -- ---------------------------- -- Table structure for ims_fx_set -- ---------------------------- DROP TABLE IF EXISTS `ims_fx_set`; CREATE TABLE `ims_fx_set` ( `id` int(11) NOT NULL AUTO_INCREMENT, `logo` varchar(255) NOT NULL COMMENT 'LOGO', `xcx_appid` varchar(255) NOT NULL DEFAULT '' COMMENT '微信小程序appid', `xcx_secret` varchar(255) NOT NULL DEFAULT '' COMMENT '微信小程序secret', `wxpay_mch_id` varchar(255) NOT NULL DEFAULT '' COMMENT '微信商户号', `wxpay_key` varchar(255) NOT NULL DEFAULT '' COMMENT '微信商户密钥', `withdraw_service_fee_rate` decimal(5,4) NOT NULL DEFAULT '0.0100' COMMENT '提现手续费率(如0.01表示1%)', `withdraw_min_service_fee` decimal(10,2) NOT NULL DEFAULT '1.00' COMMENT '最低提现手续费(元)', PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4; -- ---------------------------- -- Table structure for ims_fx_shopping_cart -- ---------------------------- DROP TABLE IF EXISTS `ims_fx_shopping_cart`; CREATE TABLE `ims_fx_shopping_cart` ( `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '购物车ID(主键)', `user_id` bigint(20) unsigned NOT NULL COMMENT '用户ID', `product_id` bigint(20) unsigned NOT NULL COMMENT '商品ID', `spec_id` bigint(20) unsigned NOT NULL COMMENT '规格ID(关联ims_fx_product_spec.id)', `spec_name` varchar(50) DEFAULT '默认规格' COMMENT '选中规格', `price` decimal(10,2) NOT NULL COMMENT '加入时单价', `quantity` int(11) NOT NULL DEFAULT '1' COMMENT '数量', `selected` tinyint(4) NOT NULL DEFAULT '1' COMMENT '是否选中:1-是', `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', PRIMARY KEY (`id`), UNIQUE KEY `idx_user_product_spec` (`user_id`,`product_id`,`spec_name`) ) ENGINE=InnoDB AUTO_INCREMENT=23 DEFAULT CHARSET=utf8mb4 COMMENT='购物车表'; -- ---------------------------- -- Table structure for ims_fx_user -- ---------------------------- DROP TABLE IF EXISTS `ims_fx_user`; CREATE TABLE `ims_fx_user` ( `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '用户ID(主键)', `token` varchar(255) NOT NULL COMMENT 'token', `xcx_openid` varchar(255) NOT NULL COMMENT '小程序openid', `username` varchar(50) NOT NULL COMMENT '用户名', `nickname` varchar(50) NOT NULL DEFAULT '普通用户' COMMENT '昵称', `avatar` varchar(255) DEFAULT '/static/logo.png' COMMENT '头像', `phone` varchar(20) DEFAULT NULL COMMENT '手机号', `password` varchar(100) NOT NULL COMMENT '加密密码', `invite_code` varchar(32) DEFAULT NULL COMMENT '邀请码', `parent_id` bigint(20) unsigned DEFAULT NULL COMMENT '上级邀请人ID', `balance` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '用户钱包余额', `freeze_balance` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '冻结余额(提现中/未到账佣金)', `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', PRIMARY KEY (`id`), UNIQUE KEY `idx_username` (`username`), UNIQUE KEY `idx_invite_code` (`invite_code`) ) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COMMENT='用户表'; -- ---------------------------- -- Table structure for ims_fx_wallet_record -- ---------------------------- DROP TABLE IF EXISTS `ims_fx_wallet_record`; CREATE TABLE `ims_fx_wallet_record` ( `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '记录ID(主键)', `user_id` bigint(20) unsigned NOT NULL COMMENT '用户ID', `record_type` tinyint(4) NOT NULL COMMENT '操作类型:1-充值,2-提现,3-佣金到账,4-订单支付扣减,5-提现失败返还', `amount` decimal(10,2) NOT NULL COMMENT '变动金额(正数增加,负数减少)', `balance_after` decimal(10,2) NOT NULL COMMENT '操作后余额', `order_no` varchar(32) DEFAULT NULL COMMENT '关联订单号(充值/提现/支付订单号)', `status` tinyint(4) NOT NULL DEFAULT '1' COMMENT '状态:1-成功,2-失败,3-处理中', `remark` varchar(255) DEFAULT '' COMMENT '备注(如:微信充值、提现到银行卡)', `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', PRIMARY KEY (`id`), KEY `idx_user_id` (`user_id`), KEY `idx_create_time` (`create_time`) ) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8mb4 COMMENT='钱包操作记录表'; -- ---------------------------- -- Table structure for ims_fx_withdraw_apply -- ---------------------------- DROP TABLE IF EXISTS `ims_fx_withdraw_apply`; CREATE TABLE `ims_fx_withdraw_apply` ( `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '申请ID(主键)', `user_id` bigint(20) unsigned NOT NULL COMMENT '用户ID', `withdraw_no` varchar(32) NOT NULL COMMENT '提现单号', `amount` decimal(10,2) NOT NULL COMMENT '提现金额', `service_fee` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '提现手续费', `actual_amount` decimal(10,2) NOT NULL COMMENT '实际到账金额', `bank_card_no` varchar(50) NOT NULL COMMENT '银行卡号', `bank_name` varchar(50) NOT NULL COMMENT '银行名称', `real_name` varchar(50) NOT NULL COMMENT '持卡人姓名', `status` tinyint(4) NOT NULL DEFAULT '1' COMMENT '状态:1-申请中,2-已通过,3-已拒绝,4-已打款', `refuse_reason` varchar(255) DEFAULT '' COMMENT '拒绝原因', `apply_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '申请时间', `handle_time` datetime DEFAULT NULL COMMENT '处理时间', PRIMARY KEY (`id`), UNIQUE KEY `idx_withdraw_no` (`withdraw_no`), KEY `idx_user_id` (`user_id`), KEY `idx_status` (`status`) ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COMMENT='提现申请表'; SET FOREIGN_KEY_CHECKS = 1;
通用特别注意: 1.生成的控制器名称只能首字母大写,别的全小写 2.控制器不需要登录protected $noNeedLogin = '*'; 3.所有的验证用户是否登录,都用token,查用户表的方式实现 4.所有调用到uni.chooseLocation的接口,接口名不要叫chooseLocation 4.我的表前缀是ims_,后台所有数据库请求Db::name("表名"),表名不要有ims_ 5.uniapp的data中增加siteroot:this.configs.siteroot,变量 本次基本要求 要求1:结合【3.涉及的数据表】【1.之前写的后台接口示例】,将【4.需要绑定接口的静态页面】后台接口给我,按文件给我 要求2:根据新生成的接口,参考【2.uniapp接口请求示例】的接口请求写法,把【4.需要绑定接口的静态页面】绑定好接口给我,按文件给我
复制全部内容
复制成功!内容已存入剪贴板