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