+ diff --git a/src/api/account.js b/src/api/account.js
index 581bb56..c569fd6 100644
--- a/src/api/account.js
+++ b/src/api/account.js
@@ -26,7 +26,6 @@ export function tkhostdata(data) {
-
export function apiGetCart() {
return getAxios({ url: '/cgi-bin/cart/latest' })
}
diff --git a/src/assets/MiniProgram.png b/src/assets/MiniProgram.png
new file mode 100644
index 0000000..e09ad6c
Binary files /dev/null and b/src/assets/MiniProgram.png differ
diff --git a/src/assets/ai.png b/src/assets/ai.png
new file mode 100644
index 0000000..1ef2140
Binary files /dev/null and b/src/assets/ai.png differ
diff --git a/src/assets/icon.png b/src/assets/icon.png
new file mode 100644
index 0000000..0458487
Binary files /dev/null and b/src/assets/icon.png differ
diff --git a/src/assets/plus.png b/src/assets/plus.png
new file mode 100644
index 0000000..8929a91
Binary files /dev/null and b/src/assets/plus.png differ
diff --git a/src/assets/plus2.png b/src/assets/plus2.png
new file mode 100644
index 0000000..43b8255
Binary files /dev/null and b/src/assets/plus2.png differ
diff --git a/src/utils/axios.js b/src/utils/axios.js
index c2d0b02..2169117 100644
--- a/src/utils/axios.js
+++ b/src/utils/axios.js
@@ -25,14 +25,14 @@ if (process.env.NODE_ENV === 'development') {
// baseURL = "https://api.tkpage.yolozs.com"
baseURL = "http://47.79.98.113:8101"
// baseURL = "http://192.168.0.103:8085/"
- // baseURL = "http://192.168.1.174:8101"
+ // baseURL = "http://192.168.1.144:8101"
} else {
// 测试环境
// baseURL = "http://120.26.251.180:8085/"
// 开发环境
// baseURL = "https://api.tkpage.yolozs.com"
baseURL = "http://47.79.98.113:8101"
- // baseURL = "http://192.168.1.174:8101"
+ // baseURL = "http://192.168.1.144:8101"
// baseURL = "http://api.tkpage.vvtiktok.cn"
}
diff --git a/src/utils/pythonBridge.js b/src/utils/pythonBridge.js
index f31b361..7405148 100644
--- a/src/utils/pythonBridge.js
+++ b/src/utils/pythonBridge.js
@@ -10,34 +10,6 @@ const initBridge = () => {
});
};
export function usePythonBridge() {
-
-
-
-
- // // 调用 Python 方法
- // const fetchDataConfig = (data) => {
- // return new Promise((resolve, reject) => {
- // if (bridge.value) {
- // bridge.value.fetchDataConfig(data, function (result) {
- // resolve(result);
- // });
- // }
-
-
- // });
- // };
-
- // // 查询获取主播的数据
- // const fetchDataCount = () => {
- // return new Promise((resolve, reject) => {
- // if (bridge.value) {
- // bridge.value.fetchDataCount(function (result) {
- // resolve(result);
- // });
- // }
- // });
- // };
-
//删除前端储存数据
const deleteStorageData = (data) => {
return new Promise((resolve, reject) => {
@@ -112,18 +84,42 @@ export function usePythonBridge() {
}
};
- // // 登录tk后台
- // const loginBackStage = (data) => {
- // if (bridge.value) {
- // if (data.index == 0) {
- // bridge.value.loginBackStage(JSON.stringify(data));
- // } else if (data.index == 1) {
- // bridge.value.loginBackStageCopy(JSON.stringify(data));
- // }
-
- // }
- // };
-
+ //指定直播间
+ const Specifystreaming = (data) => {
+ return new Promise((resolve, reject) => {
+ if (pyBridge.value) {
+ pyBridge.value.find_big_brother_in_rooms(data,function (result) {
+ resolve(result);
+ });
+ }else{
+ console.log("pyBridge is null未连接上")
+ }
+ });
+ };
+ //储存直播间id
+ const setStorageStreamId = (data) => {
+ return new Promise((resolve, reject) => {
+ if (pyBridge.value) {
+ pyBridge.value.saveFrontString(JSON.stringify(data),function (result) {
+ resolve(result);
+ });
+ }else{
+ console.log("pyBridge is null未连接上")
+ }
+ });
+ };
+ //获取直播间id
+ const getStorageStreamId = (data) => {
+ return new Promise((resolve, reject) => {
+ if (pyBridge.value) {
+ pyBridge.value.loadFrontStringRaw(JSON.stringify(data),function (result) {
+ resolve(result);
+ });
+ }else{
+ console.log("pyBridge is null未连接上")
+ }
+ });
+ };
//跳转到主播页面
const givePyAnchorId = (id) => {
console.log("id",id);
@@ -133,29 +129,6 @@ export function usePythonBridge() {
}
};
- // //查询登录状态
- // const backStageloginStatus = () => {
- // return new Promise((resolve, reject) => {
- // if (bridge.value) {
- // bridge.value.backStageloginStatus(function (result) {
- // resolve(result);
- // });
- // }
- // });
-
- // };
- // //查询登录状态
- // const backStageloginStatusCopy = () => {
- // return new Promise((resolve, reject) => {
- // if (bridge.value) {
- // bridge.value.backStageloginStatusCopy(function (result) {
- // resolve(result);
- // });
- // }
- // });
-
- // };
-
//导出表格
const exportToExcel = (data) => {
if (pyBridge .value) {
@@ -194,5 +167,8 @@ export function usePythonBridge() {
getStorageData,
setStorageData,
deleteStorageData,
+ Specifystreaming,
+ setStorageStreamId,
+ getStorageStreamId
};
}
\ No newline at end of file
diff --git a/src/utils/storage.js b/src/utils/storage.js
index f843818..feb4641 100644
--- a/src/utils/storage.js
+++ b/src/utils/storage.js
@@ -28,6 +28,13 @@ export async function getUser() {
return JSON.parse(res);
}
+export function setuserprmisson() {
+ return new Promise((resolve, reject) => {
+ const res = getStorageData({ key: 'user' });
+ resolve(res);
+ });
+}
+
export async function setNumData(numData) {
const res = await setStorageData({key: 'num',data: numData})
}
diff --git a/src/views/HomeView.vue b/src/views/HomeView.vue
index e767a66..3a48527 100644
--- a/src/views/HomeView.vue
+++ b/src/views/HomeView.vue
@@ -141,7 +141,7 @@ const onSubmit = () => {
})
.then((res) => {
loading.close();
- console.log(res);
+ console.log("123123123123",res);
setToken(res.tokenValue);
tokenCache.setToken(res.tokenValue)
userCache.setUser(res)
diff --git a/src/views/hosts/Home.vue b/src/views/hosts/Home.vue
new file mode 100644
index 0000000..5b7f867
--- /dev/null
+++ b/src/views/hosts/Home.vue
@@ -0,0 +1,77 @@
+
+
+
+

+
+