Aiden 9 months ago
parent cabc13bf92
commit 5d8f61920d

@ -0,0 +1,16 @@
{
"version" : "1.0",
"configurations" : [
{
"playground" : "standard",
"type" : "uni-app:app-android"
},
{
"app-plus" :
{
"launchtype" : "local"
},
"type" : "uniCloud"
}
]
}

@ -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;

@ -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(() => {
$request.sendCode({ telNum: tel.value }).then((res) => {
console.log(res)
if (res.status === 0) {
uni.hideLoading();
// start()
uni.$u.toast('验证码已发送');
//
uCodeRef.start();
}, 2000);
uCodeRef.value.start();
} else {
uni.$u.toast('倒计时结束后再发送');
uni.hideLoading();
uCodeRef.value.start();
uni.$u.toast(res.msg);
}
})
}
};
const goCheck = () => {
$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…
Cancel
Save