Compare commits

..

No commits in common. "aed3eee8caa1e3826af0e726d8c3606746ec638f" and "f70ad01c2967d7bc8b30b124b4389f6017c1e170" have entirely different histories.

19 changed files with 655 additions and 550 deletions

View File

@ -1,21 +1,23 @@
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) {
return http({
url: '/account/login/protocol',
method: 'get',
params,
});
}
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)
})
})
}

View File

@ -1,4 +1,4 @@
import http from '../utils/http';
import http from '../utils/http'
/**
* 获取省市区
@ -8,13 +8,20 @@ import http from '../utils/http';
* @see https://mall.gpxscs.cn/mobile/shop/shop-base-district/getAppDistrict
*/
export function GetAppDistrict() {
return http({
url: '/shop/shop-base-district/getAppDistrict',
method: 'get',
});
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)))
})
}
/**
* 店铺主营分类类目
* @author Seven
@ -23,13 +30,20 @@ export function GetAppDistrict() {
* @see https://mall.gpxscs.cn/mobile/shop/shop-base-product-category/listCategory
*/
export function GetMeritoCategory() {
return http({
url: '/shop/shop-base-product-category/listCategory',
method: 'get',
});
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)))
})
}
/**
* 店铺主营分类类目二级分类
* @author Seven
@ -39,47 +53,47 @@ export function GetMeritoCategory() {
* @see https://mall.gpxscs.cn/mobile/shop/shop-base-product-category/treeCategory
*/
export function GetTreeCategory() {
return http({
url: '/shop/shop-base-product-category/treeCategory',
method: 'get',
});
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)))
})
}
/**
* 获取百度地图输入点提示词
* @author Seven
* @data 2025-3-5
* @param {
* query: value, //关键词
* region: this.citys[0], //城市名
* city_limit: true, //指定的区域的返回结果
* ret_coordtype: "gcj02ll", //坐标类型 1WGS84ll即GPS经纬度2GCJ02ll即国测局经纬度坐标 3BD09ll即百度经纬度坐标 4BD09mc即百度米制坐标
*}
* @param { category_parent_id }
* @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-3-5
* @param { "mobile": "13128997057" }
* @data 2025-
* @returns { approval_invalid_col:[] ,approval_status":4, approval_remark:'', id:'' }
* approval_invalid_col 重新审核 映射需要用到 由B段admin 传过来
* approval_status 1-已通过2-未通过3-待审核4 -未申请
@ -87,22 +101,20 @@ 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)))
})
}
/**
@ -113,24 +125,23 @@ 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
@ -139,90 +150,56 @@ export function GetAuditInfo(params) {
* @see https://mall.gpxscs.cn/mobile/shop/global/banks/list
*/
export function GetBankList() {
http({
url: '/shop/global/banks/list',
method: 'post',
});
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)))
})
}
/**
* 提交审核
* @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 http({
url: '/shop/merch/apply',
method: 'post',
data: params,
});
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)))
})
}
/**
* 重新提交审核
* @author Seven
* @data 2025-3-4
* @param { auditId , ...form字段 }
* @returns { }
* @see https://mall.gpxscs.cn/mobile/shop/merch/re-apply
*/
export function GetRestartMerchApply(params) {
return http({
url: '/shop/merch/re-apply',
method: 'post',
data: params,
});
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)))
})
}
/**
@ -233,10 +210,16 @@ export function GetRestartMerchApply(params) {
* @see https://mall.gpxscs.cn/mobile/shop/store/biz-category/list
*/
export function GetBizCategoryList(params) {
return http({
url: '/shop/store/biz-category/list',
method: 'post',
data: params,
});
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)))
})
}

View File

@ -5,19 +5,21 @@ import config from '../config/config';
* 账号密码登录
* @author Seven
* @data 2025-1-6
* @param {
* marketId: marketId, // 各大安卓 APP 市场标识1 - 小米2 - 华为3 - 腾讯应用市场4 - OPPO5 - VIVO6 - 三星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 http({
url: '/admin/app-market-update/check/version',
method: 'post',
data: 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)));
});
}

View File

@ -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 http({
url: '/account/login/doForgetPassword',
method: 'post',
data: params,
});
}
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)))
})
}

View File

