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 {
|
export default {
|
||||||
config: {
|
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: {
|
header: {
|
||||||
"Content-Type": "application/json;charset=UTF-8",
|
"Content-Type": "application/json;charset=UTF-8",
|
||||||
// 'Content-Type':'application/x-www-form-urlencoded'
|
// 'Content-Type':'application/x-www-form-urlencoded'
|
||||||
|
@ -275,26 +275,26 @@ page {
|
|||||||
height: 100vh;
|
height: 100vh;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
||||||
background-image: linear-gradient(0deg,
|
// background-image: linear-gradient(0deg,
|
||||||
transparent 24%,
|
// transparent 24%,
|
||||||
rgba(32, 255, 77, 0.1) 25%,
|
// rgba(32, 255, 77, 0.1) 25%,
|
||||||
rgba(32, 255, 77, 0.1) 26%,
|
// rgba(32, 255, 77, 0.1) 26%,
|
||||||
transparent 27%,
|
// transparent 27%,
|
||||||
transparent 74%,
|
// transparent 74%,
|
||||||
rgba(32, 255, 77, 0.1) 75%,
|
// rgba(32, 255, 77, 0.1) 75%,
|
||||||
rgba(32, 255, 77, 0.1) 76%,
|
// rgba(32, 255, 77, 0.1) 76%,
|
||||||
transparent 77%,
|
// transparent 77%,
|
||||||
transparent),
|
// transparent),
|
||||||
linear-gradient(90deg,
|
// linear-gradient(90deg,
|
||||||
transparent 24%,
|
// transparent 24%,
|
||||||
rgba(32, 255, 77, 0.1) 25%,
|
// rgba(32, 255, 77, 0.1) 25%,
|
||||||
rgba(32, 255, 77, 0.1) 26%,
|
// rgba(32, 255, 77, 0.1) 26%,
|
||||||
transparent 27%,
|
// transparent 27%,
|
||||||
transparent 74%,
|
// transparent 74%,
|
||||||
rgba(32, 255, 77, 0.1) 75%,
|
// rgba(32, 255, 77, 0.1) 75%,
|
||||||
rgba(32, 255, 77, 0.1) 76%,
|
// rgba(32, 255, 77, 0.1) 76%,
|
||||||
transparent 77%,
|
// transparent 77%,
|
||||||
transparent);
|
// transparent);
|
||||||
background-size: 3rem 3rem;
|
background-size: 3rem 3rem;
|
||||||
background-position: -1rem -1rem;
|
background-position: -1rem -1rem;
|
||||||
z-index: 10;
|
z-index: 10;
|
||||||
|
3
main.js
3
main.js
@ -1,6 +1,6 @@
|
|||||||
import App from "./App";
|
import App from "./App";
|
||||||
import uviewPlus from "uview-plus";
|
import uviewPlus from "uview-plus";
|
||||||
|
import request from "./api/index";
|
||||||
// #ifndef VUE3
|
// #ifndef VUE3
|
||||||
import Vue from "vue";
|
import Vue from "vue";
|
||||||
|
|
||||||
@ -19,6 +19,7 @@ import { createSSRApp } from "vue";
|
|||||||
export function createApp() {
|
export function createApp() {
|
||||||
const app = createSSRApp(App);
|
const app = createSSRApp(App);
|
||||||
app.use(uviewPlus);
|
app.use(uviewPlus);
|
||||||
|
app.config.globalProperties.$request = request;
|
||||||
uni.$u.config.unit = "rpx";
|
uni.$u.config.unit = "rpx";
|
||||||
return {
|
return {
|
||||||
app,
|
app,
|
||||||
|
@ -1,14 +1,15 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="main">
|
<div class="main">
|
||||||
<image src="@/static/bg2.png" mode="aspectFill" class="img" />
|
<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>
|
style="width:700rpx ;margin-top: 50rpx;"></up-button>
|
||||||
<up-button type="primary" text="扫一扫" shape="circle" color="#000" style="width:700rpx ;margin-top: 50rpx"
|
<up-button type="primary" text="扫一扫" shape="circle" color="#000" style="width:700rpx ;margin-top: 50rpx"
|
||||||
@click="goScan"></up-button>
|
@click="goScan"></up-button>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script setup>
|
<script setup>
|
||||||
|
import { ref } from "vue"
|
||||||
|
const name = ref(uni.getStorageSync('nickName'))
|
||||||
const goScan = () => {
|
const goScan = () => {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pages/scan/index'
|
url: '/pages/scan/index'
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<template #r1>
|
<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>
|
||||||
<template #l2>
|
<template #l2>
|
||||||
<div class="box-left">
|
<div class="box-left">
|
||||||
@ -18,9 +18,9 @@
|
|||||||
</template>
|
</template>
|
||||||
<template #r2>
|
<template #r2>
|
||||||
<div class="box-right">
|
<div class="box-right">
|
||||||
<up-input placeholder="请输入验证码" border="none">
|
<up-input placeholder="请输入验证码" border="none" v-model="code">
|
||||||
<template #suffix>
|
<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>
|
endText="重新获取"></up-code>
|
||||||
<up-button @tap="getCode" :text="tips" type="success" size="mini"></up-button>
|
<up-button @tap="getCode" :text="tips" type="success" size="mini"></up-button>
|
||||||
</template>
|
</template>
|
||||||
@ -36,36 +36,54 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref, watch } from 'vue';
|
import { ref, getCurrentInstance } from 'vue';
|
||||||
import card from '@/components/card/index.vue'
|
import card from '@/components/card/index.vue'
|
||||||
|
const currentInstance = getCurrentInstance();
|
||||||
|
const { $request } =
|
||||||
|
currentInstance.appContext.config.globalProperties;
|
||||||
const tips = ref('');
|
const tips = ref('');
|
||||||
|
const tel = ref(null)
|
||||||
|
const code = ref(null)
|
||||||
const uCodeRef = ref(null);
|
const uCodeRef = ref(null);
|
||||||
const codeChange = (text) => {
|
const codeChange = (text) => {
|
||||||
|
console.log(text)
|
||||||
tips.value = text;
|
tips.value = text;
|
||||||
};
|
};
|
||||||
const getCode = () => {
|
const getCode = () => {
|
||||||
console.log(uCodeRef.canGetCode)
|
if (uCodeRef.value.canGetCode) {
|
||||||
if (uCodeRef.canGetCode) {
|
|
||||||
// 模拟向后端请求验证码
|
|
||||||
uni.showLoading({
|
uni.showLoading({
|
||||||
title: '正在获取验证码',
|
title: '正在获取验证码',
|
||||||
});
|
});
|
||||||
setTimeout(() => {
|
$request.sendCode({ telNum: tel.value }).then((res) => {
|
||||||
uni.hideLoading();
|
console.log(res)
|
||||||
// 这里此提示会被start()方法中的提示覆盖
|
if (res.status === 0) {
|
||||||
uni.$u.toast('验证码已发送');
|
uni.hideLoading();
|
||||||
// 通知验证码组件内部开始倒计时
|
uni.$u.toast('验证码已发送');
|
||||||
uCodeRef.start();
|
uCodeRef.value.start();
|
||||||
}, 2000);
|
} else {
|
||||||
} else {
|
uni.hideLoading();
|
||||||
uni.$u.toast('倒计时结束后再发送');
|
uCodeRef.value.start();
|
||||||
|
uni.$u.toast(res.msg);
|
||||||
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
const goCheck = () => {
|
const goCheck = () => {
|
||||||
uni.navigateTo({
|
$request.login({
|
||||||
url: '/pages/check/index'
|
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>
|
</script>
|
||||||
|
|
||||||
|
@ -52,7 +52,22 @@
|
|||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import card from '@/components/card/index.vue'
|
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>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
@ -1,13 +1,23 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<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>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import mumuGetQrcode from "../../components/mumu-getQrcode/mumu-getQrcode.vue";
|
import mumuGetQrcode from "../../components/mumu-getQrcode/mumu-getQrcode.vue";
|
||||||
const qrcodeSucess = (id) => {
|
import { ref, getCurrentInstance } from 'vue';
|
||||||
console.log(id)
|
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) => {
|
const qrcodeError = (err) => {
|
||||||
console.log(err);
|
console.log(err);
|
||||||
|
Loading…
Reference in New Issue
Block a user