@@ -21,8 +26,10 @@
// 102B3
import { ref, reactive, onMounted } from "vue"
import { useRouter } from 'vue-router'
-import { merchant_listApi } from "@/api.js"
+import { merchant_listApi, merchantApi } from "@/api.js"
import { areaObj } from '@/store/index.js'
+import router from "../router";
+const showLogin = ref(false)
const areaStore = areaObj()
const route = useRouter()
@@ -36,6 +43,8 @@ const num = (n) => {
}
+
+let baseData = {}
const changeTable = (num) => {
configs.data.splice(0, configs.data.length)
@@ -47,6 +56,7 @@ const changeTable = (num) => {
limit: 50
}
).then(res => {
+ baseData = res.data.list
addConfigData(res.data.list)
})
@@ -55,7 +65,18 @@ const changeTable = (num) => {
const hdClick = (e) => {
if (e.columnIndex == 10) {
- route.replace('/storeLogin')
+ merchantApi(
+ {
+ mer_id: baseData[e.rowIndex].mer_id,
+ ...areaStore.area
+ }
+ ).then(res => {
+ areaStore.storeLogin(res.data)
+ router.push('/storeLogin')
+
+
+ console.log(areaStore.userInfo)
+ })
}
@@ -73,7 +94,7 @@ const addConfigData = (data) => {
`
${item.is_best ? "推荐" : "不推荐"}
`,
`
${item.create_time}
`,
`
${item.margin}
`,
- `
${item.merchantCategory?.category_name||'--'}
`,
+ `
${item.merchantCategory?.category_name || '--'}
`,
`
${item.status ? '开启' : '关闭'}
`,
`
登录
`,
]
@@ -89,7 +110,7 @@ const addConfigData = (data) => {
`
${item.is_best ? "推荐" : "不推荐"}
`,
`
${item.create_time}
`,
`
${item.margin}
`,
- `
${item.merchantCategory?.category_name||'--'}
`,
+ `
${item.merchantCategory?.category_name || '--'}
`,
`
${item.status ? '开启' : '关闭'}
`,
`
登录
`,
]
@@ -210,6 +231,11 @@ onMounted(() => {
-
-.row {}
+.center {
+ position: absolute;
+ top: 50%;
+ left: 50%;
+ transform: translate(-50%, -50%);
+ color: white;
+}
\ No newline at end of file
diff --git a/src/view/index.vue b/src/view/index.vue
index d358a68..e203597 100644
--- a/src/view/index.vue
+++ b/src/view/index.vue
@@ -1,5 +1,9 @@
-
+
+ Loading...
+
+
+
@@ -36,11 +40,19 @@ import bottomRight from "@/components/index/bottomRight.vue"
import { areaObj } from '@/store/index.js'
import { useRouter } from "vue-router"
const router = useRouter()
+
+
+
+const showLoading = ref(true)
const areaStore = areaObj()
const areaCodes = reactive({
...areaStore.area
})
-const loading = ref(false)
+
+
+setTimeout(() => {
+ showLoading.value = false
+}, 1000);
\ No newline at end of file
diff --git a/src/view/login.vue b/src/view/login.vue
index 514e7d0..fd04f8c 100644
--- a/src/view/login.vue
+++ b/src/view/login.vue
@@ -93,8 +93,8 @@ const submit = () => {
}).then(res => {
if (res.data.user.street_code) {
-
- role.value =3
+
+ role.value = 3
res.data.role = role.value
localStorage.setItem("TRADE_USER", JSON.stringify(res.data))
diff --git a/src/view/storeLogin.vue b/src/view/storeLogin.vue
index 6e83405..1e29774 100644
--- a/src/view/storeLogin.vue
+++ b/src/view/storeLogin.vue
@@ -149,17 +149,33 @@