parent
533f7df7ad
commit
071074b96c
1
.env
1
.env
|
@ -6,6 +6,7 @@ SHOPRO_BASE_URL=http://api-dashboard.yudao.iocoder.cn
|
|||
|
||||
# 后端接口 - 测试环境(通过 process.env.NODE_ENV = development)
|
||||
SHOPRO_DEV_BASE_URL=http://127.0.0.1:48080
|
||||
### SHOPRO_DEV_BASE_URL=http://10.171.1.188:48080
|
||||
### SHOPRO_DEV_BASE_URL = http://yunai.natapp1.cc
|
||||
|
||||
# 文件上传类型:server - 后端上传, client - 前端直连上传,仅支持 S3 服务
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
"id": "shopro",
|
||||
"name": "shopro",
|
||||
"displayName": "芋道商城",
|
||||
"version": "2.4.2",
|
||||
"version": "2.5.0",
|
||||
"description": "芋道商城,一套代码,同时发行到iOS、Android、H5、微信小程序多个平台,请使用手机扫码快速体验强大功能",
|
||||
"scripts": {
|
||||
"prettier": "prettier --write \"{pages,sheep}/**/*.{js,json,tsx,css,less,scss,vue,html,md}\""
|
||||
|
|
|
@ -48,16 +48,20 @@ export default {
|
|||
], // TODO 芋艿:后续可以设置更多权限;
|
||||
openTagList: data.openTagList,
|
||||
});
|
||||
} else {
|
||||
console.log('请求 JSSDK 配置失败,错误码:', code);
|
||||
}
|
||||
|
||||
// 监听结果
|
||||
configSuccess = true;
|
||||
jweixin.error((err) => {
|
||||
debugger;
|
||||
configSuccess = false;
|
||||
console.error('微信 JSSDK 初始化失败', err);
|
||||
// $helper.toast('微信JSSDK:' + err.errMsg);
|
||||
});
|
||||
jweixin.ready(() => {
|
||||
debugger;
|
||||
if (configSuccess) {
|
||||
console.log('微信 JSSDK 初始化成功');
|
||||
}
|
||||
|
|
|
@ -19,7 +19,7 @@ async function login(code = '', state = '') {
|
|||
uni.setStorageSync('returnUrl', location.href);
|
||||
window.location = loginUrl;
|
||||
}
|
||||
// 情况二:有 code 时,使用 code 去自动登录
|
||||
// 情况二:有 code 时,使用 code 去自动登录
|
||||
} else {
|
||||
// 解密 code 发起登陆
|
||||
const loginResult = await AuthUtil.socialLogin(socialType, code, state);
|
||||
|
@ -59,8 +59,7 @@ const unbind = async (openid) => {
|
|||
|
||||
// 获取公众号登陆地址
|
||||
async function getLoginUrl(event = 'login') {
|
||||
const page = getRootUrl() + 'pages/index/login'
|
||||
+ '?event=' + event; // event 目的,区分是 login 还是 bind
|
||||
const page = getRootUrl() + 'pages/index/login' + '?event=' + event; // event 目的,区分是 login 还是 bind
|
||||
const { code, data } = await AuthUtil.socialAuthRedirect(socialType, page);
|
||||
if (code !== 0) {
|
||||
return undefined;
|
||||
|
|
|
@ -68,9 +68,9 @@ const app = defineStore({
|
|||
this.info = {
|
||||
name: '芋道商城',
|
||||
logo: 'https://static.iocoder.cn/ruoyi-vue-pro-logo.png',
|
||||
version: '2.4.2',
|
||||
version: '2.5.0',
|
||||
copyright: '全部开源,个人与企业可 100% 免费使用',
|
||||
copytime: 'Copyright© 2018-2024',
|
||||
copytime: 'Copyright© 2018-2025',
|
||||
|
||||
cdnurl: 'https://file.sheepjs.com', // 云存储域名
|
||||
filesystem: 'qcloud', // 云存储平台
|
||||
|
|
Loading…
Reference in New Issue