|
@@ -94,7 +94,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script setup>
|
|
|
-import { onMounted, watch, defineEmits, ref, reactive, computed, nextTick } from "vue";
|
|
|
+import { onMounted,onUnmounted, watch, defineEmits, ref, reactive, computed, nextTick } from "vue";
|
|
|
import { useApp, getApp } from "@/app";
|
|
|
import { useStore } from "vuex";
|
|
|
import { Dialog } from "@/global_components/";
|
|
@@ -146,7 +146,7 @@ let getUrl = (href, queryArr) => {
|
|
|
if (!browser.hasURLParam(item.key)) {
|
|
|
let ttt = href.split("index.html?");
|
|
|
href = `${ttt[0]}index.html?${item.key}=${item.val}&${ttt[1]}`;
|
|
|
- console.log(href,'------index.htmlindex.htmlindex.htmlindex.htmlindex.htmlindex.htmlindex.html----------');
|
|
|
+ console.log(href, "------index.htmlindex.htmlindex.htmlindex.htmlindex.htmlindex.htmlindex.html----------");
|
|
|
} else {
|
|
|
href = browser.replaceQueryString(href, item.key, item.val);
|
|
|
}
|
|
@@ -461,7 +461,6 @@ watch(
|
|
|
() => {
|
|
|
if (role.value == "leader") {
|
|
|
all_mute_mic.value = !user_list.value.some((item) => !item.IsMuted && item.Role == "customer");
|
|
|
- console.log(all_mute_mic.value, "user_list,valueuser_list,valueuser_list,valueuser_list,valueuser_list,valueuser_list,value");
|
|
|
}
|
|
|
},
|
|
|
{
|
|
@@ -537,6 +536,13 @@ const startFollow = (app) => {
|
|
|
},
|
|
|
]);
|
|
|
|
|
|
+ wxShare({
|
|
|
+ title: `【好友推薦】一起雲逛店吧~`,
|
|
|
+ desc: "【好友推薦】一起雲逛店吧~",
|
|
|
+ link: shareLink.value,
|
|
|
+ imgUrl: "https://glp-vr.cdfmembers.com/cdf/file/91dd5305525f463286f03a31abd1c154.jpg",
|
|
|
+ });
|
|
|
+
|
|
|
if (browser.detectWeixin()) {
|
|
|
//ios的ua中无miniProgram,但都有MicroMessenger(表示是微信浏览器)
|
|
|
wx.miniProgram.getEnv((res) => {
|
|
@@ -553,13 +559,6 @@ const startFollow = (app) => {
|
|
|
});
|
|
|
}
|
|
|
|
|
|
- wxShare({
|
|
|
- title: `【好友推薦】一起雲逛店吧~`,
|
|
|
- desc: "【好友推薦】一起雲逛店吧~",
|
|
|
- link: shareLink.value,
|
|
|
- imgUrl: "https://glp-vr.cdfmembers.com/cdf/file/91dd5305525f463286f03a31abd1c154.jpg",
|
|
|
- });
|
|
|
-
|
|
|
console.log("分享", shareLink.value);
|
|
|
|
|
|
let tmp = "";
|
|
@@ -669,20 +668,29 @@ const startFollow = (app) => {
|
|
|
});
|
|
|
};
|
|
|
|
|
|
-onMounted(() => {
|
|
|
- useApp().then((app) => {
|
|
|
- startFollow(app);
|
|
|
- app.Connect.follow.on("data", (data) => {
|
|
|
- if (isJoined.value) {
|
|
|
- socket.value.emit("sync", data);
|
|
|
- }
|
|
|
- });
|
|
|
+let onfollowData = (data) => {
|
|
|
+ console.log(111111111111, data);
|
|
|
+ if (isJoined.value) {
|
|
|
+ socket.value.emit("sync", data);
|
|
|
+ }
|
|
|
+};
|
|
|
|
|
|
- app.Connect.paint.on("data", (data) => {
|
|
|
- canUndo.value = app.Connect.paint.records.length > 0;
|
|
|
- socket.value.emit("paint", data);
|
|
|
- });
|
|
|
- });
|
|
|
+let onfollowPaint = (data) => {
|
|
|
+ canUndo.value = app.Connect.paint.records.length > 0;
|
|
|
+ socket.value.emit("paint", data);
|
|
|
+};
|
|
|
+
|
|
|
+onMounted(async () => {
|
|
|
+ let app = await getApp();
|
|
|
+ startFollow(app);
|
|
|
+ app.Connect.follow.on("data", onfollowData);
|
|
|
+ app.Connect.paint.on("data", onfollowPaint);
|
|
|
+});
|
|
|
+
|
|
|
+onUnmounted(async () => {
|
|
|
+ let app = await getApp();
|
|
|
+ app.Connect.follow.off("data", onfollowData);
|
|
|
+ app.Connect.follow.off("data", onfollowData);
|
|
|
});
|
|
|
</script>
|
|
|
|