qdmp-cli 0.0.5 → 0.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/actions.js +1 -1
  2. package/api.js +4 -6
  3. package/package.json +1 -1
package/actions.js CHANGED
@@ -133,7 +133,7 @@ export async function uploadAction(option) {
133
133
  await cleanWorkSpaceFolder();
134
134
  success(
135
135
  `上传成功,版本号:${code},可前往官网进行小程序发布:https://${
136
- option.env === "prod" ? "" : "dev-"
136
+ option.env === "dev" ? "dev-" : ""
137
137
  }mp.qiandao.com`
138
138
  );
139
139
  } catch (e) {
package/api.js CHANGED
@@ -28,12 +28,10 @@ export const request = async (url, options = {}, env = "prod") => {
28
28
  headers: { ...API_CONFIG.headers },
29
29
  ...options,
30
30
  };
31
-
32
- if (url !== "/mp/v1/user/login") {
33
- const token = getToken();
34
- if (token) {
35
- config.headers["authorization"] = `Bearer ${token}`;
36
- }
31
+ // 添加认证头(如果有 token)
32
+ const token = getToken();
33
+ if (token) {
34
+ config.headers["authorization"] = `Bearer ${token}`;
37
35
  }
38
36
 
39
37
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "qdmp-cli",
3
- "version": "0.0.5",
3
+ "version": "0.0.6",
4
4
  "description": "qdmp-cli",
5
5
  "main": "index.js",
6
6
  "type": "module",