fix
This commit is contained in:
parent
cabc13bf92
commit
5d8f61920d
16
.hbuilderx/launch.json
Normal file
16
.hbuilderx/launch.json
Normal file
@ -0,0 +1,16 @@
|
||||
{
|
||||
"version" : "1.0",
|
||||
"configurations" : [
|
||||
{
|
||||
"playground" : "standard",
|
||||
"type" : "uni-app:app-android"
|
||||
},
|
||||
{
|
||||
"app-plus" :
|
||||
{
|
||||
"launchtype" : "local"
|
||||
},
|
||||
"type" : "uniCloud"
|
||||
}
|
||||
]
|
||||
}
|
28
api/index.js
Normal file
28
api/index.js
Normal file
@ -0,0 +1,28 @@
|
||||
import http from "./interface";
|
||||
|
||||
const sendCode = (data) => {
|
||||
return http.request({
|
||||
url: "/api/staff/send",
|
||||
method: "POST",
|
||||
data,
|
||||
});
|
||||
};
|
||||
const login = (data) => {
|
||||
return http.request({
|
||||
url: "/api/staff/login",
|
||||
method: "POST",
|
||||
data,
|
||||
});
|
||||
};
|
||||
const qrCodeInfo = (data) => {
|
||||
return http.request({
|
||||
url: "/api/smart/appointment/get/ticket/info",
|
||||
method: "POST",
|
||||
data,
|
||||
});
|
||||
};
|
||||
export default {
|
||||
sendCode,
|
||||
login,
|
||||
qrCodeInfo,
|
||||
};
|
@ -4,7 +4,7 @@
|
||||
*/
|
||||
export default {
|
||||
config: {
|
||||
baseUrl: "https://warehouse.szjixun.cn", //"http://172.16.100.93:8017", //"http://192.168.88.175:9021",//'https://warehouse.szjixun.cn'
|
||||
baseUrl: "https://warehouse.szjixun.cn/ticket", //"http://172.16.100.93:9051", //"http://192.168.88.175:9021",//'https://warehouse.szjixun.cn'
|
||||
header: {
|
||||
"Content-Type": "application/json;charset=UTF-8",
|
||||
// 'Content-Type':'application/x-www-form-urlencoded'
|
||||
|
@ -275,26 +275,26 @@ page {
|
||||
height: 100vh;
|
||||
position: relative;
|
||||
|
||||
background-image: linear-gradient(0deg,
|
||||
transparent 24%,
|
||||
rgba(32, 255, 77, 0.1) 25%,
|
||||
rgba(32, 255, 77, 0.1) 26%,
|
||||
transparent 27%,
|
||||
transparent 74%,
|
||||
rgba(32, 255, 77, 0.1) 75%,
|
||||
rgba(32, 255, 77, 0.1) 76%,
|
||||
transparent 77%,
|
||||
transparent),
|
||||
linear-gradient(90deg,
|
||||
transparent 24%,
|
||||
rgba(32, 255, 77, 0.1) 25%,
|
||||
rgba(32, 255, 77, 0.1) 26%,
|
||||
transparent 27%,
|
||||
transparent 74%,
|
||||
rgba(32, 255, 77, 0.1) 75%,
|
||||
rgba(32, 255, 77, 0.1) 76%,
|
||||
transparent 77%,
|
||||
transparent);
|
||||
// background-image: linear-gradient(0deg,
|
||||
// transparent 24%,
|
||||
// rgba(32, 255, 77, 0.1) 25%,
|
||||
// rgba(32, 255, 77, 0.1) 26%,
|
||||
// transparent 27%,
|
||||
// transparent 74%,
|
||||
// rgba(32, 255, 77, 0.1) 75%,
|
||||
// rgba(32, 255, 77, 0.1) 76%,
|
||||
// transparent 77%,
|
||||
// transparent),
|
||||
// linear-gradient(90deg,
|
||||
// transparent 24%,
|
||||
// rgba(32, 255, 77, 0.1) 25%,
|
||||
// rgba(32, 255, 77, 0.1) 26%,
|
||||
// transparent 27%,
|
||||
// transparent 74%,
|
||||
// rgba(32, 255, 77, 0.1) 75%,
|
||||
// rgba(32, 255, 77, 0.1) 76%,
|
||||
// transparent 77%,
|
||||
// transparent);
|
||||
background-size: 3rem 3rem;
|
||||
background-position: -1rem -1rem;
|
||||
z-index: 10;
|
||||
|
3
main.js
3
main.js
@ -1,6 +1,6 @@
|
||||
import App from "./App";
|
||||
import uviewPlus from "uview-plus";
|
||||
|
||||
import request from "./api/index";
|
||||
// #ifndef VUE3
|
||||
import Vue from "vue";
|
||||
|
||||
@ -19,6 +19,7 @@ import { createSSRApp } from "vue";
|
||||
export function createApp() {
|
||||
const app = createSSRApp(App);
|
||||
app.use(uviewPlus);
|
||||
app.config.globalProperties.$request = request;
|
||||
uni.$u.config.unit = "rpx";
|
||||
return {
|
||||
app,
|
||||
|
@ -1,14 +1,15 @@
|
||||
<template>
|
||||
<div class="main">
|
||||
<image src="@/static/bg2.png" mode="aspectFill" class="img" />
|
||||
<up-button type="primary" :text="'审核员'" shape="circle" color="#AB2F23"
|
||||
<up-button type="primary" :text="'审核员 ' + name" shape="circle" color="#AB2F23"
|
||||
style="width:700rpx ;margin-top: 50rpx;"></up-button>
|
||||
<up-button type="primary" text="扫一扫" shape="circle" color="#000" style="width:700rpx ;margin-top: 50rpx"
|
||||
@click="goScan"></up-button>
|
||||
</div>
|
||||
</template>
|
||||
<script setup>
|
||||
|
||||
import { ref } from "vue"
|
||||
const name = ref(uni.getStorageSync('nickName'))
|
||||
const goScan = () => {
|
||||
uni.navigateTo({
|
||||
url: '/pages/scan/index'
|
||||
|
@ -9,7 +9,7 @@
|
||||
</div>
|
||||
</template>
|
||||
<template #r1>
|
||||
<up-input placeholder="请输入手机号" clearable type="number" border="none"></up-input>
|
||||
<up-input placeholder="请输入手机号" clearable type="number" border="none" v-model="tel"></up-input>
|
||||
</template>
|
||||
<template #l2>
|
||||
<div class="box-left">
|
||||
@ -18,9 +18,9 @@
|
||||
</template>
|
||||
<template #r2>
|
||||
<div class="box-right">
|
||||
<up-input placeholder="请输入验证码" border="none">
|
||||
<up-input placeholder="请输入验证码" border="none" v-model="code">
|
||||
<template #suffix>
|
||||
<up-code ref="uCodeRef" @change="codeChange" :seconds="60" changeText="60秒重新获取"
|
||||
<up-code ref="uCodeRef" @change="codeChange" seconds="60" changeText="60秒重新获取"
|
||||
endText="重新获取"></up-code>
|
||||
<up-button @tap="getCode" :text="tips" type="success" size="mini"></up-button>
|
||||
</template>
|
||||
@ -36,36 +36,54 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, watch } from 'vue';
|
||||
import { ref, getCurrentInstance } from 'vue';
|
||||
import card from '@/components/card/index.vue'
|
||||
|
||||
const currentInstance = getCurrentInstance();
|
||||
const { $request } =
|
||||
currentInstance.appContext.config.globalProperties;
|
||||
const tips = ref('');
|
||||
const tel = ref(null)
|
||||
const code = ref(null)
|
||||
const uCodeRef = ref(null);
|
||||
const codeChange = (text) => {
|
||||
console.log(text)
|
||||
tips.value = text;
|
||||
};
|
||||
const getCode = () => {
|
||||
console.log(uCodeRef.canGetCode)
|
||||
if (uCodeRef.canGetCode) {
|
||||
// 模拟向后端请求验证码
|
||||
if (uCodeRef.value.canGetCode) {
|
||||
uni.showLoading({
|
||||
title: '正在获取验证码',
|
||||
});
|
||||
setTimeout(() => {
|
||||
uni.hideLoading();
|
||||
// 这里此提示会被start()方法中的提示覆盖
|
||||
uni.$u.toast('验证码已发送');
|
||||
// 通知验证码组件内部开始倒计时
|
||||
uCodeRef.start();
|
||||
}, 2000);
|
||||
} else {
|
||||
uni.$u.toast('倒计时结束后再发送');
|
||||
$request.sendCode({ telNum: tel.value }).then((res) => {
|
||||
console.log(res)
|
||||
if (res.status === 0) {
|
||||
uni.hideLoading();
|
||||
uni.$u.toast('验证码已发送');
|
||||
uCodeRef.value.start();
|
||||
} else {
|
||||
uni.hideLoading();
|
||||
uCodeRef.value.start();
|
||||
uni.$u.toast(res.msg);
|
||||
}
|
||||
})
|
||||
}
|
||||
};
|
||||
const goCheck = () => {
|
||||
uni.navigateTo({
|
||||
url: '/pages/check/index'
|
||||
$request.login({
|
||||
telNum: tel.value,
|
||||
code: code.value
|
||||
}).then((res) => {
|
||||
if (res.status === 0) {
|
||||
uni.setStorageSync("token", res.data.token);
|
||||
uni.setStorageSync("nickName", res.data.accountInfo.nickName);
|
||||
uni.navigateTo({
|
||||
url: '/pages/check/index'
|
||||
})
|
||||
} else {
|
||||
uni.$u.toast(res.msg);
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
|
@ -52,7 +52,22 @@
|
||||
|
||||
<script setup>
|
||||
import card from '@/components/card/index.vue'
|
||||
import { onMounted } from "vue";
|
||||
import { onLoad } from "@dcloudio/uni-app"
|
||||
|
||||
onLoad((option) => {
|
||||
console.log(option);
|
||||
getQrInfo()
|
||||
});
|
||||
|
||||
|
||||
const getQrInfo = () => {
|
||||
$request.qrCodeInfo({ appointmentUid: '245fa520-3724-4151-82a9-dd84d6838b68' }).then((res) => {
|
||||
if (res.status === 0) {
|
||||
|
||||
}
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
@ -1,13 +1,23 @@
|
||||
<template>
|
||||
<div>
|
||||
<mumuGetQrcode @success="qrcodeSucess" @error="qrcodeError"></mumuGetQrcode>
|
||||
<!-- <mumuGetQrcode @success="qrcodeSucess" @error="qrcodeError"></mumuGetQrcode> -->
|
||||
<up-button type="primary" text="xxx" shape="circle" color="#000" style="width:436rpx ;"
|
||||
@click="qrcodeSucess"></up-button>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import mumuGetQrcode from "../../components/mumu-getQrcode/mumu-getQrcode.vue";
|
||||
const qrcodeSucess = (id) => {
|
||||
console.log(id)
|
||||
import { ref, getCurrentInstance } from 'vue';
|
||||
const currentInstance = getCurrentInstance();
|
||||
const { $request } =
|
||||
currentInstance.appContext.config.globalProperties;
|
||||
const qrcodeSucess = () => {
|
||||
$request.qrCodeInfo({ appointmentUid: '245fa520-3724-4151-82a9-dd84d6838b68' }).then((res) => {
|
||||
if (res.status === 0) {
|
||||
|
||||
}
|
||||
})
|
||||
}
|
||||
const qrcodeError = (err) => {
|
||||
console.log(err);
|
||||
|
Loading…
Reference in New Issue
Block a user