手机号绑定:接入 100%

pull/32/MERGE
YunaiV 2023-12-24 13:16:45 +08:00
parent b548999e89
commit a7730ddecb
11 changed files with 301 additions and 282 deletions

View File

@ -1,36 +1,36 @@
{ {
"name": "星品", "name" : "星品",
"appid": "__UNI__082C0BA", "appid" : "__UNI__082C0BA",
"description": "Shopro是由SheepJS团队开发使用Uniapp+Vue3技术驱动的在线商城系统内含诸多功能与丰富的活动期待您的使用和反馈。", "description" : "Shopro是由SheepJS团队开发使用Uniapp+Vue3技术驱动的在线商城系统内含诸多功能与丰富的活动期待您的使用和反馈。",
"versionName": "1.8.3", "versionName" : "1.8.3",
"versionCode": 183, "versionCode" : 183,
"transformPx": false, "transformPx" : false,
"app-plus": { "app-plus" : {
"usingComponents": true, "usingComponents" : true,
"nvueCompiler": "uni-app", "nvueCompiler" : "uni-app",
"nvueStyleCompiler": "uni-app", "nvueStyleCompiler" : "uni-app",
"compilerVersion": 3, "compilerVersion" : 3,
"nvueLaunchMode": "fast", "nvueLaunchMode" : "fast",
"splashscreen": { "splashscreen" : {
"alwaysShowBeforeRender": true, "alwaysShowBeforeRender" : true,
"waiting": true, "waiting" : true,
"autoclose": true, "autoclose" : true,
"delay": 0 "delay" : 0
}, },
"safearea": { "safearea" : {
"bottom": { "bottom" : {
"offset": "none" "offset" : "none"
} }
}, },
"modules": { "modules" : {
"Payment": {}, "Payment" : {},
"Share": {}, "Share" : {},
"VideoPlayer": {}, "VideoPlayer" : {},
"OAuth": {} "OAuth" : {}
}, },
"distribute": { "distribute" : {
"android": { "android" : {
"permissions": [ "permissions" : [
"<uses-feature android:name=\"android.hardware.camera\"/>", "<uses-feature android:name=\"android.hardware.camera\"/>",
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>", "<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\"/>", "<uses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\"/>",
@ -65,176 +65,161 @@
"<uses-permission android:name=\"android.permission.WRITE_SMS\"/>", "<uses-permission android:name=\"android.permission.WRITE_SMS\"/>",
"<uses-permission android:name=\"android.permission.RECEIVE_USER_PRESENT\"/>" "<uses-permission android:name=\"android.permission.RECEIVE_USER_PRESENT\"/>"
], ],
"minSdkVersion": 21, "minSdkVersion" : 21,
"schemes": "shopro" "schemes" : "shopro"
}, },
"ios": { "ios" : {
"urlschemewhitelist": [ "urlschemewhitelist" : [ "baidumap", "iosamap" ],
"baidumap", "dSYMs" : false,
"iosamap" "privacyDescription" : {
], "NSPhotoLibraryUsageDescription" : "需要同意访问您的相册选取图片才能完善该条目",
"dSYMs": false, "NSPhotoLibraryAddUsageDescription" : "需要同意访问您的相册才能保存该图片",
"privacyDescription": { "NSCameraUsageDescription" : "需要同意访问您的摄像头拍摄照片才能完善该条目",
"NSPhotoLibraryUsageDescription": "需要同意访问您的相册选取图片才能完善该条目", "NSUserTrackingUsageDescription" : "开启追踪并不会获取您在其它站点的隐私信息,该行为仅用于标识设备,保障服务安全和提升浏览体验"
"NSPhotoLibraryAddUsageDescription": "需要同意访问您的相册才能保存该图片",
"NSCameraUsageDescription": "需要同意访问您的摄像头拍摄照片才能完善该条目",
"NSUserTrackingUsageDescription": "开启追踪并不会获取您在其它站点的隐私信息,该行为仅用于标识设备,保障服务安全和提升浏览体验"
}, },
"urltypes": "shopro", "urltypes" : "shopro",
"capabilities": { "capabilities" : {
"entitlements": { "entitlements" : {
"com.apple.developer.associated-domains": [ "com.apple.developer.associated-domains" : [ "applinks:shopro.sheepjs.com" ]
"applinks:shopro.sheepjs.com"
]
} }
}, },
"idfa": true "idfa" : true
}, },
"sdkConfigs": { "sdkConfigs" : {
"speech": { "speech" : {
"ifly": {} "ifly" : {}
}, },
"ad": {}, "ad" : {},
"oauth": { "oauth" : {
"apple": {}, "apple" : {},
"weixin": { "weixin" : {
"appid": "wxae7a0c156da9383b", "appid" : "wxae7a0c156da9383b",
"UniversalLinks": "https://shopro.sheepjs.com/uni-universallinks/__UNI__082C0BA/" "UniversalLinks" : "https://shopro.sheepjs.com/uni-universallinks/__UNI__082C0BA/"
} }
}, },
"payment": { "payment" : {
"weixin": { "weixin" : {
"__platform__": [ "__platform__" : [ "ios", "android" ],
"ios", "appid" : "wxae7a0c156da9383b",
"android" "UniversalLinks" : "https://shopro.sheepjs.com/uni-universallinks/__UNI__082C0BA/"
],
"appid": "wxae7a0c156da9383b",
"UniversalLinks": "https://shopro.sheepjs.com/uni-universallinks/__UNI__082C0BA/"
}, },
"alipay": { "alipay" : {
"__platform__": [ "__platform__" : [ "ios", "android" ]
"ios",
"android"
]
} }
}, },
"share": { "share" : {
"weixin": { "weixin" : {
"appid": "wxae7a0c156da9383b", "appid" : "wxae7a0c156da9383b",
"UniversalLinks": "https://shopro.sheepjs.com/uni-universallinks/__UNI__082C0BA/" "UniversalLinks" : "https://shopro.sheepjs.com/uni-universallinks/__UNI__082C0BA/"
} }
} }
}, },
"orientation": [ "orientation" : [ "portrait-primary" ],
"portrait-primary" "splashscreen" : {
], "androidStyle" : "common",
"splashscreen": { "iosStyle" : "common",
"androidStyle": "common", "useOriginalMsgbox" : true
"iosStyle": "common",
"useOriginalMsgbox": true
}, },
"icons": { "icons" : {
"android": { "android" : {
"hdpi": "unpackage/res/icons/72x72.png", "hdpi" : "unpackage/res/icons/72x72.png",
"xhdpi": "unpackage/res/icons/96x96.png", "xhdpi" : "unpackage/res/icons/96x96.png",
"xxhdpi": "unpackage/res/icons/144x144.png", "xxhdpi" : "unpackage/res/icons/144x144.png",
"xxxhdpi": "unpackage/res/icons/192x192.png" "xxxhdpi" : "unpackage/res/icons/192x192.png"
}, },
"ios": { "ios" : {
"appstore": "unpackage/res/icons/1024x1024.png", "appstore" : "unpackage/res/icons/1024x1024.png",
"ipad": { "ipad" : {
"app": "unpackage/res/icons/76x76.png", "app" : "unpackage/res/icons/76x76.png",
"app@2x": "unpackage/res/icons/152x152.png", "app@2x" : "unpackage/res/icons/152x152.png",
"notification": "unpackage/res/icons/20x20.png", "notification" : "unpackage/res/icons/20x20.png",
"notification@2x": "unpackage/res/icons/40x40.png", "notification@2x" : "unpackage/res/icons/40x40.png",
"proapp@2x": "unpackage/res/icons/167x167.png", "proapp@2x" : "unpackage/res/icons/167x167.png",
"settings": "unpackage/res/icons/29x29.png", "settings" : "unpackage/res/icons/29x29.png",
"settings@2x": "unpackage/res/icons/58x58.png", "settings@2x" : "unpackage/res/icons/58x58.png",
"spotlight": "unpackage/res/icons/40x40.png", "spotlight" : "unpackage/res/icons/40x40.png",
"spotlight@2x": "unpackage/res/icons/80x80.png" "spotlight@2x" : "unpackage/res/icons/80x80.png"
}, },
"iphone": { "iphone" : {
"app@2x": "unpackage/res/icons/120x120.png", "app@2x" : "unpackage/res/icons/120x120.png",
"app@3x": "unpackage/res/icons/180x180.png", "app@3x" : "unpackage/res/icons/180x180.png",
"notification@2x": "unpackage/res/icons/40x40.png", "notification@2x" : "unpackage/res/icons/40x40.png",
"notification@3x": "unpackage/res/icons/60x60.png", "notification@3x" : "unpackage/res/icons/60x60.png",
"settings@2x": "unpackage/res/icons/58x58.png", "settings@2x" : "unpackage/res/icons/58x58.png",
"settings@3x": "unpackage/res/icons/87x87.png", "settings@3x" : "unpackage/res/icons/87x87.png",
"spotlight@2x": "unpackage/res/icons/80x80.png", "spotlight@2x" : "unpackage/res/icons/80x80.png",
"spotlight@3x": "unpackage/res/icons/120x120.png" "spotlight@3x" : "unpackage/res/icons/120x120.png"
} }
} }
} }
} }
}, },
"quickapp": {}, "quickapp" : {},
"quickapp-native": { "quickapp-native" : {
"icon": "/static/logo.png", "icon" : "/static/logo.png",
"package": "com.example.demo", "package" : "com.example.demo",
"features": [ "features" : [
{ {
"name": "system.clipboard" "name" : "system.clipboard"
} }
] ]
}, },
"quickapp-webview": { "quickapp-webview" : {
"icon": "/static/logo.png", "icon" : "/static/logo.png",
"package": "com.example.demo", "package" : "com.example.demo",
"minPlatformVersion": 1070, "minPlatformVersion" : 1070,
"versionName": "1.0.0", "versionName" : "1.0.0",
"versionCode": 100 "versionCode" : 100
}, },
"mp-weixin": { "mp-weixin" : {
"appid": "wx63c280fe3248a3e7", "appid" : "wx63c280fe3248a3e7",
"setting": { "setting" : {
"urlCheck": false, "urlCheck" : false,
"minified": true, "minified" : true,
"postcss": true "postcss" : true
}, },
"optimization": { "optimization" : {
"subPackages": true "subPackages" : true
}, },
"plugins": {}, "plugins" : {},
"lazyCodeLoading": "requiredComponents", "lazyCodeLoading" : "requiredComponents",
"usingComponents": {}, "usingComponents" : {},
"permission": {}, "permission" : {},
"requiredPrivateInfos": [ "requiredPrivateInfos" : [ "chooseAddress" ]
"chooseAddress"
]
}, },
"mp-alipay": { "mp-alipay" : {
"usingComponents": true "usingComponents" : true
}, },
"mp-baidu": { "mp-baidu" : {
"usingComponents": true "usingComponents" : true
}, },
"mp-toutiao": { "mp-toutiao" : {
"usingComponents": true "usingComponents" : true
}, },
"mp-jd": { "mp-jd" : {
"usingComponents": true "usingComponents" : true
}, },
"h5": { "h5" : {
"template": "index.html", "template" : "index.html",
"router": { "router" : {
"mode": "hash", "mode" : "hash",
"base": "./" "base" : "./"
}, },
"sdkConfigs": { "sdkConfigs" : {
"maps": {} "maps" : {}
}, },
"async": { "async" : {
"timeout": 20000 "timeout" : 20000
}, },
"title": "星品购", "title" : "星品购",
"optimization": { "optimization" : {
"treeShaking": { "treeShaking" : {
"enable": true "enable" : true
} }
} }
}, },
"vueVersion": "3", "vueVersion" : "3",
"_spaceID": "192b4892-5452-4e1d-9f09-eee1ece40639", "_spaceID" : "192b4892-5452-4e1d-9f09-eee1ece40639",
"locale": "zh-Hans", "locale" : "zh-Hans",
"fallbackLocale": "zh-Hans" "fallbackLocale" : "zh-Hans"
} }

