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