优化api 接口

This commit is contained in:
qijq 2025-05-09 17:16:48 +08:00
parent f70ad01c29
commit f041f5cc17
19 changed files with 547 additions and 650 deletions

View File

@ -1,23 +1,21 @@
import http from '../utils/http' import http from '../utils/http';
/** /**
* 获取用户协议 * 获取用户协议
* @author Seven * @author Seven
* @data 2025-1-6 * @data 2025-1-6
* @param {
* protocols_key :
* reg_protocols_description
* }
* @returns { } * @returns { }
* @see https://mall.gpxscs.cn/mobile/account/login/protocol * @see https://mall.gpxscs.cn/mobile/account/login/protocol
*/ */
export function GetAgreement (params){ export function GetAgreement(params) {
params.isFilter = true return http({
return new Promise((resolve, reject) => { url: '/account/login/protocol',
http({ method: 'get',
url:'/account/login/protocol', params,
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,20 +8,13 @@ import http from '../utils/http'
* @see https://mall.gpxscs.cn/mobile/shop/shop-base-district/getAppDistrict * @see https://mall.gpxscs.cn/mobile/shop/shop-base-district/getAppDistrict
*/ */
export function GetAppDistrict (params = {}){ export function GetAppDistrict() {
return new Promise((resolve, reject) => { return http({
http({ url: '/shop/shop-base-district/getAppDistrict',
url:'/shop/shop-base-district/getAppDistrict', method: 'get',
method:'get', });
params,
baseURL:process.env.VUE_APP_BACK_BASE_API
}).then(res=>{
resolve(res)
}).catch(e => reject(console.warn(e)))
})
} }
/** /**
* 店铺主营分类类目 * 店铺主营分类类目
* @author Seven * @author Seven
@ -30,20 +23,13 @@ export function GetAppDistrict (params = {}){
* @see https://mall.gpxscs.cn/mobile/shop/shop-base-product-category/listCategory * @see https://mall.gpxscs.cn/mobile/shop/shop-base-product-category/listCategory
*/ */
export function GetMeritoCategory (params = {}){ export function GetMeritoCategory() {
return new Promise((resolve, reject) => { return http({
http({ url: '/shop/shop-base-product-category/listCategory',
url:'/shop/shop-base-product-category/listCategory', method: 'get',
method:'get', });
params,
baseURL:process.env.VUE_APP_BACK_BASE_API
}).then(res=>{
resolve(res)
}).catch(e => reject(console.warn(e)))
})
} }
/** /**
* 店铺主营分类类目二级分类 * 店铺主营分类类目二级分类
* @author Seven * @author Seven
@ -53,47 +39,47 @@ export function GetMeritoCategory (params = {}){
* @see https://mall.gpxscs.cn/mobile/shop/shop-base-product-category/treeCategory * @see https://mall.gpxscs.cn/mobile/shop/shop-base-product-category/treeCategory
*/ */
export function GetTreeCategory (params = {}){ export function GetTreeCategory() {
return http({
return new Promise((resolve, reject) => { url: '/shop/shop-base-product-category/treeCategory',
http({ method: 'get',
url:'/shop/shop-base-product-category/treeCategory', });
method:'get',
params,
}).then(res=>{
resolve(res)
}).catch(e => reject(console.warn(e)))
})
} }
/** /**
* 获取百度地图输入点提示词 * 获取百度地图输入点提示词
* @author Seven * @author Seven
* @data 2025-3-5 * @data 2025-3-5
* @param { category_parent_id } * @param {
* query: value, //关键词
* region: this.citys[0], //城市名
* city_limit: true, //指定的区域的返回结果
* ret_coordtype: "gcj02ll", //坐标类型 1WGS84ll即GPS经纬度2GCJ02ll即国测局经纬度坐标 3BD09ll即百度经纬度坐标 4BD09mc即百度米制坐标
*}
* @returns { query,region } * @returns { query,region }
* @see https://mall.gpxscs.cn/mobile/shop/merch/baidu/place/v2/suggestion * @see https://mall.gpxscs.cn/mobile/shop/merch/baidu/place/v2/suggestion
*/ */
export function GetBaiduSuggestion (params = {}){ export function GetBaiduSuggestion(params = {}) {
params.isFilter = true params.isFilter = true;
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
http({ http({
url:'/shop/merch/baidu/place/v2/suggestion', url: '/shop/merch/baidu/place/v2/suggestion',
method:'get', method: 'get',
params, params,
}).then(res=>{ })
resolve(res) .then((res) => {
}).catch(e => reject(console.warn(e))) resolve(res);
}) })
.catch((e) => reject(console.warn(e)));
});
} }
/** /**
* 获取入驻审核状态 * 获取入驻审核状态
* @author Seven * @author Seven
* @data 2025- * @data 2025-3-5
* @param { "mobile": "13128997057" }
* @returns { approval_invalid_col:[] ,approval_status":4, approval_remark:'', id:'' } * @returns { approval_invalid_col:[] ,approval_status":4, approval_remark:'', id:'' }
* approval_invalid_col 重新审核 映射需要用到 由B段admin 传过来 * approval_invalid_col 重新审核 映射需要用到 由B段admin 传过来
* approval_status 1-已通过2-未通过3-待审核4 -未申请 * 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 * @see https://mall.gpxscs.cn/mobile/shop/merch/fresh/approval/status
*/ */
export function GetAuditStatus (params = {}){ export function GetAuditStatus(params = {}) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
http({ http({
url:'/shop/merch/fresh/approval/status', url: '/shop/merch/fresh/approval/status',
method:'post', method: 'post',
data:params, data: params,
}).then(res=>{ })
if(res && res.status == 200){ .then((res) => {
uni.setStorageSync("approvalStatus",res.data.approval_status); if (res && res.status == 200) {
uni.setStorageSync("approvalStatusInfo",res.data); uni.setStorageSync('approvalStatus', res.data.approval_status);
} uni.setStorageSync('approvalStatusInfo', res.data);
resolve(res) }
}).catch(e => reject(console.warn(e))) 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 * @see https://mall.gpxscs.cn/mobile/shop/merch/detail
*/ */
export function GetAuditInfo(params){ export function GetAuditInfo(params) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
http({ http({
url:'/shop/merch/detail', url: '/shop/merch/detail',
method:'post', method: 'post',
data:params, data: params,
}).then(res=>{ })
if(res && res.status == 200){ .then((res) => {
uni.setStorageSync("approvalStatus",res.data.approval_status); if (res && res.status == 200) {
uni.setStorageSync("approvalStatusInfo",res.data); uni.setStorageSync('approvalStatus', res.data.approval_status);
} uni.setStorageSync('approvalStatusInfo', res.data);
resolve(res) }
}).catch(e => reject(console.warn(e))) resolve(res);
}) })
.catch((e) => reject(console.warn(e)));
});
} }
/** /**
* 获取银行列表 * 获取银行列表
* @author Seven * @author Seven
@ -150,56 +139,90 @@ export function GetAuditInfo(params){
* @see https://mall.gpxscs.cn/mobile/shop/global/banks/list * @see https://mall.gpxscs.cn/mobile/shop/global/banks/list
*/ */
export function GetBankList(params){ export function GetBankList() {
return new Promise((resolve, reject) => { http({
http({ url: '/shop/global/banks/list',
url:'/shop/global/banks/list', method: 'post',
method:'post', });
data:params,
}).then(res=>{
resolve(res)
}).catch(e => reject(console.warn(e)))
})
} }
/** /**
* 提交审核 * 提交审核
* @author Seven * @author Seven
* @data 2025-3-4 * @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 { } * @returns { }
* @see https://mall.gpxscs.cn/mobile/shop/merch/apply * @see https://mall.gpxscs.cn/mobile/shop/merch/apply
*/ */
export function GetMerchApply(params){ export function GetMerchApply(params) {
return new Promise((resolve, reject) => { return http({
http({ url: '/shop/merch/apply',
url:'/shop/merch/apply', method: 'post',
method:'post', data: params,
data:params, });
}).then(res=>{
resolve(res)
}).catch(e => reject(console.warn(e)))
})
} }
/** /**
* 重新提交审核 * 重新提交审核
* @author Seven * @author Seven
* @data 2025-3-4 * @data 2025-3-4
* @returns { } * @param { auditId , ...form字段 }
* @see https://mall.gpxscs.cn/mobile/shop/merch/re-apply * @see https://mall.gpxscs.cn/mobile/shop/merch/re-apply
*/ */
export function GetRestartMerchApply(params){ export function GetRestartMerchApply(params) {
return new Promise((resolve, reject) => { return http({
http({ url: '/shop/merch/re-apply',
url:'/shop/merch/re-apply', method: 'post',
method:'post', data: params,
data:params, });
}).then(res=>{
resolve(res)
}).catch(e => reject(console.warn(e)))
})
} }
/** /**
@ -210,16 +233,10 @@ export function GetRestartMerchApply(params){
* @see https://mall.gpxscs.cn/mobile/shop/store/biz-category/list * @see https://mall.gpxscs.cn/mobile/shop/store/biz-category/list
*/ */
export function GetBizCategoryList(params){ export function GetBizCategoryList(params) {
return new Promise((resolve, reject) => { return http({
http({ url: '/shop/store/biz-category/list',
url:'/shop/store/biz-category/list', method: 'post',
method:'post', data: params,
data:params, });
}).then(res=>{
resolve(res)
}).catch(e => reject(console.warn(e)))
})
} }

View File

@ -5,21 +5,19 @@ import config from '../config/config';
* 账号密码登录 * 账号密码登录
* @author Seven * @author Seven
* @data 2025-1-6 * @data 2025-1-6
* @param {
* marketId: marketId, // 各大安卓 APP 市场标识1 - 小米2 - 华为3 - 腾讯应用市场4 - OPPO5 - VIVO6 - 三星100-通用包(不区分市场的包);
* packageName: 'com.xiaofa.shopAdmin', //包名
* currVersionKey: version, // 热更新包内部整数版本号1-10000000
}
* @returns { } * @returns { }
* @see https://mall.gpxscs.cn/mobile/admin/app-market-update/check/version * @see https://mall.gpxscs.cn/mobile/admin/app-market-update/check/version
*/ */
export function GetAPPversion(params) { export function GetAPPversion(params) {
return new Promise((resolve, reject) => { return http({
http({ url: '/admin/app-market-update/check/version',
url: '/admin/app-market-update/check/version', method: 'post',
method: 'post', data: params,
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 * @author Seven
* @data 2025-1-6 * @data 2025-1-6
* @param {
* "number": "13128997057", // 注册手机号码或用户账号或邮箱
* "verify_code": "7828", // 手机或邮箱收到的验证码
* "new_password": "123456" // 修改的新密码
}
* @returns { } * @returns { }
* @see https://mall.gpxscs.cn/mobile/account/login/doForgetPassword * @see https://mall.gpxscs.cn/mobile/account/login/doForgetPassword
*/ */
export function GetForgePassword (params){ export function GetForgePassword(params) {
return new Promise((resolve, reject) => { return http({
params.isFilter = true url: '/account/login/doForgetPassword',
http({ method: 'post',
url:'/account/login/doForgetPassword', data: params,
method:'post', });
data:params, }
}).then(res=>{
resolve(res)
}).catch(e => reject(console.warn(e)))
})
}

View File

@ -1,70 +1,56 @@
import http from '../utils/http';
import http from '../utils/http'
import config from '../config/config'; import config from '../config/config';
/** /**
* 获取聊天配置 * 获取聊天配置
* @author Seven * @author Seven
* @data 2025-1-27 * @data 2025-1-27
* @param { type: "json", uid: uid }
* @returns { } * @returns { }
* @see https://mall.gpxscs.cn/api/mobile/sns/im/getImConfig?typ=json&uid=10001 * @see https://mall.gpxscs.cn/api/mobile/sns/im/getImConfig?typ=json&uid=10001
*/ */
export function GetImConfig (params){ export function GetImConfig(params) {
return new Promise((resolve, reject) => { return http({
http({ url: '/sns/im/getImConfig',
url:'/sns/im/getImConfig', method: 'get',
method:'get', params,
params, baseURL: config.baseApi,
baseURL:config.baseApi });
}).then(res=>{
resolve(res)
}).catch(e => reject(console.warn(e)))
})
} }
/** /**
* 获取聊天记录 * 获取聊天记录
* @author Seven * @author Seven
* @data 2025-1-27 * @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 { } * @returns { }
* @see https://mall.gpxscs.cn/api/mobile/sns/userMessage/listChatMsg?typ=json&user_other_id=10028&type=friend&page=1 * @see https://mall.gpxscs.cn/api/mobile/sns/userMessage/listChatMsg?typ=json&user_other_id=10028&type=friend&page=1
*/ */
export function GetImMsgList (params){ export function GetImMsgList(params) {
return new Promise((resolve, reject) => { return http({
http({ url: 'https://mall.gpxscs.cn/api/mobile/sns/userMessage/listChatMsg',
url:'https://mall.gpxscs.cn/api/mobile/sns/userMessage/listChatMsg', method: 'get',
method:'get', params,
params, baseURL: config.apiMobile,
baseURL:config.apiMobile });
}).then(res=>{
resolve(res)
}).catch(e => reject(console.warn(e)))
})
} }
/** /**
* 获取聊天记录 * 获取聊天记录
* @author Seven * @author Seven
* @data 2025-1-27 * @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 { } * @returns { }
* @see https://mall.gpxscs.cn/api/mobile/sns/userMessage/add * @see https://mall.gpxscs.cn/api/mobile/sns/userMessage/add
*/ */
export function GetSendMsgAdd (params){ export function GetSendMsgAdd(params) {
return new Promise((resolve, reject) => { return http({
http({ url: 'https://mall.gpxscs.cn/api/mobile/sns/userMessage/add',
url:'https://mall.gpxscs.cn/api/mobile/sns/userMessage/add', method: 'get',
method:'get', params,
params, baseURL: config.apiMobile,
baseURL:config.apiMobile });
}).then(res=>{
resolve(res)
}).catch(e => reject(console.warn(e)))
})
} }

View File

@ -5,7 +5,7 @@ import config from '../config/config';
* 登录/注册同一个接口 * 登录/注册同一个接口
* @author Seven * @author Seven
* @data 2025-1-28 * @data 2025-1-28
* @param number // 验证码 * @param { number: 9999 } // 验证码
* @returns { } * @returns { }
* @see https://mall.gpxscs.cn/mobile/account/login/doMerchSmsRegisterAndLogin * @see https://mall.gpxscs.cn/mobile/account/login/doMerchSmsRegisterAndLogin
*/ */
@ -16,11 +16,7 @@ export function GetLogin(params) {
url: '/account/login/doMerchSmsRegisterAndLogin', url: '/account/login/doMerchSmsRegisterAndLogin',
method: 'post', method: 'post',
data: params, data: params,
}) });
.then((res) => {
resolve(res);
})
.catch((e) => reject(console.warn(e)));
}); });
} }
@ -28,22 +24,16 @@ export function GetLogin(params) {
* 获取验证码 * 获取验证码
* @author Seven * @author Seven
* @data 2025-1-6 * @data 2025-1-6
* @param { number: '13112341234', } 手机号
* @returns { } * @returns { }
* @see https://mall.gpxscs.cn/mobile/account/login/sendVerifyCode * @see https://mall.gpxscs.cn/mobile/account/login/sendVerifyCode
*/ */
export function GetSmsCode(params) { export function GetSmsCode(params) {
params.isFilter = true; return http({
return new Promise((resolve, reject) => { url: '/account/login/sendVerifyCode',
http({ method: 'post',
url: '/account/login/sendVerifyCode', data: params,
method: 'post',
data: params,
})
.then((res) => {
resolve(res);
})
.catch((e) => reject(console.warn(e)));
}); });
} }
@ -51,22 +41,22 @@ export function GetSmsCode(params) {
* 账号密码登录 * 账号密码登录
* @author Seven * @author Seven
* @data 2025-1-6 * @data 2025-1-6
* @param {
* user_account: 'seven',
* user_password: 111111,
* verify_code: cxs1, //验证码
* verify_token: 1746780029143, // 时间戳
* }
* @returns { } * @returns { }
* @see https://mall.gpxscs.cn/api/admin/account/account-user-base/doLogin * @see https://mall.gpxscs.cn/api/admin/account/account-user-base/doLogin
*/ */
export function GetAccountLogin(params) { export function GetAccountLogin(params) {
return new Promise((resolve, reject) => { return http({
http({ url: '/account/account-user-base/doLogin',
url: '/account/account-user-base/doLogin', method: 'post',
method: 'post', params,
params, baseURL: config.adminApi,
baseURL: config.adminApi,
})
.then((res) => {
resolve(res);
})
.catch((e) => reject(console.warn(e)));
}); });
} }
@ -74,19 +64,16 @@ export function GetAccountLogin(params) {
* 获取图形验证码 * 获取图形验证码
* @author Seven * @author Seven
* @data 2025-1-6 * @data 2025-1-6
* @param { verify_token:new Date().getTime() }
* @returns { } * @returns { }
* @see https://mall.gpxscs.cn/api/admin/shop/shop-base-config/image * @see https://mall.gpxscs.cn/api/admin/shop/shop-base-config/image
*/ */
export function GetVerifyCode(params) { export function GetVerifyCode(params) {
return new Promise((resolve, reject) => { return http({
http({ url: '/shop/shop-base-config/image',
url: '/shop/shop-base-config/image', method: 'GET',
method: 'GET', params,
params, baseURL: config.adminApi,
baseURL: config.adminApi,
}).then((res) => {
resolve(res);
});
}); });
} }

View File

@ -1,32 +1,35 @@
import http from '../utils/http' import http from '../utils/http';
import config from '../config/config' import config from '../config/config';
/** /**
* 获取订单列表 * 获取订单列表
* @author Seven * @author Seven
* @data 2025-3-28 * @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 { } * @returns { }
* @see https://mall.gpxscs.cn/mobile/shop/userOrder/mch/order/list * @see https://mall.gpxscs.cn/mobile/shop/userOrder/mch/order/list
*/ */
export function GetOrderList (params){ export function GetOrderList(params) {
return new Promise((resolve, reject) => { return http({
http({ url: '/shop/userOrder/mch/order/list',
url:'/shop/userOrder/mch/order/list', method: 'post',
method:'post', data: params,
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) => { // return new Promise((resolve, reject) => {
// http({ // http({
// url:'/mchapp/static/data/order.json', // url:'/mchapp/static/data/order.json',
@ -39,17 +42,16 @@ export function GetOrderList (params){
// }) // })
// } // }
/** /**
* 获取订单SSE * 获取订单SSE
* @author Seven * @author Seven
* @data 2025-3-28 * @data 2025-3-28
* @param channel * @param channel
* @returns { } * @returns { }
* @see https://mall.gpxscs.cn/api/mobile/shop/sf-express/order/status/listening * @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) => { // return new Promise((resolve, reject) => {
// http({ // http({
// url:'/shop/userOrder/mch/order/list', // url:'/shop/userOrder/mch/order/list',
@ -61,4 +63,3 @@ export function GetOrderList (params){
// }).catch(e => reject(console.warn(e))) // }).catch(e => reject(console.warn(e)))
// }) // })
// } // }

View File

@ -1,27 +1,20 @@
import http from '../utils/http';
import http from '../utils/http' import config from '../config/config';
import config from '../config/config'
/** /**
* 获取平台信息 * 获取平台信息
* @author Seven * @author Seven
* @data 2025-1-28 * @data 2025-1-28
* @param action: 'intro', source_ucc_code:$.getStorageSync('source_ucc_code') * @param { action: 'intro'}
* @returns { } * @returns { }
* @see https://mall.gpxscs.cn/mobile/account/config/info * @see https://mall.gpxscs.cn/mobile/account/config/info
*/ */
export function GetPlatformInfo(params){ export function GetPlatformInfo(params) {
return new Promise((resolve, reject) => { return http({
http({ url: '/account/config/info',
url:'/account/config/info', method: 'get',
method:'get', params,
params, baseURL: config.baseApi,
baseURL:config.baseApi });
}).then(res=>{
resolve(res)
}).catch(e => reject(console.warn(e)))
})
} }

View File

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

View File

@ -1,24 +1,20 @@
import http from '../utils/http' import http from '../utils/http';
import config from '../config/config' import config from '../config/config';
/** /**
* 获取隐私协议 * 获取隐私协议
* @author Seven * @author Seven
* @data 2025-1-28 * @data 2025-1-28
* @param protocols_key : 'reg_description' * @param { protocols_key : 'reg_description'}
* @returns { } * @returns { }
* @see https://mall.gpxscs.cn/mobile/account/login/protoco * @see https://mall.gpxscs.cn/mobile/account/login/protoco
*/ */
export function GetProtoco(params){ export function GetProtoco(params) {
return new Promise((resolve, reject) => { return http({
http({ url: '/account/login/protocol',
url:'/account/login/protocol', method: 'get',
method:'get', params,
params, baseURL: config.baseApi,
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 http from '../utils/http';
import config from '../config/config' 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 * @see https://mall.gpxscs.cn/api/admin/shop/shop-store-base/get
*/ */
export function GetShopBaseInfo(params){ export function GetShopBaseInfo() {
return new Promise((resolve, reject) => { return http({
http({ url: '/shop/shop-store-base/get?source_lang=zh_CN',
url:'/shop/shop-store-base/get?source_lang=zh_CN', method: 'get',
method:'get', baseURL: config.adminApi,
params, });
baseURL:config.adminApi
}).then(res=>{
resolve(res)
}).catch(e => reject(console.warn(e)))
})
} }
/** /**
* 修改商店基础信息 * 修改商店基础信息
* @author Seven * @author Seven
* @data 2025-3-27 * @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 { } * @returns { }
* @see https://mall.gpxscs.cn/api/admin/shop/shop-store-base/storeSetUp * @see https://mall.gpxscs.cn/api/admin/shop/shop-store-base/storeSetUp
*/ */
export function UpdataShopInfo(params){ export function UpdataShopInfo(params) {
return new Promise((resolve, reject) => { return http({
http({ url: '/shop/shop-store-base/storeSetUp',
url:'/shop/shop-store-base/storeSetUp', method: 'post',
method:'post', params,
params, baseURL: config.adminApi,
baseURL:config.adminApi });
}).then(res=>{
resolve(res)
}).catch(e => reject(console.warn(e)))
})
} }
/** /**
* 获取商家端订单量 * 获取商家端今日订单量
* @author Seven * @author Seven
* @data 2025-4-30 * @data 2025-4-30
* @returns { } * @returns { }
* @see https://mall.gpxscs.cn/api/admin/shop/analytics/order/getOrderNumToday * @see https://mall.gpxscs.cn/api/admin/shop/analytics/order/getOrderNumToday
*/ */
export function GetShopOrderNum(params){ export function GetShopOrderNum() {
return new Promise((resolve, reject) => { return http({
http({ url: '/shop/analytics/order/getOrderNumToday',
url:'/shop/analytics/order/getOrderNumToday', method: 'get',
method:'get', baseURL: config.adminApi,
params, });
baseURL:config.adminApi
}).then(res=>{
resolve(res)
}).catch(e => reject(console.warn(e)))
})
} }
/** /**
* 获取商家端订单量 * 获取商家端今日销售额
* @author Seven * @author Seven
* @data 2025-4-30 * @data 2025-4-30
* @returns { } * @returns { }
* @see https://mall.gpxscs.cn/api/admin/pay/analytics/trade/getSalesAmount * @see https://mall.gpxscs.cn/api/admin/pay/analytics/trade/getSalesAmount
*/ */
export function GetSalesAmountFun(params){ export function GetSalesAmountFun(params) {
return new Promise((resolve, reject) => { return http({
http({ url: '/pay/analytics/trade/getSalesAmount',
url:'/pay/analytics/trade/getSalesAmount', method: 'get',
method:'get', params,
params, baseURL: config.adminApi,
baseURL:config.adminApi });
}).then(res=>{
resolve(res)
}).catch(e => reject(console.warn(e)))
})
} }
/** /**
* 获取商家端退货单数 * 获取商家端今日退货单数
* @author Seven * @author Seven
* @data 2025-4-30 * @data 2025-4-30
* @returns { } * @returns { }
* @see https://mall.gpxscs.cn/api/admin/shop/analytics/return/getReturnNumToday * @see https://mall.gpxscs.cn/api/admin/shop/analytics/return/getReturnNumToday
*/ */
export function GetOrderReturnNum(params){ export function GetOrderReturnNum(params) {
return new Promise((resolve, reject) => { return http({
http({ url: 'shop/analytics/return/getReturnNumToday',
url:'shop/analytics/return/getReturnNumToday', method: 'get',
method:'get', params,
params, baseURL: config.adminApi,
baseURL:config.adminApi });
}).then(res=>{ }
resolve(res)
}).catch(e => reject(console.warn(e)))
})
}

View File

@ -1,29 +1,32 @@
/** /**
* 上传图片 * 上传接口
* @author Seven * @author Seven
* @data 2025-3-1 * @data 2025-3-1
* @param number // 验证码 * @param {
* filePath:'文件路径'
* formData二进制
* }
* @returns { } * @returns { }
* @seehttps://mall.gpxscs.cn/mobile/shop/oss/upload * @seehttps://mall.gpxscs.cn/mobile/shop/oss/upload
*/ */
export function UploadFilePromise (imgUrl,formData){ export function UploadFilePromise(filePath, formData) {
let ukey = uni.getStorageSync("ukey"); let ukey = uni.getStorageSync('ukey');
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
uni.uploadFile({ uni.uploadFile({
// 完整上传路径 H5端需要解决跨域问题 // 完整上传路径 H5端需要解决跨域问题
url:'https://mall.gpxscs.cn/mobile/shop/oss/upload', url: 'https://mall.gpxscs.cn/mobile/shop/oss/upload',
method: "POST", method: 'POST',
filePath: imgUrl, filePath: filePath,
name: "upfile", name: 'upfile',
formData: { perm_key: ukey, ...formData }, formData: { perm_key: ukey, ...formData },
success:res =>{ success: (res) => {
const result = JSON.parse(res.data); const result = JSON.parse(res.data);
resolve(result) resolve(result);
}, },
fail:res =>{ fail: (res) => {
reject(res) reject(res);
} },
}) });
}) });
} }

View File

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

View File

@ -4,7 +4,7 @@
class="tui-reply-tabbar" class="tui-reply-tabbar"
:style="{ paddingBottom: `${keyboardHeight}px` }" :style="{ paddingBottom: `${keyboardHeight}px` }"
> >
<view class="tui-chat-tabbar"> <view :class="['tui-chat-tabbar', { isIos: 'tui-chat-ios-tabbar' }]">
<view <view
class="tui-icon tui-icon-im_more tui-icon-mr" class="tui-icon tui-icon-im_more tui-icon-mr"
@tap="showKeyBoard(3)" @tap="showKeyBoard(3)"
@ -191,12 +191,10 @@ export default {
}, },
created() { created() {
// //
console.log(emoji.imgArr[1].emojiList);
this.faceList = emoji.imgArr[1].emojiList this.faceList = emoji.imgArr[1].emojiList
.reduce((acc, curr) => acc.concat(curr), []) .reduce((acc, curr) => acc.concat(curr), [])
.filter((item) => item.alt != "[删除]"); .filter((item) => item.alt != "[删除]");
console.log("faceList", this.faceList);
let safeH = this.tui.isPhoneX() ? 34 : 0; let safeH = this.tui.isPhoneX() ? 34 : 0;
uni.onKeyboardHeightChange((res) => { uni.onKeyboardHeightChange((res) => {
@ -209,6 +207,13 @@ export default {
} }
}, 100); }, 100);
}); });
// #ifdef APP-PLUS
const platform = uni.getSystemInfoSync().platform;
if (platform == "ios") {
this.isIos = true;
}
// #endif
}, },
data() { data() {
return { return {
@ -220,6 +225,7 @@ export default {
isVoice: false, isVoice: false,
isEmoji: false, isEmoji: false,
editorContent: "", editorContent: "",
isIos: false,
}; };
}, },
watch: { watch: {
@ -418,7 +424,7 @@ export default {
display: flex; display: flex;
align-items: flex-end; align-items: flex-end;
padding: 16rpx 24rpx; padding: 16rpx 24rpx;
padding-bottom: 80rpx;
box-sizing: border-box; box-sizing: border-box;
&::after { &::after {
@ -480,6 +486,10 @@ export default {
} }
} }
.tui-chat-ios-tabbar {
padding-bottom: 80rpx;
}
.tui-reply-more { .tui-reply-more {
width: 100%; width: 100%;
position: relative; position: relative;

View File

@ -1,5 +1,7 @@
<template> <template>
<view class="IMmsgContent-container"> <view
:class="['IMmsgContent-container', { isIos: 'IMmsgContent-ios-container' }]"
>
<u-navbar :title="ImItemInfo.username" :autoBack="true"> </u-navbar> <u-navbar :title="ImItemInfo.username" :autoBack="true"> </u-navbar>
<view class="tui-chat-content" id="tui-chat-content"> <view class="tui-chat-content" id="tui-chat-content">
<!-- <tui-loadmore <!-- <tui-loadmore
@ -9,7 +11,7 @@
text=" " text=" "
></tui-loadmore> --> ></tui-loadmore> -->
<view> <view>
<view class="tui-label">对方已通过您的好友请求</view> <!-- <view class="tui-label">对方已通过您的好友请求</view> -->
<view v-for="(item, index) of msgList" :key="index"> <view v-for="(item, index) of msgList" :key="index">
<view class="tui-chat-center">{{ <view class="tui-chat-center">{{
formatTime(item.message_time) formatTime(item.message_time)
@ -165,6 +167,7 @@ export default {
chattype: "user", chattype: "user",
isHideKeyBoard: false, isHideKeyBoard: false,
emojiPath: "https://res.wx.qq.com/mpres/htmledition/images/icon/emotion/", emojiPath: "https://res.wx.qq.com/mpres/htmledition/images/icon/emotion/",
isIos: false,
}; };
}, },
onLoad: function (options) { onLoad: function (options) {
@ -179,6 +182,13 @@ export default {
this.getPcEmoji(); this.getPcEmoji();
// this.getImConfig(); // this.getImConfig();
this.getImMsgList(); this.getImMsgList();
// #ifdef APP-PLUS
const platform = uni.getSystemInfoSync().platform;
if (platform == "ios") {
this.isIos = true;
}
// #endif
}, },
computed: { computed: {
...mapState("user", ["uid", "userInfo"]), ...mapState("user", ["uid", "userInfo"]),
@ -790,22 +800,34 @@ export default {
} }
this.$nextTick(() => { this.$nextTick(() => {
const query = uni.createSelectorQuery().in(this); setTimeout(() => {
query.select(".IMmsgContent-container").boundingClientRect(); //
query.selectAll(".IMmsgContent-container view").boundingClientRect(); const query = uni.createSelectorQuery().in(this);
query.exec((res) => { query.select(".IMmsgContent-container").boundingClientRect();
const scrollViewHeight = res[0].height; query.selectAll(".IMmsgContent-container view").boundingClientRect();
const scrollContentHeight = res[1].reduce( query.exec((res) => {
(total, item) => total + item.height, if (!res[0] || !res[1]) return; //
0
);
// const scrollTop = scrollContentHeight - scrollViewHeight;
uni.pageScrollTo({ const scrollViewHeight = res[0].height; //
scrollTop: scrollViewHeight, const scrollContentHeight = res[1].reduce(
duration: 0, (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) { formatTime(time) {
@ -847,12 +869,17 @@ export default {
.IMmsgContent-container { .IMmsgContent-container {
padding-left: 20rpx; padding-left: 20rpx;
padding-right: 20rpx; padding-right: 20rpx;
padding-bottom: 220rpx; padding-bottom: 146rpx;
box-sizing: border-box; box-sizing: border-box;
background-color: #fafafa; background-color: #fafafa;
font-size: 1rem; font-size: 1rem;
font-family: -apple-system-font, Helvetica Neue, Helvetica, sans-serif; font-family: -apple-system-font, Helvetica Neue, Helvetica, sans-serif;
.u-navbar {
height: 88rpx;
margin-bottom: 20rpx;
}
/*chatbox*/ /*chatbox*/
.tui-chat-content { .tui-chat-content {
width: 100%; width: 100%;
@ -1034,10 +1061,6 @@ export default {
flex-direction: row-reverse; flex-direction: row-reverse;
} }
.chat-bubble-box {
background: red;
}
._root /deep/ { ._root /deep/ {
.chat-bubble-box { .chat-bubble-box {
display: flex; display: flex;
@ -1062,4 +1085,8 @@ export default {
} }
} }
} }
.IMmsgContent-ios-container {
padding-bottom: 220rpx;
}
</style> </style>

View File

@ -1,53 +1,44 @@
const defaultState = () => {
import { GetLogin ,GetSmsCode } from '../../api/login'; return {
import { GetAuditStatus } from '../../api/audit'; accountInfo: uni.getStorageSync('accountDashboard') || {
import $cookies from '../../utils/vue-cookies' data: {},
notice: {},
const defaultState = () =>{ order: {},
return{ product: {
accountInfo:uni.getStorageSync("accountDashboard") || { illegal_num: 0,
data:{}, normal_num: 0,
notice:{}, off_num: 0,
order:{}, total_num: 0,
product:{ verify_passed_off_num: 0,
illegal_num:0, verify_refused_num: 0,
normal_num:0, verify_waiting_num: 0,
off_num:0,
total_num:0,
verify_passed_off_num:0,
verify_refused_num:0,
verify_waiting_num:0
}, },
return:{ return: {
fin_num:0, fin_num: 0,
review_num:0, review_num: 0,
total_num:0, total_num: 0,
un_fin_num:0 un_fin_num: 0,
}, },
store_info:{ store_info: {
store_id:1, store_id: 1,
wx_qrcode:'' wx_qrcode: '',
}, },
} },
} };
} };
const state = defaultState(); const state = defaultState();
const getters = {} const getters = {};
const mutations = { const mutations = {};
} const actions = {};
const actions = {
}
export default { export default {
namespaced: true, namespaced: true,
state, state,
getters, getters,
mutations, mutations,
actions actions,
} };

View File

@ -1,6 +1,5 @@
import { GetLogin, GetSmsCode, GetAccountLogin } from '../../api/login'; import { GetLogin, GetAccountLogin } from '../../api/login';
import { OutLogin } from '../../api/user'; import { OutLogin } from '../../api/user';
import { GetAuditInfo } from '../../api/audit';
import { GetAuditStatus } from '../../api/audit'; import { GetAuditStatus } from '../../api/audit';
// import $cookies from '../../utils/vue-cookies' // import $cookies from '../../utils/vue-cookies'

View File

@ -1,83 +1,66 @@
import axios from 'axios' import axios from 'axios';
import config from '../config/config' import config from '../config/config';
import axiosAdapterUniapp from 'axios-adapter-uniapp' import axiosAdapterUniapp from 'axios-adapter-uniapp';
const service = axios.create({ const service = axios.create({
baseURL: config.baseApi, // url = base url + request url baseURL: config.baseApi, // url = base url + request url
headers: { headers: {
'X-Requested-With': 'XMLHttpRequest', 'X-Requested-With': 'XMLHttpRequest',
'Content-Type': 'application/json-patch+json' 'Content-Type': 'application/json-patch+json',
}, },
adapter: axiosAdapterUniapp, adapter: axiosAdapterUniapp,
timeout: 5000 // request timeout timeout: 5000, // request timeout
}) });
// request interceptor // request interceptor
service.interceptors.request.use( service.interceptors.request.use(
config => { (config) => {
if (uni.getStorageSync('ukey')) {
if(uni.getStorageSync('ukey')){ config.headers['Authorization'] = 'Bearer ' + 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 // do something with request error
console.log(error) // for debug console.log(error); // for debug
return Promise.reject(error) return Promise.reject(error);
} }
) );
// response interceptor // response interceptor
service.interceptors.response.use( service.interceptors.response.use(
response => { (response) => {
const res = response.data;
const res = response.data if (res.status == 250) {
if(res.status == 250 ){
uni.showToast({ uni.showToast({
title: `提示${res.msg}`, title: `提示${res.msg}`,
icon:'error', icon: 'error',
duration: 1000 duration: 1000,
}); });
} }
if(res.code == 30){ if (res.code == 30) {
uni.showToast({ uni.showToast({
title: `token已经过期需要重新登录`, title: `token已经过期需要重新登录`,
icon:'error', icon: 'error',
duration: 1000 duration: 1000,
}); });
uni.removeStorageSync("ukey"); uni.removeStorageSync('ukey');
uni.redirectTo({ uni.redirectTo({
url:'/pages/login/login' url: '/pages/login/login',
}) });
return return;
} }
return res return res;
}, },
error => { (error) => {
console.log('err' + error) // for debug console.log('err' + error); // for debug
return Promise.reject(error) return Promise.reject(error);
} }
) );
export default service export default service;