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 deposit from "./deposit";
|
||||
export default {
|
||||
login,
|
||||
deposit,
|
||||
};
|
||||
|
@ -60,7 +60,7 @@ export default {
|
||||
response = newResponse;
|
||||
}
|
||||
}
|
||||
if (response.data.status === 401) {
|
||||
if (response.data?.status === 401) {
|
||||
let curPage = getCurrentPages();
|
||||
let route = curPage[curPage.length - 1].route; //获取当前页面的路由
|
||||
if (route !== "pages/login/login") {
|
||||
|
@ -1,5 +1,31 @@
|
||||
import http from "./interface";
|
||||
|
||||
// 登录
|
||||
|
||||
export default {};
|
||||
// openId
|
||||
export const login = (data) => {
|
||||
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>
|
||||
</camera>
|
||||
|
||||
<view class="time" v-if="isAnimate">
|
||||
<view class="time">
|
||||
<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 style="width:284rpx;">
|
||||
<u-button
|
||||
@ -29,7 +29,7 @@
|
||||
@touchend="stopRecord"
|
||||
></u-button>
|
||||
<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>
|
||||
@ -42,7 +42,8 @@ export default {
|
||||
return {
|
||||
ctx: null,
|
||||
isAnimate: false,
|
||||
tempVideoPath: ""
|
||||
tempVideoPath: "",
|
||||
data: {}
|
||||
};
|
||||
},
|
||||
onLoad() {
|
||||
@ -52,15 +53,14 @@ export default {
|
||||
startRecord() {
|
||||
this.ctx.startRecord({
|
||||
success: res => {
|
||||
console.log(123123);
|
||||
this.isAnimate = true;
|
||||
this.$refs.countDown.start();
|
||||
console.log(this.$refs);
|
||||
setTimeout(() => {
|
||||
this.ctx.stopRecord({
|
||||
success: res => {
|
||||
console.log("自动停止录像", res);
|
||||
this.tempVideoPath = res.tempVideoPath;
|
||||
this.isAnimate = false;
|
||||
this.$refs.countDown.reset();
|
||||
}
|
||||
});
|
||||
}, 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">
|
||||
<title-block title="寄存画作">
|
||||
<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>
|
||||
</title-block>
|
||||
<div class="content2">
|
||||
@ -197,6 +197,12 @@ export default {
|
||||
day,
|
||||
value: [9999, month - 1, day - 1],
|
||||
visible: true,
|
||||
url:''//二维码扫码的结果用户发起请求的body体
|
||||
}
|
||||
},
|
||||
onLoad(e) {
|
||||
if(e){
|
||||
this.url = e.url
|
||||
}
|
||||
},
|
||||
mounted(){
|
||||
@ -212,6 +218,9 @@ export default {
|
||||
},
|
||||
changeData(e){
|
||||
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>
|
||||
<view :style="{background:'url('+'../../static/bbj1@3x.png'+')'}" class="main">
|
||||
<view class="title">寄存</view>
|
||||
<view class="order">
|
||||
<title-block style="flex-shrink: 0;width: 100%" title="寄存"></title-block>
|
||||
<view class="order" @click="goConsignmen">
|
||||
<view class="order-item">
|
||||
<image src="@/static/image/write.png" mode="scaleToFill" style="width: 63rpx;height: 62rpx" />
|
||||
<view style="color: #fff;margin-top:10rpx">填写下单</view>
|
||||
@ -16,14 +16,12 @@
|
||||
<view class="list">
|
||||
<view style="color: #76C458">目前可用寄存仓库地址</view>
|
||||
<u-divider :dashed="true" lineColor="#4E964D"></u-divider>
|
||||
<view class="list-item">
|
||||
<view>目前可用地址某某某地区</view>
|
||||
<view>剩余200位置</view>
|
||||
</view>
|
||||
<u-divider :dashed="true" lineColor="#4E964D"></u-divider>
|
||||
<view class="list-item">
|
||||
<view>目前可用地址某某某地区</view>
|
||||
<view>剩余200位置</view>
|
||||
<view v-for="(item,index) in addressList" :key="item.ID">
|
||||
<view class="list-item">
|
||||
<view>{{item.address}}</view>
|
||||
<view>剩余{{item.deletedAt}}位置</view>
|
||||
</view>
|
||||
<u-divider :dashed="true" lineColor="#4E964D" v-if="index !== addressList.length-1"></u-divider>
|
||||
</view>
|
||||
</view>
|
||||
<tabbar :current="0"></tabbar>
|
||||
@ -37,9 +35,17 @@ export default {
|
||||
onLoad() {
|
||||
uni.hideTabBar();
|
||||
},
|
||||
onShow() {
|
||||
this.getAddress();
|
||||
},
|
||||
components: {
|
||||
tabbar
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
addressList: []
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
scanOrder() {
|
||||
uni.scanCode({
|
||||
@ -47,8 +53,25 @@ export default {
|
||||
success: res => {
|
||||
console.log("条码类型:" + res.scanType);
|
||||
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;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
padding: 30rpx;
|
||||
.title {
|
||||
margin-top: 40rpx;
|
||||
color: #4e964d;
|
||||
font-size: 32rpx;
|
||||
}
|
||||
padding: 10rpx 30rpx 30rpx 30rpx;
|
||||
|
||||
.order {
|
||||
width: 100%;
|
||||
margin-top: 40rpx;
|
||||
|
@ -1,13 +1,17 @@
|
||||
<template>
|
||||
<view class="main">
|
||||
<image src="@/static/image/logo.png" mode="scaleToFill" class="logo" />
|
||||
<button
|
||||
class="btn"
|
||||
v-if="isShow"
|
||||
open-type="getPhoneNumber"
|
||||
@getphonenumber="getPhoneNumber"
|
||||
>点击登录</button>
|
||||
<button class="btn" v-if="isLogoutShow" @click="login">点击登录</button>
|
||||
<view class="btn">
|
||||
<u-button
|
||||
v-if="isShow"
|
||||
open-type="getPhoneNumber"
|
||||
@getphonenumber="getPhoneNumber"
|
||||
color="transparent"
|
||||
>点击登录</u-button>
|
||||
</view>
|
||||
<!-- <view class="btn">
|
||||
<u-button v-if="isLogoutShow" @click="login" color="transparent">点击登录</u-button>
|
||||
</view>-->
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@ -17,85 +21,84 @@ export default {
|
||||
return {
|
||||
code: "",
|
||||
openId: "",
|
||||
isShow: false,
|
||||
isLogoutShow: false
|
||||
isShow: true,
|
||||
isLogoutShow: true
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
async getPhoneNumber(e) {
|
||||
console.log(e);
|
||||
if (e.detail.errMsg == "getPhoneNumber:ok") {
|
||||
// 用户允许或去手机号
|
||||
let res = await this.$api.user.loginToken({
|
||||
wxPhoneCode: e.detail.code,
|
||||
openid: this.openId
|
||||
});
|
||||
let res = await this.$api.login.getTel({ code: e.detail.code });
|
||||
if (res.status == 0) {
|
||||
uni.setStorageSync("token", res.data.token);
|
||||
uni.setStorageSync("telNum", res.data.telNum);
|
||||
uni.redirectTo({
|
||||
url: "/pages/register/register"
|
||||
url: "/pages/realName/realName"
|
||||
});
|
||||
} else {
|
||||
this.$common.msgToast(res.msg);
|
||||
}
|
||||
} else {
|
||||
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() {
|
||||
this.isLogoutShow = true;
|
||||
if (!this.isLogoutShow) {
|
||||
// 获取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"
|
||||
});
|
||||
}
|
||||
uni.login({
|
||||
provider: "weixin",
|
||||
success: async res => {
|
||||
console.log("res.code", res.code);
|
||||
this.code = res.code;
|
||||
let res1 = await this.$api.login.login({ code: res.code });
|
||||
if (res1.status == 0) {
|
||||
if (res1.data.accountInfo.isNew) {
|
||||
this.isShow = true;
|
||||
this.openId = res1.data.accountInfo.openId;
|
||||
uni.setStorageSync("token", res1.data.token);
|
||||
} else {
|
||||
this.$common.msgToast(res1.msg);
|
||||
uni.setStorageSync("token", res1.data.token);
|
||||
uni.redirectTo({
|
||||
url: "/pages/home/index"
|
||||
});
|
||||
}
|
||||
} else {
|
||||
this.$common.msgToast(res1.msg);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
/deep/.u-button {
|
||||
background: red;
|
||||
}
|
||||
.main {
|
||||
background: url("@/static/image/login-bg.png") no-repeat;
|
||||
height: 100%;
|
||||
background: url("https://cdns.fontree.cn/fonchain-main/prod/image/1381bd18-2f0c-49f1-84f6-d3eceb94f7a7/artwork/6ef00a09-f663-451d-ae0c-0d00cf4068c5.png");
|
||||
height: 100vh;
|
||||
display: flex;
|
||||
justify-content: 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>
|
||||
export default {};
|
||||
export default {
|
||||
methods: {
|
||||
backPay() {
|
||||
uni.navigateBack({ delta: 2 });
|
||||
}
|
||||
}
|
||||
};
|
||||
</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>
|
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<view class="main" :style="{background:'url('+'../../static/image/login-bg.png'+')'}">
|
||||
<view class="main">
|
||||
<image
|
||||
src="@/static/image/paySuccess.png"
|
||||
mode="scaleToFill"
|
||||
@ -64,6 +64,7 @@ export default {};
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.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;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
|
@ -14,9 +14,8 @@
|
||||
</view>
|
||||
<view class="info">
|
||||
<view class="item">
|
||||
<view class="name">手机号</view>
|
||||
<u--input placeholder="请输入手机号" border="none" v-model="phone" @change="changePhone" clearable
|
||||
type="number" @blur="checkPhone" @confirm="checkPhone"></u--input>
|
||||
<view class="name">姓名</view>
|
||||
<u--input placeholder="请输入姓名" border="none" v-model="name" @change="changeName"></u--input>
|
||||
</view>
|
||||
<view class="item">
|
||||
<view class="name">身份证号</view>
|
||||
@ -29,8 +28,8 @@
|
||||
<view style="display: flex;justify-content:space-between;margin-top:20rpx">
|
||||
<view class="card">
|
||||
<view>
|
||||
<u-upload :fileList="fileList6" @afterRead="afterRead" @delete="deletePic" name="6" multiple
|
||||
:maxCount="1" width="250" height="150">
|
||||
<u-upload :fileList="fileList" @afterRead="afterRead" @delete="deletePic" name="1" multiple
|
||||
:maxCount="1" :width="'270rpx'" :height="'158rpx'" previewImage>
|
||||
<image src="@/static/image/card.png" mode="scaleToFill"
|
||||
style="width: 270rpx;height: 158rpx;"></image>
|
||||
</u-upload>
|
||||
@ -39,8 +38,8 @@
|
||||
</view>
|
||||
<view class="card">
|
||||
<view>
|
||||
<u-upload :fileList="fileList6" @afterRead="afterRead" @delete="deletePic" name="6" multiple
|
||||
:maxCount="1" width="250" height="150">
|
||||
<u-upload :fileList="fileList2" @afterRead="afterRead2" @delete="deletePic2" name="1" multiple
|
||||
:maxCount="1" :width="'270rpx'" :height="'158rpx'">
|
||||
<image src="@/static/image/card2.png" mode="scaleToFill"
|
||||
style="width: 270rpx;height: 158rpx;"></image>
|
||||
</u-upload>
|
||||
@ -51,10 +50,14 @@
|
||||
</view>
|
||||
<view class="face">
|
||||
<view class="faceTitle">人脸识别</view>
|
||||
<view class="recognition">
|
||||
<view class="recognition" @click="camera" v-if="!isfinish">
|
||||
<view style="color: #fff;margin-right:10rpx">前往认证</view>
|
||||
<u-icon name="arrow-right-double" color="#fff"></u-icon>
|
||||
</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 class="agreement">
|
||||
<u-checkbox-group v-model="checked" iconPlacement="left" placement="row" inactiveColor="#76C458">
|
||||
@ -65,50 +68,168 @@
|
||||
</view>
|
||||
</u-checkbox-group>
|
||||
</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>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import http from "@/http/api";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
phone: "",
|
||||
name: "",
|
||||
num: "",
|
||||
checked: [],
|
||||
fileList: [],
|
||||
fileList2: [],
|
||||
video: '',
|
||||
isfinish: false
|
||||
};
|
||||
},
|
||||
onLoad(options) {
|
||||
this.video = options.tempVideoPath;
|
||||
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")
|
||||
},
|
||||
methods: {
|
||||
changePhone(value) {
|
||||
this.phone = value;
|
||||
},
|
||||
checkPhone(event) {
|
||||
if (event) {
|
||||
this.$common.vefTel(event);
|
||||
}
|
||||
changeName(value) {
|
||||
this.name = value;
|
||||
},
|
||||
changeNum(value) {
|
||||
this.num = value;
|
||||
},
|
||||
completeRegistration(){
|
||||
if (!this.checked.length) return this.$common.msgToast("请阅读并勾选协议");
|
||||
camera() {
|
||||
const data = {
|
||||
num: this.num,
|
||||
name: this.name,
|
||||
fileList: this.fileList,
|
||||
fileList2: this.fileList2
|
||||
}
|
||||
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>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
/deep/.u-checkbox__icon-wrap--circle {
|
||||
width: 25upx !important;
|
||||
height: 25upx !important;
|
||||
width: 25upx !important;
|
||||
height: 25upx !important;
|
||||
}
|
||||
|
||||
/deep/ .u-checkbox-label--left {
|
||||
margin-top: 20rpx;
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
|
||||
.main {
|
||||
background: url("@/static/image/login-bg.png") no-repeat;
|
||||
box-sizing: border-box;
|
||||
@ -224,6 +345,7 @@ export default {
|
||||
.agreement {
|
||||
font-size: 28rpx;
|
||||
margin: 46rpx auto;
|
||||
|
||||
.know {
|
||||
margin-top: 20upx;
|
||||
font-size: 28upx;
|
||||
|
@ -54,6 +54,15 @@ export default {
|
||||
isRight: false
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
phone(newValue) {
|
||||
if (this.determinePhone !== newValue) {
|
||||
this.isTrue = true;
|
||||
} else {
|
||||
this.isTrue = false;
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
changePhone(value) {
|
||||
this.phone = value;
|
||||
@ -73,9 +82,14 @@ export default {
|
||||
}
|
||||
},
|
||||
next() {
|
||||
uni.navigateTo({
|
||||
url: "/pages/realName/realName"
|
||||
});
|
||||
if (this.phone !== this.determinePhone)
|
||||
return this.$common.msgToast("两次输入不一致");
|
||||
console.log(this.$common.vefTel(this.phone));
|
||||
if (this.$common.vefTel(this.phone)) {
|
||||
uni.navigateTo({
|
||||
url: "/pages/realName/realName"
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
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