@ -1,56 +1,70 @@
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 http({
url: '/sns/im/getImConfig',
method: 'get',
params,
baseURL: config.baseApi,
});
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)))
})
}
/**
* 获取聊天记录
* @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 http({
url: 'https://mall.gpxscs.cn/api/mobile/sns/userMessage/listChatMsg',
method: 'get',
params,
baseURL: config.apiMobile,
});
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)))
})
}
/**
* 获取聊天记录
* @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 http({
url: 'https://mall.gpxscs.cn/api/mobile/sns/userMessage/add',
method: 'get',
params,
baseURL: config.apiMobile,
});
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)))
})
}

View File

@ -5,16 +5,22 @@ import config from '../config/config';
* 登录/注册同一个接口
* @author Seven
* @data 2025-1-28
* @param { number: 9999 } // 验证码
* @param number // 验证码
* @returns { }
* @see https://mall.gpxscs.cn/mobile/account/login/doMerchSmsRegisterAndLogin
*/
export function GetLogin(params) {
http({
url: '/account/login/doMerchSmsRegisterAndLogin',
method: 'post',
data: params,
return new Promise((resolve, reject) => {
http({
url: '/account/login/doMerchSmsRegisterAndLogin',
method: 'post',
data: params,
})
.then((res) => {
resolve(res);
})
.catch((e) => reject(console.warn(e)));
});
}
@ -22,16 +28,22 @@ 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) {
return http({
url: '/account/login/sendVerifyCode',
method: 'post',
data: 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)));
});
}
@ -39,22 +51,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 http({
url: '/account/account-user-base/doLogin',
method: 'post',
params,
baseURL: config.adminApi,
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)));
});
}
@ -62,16 +74,19 @@ 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 http({
url: '/shop/shop-base-config/image',
method: 'GET',
params,
baseURL: config.adminApi,
return new Promise((resolve, reject) => {
http({
url: '/shop/shop-base-config/image',
method: 'GET',
params,
baseURL: config.adminApi,
}).then((res) => {
resolve(res);
});
});
}

View File

@ -1,35 +1,32 @@
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 {
* storeId: 1, //店铺Id
* keyword: 'DD-', //搜索订单关键字
* pageNum: 1, //页码
* pageSize: 10, //页大小
* delivery: 1, // 1-同城配送2-物流配送
* status: 1, 1-进行中2-超时的订单3-退款的订单
* }
* @param
* @returns { }
* @see https://mall.gpxscs.cn/mobile/shop/userOrder/mch/order/list
*/
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) => {
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){
// export function GetOrderList (params){
// return new Promise((resolve, reject) => {
// http({
// url:'/mchapp/static/data/order.json',
@ -42,16 +39,17 @@ 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',
@ -63,3 +61,4 @@ export function GetOrderList(params) {
// }).catch(e => reject(console.warn(e)))
// })
// }

View File

View File

@ -1,20 +1,27 @@
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'}
* @param action: 'intro', source_ucc_code:$.getStorageSync('source_ucc_code')
* @returns { }
* @see https://mall.gpxscs.cn/mobile/account/config/info
*/
export function GetPlatformInfo(params) {
return http({
url: '/account/config/info',
method: 'get',
params,
baseURL: config.baseApi,
});
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)))
})
}

View File

