diff --git a/.env.development b/.env.development
index 4b1e716..18a046a 100644
--- a/.env.development
+++ b/.env.development
@@ -14,8 +14,11 @@ VITE_API_WSS = 'wss://cashier.sxczgkj.cn/client'
# 正式 php
VITE_API_PHP_URL = 'http://czgdoumei.sxczgkj.com/index.php/api'
+# 测试 php 开票
+# VITE_API_KP_URL = 'http://192.168.1.13:8888/api'
+
# 正式 php 开票
-VITE_API_KP_URL = 'http://192.168.1.13:8888/api'
+VITE_API_KP_URL = 'https://invoice.sxczgkj.cn/api'
# 阿伟
# VITE_API_URL = 'http://192.168.2.96:10587/cashier-client'
diff --git a/.env.production b/.env.production
index 6973557..9ec4f03 100644
--- a/.env.production
+++ b/.env.production
@@ -8,7 +8,7 @@ VITE_API_WSS = 'wss://cashier.sxczgkj.cn/client'
VITE_API_PHP_URL = 'http://czgdoumei.sxczgkj.com/index.php/api'
# 正式 php 开票
-VITE_API_KP_URL = 'http://192.168.1.13:8888/api'
+VITE_API_KP_URL = 'https://invoice.sxczgkj.cn/api'
# 线上环境接口地址
VITE_API_URL = 'https://cashierclient.sxczgkj.cn/cashier-client/'
\ No newline at end of file
diff --git a/.env.test b/.env.test
index 5041768..48c66f1 100644
--- a/.env.test
+++ b/.env.test
@@ -2,19 +2,22 @@
ENV = test
#测试ws
-VITE_API_WSS = 'wss://wxcashiertest.sxczgkj.cn/client'
+# VITE_API_WSS = 'wss://wxcashiertest.sxczgkj.cn/client'
# 正式ws
-# VITE_API_WSS = 'wss://cashier.sxczgkj.cn/client'
+VITE_API_WSS = 'wss://cashier.sxczgkj.cn/client'
# 正式 php
VITE_API_PHP_URL = 'http://czgdoumei.sxczgkj.com/index.php/api'
+# 测试 php 开票
+# VITE_API_KP_URL = 'http://192.168.1.13:8888/api'
+
# 正式 php 开票
-VITE_API_KP_URL = 'http://192.168.1.13:8888/api'
+VITE_API_KP_URL = 'https://invoice.sxczgkj.cn/api'
# 测试
-VITE_API_URL = 'https://cashier-client.sxczgkj.cn/cashier-client'
+# VITE_API_URL = 'https://cashier-client.sxczgkj.cn/cashier-client'
# 正式
-# VITE_API_URL = 'https://cashierclient.sxczgkj.cn/cashier-client'
\ No newline at end of file
+VITE_API_URL = 'https://cashierclient.sxczgkj.cn/cashier-client'
\ No newline at end of file
diff --git a/src/api/invoice.js b/src/api/invoice.js
index b3f1117..a544749 100644
--- a/src/api/invoice.js
+++ b/src/api/invoice.js
@@ -8,7 +8,33 @@ import request_kp from "@/utils/request_kp.js";
export function issuedby(data) {
return request_kp({
method: "post",
- url: "szzpy/issuedby",
+ url: "szzpy/syjissuedby",
+ data,
+ });
+}
+
+/**
+ * 商家通过收银机提交开票信息
+ * @param {*} data
+ * @returns
+ */
+export function carsubinvoicing(data) {
+ return request_kp({
+ method: "post",
+ url: "store/carsubinvoicing",
+ data,
+ });
+}
+
+/**
+ * 打印二维码
+ * @param {*} data
+ * @returns
+ */
+export function syjprintqrcode(data) {
+ return request_kp({
+ method: "post",
+ url: "store/syjprintqrcode",
data,
});
}
diff --git a/src/utils/request_kp.js b/src/utils/request_kp.js
index 9279b87..4dce30c 100644
--- a/src/utils/request_kp.js
+++ b/src/utils/request_kp.js
@@ -15,12 +15,12 @@ const service = axios.create({
// 请求拦截器
service.interceptors.request.use(
(config) => {
- // // 在发送请求之前做些什么 token
- // if (useStorage.get("douyin") && useStorage.get("douyin").token) {
- // config.headers["bausertoken"] = useStorage.get("douyin").token;
- // // config.headers['Content-Type'] = 'application/json'
- // }
+ // 在发送请求之前做些什么 token
+ config.headers["pctoken"] = useStorage.get("token");
config.headers["ispc"] = 1;
+ config.headers["loginName"] = useStorage.get("userInfo").loginName;
+ config.headers["clientType"] = "pc";
+ config.headers["shopId"] = useStorage.get("userInfo").shopId;
return config;
},
(error) => {
diff --git a/src/views/order/components/invoice.vue b/src/views/order/components/invoice.vue
new file mode 100644
index 0000000..a9dd576
--- /dev/null
+++ b/src/views/order/components/invoice.vue
@@ -0,0 +1,119 @@
+
+