Commit 7996255f authored by Zhang Xiaojie's avatar Zhang Xiaojie

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

parents 38ba0bc4 686a29d4
地址 对应的 用户信息会变吗? 是否会变将影响着前端是否存储相关数据以及存储有效期长度
- 后台将平台管理员和其他用户分隔开
- 图片剪切和展示
\ No newline at end of file
......@@ -37,7 +37,7 @@ export default defineComponent({
connectionState.error = false;
initError.value = false;
const fmp = new FzmMessageProtocol("ws://172.16.101.107:8888/sub");
const fmp = new FzmMessageProtocol(`ws://${window.location.host}/proxyWs/sub`);
const UserMsg = getUserMsg();
if (!UserMsg) {
......
<script lang="tsx">
import router from "@/router";
import { goToChatWithOutletRoboot } from "@/router/navigate";
import AddressService from "@/service/AddressService";
import { chatAuthCheck } from "@/utils/authCheck";
import { defineComponent, ref } from "vue";
export default defineComponent({
props: ["setRef", "min_amount", "max_amount", "rate_lower", "rate_upper"],
setup(props) {
const handleClick = async () => {
console.log(1);
const ret = await AddressService.getInstance().getNearby({
bank_code: Number(process.env.VUE_APP_BANK_CODE),
number: 1,
})
if (ret.code === 200) {
goToChatWithOutletRoboot({
outletId: ret.data[0].outlet_id
chatAuthCheck(async () => {
const ret = await AddressService.getInstance().getNearby({
bank_code: Number(process.env.VUE_APP_BANK_CODE),
number: 1,
})
}
if (ret.code === 200) {
goToChatWithOutletRoboot({
outletId: ret.data[0].outlet_id
})
}
}, () => {
router.push({
name: 'Login'
})
})
}
return () => (
......
......@@ -14,10 +14,13 @@ export function authCheck(cb: Function) {
export async function chatAuthCheck(cb: Function, cb2?: Function) {
const msg = getUserMsg()
if (msg?.role === eRole.user) return true
if (msg?.role === eRole.user) {
cb();
}
else if (msg?.role === eRole.staff) {
const ret = await getStaffOnDutyStatus()
if (ret.code === 200 && ret.data) {
console.log('cb');
cb()
} else {
cb2 && cb2()
......
......@@ -17,6 +17,7 @@ import AddressService from "@/service/AddressService"
import router from "@/router";
import UserService from "@/service/UserService";
import { goToChatWithOutletRoboot } from "@/router/navigate";
import { chatAuthCheck } from "@/utils/authCheck";
function isInViewPort(element: HTMLElement, barHeight: number) {
const viewWidth = window.innerWidth || document.documentElement.clientWidth;
......@@ -113,11 +114,19 @@ export default defineComponent({
});
const handleClickApply = async () => {
getOutletAndNavigateToChat();
chatAuthCheck(getOutletAndNavigateToChat, () => {
router.push({
name: 'Login'
})
})
}
const clickChatIcon = async () => {
getOutletAndNavigateToChat()
chatAuthCheck(getOutletAndNavigateToChat, () => {
router.push({
name: 'Login'
})
})
}
const getOutletAndNavigateToChat = async () => {
......
<template>
<van-swipe class="my-swipe" :autoplay="3000" indicator-color="white" >
<van-swipe-item v-for="(image, index) in bannerUrls" :key="index" >
<vantImage fit="cover" class=" h-36 w-full" :src="image" />
</van-swipe-item>
</van-swipe>
<div class="container relative">
<div class="absolute w-full h-full">
<van-swipe class="my-swipe" :autoplay="3000" indicator-color="white">
<van-swipe-item v-for="(image, index) in bannerUrls" :key="index">
<vantImage fit="cover" class="h-full w-full" :src="image" />
</van-swipe-item>
</van-swipe>
</div>
</div>
</template>
<script lang="ts">
import { defineComponent, PropType } from "vue";
......@@ -28,13 +32,16 @@ export default defineComponent({
</script>
<style scoped lang="less">
.container {
padding-bottom: 40%;
}
.my-swipe {
height: 144px;
height: 100%;
}
.my-swipe .van-swipe-item {
color: #fff;
font-size: 20px;
// line-height: 100px;
text-align: center;
background-color: #e8edf0;
}
......
<template>
<div>
<nav-bar title="个人中心" :style="{ 'background-color':'#F7F7FA'}"/>
<!-- 头像 -->
<div class="px-5 py-3 flex justify-between items-center border-b border-gray-200">
<span class=" text-sm font-semibold">头像</span>
<img src="../../../assets/icons/avatar.png" class=" w-12 h-12 rounded-full">
</div>
<!-- 手机号码 -->
<div class="px-5 py-5 flex justify-between items-center border-b border-gray-200">
<span class=" text-sm font-semibold">手机号码</span>
<span class=" text-sm">{{getPhone}}</span>
</div>
<!-- 登陆密码 -->
<div class="px-5 py-2 items-center border-b border-gray-200">
<div class="flex justify-between items-center">
<div>
<div class=" text-sm font-semibold">设置密码</div>
<div class=" text-xs text-gray-400 pt-1">保障账户登录安全</div>
</div>
<div class="flex items-center text-xs h-1 text-right">
<span @click="pushRouter">设置</span>
<icon
name="icon-gengduo"
color="#8E92A3"
size="12"
class=" inline-block align-text-bottom"
/>
</div>
<nav-bar title="个人中心" :style="{ 'background-color': '#F7F7FA' }" />
<!-- 头像 -->
<div class="px-5 py-3 flex justify-between items-center border-b border-gray-200">
<span class="text-sm font-semibold">头像</span>
<img src="../../../assets/icons/avatar.png" class="w-12 h-12 rounded-full" />
</div>
<!-- 手机号码 -->
<div class="px-5 py-5 flex justify-between items-center border-b border-gray-200">
<span class="text-sm font-semibold">手机号码</span>
<span class="text-sm">{{ getPhone }}</span>
</div>
<!-- 登陆密码 -->
<div class="px-5 py-2 items-center border-b border-gray-200">
<div class="flex justify-between items-center">
<div>
<div class="text-sm font-semibold">设置密码</div>
<div class="text-xs text-gray-400 pt-1">保障账户登录安全</div>
</div>
<div class="flex items-center text-xs h-1 text-right" @click="pushRouter">
<span>设置</span>
<icon
name="icon-gengduo"
color="#8E92A3"
size="12"
class="inline-block align-text-bottom"
/>
</div>
</div>
</div>
</div>
<div @click="clickLogout" class="logout-btn flex items-center justify-center fixed">退出登录</div>
......@@ -44,18 +44,18 @@ import router from '@/router'
import { userLogout } from '@/service/UserManagementService'
export default defineComponent({
components: { NavBar, Icon },
data(){
return{
role:''
data() {
return {
role: ''
}
},
computed: {
hasPassword(): eAccountType {
return eAccountType.REG_NOPD
},
getPhone(){
const phone =getUserMsg()?.userInfo.phone+''
var newphone= phone.replace(phone.substr(3,5),"*****")
getPhone() {
const phone = getUserMsg()?.userInfo.phone + ''
var newphone = phone.replace(phone.substr(3, 5), "*****")
return newphone
}
},
......@@ -73,14 +73,14 @@ export default defineComponent({
clickLogout
}
},
methods:{
pushRouter(){
this.$router.push({
name: 'PwdSetting',
query: {
phone: this.getPhone
methods: {
pushRouter() {
this.$router.push({
name: 'PwdSetting',
query: {
phone: this.userMsg?.userInfo.phone
}
})
})
},
}
})
......
......@@ -7,6 +7,14 @@ module.exports = {
pathRewrite: {
'^/proxyApi': '',
},
},
'/proxyWs': {
target: 'ws://172.16.101.107:8888',
changeOrigin: true,
ws: true,
pathRewrite: {
'^/proxyWs': ''
}
}
},
},
......
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