View File

@ -70,7 +70,6 @@ const AuthUtil = {
}, },
// 微信小程序的一键登录 // 微信小程序的一键登录
weixinMiniAppLogin: (phoneCode, loginCode, state) => { weixinMiniAppLogin: (phoneCode, loginCode, state) => {
debugger
return request({ return request({
url: '/app-api/member/auth/weixin-mini-app-login', url: '/app-api/member/auth/weixin-mini-app-login',
method: 'POST', method: 'POST',

View File

@ -1,4 +1,4 @@
import request from '@/sheep/request2'; import request from '@/sheep/request';
const UserApi = { const UserApi = {
// 修改基本信息 // 修改基本信息
@ -13,6 +13,34 @@ const UserApi = {
}, },
}); });
}, },
// 修改用户手机
updateUserMobile: (data) => {
return request({
url: '/app-api/member/user/update-mobile',
method: 'PUT',
data,
custom: {
loadingMsg: '验证中',
showSuccess: true,
successMsg: '修改成功'
},
});
},
// 基于微信小程序的授权码,修改用户手机
updateUserMobileByWeixin: (code) => {
return request({
url: '/app-api/member/user/update-mobile-by-weixin',
method: 'PUT',
data: {
code
},
custom: {
showSuccess: true,
loadingMsg: '获取中',
successMsg: '修改成功'
},
});
},
// 修改密码 // 修改密码
updateUserPassword: (data) => { updateUserPassword: (data) => {
return request({ return request({
@ -39,6 +67,7 @@ const UserApi = {
} }
}); });
}, },
}; };
export default UserApi; export default UserApi;

