Compare commits
18 Commits
adea57afd7
...
8d9f1d7280
Author | SHA1 | Date | |
---|---|---|---|
8d9f1d7280 | |||
da93883a3f | |||
fa425e8b23 | |||
52b35116bf | |||
df52885c1b | |||
ecb08e26a4 | |||
f4089c927f | |||
b13aa9a66c | |||
63854ca9a2 | |||
14820459e0 | |||
842b62b940 | |||
74da231357 | |||
93555318e9 | |||
0a6124e287 | |||
a6806e96c8 | |||
4ecf815564 | |||
89e7dff671 | |||
42be3396d8 |
3
http/api.js
Normal file
3
http/api.js
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
export default {
|
||||||
|
baseUrl: "http://192.168.88.175:9021",
|
||||||
|
};
|
12
http/deposit.js
Normal file
12
http/deposit.js
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
import http from "./interface";
|
||||||
|
|
||||||
|
// 地点
|
||||||
|
export const address = () => {
|
||||||
|
return http.request({
|
||||||
|
url: "/api/warehouse/address",
|
||||||
|
method: "POST",
|
||||||
|
});
|
||||||
|
};
|
||||||
|
export default {
|
||||||
|
address,
|
||||||
|
};
|
@ -1,4 +1,6 @@
|
|||||||
import login from "./login";
|
import login from "./login";
|
||||||
|
import deposit from "./deposit";
|
||||||
export default {
|
export default {
|
||||||
login,
|
login,
|
||||||
|
deposit,
|
||||||
};
|
};
|
||||||
|
@ -60,7 +60,7 @@ export default {
|
|||||||
response = newResponse;
|
response = newResponse;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (response.data.status === 401) {
|
if (response.data?.status === 401) {
|
||||||
let curPage = getCurrentPages();
|
let curPage = getCurrentPages();
|
||||||
let route = curPage[curPage.length - 1].route; //获取当前页面的路由
|
let route = curPage[curPage.length - 1].route; //获取当前页面的路由
|
||||||
if (route !== "pages/login/login") {
|
if (route !== "pages/login/login") {
|
||||||
|
@ -1,5 +1,31 @@
|
|||||||
import http from "./interface";
|
import http from "./interface";
|
||||||
|
|
||||||
// 登录
|
// openId
|
||||||
|
export const login = (data) => {
|
||||||
export default {};
|
return http.request({
|
||||||
|
url: "/api/wxuser/openid",
|
||||||
|
method: "POST",
|
||||||
|
data,
|
||||||
|
});
|
||||||
|
};
|
||||||
|
// 获取手机号
|
||||||
|
export const getTel = (data) => {
|
||||||
|
return http.request({
|
||||||
|
url: "/api/wxuser/get/telnum",
|
||||||
|
method: "POST",
|
||||||
|
data,
|
||||||
|
});
|
||||||
|
};
|
||||||
|
// 注册
|
||||||
|
export const register = (data) => {
|
||||||
|
return http.request({
|
||||||
|
url: "/api/wxuser/register",
|
||||||
|
method: "POST",
|
||||||
|
data,
|
||||||
|
});
|
||||||
|
};
|
||||||
|
export default {
|
||||||
|
login,
|
||||||
|
getTel,
|
||||||
|
register,
|
||||||
|
};
|
||||||
|
@ -16,9 +16,9 @@
|
|||||||
<cover-image src="@/static/image/camera.png" style="width: 600rpx; height: 600rpx"></cover-image>
|
<cover-image src="@/static/image/camera.png" style="width: 600rpx; height: 600rpx"></cover-image>
|
||||||
</camera>
|
</camera>
|
||||||
|
|
||||||
<view class="time" v-if="isAnimate">
|
<view class="time">
|
||||||
<view class="dot"></view>
|
<view class="dot"></view>
|
||||||
<u-count-down :time="5 * 1000" format="ss" ref="countDown"></u-count-down>
|
<u-count-down :time="5 * 1000" format="ss" ref="countDown" v-if="isAnimate"></u-count-down>
|
||||||
</view>
|
</view>
|
||||||
<view style="width:284rpx;">
|
<view style="width:284rpx;">
|
||||||
<u-button
|
<u-button
|
||||||
@ -29,7 +29,7 @@
|
|||||||
@touchend="stopRecord"
|
@touchend="stopRecord"
|
||||||
></u-button>
|
></u-button>
|
||||||
<view style="margin-top: 20rpx;">
|
<view style="margin-top: 20rpx;">
|
||||||
<u-button text="确认" shape="circle" color="#76C458"></u-button>
|
<u-button text="确认" shape="circle" color="#76C458" @click="back"></u-button>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -42,7 +42,8 @@ export default {
|
|||||||
return {
|
return {
|
||||||
ctx: null,
|
ctx: null,
|
||||||
isAnimate: false,
|
isAnimate: false,
|
||||||
tempVideoPath: ""
|
tempVideoPath: "",
|
||||||
|
data: {}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
@ -52,15 +53,14 @@ export default {
|
|||||||
startRecord() {
|
startRecord() {
|
||||||
this.ctx.startRecord({
|
this.ctx.startRecord({
|
||||||
success: res => {
|
success: res => {
|
||||||
console.log(123123);
|
|
||||||
this.isAnimate = true;
|
this.isAnimate = true;
|
||||||
this.$refs.countDown.start();
|
console.log(this.$refs);
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.ctx.stopRecord({
|
this.ctx.stopRecord({
|
||||||
success: res => {
|
success: res => {
|
||||||
|
console.log("自动停止录像", res);
|
||||||
this.tempVideoPath = res.tempVideoPath;
|
this.tempVideoPath = res.tempVideoPath;
|
||||||
this.isAnimate = false;
|
this.isAnimate = false;
|
||||||
this.$refs.countDown.reset();
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}, 5000);
|
}, 5000);
|
||||||
@ -84,6 +84,15 @@ export default {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
},
|
||||||
|
back() {
|
||||||
|
uni.navigateTo({
|
||||||
|
url:
|
||||||
|
"/pages/realName/realName?tempVideoPath=" +
|
||||||
|
this.tempVideoPath +
|
||||||
|
"&isfinish=" +
|
||||||
|
!!this.tempVideoPath
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
<div class="order-details">
|
<div class="order-details">
|
||||||
<title-block title="寄存画作">
|
<title-block title="寄存画作">
|
||||||
<template #left>
|
<template #left>
|
||||||
<div> <image style="width: 112rpx;height: 52rpx" src="https://cdns.fontree.cn/fonchain-main/prod/image/default/artwork/785cf885-c4c9-44b3-8155-4b39988c7ef8.png"></image></div>
|
<div> <image style="width: 112rpx;height: 52rpx" src="https://cdns.fontree.cn/fonchain-main/prod/image/default/artwork/785cf885-c4c9-44b3-8155-4b39988c7ef8.png" @click="back"></image></div>
|
||||||
</template>
|
</template>
|
||||||
</title-block>
|
</title-block>
|
||||||
<div class="content2">
|
<div class="content2">
|
||||||
@ -197,6 +197,12 @@ export default {
|
|||||||
day,
|
day,
|
||||||
value: [9999, month - 1, day - 1],
|
value: [9999, month - 1, day - 1],
|
||||||
visible: true,
|
visible: true,
|
||||||
|
url:''//二维码扫码的结果用户发起请求的body体
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onLoad(e) {
|
||||||
|
if(e){
|
||||||
|
this.url = e.url
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted(){
|
mounted(){
|
||||||
@ -212,6 +218,9 @@ export default {
|
|||||||
},
|
},
|
||||||
changeData(e){
|
changeData(e){
|
||||||
this.data=[e.detail.value[0]+1990,e.detail.value[1]+1,e.detail.value[2]+1]
|
this.data=[e.detail.value[0]+1990,e.detail.value[1]+1,e.detail.value[2]+1]
|
||||||
|
},
|
||||||
|
back(){
|
||||||
|
uni.navigateBack({ delta: 2 })
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2,8 +2,8 @@
|
|||||||
|
|
||||||
<template>
|
<template>
|
||||||
<view :style="{background:'url('+'../../static/bbj1@3x.png'+')'}" class="main">
|
<view :style="{background:'url('+'../../static/bbj1@3x.png'+')'}" class="main">
|
||||||
<view class="title">寄存</view>
|
<title-block style="flex-shrink: 0;width: 100%" title="寄存"></title-block>
|
||||||
<view class="order">
|
<view class="order" @click="goConsignmen">
|
||||||
<view class="order-item">
|
<view class="order-item">
|
||||||
<image src="@/static/image/write.png" mode="scaleToFill" style="width: 63rpx;height: 62rpx" />
|
<image src="@/static/image/write.png" mode="scaleToFill" style="width: 63rpx;height: 62rpx" />
|
||||||
<view style="color: #fff;margin-top:10rpx">填写下单</view>
|
<view style="color: #fff;margin-top:10rpx">填写下单</view>
|
||||||
@ -16,14 +16,12 @@
|
|||||||
<view class="list">
|
<view class="list">
|
||||||
<view style="color: #76C458">目前可用寄存仓库地址</view>
|
<view style="color: #76C458">目前可用寄存仓库地址</view>
|
||||||
<u-divider :dashed="true" lineColor="#4E964D"></u-divider>
|
<u-divider :dashed="true" lineColor="#4E964D"></u-divider>
|
||||||
|
<view v-for="(item,index) in addressList" :key="item.ID">
|
||||||
<view class="list-item">
|
<view class="list-item">
|
||||||
<view>目前可用地址某某某地区</view>
|
<view>{{item.address}}</view>
|
||||||
<view>剩余200位置</view>
|
<view>剩余{{item.deletedAt}}位置</view>
|
||||||
</view>
|
</view>
|
||||||
<u-divider :dashed="true" lineColor="#4E964D"></u-divider>
|
<u-divider :dashed="true" lineColor="#4E964D" v-if="index !== addressList.length-1"></u-divider>
|
||||||
<view class="list-item">
|
|
||||||
<view>目前可用地址某某某地区</view>
|
|
||||||
<view>剩余200位置</view>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<tabbar :current="0"></tabbar>
|
<tabbar :current="0"></tabbar>
|
||||||
@ -37,9 +35,17 @@ export default {
|
|||||||
onLoad() {
|
onLoad() {
|
||||||
uni.hideTabBar();
|
uni.hideTabBar();
|
||||||
},
|
},
|
||||||
|
onShow() {
|
||||||
|
this.getAddress();
|
||||||
|
},
|
||||||
components: {
|
components: {
|
||||||
tabbar
|
tabbar
|
||||||
},
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
addressList: []
|
||||||
|
};
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
scanOrder() {
|
scanOrder() {
|
||||||
uni.scanCode({
|
uni.scanCode({
|
||||||
@ -47,8 +53,25 @@ export default {
|
|||||||
success: res => {
|
success: res => {
|
||||||
console.log("条码类型:" + res.scanType);
|
console.log("条码类型:" + res.scanType);
|
||||||
console.log("条码内容:" + res.result);
|
console.log("条码内容:" + res.result);
|
||||||
|
uni.navigateTo({
|
||||||
|
url: "/pages/consignment-painting/index?url=" + res.result
|
||||||
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
},
|
||||||
|
async getAddress() {
|
||||||
|
const res = await this.$api.deposit.address();
|
||||||
|
console.log(res);
|
||||||
|
if (res.status === 0) {
|
||||||
|
this.addressList = res.data.data;
|
||||||
|
} else {
|
||||||
|
this.$common.msgToast(res.msg);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
goConsignmen() {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: "/pages/consignment-painting/index"
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -60,12 +83,8 @@ export default {
|
|||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
padding: 30rpx;
|
padding: 10rpx 30rpx 30rpx 30rpx;
|
||||||
.title {
|
|
||||||
margin-top: 40rpx;
|
|
||||||
color: #4e964d;
|
|
||||||
font-size: 32rpx;
|
|
||||||
}
|
|
||||||
.order {
|
.order {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
margin-top: 40rpx;
|
margin-top: 40rpx;
|
||||||
|
@ -1,13 +1,17 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="main">
|
<view class="main">
|
||||||
<image src="@/static/image/logo.png" mode="scaleToFill" class="logo" />
|
<image src="@/static/image/logo.png" mode="scaleToFill" class="logo" />
|
||||||
<button
|
<view class="btn">
|
||||||
class="btn"
|
<u-button
|
||||||
v-if="isShow"
|
v-if="isShow"
|
||||||
open-type="getPhoneNumber"
|
open-type="getPhoneNumber"
|
||||||
@getphonenumber="getPhoneNumber"
|
@getphonenumber="getPhoneNumber"
|
||||||
>点击登录</button>
|
color="transparent"
|
||||||
<button class="btn" v-if="isLogoutShow" @click="login">点击登录</button>
|
>点击登录</u-button>
|
||||||
|
</view>
|
||||||
|
<!-- <view class="btn">
|
||||||
|
<u-button v-if="isLogoutShow" @click="login" color="transparent">点击登录</u-button>
|
||||||
|
</view>-->
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -17,69 +21,66 @@ export default {
|
|||||||
return {
|
return {
|
||||||
code: "",
|
code: "",
|
||||||
openId: "",
|
openId: "",
|
||||||
isShow: false,
|
isShow: true,
|
||||||
isLogoutShow: false
|
isLogoutShow: true
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
async getPhoneNumber(e) {
|
async getPhoneNumber(e) {
|
||||||
|
console.log(e);
|
||||||
if (e.detail.errMsg == "getPhoneNumber:ok") {
|
if (e.detail.errMsg == "getPhoneNumber:ok") {
|
||||||
// 用户允许或去手机号
|
// 用户允许或去手机号
|
||||||
let res = await this.$api.user.loginToken({
|
let res = await this.$api.login.getTel({ code: e.detail.code });
|
||||||
wxPhoneCode: e.detail.code,
|
|
||||||
openid: this.openId
|
|
||||||
});
|
|
||||||
if (res.status == 0) {
|
if (res.status == 0) {
|
||||||
uni.setStorageSync("token", res.data.token);
|
uni.setStorageSync("telNum", res.data.telNum);
|
||||||
uni.redirectTo({
|
uni.redirectTo({
|
||||||
url: "/pages/register/register"
|
url: "/pages/realName/realName"
|
||||||
});
|
});
|
||||||
|
} else {
|
||||||
|
this.$common.msgToast(res.msg);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
this.$common.msgToast("请不要拒绝哟~重新点击登录");
|
this.$common.msgToast("请不要拒绝哟~重新点击登录");
|
||||||
}
|
}
|
||||||
},
|
|
||||||
async login() {
|
|
||||||
// 获取code
|
|
||||||
uni.login({
|
|
||||||
provider: "weixin",
|
|
||||||
success: async res => {
|
|
||||||
this.code = res.code;
|
|
||||||
let res1 = await this.$api.user.loginToken({ wxLoginCode: res.code });
|
|
||||||
if (res1.status == 0) {
|
|
||||||
if (res1.data.code == 2) {
|
|
||||||
this.isShow = true;
|
|
||||||
this.openId = res1.data.openid;
|
|
||||||
} else {
|
|
||||||
uni.setStorageSync("token", res1.data.token);
|
|
||||||
uni.redirectTo({
|
|
||||||
url: "/pages/register/register"
|
|
||||||
});
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
this.$common.msgToast(res1.msg);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
// async login() {
|
||||||
|
// // 获取code
|
||||||
|
// uni.login({
|
||||||
|
// provider: "weixin",
|
||||||
|
// success: async res => {
|
||||||
|
// console.log(res);
|
||||||
|
// this.code = res.code;
|
||||||
|
// let res1 = await this.$api.login.login({ code: res.code });
|
||||||
|
// if (res1.status == 0) {
|
||||||
|
// this.isShow = true;
|
||||||
|
// this.openId = res1.data.accountInfo.openId;
|
||||||
|
// uni.setStorageSync("token", res1.data.token);
|
||||||
|
// uni.redirectTo({
|
||||||
|
// url: "/pages/register/register"
|
||||||
|
// });
|
||||||
|
// } else {
|
||||||
|
// this.$common.msgToast(res1.msg);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// });
|
||||||
|
// }
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
this.isLogoutShow = true;
|
|
||||||
if (!this.isLogoutShow) {
|
|
||||||
// 获取code
|
|
||||||
uni.login({
|
uni.login({
|
||||||
provider: "weixin",
|
provider: "weixin",
|
||||||
success: async res => {
|
success: async res => {
|
||||||
|
console.log("res.code", res.code);
|
||||||
this.code = res.code;
|
this.code = res.code;
|
||||||
let res1 = await this.$api.user.loginToken({ wxLoginCode: res.code });
|
let res1 = await this.$api.login.login({ code: res.code });
|
||||||
if (res1.status == 0) {
|
if (res1.status == 0) {
|
||||||
if (res1.data.code == 2) {
|
if (res1.data.accountInfo.isNew) {
|
||||||
this.isShow = true;
|
this.isShow = true;
|
||||||
this.openId = res1.data.openid;
|
this.openId = res1.data.accountInfo.openId;
|
||||||
|
uni.setStorageSync("token", res1.data.token);
|
||||||
} else {
|
} else {
|
||||||
uni.setStorageSync("token", res1.data.token);
|
uni.setStorageSync("token", res1.data.token);
|
||||||
uni.redirectTo({
|
uni.redirectTo({
|
||||||
url: "/pages/register/register"
|
url: "/pages/home/index"
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -88,14 +89,16 @@ export default {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
/deep/.u-button {
|
||||||
|
background: red;
|
||||||
|
}
|
||||||
.main {
|
.main {
|
||||||
background: url("@/static/image/login-bg.png") no-repeat;
|
background: url("https://cdns.fontree.cn/fonchain-main/prod/image/1381bd18-2f0c-49f1-84f6-d3eceb94f7a7/artwork/6ef00a09-f663-451d-ae0c-0d00cf4068c5.png");
|
||||||
height: 100%;
|
height: 100vh;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
@ -1,9 +1,36 @@
|
|||||||
|
|
||||||
<template></template>
|
<template>
|
||||||
|
<view class="main">
|
||||||
|
<image
|
||||||
|
src="@/static/image/payError.png"
|
||||||
|
mode="scaleToFill"
|
||||||
|
style="width:218rpx;height:54rpx;margin-top:150rpx"
|
||||||
|
/>
|
||||||
|
<view style="width:280rpx">
|
||||||
|
<u-button color="#EB5F5F" text="返回支付界面" shape="circle" @click="backPay"></u-button>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {};
|
export default {
|
||||||
|
methods: {
|
||||||
|
backPay() {
|
||||||
|
uni.navigateBack({ delta: 2 });
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style>
|
<style lang="scss" scoped>
|
||||||
|
.main {
|
||||||
|
background: url("https://cdns.fontree.cn/fonchain-main/prod/image/407e7c22-eb62-411e-957b-b6c296fde530/artwork/31c15772-209f-4bf5-bad8-4956a1438a3a.png");
|
||||||
|
height: 100vh;
|
||||||
|
box-sizing: border-box;
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-around;
|
||||||
|
align-items: center;
|
||||||
|
padding: 32rpx;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="main" :style="{background:'url('+'../../static/image/login-bg.png'+')'}">
|
<view class="main">
|
||||||
<image
|
<image
|
||||||
src="@/static/image/paySuccess.png"
|
src="@/static/image/paySuccess.png"
|
||||||
mode="scaleToFill"
|
mode="scaleToFill"
|
||||||
@ -64,6 +64,7 @@ export default {};
|
|||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.main {
|
.main {
|
||||||
|
background: url("https://cdns.fontree.cn/fonchain-main/prod/image/407e7c22-eb62-411e-957b-b6c296fde530/artwork/a8a522e0-ca12-4e1f-8c67-996cb5287f47.png");
|
||||||
height: 100vh;
|
height: 100vh;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
@ -14,9 +14,8 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="info">
|
<view class="info">
|
||||||
<view class="item">
|
<view class="item">
|
||||||
<view class="name">手机号</view>
|
<view class="name">姓名</view>
|
||||||
<u--input placeholder="请输入手机号" border="none" v-model="phone" @change="changePhone" clearable
|
<u--input placeholder="请输入姓名" border="none" v-model="name" @change="changeName"></u--input>
|
||||||
type="number" @blur="checkPhone" @confirm="checkPhone"></u--input>
|
|
||||||
</view>
|
</view>
|
||||||
<view class="item">
|
<view class="item">
|
||||||
<view class="name">身份证号</view>
|
<view class="name">身份证号</view>
|
||||||
@ -29,8 +28,8 @@
|
|||||||
<view style="display: flex;justify-content:space-between;margin-top:20rpx">
|
<view style="display: flex;justify-content:space-between;margin-top:20rpx">
|
||||||
<view class="card">
|
<view class="card">
|
||||||
<view>
|
<view>
|
||||||
<u-upload :fileList="fileList6" @afterRead="afterRead" @delete="deletePic" name="6" multiple
|
<u-upload :fileList="fileList" @afterRead="afterRead" @delete="deletePic" name="1" multiple
|
||||||
:maxCount="1" width="250" height="150">
|
:maxCount="1" :width="'270rpx'" :height="'158rpx'" previewImage>
|
||||||
<image src="@/static/image/card.png" mode="scaleToFill"
|
<image src="@/static/image/card.png" mode="scaleToFill"
|
||||||
style="width: 270rpx;height: 158rpx;"></image>
|
style="width: 270rpx;height: 158rpx;"></image>
|
||||||
</u-upload>
|
</u-upload>
|
||||||
@ -39,8 +38,8 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="card">
|
<view class="card">
|
||||||
<view>
|
<view>
|
||||||
<u-upload :fileList="fileList6" @afterRead="afterRead" @delete="deletePic" name="6" multiple
|
<u-upload :fileList="fileList2" @afterRead="afterRead2" @delete="deletePic2" name="1" multiple
|
||||||
:maxCount="1" width="250" height="150">
|
:maxCount="1" :width="'270rpx'" :height="'158rpx'">
|
||||||
<image src="@/static/image/card2.png" mode="scaleToFill"
|
<image src="@/static/image/card2.png" mode="scaleToFill"
|
||||||
style="width: 270rpx;height: 158rpx;"></image>
|
style="width: 270rpx;height: 158rpx;"></image>
|
||||||
</u-upload>
|
</u-upload>
|
||||||
@ -51,10 +50,14 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="face">
|
<view class="face">
|
||||||
<view class="faceTitle">人脸识别</view>
|
<view class="faceTitle">人脸识别</view>
|
||||||
<view class="recognition">
|
<view class="recognition" @click="camera" v-if="!isfinish">
|
||||||
<view style="color: #fff;margin-right:10rpx">前往认证</view>
|
<view style="color: #fff;margin-right:10rpx">前往认证</view>
|
||||||
<u-icon name="arrow-right-double" color="#fff"></u-icon>
|
<u-icon name="arrow-right-double" color="#fff"></u-icon>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="recognition" @click="camera" v-else>
|
||||||
|
<view style="color: #fff;margin-right:10rpx">认证成功</view>
|
||||||
|
<u-icon name="checkmark-circle" color="#fff"></u-icon>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="agreement">
|
<view class="agreement">
|
||||||
<u-checkbox-group v-model="checked" iconPlacement="left" placement="row" inactiveColor="#76C458">
|
<u-checkbox-group v-model="checked" iconPlacement="left" placement="row" inactiveColor="#76C458">
|
||||||
@ -65,38 +68,154 @@
|
|||||||
</view>
|
</view>
|
||||||
</u-checkbox-group>
|
</u-checkbox-group>
|
||||||
</view>
|
</view>
|
||||||
<u-button text="完成注册" shape="circle" style="background-color: #76C458;width:284rpx;color:#fff" @click="completeRegistration"></u-button>
|
<view style="width:284rpx;margin:20rpx auto">
|
||||||
|
<u-button text="完成注册" shape="circle" @click="completeRegistration" color="#76C458"></u-button>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import http from "@/http/api";
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
phone: "",
|
name: "",
|
||||||
num: "",
|
num: "",
|
||||||
checked: [],
|
checked: [],
|
||||||
|
fileList: [],
|
||||||
|
fileList2: [],
|
||||||
|
video: '',
|
||||||
|
isfinish: false
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
methods: {
|
onLoad(options) {
|
||||||
changePhone(value) {
|
this.video = options.tempVideoPath;
|
||||||
this.phone = value;
|
this.isfinish = JSON.parse(options.isfinish)||false
|
||||||
|
this.name = uni.getStorageSync("info").name
|
||||||
|
this.num = uni.getStorageSync("info").num
|
||||||
|
this.fileList = uni.getStorageSync("info").fileList
|
||||||
|
this.fileList2 = uni.getStorageSync("info").fileList2
|
||||||
|
uni.removeStorageSync("info")
|
||||||
},
|
},
|
||||||
checkPhone(event) {
|
methods: {
|
||||||
if (event) {
|
changeName(value) {
|
||||||
this.$common.vefTel(event);
|
this.name = value;
|
||||||
}
|
|
||||||
},
|
},
|
||||||
changeNum(value) {
|
changeNum(value) {
|
||||||
this.num = value;
|
this.num = value;
|
||||||
},
|
},
|
||||||
completeRegistration(){
|
camera() {
|
||||||
if (!this.checked.length) return this.$common.msgToast("请阅读并勾选协议");
|
const data = {
|
||||||
|
num: this.num,
|
||||||
|
name: this.name,
|
||||||
|
fileList: this.fileList,
|
||||||
|
fileList2: this.fileList2
|
||||||
|
}
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pages/cameraContext/cameraContext'
|
url: '/pages/cameraContext/cameraContext'
|
||||||
});
|
});
|
||||||
|
uni.setStorageSync("info", data)
|
||||||
|
},
|
||||||
|
async completeRegistration() {
|
||||||
|
if (!this.checked.length) return this.$common.msgToast("请阅读并勾选协议");
|
||||||
|
if (!this.checked.length) return this.$common.msgToast("请阅读并勾选协议");
|
||||||
|
if (!this.name) return this.$common.msgToast("请输入姓名");
|
||||||
|
if (!this.num) return this.$common.msgToast("请输入身份证号");
|
||||||
|
if (!this.fileList.length) return this.$common.msgToast("请上传身份证人面像");
|
||||||
|
if (!this.fileList2.length) return this.$common.msgToast("请上传身份国徽面");
|
||||||
|
if (!this.video) return this.$common.msgToast("请上传人脸识别视频");
|
||||||
|
console.log({
|
||||||
|
telNum: uni.getStorageSync("telNum"),
|
||||||
|
realNameIDName: this.num,
|
||||||
|
realName: this.name,
|
||||||
|
video: this.video,
|
||||||
|
realIDImgA: this.fileList[0]?.url,
|
||||||
|
realIDImgB: this.fileList2[0].url
|
||||||
|
})
|
||||||
|
const res = await this.$api.login.register({user:{
|
||||||
|
telNum: uni.getStorageSync("telNum"),
|
||||||
|
realNameIDName: this.num,
|
||||||
|
realName: this.name,
|
||||||
|
video: this.video,
|
||||||
|
realIDImgA: this.fileList[0]?.url,
|
||||||
|
realIDImgB: this.fileList2[0]?.url
|
||||||
|
}})
|
||||||
|
if (res.status === 0) {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pages/home/index'
|
||||||
|
});
|
||||||
|
}else{
|
||||||
|
this.$common.msgToast(res.msg)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
},
|
||||||
|
// 删除图片
|
||||||
|
deletePic(event) {
|
||||||
|
this[`fileList`].splice(event.index, 1)
|
||||||
|
},
|
||||||
|
// 删除图片
|
||||||
|
deletePic2(event) {
|
||||||
|
this[`fileList2`].splice(event.index, 1)
|
||||||
|
},
|
||||||
|
// 新增图片
|
||||||
|
async afterRead(event) {
|
||||||
|
// 当设置 multiple 为 true 时, file 为数组格式,否则为对象格式
|
||||||
|
let lists = [].concat(event.file)
|
||||||
|
let fileListLen = this[`fileList`].length
|
||||||
|
lists.map((item) => {
|
||||||
|
this[`fileList`].push({
|
||||||
|
...item,
|
||||||
|
status: 'uploading',
|
||||||
|
message: '上传中'
|
||||||
|
})
|
||||||
|
})
|
||||||
|
for (let i = 0; i < lists.length; i++) {
|
||||||
|
const result = await this.uploadFilePromise(lists[i].url)
|
||||||
|
let item = this[`fileList`][fileListLen]
|
||||||
|
this[`fileList`].splice(fileListLen, 1, Object.assign(item, {
|
||||||
|
status: 'success',
|
||||||
|
message: '',
|
||||||
|
url: result
|
||||||
|
}))
|
||||||
|
fileListLen++
|
||||||
|
}
|
||||||
|
},
|
||||||
|
async afterRead2(event) {
|
||||||
|
// 当设置 multiple 为 true 时, file 为数组格式,否则为对象格式
|
||||||
|
let lists = [].concat(event.file)
|
||||||
|
let fileListLen = this[`fileList2`].length
|
||||||
|
lists.map((item) => {
|
||||||
|
this[`fileList2`].push({
|
||||||
|
...item,
|
||||||
|
status: 'uploading',
|
||||||
|
message: '上传中'
|
||||||
|
})
|
||||||
|
})
|
||||||
|
for (let i = 0; i < lists.length; i++) {
|
||||||
|
const result = await this.uploadFilePromise(lists[i].url)
|
||||||
|
let item = this[`fileList2`][fileListLen]
|
||||||
|
this[`fileList2`].splice(fileListLen, 1, Object.assign(item, {
|
||||||
|
status: 'success',
|
||||||
|
message: '',
|
||||||
|
url: result
|
||||||
|
}))
|
||||||
|
fileListLen++
|
||||||
|
}
|
||||||
|
},
|
||||||
|
uploadFilePromise(url) {
|
||||||
|
return new Promise((resolve) => {
|
||||||
|
uni.uploadFile({
|
||||||
|
url: http.baseUrl + "/api/wxuser/uploadpic",
|
||||||
|
filePath: url,
|
||||||
|
name: "file",
|
||||||
|
success: (res) => {
|
||||||
|
res.data = JSON.parse(res.data);
|
||||||
|
resolve(res.data.data.path);
|
||||||
|
},
|
||||||
|
});
|
||||||
|
});
|
||||||
|
},
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
@ -106,9 +225,11 @@ export default {
|
|||||||
width: 25upx !important;
|
width: 25upx !important;
|
||||||
height: 25upx !important;
|
height: 25upx !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
/deep/ .u-checkbox-label--left {
|
/deep/ .u-checkbox-label--left {
|
||||||
margin-top: 20rpx;
|
margin-top: 20rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.main {
|
.main {
|
||||||
background: url("@/static/image/login-bg.png") no-repeat;
|
background: url("@/static/image/login-bg.png") no-repeat;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
@ -224,6 +345,7 @@ export default {
|
|||||||
.agreement {
|
.agreement {
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
margin: 46rpx auto;
|
margin: 46rpx auto;
|
||||||
|
|
||||||
.know {
|
.know {
|
||||||
margin-top: 20upx;
|
margin-top: 20upx;
|
||||||
font-size: 28upx;
|
font-size: 28upx;
|
||||||
|
@ -54,6 +54,15 @@ export default {
|
|||||||
isRight: false
|
isRight: false
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
watch: {
|
||||||
|
phone(newValue) {
|
||||||
|
if (this.determinePhone !== newValue) {
|
||||||
|
this.isTrue = true;
|
||||||
|
} else {
|
||||||
|
this.isTrue = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
changePhone(value) {
|
changePhone(value) {
|
||||||
this.phone = value;
|
this.phone = value;
|
||||||
@ -73,11 +82,16 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
next() {
|
next() {
|
||||||
|
if (this.phone !== this.determinePhone)
|
||||||
|
return this.$common.msgToast("两次输入不一致");
|
||||||
|
console.log(this.$common.vefTel(this.phone));
|
||||||
|
if (this.$common.vefTel(this.phone)) {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: "/pages/realName/realName"
|
url: "/pages/realName/realName"
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
BIN
static/image/error.png
Normal file
BIN
static/image/error.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 34 KiB |
BIN
static/image/payError.png
Normal file
BIN
static/image/payError.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 6.3 KiB |
BIN
static/image/success.png
Normal file
BIN
static/image/success.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 36 KiB |
Loading…
Reference in New Issue
Block a user