submit
parent
7a08be77a7
commit
b990b94490
@ -0,0 +1,61 @@
|
||||
<template>
|
||||
<div class="content2" :style="{height: `${menuButtonTop}px`}">
|
||||
<div class="wrap1" :style="{marginTop: `${titleTop}px`,height:`${titleHeight}px`}">{{title}}</div>
|
||||
</div>
|
||||
</template>
|
||||
<script setup >
|
||||
import { ref } from 'vue'
|
||||
const menuButtonTop=ref(0)
|
||||
const rpxToPx=(rpx)=>{
|
||||
const systemInfo = uni.getSystemInfoSync();
|
||||
const screenWidth = systemInfo.windowWidth;
|
||||
return rpx * screenWidth / 750;
|
||||
}
|
||||
const titleTop=ref(0)
|
||||
const titleHeight=ref(0)
|
||||
const getMenuButtonBoundingClientRect=()=> {
|
||||
// #ifdef MP-WEIXIN
|
||||
const menuButtonInfo = uni.getMenuButtonBoundingClientRect();
|
||||
if (menuButtonInfo) {
|
||||
titleTop.value=menuButtonInfo.top
|
||||
titleHeight.value=menuButtonInfo.height
|
||||
menuButtonTop.value = menuButtonInfo.top + menuButtonInfo.height+rpxToPx(12);
|
||||
}
|
||||
}
|
||||
getMenuButtonBoundingClientRect()
|
||||
defineProps({
|
||||
title: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
isBack: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
}
|
||||
})
|
||||
|
||||
const back = () => {
|
||||
uni.navigateBack({
|
||||
delta: 2
|
||||
});
|
||||
}
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
.content2{
|
||||
top: 0;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
width:100vw;
|
||||
background-image: url("https://cdns.fontree.cn/fonchain-main/prod/image/1833/avatar/6f9f30f6-9383-4ae6-872c-4e6795eaa25f.png");
|
||||
.wrap1{
|
||||
font-size: 34rpx;
|
||||
color: #fff;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
}
|
||||
}
|
||||
</style>
|
@ -1,60 +0,0 @@
|
||||
<template>
|
||||
<div class="content1" :style="{ marginTop: `${statusBarHeight}px` }">
|
||||
<div class="wrap1" v-if="isBack">
|
||||
<tm-icon name="tmicon-angle-left" color="#FFFFFF" @click="back"></tm-icon>
|
||||
</div>
|
||||
<div class="wrap2">{{ title }}</div>
|
||||
</div>
|
||||
</template>
|
||||
<script setup >
|
||||
import { ref } from 'vue'
|
||||
const statusBarHeight = ref(uni.getSystemInfoSync().statusBarHeight + 5)
|
||||
defineProps({
|
||||
title: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
isBack: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
}
|
||||
})
|
||||
const back = () => {
|
||||
uni.navigateBack({
|
||||
delta: 2
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.content1 {
|
||||
height: 60rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
.wrap1 {
|
||||
flex-basis: 0;
|
||||
width: 34rpx;
|
||||
height: 34rpx;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.wrap3 {
|
||||
flex-grow: 1;
|
||||
flex-basis: 0;
|
||||
}
|
||||
|
||||
.wrap2 {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
flex-grow: 1;
|
||||
flex-basis: 0;
|
||||
color: #FFFFFF;
|
||||
font-size: 32rpx;
|
||||
}
|
||||
|
||||
}
|
||||
</style>
|
@ -0,0 +1,18 @@
|
||||
import uniReq from '@/http/init'
|
||||
export const login=(data)=> {
|
||||
return uniReq.post({
|
||||
url: '/api/user/login/wx/telnum',
|
||||
data
|
||||
})
|
||||
}
|
||||
export const getInfo=()=> {
|
||||
return uniReq.post({
|
||||
url: '/api/user/info'
|
||||
})
|
||||
}
|
||||
export const ticketlist=(data)=> {
|
||||
return uniReq.post({
|
||||
url: '/ticket/ticketList',
|
||||
data
|
||||
})
|
||||
}
|
@ -1,12 +0,0 @@
|
||||
import http from "./interface";
|
||||
|
||||
// 地点
|
||||
export const address = () => {
|
||||
return http.request({
|
||||
url: "/api/warehouse/address",
|
||||
method: "POST",
|
||||
});
|
||||
};
|
||||
export default {
|
||||
address,
|
||||
};
|
@ -1,6 +0,0 @@
|
||||
import deposit from "./deposit";
|
||||
import login from "./login";
|
||||
export default {
|
||||
deposit,
|
||||
login,
|
||||
};
|
@ -0,0 +1,25 @@
|
||||
import {uniRequest} from "@/http/main";
|
||||
|
||||
export default uniRequest.created({
|
||||
//baseUrl: 'http://172.16.100.93:9052',
|
||||
baseUrl: 'http://192.168.88.122:9021',
|
||||
header: {
|
||||
Authorization: uni.getStorageSync('token') ?? ''
|
||||
},
|
||||
interceptor: {
|
||||
request(config){
|
||||
uni.showLoading({
|
||||
title: '加载中...',
|
||||
mask: true
|
||||
})
|
||||
setTimeout(()=>{
|
||||
uni.hideLoading()
|
||||
},5000)
|
||||
return config
|
||||
},
|
||||
response(response) {
|
||||
uni.hideLoading()
|
||||
return response.data
|
||||
}
|
||||
}
|
||||
})
|
@ -1,20 +0,0 @@
|
||||
import {uniFetch} from "@/http/main";
|
||||
const fetch = new uniFetch({
|
||||
baseUrl: 'https://warehouse.szjixun.cn',
|
||||
requestInterceptor:(config)=>{
|
||||
return config
|
||||
},
|
||||
responseInterceptor:(response)=>{
|
||||
if (response.data?.status === 401) {
|
||||
let curPage = getCurrentPages();
|
||||
let route = curPage[curPage.length - 1].route; //获取当前页面的路由
|
||||
if (route !== "pages/login/index") {
|
||||
uni.navigateTo({
|
||||
url: "/pages/login/index",
|
||||
});
|
||||
}
|
||||
}
|
||||
return response
|
||||
}
|
||||
})
|
||||
export default fetch
|
@ -1,57 +0,0 @@
|
||||
|
||||
import fetch from "@/http/init";
|
||||
// openId
|
||||
export const login = (data) => {
|
||||
return fetch.request({
|
||||
url: "/api/wxuser/openid",
|
||||
method: "POST",
|
||||
data,
|
||||
});
|
||||
};
|
||||
// 获取手机号
|
||||
export const getTel = (data) => {
|
||||
return fetch.request({
|
||||
url: "/api/wxuser/get/telnum",
|
||||
method: "POST",
|
||||
data,
|
||||
});
|
||||
};
|
||||
// 注册
|
||||
export const register = (data) => {
|
||||
return fetch.request({
|
||||
url: "/api/wxuser/register",
|
||||
method: "POST",
|
||||
data,
|
||||
});
|
||||
};
|
||||
// 身份验证
|
||||
export const chenckId = (data) => {
|
||||
return fetch.request({
|
||||
url: "/api/wxuser/ocr",
|
||||
method: "POST",
|
||||
data,
|
||||
});
|
||||
};
|
||||
// 法大大
|
||||
export const fddRealName = (data) => {
|
||||
return fetch.request({
|
||||
url: "/api/wxuser/bind/fdd",
|
||||
method: "POST",
|
||||
data,
|
||||
});
|
||||
};
|
||||
//法大大是否验证
|
||||
export const checkFdd = () => {
|
||||
return fetch.request({
|
||||
url: "/api/wxuser/fdd/check",
|
||||
method: "POST",
|
||||
});
|
||||
};
|
||||
export default {
|
||||
login,
|
||||
getTel,
|
||||
register,
|
||||
chenckId,
|
||||
fddRealName,
|
||||
checkFdd,
|
||||
};
|
Binary file not shown.
After Width: | Height: | Size: 78 KiB |
Binary file not shown.
After Width: | Height: | Size: 8.2 KiB |
Loading…
Reference in New Issue