@ -1,106 +1,116 @@
import http from '../utils/http';
import config from '../config/config';
import http from '../utils/http'
import config from '../config/config'
/**
* 获取打印机列表
* 登录/注册同一个接口
* @author Seven
* @data 2025-4-5
* @param {
* keyword: "",
* pageNum: 1,
* pageSize: 20,
* }
* @data 2025-3-29
* @param number // 验证码
* @returns { }
* @see https://mall.gpxscs.cn/api/admin/shop/store/printer/page
*/
export function GetPrinterList(params) {
return http({
url: '/shop/store/printer/page',
method: 'get',
params,
baseURL: config.adminApi,
});
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)))
})
}
/**
* 获取打印机区域列表 打印来源
* 获取打印机区域列表
* @author Seven
* @data 2025-4-5
* @param { count: 99 }
* @param
* @returns { }
* @see https://mall.gpxscs.cn/api/admin/shop/store/printer/region/list
*/
export function GetPrinterflagList(params) {
return http({
url: '/shop/store/printer/region/list',
method: 'get',
params,
baseURL: config.adminApi,
});
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)))
})
}
/**
* 获取打印机品牌列表
* @author Seven
* @data 2025-4-5
* @param { count: 99 }
* @param
* @returns { }
* @see https://mall.gpxscs.cn/api/admin/shop/store/printer/model/list
*/
export function GetPrinterModelList(params) {
return http({
url: '/shop/store/printer/model/list',
method: 'get',
params,
baseURL: config.adminApi,
});
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)))
})
}
/**
* 添加打印机
* @author Seven
* @data 2025-4-5
* @param {
* printer_name: "", 打票机备注名
* model_id: "", 打票机型号ID
* printer_sn: "", 打票机编号
* printer_key: "", 打票机密钥
* website_url: "", 打印机官网网址
* region: 0, 打票机摆放区域ID
* paper_with: 58, 纸张宽度 58 80
* }
* @param
* @returns { }
* @see https://mall.gpxscs.cn/api/admin/shop/store/printer/add/new
*/
export function AddPrinter(params) {
return http({
url: '/shop/store/printer/add/new',
method: 'post',
params,
baseURL: config.adminApi,
});
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)))
})
}
/**
* 删除打印机
* @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 http({
url: '/shop/store/printer/delete',
method: 'post',
params,
baseURL: config.adminApi,
});
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)))
})
}
/**
@ -112,36 +122,42 @@ export function DelectPrinter(params) {
* @see https://mall.gpxscs.cn/api/admin/shop/store/printer/update
*/
export function UpdatePrinter(params) {
return http({
url: '/shop/store/printer/update',
method: 'post',
params,
baseURL: config.adminApi,
});
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)))
})
}
/**
* 更新打印机状态
* @author Seven
* @data 2025-4-5
* @param {
* printer_id:0, 打票机自增ID
* status:1 状态1-开启2-关闭
* }
* @param {printer_id,status} 打票机自增ID
* @returns { }
* @see https://mall.gpxscs.cn/api/admin/shop/store/printer/status/update'
*/
export function UpdatePrinterStatus(params) {
return http({
url: '/shop/store/printer/status/update',
method: 'post',
params,
baseURL: config.adminApi,
});
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)))
})
}
/**
* 测试打印机
* @author Seven
@ -151,11 +167,15 @@ export function UpdatePrinterStatus(params) {
* @see https://mall.gpxscs.cn/api/admin/shop/store/printer/print/order
*/
export function TestPrinter(params) {
return http({
url: 'shop/store/printer/print/order',
method: 'post',
params,
baseURL: config.adminApi,
});
}
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)))
})
}

View File

@ -1,20 +1,24 @@
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 http({
url: '/account/login/protocol',
method: 'get',
params,
baseURL: config.baseApi,
});
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)))
})
}

View File

@ -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,83 +9,101 @@ import config from '../config/config';
* @see https://mall.gpxscs.cn/api/admin/shop/shop-store-base/get
*/
export function GetShopBaseInfo() {
return http({
url: '/shop/shop-store-base/get?source_lang=zh_CN',
method: 'get',
baseURL: config.adminApi,
});
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)))
})
}
/**
* 修改商店基础信息
* @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 http({
url: '/shop/shop-store-base/storeSetUp',
method: 'post',
params,
baseURL: config.adminApi,
});
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)))
})
}
/**
* 获取商家端今日订单量
* 获取商家端订单量
* @author Seven
* @data 2025-4-30
* @returns { }
* @see https://mall.gpxscs.cn/api/admin/shop/analytics/order/getOrderNumToday
*/
export function GetShopOrderNum() {
return http({
url: '/shop/analytics/order/getOrderNumToday',
method: 'get',
baseURL: config.adminApi,
});
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)))
})
}
/**
* 获取商家端今日销售额
* 获取商家端订单量
* @author Seven
* @data 2025-4-30
* @returns { }
* @see https://mall.gpxscs.cn/api/admin/pay/analytics/trade/getSalesAmount
*/
export function GetSalesAmountFun(params) {
return http({
url: '/pay/analytics/trade/getSalesAmount',
method: 'get',
params,
baseURL: config.adminApi,
});
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)))
})
}
/**
* 获取商家端今日退货单数
* 获取商家端退货单数
* @author Seven
* @data 2025-4-30
* @returns { }
* @see https://mall.gpxscs.cn/api/admin/shop/analytics/return/getReturnNumToday
*/
export function GetOrderReturnNum(params) {
return http({
url: 'shop/analytics/return/getReturnNumToday',
method: 'get',
params,
baseURL: config.adminApi,
});
}
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)))
})
}

View File

