Commit 2ef4f9e7 authored by Zhang Xiaojie's avatar Zhang Xiaojie

Merge branch 'dev' of gitlab.33.cn:chenqikuai/fns_front_2 into dev

parents dacc8e5c ff44ae64
<template>
<div class="navbar w-full" style="z-index: 300">
<div
class="h-full theBar flex items-center px-5 justify-center relative"
style="background:#F7F7FA"
class="h-full theBar flex items-end px-5 justify-center relative"
style="background:#F7F7FA; padding-bottom: 8px;"
:class="isBangs ? 'h72' : 'h46'"
:style="[(isBangs && bangsBlock) ? 'height: calc(72px - 24px - 8px)' : '']"
v-bind="$attrs"
v-if="(!isBangs && !bangsBlock || isBangs)"
>
<div class="relative w-full flex items-center justify-center">
<div
class="relative w-full flex items-center justify-center"
v-if="(!isBangs && !bangsBlock) || (isBangs)"
>
<icon
v-if="showBackIcon"
v-if="!bangsBlock && showBackIcon"
@click="$router.go(-1)"
name="icon-fanhui"
class="absolute left-0"
......@@ -33,7 +39,11 @@
<div class="title whitespace-nowrap overflow-hidden overflow-ellipsis px-5">{{ title }}</div>
</div>
</div>
<div class="some-block" v-if="occupyPosition"></div>
<div
:class="isBangs ? 'h72' : 'h46'"
v-if="!isBangs && !bangsBlock && occupyPosition || (isBangs && !bangsBlock)"
></div>
<div style="height: calc(72px - 24px - 8px)" v-if="isBangs && bangsBlock"></div>
</div>
</template>
<script lang="ts">
......@@ -72,22 +82,37 @@ export default defineComponent({
default: () => {
return { path: '/Search' }
}
},
bangsBlock: {
type: Boolean,
default: false
}
},
computed: {
isBangs() {
return true
}
}
});
</script>
<style lang="less" scoped>
.navbar {
.h72 {
height: 72px;
}
.h46 {
height: 46px;
}
.theBar {
position: fixed;
top: 0;
left: 0;
right: 0;
z-index: 300;
height: 46px;
// height: 72px;
}
.some-block {
height: 46px;
// height: 72px;
}
.title {
font-size: 16px;
......
......@@ -6,3 +6,10 @@ export function getStaffOnDutyStatus() {
method: 'get',
})
}
export function enableLive() {
return baseAxios({
url: '/staff/enable_live',
method: 'get'
})
}
import router from '@/router'
import { getUserMsg } from '@/utils/userMsg'
import axios, { AxiosRequestConfig } from 'axios'
import axios, { AxiosRequestConfig, AxiosResponse } from 'axios'
import { Toast } from 'vant'
const baseAxios = axios.create({
......@@ -8,7 +8,7 @@ const baseAxios = axios.create({
})
baseAxios.interceptors.response.use(
(baseRet: AxiosRequestConfig) => {
(baseRet: AxiosResponse) => {
const ret = baseRet.data as iRet
if ([504, 503].includes(ret.code)) {
Toast.fail(ret.msg)
......@@ -19,6 +19,8 @@ baseAxios.interceptors.response.use(
} else if (ret.code === 1000) {
Toast('您好,非常抱歉,该网点暂无营业人员。')
} else if (ret.code !== 200) {
// console.log(baseRet, 'show baseret');
if (baseRet.config.url === '/staff/enable_live') return baseRet.data
Toast.fail(ret.msg)
}
return baseRet.data
......
<template>
<nav-bar :bangsBlock="true"/>
<div class="register pt-5">
<Icon name="icon-a-shanchu1" color="black" size="20" class="mb-7" @click="handleClickClose" />
<div class="flex justify-between items-center text-base">
<img src="@/assets/icons/app-icon.png" class="h-12" alt />
<img src="@/assets/icons/app-icon.png" class="h-12" />
</div>
<div class="title mt-10 mb-14 title-text text-app-txt">注册/登录</div>
<PhoneInput
......@@ -129,6 +130,7 @@ import notCheckedIcon from "@/assets/icons/not_checked.png";
import checkedIcon from "@/assets/icons/checked.png";
import LoginSerivce from "./LoginService";
import NavBar from "@/components/NavBar/index.vue"
const accountType = eAccountType.NULL;
const loginWay = eLoginWay.NULL;
......@@ -164,6 +166,7 @@ export default defineComponent({
},
},
components: {
NavBar,
Input,
CodeInput,
LoginButton,
......
import Bridge from "@/utils/jsBridge2"
import { Toast } from 'vant';
import {enableLive} from '@/service/StaffService/index'
export default [
......@@ -48,10 +49,26 @@ export default [
Toast('请先登录')
return
}
console.log('bridge')
new Bridge().bridge_live({
phone: JSON.parse(window.localStorage.getItem('USER_MSG') as string)?.userInfo.phone,
avatar: window.location.host + require('../../../assets/icons/avatar.png')
let allow = false
let time_section = ''
enableLive().then(res => {
if (res.code === 200) {
allow = res.data.allow
time_section = res.data.time_section
}
new Bridge().bridge_live({
phone: JSON.parse(window.localStorage.getItem('USER_MSG') as string)?.userInfo.phone,
avatar: window.location.host + require('../../../assets/icons/avatar.png'),
allow,
time_section
})
}).catch(() => {
new Bridge().bridge_live({
phone: JSON.parse(window.localStorage.getItem('USER_MSG') as string)?.userInfo.phone,
avatar: window.location.host + require('../../../assets/icons/avatar.png'),
allow,
time_section
})
})
},
},
......
<template>
<Navbar :bangsBlock="true"/>
<div class="page flex-col">
<div class="outer1 flex-col">
<Banner class="w-full overflow-hidden" :bannerUrls="bannerList" />
......@@ -47,12 +48,7 @@
"
/>
</Skeleton>
<group-title
class="mt-7"
v-if="hotNews"
title="热门资讯"
@click="$router.push('News')"
/>
<group-title class="mt-7" v-if="hotNews" title="热门资讯" @click="$router.push('News')" />
<HotNews v-for="n in hotNews" :key="n.uuid" :info="n" />
</div>
</div>
......@@ -61,6 +57,7 @@
<script lang="ts">
import { defineComponent } from "vue";
import Banner from "./Banner/Banner.vue";
import Navbar from "@/components/NavBar/index.vue"
import AppList from "./AppList/index.vue";
import appList from "./appList";
import Icon from "@/components/common/Icon.vue";
......@@ -89,6 +86,7 @@ export default defineComponent({
Icon,
Notify,
GroupTitle,
Navbar,
FnsCard,
LoanCard,
LiveCard,
......@@ -122,7 +120,7 @@ export default defineComponent({
},
],
constants: {},
hotNews: [],
hotNews: [] as any[],
src: "",
activityUuid: "",
max_amount: 0,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment