From f041f5cc17bf4c9a41d05b1362c3e7f6effb9563 Mon Sep 17 00:00:00 2001 From: qijq <624811160@qq.com> Date: Fri, 9 May 2025 17:16:48 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96api=20=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- java-mall-app-shop-admin/api/agreement.js | 26 +- java-mall-app-shop-admin/api/audit.js | 255 ++++++++++-------- .../api/checkAPPupdate.js | 20 +- .../api/forgetPassword.js | 26 +- java-mall-app-shop-admin/api/im.js | 64 ++--- java-mall-app-shop-admin/api/login.js | 61 ++--- java-mall-app-shop-admin/api/order.js | 39 +-- java-mall-app-shop-admin/api/pdf.js | 0 java-mall-app-shop-admin/api/platform.js | 27 +- java-mall-app-shop-admin/api/printer.js | 186 ++++++------- java-mall-app-shop-admin/api/protocol.js | 24 +- java-mall-app-shop-admin/api/shop.js | 108 ++++---- java-mall-app-shop-admin/api/upload.js | 39 +-- java-mall-app-shop-admin/api/user.js | 82 +----- .../components/t-chat-bar/t-chat-bar.vue | 18 +- .../pages/IM/IMmsgContent.vue | 69 +++-- .../store/modules/account.js | 69 +++-- .../store/modules/user.js | 3 +- java-mall-app-shop-admin/utils/http.js | 81 +++--- 19 files changed, 547 insertions(+), 650 deletions(-) delete mode 100644 java-mall-app-shop-admin/api/pdf.js diff --git a/java-mall-app-shop-admin/api/agreement.js b/java-mall-app-shop-admin/api/agreement.js index 4d55443..d43f8a7 100644 --- a/java-mall-app-shop-admin/api/agreement.js +++ b/java-mall-app-shop-admin/api/agreement.js @@ -1,23 +1,21 @@ -import http from '../utils/http' +import http from '../utils/http'; /** * 获取用户协议 * @author Seven * @data 2025-1-6 + * @param { + * protocols_key : + * reg_protocols_description + * } * @returns { } * @see https://mall.gpxscs.cn/mobile/account/login/protocol */ -export function GetAgreement (params){ - params.isFilter = true - return new Promise((resolve, reject) => { - http({ - url:'/account/login/protocol', - method:'get', - params, - }).then(res=>{ - console.log('res',res); - resolve(res) - }) - }) -} \ No newline at end of file +export function GetAgreement(params) { + return http({ + url: '/account/login/protocol', + method: 'get', + params, + }); +} diff --git a/java-mall-app-shop-admin/api/audit.js b/java-mall-app-shop-admin/api/audit.js index 32f482a..73ec2dc 100644 --- a/java-mall-app-shop-admin/api/audit.js +++ b/java-mall-app-shop-admin/api/audit.js @@ -1,4 +1,4 @@ -import http from '../utils/http' +import http from '../utils/http'; /** * 获取省市区 @@ -8,20 +8,13 @@ import http from '../utils/http' * @see https://mall.gpxscs.cn/mobile/shop/shop-base-district/getAppDistrict */ -export function GetAppDistrict (params = {}){ - return new Promise((resolve, reject) => { - http({ - url:'/shop/shop-base-district/getAppDistrict', - method:'get', - params, - baseURL:process.env.VUE_APP_BACK_BASE_API - }).then(res=>{ - resolve(res) - }).catch(e => reject(console.warn(e))) - }) +export function GetAppDistrict() { + return http({ + url: '/shop/shop-base-district/getAppDistrict', + method: 'get', + }); } - /** * 店铺主营分类(类目) * @author Seven @@ -30,20 +23,13 @@ export function GetAppDistrict (params = {}){ * @see https://mall.gpxscs.cn/mobile/shop/shop-base-product-category/listCategory */ -export function GetMeritoCategory (params = {}){ - return new Promise((resolve, reject) => { - http({ - url:'/shop/shop-base-product-category/listCategory', - method:'get', - params, - baseURL:process.env.VUE_APP_BACK_BASE_API - }).then(res=>{ - resolve(res) - }).catch(e => reject(console.warn(e))) - }) +export function GetMeritoCategory() { + return http({ + url: '/shop/shop-base-product-category/listCategory', + method: 'get', + }); } - /** * 店铺主营分类(类目)二级分类 * @author Seven @@ -53,47 +39,47 @@ export function GetMeritoCategory (params = {}){ * @see https://mall.gpxscs.cn/mobile/shop/shop-base-product-category/treeCategory */ -export function GetTreeCategory (params = {}){ - - return new Promise((resolve, reject) => { - http({ - url:'/shop/shop-base-product-category/treeCategory', - method:'get', - params, - }).then(res=>{ - resolve(res) - }).catch(e => reject(console.warn(e))) - }) +export function GetTreeCategory() { + return http({ + url: '/shop/shop-base-product-category/treeCategory', + method: 'get', + }); } - /** * 获取百度地图输入点提示词 * @author Seven * @data 2025-3-5 - * @param { category_parent_id } + * @param { + * query: value, //关键词 + * region: this.citys[0], //城市名 + * city_limit: true, //指定的区域的返回结果 + * ret_coordtype: "gcj02ll", //坐标类型 1(WGS84ll即GPS经纬度)2(GCJ02ll即国测局经纬度坐标) 3(BD09ll即百度经纬度坐标) 4(BD09mc即百度米制坐标) + *} * @returns { query,region } * @see https://mall.gpxscs.cn/mobile/shop/merch/baidu/place/v2/suggestion */ -export function GetBaiduSuggestion (params = {}){ - params.isFilter = true - return new Promise((resolve, reject) => { +export function GetBaiduSuggestion(params = {}) { + params.isFilter = true; + return new Promise((resolve, reject) => { http({ - url:'/shop/merch/baidu/place/v2/suggestion', - method:'get', + url: '/shop/merch/baidu/place/v2/suggestion', + method: 'get', params, - }).then(res=>{ - resolve(res) - }).catch(e => reject(console.warn(e))) - }) + }) + .then((res) => { + resolve(res); + }) + .catch((e) => reject(console.warn(e))); + }); } - /** * 获取入驻审核状态 * @author Seven - * @data 2025- + * @data 2025-3-5 + * @param { "mobile": "13128997057" } * @returns { approval_invalid_col:[] ,approval_status":4, approval_remark:'', id:'' } * approval_invalid_col 重新审核 映射需要用到 由B段admin 传过来 * approval_status 1-已通过;2-未通过;3-待审核;4 -未申请 @@ -101,20 +87,22 @@ export function GetBaiduSuggestion (params = {}){ * @see https://mall.gpxscs.cn/mobile/shop/merch/fresh/approval/status */ -export function GetAuditStatus (params = {}){ - return new Promise((resolve, reject) => { +export function GetAuditStatus(params = {}) { + return new Promise((resolve, reject) => { http({ - url:'/shop/merch/fresh/approval/status', - method:'post', - data:params, - }).then(res=>{ - if(res && res.status == 200){ - uni.setStorageSync("approvalStatus",res.data.approval_status); - uni.setStorageSync("approvalStatusInfo",res.data); - } - resolve(res) - }).catch(e => reject(console.warn(e))) - }) + url: '/shop/merch/fresh/approval/status', + method: 'post', + data: params, + }) + .then((res) => { + if (res && res.status == 200) { + uni.setStorageSync('approvalStatus', res.data.approval_status); + uni.setStorageSync('approvalStatusInfo', res.data); + } + resolve(res); + }) + .catch((e) => reject(console.warn(e))); + }); } /** @@ -125,23 +113,24 @@ export function GetAuditStatus (params = {}){ * @see https://mall.gpxscs.cn/mobile/shop/merch/detail */ -export function GetAuditInfo(params){ - return new Promise((resolve, reject) => { +export function GetAuditInfo(params) { + return new Promise((resolve, reject) => { http({ - url:'/shop/merch/detail', - method:'post', - data:params, - }).then(res=>{ - if(res && res.status == 200){ - uni.setStorageSync("approvalStatus",res.data.approval_status); - uni.setStorageSync("approvalStatusInfo",res.data); - } - resolve(res) - }).catch(e => reject(console.warn(e))) - }) + url: '/shop/merch/detail', + method: 'post', + data: params, + }) + .then((res) => { + if (res && res.status == 200) { + uni.setStorageSync('approvalStatus', res.data.approval_status); + uni.setStorageSync('approvalStatusInfo', res.data); + } + resolve(res); + }) + .catch((e) => reject(console.warn(e))); + }); } - /** * 获取银行列表 * @author Seven @@ -150,56 +139,90 @@ export function GetAuditInfo(params){ * @see https://mall.gpxscs.cn/mobile/shop/global/banks/list */ -export function GetBankList(params){ - return new Promise((resolve, reject) => { - http({ - url:'/shop/global/banks/list', - method:'post', - data:params, - }).then(res=>{ - resolve(res) - }).catch(e => reject(console.warn(e))) - }) +export function GetBankList() { + http({ + url: '/shop/global/banks/list', + method: 'post', + }); } /** * 提交审核 * @author Seven * @data 2025-3-4 + * @param { + * "login_mobile": "13128997057", // 商家注册手机号 必填项 + * "store_name": "家乐福超市", // 超市名称 必填项 + * "sales_info": "商家经营范围内容" //从 ocr 中获取 可选项 + * "contact_name": "张三", // 商家联系人,可与法人同人 必填项 + * "biz_category": 12, // 超市一级分类,影响分账比例,必填项 + * "biz_second_category": 12001, // 超市二级分类,可选项 + * "store_longitude": "112.987876", // 店铺经纬度,必填项 + * "store_latitude": "21.2323", // 店铺经纬度,必填项 + * "province_id": "0001", // 省份code,必填项 + * "city_id": "000110001", // 城市code,必填项 + * "county_id": "0001100010000123", // 县乡镇区code,必填项 + * "store_area": "广东省/深圳市/福田区" // 店铺区域,必填项 + * "store_address": "广东省深圳市福田区深南大道11023号", // 带省市区店铺的详细地址,必填项 + * "store_logo": "https://163.com/abc/abc.png", // 店铺LOGO,可选项 + * "front_facade_image": "https://163.com/abc/abc.png", // 店铺门店照片,必填项 + * "environment_image": "https://163.com/abc/abc.png", // 店铺室内环境照片,必填项 + * "entity_type": 1, // 入驻主体类型:1-企业;2-个人; 必填项 + * "biz_license_image": "https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/mediad236132.png",营业执照图片,企业必填项 + * "biz_license_number": "91450881MA5P8MWX69", // 营业执照编号,ocr 中获取,企业必填项 + * "biz_license_company": "桂平厚德贸易有限公司", // 企业名,ocr 中获取,企业必填项 + * "legal_person_id_images": "https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/mediad940a32.png", // 法人身份证正面,企业必填 + * "legal_person_id_images2": "https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/medi5a32.png",// 法人身份证正面,企业必填 + * "legal_person_name": "张三", // 法人真实姓名,企业必填 + * "legal_person_mobile": "13128997057",// 法人手机号,,企业必填 + * "legal_person_id_number": "371321199004209551",// 法人身份证号码,ocr 中获取,企业必填 + * "legal_person_id_addr": "广东省深圳市福田区上梅林恒大居委会10023号",// 法人身份证详细地址,ocr 中获取,企业必填 + * "legal_person_id_period_begin": "2000-01-12",// 法人身份证开始有效日期,ocr 中获取,,企业必填 + * "legal_person_id_period_end": "9999-12-31",// 法人身份证截止有效日期,ocr 中获取,长期填:9999-12-31,企业必填 + * "legal_person_mobile": "13128997057",// 法人手机号,企业必填 + * "individual_id_images": "https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/mediad9225a32.png", // 个人身份证正面,个人小微必填 + * "individual_id_images2": "https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/mediad245a32.png",// 个人身份证正面,个人小微必填 + * "individual_id_name": "张三", // 真实姓名,ocr 中获取,个人小微必填 + * "individual_id_number": "371321199004209551",// 个人身份证号码,ocr 中获取,个人小微必填 + * "individual_id_addr": "广东省深圳市福田区上梅林恒大居委会10023号",// 个人身份证详细地址,ocr 中获取,个人小微必填 + * "individual_id_period_begin": "2000-01-12",// 个人身份证开始有效日期,ocr 中获取,个人小微必填 + * "individual_id_period_end": "9999-12-31",// 个人身份证截止有效日期,ocr 中获取,长期填:9999-12-31,个人小微必填 + * "other_license_list":"[{'type':1,'number':'91450881MA5P8MWX69','img':'https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/1.png'}]", //营业执照以外的许可证信息列表JSON格式 [{'type':1,'number':'91450881MA5P8MWX69','img':'https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/1.png'}],type:1-许可证;2-特许证件,3-其他证件 + * "bank_district": "11000/11100/11101", //结算账号省市区code 省code/市code/区code,必填项 + * "bank_area": "广西壮族自治区/贵港市/桂平市", //结算账号省市区 省/市/区,必填项 + * "bank_name": "桂平市农业银行西山支行", // 银行名称 + * "openning_bank_code": "102641000266", //结算账户⾏号,必填项 + * "clearing_bank_code": "102641000266", //结算账户清算⾏号,必填项 + * "account_type": "57", // 结算账号类型:57-对公 58-对私,必填项 + * "account_number": "6217007200087742238", //结算银行卡号,必填项 + * "account_holder_name": "桂平厚德贸易有限公司" //结算银行账户名,必填项 + } * @returns { } * @see https://mall.gpxscs.cn/mobile/shop/merch/apply */ -export function GetMerchApply(params){ - return new Promise((resolve, reject) => { - http({ - url:'/shop/merch/apply', - method:'post', - data:params, - }).then(res=>{ - resolve(res) - }).catch(e => reject(console.warn(e))) - }) +export function GetMerchApply(params) { + return http({ + url: '/shop/merch/apply', + method: 'post', + data: params, + }); } /** * 重新提交审核 * @author Seven * @data 2025-3-4 - * @returns { } + * @param { auditId , ...form字段 } * @see https://mall.gpxscs.cn/mobile/shop/merch/re-apply */ -export function GetRestartMerchApply(params){ - return new Promise((resolve, reject) => { - http({ - url:'/shop/merch/re-apply', - method:'post', - data:params, - }).then(res=>{ - resolve(res) - }).catch(e => reject(console.warn(e))) - }) +export function GetRestartMerchApply(params) { + return http({ + url: '/shop/merch/re-apply', + method: 'post', + data: params, + }); } /** @@ -210,16 +233,10 @@ export function GetRestartMerchApply(params){ * @see https://mall.gpxscs.cn/mobile/shop/store/biz-category/list */ -export function GetBizCategoryList(params){ - return new Promise((resolve, reject) => { - http({ - url:'/shop/store/biz-category/list', - method:'post', - data:params, - }).then(res=>{ - resolve(res) - }).catch(e => reject(console.warn(e))) - }) +export function GetBizCategoryList(params) { + return http({ + url: '/shop/store/biz-category/list', + method: 'post', + data: params, + }); } - - diff --git a/java-mall-app-shop-admin/api/checkAPPupdate.js b/java-mall-app-shop-admin/api/checkAPPupdate.js index a2a33db..9daa2e6 100644 --- a/java-mall-app-shop-admin/api/checkAPPupdate.js +++ b/java-mall-app-shop-admin/api/checkAPPupdate.js @@ -5,21 +5,19 @@ import config from '../config/config'; * 账号密码登录 * @author Seven * @data 2025-1-6 + * @param { + * marketId: marketId, // 各大安卓 APP 市场标识:1 - 小米;2 - 华为;3 - 腾讯应用市场;4 - OPPO;5 - VIVO;6 - 三星;100-通用包(不区分市场的包); + * packageName: 'com.xiaofa.shopAdmin', //包名 + * currVersionKey: version, // 热更新包内部整数版本号,1-10000000 + } * @returns { } * @see https://mall.gpxscs.cn/mobile/admin/app-market-update/check/version */ export function GetAPPversion(params) { - return new Promise((resolve, reject) => { - http({ - url: '/admin/app-market-update/check/version', - method: 'post', - data: params, - baseURL: config.baseApi, - }) - .then((res) => { - resolve(res); - }) - .catch((e) => reject(console.warn(e))); + return http({ + url: '/admin/app-market-update/check/version', + method: 'post', + data: params, }); } diff --git a/java-mall-app-shop-admin/api/forgetPassword.js b/java-mall-app-shop-admin/api/forgetPassword.js index b2b5ca3..9ad7283 100644 --- a/java-mall-app-shop-admin/api/forgetPassword.js +++ b/java-mall-app-shop-admin/api/forgetPassword.js @@ -1,22 +1,22 @@ -import http from '../utils/http' +import http from '../utils/http'; /** * 登录 * @author Seven * @data 2025-1-6 + * @param { + * "number": "13128997057", // 注册手机号码或用户账号或邮箱 + * "verify_code": "7828", // 手机或邮箱收到的验证码 + * "new_password": "123456" // 修改的新密码 + } * @returns { } * @see https://mall.gpxscs.cn/mobile/account/login/doForgetPassword */ -export function GetForgePassword (params){ - return new Promise((resolve, reject) => { - params.isFilter = true - http({ - url:'/account/login/doForgetPassword', - method:'post', - data:params, - }).then(res=>{ - resolve(res) - }).catch(e => reject(console.warn(e))) - }) -} \ No newline at end of file +export function GetForgePassword(params) { + return http({ + url: '/account/login/doForgetPassword', + method: 'post', + data: params, + }); +} diff --git a/java-mall-app-shop-admin/api/im.js b/java-mall-app-shop-admin/api/im.js index f597b98..af8d43d 100644 --- a/java-mall-app-shop-admin/api/im.js +++ b/java-mall-app-shop-admin/api/im.js @@ -1,70 +1,56 @@ - -import http from '../utils/http' +import http from '../utils/http'; import config from '../config/config'; /** * 获取聊天配置 * @author Seven * @data 2025-1-27 + * @param { type: "json", uid: uid } * @returns { } * @see https://mall.gpxscs.cn/api/mobile/sns/im/getImConfig?typ=json&uid=10001 */ -export function GetImConfig (params){ - return new Promise((resolve, reject) => { - http({ - url:'/sns/im/getImConfig', - method:'get', - params, - baseURL:config.baseApi - }).then(res=>{ - resolve(res) - }).catch(e => reject(console.warn(e))) - }) +export function GetImConfig(params) { + return http({ + url: '/sns/im/getImConfig', + method: 'get', + params, + baseURL: config.baseApi, + }); } - /** * 获取聊天记录 * @author Seven * @data 2025-1-27 - * @param {typ: json,user_other_id: 10028,type: friend,page: 1} params + * @param {typ: json,user_other_id: 10028,type: friend,page: 1} params * @returns { } * @see https://mall.gpxscs.cn/api/mobile/sns/userMessage/listChatMsg?typ=json&user_other_id=10028&type=friend&page=1 */ -export function GetImMsgList (params){ - return new Promise((resolve, reject) => { - http({ - url:'https://mall.gpxscs.cn/api/mobile/sns/userMessage/listChatMsg', - method:'get', - params, - baseURL:config.apiMobile - }).then(res=>{ - resolve(res) - }).catch(e => reject(console.warn(e))) - }) +export function GetImMsgList(params) { + return http({ + url: 'https://mall.gpxscs.cn/api/mobile/sns/userMessage/listChatMsg', + method: 'get', + params, + baseURL: config.apiMobile, + }); } /** * 获取聊天记录 * @author Seven * @data 2025-1-27 - * @param {typ: json,user_other_id: 10028,type: friend,page: 1} params + * @param {typ: json,user_other_id: 10028,type: friend,page: 1} params * @returns { } * @see https://mall.gpxscs.cn/api/mobile/sns/userMessage/add */ -export function GetSendMsgAdd (params){ - return new Promise((resolve, reject) => { - http({ - url:'https://mall.gpxscs.cn/api/mobile/sns/userMessage/add', - method:'get', - params, - baseURL:config.apiMobile - }).then(res=>{ - resolve(res) - }).catch(e => reject(console.warn(e))) - }) +export function GetSendMsgAdd(params) { + return http({ + url: 'https://mall.gpxscs.cn/api/mobile/sns/userMessage/add', + method: 'get', + params, + baseURL: config.apiMobile, + }); } - diff --git a/java-mall-app-shop-admin/api/login.js b/java-mall-app-shop-admin/api/login.js index 688f3b0..315fd00 100644 --- a/java-mall-app-shop-admin/api/login.js +++ b/java-mall-app-shop-admin/api/login.js @@ -5,7 +5,7 @@ import config from '../config/config'; * 登录/注册同一个接口 * @author Seven * @data 2025-1-28 - * @param number // 验证码 + * @param { number: 9999 } // 验证码 * @returns { } * @see https://mall.gpxscs.cn/mobile/account/login/doMerchSmsRegisterAndLogin */ @@ -16,11 +16,7 @@ export function GetLogin(params) { url: '/account/login/doMerchSmsRegisterAndLogin', method: 'post', data: params, - }) - .then((res) => { - resolve(res); - }) - .catch((e) => reject(console.warn(e))); + }); }); } @@ -28,22 +24,16 @@ export function GetLogin(params) { * 获取验证码 * @author Seven * @data 2025-1-6 + * @param { number: '13112341234', } 手机号 * @returns { } * @see https://mall.gpxscs.cn/mobile/account/login/sendVerifyCode */ export function GetSmsCode(params) { - params.isFilter = true; - return new Promise((resolve, reject) => { - http({ - url: '/account/login/sendVerifyCode', - method: 'post', - data: params, - }) - .then((res) => { - resolve(res); - }) - .catch((e) => reject(console.warn(e))); + return http({ + url: '/account/login/sendVerifyCode', + method: 'post', + data: params, }); } @@ -51,22 +41,22 @@ export function GetSmsCode(params) { * 账号密码登录 * @author Seven * @data 2025-1-6 + * @param { + * user_account: 'seven', + * user_password: 111111, + * verify_code: cxs1, //验证码 + * verify_token: 1746780029143, // 时间戳 + * } * @returns { } * @see https://mall.gpxscs.cn/api/admin/account/account-user-base/doLogin */ export function GetAccountLogin(params) { - return new Promise((resolve, reject) => { - http({ - url: '/account/account-user-base/doLogin', - method: 'post', - params, - baseURL: config.adminApi, - }) - .then((res) => { - resolve(res); - }) - .catch((e) => reject(console.warn(e))); + return http({ + url: '/account/account-user-base/doLogin', + method: 'post', + params, + baseURL: config.adminApi, }); } @@ -74,19 +64,16 @@ export function GetAccountLogin(params) { * 获取图形验证码 * @author Seven * @data 2025-1-6 + * @param { verify_token:new Date().getTime() } * @returns { } * @see https://mall.gpxscs.cn/api/admin/shop/shop-base-config/image */ export function GetVerifyCode(params) { - return new Promise((resolve, reject) => { - http({ - url: '/shop/shop-base-config/image', - method: 'GET', - params, - baseURL: config.adminApi, - }).then((res) => { - resolve(res); - }); + return http({ + url: '/shop/shop-base-config/image', + method: 'GET', + params, + baseURL: config.adminApi, }); } diff --git a/java-mall-app-shop-admin/api/order.js b/java-mall-app-shop-admin/api/order.js index 648a63f..6271131 100644 --- a/java-mall-app-shop-admin/api/order.js +++ b/java-mall-app-shop-admin/api/order.js @@ -1,32 +1,35 @@ -import http from '../utils/http' -import config from '../config/config' +import http from '../utils/http'; +import config from '../config/config'; /** * 获取订单列表 * @author Seven * @data 2025-3-28 - * @param + * @param { + * storeId: 1, //店铺Id + * keyword: 'DD-', //搜索订单关键字 + * pageNum: 1, //页码 + * pageSize: 10, //页大小 + * delivery: 1, // 1-同城配送;2-物流配送 + * status: 1, 1-进行中;2-超时的订单;3-退款的订单 + * } * @returns { } * @see https://mall.gpxscs.cn/mobile/shop/userOrder/mch/order/list */ -export function GetOrderList (params){ - return new Promise((resolve, reject) => { - http({ - url:'/shop/userOrder/mch/order/list', - method:'post', - data:params, - }).then(res=>{ - resolve(res) - }).catch(e => reject(console.warn(e))) - }) +export function GetOrderList(params) { + return http({ + url: '/shop/userOrder/mch/order/list', + method: 'post', + data: params, + }); } /** * 获取订单列表 模拟数据 -**/ + **/ -// export function GetOrderList (params){ +// export function GetOrderList (params){ // return new Promise((resolve, reject) => { // http({ // url:'/mchapp/static/data/order.json', @@ -39,17 +42,16 @@ export function GetOrderList (params){ // }) // } - /** * 获取订单SSE * @author Seven * @data 2025-3-28 - * @param channel + * @param channel * @returns { } * @see https://mall.gpxscs.cn/api/mobile/shop/sf-express/order/status/listening */ -// export function GetOrderList (params){ +// export function GetOrderList (params){ // return new Promise((resolve, reject) => { // http({ // url:'/shop/userOrder/mch/order/list', @@ -61,4 +63,3 @@ export function GetOrderList (params){ // }).catch(e => reject(console.warn(e))) // }) // } - diff --git a/java-mall-app-shop-admin/api/pdf.js b/java-mall-app-shop-admin/api/pdf.js deleted file mode 100644 index e69de29..0000000 diff --git a/java-mall-app-shop-admin/api/platform.js b/java-mall-app-shop-admin/api/platform.js index 2607cb0..03d4052 100644 --- a/java-mall-app-shop-admin/api/platform.js +++ b/java-mall-app-shop-admin/api/platform.js @@ -1,27 +1,20 @@ - -import http from '../utils/http' -import config from '../config/config' +import http from '../utils/http'; +import config from '../config/config'; /** * 获取平台信息 * @author Seven * @data 2025-1-28 - * @param action: 'intro', source_ucc_code:$.getStorageSync('source_ucc_code') + * @param { action: 'intro'} * @returns { } * @see https://mall.gpxscs.cn/mobile/account/config/info */ -export function GetPlatformInfo(params){ - return new Promise((resolve, reject) => { - http({ - url:'/account/config/info', - method:'get', - params, - baseURL:config.baseApi - }).then(res=>{ - resolve(res) - }).catch(e => reject(console.warn(e))) - }) +export function GetPlatformInfo(params) { + return http({ + url: '/account/config/info', + method: 'get', + params, + baseURL: config.baseApi, + }); } - - diff --git a/java-mall-app-shop-admin/api/printer.js b/java-mall-app-shop-admin/api/printer.js index 0246b88..185fe5c 100644 --- a/java-mall-app-shop-admin/api/printer.js +++ b/java-mall-app-shop-admin/api/printer.js @@ -1,116 +1,106 @@ -import http from '../utils/http' -import config from '../config/config' +import http from '../utils/http'; +import config from '../config/config'; /** - * 登录/注册同一个接口 + * 获取打印机列表 * @author Seven - * @data 2025-3-29 - * @param number // 验证码 + * @data 2025-4-5 + * @param { + * keyword: "", + * pageNum: 1, + * pageSize: 20, + * } * @returns { } * @see https://mall.gpxscs.cn/api/admin/shop/store/printer/page */ -export function GetPrinterList (params){ - return new Promise((resolve, reject) => { - http({ - url:'/shop/store/printer/page', - method:'get', - params, - baseURL:config.adminApi - }).then(res=>{ - resolve(res) - }).catch(e => reject(console.warn(e))) - }) +export function GetPrinterList(params) { + return http({ + url: '/shop/store/printer/page', + method: 'get', + params, + baseURL: config.adminApi, + }); } /** - * 获取打印机区域列表 + * 获取打印机区域列表 打印来源 * @author Seven * @data 2025-4-5 - * @param + * @param { count: 99 } * @returns { } * @see https://mall.gpxscs.cn/api/admin/shop/store/printer/region/list */ -export function GetPrinterflagList (params){ - return new Promise((resolve, reject) => { - http({ - url:'/shop/store/printer/region/list', - method:'get', - params, - baseURL:config.adminApi - }).then(res=>{ - resolve(res) - }).catch(e => reject(console.warn(e))) - }) +export function GetPrinterflagList(params) { + return http({ + url: '/shop/store/printer/region/list', + method: 'get', + params, + baseURL: config.adminApi, + }); } - /** * 获取打印机品牌列表 * @author Seven * @data 2025-4-5 - * @param + * @param { count: 99 } * @returns { } * @see https://mall.gpxscs.cn/api/admin/shop/store/printer/model/list */ -export function GetPrinterModelList (params){ - return new Promise((resolve, reject) => { - http({ - url:'/shop/store/printer/model/list', - method:'get', - params, - baseURL:config.adminApi - }).then(res=>{ - resolve(res) - }).catch(e => reject(console.warn(e))) - }) +export function GetPrinterModelList(params) { + return http({ + url: '/shop/store/printer/model/list', + method: 'get', + params, + baseURL: config.adminApi, + }); } /** * 添加打印机 * @author Seven * @data 2025-4-5 - * @param + * @param { + * printer_name: "", 打票机备注名 + * model_id: "", 打票机型号ID + * printer_sn: "", 打票机编号 + * printer_key: "", 打票机密钥 + * website_url: "", 打印机官网网址 + * region: 0, 打票机摆放区域ID + * paper_with: 58, 纸张宽度 58 和 80 + * } * @returns { } * @see https://mall.gpxscs.cn/api/admin/shop/store/printer/add/new */ -export function AddPrinter (params){ - return new Promise((resolve, reject) => { - http({ - url:'/shop/store/printer/add/new', - method:'post', - params, - baseURL:config.adminApi - }).then(res=>{ - resolve(res) - }).catch(e => reject(console.warn(e))) - }) +export function AddPrinter(params) { + return http({ + url: '/shop/store/printer/add/new', + method: 'post', + params, + baseURL: config.adminApi, + }); } - /** * 删除打印机 * @author Seven * @data 2025-4-5 - * @param { printer_id:0} 打票机自增ID + * @param { printer_id:0} 打票机自增ID * @returns { } * @see https://mall.gpxscs.cn/api/admin/shop/store/printer/delete */ -export function DelectPrinter (params){ - return new Promise((resolve, reject) => { - http({ - url:'/shop/store/printer/delete', - method:'post', - params, - baseURL:config.adminApi - }).then(res=>{ - resolve(res) - }).catch(e => reject(console.warn(e))) - }) +export function DelectPrinter(params) { + return http({ + url: '/shop/store/printer/delete', + method: 'post', + params, + baseURL: config.adminApi, + }); } /** @@ -122,42 +112,36 @@ export function DelectPrinter (params){ * @see https://mall.gpxscs.cn/api/admin/shop/store/printer/update */ -export function UpdatePrinter (params){ - return new Promise((resolve, reject) => { - http({ - url:'/shop/store/printer/update', - method:'post', - params, - baseURL:config.adminApi - }).then(res=>{ - resolve(res) - }).catch(e => reject(console.warn(e))) - }) +export function UpdatePrinter(params) { + return http({ + url: '/shop/store/printer/update', + method: 'post', + params, + baseURL: config.adminApi, + }); } /** * 更新打印机状态 * @author Seven * @data 2025-4-5 - * @param {printer_id,status} 打票机自增ID + * @param { + * printer_id:0, 打票机自增ID + * status:1 状态:1-开启;2-关闭; + * } * @returns { } * @see https://mall.gpxscs.cn/api/admin/shop/store/printer/status/update' */ -export function UpdatePrinterStatus (params){ - return new Promise((resolve, reject) => { - http({ - url:'/shop/store/printer/status/update', - method:'post', - params, - baseURL:config.adminApi - }).then(res=>{ - resolve(res) - }).catch(e => reject(console.warn(e))) - }) +export function UpdatePrinterStatus(params) { + return http({ + url: '/shop/store/printer/status/update', + method: 'post', + params, + baseURL: config.adminApi, + }); } - /** * 测试打印机 * @author Seven @@ -167,15 +151,11 @@ export function UpdatePrinterStatus (params){ * @see https://mall.gpxscs.cn/api/admin/shop/store/printer/print/order */ -export function TestPrinter (params){ - return new Promise((resolve, reject) => { - http({ - url:'shop/store/printer/print/order', - method:'post', - params, - baseURL:config.adminApi - }).then(res=>{ - resolve(res) - }).catch(e => reject(console.warn(e))) - }) -} \ No newline at end of file +export function TestPrinter(params) { + return http({ + url: 'shop/store/printer/print/order', + method: 'post', + params, + baseURL: config.adminApi, + }); +} diff --git a/java-mall-app-shop-admin/api/protocol.js b/java-mall-app-shop-admin/api/protocol.js index 98794a7..2cec978 100644 --- a/java-mall-app-shop-admin/api/protocol.js +++ b/java-mall-app-shop-admin/api/protocol.js @@ -1,24 +1,20 @@ -import http from '../utils/http' -import config from '../config/config' +import http from '../utils/http'; +import config from '../config/config'; /** * 获取隐私协议 * @author Seven * @data 2025-1-28 - * @param protocols_key : 'reg_description' + * @param { protocols_key : 'reg_description'} * @returns { } * @see https://mall.gpxscs.cn/mobile/account/login/protoco */ -export function GetProtoco(params){ - return new Promise((resolve, reject) => { - http({ - url:'/account/login/protocol', - method:'get', - params, - baseURL:config.baseApi - }).then(res=>{ - resolve(res) - }).catch(e => reject(console.warn(e))) - }) +export function GetProtoco(params) { + return http({ + url: '/account/login/protocol', + method: 'get', + params, + baseURL: config.baseApi, + }); } diff --git a/java-mall-app-shop-admin/api/shop.js b/java-mall-app-shop-admin/api/shop.js index f9ed9cb..0f675ba 100644 --- a/java-mall-app-shop-admin/api/shop.js +++ b/java-mall-app-shop-admin/api/shop.js @@ -1,5 +1,5 @@ -import http from '../utils/http' -import config from '../config/config' +import http from '../utils/http'; +import config from '../config/config'; /** * 获取商店基础信息 @@ -9,101 +9,83 @@ import config from '../config/config' * @see https://mall.gpxscs.cn/api/admin/shop/shop-store-base/get */ -export function GetShopBaseInfo(params){ - return new Promise((resolve, reject) => { - http({ - url:'/shop/shop-store-base/get?source_lang=zh_CN', - method:'get', - params, - baseURL:config.adminApi - }).then(res=>{ - resolve(res) - }).catch(e => reject(console.warn(e))) - }) +export function GetShopBaseInfo() { + return http({ + url: '/shop/shop-store-base/get?source_lang=zh_CN', + method: 'get', + baseURL: config.adminApi, + }); } /** * 修改商店基础信息 * @author Seven * @data 2025-3-27 + * @param { + * store_logo: '', 店铺logo + * store_slogan: '加油', 店铺口号 + * store_tel: this.form.info.store_tel, 店铺电话 + * company_description: this.form.company.company_description, 店铺介绍 + * } * @returns { } * @see https://mall.gpxscs.cn/api/admin/shop/shop-store-base/storeSetUp */ -export function UpdataShopInfo(params){ - return new Promise((resolve, reject) => { - http({ - url:'/shop/shop-store-base/storeSetUp', - method:'post', - params, - baseURL:config.adminApi - }).then(res=>{ - resolve(res) - }).catch(e => reject(console.warn(e))) - }) +export function UpdataShopInfo(params) { + return http({ + url: '/shop/shop-store-base/storeSetUp', + method: 'post', + params, + baseURL: config.adminApi, + }); } /** - * 获取商家端订单量 + * 获取商家端今日订单量 * @author Seven * @data 2025-4-30 * @returns { } * @see https://mall.gpxscs.cn/api/admin/shop/analytics/order/getOrderNumToday */ -export function GetShopOrderNum(params){ - return new Promise((resolve, reject) => { - http({ - url:'/shop/analytics/order/getOrderNumToday', - method:'get', - params, - baseURL:config.adminApi - }).then(res=>{ - resolve(res) - }).catch(e => reject(console.warn(e))) - }) +export function GetShopOrderNum() { + return http({ + url: '/shop/analytics/order/getOrderNumToday', + method: 'get', + baseURL: config.adminApi, + }); } - /** - * 获取商家端订单量 + * 获取商家端今日销售额 * @author Seven * @data 2025-4-30 * @returns { } * @see https://mall.gpxscs.cn/api/admin/pay/analytics/trade/getSalesAmount */ -export function GetSalesAmountFun(params){ - return new Promise((resolve, reject) => { - http({ - url:'/pay/analytics/trade/getSalesAmount', - method:'get', - params, - baseURL:config.adminApi - }).then(res=>{ - resolve(res) - }).catch(e => reject(console.warn(e))) - }) +export function GetSalesAmountFun(params) { + return http({ + url: '/pay/analytics/trade/getSalesAmount', + method: 'get', + params, + baseURL: config.adminApi, + }); } - /** - * 获取商家端退货单数 + * 获取商家端今日退货单数 * @author Seven * @data 2025-4-30 * @returns { } * @see https://mall.gpxscs.cn/api/admin/shop/analytics/return/getReturnNumToday */ -export function GetOrderReturnNum(params){ - return new Promise((resolve, reject) => { - http({ - url:'shop/analytics/return/getReturnNumToday', - method:'get', - params, - baseURL:config.adminApi - }).then(res=>{ - resolve(res) - }).catch(e => reject(console.warn(e))) - }) -} \ No newline at end of file +export function GetOrderReturnNum(params) { + return http({ + url: 'shop/analytics/return/getReturnNumToday', + method: 'get', + params, + baseURL: config.adminApi, + }); +} diff --git a/java-mall-app-shop-admin/api/upload.js b/java-mall-app-shop-admin/api/upload.js index d298587..37554d7 100644 --- a/java-mall-app-shop-admin/api/upload.js +++ b/java-mall-app-shop-admin/api/upload.js @@ -1,29 +1,32 @@ /** - * 上传图片 + * 上传接口 * @author Seven * @data 2025-3-1 - * @param number // 验证码 + * @param { + * filePath:'文件路径' + * formData:二进制 + * } * @returns { } * @seehttps://mall.gpxscs.cn/mobile/shop/oss/upload */ -export function UploadFilePromise (imgUrl,formData){ - let ukey = uni.getStorageSync("ukey"); - return new Promise((resolve, reject) => { +export function UploadFilePromise(filePath, formData) { + let ukey = uni.getStorageSync('ukey'); + return new Promise((resolve, reject) => { uni.uploadFile({ // 完整上传路径 H5端需要解决跨域问题 - url:'https://mall.gpxscs.cn/mobile/shop/oss/upload', - method: "POST", - filePath: imgUrl, - name: "upfile", + url: 'https://mall.gpxscs.cn/mobile/shop/oss/upload', + method: 'POST', + filePath: filePath, + name: 'upfile', formData: { perm_key: ukey, ...formData }, - success:res =>{ - const result = JSON.parse(res.data); - resolve(result) + success: (res) => { + const result = JSON.parse(res.data); + resolve(result); }, - fail:res =>{ - reject(res) - } - }) - }) -} \ No newline at end of file + fail: (res) => { + reject(res); + }, + }); + }); +} diff --git a/java-mall-app-shop-admin/api/user.js b/java-mall-app-shop-admin/api/user.js index 4278c09..7fc984b 100644 --- a/java-mall-app-shop-admin/api/user.js +++ b/java-mall-app-shop-admin/api/user.js @@ -1,48 +1,6 @@ -import http from '../utils/http' -import config from '../config/config' +import http from '../utils/http'; +import config from '../config/config'; -/** - * 登录/注册同一个接口 - * @author Seven - * @data 2025-1-28 - * @param number // 验证码 - * @returns { } - * @see https://mall.gpxscs.cn/mobile/account/login/doMerchSmsRegisterAndLogin - */ - -export function GetLogin (params){ - params.isFilter = true - return new Promise((resolve, reject) => { - http({ - url:'/account/login/doMerchSmsRegisterAndLogin', - method:'post', - data:params, - }).then(res=>{ - resolve(res) - }).catch(e => reject(console.warn(e))) - }) -} - -/** - * 获取验证码 - * @author Seven - * @data 2025-1-6 - * @returns { } - * @see https://mall.gpxscs.cn/mobile/account/login/sendVerifyCode - */ - -export function GetSmsCode(params){ - params.isFilter = true - return new Promise((resolve, reject) => { - http({ - url:'/account/login/sendVerifyCode', - method:'post', - data:params, - }).then(res=>{ - resolve(res) - }).catch(e => reject(console.warn(e))) - }) -} /** * 获取商店仪表信息 * @author Seven @@ -51,21 +9,14 @@ export function GetSmsCode(params){ * @see https://mall.gpxscs.cn/api/admin/shop/shop-order-info/dashboard */ -export function GetAccountDashboard(params){ - return new Promise((resolve, reject) => { - http({ - url:'/shop/shop-order-info/dashboard', - method:'get', - params, - baseURL:config.adminApi - }).then(res=>{ - resolve(res) - }).catch(e => reject(console.warn(e))) - }) +export function GetAccountDashboard() { + return http({ + url: '/shop/shop-order-info/dashboard', + method: 'get', + baseURL: config.adminApi, + }); } - - /** * 退出登录 * @author Seven @@ -74,14 +25,9 @@ export function GetAccountDashboard(params){ * @see https://mall.gpxscs.cn/api/mobile/account/login/doLogout */ -export function OutLogin(params){ - return new Promise((resolve, reject) => { - http({ - url:'https://mall.gpxscs.cn/api/mobile/account/login/doLogout', - method:'get', - params, - }).then(res=>{ - resolve(res) - }).catch(e => reject(console.warn(e))) - }) -} \ No newline at end of file +export function OutLogin() { + return http({ + url: 'https://mall.gpxscs.cn/api/mobile/account/login/doLogout', + method: 'get', + }); +} diff --git a/java-mall-app-shop-admin/components/t-chat-bar/t-chat-bar.vue b/java-mall-app-shop-admin/components/t-chat-bar/t-chat-bar.vue index bf74997..9f5c254 100644 --- a/java-mall-app-shop-admin/components/t-chat-bar/t-chat-bar.vue +++ b/java-mall-app-shop-admin/components/t-chat-bar/t-chat-bar.vue @@ -4,7 +4,7 @@ class="tui-reply-tabbar" :style="{ paddingBottom: `${keyboardHeight}px` }" > - + acc.concat(curr), []) .filter((item) => item.alt != "[删除]"); - console.log("faceList", this.faceList); let safeH = this.tui.isPhoneX() ? 34 : 0; uni.onKeyboardHeightChange((res) => { @@ -209,6 +207,13 @@ export default { } }, 100); }); + + // #ifdef APP-PLUS + const platform = uni.getSystemInfoSync().platform; + if (platform == "ios") { + this.isIos = true; + } + // #endif }, data() { return { @@ -220,6 +225,7 @@ export default { isVoice: false, isEmoji: false, editorContent: "", + isIos: false, }; }, watch: { @@ -418,7 +424,7 @@ export default { display: flex; align-items: flex-end; padding: 16rpx 24rpx; - padding-bottom: 80rpx; + box-sizing: border-box; &::after { @@ -480,6 +486,10 @@ export default { } } + .tui-chat-ios-tabbar { + padding-bottom: 80rpx; + } + .tui-reply-more { width: 100%; position: relative; diff --git a/java-mall-app-shop-admin/pages/IM/IMmsgContent.vue b/java-mall-app-shop-admin/pages/IM/IMmsgContent.vue index 0db8dfb..270dbf3 100644 --- a/java-mall-app-shop-admin/pages/IM/IMmsgContent.vue +++ b/java-mall-app-shop-admin/pages/IM/IMmsgContent.vue @@ -1,5 +1,7 @@