Browse Source

update code

zhuliu 1 năm trước cách đây
mục cha
commit
f6c83a0a00
61 tập tin đã thay đổi với 1414 bổ sung77 xóa
  1. 2 6
      api/category.js
  2. 3 1
      api/index.js
  3. 8 0
      api/product.js
  4. 1 1
      api/search.js
  5. 13 4
      app.json
  6. 8 0
      app.wxss
  7. 29 0
      myComponents/card/card.js
  8. 6 0
      myComponents/card/card.json
  9. 19 0
      myComponents/card/card.wxml
  10. 24 0
      myComponents/card/card.wxss
  11. 1 1
      myComponents/myInput/myInput.wxss
  12. 9 1
      myComponents/product/product.js
  13. 1 1
      myComponents/product/product.json
  14. 10 3
      myComponents/product/product.wxml
  15. 13 0
      myComponents/product/product.wxss
  16. 66 0
      pages/form/appeal/appeal.js
  17. 3 0
      pages/form/appeal/appeal.json
  18. 2 0
      pages/form/appeal/appeal.wxml
  19. 1 0
      pages/form/appeal/appeal.wxss
  20. 66 0
      pages/form/application/application.js
  21. 3 0
      pages/form/application/application.json
  22. 2 0
      pages/form/application/application.wxml
  23. 1 0
      pages/form/application/application.wxss
  24. 66 0
      pages/form/rightsProtection/rightsProtection.js
  25. 3 0
      pages/form/rightsProtection/rightsProtection.json
  26. 2 0
      pages/form/rightsProtection/rightsProtection.wxml
  27. 1 0
      pages/form/rightsProtection/rightsProtection.wxss
  28. 66 0
      pages/form/riskAssessment/riskAssessment.js
  29. 3 0
      pages/form/riskAssessment/riskAssessment.json
  30. 2 0
      pages/form/riskAssessment/riskAssessment.wxml
  31. 1 0
      pages/form/riskAssessment/riskAssessment.wxss
  32. 145 0
      pages/hotProduct/hotProduct.js
  33. 5 0
      pages/hotProduct/hotProduct.json
  34. 24 0
      pages/hotProduct/hotProduct.wxml
  35. 35 0
      pages/hotProduct/hotProduct.wxss
  36. 1 0
      pages/index/index.wxml
  37. 15 6
      pages/login/login.js
  38. 1 0
      pages/login/login.wxml
  39. 39 0
      pages/mine/mine.js
  40. 5 16
      pages/mine/mine.wxml
  41. 3 1
      pages/mine/mine.wxss
  42. 99 0
      pages/monitor/monitor.js
  43. 7 0
      pages/monitor/monitor.json
  44. 11 0
      pages/monitor/monitor.wxml
  45. 22 0
      pages/monitor/monitor.wxss
  46. 133 0
      pages/myFollow/myFollow.js
  47. 9 0
      pages/myFollow/myFollow.json
  48. 19 0
      pages/myFollow/myFollow.wxml
  49. 38 0
      pages/myFollow/myFollow.wxss
  50. 115 0
      pages/myWork/myWork.js
  51. 7 0
      pages/myWork/myWork.json
  52. 27 0
      pages/myWork/myWork.wxml
  53. 22 0
      pages/myWork/myWork.wxss
  54. 0 22
      pages/riskAssessment/riskAssessment.js
  55. 1 0
      pages/riskAssessment/riskAssessment.wxml
  56. 115 0
      pages/searchRecords/searchRecords.js
  57. 7 0
      pages/searchRecords/searchRecords.json
  58. 34 0
      pages/searchRecords/searchRecords.wxml
  59. 22 0
      pages/searchRecords/searchRecords.wxss
  60. BIN
      static/image/empty.gif
  61. 18 14
      utils/request.js

+ 2 - 6
api/category.js

@@ -3,14 +3,10 @@ const request = require('../utils/request')
 module.exports={ 
   //查询产品类别
 	queryCategory:(data)=>{
-		return request.post('/xiaoshi-weixinback/productCategory/queryCategory')
+		return request.post('/xiaoshi-weixinback/productCategory/queryCategory',data)
   },
   //关注产品类别
   queryCategory:(data)=>{
-		return request.post('/xiaoshi-weixinback/productCategory/concernCategory')
+		return request.post('/xiaoshi-weixinback/productCategory/concernCategory',data)
   },
-  //查询爆款产品
-  queryHotProduct:(data)=>{
-		return request.post('/xiaoshi-weixinback/product/queryHotProduct')
-	},
  }

+ 3 - 1
api/index.js

@@ -1,9 +1,11 @@
 const search = require('./search')
 const login = require('./login')
 const category = require('./category')
+const product = require('./product')
 
 module.exports={ 
   ...search,
   ...login,
-  ...category
+  ...category,
+  ...product
 }

+ 8 - 0
api/product.js

@@ -0,0 +1,8 @@
+const request = require('../utils/request')
+
+module.exports={ 
+  //查询爆款产品
+  queryHotProduct:(data)=>{
+		return request.post('/xiaoshi-weixinback/product/queryHotProduct',data)
+	},
+ }

+ 1 - 1
api/search.js

@@ -2,6 +2,6 @@ const request = require('../utils/request')
 
 module.exports={ 
 	search:(data)=>{
-		return request.get('/permission/api/admin/verifyCode')
+		return request.get('/permission/api/admin/verifyCode',data)
 	}
  }

