guhongwei 4 years ago
parent
commit
2b678bb830

+ 10 - 1
pages/about/about.js

@@ -4,7 +4,7 @@ const app = getApp()
 
 Page({
   data: {
-
+    companyInfo: {}
   },
   //事件处理函数
   bindViewTap: function () {
@@ -13,5 +13,14 @@ Page({
     })
   },
   onLoad: function () {
+    // 查询信息
+    wx.request({
+      url: app.globalData.publicUrl + '/api/htyd/config/about',
+      method: "get",
+      data: {},
+      success: (res) => {
+        this.setData({ companyInfo: res.data.data })
+      }
+    })
   },
 })

+ 9 - 1
pages/about/about.wxml

@@ -3,6 +3,14 @@
     关于我们
   </view>
   <view class="two">
-    内容
+    <view class="company">
+      {{companyInfo.setting.company}}
+    </view>
+    <view class="oneCon">
+      {{companyInfo.setting.oneCon}}
+    </view>
+    <view class="oneCon">
+      {{companyInfo.setting.twoCon}}
+    </view>
   </view>
 </view>

+ 23 - 2
pages/about/about.wxss

@@ -1,11 +1,13 @@
 .main {
   float: left;
   width: 100%;
+  height: 100%;
+  background-color: #f6f6f6;
 }
 
 .main .one {
   position: fixed;
-  z-index: 9999;
+  z-index: 999;
   width: 100%;
   height: 80rpx;
   line-height: 80rpx;
@@ -17,6 +19,25 @@
 .main .two {
   position: absolute;
   top: 80rpx;
+  width: 94%;
+  padding: 0 20rpx;
+}
+
+.two .company {
+  float: left;
   width: 100%;
-  height: 15000px;
+  padding: 30rpx 0;
+  font-size: 45rpx;
+  text-align: center;
+  font-weight: bold;
+}
+
+.two .oneCon {
+  float: left;
+  width: 100%;
+  font-size: 35rpx;
+  margin: 0 0 20rpx 0;
+  text-indent: 10rpx;
+  line-height: 60rpx;
+
 }

+ 11 - 17
pages/car/car.js

@@ -4,23 +4,7 @@ const app = getApp()
 
 Page({
   data: {
-    bannerList: [
-      { pic: '/pages/images/car/car1.jpg' },
-      { pic: '/pages/images/car/car2.jpg' },
-      { pic: '/pages/images/car/car3.jpg' },
-      { pic: '/pages/images/car/car4.jpg' },
-      { pic: '/pages/images/car/car5.jpg' },
-      { pic: '/pages/images/car/car6.jpg' },
-      { pic: '/pages/images/car/car7.jpg' },
-      { pic: '/pages/images/car/car8.jpg' },
-      { pic: '/pages/images/car/car9.jpg' },
-      { pic: '/pages/images/car/car10.jpg' },
-    ],
-    indicatorDots: true,
-    vertical: false,
-    autoplay: true,
-    interval: 2000,
-    duration: 500,
+    carInfo: {},
     // tab
     active: 0,
     // 是否可以领取积分
@@ -35,5 +19,15 @@ Page({
     })
   },
   onLoad: function () {
+    // 查询信息
+    wx.request({
+      url: app.globalData.publicUrl + '/api/htyd/config/car',
+      method: "get",
+      data: {},
+      success: (res) => {
+        console.log(res.data.data);
+        this.setData({ carInfo: res.data.data })
+      }
+    })
   },
 })

+ 10 - 12
pages/car/car.wxml

@@ -12,9 +12,7 @@
           </swiper-item>
         </block>
       </swiper> -->
-      <video
-        src="https://vdse.bdstatic.com//7f3bf98bc7e22e8ccb10d3328b50f744.mp4?authorization=bce-auth-v1%2F40f207e648424f47b2e3dfbb1014b1a5%2F2020-12-28T03%3A56%3A01Z%2F-1%2Fhost%2Fc6c3ede6fba4edf3cec2724df902c1b68d7be89069dc901493436b714b7b532c"
-        controls autoplay loop show-mute-btn></video>
+      <video src="{{carInfo.setting.videopath}}" controls autoplay loop show-mute-btn></video>
     </view>
     <view class="twoTxt">
       <van-tabs active="{{ active }}">
@@ -22,27 +20,27 @@
           <view class="carBrief">
             <view>
               <text>官方报价:</text>
-              <text>30.98-53.98万</text>
+              <text>{{carInfo.setting.price}}</text>
             </view>
             <view>
               <text>排量:</text>
-              <text>2.0T 3.0T</text>
+              <text>{{carInfo.setting.disp}}</text>
             </view>
             <view>
               <text>级别:</text>
-              <text>中大型车</text>
+              <text>{{carInfo.setting.carlevel}}</text>
             </view>
             <view>
               <text>变速箱:</text>
-              <text>双离合</text>
+              <text>{{carInfo.setting.case}}</text>
             </view>
             <view>
               <text>车身类型:</text>
-              <text>三厢车</text>
+              <text>{{carInfo.setting.cartype}}</text>
             </view>
             <view>
               <text>车辆具体信息:</text>
-              <text>C+超级豪华跑车;ALCANTARA车顶全景天窗;SACC高级巡航心痛3.0T;V6机械增压空气悬架系统圈画暗纹内饰独创香氛,馥兴之韵;L2.5级智能驾驶升级版智能人机交互奇技术;9H笼式防撞车身;</text>
+              <text>{{carInfo.setting.content}}</text>
             </view>
           </view>
         </van-tab>
@@ -50,15 +48,15 @@
           <view class="carGrade">
             <view>
               <text>本身等级:</text>
-              <text>二星经理</text>
+              <text>{{carInfo.setting.userlevel}}</text>
             </view>
             <view>
               <text>团队条件:</text>
-              <text>团队中有五人与自身等级平等</text>
+              <text>{{carInfo.setting.team}}</text>
             </view>
             <view>
               <text>奖励积分:</text>
-              <text>131419</text>
+              <text>{{carInfo.setting.integral}}</text>
             </view>
             <view class="btn">
               <button type="warn" disabled="{{disabled}}" bindtap="receiveBtn">领取积分</button>

+ 34 - 3
pages/home/home.js

@@ -5,7 +5,8 @@ const app = getApp()
 Page({
   data: {
     // 个人信息
-    videoUrl: 'https://vd3.bdstatic.com/mda-kar9n2ip1u508ewq/hd/mda-kar9n2ip1u508ewq.mp4?pd=20',
+    // videoUrl: 'https://vd3.bdstatic.com/mda-kar9n2ip1u508ewq/hd/mda-kar9n2ip1u508ewq.mp4?pd=20',
+    videoUrl: '',
     userInfo: {},
     yesterday: 0,
     week: 0,
@@ -101,7 +102,24 @@ Page({
     })
   },
   onLoad: function () {
-    let data = app.globalData.userInfo;
+    // let data = app.globalData.userInfo;
+    let data = {
+      avatarUrl: "https://thirdwx.qlogo.cn/mmopen/vi_32/ibzXIKnSribia9qZzSkEokEVfLuxOUEJ8xPAMibU29vB3KS8Pic5fUwUricWsXAEfL8zibZSGjUvPUm6PibxiadY8RAdv1w/132",
+      car_show: false,
+      city: "220100",
+      create_time: "2021-01-06 16:31:30",
+      id: "5ff575b0a3f2771eb4d03114",
+      id_card: "22010319950601161x",
+      level: 2,
+      mobile: "13089419810",
+      name: "刘睿峰",
+      points: 5500,
+      province: "220000",
+      set: "5ff6710f7fa08b4500e61e5f",
+      stockholder: false,
+      wxaccount: "lrf402788946",
+      _id: "5ff575b0a3f2771eb4d03114",
+    }
     console.log(data);
     this.setData({ userInfo: data })
     wx.getUserInfo({
@@ -118,6 +136,7 @@ Page({
       }
     })
     this.indexCount();
+    this.searchPicker();
   },
 
   /**
@@ -126,12 +145,24 @@ Page({
    */
   indexCount() {
     wx.request({
-      url: `${app.globalData.publicUrl}/api/htyd/count/index?mobile=${app.globalData.userInfo.mobile}`,
+      url: `${app.globalData.publicUrl}/api/htyd/count/index?mobile=${this.data.userInfo.mobile}`,
       method: 'get',
       success: res => {
         const { data } = res.data
         this.setData({ ...data })
       }
     })
+  },
+  // 轮播图
+  searchPicker: function () {
+    wx.request({
+      url: app.globalData.publicUrl + '/api/htyd/util',
+      method: "post",
+      data: {},
+      success: (res) => {
+        console.log(res.data.data);
+        // this.setData({ videoUrl: res.data.data[0].url })
+      }
+    })
   }
 })

+ 10 - 7
pages/integral/integral.wxss

@@ -1,6 +1,9 @@
 .main {
   float: left;
   width: 100%;
+  height: 100%;
+  /* background-image: linear-gradient(#ff0000, #ffffff); */
+  background-color: #f9fafc;
 }
 
 .main .one {
@@ -18,8 +21,6 @@
   position: absolute;
   top: 80rpx;
   width: 100%;
-  height: 15000px;
-  background-color: #f5f5f5;
 }
 
 .main .two .integral {
@@ -41,13 +42,13 @@
   border-radius: 50%;
   position: relative;
   float: left;
+  text-align: center;
+  line-height: 110rpx;
 }
 
 .main .two .integral .list .status .text {
   color: #ffffff;
-  position: absolute;
-  top: 32rpx;
-  left: 9rpx;
+  font-weight: bold;
   font-size: 30rpx;
 }
 
@@ -78,11 +79,13 @@
   margin: 20rpx 0 0 0;
   margin-left: 25rpx;
 }
-.main .two .integral .list .right1{
+
+.main .two .integral .list .right1 {
   color: #ff0000;
   text-align: right;
 }
-.main .two .integral .list .right1 .time{
+
+.main .two .integral .list .right1 .time {
   margin: 20rpx 0 0 0;
   color: #666;
   font-size: 30rpx;

+ 10 - 1
pages/shareholder/shareholder.js

@@ -4,7 +4,7 @@ const app = getApp()
 
 Page({
   data: {
-
+    info: {}
   },
   //事件处理函数
   bindViewTap: function () {
@@ -13,5 +13,14 @@ Page({
     })
   },
   onLoad: function () {
+    // 查询信息
+    wx.request({
+      url: app.globalData.publicUrl + '/api/htyd/config/sh',
+      method: "get",
+      data: {},
+      success: (res) => {
+        this.setData({ info: res.data.data })
+      }
+    })
   },
 })

+ 3 - 3
pages/shareholder/shareholder.wxml

@@ -9,16 +9,16 @@
     <view class="info">
       <view class="list">
         <text>本身等级</text>
-        <text>四星经理</text>
+        <text>{{info.setting.level}}</text>
       </view>
       <view class="list">
         <text>团队订单</text>
-        <text>9999</text>
+        <text>{{info.setting.order}}</text>
       </view>
       <view class="listCon">
         <text class="title">奖励详细</text>
         <view>
-          当您达成以上两个条件,公司将会把您升级为股东,并从第10000单开始,公司会拿出 <text>十元</text>作为股东分红!
+          {{info.setting.content}}
         </view>
       </view>
     </view>

+ 41 - 54
pages/team/team.js

@@ -169,62 +169,49 @@ moment.locale('en', {
       this.setData({ form: {} });
     },
     onLoad: function () {
-      let data = {
-        avatarUrl: "https://thirdwx.qlogo.cn/mmopen/vi_32/ibzXIKnSribia9qZzSkEokEVfLuxOUEJ8xPAMibU29vB3KS8Pic5fUwUricWsXAEfL8zibZSGjUvPUm6PibxiadY8RAdv1w/132",
-        car_show: false,
-        city: "220100",
-        create_time: "2021-01-06 16:31:30",
-        id: "5ff575b0a3f2771eb4d03114",
-        id_card: "22010319950601161x",
-        level: 1,
-        mobile: "13089419810",
-        name: "刘睿峰",
-        points: 4100,
-        province: "220000",
-        set: "168",
-        stockholder: false,
-        wxaccount: "lrf402788946",
-        _id: "5ff575b0a3f2771eb4d03114",
-      }
-      this.setData({ userInfo: data })
-      // 查询省份
-      // 查询省
-      wx.request({
-        url: app.globalData.publicUrl + '/api/htyd/xzqh',
-        method: "get",
-        data: {},
-        success: (res) => {
-          if (res.data.errcode == '0') {
-            this.setData({ provinceList: res.data.data })
-          } else {
-            wx.showToast({
-              title: '查询失败',
-              icon: 'error',
-              duration: 2000
-            })
+      let data = app.globalData.userInfo;
+      if (data) {
+        this.setData({ userInfo: data })
+        // 查询省份
+        // 查询省
+        wx.request({
+          url: app.globalData.publicUrl + '/api/htyd/xzqh',
+          method: "get",
+          data: {},
+          success: (res) => {
+            if (res.data.errcode == '0') {
+              this.setData({ provinceList: res.data.data })
+            } else {
+              wx.showToast({
+                title: '查询失败',
+                icon: 'error',
+                duration: 2000
+              })
+            }
           }
-        }
-      })
-      // 查询团队,全部
-      wx.request({
-        url: app.globalData.publicUrl + '/api/htyd/card/group',
-        method: "get",
-        data: { r_mobile: this.data.userInfo.mobile },
-        success: (res) => {
-          if (res.data.errcode == '0') {
-            let data = res.data.data;
-            for (const val of data) {
-              val.danName = val.name.split("")[0]
+        })
+        // 查询团队,全部
+        wx.request({
+          url: app.globalData.publicUrl + '/api/htyd/card/group',
+          method: "get",
+          data: { r_mobile: this.data.userInfo.mobile },
+          success: (res) => {
+            if (res.data.errcode == '0') {
+              let data = res.data.data;
+              for (const val of data) {
+                val.danName = val.name.split("")[0]
+              }
+              this.setData({ list: data })
+            } else {
+              wx.showToast({
+                title: '查询失败',
+                icon: 'error',
+                duration: 2000
+              })
             }
-            this.setData({ list: data })
-          } else {
-            wx.showToast({
-              title: '查询失败',
-              icon: 'error',
-              duration: 2000
-            })
           }
-        }
-      })
+        })
+      }
+
     },
   })