|
@@ -1,6 +1,11 @@
|
|
|
{extend name="public/base_human"/}
|
|
|
{block name="css"}
|
|
|
-
|
|
|
+<style>
|
|
|
+ .btn_search_item{background:#f2f6ff;display:inline-block;border-radius:5px;line-height:35px;height:35px;text-align:center;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;position:relative;font-size:13px;width:100%;color:#666;margin-bottom:10px;}
|
|
|
+ .btn_search_item.active{color:var(--blue);}
|
|
|
+ .btn_search_icon{position:absolute;bottom:-3px;right:-3px;font-size:30px;}
|
|
|
+ .contact {position: fixed;bottom:100px;right:20px;background: #29db6f;border-radius: 50%;color:white;}
|
|
|
+</style>
|
|
|
{/block}
|
|
|
{block name="body"}
|
|
|
<van-nav-bar
|
|
@@ -47,6 +52,20 @@
|
|
|
label="微信号"
|
|
|
placeholder="请输入微信号"
|
|
|
></van-field>
|
|
|
+ <van-field name="form.cooperate" label="业务范围">
|
|
|
+ <template #input>
|
|
|
+ <van-row :gutter="10">
|
|
|
+ <van-col span="8" v-for="(item) in cooperate_list">
|
|
|
+ <div :class="{btn_search_item:true,active: in_array(item,form.cooperate)}"
|
|
|
+ @click="selectAnimal(item)">
|
|
|
+ {{item}}
|
|
|
+ <van-icon v-if="in_array(item,form.cooperate)"
|
|
|
+ class="iconfont icon-gouxuan-youxiajiaogouxuan btn_search_icon text-blue"></van-icon>
|
|
|
+ </div>
|
|
|
+ </van-col>
|
|
|
+ </van-row>
|
|
|
+ </template>
|
|
|
+ </van-field>
|
|
|
<van-field
|
|
|
v-model="form.url"
|
|
|
type="text"
|
|
@@ -81,14 +100,43 @@
|
|
|
</van-button>
|
|
|
</div>
|
|
|
</van-form>
|
|
|
+<div class="contact" @click="showQrcode">
|
|
|
+ <van-icon name="chat-o" size="40"></van-icon>
|
|
|
+</div>
|
|
|
{/block}
|
|
|
{block name="script"}
|
|
|
<script>
|
|
|
function v_setup() {
|
|
|
let base = {};
|
|
|
|
|
|
+ base.cooperate_list = {$cooperate_list};
|
|
|
+ base.selectAnimal = (value) => {
|
|
|
+ if (base.in_array(value,base.form.cooperate)) {
|
|
|
+ base.removeByVal(base.form.cooperate,value);
|
|
|
+ } else {
|
|
|
+ base.form.cooperate.push(value);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ base.in_array = (search,array) => {
|
|
|
+ for(let i in array){
|
|
|
+ if(array[i] == search){
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return false;
|
|
|
+ };
|
|
|
+ base.removeByVal = (arrylist , val) => {
|
|
|
+ for(let i = 0; i < arrylist .length; i++) {
|
|
|
+ if(arrylist[i] == val) {
|
|
|
+ arrylist .splice(i, 1);
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
base.form = Vue.reactive({
|
|
|
images: [],
|
|
|
+ cooperate: [],
|
|
|
});
|
|
|
base.onBack = () => {
|
|
|
location.href = "{:url('human/index')}";
|
|
@@ -123,6 +171,12 @@
|
|
|
return true;
|
|
|
};
|
|
|
|
|
|
+ base.showQrcode = () => {
|
|
|
+ vant.showImagePreview([
|
|
|
+ '/static/mobile/images/wechat_qrcode.jpg'
|
|
|
+ ]);
|
|
|
+ };
|
|
|
+
|
|
|
return base;
|
|
|
}
|
|
|
</script>
|