+ 13 - 4
app.json

@@ -5,9 +5,17 @@
     "pages/mine/mine",
     "pages/login/login",
     "pages/riskAssessment/riskAssessment",
-    "pages/register/register"
+    "pages/register/register",
+    "pages/hotProduct/hotProduct",
+    "pages/myFollow/myFollow",
+    "pages/searchRecords/searchRecords",
+    "pages/myWork/myWork",
+    "pages/monitor/monitor",
+    "pages/form/application/application",
+    "pages/form/rightsProtection/rightsProtection",
+    "pages/form/appeal/appeal",
+    "pages/form/riskAssessment/riskAssessment"
   ],
- 
   "tabBar": {
     "list": [
       {
@@ -17,7 +25,7 @@
         "selectedIconPath": "/static/image/主页-click.png"
       },
       {
-        "pagePath": "pages/logs/logs",
+        "pagePath": "pages/hotProduct/hotProduct",
         "text": "爆品专利数据库",
         "iconPath": "/static/image/爆品.png",
         "selectedIconPath": "/static/image/爆品-click.png"
@@ -37,7 +45,8 @@
   },
   "usingComponents": {
     "i-button": "/miniprogram_npm/@vant/weapp/button",
-    "myInput": "/myComponents/myInput/myInput"
+    "myInput": "/myComponents/myInput/myInput",
+    "van-notify": "/miniprogram_npm/@vant/weapp/notify/index"
   },
   "componentFramework": "glass-easel",
   "sitemapLocation": "sitemap.json",

+ 8 - 0
app.wxss

@@ -26,3 +26,11 @@ page {
 button[type=primary]{
   background-color: var(--themeColor);
 }
+
+.loadData{
+  width: 100%;
+  color: #969799;
+  background-color: #f7f8fa;
+  text-align: center;
+  line-height:100rpx;
+}

+ 29 - 0
myComponents/card/card.js

@@ -0,0 +1,29 @@
+// myComponents/card/card.js
+Component({
+  options: {
+    multipleSlots: true // 在组件定义时的选项中启用多slot支持
+  },
+  /**
+   * 组件的属性列表
+   */
+  properties: {
+    edit:{
+      type:Boolean,
+      value:true
+    }
+  },
+
+  /**
+   * 组件的初始数据
+   */
+  data: {
+
+  },
+
+  /**
+   * 组件的方法列表
+   */
+  methods: {
+
+  }
+})

+ 6 - 0
myComponents/card/card.json

@@ -0,0 +1,6 @@
+{
+  "component": true,
+  "usingComponents": {
+    "van-icon": "/miniprogram_npm/@vant/weapp/icon/index"
+  }
+}

+ 19 - 0
myComponents/card/card.wxml

@@ -0,0 +1,19 @@
+<!--myComponents/card/card.wxml-->
+<view class="myCard">
+  <view class="head">
+    <view class="head_left">
+      <slot name="head_left"></slot>
+    </view>
+    <view class="head_right">
+      <view>
+        <slot name="head_right"></slot>
+      </view>
+      <view wx:if="{{edit}}">
+        <van-icon name="ellipsis" />
+      </view>
+    </view>
+  </view>
+  <view class="body">
+    <slot></slot>
+  </view>
+</view>

+ 24 - 0
myComponents/card/card.wxss

@@ -0,0 +1,24 @@
+/* myComponents/card/card.wxss */
+.head{
+  width: 100%;
+  border-radius: 15rpx;
+  border: 1rpx solid var(--themeColor);
+  --padding:15rpx;
+}
+.head{
+  border-bottom: 1rpx solid var(--themeColor);
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+}
+.head_right{
+  display: flex;
+  align-items: center;
+  padding-right: var(--padding);
+}
+.head_left{
+  padding-left: var(--padding);
+}
+.body{
+  padding: var(--padding);
+}

+ 1 - 1
myComponents/myInput/myInput.wxss

@@ -25,7 +25,7 @@ page{
   position: absolute;
   right:0rpx;
   top: 0rpx;
-  z-index: 9999;
+  z-index: 1;
 }
 
 .input_type:empty + .default {

+ 9 - 1
myComponents/product/product.js

@@ -10,8 +10,12 @@ Component({
       type:Array,
       value:[],
       observers:function(val){
-        console.log(val)
+        // console.log(val)
       }
+    },
+    total:{
+      type:Number,
+      value:null
     }
   },
 
@@ -60,6 +64,10 @@ Component({
     //监控
     control(e){
       var index = e.currentTarget.dataset.index
+    },
+    //加载更多
+    loadMore(){
+      this.triggerEvent('loadMore')
     }
   },
    /**  

+ 1 - 1
myComponents/product/product.json

@@ -1,6 +1,6 @@
 {
   "component": true,
   "usingComponents": {
-
+    "van-empty":"/miniprogram_npm/@vant/weapp/empty"
   }
 }

+ 10 - 3
myComponents/product/product.wxml

@@ -2,14 +2,17 @@
 <view class="product_content">
   <view class="product_item" wx:for="{{tableData}}" wx:for-index="index" wx:key="index">
     <swiper class="swiper" autoplay="{{true}}" interval="{{3000}}"  duration="{{500}}" indicator-dots="{{false}}">  
-      <block wx:for="{{item.systemFileList}}" wx:for-item="img" wx:key="*this">  
-        <swiper-item>  
+      <block wx:if="{{item.systemFileList.length>0}}">  
+        <swiper-item wx:for="{{item.systemFileList}}" wx:for-item="img" wx:key="*this">  
           <image src="{{imgHttp+img.guid}}" class="slide-image" data-current="{{img}}" data-imgList="{{item.systemFileList}}" bindtap="previewImage"/>  
         </swiper-item>  
       </block>  
+      <swiper-item wx:else>
+        <image  class="slide-image" src="/static/image/empty.gif" mode=""/>
+      </swiper-item>
     </swiper>
     <view class="flex">
-      <view>
+      <view class="title">
         {{index + 1}}.{{item.name}}
       </view>
       <view class="icon">
@@ -38,4 +41,8 @@
     </view>
     
   </view>
+  <view class="foot" wx:if="{{total && tableData.length>0}}">
+    <view wx:if="{{total>tableData.length}}" bind:tap="loadMore">加载更多</view>
+    <view wx:else>没有更多了</view>
+  </view>
 </view>

+ 13 - 0
myComponents/product/product.wxss

@@ -25,6 +25,12 @@
   margin: 10rpx 2.5%;
   position: relative;
 }
+.title{
+  font-size: 35rpx;
+  white-space: nowrap; /* 防止文本换行 */  
+  overflow: hidden; /* 隐藏超出容器的文本 */  
+  text-overflow: ellipsis; /* 显示省略号来表示文本被截断 */ 
+}
 .product_operate{
   background-color: rgb(230 230 230);
   width: 100%;
@@ -64,4 +70,11 @@
 }
 .operate_icon{
   margin-bottom: 10rpx;
+}
+.foot{
+  width: 100%;
+  color: #969799;
+  background-color: #f7f8fa;
+  text-align: center;
+  line-height:100rpx;
 }

+ 66 - 0
pages/form/appeal/appeal.js

@@ -0,0 +1,66 @@
+// pages/form/appeal/appeal.js
+Page({
+
+  /**
+   * 页面的初始数据
+   */
+  data: {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad(options) {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload() {
+
+  },
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh() {
+
+  },
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom() {
+
+  },
+
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage() {
+
+  }
+})

+ 3 - 0
pages/form/appeal/appeal.json

@@ -0,0 +1,3 @@
+{
+  "usingComponents": {}
+}

+ 2 - 0
pages/form/appeal/appeal.wxml

@@ -0,0 +1,2 @@
+<!--pages/form/appeal/appeal.wxml 申诉-->
+<text>pages/form/appeal/appeal.wxml</text>

+ 1 - 0
pages/form/appeal/appeal.wxss

@@ -0,0 +1 @@
+/* pages/form/appeal/appeal.wxss */

+ 66 - 0
pages/form/application/application.js

@@ -0,0 +1,66 @@
+// pages/form/application/application.js
+Page({
+
+  /**
+   * 页面的初始数据
+   */
+  data: {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad(options) {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload() {
+
+  },
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh() {
+
+  },
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom() {
+
+  },
+
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage() {
+
+  }
+})

+ 3 - 0
pages/form/application/application.json

@@ -0,0 +1,3 @@
+{
+  "usingComponents": {}
+}

+ 2 - 0
pages/form/application/application.wxml

@@ -0,0 +1,2 @@
+<!--pages/form/application/application.wxml 申请-->
+<text>pages/form/application/application.wxml</text>

+ 1 - 0
pages/form/application/application.wxss

@@ -0,0 +1 @@
+/* pages/form/application/application.wxss */

+ 66 - 0
pages/form/rightsProtection/rightsProtection.js

@@ -0,0 +1,66 @@
+// pages/form/rightsProtection/rightsProtection.js
+Page({
+
+  /**
+   * 页面的初始数据
+   */
+  data: {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad(options) {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload() {
+
+  },
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh() {
+
+  },
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom() {
+
+  },
+
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage() {
+
+  }
+})

+ 3 - 0
pages/form/rightsProtection/rightsProtection.json

@@ -0,0 +1,3 @@
+{
+  "usingComponents": {}
+}

+ 2 - 0
pages/form/rightsProtection/rightsProtection.wxml

@@ -0,0 +1,2 @@
+<!--pages/form/rightsProtection/rightsProtection.wxml 维权-->
+<text>pages/form/rightsProtection/rightsProtection.wxml</text>

+ 1 - 0
pages/form/rightsProtection/rightsProtection.wxss

@@ -0,0 +1 @@
+/* pages/form/rightsProtection/rightsProtection.wxss */

+ 66 - 0
pages/form/riskAssessment/riskAssessment.js

@@ -0,0 +1,66 @@
+// pages/form/riskAssessment/riskAssessment.js
+Page({
+
+  /**
+   * 页面的初始数据
+   */
+  data: {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad(options) {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload() {
+
+  },
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh() {
+
+  },
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom() {
+
+  },
+
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage() {
+
+  }
+})

+ 3 - 0
pages/form/riskAssessment/riskAssessment.json

@@ -0,0 +1,3 @@
+{
+  "usingComponents": {}
+}

+ 2 - 0
pages/form/riskAssessment/riskAssessment.wxml

@@ -0,0 +1,2 @@
+<!--pages/form/riskAssessment/riskAssessment.wxml 查风险-->
+<text>pages/form/riskAssessment/riskAssessment.wxml</text>

+ 1 - 0
pages/form/riskAssessment/riskAssessment.wxss

@@ -0,0 +1 @@
+/* pages/form/riskAssessment/riskAssessment.wxss */

+ 145 - 0
pages/hotProduct/hotProduct.js

@@ -0,0 +1,145 @@
+// pages/hotProduct/hotProduct.js
+const api = require('../../api/index')
+Page({
+
+  /**
+   * 页面的初始数据
+   */
+  data: {
+    keyword:'',
+    tableData:[],
+    queryParams:{
+      current:1,
+      size:10
+    },
+    total:25
+  },
+
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad(options) {
+    var params = {
+      current:1,
+      size:10
+    }
+    this.setData(
+      {
+        queryParams:params,
+        total:0
+      }
+    )
+    this.getProductList()
+  },
+
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow() {
+
+  },
+
+
+/**
+   * 页面功能实现的区域
+   */
+  //获取爆款产品
+  getProductList(){
+    var params = this.data.queryParams
+    api.queryHotProduct(params).then(res=>{
+      if(res.code == 200){
+        if(res.data.data.length>10){
+          var data = this.data.tableData.concat(res.data.data)
+          this.setData(
+            {
+              tableData:data,
+              total:res.data.total
+            }
+          )
+        }else{
+          var data1 = []
+          for(var i = 1;i<=10;i++){
+            data1.push(
+              {
+                name:'产品'+i,
+                systemFileList:[]
+              }
+            )
+          }
+          var data = this.data.tableData.concat(data1)
+          this.setData(
+            {
+              tableData:data
+            }
+          )
+        }
+        
+      }
+    })
+    
+  },
+  //加载更多
+  loadMore(){
+    var current = this.data.queryParams.current
+    this.setData(
+      {
+        ['queryParams.current']:current+1
+      }
+    )
+    this.getProductList()
+  },
+   //修改输入的关键词
+   changeKeyword(e){
+    this.setData(
+      {
+        keyword:e.detail
+      }
+    )
+  },
+  //检索
+  search(e){
+
+  },
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload() {
+
+  },
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh() {
+
+  },
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom() {
+
+  },
+
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage() {
+
+  }
+})

+ 5 - 0
pages/hotProduct/hotProduct.json

@@ -0,0 +1,5 @@
+{
+  "usingComponents": {
+    "myProduct":"/myComponents/product/product"
+  }
+}

+ 24 - 0
pages/hotProduct/hotProduct.wxml

@@ -0,0 +1,24 @@
+<!--pages/hotProduct/hotProduct.wxml-->
+<van-notify id="van-notify" />
+<view class="hotProduct">
+  <view class="search">
+    <myInput value="{{keyword}}" placeholder="请输入产品相关关键词" bindchange="changeKeyword" bindsearch="search" bindclickInnerIcon="clickInnerIcon"></myInput>
+  </view>
+  <view class="menuList">
+    <view class="menu_item green">
+      <text class="iconfont myIconanquanbangzhu"></text>
+      <text>白名单</text>
+    </view>
+    <view class="menu_item yellow">
+      <text class="iconfont myIconicon-test"></text>
+      <text>灰名单</text>
+    </view>
+    <view class="menu_item red">
+      <text class="iconfont myIcongroup43"></text>
+      <text>黑名单</text>
+    </view>
+  </view>
+  <scroll-view type="list" scroll-y class="main">
+    <myProduct tableData="{{tableData}}" total="{{total}}" bindloadMore="loadMore"></myProduct>
+  </scroll-view>
+</view>

+ 35 - 0
pages/hotProduct/hotProduct.wxss

@@ -0,0 +1,35 @@
+/* pages/hotProduct/hotProduct.wxss */
+.hotProduct{
+  padding:0 20rpx;
+  height: 100vh;
+}
+.menuList{
+  padding: 10rpx 0;
+  display: flex;
+  align-items: center;
+}
+.menu_item{
+  margin-right: 15rpx;
+  font-weight: bold;
+  font-size: 35rpx !important;
+}
+.iconfont{
+  font-weight: normal;
+  font-size: 35rpx !important;
+}
+.green{
+  color: #3c8e1f;
+}
+.yellow{
+  color: #fccb42;
+}
+.red{
+  color: #ff0000;
+}
+
+.main{
+  flex: 1;
+  overflow-y: hidden;
+  height: calc(100vh - 150rpx);
+  box-sizing: border-box;
+}

+ 1 - 0
pages/index/index.wxml

@@ -1,4 +1,5 @@
 <!--index.wxml-->
+<van-notify id="van-notify" />
 <scroll-view class="scrollarea" scroll-y type="list">
   <view class="">
     <view class="content">

+ 15 - 6
pages/login/login.js

@@ -218,13 +218,22 @@ Page({
           iv: iv,
           code:code
         }
-        api.loginByWeChat(data).then(res=>{
-          if(res.code == 200){
-            this.isLogin(res.data)
-          }
-        }).catch(error=>{
-
+        wx.login({
+          success: (res) => {
+            if(res.errMsg == 'login:ok'){
+              data.code = res.code
+              api.loginByWeChat(data).then(res=>{
+                if(res.code == 200){
+                  this.isLogin(res.data)
+                }
+              }).catch(error=>{
+      
+              })
+            }
+            
+          },
         })
+        
          
       } else if (e.detail.errMsg === 'getPhoneNumber:fail') {  
         // 用户拒绝授权  

+ 1 - 0
pages/login/login.wxml

@@ -1,6 +1,7 @@
 <!--pages/login/login.wxml-->
 <navBar backType="editLaw"></navBar>
 <wux-toptips id="wux-toptips" />
+<van-notify id="van-notify" />
 <myDialog isShown="{{showDialog}}" title="检验码" bindcancel="closeDialog" bindconfirm="getCheckCode">
   <view>
     <wux-input bind:change="changeInput" placeholder="请输入校验码">

+ 39 - 0
pages/mine/mine.js

@@ -1,4 +1,5 @@
 // pages/mine/mine.js
+const api = require('../../api/index')
 Page({
 
   /**
@@ -14,6 +15,32 @@ Page({
         label:'帮助与反馈',
         type:'2'
       },
+    ],
+    menu2:[
+      {
+        type:1,
+        label:'我的关注',
+        icon:'myIconguanzhu',
+        page:'/pages/myFollow/myFollow'
+      },
+      {
+        type:2,
+        label:'检索记录',
+        icon:'myIconguanzhu',
+        page:'/pages/searchRecords/searchRecords'
+      },
+      {
+        type:3,
+        label:'工单记录',
+        icon:'myIconguanzhu',
+        page:'/pages/myWork/myWork'
+      },
+      {
+        type:4,
+        label:'监控',
+        icon:'myIconmonitor',
+        page:'/pages/monitor/monitor'
+      },
     ]
   },
 
@@ -38,6 +65,18 @@ Page({
 
   },
 
+
+  /**
+   * 页面功能
+   */
+  //点击菜单
+  clickMenu(e){
+    var page = e.currentTarget.dataset.page
+    wx.navigateTo({
+      url: page,
+    })
+  },
+
   /**
    * 生命周期函数--监听页面隐藏
    */

+ 5 - 16
pages/mine/mine.wxml

@@ -1,4 +1,5 @@
 <!--pages/mine/mine.wxml-->
+<van-notify id="van-notify" />
 <view class="mine">
   <view class="head flex">
     <view class="flex">
@@ -15,21 +16,9 @@
   </view>
   <wux-divider wux-class="line" show-text="{{ false }}" />
   <view class="menu_icon">
-    <view class="menu_icon_item">
-      <view class="iconfont myIconguanzhu menu_icon_size"></view>
-      <view>我的关注</view>
-    </view>
-    <view class="menu_icon_item">
-      <view class="iconfont myIconguanzhu menu_icon_size"></view>
-      <view>检索记录</view>
-    </view>
-    <view class="menu_icon_item">
-      <view class="iconfont myIconguanzhu menu_icon_size"></view>
-      <view>工单记录</view>
-    </view>
-    <view class="menu_icon_item">
-      <view class="iconfont myIconmonitor menu_icon_size"></view>
-      <view>监控</view>
+    <view class="menu_icon_item" wx:for="{{menu2}}" data-page="{{item.page}}" bind:tap="clickMenu">
+      <view class="iconfont {{item.icon}} menu_icon_size"></view>
+      <view>{{item.label}}</view>
     </view>
   </view>
   <wux-divider wux-class="line" show-text="{{ false }}" />
@@ -38,7 +27,7 @@
         <view class="menu_list_lable">{{ item.label }}</view>
         <view class="menu_list_icon"> > </view>
       </view> -->
-      <van-cell custom-class='vanCell' wx:for="{{menu1}}" title="{{item.label}}" is-link bind:click="">
+      <van-cell custom-class='vanCell' wx:for="{{menu1}}" title="{{item.label}}" is-link data-page="{{item.page}}" bind:click="clickMenu">
         <van-icon slot="right-icon" name="arrow" color="green" />
       </van-cell>
   </view>

+ 3 - 1
pages/mine/mine.wxss

@@ -59,7 +59,8 @@
   color: var(--themeColor);
 }
 .menu_icon_item{
-  font-weight: bold;
+  font-weight: bolder;
+  font-size: 30rpx;
   display: flex;
   align-items: center;
   flex-direction: column;
@@ -88,4 +89,5 @@
   padding:30rpx 15rpx !important;
   color: var(--themeColor) !important;
   border-bottom: 1px solid var(--themeColor);
+  font-weight: bolder;
 }

+ 99 - 0
pages/monitor/monitor.js

@@ -0,0 +1,99 @@
+// pages/monitor/monitor.js
+const api = require('../../api/index')
+Page({
+
+  /**
+   * 页面的初始数据
+   */
+  data: {
+    tableData:[],
+    queryParams:{
+      current:1,
+      size:10
+    },
+    total:0
+  },
+
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad(options) {
+    this.setData(
+      {
+        queryParams:{
+          current:1,
+          size:10
+        },
+        total:0
+      }
+    )
+    this.getMyMonitor()
+  },
+
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow() {
+
+  },
+
+  /**
+   * 页面功能
+   */
+  //获取关注的产品
+  getMyMonitor(){},
+  //加载更多
+  loadMore(){
+    var current = this.data.queryParams.current
+    this.setData(
+      {
+        ['queryParams.current']:current+1
+      }
+    )
+    this.getMyMonitor()
+  },
+
+
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload() {
+
+  },
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh() {
+
+  },
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom() {
+
+  },
+
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage() {
+
+  }
+})

+ 7 - 0
pages/monitor/monitor.json

@@ -0,0 +1,7 @@
+{
+  "navigationStyle": "custom",
+  "usingComponents": {
+    "navBar": "/myComponents/navBar/navBar",
+    "myProduct":"/myComponents/product/product"
+  }
+}

+ 11 - 0
pages/monitor/monitor.wxml

@@ -0,0 +1,11 @@
+<!--pages/monitor/monitor.wxml 监控-->
+<navBar></navBar>
+<van-notify id="van-notify" />
+<view class="monitor">
+  <view class="head">
+    <text>我的监控</text>
+  </view>
+  <scroll-view type="list" scroll-y class="main">
+    <myProduct tableData="{{tableData}}" total="{{total}}" bindloadMore="loadMore"></myProduct>
+  </scroll-view>
+</view>

+ 22 - 0
pages/monitor/monitor.wxss

@@ -0,0 +1,22 @@
+/* pages/monitor/monitor.wxss */
+.monitor{
+  padding: 0 25rpx;
+  /* height: 100vh; */
+}
+.head{
+  background-color: var(--themeColor);
+  text-align: center;
+  line-height: 80rpx;
+  color: #ffffff;
+  font-weight: bolder;
+  border-radius: 10rpx;
+}
+
+
+.main{
+  flex: 1;
+  overflow-y: hidden;
+  margin-top: 15rpx;
+  height: calc(100vh - 280rpx);
+  box-sizing: border-box;
+}

+ 133 - 0
pages/myFollow/myFollow.js

@@ -0,0 +1,133 @@
+// pages/myFollow/myFollow.js
+const api = require('../../api/index')
+Page({
+
+  /**
+   * 页面的初始数据
+   */
+  data: {
+    queryParams:{
+      current:1,
+      size:10
+    },
+    total:0,
+    tableData:[],
+    checkList:[
+      // {
+      //   type:0,
+      //   label:'全部',
+      //   icon:'',
+      //   checked:true
+      // },
+      {
+        type:1,
+        label:'白名单',
+        icon:'myIconanquanbangzhu',
+        checked:false
+      },
+      {
+        type:2,
+        label:'灰名单',
+        icon:'myIcongroup43',
+        checked:false
+      },
+      {
+        type:4,
+        label:'黑名单',
+        icon:'myIconicon-test',
+        checked:false
+      },
+    ],
+    checked:[]
+  },
+
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad(options) {
+    this.setData(
+      {
+        queryParams:{
+          current:1,
+          size:10
+        },
+        total:0
+      }
+    )
+    this.getMyFollowProductList()
+  },
+
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow() {
+
+  },
+
+
+  /**
+   * 页面功能
+   */
+  //获取关注的产品
+  getMyFollowProductList(){},
+  //加载更多
+  loadMore(){
+    var current = this.data.queryParams.current
+    this.setData(
+      {
+        ['queryParams.current']:current+1
+      }
+    )
+    this.getMyFollowProductList()
+  },
+  //获取筛选值
+  onChange(e){
+    var data = e.detail
+    this.setData({
+      checked: data,
+    });
+    this.getMyFollowProductList()
+  },
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload() {
+
+  },
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh() {
+
+  },
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom() {
+
+  },
+
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage() {
+
+  }
+})

+ 9 - 0
pages/myFollow/myFollow.json

@@ -0,0 +1,9 @@
+{
+  "navigationStyle": "custom",
+  "usingComponents": {
+    "navBar": "/myComponents/navBar/navBar",
+    "myProduct":"/myComponents/product/product",
+    "van-checkbox": "/miniprogram_npm/@vant/weapp/checkbox/index",
+    "van-checkbox-group": "/miniprogram_npm/@vant/weapp/checkbox-group/index"
+  }
+}

+ 19 - 0
pages/myFollow/myFollow.wxml

@@ -0,0 +1,19 @@
+<!--pages/myFollow/myFollow.wxml 我关注的-->
+<navBar></navBar>
+<van-notify id="van-notify" />
+<view class="myFollow">
+  <view class="head">
+    <text>我的关注</text>
+  </view>
+  <view class="filter">
+    <van-checkbox-group custom-class="checkbox" direction="horizontal" value="{{ checked }}" bind:change="onChange">
+      <van-checkbox custom-class="checkbox_item" wx:for="{{checkList}}" wx:key="index" name="{{item.type}}">
+        <text class="iconfont {{item.icon}} checkbox_icon"></text>
+        <text class="checkbox_label">{{item.label}}</text>
+      </van-checkbox>
+    </van-checkbox-group>
+  </view>
+  <scroll-view type="list" scroll-y class="main">
+    <myProduct tableData="{{tableData}}" total="{{total}}" bindloadMore="loadMore"></myProduct>
+  </scroll-view>
+</view>

+ 38 - 0
pages/myFollow/myFollow.wxss

@@ -0,0 +1,38 @@
+/* pages/myFollow/myFollow.wxss */
+.myFollow{
+  padding: 0 25rpx;
+  /* height: 100vh; */
+}
+.head{
+  background-color: var(--themeColor);
+  text-align: center;
+  line-height: 80rpx;
+  color: #ffffff;
+  font-weight: bolder;
+  border-radius: 10rpx;
+}
+
+.checkbox_icon{
+  font-size: 35rpx;
+}
+.myIcongroup43{
+  font-size: 25rpx;
+}
+.checkbox_label{
+  font-size: 25rpx;
+}
+.checkbox_item .van-checkbox__icon{
+  width: 0.6em !important;
+  height: 0.6em !important;
+  line-height: 0.6em !important;
+}
+.checkbox_item .van-checkbox__label{
+  padding-left: 10rpx;
+}
+
+.main{
+  flex: 1;
+  overflow-y: hidden;
+  height: calc(100vh - 300rpx);
+  box-sizing: border-box;
+}

+ 115 - 0
pages/myWork/myWork.js

@@ -0,0 +1,115 @@
+// pages/myWork/myWork.js
+const api = require('../../api/index')
+const app = getApp()
+Page({
+
+  /**
+   * 页面的初始数据
+   */
+  data: {
+    tableData:[],
+    queryParams:{
+      current:1,
+      size:10
+    },
+    total:0,
+    imgHttp:app.globalData.imgHttp
+  },
+
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad(options) {
+    this.setData(
+      {
+        queryParams:{
+          current:1,
+          size:10
+        },
+        total:0
+      }
+    )
+    this.getMyWork()
+  },
+
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow() {
+
+  },
+
+
+  /**
+   * 页面功能
+   */
+  //查看图片
+  previewImage(e) {
+    const { current,imglist } = e.currentTarget.dataset
+    var imgs = []
+    for(var i =0;i<imglist.length;i++){
+      imgs.push(this.data.imgHttp + imglist[i].guid)
+    }
+    current = this.data.imgHttp + current
+    wx.previewImage({
+      current,
+      urls:imgs,
+    })
+  },
+  //获取检索记录
+  getMyWork(){
+
+  },
+  //加载更多
+  loadMore(){
+    var current = this.data.queryParams.current
+    this.setData(
+      {
+        ['queryParams.current']:current+1
+      }
+    )
+    this.getMyWork()
+  },
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload() {
+
+  },
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh() {
+
+  },
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom() {
+
+  },
+
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage() {
+
+  }
+})

+ 7 - 0
pages/myWork/myWork.json

@@ -0,0 +1,7 @@
+{
+  "navigationStyle": "custom",
+  "usingComponents": {
+    "navBar": "/myComponents/navBar/navBar",
+    "myCard":"/myComponents/card/card"
+  }
+}

+ 27 - 0
pages/myWork/myWork.wxml

@@ -0,0 +1,27 @@
+<!--pages/myWork/myWork.wxml 我的工单-->
+<navBar></navBar>
+<van-notify id="van-notify" />
+<view class="myWork">
+  <view class="head">
+    <text>检索记录</text>
+  </view>
+  <scroll-view type="list" scroll-y class="main">
+    <block wx:for="{{tableData}}" wx:key="index">
+      <myCard>
+        <view slot="head_left">
+          {{index}}{{item.name}}
+        </view>
+        <view slot="head_right">
+          {{item.status}}
+        </view>
+        <view>
+          content
+        </view>
+      </myCard>
+    </block>
+    <view class="loadData" wx:if="{{total && tableData.length>0}}">
+      <view wx:if="{{total>tableData.length}}" bind:tap="loadMore">加载更多</view>
+      <view wx:else>没有更多了</view>
+    </view>
+  </scroll-view>
+</view>

+ 22 - 0
pages/myWork/myWork.wxss

@@ -0,0 +1,22 @@
+/* pages/myWork/myWork.wxss */
+.myWork{
+  padding: 0 25rpx;
+  /* height: 100vh; */
+}
+.head{
+  background-color: var(--themeColor);
+  text-align: center;
+  line-height: 80rpx;
+  color: #ffffff;
+  font-weight: bolder;
+  border-radius: 10rpx;
+}
+
+
+.main{
+  flex: 1;
+  overflow-y: hidden;
+  margin-top: 15rpx;
+  height: calc(100vh - 280rpx);
+  box-sizing: border-box;
+}

+ 0 - 22
pages/riskAssessment/riskAssessment.js

@@ -36,28 +36,6 @@ Page({
    */
   //获取爆款产品
   getProductList(){
-    console.log(1)
-    var data = [
-      {
-        label:'产品1',
-        imgUrls:[
-          "/static/image/logo-3.png",
-          "/static/image/主页.png"
-        ]
-      },
-      {
-        label:'产品2',
-        imgUrls:[
-          "/static/image/logo-3.png",
-        ]
-      },
-      {
-        label:'产品2',
-        imgUrls:[
-          "/static/image/logo-3.png",
-        ]
-      },
-    ]
     var params = {
       current:1,
       size:6

+ 1 - 0
pages/riskAssessment/riskAssessment.wxml

@@ -1,5 +1,6 @@
 <!--pages/riskAssessment/riskAssessment.wxml-->
 <navBar backType="editLaw"></navBar>
+<van-notify id="van-notify" />
 <scroll-view class="appscrollarea" scroll-y >
 <view class="padding_50 content">
   <view class="head">

+ 115 - 0
pages/searchRecords/searchRecords.js

@@ -0,0 +1,115 @@
+// pages/searchRecords/searchRecords.js
+const api = require('../../api/index')
+const app = getApp()
+Page({
+
+  /**
+   * 页面的初始数据
+   */
+  data: {
+    tableData:[],
+    queryParams:{
+      current:1,
+      size:10
+    },
+    total:0,
+    imgHttp:app.globalData.imgHttp
+  },
+
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad(options) {
+    this.setData(
+      {
+        queryParams:{
+          current:1,
+          size:10
+        },
+        total:0
+      }
+    )
+    this.getSearchRecords()
+  },
+
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow() {
+
+  },
+
+
+  /**
+   * 页面功能
+   */
+  //查看图片
+  previewImage(e) {
+    const { current,imglist } = e.currentTarget.dataset
+    var imgs = []
+    for(var i =0;i<imglist.length;i++){
+      imgs.push(this.data.imgHttp + imglist[i].guid)
+    }
+    current = this.data.imgHttp + current
+    wx.previewImage({
+      current,
+      urls:imgs,
+    })
+  },
+  //获取检索记录
+  getSearchRecords(){
+
+  },
+  //加载更多
+  loadMore(){
+    var current = this.data.queryParams.current
+    this.setData(
+      {
+        ['queryParams.current']:current+1
+      }
+    )
+    this.getSearchRecords()
+  },
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload() {
+
+  },
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh() {
+
+  },
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom() {
+
+  },
+
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage() {
+
+  }
+})

+ 7 - 0
pages/searchRecords/searchRecords.json

@@ -0,0 +1,7 @@
+{
+  "navigationStyle": "custom",
+  "usingComponents": {
+    "navBar": "/myComponents/navBar/navBar",
+    "myCard":"/myComponents/card/card"
+  }
+}

+ 34 - 0
pages/searchRecords/searchRecords.wxml

@@ -0,0 +1,34 @@
+<!--pages/searchRecords/searchRecords.wxml 检索记录-->
+<navBar></navBar>
+<van-notify id="van-notify" />
+<view class="searchRecords">
+  <view class="head">
+    <text>检索记录</text>
+  </view>
+  <scroll-view type="list" scroll-y class="main">
+    <block wx:for="{{tableData}}" wx:key="index">
+      <myCard>
+        <view slot="head_left">
+          {{index}}{{item.name}}
+        </view>
+        <view slot="head_right">
+          {{item.time}}
+        </view>
+        <view>
+          <swiper indicator-dots="{{true}}"
+          autoplay="{{true}}" interval="{{2000}}" duration="{{500}}">
+          <block wx:for="{{item.systemFileList}}" wx:for-item="img" wx:key="*this">
+            <swiper-item>
+              <image src="{{imgHttp+img.guid}}" class="slide-image" data-current="{{img}}" data-imgList="{{item.systemFileList}}" bindtap="previewImage"/>  
+            </swiper-item>
+          </block>
+        </swiper>
+        </view>
+      </myCard>
+    </block>
+    <view class="loadData" wx:if="{{total && tableData.length>0}}">
+      <view wx:if="{{total>tableData.length}}" bind:tap="loadMore">加载更多</view>
+      <view wx:else>没有更多了</view>
+    </view>
+  </scroll-view>
+</view>

+ 22 - 0
pages/searchRecords/searchRecords.wxss

@@ -0,0 +1,22 @@
+/* pages/searchRecords/searchRecords.wxss */
+.searchRecords{
+  padding: 0 25rpx;
+  /* height: 100vh; */
+}
+.head{
+  background-color: var(--themeColor);
+  text-align: center;
+  line-height: 80rpx;
+  color: #ffffff;
+  font-weight: bolder;
+  border-radius: 10rpx;
+}
+
+
+.main{
+  flex: 1;
+  overflow-y: hidden;
+  margin-top: 15rpx;
+  height: calc(100vh - 280rpx);
+  box-sizing: border-box;
+}

BIN
static/image/empty.gif


+ 18 - 14
utils/request.js

@@ -1,8 +1,11 @@
 // request.js  
-import {$wuxToptips} from '../miniprogram_npm/wux-weapp/index'
+import Notify from '../miniprogram_npm/@vant/weapp/notify/notify';
+
+
+
 // 配置项  
 const config = {  
-  baseURL: 'http://192.168.1.17:8901', // 基础URL  
+  baseURL: 'http://192.168.1.13:8901', // 基础URL  
   timeout: 30000, // 超时时间(单位ms)  
   header: {  
     'content-type': 'application/json', // 默认请求头  
@@ -25,15 +28,15 @@ function request(url, method = 'GET', data = {}, header = {}) {
       timeout: config.timeout,  
       success: function(res){  
         // 根据业务逻辑处理成功响应  
-        if (res.data && res.data.code === 200) { // 假设服务器返回code为200表示成功  
+        if (res.data && res.data.code === 200) { // 假设服务器返回code为200表示成功 
           resolve(res.data);  
         } else {  
-          wx.showToast({
-            title: '请求失败',
-            icon: 'error',
-            duration: 2000
-          })
-      
+          // wx.showToast({
+          //   title: '请求失败',
+          //   icon: 'error',
+          //   duration: 2000
+          // })
+          Notify({ type: 'danger', message: '请求失败' });
           reject(res.data.message || '未知错误');  
         }  
       },  
@@ -41,11 +44,12 @@ function request(url, method = 'GET', data = {}, header = {}) {
         console.log(error) 
         
         // 处理请求失败 
-        wx.showToast({
-          title: '请求失败',
-          icon: 'error',
-          duration: 2000
-        })
+        // wx.showToast({
+        //   title: '请求失败',
+        //   icon: 'error',
+        //   duration: 2000
+        // })
+        Notify({ type: 'danger', message: '请求失败' });
         reject(error);  
       },  
     });