linwu 5 ماه پیش
والد
کامیت
d1ecc865ad

+ 10 - 0
app/admin/view/human/institution_detail.html

@@ -41,6 +41,16 @@
                             {$info.wechat}
                         </div>
                     </div>
+                    <div class="layui-row mt10">
+                        <div class="layui-col-md3">
+                            希望合作的业务
+                        </div>
+                        <div class="layui-col-md9">
+                            {volist name="info.cooperate" id="vo"}
+                            <button type="button" class="layui-btn layui-btn-sm">{$vo}</button>
+                            {/volist}
+                        </div>
+                    </div>
                     <div class="layui-row mt10">
                         <div class="layui-col-md3">
                             机构介绍

+ 2 - 1
app/common/model/HumanInstitutionApplyModel.php

@@ -11,7 +11,8 @@ class HumanInstitutionApplyModel extends BaseModel
     protected $autoWriteTimestamp = true;
 
     protected $type = [
-        'images' => 'array',
+        'cooperate' => 'array',
+        'images'    => 'array',
     ];
 
     // 常量

+ 6 - 2
app/mobile/controller/Human.php

@@ -36,7 +36,9 @@ class Human extends MobileBaseController
     {
         $this->_formValidate();
 
-        return view();
+        return view('', [
+            'cooperate_list' => json_encode(HumanInstitutionModel::COOPERATE),
+        ]);
     }
 
     public function institutionFormPost()
@@ -57,6 +59,8 @@ class Human extends MobileBaseController
 
     public function enterpriseForm()
     {
+        $this->_formValidate();
+
         return view('', [
             'cooperate_list' => json_encode(HumanInstitutionModel::COOPERATE),
         ]);
@@ -210,7 +214,7 @@ class Human extends MobileBaseController
 
     public function center()
     {
-//        $this->_listValidate();
+        $this->_listValidate();
 
         return view();
     }

+ 1 - 0
app/mobile/view/human/describe.html

@@ -19,6 +19,7 @@
 </van-nav-bar>
 
 <img src="/static/mobile/images/human_describe.png" style="width:100%;display: block;">
+<img src="/static/mobile/images/human_process.png" style="width:100%;display: block;">
 {/block}
 {block name="script"}
 <script>

+ 10 - 0
app/mobile/view/human/enterprise_form.html

@@ -4,6 +4,7 @@
     .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"}
@@ -99,6 +100,9 @@
         </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>
@@ -167,6 +171,12 @@
             return true;
         };
 
+        base.showQrcode = () => {
+            vant.showImagePreview([
+                '/static/mobile/images/wechat_qrcode.jpg'
+            ]);
+        };
+
         return base;
     }
 </script>

+ 55 - 1
app/mobile/view/human/institution_form.html

@@ -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>