优化api 接口
This commit is contained in:
parent
f70ad01c29
commit
f041f5cc17
@ -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)
|
||||
})
|
||||
})
|
||||
export function GetAgreement(params) {
|
||||
return http({
|
||||
url: '/account/login/protocol',
|
||||
method: 'get',
|
||||
params,
|
||||
});
|
||||
}
|
||||
@ -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,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -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,
|
||||
});
|
||||
}
|
||||
|
||||
@ -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)))
|
||||
})
|
||||
export function GetForgePassword(params) {
|
||||
return http({
|
||||
url: '/account/login/doForgetPassword',
|
||||
method: 'post',
|
||||
data: params,
|
||||
});
|
||||
}
|
||||
@ -1,29 +1,24 @@
|
||||
|
||||
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
|
||||
@ -33,17 +28,13 @@ export function GetImConfig (params){
|
||||
* @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,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@ -55,16 +46,11 @@ export function GetImMsgList (params){
|
||||
* @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,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@ -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,
|
||||
});
|
||||
}
|
||||
|
||||
@ -1,30 +1,33 @@
|
||||
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){
|
||||
// return new Promise((resolve, reject) => {
|
||||
@ -39,7 +42,6 @@ export function GetOrderList (params){
|
||||
// })
|
||||
// }
|
||||
|
||||
|
||||
/**
|
||||
* 获取订单SSE
|
||||
* @author Seven
|
||||
@ -61,4 +63,3 @@ export function GetOrderList (params){
|
||||
// }).catch(e => reject(console.warn(e)))
|
||||
// })
|
||||
// }
|
||||
|
||||
|
||||
@ -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,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -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)))
|
||||
})
|
||||
export function TestPrinter(params) {
|
||||
return http({
|
||||
url: 'shop/store/printer/print/order',
|
||||
method: 'post',
|
||||
params,
|
||||
baseURL: config.adminApi,
|
||||
});
|
||||
}
|
||||
@ -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,
|
||||
});
|
||||
}
|
||||
|
||||
@ -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)))
|
||||
})
|
||||
export function GetOrderReturnNum(params) {
|
||||
return http({
|
||||
url: 'shop/analytics/return/getReturnNumToday',
|
||||
method: 'get',
|
||||
params,
|
||||
baseURL: config.adminApi,
|
||||
});
|
||||
}
|
||||
@ -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)
|
||||
}
|
||||
})
|
||||
})
|
||||
fail: (res) => {
|
||||
reject(res);
|
||||
},
|
||||
});
|
||||
});
|
||||
}
|
||||
@ -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)))
|
||||
})
|
||||
export function OutLogin() {
|
||||
return http({
|
||||
url: 'https://mall.gpxscs.cn/api/mobile/account/login/doLogout',
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
@ -4,7 +4,7 @@
|
||||
class="tui-reply-tabbar"
|
||||
:style="{ paddingBottom: `${keyboardHeight}px` }"
|
||||
>
|
||||
<view class="tui-chat-tabbar">
|
||||
<view :class="['tui-chat-tabbar', { isIos: 'tui-chat-ios-tabbar' }]">
|
||||
<view
|
||||
class="tui-icon tui-icon-im_more tui-icon-mr"
|
||||
@tap="showKeyBoard(3)"
|
||||
@ -191,12 +191,10 @@ export default {
|
||||
},
|
||||
created() {
|
||||
//键盘高度监听
|
||||
console.log(emoji.imgArr[1].emojiList);
|
||||
|
||||
this.faceList = emoji.imgArr[1].emojiList
|
||||
.reduce((acc, curr) => 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;
|
||||
|
||||
@ -1,5 +1,7 @@
|
||||
<template>
|
||||
<view class="IMmsgContent-container">
|
||||
<view
|
||||
:class="['IMmsgContent-container', { isIos: 'IMmsgContent-ios-container' }]"
|
||||
>
|
||||
<u-navbar :title="ImItemInfo.username" :autoBack="true"> </u-navbar>
|
||||
<view class="tui-chat-content" id="tui-chat-content">
|
||||
<!-- <tui-loadmore
|
||||
@ -9,7 +11,7 @@
|
||||
text=" "
|
||||
></tui-loadmore> -->
|
||||
<view>
|
||||
<view class="tui-label">对方已通过您的好友请求</view>
|
||||
<!-- <view class="tui-label">对方已通过您的好友请求</view> -->
|
||||
<view v-for="(item, index) of msgList" :key="index">
|
||||
<view class="tui-chat-center">{{
|
||||
formatTime(item.message_time)
|
||||
@ -165,6 +167,7 @@ export default {
|
||||
chattype: "user",
|
||||
isHideKeyBoard: false,
|
||||
emojiPath: "https://res.wx.qq.com/mpres/htmledition/images/icon/emotion/",
|
||||
isIos: false,
|
||||
};
|
||||
},
|
||||
onLoad: function (options) {
|
||||
@ -179,6 +182,13 @@ export default {
|
||||
this.getPcEmoji();
|
||||
// this.getImConfig();
|
||||
this.getImMsgList();
|
||||
|
||||
// #ifdef APP-PLUS
|
||||
const platform = uni.getSystemInfoSync().platform;
|
||||
if (platform == "ios") {
|
||||
this.isIos = true;
|
||||
}
|
||||
// #endif
|
||||
},
|
||||
computed: {
|
||||
...mapState("user", ["uid", "userInfo"]),
|
||||
@ -790,22 +800,34 @@ export default {
|
||||
}
|
||||
|
||||
this.$nextTick(() => {
|
||||
const query = uni.createSelectorQuery().in(this);
|
||||
query.select(".IMmsgContent-container").boundingClientRect();
|
||||
query.selectAll(".IMmsgContent-container view").boundingClientRect();
|
||||
query.exec((res) => {
|
||||
const scrollViewHeight = res[0].height;
|
||||
const scrollContentHeight = res[1].reduce(
|
||||
(total, item) => total + item.height,
|
||||
0
|
||||
);
|
||||
// const scrollTop = scrollContentHeight - scrollViewHeight;
|
||||
setTimeout(() => {
|
||||
// 增加延迟确保渲染完成
|
||||
const query = uni.createSelectorQuery().in(this);
|
||||
query.select(".IMmsgContent-container").boundingClientRect();
|
||||
query.selectAll(".IMmsgContent-container view").boundingClientRect();
|
||||
query.exec((res) => {
|
||||
if (!res[0] || !res[1]) return; // 容错处理
|
||||
|
||||
uni.pageScrollTo({
|
||||
scrollTop: scrollViewHeight,
|
||||
duration: 0,
|
||||
const scrollViewHeight = res[0].height; // 容器可视高度
|
||||
const scrollContentHeight = res[1].reduce(
|
||||
(total, item) => total + item.height + 10, // 加上间距
|
||||
0
|
||||
);
|
||||
|
||||
// 关键修正:滚动到内容底部
|
||||
const targetScrollTop = Math.max(
|
||||
0,
|
||||
scrollContentHeight - scrollViewHeight
|
||||
);
|
||||
|
||||
uni.pageScrollTo({
|
||||
scrollTop: scrollViewHeight,
|
||||
duration: 0, // 适当动画时长
|
||||
success: () => console.log("滚动到底部成功"),
|
||||
fail: (err) => console.error("滚动失败:", err),
|
||||
});
|
||||
});
|
||||
});
|
||||
}, 100); // 安卓/iOS可能需要更长延迟
|
||||
});
|
||||
},
|
||||
formatTime(time) {
|
||||
@ -847,12 +869,17 @@ export default {
|
||||
.IMmsgContent-container {
|
||||
padding-left: 20rpx;
|
||||
padding-right: 20rpx;
|
||||
padding-bottom: 220rpx;
|
||||
padding-bottom: 146rpx;
|
||||
box-sizing: border-box;
|
||||
background-color: #fafafa;
|
||||
font-size: 1rem;
|
||||
font-family: -apple-system-font, Helvetica Neue, Helvetica, sans-serif;
|
||||
|
||||
.u-navbar {
|
||||
height: 88rpx;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
/*chatbox*/
|
||||
.tui-chat-content {
|
||||
width: 100%;
|
||||
@ -1034,10 +1061,6 @@ export default {
|
||||
flex-direction: row-reverse;
|
||||
}
|
||||
|
||||
.chat-bubble-box {
|
||||
background: red;
|
||||
}
|
||||
|
||||
._root /deep/ {
|
||||
.chat-bubble-box {
|
||||
display: flex;
|
||||
@ -1062,4 +1085,8 @@ export default {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.IMmsgContent-ios-container {
|
||||
padding-bottom: 220rpx;
|
||||
}
|
||||
</style>
|
||||
|
||||
@ -1,53 +1,44 @@
|
||||
|
||||
import { GetLogin ,GetSmsCode } from '../../api/login';
|
||||
import { GetAuditStatus } from '../../api/audit';
|
||||
import $cookies from '../../utils/vue-cookies'
|
||||
|
||||
const defaultState = () =>{
|
||||
return{
|
||||
accountInfo:uni.getStorageSync("accountDashboard") || {
|
||||
data:{},
|
||||
notice:{},
|
||||
order:{},
|
||||
product:{
|
||||
illegal_num:0,
|
||||
normal_num:0,
|
||||
off_num:0,
|
||||
total_num:0,
|
||||
verify_passed_off_num:0,
|
||||
verify_refused_num:0,
|
||||
verify_waiting_num:0
|
||||
const defaultState = () => {
|
||||
return {
|
||||
accountInfo: uni.getStorageSync('accountDashboard') || {
|
||||
data: {},
|
||||
notice: {},
|
||||
order: {},
|
||||
product: {
|
||||
illegal_num: 0,
|
||||
normal_num: 0,
|
||||
off_num: 0,
|
||||
total_num: 0,
|
||||
verify_passed_off_num: 0,
|
||||
verify_refused_num: 0,
|
||||
verify_waiting_num: 0,
|
||||
},
|
||||
return:{
|
||||
fin_num:0,
|
||||
review_num:0,
|
||||
total_num:0,
|
||||
un_fin_num:0
|
||||
return: {
|
||||
fin_num: 0,
|
||||
review_num: 0,
|
||||
total_num: 0,
|
||||
un_fin_num: 0,
|
||||
},
|
||||
store_info:{
|
||||
store_id:1,
|
||||
wx_qrcode:''
|
||||
store_info: {
|
||||
store_id: 1,
|
||||
wx_qrcode: '',
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
const state = defaultState();
|
||||
|
||||
const getters = {}
|
||||
const getters = {};
|
||||
|
||||
const mutations = {
|
||||
const mutations = {};
|
||||
|
||||
}
|
||||
|
||||
const actions = {
|
||||
|
||||
}
|
||||
const actions = {};
|
||||
|
||||
export default {
|
||||
namespaced: true,
|
||||
state,
|
||||
getters,
|
||||
mutations,
|
||||
actions
|
||||
}
|
||||
actions,
|
||||
};
|
||||
|
||||
@ -1,6 +1,5 @@
|
||||
import { GetLogin, GetSmsCode, GetAccountLogin } from '../../api/login';
|
||||
import { GetLogin, GetAccountLogin } from '../../api/login';
|
||||
import { OutLogin } from '../../api/user';
|
||||
import { GetAuditInfo } from '../../api/audit';
|
||||
import { GetAuditStatus } from '../../api/audit';
|
||||
// import $cookies from '../../utils/vue-cookies'
|
||||
|
||||
|
||||
@ -1,83 +1,66 @@
|
||||
import axios from 'axios'
|
||||
import config from '../config/config'
|
||||
import axiosAdapterUniapp from 'axios-adapter-uniapp'
|
||||
import axios from 'axios';
|
||||
import config from '../config/config';
|
||||
import axiosAdapterUniapp from 'axios-adapter-uniapp';
|
||||
const service = axios.create({
|
||||
baseURL: config.baseApi, // url = base url + request url
|
||||
headers: {
|
||||
'X-Requested-With': 'XMLHttpRequest',
|
||||
'Content-Type': 'application/json-patch+json'
|
||||
'Content-Type': 'application/json-patch+json',
|
||||
},
|
||||
adapter: axiosAdapterUniapp,
|
||||
timeout: 5000 // request timeout
|
||||
})
|
||||
timeout: 5000, // request timeout
|
||||
});
|
||||
|
||||
// request interceptor
|
||||
service.interceptors.request.use(
|
||||
config => {
|
||||
|
||||
if(uni.getStorageSync('ukey')){
|
||||
config.headers['Authorization'] = 'Bearer ' + uni.getStorageSync('ukey')
|
||||
(config) => {
|
||||
if (uni.getStorageSync('ukey')) {
|
||||
config.headers['Authorization'] = 'Bearer ' + uni.getStorageSync('ukey');
|
||||
}
|
||||
|
||||
|
||||
// if(config.params && !config.params.isFilter && !uni.getStorageSync('ukey')){
|
||||
// uni.redirectTo({
|
||||
// url:'/pages/login/login'
|
||||
// })
|
||||
// }
|
||||
|
||||
// if(config.data && !config.data.isFilter && !uni.getStorageSync('ukey')){
|
||||
// uni.redirectTo({
|
||||
// url:'/pages/login/login'
|
||||
// })
|
||||
// }
|
||||
// do something before request is sent
|
||||
|
||||
|
||||
return config
|
||||
return config;
|
||||
},
|
||||
error => {
|
||||
(error) => {
|
||||
// do something with request error
|
||||
console.log(error) // for debug
|
||||
return Promise.reject(error)
|
||||
console.log(error); // for debug
|
||||
return Promise.reject(error);
|
||||
}
|
||||
)
|
||||
);
|
||||
|
||||
// response interceptor
|
||||
service.interceptors.response.use(
|
||||
response => {
|
||||
(response) => {
|
||||
const res = response.data;
|
||||
|
||||
const res = response.data
|
||||
|
||||
if(res.status == 250 ){
|
||||
if (res.status == 250) {
|
||||
uni.showToast({
|
||||
title: `提示${res.msg}`,
|
||||
icon:'error',
|
||||
duration: 1000
|
||||
icon: 'error',
|
||||
duration: 1000,
|
||||
});
|
||||
}
|
||||
if(res.code == 30){
|
||||
if (res.code == 30) {
|
||||
uni.showToast({
|
||||
title: `token已经过期需要重新登录`,
|
||||
icon:'error',
|
||||
duration: 1000
|
||||
icon: 'error',
|
||||
duration: 1000,
|
||||
});
|
||||
|
||||
uni.removeStorageSync("ukey");
|
||||
uni.removeStorageSync('ukey');
|
||||
|
||||
uni.redirectTo({
|
||||
url:'/pages/login/login'
|
||||
})
|
||||
url: '/pages/login/login',
|
||||
});
|
||||
|
||||
return
|
||||
return;
|
||||
}
|
||||
|
||||
return res
|
||||
return res;
|
||||
},
|
||||
error => {
|
||||
console.log('err' + error) // for debug
|
||||
return Promise.reject(error)
|
||||
(error) => {
|
||||
console.log('err' + error); // for debug
|
||||
return Promise.reject(error);
|
||||
}
|
||||
)
|
||||
);
|
||||
|
||||
export default service
|
||||
export default service;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user