fix: 优化隐私协议样式,边距UI全交给使用端去定制;修复所有接口路径和引用响应数据字段错误而导致线上开店报错
This commit is contained in:
parent
a3959baf71
commit
eae915838c
@ -11,7 +11,7 @@ export function GetBaiduSuggestion (params = {}){
|
||||
params.isFilter = true
|
||||
return new Promise((resolve, reject) => {
|
||||
http({
|
||||
url:'/shop/merch/baidu/place/v2/suggestion',
|
||||
url:'/api/mobile/shop/merch/baidu/place/v2/suggestion',
|
||||
method:'get',
|
||||
data:params,
|
||||
}).then(res=>{
|
||||
@ -23,7 +23,7 @@ export function GetBaiduSuggestion (params = {}){
|
||||
export function GetMeritoCategory (params = {}){
|
||||
return new Promise((resolve, reject) => {
|
||||
http({
|
||||
url:'/shop/shop-base-store-category/list',
|
||||
url:'/api/mobile/shop/shop-base-store-category/list',
|
||||
method:'post',
|
||||
data:params,
|
||||
}).then(res=>{
|
||||
|
||||
@ -14,7 +14,7 @@ export function GetLogin (params){
|
||||
params.isFilter = true
|
||||
return new Promise((resolve, reject) => {
|
||||
http({
|
||||
url:'/account/login/doMerchSmsRegisterAndLogin',
|
||||
url:'/api/mobile/account/login/doMerchSmsRegisterAndLogin',
|
||||
method:'post',
|
||||
data:params,
|
||||
}).then(res=>{
|
||||
@ -35,7 +35,7 @@ export function GetSmsCode(params){
|
||||
params.isFilter = true
|
||||
return new Promise((resolve, reject) => {
|
||||
http({
|
||||
url:'/account/login/sendVerifyCode',
|
||||
url:'/api/mobile/account/login/sendVerifyCode',
|
||||
method:'post',
|
||||
data:params,
|
||||
}).then(res=>{
|
||||
@ -54,7 +54,7 @@ export function GetSmsCode(params){
|
||||
export function GetStoreCategories() {
|
||||
return new Promise((resolve, reject) => {
|
||||
http({
|
||||
url: 'shop/store/biz-category/list',
|
||||
url: '/api/mobile/shop/store/biz-category/list',
|
||||
method: 'post'
|
||||
}).then(res => {
|
||||
resolve(res)
|
||||
@ -88,7 +88,7 @@ export function GetPostion (params){
|
||||
params.isFilter = true
|
||||
return new Promise((resolve, reject) => {
|
||||
http({
|
||||
url:'/shop/merch/baidu/place/v2/suggestion',
|
||||
url:'/api/mobile/account/shop/merch/baidu/place/v2/suggestion',
|
||||
method:'get',
|
||||
params,
|
||||
}).then(res=>{
|
||||
@ -96,11 +96,14 @@ export function GetPostion (params){
|
||||
}).catch(e => reject(console.warn(e)))
|
||||
})
|
||||
}
|
||||
export function GetBank (){
|
||||
|
||||
//废弃测试接口
|
||||
export function GetBank (data){
|
||||
return new Promise((resolve, reject) => {
|
||||
http({
|
||||
url:'/shop/global/banks/list',
|
||||
url:'/api/mobile/shop/lakala/tk/bank/search',
|
||||
method:'post',
|
||||
data
|
||||
}).then(res=>{
|
||||
resolve(res)
|
||||
}).catch(e => reject(console.warn(e)))
|
||||
@ -145,7 +148,7 @@ export function merchApply(params){
|
||||
}
|
||||
console.log("这是数据",form);
|
||||
http({
|
||||
url:'/shop/merch/apply',
|
||||
url:'/api/mobile/account/shop/merch/apply',
|
||||
method:'post',
|
||||
data:form
|
||||
}).then(res=>{
|
||||
@ -161,7 +164,7 @@ export function getApproval_status(){
|
||||
}
|
||||
return new Promise((resolve,reject)=>{
|
||||
http({
|
||||
url:'/shop/merch/fresh/approval/status',
|
||||
url:'/api/mobile/shop/merch/fresh/approval/status',
|
||||
method:'post',
|
||||
data:phone
|
||||
}).then(res=>{
|
||||
@ -174,7 +177,7 @@ export function getApproval_status(){
|
||||
export function re_apply(params){
|
||||
return new Promise((resolve,reject)=>{
|
||||
http({
|
||||
url:'/shop/merch/re-apply',
|
||||
url:'/api/mobile/shop/merch/re-apply',
|
||||
method:'post',
|
||||
data:params
|
||||
}).then(res=>{
|
||||
@ -195,7 +198,7 @@ export function re_apply(params){
|
||||
export function GetAccountLogin(params){
|
||||
return new Promise((resolve, reject) => {
|
||||
http({
|
||||
url:'https://mall.gpxscs.cn/api/admin/account/account-user-base/doLogin',
|
||||
url:'/api/admin/account/account-user-base/doLogin',
|
||||
method:'post',
|
||||
params,
|
||||
}).then(res=>{
|
||||
@ -215,7 +218,7 @@ export function GetAccountLogin(params){
|
||||
export function GetVerifyCode(params){
|
||||
return new Promise((resolve, reject) => {
|
||||
http({
|
||||
url:'https://mall.gpxscs.cn/api/admin/shop/shop-base-config/image',
|
||||
url:'/api/admin/shop/shop-base-config/image',
|
||||
method:'GET',
|
||||
params,
|
||||
}).then(res=>{
|
||||
@ -227,7 +230,7 @@ export function GetVerifyCode(params){
|
||||
export function GetMerchDetail(){
|
||||
return new Promise((resolve,reject)=>{
|
||||
http({
|
||||
url:'/shop/merch/detail',
|
||||
url:'/api/mobile/shop/merch/detail',
|
||||
method:'post',
|
||||
data:{mobile:localStorage.getItem('mobilePhone')}
|
||||
}).then(res=>{
|
||||
@ -239,7 +242,7 @@ return new Promise((resolve,reject)=>{
|
||||
export function GetAppDistrict(){
|
||||
return new Promise((resolve,reject)=>{
|
||||
http({
|
||||
url:'shop/shop-base-district/getAppDistrict',
|
||||
url:'/api/mobile/shop/shop-base-district/getAppDistrict',
|
||||
method:'get'
|
||||
}).then(res=>{
|
||||
resolve(res)
|
||||
|
||||
@ -21,7 +21,7 @@ export function uploadFile(file, params = {}) {
|
||||
}
|
||||
return new Promise((resolve, reject) => {
|
||||
http({
|
||||
url: '/shop/oss/upload',
|
||||
url: '/api/mobile/shop/oss/upload',
|
||||
method: 'post',
|
||||
data: formData,
|
||||
})
|
||||
|
||||
@ -8,6 +8,10 @@
|
||||
--bgcolor: #387197;
|
||||
}
|
||||
|
||||
html{
|
||||
overflow-x: hidden;
|
||||
}
|
||||
|
||||
|
||||
/* 按钮样式 */
|
||||
.btn {
|
||||
|
||||
@ -65,9 +65,11 @@ const closeLoginForm = () => {
|
||||
const refreshCaptcha = async () => {
|
||||
verify_token.value = new Date().getTime();
|
||||
const res = await GetVerifyCode({ verify_token: verify_token.value });
|
||||
if (res && res.status === 200) {
|
||||
|
||||
if (res) {
|
||||
captchaUrl.value = `https://mall.gpxscs.cn/api/admin/shop/shop-base-config/image?verify_token=${verify_token.value}`;
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
const initCaptcha = async () => {
|
||||
@ -104,20 +106,20 @@ const handleLogin = async () => {
|
||||
verify_token: verify_token.value
|
||||
};
|
||||
const res = await GetAccountLogin(params);
|
||||
if (res && res.data.status === 200) {
|
||||
if (res && res.status === 200) {
|
||||
console.log("登录成功", res);
|
||||
userStore.setToken(res.data.data.token);
|
||||
userStore.setToken(res.data.token);
|
||||
userStore.setMobilePhone(formData.value.phoneNumber);
|
||||
window.open(`https://mall.gpxscs.cn/admin/#/login?loginInfo=${JSON.parse(JSON.stringify(res.data.data))}`,'_self');
|
||||
window.open(`https://mall.gpxscs.cn/admin/#/login?loginInfo=${JSON.parse(JSON.stringify(res.data))}`,'_self');
|
||||
formData.value.phoneNumber = '';
|
||||
formData.value.password = '';
|
||||
formData.value.captchaCode = '';
|
||||
console.log(res.data.data);
|
||||
console.log(res.data);
|
||||
closeLoginForm();
|
||||
} else if(res&&res.data.status===250&&res.data.msg=='用户名或密码错误!'){
|
||||
} else if(res&&res.status===250&&res.data.msg=='用户名或密码错误!'){
|
||||
ElMessage.error('用户名或密码错误!');
|
||||
console.log("操作失败", res.msg);
|
||||
}else if(res&&res.data.status===250&&res.data.msg=='验证码错误'){
|
||||
}else if(res&&res.status===250&&res.data.msg=='验证码错误'){
|
||||
ElMessage.error('验证码错误');
|
||||
}
|
||||
} else {
|
||||
|
||||
@ -120,8 +120,8 @@ const register = async () => {
|
||||
verify_code: formData.value.verificationCode
|
||||
};
|
||||
const res = await GetLogin(params);
|
||||
if (res && res.status === 200 && res.data && res.data.data) {
|
||||
userStore.setToken(res.data.data.token);
|
||||
if (res && res.status === 200 && res.data && res.data) {
|
||||
userStore.setToken(res.data.token);
|
||||
userStore.setMobilePhone(formData.value.phoneNumber);
|
||||
formData.value.phoneNumber = '';
|
||||
formData.value.verificationCode = '';
|
||||
@ -130,7 +130,7 @@ const register = async () => {
|
||||
try {
|
||||
const approvalRes = await getApproval_status();
|
||||
if (approvalRes.data.code === 0 && approvalRes.data.status === 200) {
|
||||
const approvalStatus = approvalRes.data.data.approval_status;
|
||||
const approvalStatus = approvalRes.data.approval_status;
|
||||
localStorage.setItem('approval_status', approvalStatus);
|
||||
if (approvalStatus == '4') {
|
||||
router.push({ name: 'start' });
|
||||
@ -142,7 +142,7 @@ const register = async () => {
|
||||
console.error('获取审批状态失败:', error);
|
||||
}
|
||||
} else {
|
||||
if (res.data.status === 250) {
|
||||
if (res.status === 250) {
|
||||
// 使用 ElMessage 提示验证码错误
|
||||
ElMessage.error('验证码错误');
|
||||
} else {
|
||||
|
||||
@ -108,8 +108,8 @@ watch(() => userStore.isLoggedIn, (newVal) => {
|
||||
isLoggedIn.value = newVal; // 确保 isLoggedIn 始终与 userStore.isLoggedIn 保持一致
|
||||
if (isLoggedIn.value === null) console.log("登陆过期");
|
||||
// getApproval_status().then((res) => {
|
||||
// if (res.data.code === 0 && res.data.status === 200) {
|
||||
// localStorage.setItem('approval_status', res.data.data.approval_status);
|
||||
// if (res.code === 0 && res.status === 200) {
|
||||
// localStorage.setItem('approval_status', res.data.approval_status);
|
||||
// } else {
|
||||
|
||||
// }
|
||||
|
||||
@ -21,7 +21,5 @@ getContentData()
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.container{
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
</style>
|
||||
@ -377,7 +377,7 @@ const merchToApply = async () => {
|
||||
showAll();
|
||||
checkForm();
|
||||
const res = await merchApply(applyFormData);
|
||||
if (res && res.data.status === 200) {
|
||||
if (res && res.status === 200) {
|
||||
// ElMessage.success('成功入驻');
|
||||
location.reload()
|
||||
console.log('成功入驻', res);
|
||||
@ -437,8 +437,8 @@ const bankList2 = ref<Bank[]>([]);
|
||||
|
||||
onMounted(() => {
|
||||
GetStoreCategories().then(res => {
|
||||
if (res.data.code === 0 && res.data.status === 200) {
|
||||
cascaderOptions.value = transformStoreCategories(res.data.data);
|
||||
if (res.code === 0 && res.status === 200) {
|
||||
cascaderOptions.value = transformStoreCategories(res.data);
|
||||
} else {
|
||||
|
||||
}
|
||||
@ -446,9 +446,13 @@ onMounted(() => {
|
||||
ElMessage.error('获取店铺分类失败');
|
||||
});
|
||||
|
||||
GetBank().then(res => {
|
||||
if (res.data.code === 0 && res.data.status === 200) {
|
||||
bankList2.value = res.data.data;
|
||||
GetBank({
|
||||
"keyword": "中国工商银行桂平", // 银行名称关键字,小地方支行,查不到,调整关键字范围,尝试市级银行
|
||||
"pageNum": 1,
|
||||
"pageSize": 10
|
||||
}).then(res => {
|
||||
if (res.code === 0 && res.status === 200) {
|
||||
bankList2.value = res.data;
|
||||
} else {
|
||||
ElMessage.error('获取银行失败');
|
||||
}
|
||||
@ -457,8 +461,8 @@ onMounted(() => {
|
||||
});
|
||||
|
||||
GetAppDistrict().then(res => {
|
||||
if (res.data.code === 0 && res.data.status === 200) {
|
||||
cityData2.value = res.data.data;
|
||||
if (res.code === 0 && res.status === 200) {
|
||||
cityData2.value = res.data;
|
||||
console.log(cascaderOptions3.value);
|
||||
|
||||
} else {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user