View File

@ -4,7 +4,7 @@
<!-- 标题栏 --> <!-- 标题栏 -->
<view class="head-box ss-m-b-60"> <view class="head-box ss-m-b-60">
<view class="head-title ss-m-b-20"> <view class="head-title ss-m-b-20">
{{ userInfo.verification.mobile ? '更换手机号' : '绑定手机号' }} {{ userInfo.mobile ? '更换手机号' : '绑定手机号' }}
</view> </view>
<view class="head-subtitle">为了您的账号安全请使用本人手机号码</view> <view class="head-subtitle">为了您的账号安全请使用本人手机号码</view>
</view> </view>
@ -54,6 +54,8 @@
</uni-easyinput> </uni-easyinput>
</uni-forms-item> </uni-forms-item>
</uni-forms> </uni-forms>
<!-- 微信独有读取手机号 -->
<button <button
v-if="'WechatMiniProgram' === sheep.$platform.name" v-if="'WechatMiniProgram' === sheep.$platform.name"
class="ss-reset-button type-btn" class="ss-reset-button type-btn"
@ -66,13 +68,15 @@
</template> </template>
<script setup> <script setup>
import { computed, watch, ref, reactive, unref } from 'vue'; import { computed, ref, reactive, unref } from 'vue';
import sheep from '@/sheep'; import sheep from '@/sheep';
import { code, mobile } from '@/sheep/validate/form'; import { code, mobile } from '@/sheep/validate/form';
import { showAuthModal, closeAuthModal, getSmsCode, getSmsTimer } from '@/sheep/hooks/useModal'; import { closeAuthModal, getSmsCode, getSmsTimer } from '@/sheep/hooks/useModal';
import UserApi from '@/sheep/api/member/user';
const changeMobileRef = ref(null); const changeMobileRef = ref(null);
const userInfo = computed(() => sheep.$store('user').userInfo); const userInfo = computed(() => sheep.$store('user').userInfo);
// //
const state = reactive({ const state = reactive({
isMobileEnd: false, // isMobileEnd: false, //
@ -86,33 +90,36 @@
}, },
}); });
// 5. //
async function changeMobileSubmit() { async function changeMobileSubmit() {
const validate = await unref(changeMobileRef) const validate = await unref(changeMobileRef)
.validate() .validate()
.catch((error) => { .catch((error) => {
console.log('error: ', error); console.log('error: ', error);
}); });
if (!validate) return; if (!validate) {
sheep.$api.user.changeMobile(state.model).then((res) => { return;
if (res.error === 0) { }
//
const { code } = await UserApi.updateUserMobile(state.model);
if (code !== 0) {
return;
}
sheep.$store('user').getInfo(); sheep.$store('user').getInfo();
closeAuthModal(); closeAuthModal();
} }
});
}
// 使 // 使
async function getPhoneNumber(e) { async function getPhoneNumber(e) {
if (e.detail.errMsg !== 'getPhoneNumber:ok') { if (e.detail.errMsg !== 'getPhoneNumber:ok') {
} else { return;
let result = await sheep.$platform.useProvider().bindUserPhoneNumber(e.detail); }
const result = await sheep.$platform.useProvider().bindUserPhoneNumber(e.detail);
if (result) { if (result) {
sheep.$store('user').getInfo(); sheep.$store('user').getInfo();
closeAuthModal(); closeAuthModal();
} }
} }
}
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>