@ -1,32 +1,29 @@
/**
* 上传接口
* 上传图片
* @author Seven
* @data 2025-3-1
* @param {
* filePath:'文件路径'
* formData二进制
* }
* @param number // 验证码
* @returns { }
* @seehttps://mall.gpxscs.cn/mobile/shop/oss/upload
*/
export function UploadFilePromise(filePath, formData) {
let ukey = uni.getStorageSync('ukey');
return new Promise((resolve, reject) => {
export function UploadFilePromise (imgUrl,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: filePath,
name: 'upfile',
url:'https://mall.gpxscs.cn/mobile/shop/oss/upload',
method: "POST",
filePath: imgUrl,
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)
}
})
})
}

View File

@ -1,6 +1,48 @@
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
@ -9,14 +51,21 @@ import config from '../config/config';
* @see https://mall.gpxscs.cn/api/admin/shop/shop-order-info/dashboard
*/
export function GetAccountDashboard() {
return http({
url: '/shop/shop-order-info/dashboard',
method: 'get',
baseURL: config.adminApi,
});
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)))
})
}
/**
* 退出登录
* @author Seven
@ -25,9 +74,14 @@ export function GetAccountDashboard() {
* @see https://mall.gpxscs.cn/api/mobile/account/login/doLogout
*/
export function OutLogin() {
return http({
url: 'https://mall.gpxscs.cn/api/mobile/account/login/doLogout',
method: 'get',
});
}
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)))
})
}

View File

@ -4,7 +4,7 @@
class="tui-reply-tabbar"
:style="{ paddingBottom: `${keyboardHeight}px` }"
>
<view :class="['tui-chat-tabbar', { isIos: 'tui-chat-ios-tabbar' }]">
<view class="tui-chat-tabbar">
<view
class="tui-icon tui-icon-im_more tui-icon-mr"
@tap="showKeyBoard(3)"
@ -191,10 +191,12 @@ 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) => {
@ -207,13 +209,6 @@ export default {
}
}, 100);
});
// #ifdef APP-PLUS
const platform = uni.getSystemInfoSync().platform;
if (platform == "ios") {
this.isIos = true;
}
// #endif
},
data() {
return {
@ -225,7 +220,6 @@ export default {
isVoice: false,
isEmoji: false,
editorContent: "",
isIos: false,
};
},
watch: {
@ -424,7 +418,7 @@ export default {
display: flex;
align-items: flex-end;
padding: 16rpx 24rpx;
padding-bottom: 80rpx;
box-sizing: border-box;
&::after {
@ -486,10 +480,6 @@ export default {
}
}
.tui-chat-ios-tabbar {
padding-bottom: 80rpx;
}
.tui-reply-more {
width: 100%;
position: relative;

View File

@ -1,7 +1,5 @@
<template>
<view
:class="['IMmsgContent-container', { isIos: 'IMmsgContent-ios-container' }]"
>
<view class="IMmsgContent-container">
<u-navbar :title="ImItemInfo.username" :autoBack="true"> </u-navbar>
<view class="tui-chat-content" id="tui-chat-content">
<!-- <tui-loadmore
@ -11,7 +9,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)
@ -167,7 +165,6 @@ export default {
chattype: "user",
isHideKeyBoard: false,
emojiPath: "https://res.wx.qq.com/mpres/htmledition/images/icon/emotion/",
isIos: false,
};
},
onLoad: function (options) {
@ -182,13 +179,6 @@ 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"]),
@ -800,34 +790,22 @@ export default {
}
this.$nextTick(() => {
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; //
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;
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),
});
uni.pageScrollTo({
scrollTop: scrollViewHeight,
duration: 0,
});
}, 100); // /iOS
});
});
},
formatTime(time) {
@ -869,17 +847,12 @@ export default {
.IMmsgContent-container {
padding-left: 20rpx;
padding-right: 20rpx;
padding-bottom: 146rpx;
padding-bottom: 220rpx;
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%;
@ -1061,6 +1034,10 @@ export default {
flex-direction: row-reverse;
}
.chat-bubble-box {
background: red;
}
._root /deep/ {
.chat-bubble-box {
display: flex;
@ -1085,8 +1062,4 @@ export default {
}
}
}
.IMmsgContent-ios-container {
padding-bottom: 220rpx;
}
</style>

View File

@ -1,44 +1,53 @@
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,
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
},
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
}

View File

@ -1,5 +1,6 @@
import { GetLogin, GetAccountLogin } from '../../api/login';
import { GetLogin, GetSmsCode, 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'

View File

@ -1,66 +1,83 @@
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')
}
return config;
// 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
},
(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) => {
const res = response.data;
response => {
if (res.status == 250) {
const res = response.data
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