|
@@ -5,8 +5,9 @@
|
|
|
</template>
|
|
|
<script>
|
|
|
import AppLayout from "@/framework/EditorAppLayout.vue";
|
|
|
-import { ref, reactive, defineComponent } from "vue-demi";
|
|
|
import { mapGetters } from "vuex";
|
|
|
+import browser from "@/utils/browser";
|
|
|
+import { exchangeId } from "@/api";
|
|
|
|
|
|
export default {
|
|
|
components: {
|
|
@@ -23,7 +24,28 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
},
|
|
|
+ async beforeMount() {
|
|
|
+ const id = browser.urlQueryValue('id');
|
|
|
+ const lang = browser.urlQueryValue("lang") || 'zh'
|
|
|
+ const token = browser.urlQueryValue('token');
|
|
|
+ const res = await exchangeId({
|
|
|
+ id: id
|
|
|
+ })
|
|
|
+ if (token) {
|
|
|
+ localStorage.setItem('token', token)
|
|
|
+ }
|
|
|
+ const { id: resID, num } = res.data
|
|
|
+ const isCam = String(num).length > 0
|
|
|
+ let urlRes = `./edit.html?id=${resID}&lang=${lang}#/base`
|
|
|
+ if (isCam) {
|
|
|
+ urlRes = `./edit.html?id=${resID}&lang=${lang}from=cam#/base`
|
|
|
+ }
|
|
|
+ console.log('res', urlRes)
|
|
|
+ location.replace(urlRes);
|
|
|
+ },
|
|
|
mounted() {
|
|
|
+
|
|
|
+
|
|
|
document.title = this.$i18n.t("gather.editpage_name");
|
|
|
window.store = this.$store;
|
|
|
window.addEventListener(
|
|
@@ -54,6 +76,7 @@ body,
|
|
|
position: relative;
|
|
|
z-index: 0;
|
|
|
}
|
|
|
+
|
|
|
body {
|
|
|
margin: 0;
|
|
|
color: #fff;
|
|
@@ -63,11 +86,13 @@ body {
|
|
|
user-select: none;
|
|
|
font-family: OpenSans, sans-serif;
|
|
|
}
|
|
|
+
|
|
|
ul {
|
|
|
list-style: none;
|
|
|
margin: 0;
|
|
|
padding: 0;
|
|
|
}
|
|
|
+
|
|
|
img {
|
|
|
border: 0;
|
|
|
outline: 0;
|