View File

@ -175,7 +175,6 @@
} }
let result = await sheep.$platform.useProvider().mobileLogin(e.detail); let result = await sheep.$platform.useProvider().mobileLogin(e.detail);
if (result) { if (result) {
debugger
closeAuthModal(); closeAuthModal();
} }
}; };

View File

@ -87,6 +87,9 @@ export function getSmsCode(event, mobile) {
case 'changePassword': case 'changePassword':
scene = 3; scene = 3;
break; break;
case 'changeMobile':
scene = 2;
break;
case 'smsLogin': case 'smsLogin':
scene = 1; scene = 1;
break; break;

View File

@ -162,7 +162,6 @@ export default {
// 微信支付 // 微信支付
wxpay(data, callback) { wxpay(data, callback) {
this.isReady(() => { this.isReady(() => {
debugger
jweixin.chooseWXPay({ jweixin.chooseWXPay({
timestamp: data.timeStamp, // 支付签名时间戳注意微信jssdk中的所有使用timestamp字段均为小写。但最新版的支付后台生成签名使用的timeStamp字段名需大写其中的S字符 timestamp: data.timeStamp, // 支付签名时间戳注意微信jssdk中的所有使用timestamp字段均为小写。但最新版的支付后台生成签名使用的timeStamp字段名需大写其中的S字符
nonceStr: data.nonceStr, // 支付签名随机串,不长于 32 位 nonceStr: data.nonceStr, // 支付签名随机串,不长于 32 位

View File

@ -92,7 +92,7 @@ export default class SheepPay {
channelExtras: {} channelExtras: {}
}; };
// 特殊逻辑:微信公众号、小程序支付时,必须传入 openid // 特殊逻辑:微信公众号、小程序支付时,必须传入 openid
if (['wx_pub'].includes(channel)) { if (['wx_pub', 'wx_lite'].includes(channel)) {
const openid = await sheep.$platform.useProvider('wechat').getOpenid(); const openid = await sheep.$platform.useProvider('wechat').getOpenid();
// 如果获取不到 openid微信无法发起支付此时需要引导 // 如果获取不到 openid微信无法发起支付此时需要引导
if (!openid) { if (!openid) {
@ -101,6 +101,7 @@ export default class SheepPay {
} }
data.channelExtras.openid = openid; data.channelExtras.openid = openid;
} }
// 发起预支付 API 调用
PayOrderApi.submitOrder(data).then((res) => { PayOrderApi.submitOrder(data).then((res) => {
// 成功时 // 成功时
res.code === 0 && resolve(res); res.code === 0 && resolve(res);
@ -140,12 +141,11 @@ export default class SheepPay {
}); });
} }
// 浏览器微信H5支付 TODO 芋艿:待接入 // 浏览器微信 H5 支付 TODO 芋艿:待接入
async wechatWapPay() { async wechatWapPay() {
const { error, data } = await this.prepay(); const { error, data } = await this.prepay();
if (error === 0) { if (error === 0) {
const redirect_url = `${getRootUrl()}pages/pay/result?id=${this.id}&payment=${this.payment const redirect_url = `${getRootUrl()}pages/pay/result?id=${this.id}&payment=${this.payment}&orderType=${this.orderType}`;
}&orderType=${this.orderType}`;
location.href = `${data.pay_data.h5_url}&redirect_url=${encodeURIComponent(redirect_url)}`; location.href = `${data.pay_data.h5_url}&redirect_url=${encodeURIComponent(redirect_url)}`;
} }
} }
@ -154,29 +154,37 @@ export default class SheepPay {
async redirectPay() { async redirectPay() {
let { error, data } = await this.prepay(); let { error, data } = await this.prepay();
if (error === 0) { if (error === 0) {
const redirect_url = `${getRootUrl()}pages/pay/result?id=${this.id}&payment=${this.payment const redirect_url = `${getRootUrl()}pages/pay/result?id=${this.id}&payment=${this.payment}&orderType=${this.orderType}`;
}&orderType=${this.orderType}`;
location.href = data.pay_data + encodeURIComponent(redirect_url); location.href = data.pay_data + encodeURIComponent(redirect_url);
} }
} }
// #endif // #endif
// 微信小程序支付 TODO 芋艿:待接入 // 微信小程序支付
async wechatMiniProgramPay() { async wechatMiniProgramPay() {
let that = this; // let that = this;
let result = await this.prepay(); let { code, data } = await this.prepay('wx_lite');
if (code !== 0) {
return;
}
// 调用微信小程序支付
const payConfig = JSON.parse(data.displayContent);
uni.requestPayment({ uni.requestPayment({
provider: 'wxpay', provider: 'wxpay',
...result.data.pay_data, timeStamp: payConfig.timeStamp,
nonceStr: payConfig.nonceStr,
package: payConfig.packageValue,
signType: payConfig.signType,
paySign: payConfig.paySign,
success: (res) => { success: (res) => {
that.payResult('success'); this.payResult('success');
}, },
fail: (err) => { fail: (err) => {
if (err.errMsg === 'requestPayment:fail cancel') { if (err.errMsg === 'requestPayment:fail cancel') {
sheep.$helper.toast('支付已手动取消'); sheep.$helper.toast('支付已手动取消');
} else { } else {
that.payResult('fail'); this.payResult('fail');
} }
}, },
}); });

View File

@ -1,6 +1,7 @@
import third from '@/sheep/api/third'; import third from '@/sheep/api/third';
import AuthUtil from '@/sheep/api/member/auth'; import AuthUtil from '@/sheep/api/member/auth';
import SocialApi from '@/sheep/api/member/social'; import SocialApi from '@/sheep/api/member/social';
import UserApi from '@/sheep/api/member/user';
const socialType = 34; // 社交类型 - 微信小程序 const socialType = 34; // 社交类型 - 微信小程序
@ -86,18 +87,8 @@ const unbind = async (openid) => {
// 绑定用户手机号 // 绑定用户手机号
const bindUserPhoneNumber = (e) => { const bindUserPhoneNumber = (e) => {
return new Promise(async (resolve, reject) => { return new Promise(async (resolve, reject) => {
const { error } = await third.wechat.bindUserPhoneNumber({ const { code } = await UserApi.updateUserMobileByWeixin(e.code);
platform: 'miniProgram', if (code === 0) {
payload: encodeURIComponent(
JSON.stringify({
sessionId: uni.getStorageSync('sessionId'),
iv: e.iv,
encryptedData: e.encryptedData,
code: e.code,
}),
),
});
if (error === 0) {
resolve(true); resolve(true);
} }
resolve(false); resolve(false);

View File

@ -115,7 +115,6 @@ http.interceptors.response.use(
} }
// TODO 芋艿:如果是登录的 API则自动设置 token // TODO 芋艿:如果是登录的 API则自动设置 token
if (response.data?.data?.accessToken) { if (response.data?.data?.accessToken) {
debugger
$store('user').setToken(response.data.data.accessToken); $store('user').setToken(response.data.data.accessToken);
} }
@ -220,8 +219,8 @@ const request = (config) => {
// TODO 芋艿:额外拼接 // TODO 芋艿:额外拼接
if (config.url.indexOf('/app-api/') >= 0) { if (config.url.indexOf('/app-api/') >= 0) {
// config.url = 'http://api-dashboard.yudao.iocoder.cn' + config.url; // 调用【云端】 // config.url = 'http://api-dashboard.yudao.iocoder.cn' + config.url; // 调用【云端】
// config.url = 'http://127.0.0.1:48080' + config.url; // 调用【本地】 config.url = 'http://127.0.0.1:48080' + config.url; // 调用【本地】
config.url = 'http://yunai.natapp1.cc' + config.url; // 调用【natapp】 // config.url = 'http://yunai.natapp1.cc' + config.url; // 调用【natapp】
} }
return http.middleware(config); return http.middleware(config);
}; };

View File

@ -217,8 +217,8 @@ const request = (config) => {
// 设置接口地址 // 设置接口地址
// config.url = 'http://api-dashboard.yudao.iocoder.cn' + config.url; // 调用【云端】 // config.url = 'http://api-dashboard.yudao.iocoder.cn' + config.url; // 调用【云端】
// config.url = 'https://app.test.huizhizao.vip/prod-api' + config.url; // 调用【云端】 // config.url = 'https://app.test.huizhizao.vip/prod-api' + config.url; // 调用【云端】
// config.url = 'http://127.0.0.1:48080' + config.url; // 调用【本地】 config.url = 'http://127.0.0.1:48080' + config.url; // 调用【本地】
config.url = 'http://yunai.natapp1.cc' + config.url; // 调用【natapp】 // config.url = 'http://yunai.natapp1.cc' + config.url; // 调用【natapp】
} }
return http.middleware(config); return http.middleware(config);
}; };