This commit is contained in:
唐明明
2023-03-27 17:54:12 +08:00
parent 7508bb7ce2
commit 7a25361249
9 changed files with 178 additions and 11 deletions

View File

@@ -9,12 +9,12 @@ import Mylink from './node_modules/uni-simple-router/dist/link.vue'
import { INIT } from './im/INIT' import { INIT } from './im/INIT'
(async () => { // (async () => {
Vue.component('my-link', Mylink) Vue.component('my-link', Mylink)
Vue.use(uView) Vue.use(uView)
Vue.use(router) Vue.use(router)
await INIT(); // await INIT();
Vue.config.productionTip = false Vue.config.productionTip = false
App.mpType = 'app' App.mpType = 'app'
@@ -23,4 +23,4 @@ import { INIT } from './im/INIT'
...App ...App
}) })
app.$mount() app.$mount()
})() // })()

View File

@@ -106,9 +106,6 @@
uni.hideLoading() uni.hideLoading()
}).catch(err => { }).catch(err => {
console.log(err)
uni.showModal({ uni.showModal({
content : err.message, content : err.message,
showCancel : false, showCancel : false,

View File

@@ -59,8 +59,6 @@
} }
}, },
onShow() { onShow() {
console.log()
// this.$nim.msg() // this.$nim.msg()
}, },
methods: { methods: {

View File

@@ -110,6 +110,13 @@
</view> </view>
</view> </view>
</u-popup> </u-popup>
<!-- 机构选择 -->
<button @click="onOpen">弹出层</button>
<oct-mechanism-picker
ref="MecanisPicker"
title="选择办理机构"
:columns="jgArr"
/>
</view> </view>
</template> </template>
@@ -119,6 +126,18 @@
export default { export default {
data() { data() {
return { return {
jgArr : [
{ name: '中信' },
{ name: '哈尔滨' },
{ name: '广州' },
{ name: '发展银行' },
{ name: '其他机构' },
{ name: '中信' },
{ name: '哈尔滨' },
{ name: '广州' },
{ name: '发展银行' },
{ name: '其他机构' }
],
theTabs : [ theTabs : [
{ category_id: '', title: '全部' } { category_id: '', title: '全部' }
], ],
@@ -146,6 +165,9 @@
this.getZf() this.getZf()
}, },
methods: { methods: {
onOpen(){
this.$refs.MecanisPicker.open()
},
// 获取金法列表 // 获取金法列表
getJf(){ getJf(){
let params = { let params = {

View File

@@ -106,21 +106,21 @@
<text>*</text>现居住地址 <text>*</text>现居住地址
<uni-icons v-if="baseInfo.check_params.now_domicile" class="from-icon" type="info" size="18" color="red" @click="modifyToast(baseInfo.check_params.now_domicile.description)"></uni-icons> <uni-icons v-if="baseInfo.check_params.now_domicile" class="from-icon" type="info" size="18" color="red" @click="modifyToast(baseInfo.check_params.now_domicile.description)"></uni-icons>
</label> </label>
<input class="from-input" type="number" v-model="baseInfo.now_domicile" placeholder="输入现居住地址"> <input class="from-input" v-model="baseInfo.now_domicile" placeholder="输入现居住地址">
</view> </view>
<view class="from-item from-item-100"> <view class="from-item from-item-100">
<label> <label>
<text>*</text>现单位地址 <text>*</text>现单位地址
<uni-icons v-if="baseInfo.check_params.now_company_address" class="from-icon" type="info" size="18" color="red" @click="modifyToast(baseInfo.check_params.now_company_address.description)"></uni-icons> <uni-icons v-if="baseInfo.check_params.now_company_address" class="from-icon" type="info" size="18" color="red" @click="modifyToast(baseInfo.check_params.now_company_address.description)"></uni-icons>
</label> </label>
<input class="from-input" type="number" v-model="baseInfo.now_company_address" placeholder="输入现单位地址"> <input class="from-input" v-model="baseInfo.now_company_address" placeholder="输入现单位地址">
</view> </view>
<view class="from-item from-item-100"> <view class="from-item from-item-100">
<label> <label>
<text>*</text>现单位名称 <text>*</text>现单位名称
<uni-icons v-if="baseInfo.check_params.now_company_name" class="from-icon" type="info" size="18" color="red" @click="modifyToast(baseInfo.check_params.now_company_name.description)"></uni-icons> <uni-icons v-if="baseInfo.check_params.now_company_name" class="from-icon" type="info" size="18" color="red" @click="modifyToast(baseInfo.check_params.now_company_name.description)"></uni-icons>
</label> </label>
<input class="from-input" type="number" v-model="baseInfo.now_company_name" placeholder="输入现单位名称"> <input class="from-input" v-model="baseInfo.now_company_name" placeholder="输入现单位名称">
</view> </view>
</view> </view>
<view class="btn"> <view class="btn">

View File

@@ -0,0 +1,68 @@
<template>
<view>
<uni-popup ref="octMechanismPicker">
<view class="mechanism--content">
<view class="mechanism--title" v-if="title != null">{{title}}</view>
<scroll-view class="mechanism--scroll" scroll-y show-scrollbar>
<view class="mechanism--item" v-for="(item, index) in columns" :key="index">{{item.name}}</view>
</scroll-view>
<button class="mechanism--button">确认</button>
</view>
</uni-popup>
</view>
</template>
<script>
export default{
props : {
// 弹出层标题
title : {
type : String,
default : null
},
// 默认值
value : {
type : Number,
default : 0
},
// 选项
columns : {
type : Array,
default : () => {
return []
}
}
},
methods : {
open(type){
this.$refs.octMechanismPicker.open(type || 'bottom')
}
}
}
</script>
<style lang="scss" scoped>
.mechanism--content{
background: white;
border-radius: 20rpx 20rpx 0 0;
.mechanism--title{
text-align: center;
position: relative;
padding: 30rpx 50rpx;
font-size: 34rpx;
font-weight: bold;
&::after {
content: "";
position: absolute;
left: 0;
bottom: 0;
width: 100%;
height: 1rpx;
background-image: linear-gradient(0deg, $border-color 50%, transparent 50%);
}
}
.mechanism--scroll{
padding: 30rpx 50rpx;
height: 50vh;
.mechanism--item{ line-height: 90rpx; }
}
}
</style>

View File

@@ -0,0 +1,81 @@
{
"id": "oct-mechanism-picker",
"displayName": "oct-mechanism-picker",
"version": "1.0.0",
"description": "oct-mechanism-picker",
"keywords": [
"oct-mechanism-picker"
],
"repository": "",
"engines": {
"HBuilderX": "^3.1.0"
},
"dcloudext": {
"type": "component-vue",
"sale": {
"regular": {
"price": "0.00"
},
"sourcecode": {
"price": "0.00"
}
},
"contact": {
"qq": ""
},
"declaration": {
"ads": "",
"data": "",
"permissions": ""
},
"npmurl": ""
},
"uni_modules": {
"dependencies": [],
"encrypt": [],
"platforms": {
"cloud": {
"tcb": "u",
"aliyun": "u"
},
"client": {
"Vue": {
"vue2": "u",
"vue3": "u"
},
"App": {
"app-vue": "u",
"app-nvue": "u"
},
"H5-mobile": {
"Safari": "u",
"Android Browser": "u",
"微信浏览器(Android)": "u",
"QQ浏览器(Android)": "u"
},
"H5-pc": {
"Chrome": "u",
"IE": "u",
"Edge": "u",
"Firefox": "u",
"Safari": "u"
},
"小程序": {
"微信": "u",
"阿里": "u",
"百度": "u",
"字节跳动": "u",
"QQ": "u",
"钉钉": "u",
"快手": "u",
"飞书": "u",
"京东": "u"
},
"快应用": {
"华为": "u",
"联盟": "u"
}
}
}
}
}

View File

@@ -0,0 +1 @@
# oct-mechanism-picker