小程序接入保安证号接口
This commit is contained in:
parent
90202e7e95
commit
6d0c45931b
|
@ -5,11 +5,14 @@
|
||||||
"appid": "touristappid",
|
"appid": "touristappid",
|
||||||
"setting": {
|
"setting": {
|
||||||
"urlCheck": false,
|
"urlCheck": false,
|
||||||
"es6": false,
|
"es6": true,
|
||||||
"enhance": false,
|
"enhance": false,
|
||||||
|
"minified": true,
|
||||||
|
"minifyWXSS": true,
|
||||||
|
"minifyWXML": true,
|
||||||
"compileHotReLoad": false,
|
"compileHotReLoad": false,
|
||||||
"postcss": false,
|
"postcss": true,
|
||||||
"minified": false
|
"minified": true
|
||||||
},
|
},
|
||||||
"compileType": "miniprogram"
|
"compileType": "miniprogram"
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,6 +24,40 @@ const App = createApp({
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
onShow(){
|
||||||
|
const updateManager = Taro.getUpdateManager()
|
||||||
|
updateManager.onCheckForUpdate(function(res) {
|
||||||
|
// 请求完新版本信息的回调
|
||||||
|
if (res.hasUpdate) {
|
||||||
|
// 新版本已经下载好,调用 applyUpdate 应用新版本并重启
|
||||||
|
updateManager.applyUpdate()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
updateManager.onUpdateReady(function() {
|
||||||
|
// 新版本已经准备好,可以提示用户更新
|
||||||
|
Taro.showModal({
|
||||||
|
title: '更新提示',
|
||||||
|
content: '发现新版本,是否重启应用?',
|
||||||
|
success: function (res) {
|
||||||
|
if (res.confirm) {
|
||||||
|
// 新的版本已经准备好,调用 applyUpdate 应用新版本
|
||||||
|
updateManager.applyUpdate()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}).then(res=>{
|
||||||
|
console.log(res)
|
||||||
|
})
|
||||||
|
})
|
||||||
|
updateManager.onUpdateFailed(function() {
|
||||||
|
// 新版本下载失败,可进行一些提示用户的操作
|
||||||
|
Taro.showModal({
|
||||||
|
title: '已有新版本',
|
||||||
|
content: '请删除当前小程序,重新从搜索界面打开获取最新版本',
|
||||||
|
}).then(res => {
|
||||||
|
console.log(res)
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
// 入口组件不需要实现 render 方法,即使实现了也会被 taro 所覆盖
|
// 入口组件不需要实现 render 方法,即使实现了也会被 taro 所覆盖
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
|
@ -10,3 +10,11 @@
|
||||||
height: 140px
|
height: 140px
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.uploadPictures{
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
width: 220px;
|
||||||
|
height: 254px;
|
||||||
|
border: 2px solid #d5d3d3;
|
||||||
|
}
|
||||||
|
|
|
@ -2,6 +2,12 @@
|
||||||
<view class="form">
|
<view class="form">
|
||||||
<nut-form ref="formRef" :model-value="formData" :rules="rules">
|
<nut-form ref="formRef" :model-value="formData" :rules="rules">
|
||||||
<nut-form-item label="头像" prop="avatar">
|
<nut-form-item label="头像" prop="avatar">
|
||||||
|
<!-- <view class="uploadPictures" @click="chooseImage">-->
|
||||||
|
<!-- <view v-if="!formData.photo">-->
|
||||||
|
<!-- <IconFont name="uploader" size="25" color="#98a7b0"></IconFont>-->
|
||||||
|
<!-- </view>-->
|
||||||
|
<!-- <image v-else :src="minioBaseUrl +formData.photo" style="width: 100%; height: 100%"></image>-->
|
||||||
|
<!-- </view>-->
|
||||||
<view @click="chooseImage" size>
|
<view @click="chooseImage" size>
|
||||||
<image v-if="!formData.photo" src="@/assets/logo/avatar1.png" style="width: 50px; height: 50px"></image>
|
<image v-if="!formData.photo" src="@/assets/logo/avatar1.png" style="width: 50px; height: 50px"></image>
|
||||||
<image v-else :src="minioBaseUrl +formData.photo" style="width: 160px; height: 128px"></image>
|
<image v-else :src="minioBaseUrl +formData.photo" style="width: 160px; height: 128px"></image>
|
||||||
|
@ -29,7 +35,6 @@
|
||||||
<nut-form-item label="工作岗位" prop="workPost">
|
<nut-form-item label="工作岗位" prop="workPost">
|
||||||
<nut-input v-model="formData.workPost" placeholder="请输入工作岗位" type="text" />
|
<nut-input v-model="formData.workPost" placeholder="请输入工作岗位" type="text" />
|
||||||
</nut-form-item>
|
</nut-form-item>
|
||||||
|
|
||||||
<nut-form-item label="手机号" prop="telephone">
|
<nut-form-item label="手机号" prop="telephone">
|
||||||
<nut-input v-model="formData.telephone" placeholder="请输入手机号" type="text" />
|
<nut-input v-model="formData.telephone" placeholder="请输入手机号" type="text" />
|
||||||
</nut-form-item>
|
</nut-form-item>
|
||||||
|
@ -85,6 +90,7 @@ import dayjs from 'dayjs'
|
||||||
import { SecurityUserFormParams, securityNumberByIdCard } from '@/types/subPages/projectManager/securityUserForm'
|
import { SecurityUserFormParams, securityNumberByIdCard } from '@/types/subPages/projectManager/securityUserForm'
|
||||||
import { FormInstance } from '@nutui/nutui-taro'
|
import { FormInstance } from '@nutui/nutui-taro'
|
||||||
import { generateSimpleObjectName, getResignedObjectUrl } from '@/utils'
|
import { generateSimpleObjectName, getResignedObjectUrl } from '@/utils'
|
||||||
|
import {IconFont} from "@nutui/icons-vue-taro";
|
||||||
|
|
||||||
const SEX = enumSelectNodes('Sex')
|
const SEX = enumSelectNodes('Sex')
|
||||||
const minioBaseUrl = process.env.TARO_APP_MINIO_URL
|
const minioBaseUrl = process.env.TARO_APP_MINIO_URL
|
||||||
|
@ -112,7 +118,6 @@ const rules: FormRules = {
|
||||||
}
|
}
|
||||||
|
|
||||||
useLoad((options) => {
|
useLoad((options) => {
|
||||||
console.log(options)
|
|
||||||
type.value = options.type
|
type.value = options.type
|
||||||
if (type.value === 'QcCodeInput') {
|
if (type.value === 'QcCodeInput') {
|
||||||
formData.value = {
|
formData.value = {
|
||||||
|
@ -191,7 +196,7 @@ const chooseImage = () => {
|
||||||
count: 1, // 选择一个文件
|
count: 1, // 选择一个文件
|
||||||
mediaType: ['image', 'video'],
|
mediaType: ['image', 'video'],
|
||||||
sourceType: ['album', 'camera'],
|
sourceType: ['album', 'camera'],
|
||||||
maxDuration: 30,
|
sizeType:['original', 'compressed'],
|
||||||
camera: 'front',
|
camera: 'front',
|
||||||
success: async (res) => {
|
success: async (res) => {
|
||||||
Url.value = res.tempFiles[0].tempFilePath
|
Url.value = res.tempFiles[0].tempFilePath
|
||||||
|
|
Loading…
Reference in New Issue