Explorar o código

'合作加盟'

chending1994 %!s(int64=4) %!d(string=hai) anos
pai
achega
1fa5364615

+ 1 - 1
src/api/apply.js

@@ -1,5 +1,5 @@
 // 线索提交
-const saveApply = '/CrmCustomer/addCustomerPool';
+const saveApply = 'CrmCustomer/addCustomerPool';
 
 export {
   saveApply

+ 6 - 5
src/config/index.config.js

@@ -2,17 +2,18 @@ const CONFIG = {
   // 开发环境配置
   development: {
     assetsPath: "/static", // 静态资源路径
-    baseUrl: "http://192.168.1.86:15555/", // 后台接口请求地址
-    // baseUrl: "https://app.zaojiao.net", // 后台接口请求地址
-    hostUrl: "https://api.zaojiao.net",
+    // baseUrl: "http://192.168.1.86:15555/", // 后台接口请求地址
+    // baseUrl: "http://192.168.1.64:8090/", // 后台接口请求地址
+    baseUrl: "https://agent-crm.luojigou.vip/crm-api/", // 后台接口请求地址
+    hostUrl: "https://luojigou.vip/exhibition/",
     websocketUrl: "", // websocket服务端地址
     weixinAppId: "", // 微信公众号appid
   },
   // 生产环境配置
   production: {
     assetsPath: "/static", // 静态资源路径
-    baseUrl: "https://api.zaojiao.net", // 后台接口请求地址
-    hostUrl: "https://api.zaojiao.net",
+    baseUrl: "https://agent-crm.luojigou.vip/crm-api/", // 后台接口请求地址
+    hostUrl: "https://luojigou.vip/exhibition/",
     websocketUrl: "", // websocket服务端地址
     weixinAppId: "", // 微信公众号appid
   },

+ 72 - 6
src/pages/contact/index.vue

@@ -59,6 +59,7 @@
           <view class="submit-btn">
             <image src="/static/img/contact/submit.png" mode="aspectFill" />
             <button class="confirm-btn" :disabled="disabled" form-type="submit"></button>
+            <button form-type="reset" ref="resrtBtn" style="display:none;">取消</button>
           </view>
         </form>
       </view>
@@ -80,6 +81,7 @@
 
 <script>
 import pickRegions from '@/components/pick-regions/pick-regions.vue';
+import { saveApply } from '@/api/apply';
 
 export default {
   data() {
@@ -87,13 +89,14 @@ export default {
       disabled:false,
       form: {
         customer_name: '',
-        mobile: ''
+        mobile: '',
+        type: 0
       },
       region:[],
       defaultRegionCode: '110101',
       defaultRegion:['北京市','市辖区','东城区'],
       typeIndex: -1,
-      typeList: ["教学渠道代理", "思维芯游戏教室渠道代理", "家庭版渠道代理", "HOME&PLUS渠道代理", "探索小镇渠道代理(TOWN)", "合作园所(北京地区园所)"],
+      typeList: ["教学渠道代理", "思维芯游戏教室渠道代理", "家庭版渠道代理", "HOME&PLUS渠道代理", "探索小镇渠道代理(TOWN)", "合作园所(北京地区园所)"],
       reqBody: {}
     }
   },
@@ -127,11 +130,74 @@ export default {
   methods: {
     formSubmit(e) {
       console.log(e.detail.value);
+      console.log(this.typeIndex);
+      // {
+      //   "entity": {
+      //     "customer_name": "李哈哈测试22",
+      //     "mobile": "13120373714",
+      //     "address": "xxxxx"
+      //   },
+      //   "field": [{
+      //     "fieldId": 135,
+      //     "fieldName": "代理商类型",
+      //     "value": "教学渠道代理",
+      //   }]
+      // }
+      let formData = e.detail.value;
       let rules = [
-        { name: 'parentName', checkType: 'notnull', checkRule: '', errorMsg: '请填写家长姓名' },
-        { name: 'parentPhone', checkType: 'phoneno', checkRule: '', errorMsg: '联系方式不正确'},
-        // { name: 'address', checkType: 'notnull', checkRule: '', errorMsg: '请填写详细地址'},
+        { name: 'customerName', checkType: 'notnull', checkRule: '', errorMsg: '请填写姓名' },
+        { name: 'customerName', checkType: 'string', checkRule: '2,8', errorMsg: '请输入2-8位姓名' },
+        { name: 'type', checkType: 'in', checkRule: '0, 1, 2, 3, 4, 5', errorMsg: '意向不能为空' },
+        { name: 'mobile', checkType: 'notnull', checkRule: '', errorMsg: '请填写联系方式'},
+        { name: 'mobile', checkType: 'phoneno', checkRule: '', errorMsg: '联系方式不正确'},
       ]
+      let regionRule = [
+        { name: 'regionCode', checkType: 'notnull', checkRule: '', errorMsg: '请选择所在地区'},
+      ];
+      this.reqBody['regionCode'] = this.region;
+      let checkRes = this.$mGraceChecker.check(formData, rules);
+      if (!checkRes) {
+        // this.disabled = true;
+        this.$mHelper.toast(this.$mGraceChecker.error);
+        return false;
+      }
+      let regionRes = this.$mGraceChecker.check(this.reqBody, regionRule)
+      if (!regionRes) {
+        this.$mHelper.toast(this.$mGraceChecker.error);
+        return false;
+      }
+      if (this.typeIndex == -1) {
+        this.$mHelper.toast('请选择您的意向');
+        return false;
+      }
+
+      let entity = {
+        customer_name: formData.customerName,
+        mobile: formData.mobile,
+        address: this.region.map(item=>item.name).join(',')
+      };
+
+      let field = [{
+        fieldId: 135,
+        name: "代理商类型",
+        value: this.typeList[this.typeIndex]
+      }];
+
+      if (checkRes && regionRes && this.typeIndex != -1) {
+        this.$http.post(saveApply, {
+          entity,
+          field
+        }).then(res=> {
+          this.$mHelper.toast('提交成功!我们会在在第一时间内联系您');
+          this.$refs.resrtBtn.$dispatch('Form', 'uni-form-reset', {
+            type: 'reset'
+          })
+          this.typeIndex = -1;
+          this.region = []
+        }).catch(err => {
+          console.log('err')
+        })
+      }
     },
     typeChange(e) {
       const index = e.detail.value;
@@ -148,7 +214,7 @@ export default {
 
 <style lang="scss">
 .contact {
-  padding: 86upx 0 44upx;
+  padding: 86upx 0 120upx;
   background: url('@/static/img/contact/bg.png') no-repeat #01A2E8;
   background-size: cover;
   .title {

+ 77 - 15
src/pages/join/component/hall.vue

@@ -1,6 +1,8 @@
 <template>
-  <view class='mba'>
-    <image class="image" src="/static/img/omo/mba_01.png" mode="aspectFill"/>
+  <view class="communication">
+    <view class="item" :style="{height: heightFarmat(item.height)}" v-for="(item, index) in imgList" :key="index">
+      <image :src="item.imgUrl" mode="aspectFill" />
+    </view>
     <contact-btn></contact-btn>
   </view>
 </template>
@@ -10,26 +12,86 @@ import ContactBtn from '@/components/contact-btn/index';
 
 export default {
   data() {
-    return {}
+    return {
+      imgList: [
+        {
+          imgUrl: require('@/static/img/join/hall_01.png'),
+          height: 402
+        },
+        {
+          imgUrl: require('@/static/img/join/hall_02.png'),
+          height: 402
+        },
+        {
+          imgUrl: require('@/static/img/join/hall_03.png'),
+          height: 444
+        },
+        {
+          imgUrl: require('@/static/img/join/hall_04.png'),
+          height: 638
+        },
+        {
+          imgUrl: require('@/static/img/join/hall_05.png'),
+          height: 672
+        }
+      ]
+    }
+  },
+  computed: {
+    heightFarmat(val) {
+      return function(val) {
+        return uni.upx2px(val) + 'px';
+      }
+    }
   },
   components: {
     ContactBtn
   },
-  onLoad() {},
-
-  onShow() {},
-
-  methods: {}
-
+  methods: {
+    navTo(route) {
+      this.$mRouter.push({
+        route
+      })
+    }
+  }
 }
 </script>
 
-<style lang="scss" scoped>
-.mba {
-  padding-bottom: 112upx;
-  .image {
-    width: 100%;
-    height: 1664upx;
+<style lang="scss">
+.communication {
+  padding-bottom: 232upx;
+  .item {
+    image {
+      width: 100%;
+      height: 100%;
+      vertical-align: middle;
+    }
+  }
+  .submit {
+    position: fixed;
+    left: 50%;
+    transform: translateX(-50%);
+    bottom: 104upx;
+    width: 532upx;
+    height: 80upx;
+    background: #FFFFFF;
+    border-radius: 40upx;
+    border: 2upx solid #333333;
+    font-size: 32upx;
+    font-family: PingFangSC-Medium, PingFang SC;
+    font-weight: 500;
+    color: #333333;
+    line-height: 32upx;
+    em {
+      margin-left: 8px;
+      width: 0;
+      height: 0;
+      border-top: 8upx solid transparent;
+      border-right: 9upx solid transparent;
+      border-bottom: 8upx solid transparent;
+      border-left: 9upx solid transparent;
+      border-left-color: #333333 ;
+    }
   }
 }
 </style>

+ 5 - 5
src/pages/join/detail.vue

@@ -35,15 +35,15 @@ export default {
 
   onLoad(options) {
     this.type = options.type
-    let title = '思维能力挑战赛';
+    let title = '逻辑狗思维体育馆';
     if (this.type == 1) {
-      title = '思维能力挑战赛'
+      title = '逻辑狗思维体育馆'
     } else if (this.type == 2) {
-      title = '培训交流'
+      title = '思维芯教室'
     } else if (this.type == 3) {
-      title = '逻辑狗伴我成长'
+      title = '逻辑狗探索小镇'
     } else {
-      title = '思维能力挑战赛';
+      title = '逻辑狗思维体育馆';
     }
     uni.setNavigationBarTitle({
       title: title

BIN=BIN
src/static/img/join/hall_01.png


BIN=BIN
src/static/img/join/hall_02.png


BIN=BIN
src/static/img/join/hall_03.png


BIN=BIN
src/static/img/join/hall_04.png


BIN=BIN
src/static/img/join/hall_05.png


+ 3 - 2
src/utils/request/index.js

@@ -140,8 +140,9 @@ http.interceptor.response(
 				mHelper.toast(response.data.msg);
 				return Promise.reject(response.data.msg);
 			default:
-				mHelper.toast(response.data.msg);
-				return Promise.reject(response.data.msg);
+				return response.data;
+				// mHelper.toast(response.data.msg);
+				// return Promise.reject(response.data.msg);
 		}
 	},
 	error => {