|
|
@@ -78,7 +78,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script setup name="Index" lang="ts">
|
|
|
-import { categoryList, productList, deviceList, deviceCategory,deviceStates } from '@/api/home'
|
|
|
+import { categoryList, productList, deviceList, deviceCategory,deviceStates,customerApi} from '@/api/home'
|
|
|
import * as echarts from 'echarts'
|
|
|
import { md5Encrypt } from '@/utils/jsencrypt'
|
|
|
import home_1 from '@/assets/images/home/home_1.png'
|
|
|
@@ -446,7 +446,7 @@ const getDataList = async () => {
|
|
|
const goTarget = (url: string) => {
|
|
|
window.open(url, '__blank')
|
|
|
}
|
|
|
-const jumpweb =(type) => {
|
|
|
+const jumpweb = async (type: any) => {
|
|
|
let md5Txt = md5Encrypt(String(getName()).toLowerCase())
|
|
|
let paraStr = `user=${getName()}&token=${md5Txt}`
|
|
|
switch (type) {
|
|
|
@@ -457,18 +457,33 @@ const jumpweb =(type) => {
|
|
|
break
|
|
|
case TypeApi.health:
|
|
|
{
|
|
|
- window.open(`https://web.poteviohealth.com/r/daping/health/index.html?${paraStr}`,'_blank')
|
|
|
+ let customerData = await customerApiF(md5Txt)
|
|
|
+ if(customerData['status'] == 0) {
|
|
|
+ // https://web.poteviohealth.com/r/daping/health/index.html?customerId=160
|
|
|
+ window.open(`https://web.poteviohealth.com/r/daping/health/index.html?customerId=${customerData.customerId}`,'_blank')
|
|
|
+ }else {
|
|
|
+ ElMessage.error('跳转出错:'+ JSON.stringify(customerData))
|
|
|
+ }
|
|
|
}
|
|
|
break
|
|
|
case TypeApi.bed:
|
|
|
{
|
|
|
- window.open(`https://web.poteviohealth.com/boss/daping/data.html?${paraStr}`,'_blank')
|
|
|
+ window.open(`http://web.poteviohealth.com/boss/daping/data.html?${paraStr}`,'_blank')
|
|
|
}
|
|
|
break
|
|
|
default:
|
|
|
break
|
|
|
}
|
|
|
}
|
|
|
+const customerApiF = async (md5Txt: string) => {
|
|
|
+ const customerData = await customerApi({
|
|
|
+ command:'customerloginiot',
|
|
|
+ account:'iot'+getName(),
|
|
|
+ password: md5Txt,
|
|
|
+ terminalType: 'health'
|
|
|
+ })
|
|
|
+ return customerData
|
|
|
+}
|
|
|
onMounted(() => {
|
|
|
getDataList()
|
|
|
})
|