瀏覽代碼

update code

zhuliu 1 年之前
父節點
當前提交
a99d7f9a9f
共有 79 個文件被更改,包括 2266 次插入219 次删除
  1. 32 0
      api/common.js
  2. 12 0
      api/follow.js
  3. 8 26
      api/index.js
  4. 10 1
      api/login.js
  5. 7 2
      api/pay.js
  6. 18 1
      api/product.js
  7. 12 0
      api/searchRecord.js
  8. 8 4
      app.js
  9. 8 2
      app.json
  10. 2 1
      app.wxss
  11. 8 1
      miniprogram_npm/@vant/weapp/radio/index.wxss
  12. 5 1
      miniprogram_npm/wux-weapp/gallery/index.wxss
  13. 1 1
      myComponents/card/card.js
  14. 1 1
      myComponents/card/card.wxml
  15. 5 1
      myComponents/card/card.wxss
  16. 10 8
      myComponents/floatButton/floatButton.js
  17. 6 6
      myComponents/floatButton/floatButton.wxml
  18. 7 7
      myComponents/floatButton/floatButton.wxss
  19. 2 2
      myComponents/popover/popover.js
  20. 3 2
      myComponents/popover/popover.wxml
  21. 37 0
      myComponents/popover2/popover.js
  22. 4 0
      myComponents/popover2/popover.json
  23. 7 0
      myComponents/popover2/popover.wxml
  24. 51 0
      myComponents/popover2/popover.wxss
  25. 118 3
      myComponents/product/product.js
  26. 2 1
      myComponents/product/product.json
  27. 18 6
      myComponents/product/product.wxml
  28. 23 1
      myComponents/product/product.wxss
  29. 42 0
      myComponents/table/table.js
  30. 4 0
      myComponents/table/table.json
  31. 11 0
      myComponents/table/table.wxml
  32. 45 0
      myComponents/table/table.wxss
  33. 194 0
      pages/collectPatent/collectPatent.js
  34. 8 0
      pages/collectPatent/collectPatent.json
  35. 51 0
      pages/collectPatent/collectPatent.wxml
  36. 32 0
      pages/collectPatent/collectPatent.wxss
  37. 293 0
      pages/form/addProduct/addProduct.js
  38. 16 0
      pages/form/addProduct/addProduct.json
  39. 79 0
      pages/form/addProduct/addProduct.wxml
  40. 39 0
      pages/form/addProduct/addProduct.wxss
  41. 5 1
      pages/form/appeal/appeal.js
  42. 33 5
      pages/form/application/application.js
  43. 10 2
      pages/form/application/application.wxml
  44. 8 0
      pages/form/application/application.wxss
  45. 3 0
      pages/form/rightsProtection/rightsProtection.js
  46. 43 3
      pages/form/riskAssessment/riskAssessment.js
  47. 9 1
      pages/form/riskAssessment/riskAssessment.wxml
  48. 6 0
      pages/form/riskAssessment/riskAssessment.wxss
  49. 5 2
      pages/hotProduct/hotProduct.js
  50. 16 0
      pages/login/login.js
  51. 142 22
      pages/memberCenter/memberCenter.js
  52. 2 1
      pages/memberCenter/memberCenter.json
  53. 9 5
      pages/memberCenter/memberCenter.wxml
  54. 8 0
      pages/memberCenter/memberCenter.wxss
  55. 24 2
      pages/mine/mine.js
  56. 1 1
      pages/mine/mine.wxml
  57. 58 6
      pages/myFollow/myFollow.js
  58. 1 1
      pages/myFollow/myFollow.wxml
  59. 4 1
      pages/myFollow/myFollow.wxss
  60. 35 4
      pages/myWork/myWork.js
  61. 8 7
      pages/myWork/myWork.wxml
  62. 10 0
      pages/myWork/myWork.wxss
  63. 3 0
      pages/riskAssessment/riskAssessment.js
  64. 34 3
      pages/searchRecords/searchRecords.js
  65. 14 7
      pages/searchRecords/searchRecords.wxml
  66. 13 0
      pages/searchRecords/searchRecords.wxss
  67. 269 13
      pages/searchResults/searchResults.js
  68. 3 1
      pages/searchResults/searchResults.json
  69. 61 15
      pages/searchResults/searchResults.wxml
  70. 40 0
      pages/searchResults/searchResults.wxss
  71. 45 1
      pages/selectedPatents/selectedPatents.js
  72. 2 1
      pages/selectedPatents/selectedPatents.json
  73. 17 11
      pages/selectedPatents/selectedPatents.wxml
  74. 15 2
      pages/selectedPatents/selectedPatents.wxss
  75. 1 1
      pages/successReminder/successReminder.wxml
  76. 7 3
      static/iconfont/iconfont.wxss
  77. 41 3
      utils/pay.js
  78. 15 11
      utils/request.js
  79. 7 5
      utils/upload.js

+ 32 - 0
api/common.js

@@ -0,0 +1,32 @@
+import Notify from '../miniprogram_npm/@vant/weapp/notify/notify';
+module.exports={ 
+  //是否登录
+  isLogin:(data)=>{
+    var token = wx.getStorageSync('token')
+    console.log(token)
+    if(token){
+      return true
+    }
+    
+    wx.showModal({
+      title: '提示',
+      content: '您未登录,请先登录',
+      complete: (res) => {
+        if (res.cancel) {
+          
+        }
+    
+        if (res.confirm) {
+          wx.navigateTo({
+            url: '/pages/login/login',
+          })
+        }
+      }
+    })
+    return false
+  },
+  //提示
+  notify:(obj)=>{
+    Notify(obj)
+  }
+ }

+ 12 - 0
api/follow.js

@@ -0,0 +1,12 @@
+const request = require('../utils/request')
+
+module.exports={ 
+  //关注产品
+  follow:(data)=>{
+		return request.post('/xiaoshi-weixinback/product/follow',data)
+  },
+   //取消关注产品
+   unFollow:(data)=>{
+		return request.get('/xiaoshi-weixinback/product/unFollow',data)
+  },
+ }

+ 8 - 26
api/index.js

@@ -5,38 +5,20 @@ const product = require('./product')
 const user = require('./user.js')
 const work = require('./work.js')
 const pay = require('./pay.js')
+const follow = require('./follow')
+const searchRecord = require('./searchRecord')
+const common = require('./common')
 
-function isLogin(){
-  var token = wx.getStorageSync('token')
-  console.log(token)
-  if(token){
-    return true
-  }
-  
-  wx.showModal({
-    title: '提示',
-    content: '您未登录,请先登录',
-    complete: (res) => {
-      if (res.cancel) {
-        
-      }
-  
-      if (res.confirm) {
-        wx.navigateTo({
-          url: '/pages/login/login',
-        })
-      }
-    }
-  })
-  return false
-}
 module.exports={ 
-  isLogin:()=>isLogin(),
+  
+  ...common,
   ...search,
   ...login,
   ...category,
   ...product,
   ...user,
   ...work,
-  ...pay
+  ...pay,
+  ...follow,
+  ...searchRecord
 }

+ 10 - 1
api/login.js

@@ -20,5 +20,14 @@ module.exports={
   //退出登录接口
   logout:(data)=>{
 		return request.post('/xiaoshi-weixinback/account/logout',data)
-	},
+  },
+  
+  //获取会员权益
+  getVipRights:(data)=>{
+		return request.get('/xiaoshi-weixinback/vip/getVipRights',data)
+  },
+  //获取用户会员权益
+  getPersonRights:(data,isLogin=true)=>{
+		return request.get('/xiaoshi-weixinback/vip/getPersonRights',data,isLogin)
+  },
 }

+ 7 - 2
api/pay.js

@@ -1,7 +1,12 @@
 const request = require('../utils/request')
 
 module.exports={ 
+  //微信支付
 	weixinpay:(data)=>{
-		return request.get('/xiaoshi-weixinback/weixinpay/get',data)
-	}
+		return request.post('/xiaoshi-weixinback/weixinpay/getPayTickets',data)
+  },
+  //获取所有会员类型
+  queryAllVip:(data)=>{
+		return request.post('/xiaoshi-weixinback/vip/queryAllVip',data)
+  },
  }

+ 18 - 1
api/product.js

@@ -4,5 +4,22 @@ module.exports={
   //查询爆款产品
   queryHotProduct:(data)=>{
 		return request.post('/xiaoshi-weixinback/product/queryHotProduct',data)
-	},
+  },
+  //添加或更新产品
+  addOrUpdateProduct:(data)=>{
+		return request.post('/xiaoshi-weixinback/product/addOrUpdateProduct',data)
+  },
+  //查询已关注的产品
+  queryConcernProduct:(data)=>{
+		return request.post('/xiaoshi-weixinback/product/queryConcernProduct',data)
+  },
+
+  //收藏专利到产品中
+  collectPatent:(data)=>{
+    return request.post('/xiaoshi-weixinback/patent/collectPatent',data)
+  },
+  //查询收藏的专利
+  selectCollectPatent:(data)=>{
+    return request.post('/xiaoshi-weixinback/patent/selectCollectPatent',data)
+  },
  }

+ 12 - 0
api/searchRecord.js

@@ -0,0 +1,12 @@
+const request = require('../utils/request')
+
+module.exports={ 
+  //查询检索记录接口
+  querySearchRecords:(data)=>{
+		return request.post('/xiaoshi-weixinback/searchRecord/querySearchRecords',data)
+  },
+   //删除检索记录接口
+   removeSearchRecords:(data)=>{
+		return request.post('/xiaoshi-weixinback/searchRecord/removeSearchRecords',data)
+  },
+ }

+ 8 - 4
app.js

@@ -21,7 +21,8 @@ App({
     that.globalData.menuTop = menuButtonInfo.top;
     that.globalData.menuHeight = menuButtonInfo.height;
     that.globalData.menuWidth = menuButtonInfo.width;
-    this.getUserInfo()
+    wx.setStorageSync('height', that.globalData.navBarHeight)
+    this.getPersonRights()
   },
   globalData: {
     userInfo: null,
@@ -32,12 +33,15 @@ App({
     menuWidth:0,
     windowHeight:0,
     windowWidth:0,
+    phone:'0755-82839168',
     imghttp:'https://www.xsip.cn/fileManager/downloadFile?fileId='
+    // imghttp:'http://192.168.1.16:8801/fileManager/downloadFile?fileId='
   },
-  getUserInfo(){
-    api.selectPerson({},false).then(res=>{
+  getPersonRights(){
+    api.getPersonRights({},false).then(res=>{
       if(res.code == 200){
-        
+        var data = JSON.stringify(res.data.data)
+        wx.setStorageSync('vip', data)
       }
     })
   },

+ 8 - 2
app.json

@@ -17,7 +17,9 @@
     "pages/searchResults/searchResults",
     "pages/successReminder/successReminder",
     "pages/selectedPatents/selectedPatents",
-    "pages/memberCenter/memberCenter"
+    "pages/memberCenter/memberCenter",
+    "pages/form/addProduct/addProduct",
+    "pages/collectPatent/collectPatent"
   ],
   "tabBar": {
     "list": [
@@ -56,7 +58,11 @@
     "van-empty": "/miniprogram_npm/@vant/weapp/empty/index",
     "wux-image": "/miniprogram_npm/wux-weapp/image/index",
     "wux-safe-area": "/miniprogram_npm/wux-weapp/safe-area/index",
-    "van-tag": "/miniprogram_npm/@vant/weapp/tag/index"
+    "van-tag": "/miniprogram_npm/@vant/weapp/tag/index",
+    "wux-ellipsis": "/miniprogram_npm/wux-weapp/ellipsis/index",
+    "wux-gallery": "/miniprogram_npm/wux-weapp/gallery/index",
+    "wux-fab-button": "/miniprogram_npm/wux-weapp/fab-button/index",
+    "van-icon": "/miniprogram_npm/@vant/weapp/icon/index"
   },
   "componentFramework": "glass-easel",
   "sitemapLocation": "sitemap.json",

+ 2 - 1
app.wxss

@@ -20,7 +20,8 @@
   padding:50rpx;
 }
 page {
-	--themeColor: #316192;
+  --themeColor: #316192;
+  /* --themeColor:#3f395c */
 }
 
 button[type=primary]{

File diff suppressed because it is too large
+ 8 - 1
miniprogram_npm/@vant/weapp/radio/index.wxss


File diff suppressed because it is too large
+ 5 - 1
miniprogram_npm/wux-weapp/gallery/index.wxss


+ 1 - 1
myComponents/card/card.js

@@ -31,7 +31,7 @@ Component({
    */
   methods: {
     onTap: function (e) {
-      if(this.data.menu.length == 0){
+      if(this.properties.menu.length == 0){
         return false
       }
       console.log(e)

+ 1 - 1
myComponents/card/card.wxml

@@ -1,7 +1,7 @@
 <!--myComponents/card/card.wxml-->
 <view class="myCard">
   <myPopover id='popover' wx:if="{{menu.length>0}}">
-    <myPopover-item wx:for="{{menu}}" data-item="{{item}}" bindtap='onClickA' hasline>{{item.label}}</myPopover-item>
+    <myPopover-item wx:for="{{menu}}" data-item="{{item}}" wx:if="{{(item.type && data.ticketProgress==item.type) || !item.type}}" bindtap='onClickA' hasline>{{item.label}}</myPopover-item>
   </myPopover>
   <view class="head">
     <view class="head_left">

+ 5 - 1
myComponents/card/card.wxss

@@ -1,5 +1,6 @@
 /* myComponents/card/card.wxss */
 .myCard{
+  position: relative;
   width: calc(100% - 10rpx);
   border-radius: 15rpx;
   border: 1rpx solid var(--themeColor);
@@ -15,16 +16,19 @@
   font-size: 14px;
 }
 .head_right{
+  width: 50%;
   display: flex;
   align-items: center;
+  justify-content: flex-end;
   padding-right: var(--padding);
 }
 .head_right_label{
   margin-right: 10px;
-  font-size: 14px;
+  font-size: 12px;
 }
 .head_left{
   padding-left: var(--padding);
+  width: 100%;
 }
 .body{
   padding: var(--padding);

+ 10 - 8
myComponents/floatButton/floatButton.js

@@ -20,7 +20,7 @@ Component({
     },
     max:{
       type:Number,
-      value:99
+      value:100
     }
   },
 
@@ -56,14 +56,15 @@ Component({
       )
     },
     onButtonTouchStart: function(e) {  
-      this.setData({  
-        startX: e.touches[0].clientX,  
-        startY: e.touches[0].clientY,  
-        isDragging: true,  
-      });  
+        this.setData({  
+          startX: e.touches[0].clientX,  
+          startY: e.touches[0].clientY,  
+          isDragging: true,  
+        }); 
+       
     },  
       
-    onButtonMove: function(e) {  
+    onButtonMove: function(e) { 
       if (!this.data.isDragging) return;
       // const deltaX = e.touches[0].clientX - this.data.startX;  
       const deltaY = e.touches[0].clientY - this.data.startY; 
@@ -95,7 +96,8 @@ Component({
       });  
     }, 
 
-    click(e){
+    clickbtn(e){
+      console.log(4)
       this.triggerEvent('click')
     }
   },

+ 6 - 6
myComponents/floatButton/floatButton.wxml

@@ -1,19 +1,19 @@
 <!--myComponents/floatButton/floatButton.wxml-->
-<view wx:if="{{count>0}}" class="float-btn-container" style="top:{{top}}px;left: {{left}};" catchtouchmove="onButtonMove" catchtouchstart="onButtonTouchStart" catchtouchend="onButtonTouchEnd" catch:tap="click"> 
+<view wx:if="{{count>0}}" class="float-btn-container" style="top:{{top}}px;left: {{left}}; " catchtap="clickbtn" bindtouchmove="onButtonMove" bindtouchstart="onButtonTouchStart" bindtouchend="onButtonTouchEnd" > 
 
     <!-- 按钮内容,比如图标或文字 -->  
     <!-- <wux-badge count="{{10}}">
       <text class="iconfont {{icon}}"></text>  
     </wux-badge> -->
-    <view class="badge">
+    <view class="badge" >
       <view class="iconfont {{icon}}"></view>
-      <view class="count">
+      <!-- <view class="count">
         <text wx:if="{{count>=max}}" class="num">{{count - 1}}+</text>
         <text wx:else>{{count}}</text>
-      </view>
-      <!-- <van-tag round color="#3f395c" class="count">
+      </view> -->
+      <van-tag round color="red" size="medium" class="count">
         <text wx:if="{{count>=max}}" class="num">{{count - 1}}+</text>
         <text wx:else>{{count}}</text>
-      </van-tag> -->
+      </van-tag>
     </view>
 </view>

+ 7 - 7
myComponents/floatButton/floatButton.wxss

@@ -16,18 +16,18 @@
   position: relative;
 }
 .count{
-  font-size: 12px;
-  padding: 0 10rpx;
+  /* font-size: 12px; */
+  /* padding: 0 10rpx; */
   color: white;
-  background-color: red;
-  min-width: 18px;
-  height: 18px;
+  /* background-color: red; */
+  /* min-width: 18px; */
+  /* height: 18px; */
   text-align: center;
   line-height: 18px;
   border-radius: 50%;
   position:absolute;
-  left: 10px;
-  top: 2px;
+  left: 16px;
+  top: 6px;
   
 }
 

+ 2 - 2
myComponents/popover/popover.js

@@ -38,7 +38,7 @@ Component({
       } else {
         wx.createSelectorQuery().selectViewport().scrollOffset(view => {
           let { pw, ph, px, py, vertical, align } = self.data;
-
+          console.log(pw, ph, px, py, vertical, align)
           let pOverW = (pw - e.width) / 2;
 
           let offsetL = e.left,
@@ -59,7 +59,7 @@ Component({
             // 如果向左贴边了,设置一点距离
             if (px == 0) px += 5;
           }
-
+          console.log(offsetB,ph,trangleHeight,view.scrollTop , e.bottom )
           if (offsetB >= (ph + trangleHeight)) {
             vertical = 'bottom';
             py = view.scrollTop + e.bottom + trangleHeight;

+ 3 - 2
myComponents/popover/popover.wxml

@@ -1,6 +1,7 @@
 <view
   wx:if='{{visible}}'
   class='popover-view {{vertical}} {{align}}'
-  style='width:{{pw}}px;height:{{ph}}px;left:{{px}}px;top:{{py-130}}px;'>
+  style='width:{{pw}}px;height:{{ph}}px;left:calc(100% - 90px);top:{{40}}px;'>
   <slot />
-</view>
+</view>
+<!-- width:{{pw}}px;height:{{ph}}px;left:calc(100% - 90px);top:{{40}}px; -->

+ 37 - 0
myComponents/popover2/popover.js

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

+ 4 - 0
myComponents/popover2/popover.json

@@ -0,0 +1,4 @@
+{
+  "component": true,
+  "usingComponents": {}
+}

+ 7 - 0
myComponents/popover2/popover.wxml

@@ -0,0 +1,7 @@
+<!--myComponents/popover2/popover.wxml-->
+<view class="myPopover">
+  <view  wx:if="{{show}}" class="popoverView bottom">
+    <slot name="menu"></slot>
+  </view>
+  <slot></slot>
+</view>

+ 51 - 0
myComponents/popover2/popover.wxss

@@ -0,0 +1,51 @@
+/* myComponents/popover2/popover.wxss */
+
+.myPopover{
+  position: relative;
+  /* width: auto;
+  height: auto; */
+}
+.popoverView{
+ width: auto;
+ height: auto;
+ padding: 10px;
+  top: 35px;
+  right: calc(100% - 20px);
+  /* background-color: red; */
+  position: absolute;
+  background-color: white;
+  box-shadow: 0 0 2px 2px #ddd;
+  border-radius: 6rpx;
+  z-index: 999999;
+}
+.popoverView::before{
+  position: absolute;
+    display: inline-block;
+    width: 0;
+    height: 0px;
+    content: '';
+    border-style: solid;
+    border-width: 6px;
+    border-color: #fff #fff transparent transparent;
+    box-shadow: 2px -2px 2px #ddd;
+    border-top-style: solid;
+    border-right-style: solid;
+    border-bottom-style: solid;
+    border-left-style: solid;
+    border-top-width: 6px;
+    border-right-width: 6px;
+    border-bottom-width: 6px;
+    border-left-width: 6px;
+    border-top-color: rgb(255, 255, 255);
+    border-right-color: rgb(255, 255, 255);
+    border-bottom-color: transparent;
+    border-left-color: transparent;
+}
+.popoverView.bottom::before {
+  top: -6px;
+  right: 10px;
+  transform: rotate(-45deg);
+}
+.popoverView.left::before {
+  right: 20px;
+}

+ 118 - 3
myComponents/product/product.js

@@ -21,6 +21,10 @@ Component({
     loading:{
       type:Boolean,
       value:false
+    },
+    isFollow:{
+      type:Boolean,
+      value:false
     }
   },
 
@@ -28,13 +32,48 @@ Component({
    * 组件的初始数据
    */
   data: {
-    imgHttp:app.globalData.imghttp
+    imgHttp:app.globalData.imghttp,
+    concernType:{
+      '0':'myIconicon-test',//黑
+      '1':'myIconanquanbangzhu',//白
+      '2':'myIcongroup43'//灰
+    },
+    menu:[
+      {
+        label:'收藏的专利',
+        method:'selectCollectPatent'
+      }
+    ],
+    show:false
   },
 
   /**
    * 组件的方法列表
    */
   methods: {
+    moreMenu: function (e) {
+      
+      var {index} = e.currentTarget.dataset
+      var dom = this.selectComponent('#myPopover'+index)
+      dom.showMenu(!this.data.show)
+    },
+
+    // 响应popover组件中的子元素点击事件
+    onClickA: function (e) {
+      const {item,index} = e.currentTarget.dataset
+      console.log(item,index)
+      // 调用自定义组件 popover 中的 onHide 方法
+      this[item.method](index)
+      var dom = this.selectComponent('#myPopover'+index)
+      dom.showMenu(false)
+    },
+    //查询已收藏的专利
+    selectCollectPatent(index){
+      var product = this.data.tableData[index]
+      wx.navigateTo({
+        url: '/pages/collectPatent/collectPatent?productId='+product.assoId,
+      })
+    },
     //查看图片
     previewImage(e) {
       const { current,imglist } = e.currentTarget.dataset
@@ -50,6 +89,10 @@ Component({
     },
     //打开关注类型
     open(e){
+      var key = api.isLogin()
+      if(!key){
+        return false
+      }
       var index = e.currentTarget.dataset.index
       this.setData({
         ['tableData['+ index + '].show'] : true
@@ -64,11 +107,82 @@ Component({
     },
     //关注
     attention(e){
+      
       var {type,index} = e.currentTarget.dataset
+      var product = this.data.tableData[index]
+      var params = {
+        productId:product.id,
+        concernType:type
+      }
+      wx.showLoading({
+        title: '加载中',
+      })
+      api.follow(params).then(res=>{
+        if(res.code == 200){
+          var obj = {
+            type: 'success', 
+            message: '关注成功',
+          }
+          if(this.properties.isFollow){
+            obj.top = '90'
+          }
+          api.notify(obj)
+          this.setData({
+            ['tableData['+ index + '].show'] : false,
+            ['tableData['+ index + '].concernType'] : type,
+          })
+        }
+      })
+    },
+    //取消关注
+    cancelFollow(e){
+      var key = api.isLogin()
+      if(!key){
+        return false
+      }
+      wx.showModal({
+        title: '提示',
+        content: '确认取消关注?',
+        complete: (res) => {
+          if (res.cancel) {}
+          if (res.confirm) {
+            var index = e.currentTarget.dataset.index
+            var product = this.data.tableData[index]
+            var params = {
+              productId:product.id
+            }
+            api.unFollow(params).then(res=>{
+              if(res.code == 200){
+                var obj = {
+                  type: 'success', 
+                  message: '取关成功',
+                }
+                if(this.properties.isFollow){
+                  obj.top = '90'
+                  this.triggerEvent('cancelFollow',index)
+                }
+                api.notify(obj)
+                this.setData({
+                  ['tableData['+ index + '].concernType'] : null
+                })
+              }
+            })
+          }
+        }
+      })
+      
     },
     //监控
     control(e){
       var index = e.currentTarget.dataset.index
+      wx.showModal({
+        title: '提示',
+        content: '敬请期待!',
+        complete: (res) => {
+          if (res.cancel) {}
+          if (res.confirm) {}
+        }
+      })
     },
     //加载更多
     loadMore(){
@@ -85,8 +199,9 @@ Component({
       if(data){
         product = JSON.stringify(data)
       }
+      var type = 1
       wx.navigateTo({
-        url: '/pages/searchResults/searchResults?type=1&product='+encodeURIComponent(product),
+        url: '/pages/searchResults/searchResults?type='+type+'&product='+encodeURIComponent(product),
       })
     },
   },
@@ -97,7 +212,7 @@ Component({
     // 在组件实例进入页面节点树时执行  
     attached: function () {  
       // 初始化操作  
-      console.log(this.properties.tableData);  
+     
       // ...  
     },  
     // 在组件实例被移除出页面节点树时执行  

+ 2 - 1
myComponents/product/product.json

@@ -2,6 +2,7 @@
   "component": true,
   "usingComponents": {
     "van-empty":"/miniprogram_npm/@vant/weapp/empty",
-    "wux-image": "/miniprogram_npm/wux-weapp/image/index"
+    "wux-image": "/miniprogram_npm/wux-weapp/image/index",
+    "myPopover2":"/myComponents/popover2/popover"
   }
 }

+ 18 - 6
myComponents/product/product.wxml

@@ -1,12 +1,13 @@
 <!--myComponents/product/product.wxml-->
 <view class="product_content">
   <view class="product_item" wx:for="{{tableData}}" wx:for-index="index" wx:key="index" data-item="{{item}}" bind:tap="checkMessage">
-    <swiper class="swiper" autoplay="{{true}}" interval="{{3000}}"  duration="{{500}}" indicator-dots="{{false}}">  
+    <swiper class="swiper" autoplay="{{false}}" interval="{{3000}}"  duration="{{500}}" indicator-dots="{{false}}">  
       <block wx:if="{{item.systemFileList.length>0}}">  
         <swiper-item wx:for="{{item.systemFileList}}" wx:for-item="img" wx:key="*this">  
           <!-- <wux-image src="{{imgHttp+img.guid}}" wux-class="image"  width="100%" height="100px" shape="rounded" class="slide-image" />   -->
-          <view class="slide-image" style="background-image: url('{{imgHttp+img.guid}}')"></view>
-          <!-- <image src="{{imgHttp+img.guid}}" class="slide-image" data-current="{{img}}" data-imgList="{{item.systemFileList}}" bindtap="previewImage"/>   -->
+          <!-- <view class="slide-image" style="background-image: url('{{imgHttp+img.guid}}')"></view> -->
+          <image src="{{imgHttp+img.guid}}" class="slide-image" mode="aspectFit"/>  
+
         </swiper-item>  
       </block>  
       <swiper-item wx:else>
@@ -18,7 +19,18 @@
       <view class="title">
         {{index + 1}}.{{item.name}}
       </view>
-      <view class="icon">
+      <view wx:if="{{item.concernType == 0 || item.concernType}}" class="icon">
+        <view wx:if="{{!isFollow}}" class="iconfont myIconmonitor" data-index="{{index}}" catch:tap="control"></view>
+        <view  class="icon1 iconfont {{concernType[item.concernType]}}" data-index="{{index}}" catch:tap="cancelFollow"></view>
+        
+        <myPopover2 wx:if="{{isFollow}}" id="myPopover{{index}}" show="{{item.showMenu}}">
+          <view slot="menu" class="menu">
+            <view class="menu_item" wx:for="{{menu}}" wx:for-item="menu" wx:for-index="ind" data-item="{{menu}}" data-index="{{index}}" catch:tap="onClickA">{{menu.label}}</view>
+          </view>
+          <view  class="iconfont myIconsangedian-type-1" data-index="{{index}}" catch:tap="moreMenu"></view>
+        </myPopover2>
+      </view>
+      <view wx:else class="icon">
         <view class="iconfont myIconmonitor" data-index="{{index}}" catch:tap="control"></view>
         <view class="iconfont myIconguanzhu" data-index="{{index}}" catch:tap="open"></view>
       </view>
@@ -32,12 +44,12 @@
           <view class="operate_text">白名单</view>
         </view>
         <view class="line"></view>
-        <view class="grid" data-type="1" data-index="{{index}}" catch:tap="attention">
+        <view class="grid" data-type="2" data-index="{{index}}" catch:tap="attention">
           <view class="iconfont myIcongroup43 operate_icon"></view>
           <view class="operate_text">灰名单</view>
         </view>
         <view class="line"></view>
-        <view class="grid" data-type="1" data-index="{{index}}" catch:tap="attention">
+        <view class="grid" data-type="0" data-index="{{index}}" catch:tap="attention">
           <view class="iconfont myIconicon-test operate_icon"></view>
           <view class="operate_text">黑名单</view>
         </view>

+ 23 - 1
myComponents/product/product.wxss

@@ -20,6 +20,11 @@
 }
 .icon{ 
   display: flex;
+  align-items: center;
+  font-size: 45rpx;
+}
+.icon1{
+  font-size: 39rpx;
 }
 .product_content{
   display: flex;
@@ -82,4 +87,21 @@
   background-color: #f7f8fa;
   text-align: center;
   line-height:100rpx;
-}
+}
+
+.myIconsangedian-type-1{
+  font-size: 30rpx;
+}
+
+.menu{
+  width: 100px;
+}
+.menu_item{
+  font-size: 16px;
+  text-align: center;
+  padding: 5px 0;
+  border-bottom: 1px solid #f2f2f2;
+}
+.menu_item:last-child{
+  border-bottom:none;
+}

+ 42 - 0
myComponents/table/table.js

@@ -0,0 +1,42 @@
+
+Component({
+
+  options: {
+      multipleSlots: true // 在组件定义时的选项中启用多slot支持
+  },
+
+  /**
+   * 组件的属性列表
+   */
+  properties: {
+      thead:{
+        type:Array,
+        value:[]
+      },
+      data:{
+        type:Array,
+        value:[]
+      },
+      onclick: {
+        type: String
+    }
+  },
+
+  /**
+   * 私有数据,组件的初始数据
+   * 组件的初始数据
+   */
+  data: {
+  },
+
+  /**
+   * 组件的方法列表
+   * 
+   */
+  methods: {  
+    onclick(e) {
+      //点击事件,将所点击那一行的数据传输到父组件
+        this.triggerEvent('getRowData', e.target.dataset.row)
+    },
+  }
+})

+ 4 - 0
myComponents/table/table.json

@@ -0,0 +1,4 @@
+{
+  "component": true,
+  "usingComponents": {}
+}

+ 11 - 0
myComponents/table/table.wxml

@@ -0,0 +1,11 @@
+<!--myComponents/table/table.wxml-->
+<view class="table-box">
+    <view class="table">
+        <view class="tr">
+            <view class="th" wx:for="{{thead}}" wx:key="index">{{item.name}}</view>
+        </view>
+        <view class="tr" wx:for="{{data}}" wx:for-item="row" wx:key="index">
+            <view class="td" wx:for="{{thead}}" bindtap="onclick" data-row="{{row}}" wx:key="index">{{row[item.key]}}</view>
+        </view>
+    </view>
+</view>

+ 45 - 0
myComponents/table/table.wxss

@@ -0,0 +1,45 @@
+/* myComponents/table/table.wxss */
+.table-box{
+  height: 100%;
+  overflow-x: auto;
+  padding-bottom: 40rpx;
+}
+
+.table {
+  margin: 0 auto;
+  display: table;
+  border-collapse: collapse;
+  overflow-x: auto;
+  /* word-break: keep-all; */
+  /* white-space: nowrap; */
+  background-color: #FFFFFF;
+  width: 90%;
+  border-radius: 20rpx;
+}
+
+.tr {
+  display: table-row;
+}
+
+.th {
+  display: table-cell;
+  padding: 0 10rpx;
+  height: 60rpx;
+  line-height: 60rpx;
+  text-align: center;
+  border: 1rpx solid #DDDDDD;
+  border-right: none;
+  border-bottom: none;
+  background-color: #10c52e;
+  color: #FFFFFF;
+}
+
+.td {
+  padding: 0rpx 30rpx;
+  display: table-cell;
+  height: 60rpx;
+  line-height: 60rpx;
+  text-align: center;
+  border: 1rpx solid #DDDDDD;
+  border-right: none;
+}

+ 194 - 0
pages/collectPatent/collectPatent.js

@@ -0,0 +1,194 @@
+// pages/collectPatent/collectPatent.js
+const app = getApp()
+const api = require('../../api/index')
+import { $startWuxRefresher, $stopWuxRefresher,$stopWuxLoader,$wuxGallery} from '../../miniprogram_npm/wux-weapp/index'
+Page({
+
+  /**
+   * 页面的初始数据
+   */
+  data: {
+    imgHttp:app.globalData.imghttp,
+    loading:false,
+    scrollTop: 0,
+    tableData:[],
+    queryParams:{
+      size:10,
+      current:1
+    },
+    total:0,
+    id:null
+  },
+
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad(options) {
+    this.setData(
+      {
+        id:options.productId
+      }
+    )
+    this.init()
+  },
+
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow() {
+
+  },
+
+
+  /**
+   * 页面功能
+   */
+  //初始化加载
+  init(){
+    var params = {
+      current:1,
+      size:10
+    }
+    this.setData(
+      {
+        queryParams:params,
+        total:0,
+        tableData:[],
+      }
+    )
+    this.selectCollectPatent()
+  },
+  //下拉
+  onPulling() {
+    console.log('onPulling')
+  },
+  //下拉刷新
+  onRefresh() {
+    console.log('onRefresh')
+    this.init()
+  },
+   //查看图片
+   previewImage(e) {
+    console.log(e)
+    var { 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
+    $wuxGallery().show({
+      current,
+      urls: imgs.map((n) => ({ image: n, remark: n })),
+      indicatorDots: true,
+      indicatorColor: '#fff',
+      indicatorActiveColor: '#04BE02',
+      showDelete:false
+    })
+    // wx.previewImage({
+    //   current,
+    //   urls:imgs,
+    // })
+  },
+  //获取关注的产品
+  selectCollectPatent(type){
+    if(!this.data.id){
+      return false
+    }
+    var params = {
+      ...this.data.queryParams,
+      assoPersonProductId:this.data.id
+    }
+    wx.showLoading({
+      title: '加载中',
+    })
+    api.selectCollectPatent(params).then(res=>{
+      if(res.code == 200){
+        var len1 = this.data.tableData.length
+        var len = len1>0?len1-1: 0
+        
+        this.setData(
+          {
+            tableData:this.data.tableData.concat(res.data.data),
+            total:res.data.total,
+          }
+        )
+        for(let i = 0;i<res.data.data.length;i++){
+          this.getPictureByNo(res.data.data[i],len)
+          len += 1 
+        }
+        // res.data.data(item=>{
+        //   this.getPictureByNo(item,len)
+        //   len += 1 
+        // })
+      }
+    }).catch(error=>{
+    })
+  },
+  //根据专利号获取相关图片
+  getPictureByNo(data,index){
+    var params = {
+      appNo:data.appNo
+    }
+    api.getPictureByNo(params).then(res=>{
+      if(res.code == 200){
+        this.setData(
+          {
+            ["tableData["+index+"].imageList"]:res.data
+          }
+        )
+      }
+    })
+  },
+  //加载更多
+  loadMore(){
+    var current = this.data.queryParams.current
+    this.setData(
+      {
+        ['queryParams.current']:current+1
+      }
+    )
+    this.selectCollectPatent()
+  },
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload() {
+
+  },
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh() {
+
+  },
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom() {
+
+  },
+
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage() {
+
+  }
+})

+ 8 - 0
pages/collectPatent/collectPatent.json

@@ -0,0 +1,8 @@
+{
+  "navigationStyle": "custom",
+  "usingComponents": {
+    "navBar": "/myComponents/navBar/navBar",
+    "myCard":"/myComponents/card/card",
+    "wux-gallery": "/miniprogram_npm/wux-weapp/gallery/index"
+  }
+}

+ 51 - 0
pages/collectPatent/collectPatent.wxml

@@ -0,0 +1,51 @@
+<!--pages/collectPatent/collectPatent.wxml-->
+<navBar></navBar>
+<van-notify id="van-notify" />
+<wux-gallery id="wux-gallery" />
+<wux-refresher
+  id="wux-refresher"
+  bind:pulling="onPulling"
+  bind:refresh="onRefresh"
+  scrollTop="{{scrollTop}}"
+>
+<view class="collectPatent">
+  <view class="head">
+    <text>我的收藏专利</text>
+  </view>
+  <scroll-view wx:if="{{tableData.length>0}}" type="list" scroll-y class="main">
+    <block wx:for="{{tableData}}" wx:key="index">
+        <myCard edit="{{false}}">
+          <view slot="head_left">
+            <van-tag round color="#3f395c">{{index+ 1}}</van-tag>  专利号:{{item.appNo}}
+          </view>
+          <!-- <view slot="head_right">
+            <van-checkbox-group value="{{ patentNoList }}" data-item="{{item}}" data-index="{{index}}" data-appNo="{{item.appNo}}"  bind:change="changePatentNoList">
+              <van-checkbox name="{{item.appNo}}"></van-checkbox>
+            </van-checkbox-group>
+          </view> -->
+          <view>
+            <swiper indicator-dots="{{true}}"
+            autoplay="{{false}}" interval="{{2000}}" duration="{{500}}">
+            <block wx:if="{{item.imageList && item.imageList.length>0}}" wx:for="{{item.imageList}}" wx:for-item="img" wx:key="index">
+              <swiper-item>
+                <view style="background-image: url('{{imgHttp+img.guid}}')" class="slide-image" data-current="{{img}}" data-imgList="{{item.imageList}}" bind:tap="previewImage"></view>  
+                 <!-- <image src="{{imgHttp+img.guid}}" class="slide-image" data-current="{{img}}" data-imgList="{{item.systemFileList}}" bindtap="previewImage" mode="aspectFit"/>   -->
+              </swiper-item>
+            </block>
+          </swiper>
+          <view wx:if="{{item.rightHolder && item.rightHolder.length>0}}">
+            专利权人:{{item.rightHolder[0]}}
+          </view>
+          </view>
+        </myCard>
+      </block>
+    <view class="loadData" wx:if="{{total && tableData.length>0}}">
+      <view wx:if="{{total>tableData.length}}" bind:tap="loadMore">加载更多</view>
+      <wux-spin wux-class="spin" size="small" wx:elif="{{loading}}"/>
+      <view wx:elif="{{total>10}}">没有更多了</view>
+    </view>
+  </scroll-view>
+  <van-empty wx:else description="暂无数据" />
+</view>
+
+</wux-refresher>

+ 32 - 0
pages/collectPatent/collectPatent.wxss

@@ -0,0 +1,32 @@
+/* pages/collectPatent/collectPatent.wxss */
+.swiper{
+  height: 200rpx;
+}
+.slide-image {  
+  width: 100%;  
+  height: 100%;  
+  background-size:contain; /* 图片覆盖整个容器,可能部分图片不可见 */  
+  background-position: center; /* 图片居中显示 */  
+  background-repeat: no-repeat; /* 图片不重复 */  
+}
+.collectPatent{
+  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;
+  height: calc(100vh - 300rpx);
+  box-sizing: border-box;
+  margin-top: 10px;
+}

+ 293 - 0
pages/form/addProduct/addProduct.js

@@ -0,0 +1,293 @@
+// pages/form/addProduct/addProduct.js
+const upload = require("../../../utils/upload")
+const api = require('../../../api/index')
+import { $wuxForm} from '../../../miniprogram_npm/wux-weapp/index'
+Page({
+
+  /**
+   * 页面的初始数据
+   */
+  data: {
+    validateMessages: {
+      required: '%s 字段为必填',
+    },
+    form:{
+      
+    },
+    labelWidth:350,
+    fileList:[],
+  },
+
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad(options) {
+    const eventChannel = this.getOpenerEventChannel()
+    var that = this
+    eventChannel.on('acceptDataFromOpenerPage', function(data) {
+      var form = {
+        searchCondition:data.key,
+        concernType:data.concernType
+      }
+      var file = []
+      if(data.filePath){
+        file.push(
+          {
+            status: 'done',
+            url: filePath,
+          }
+        )
+      }
+      
+      that.setData(
+        {
+          form:form,
+          fileList:file
+        }
+      )
+      if(data.filePath){
+        that.uploadFile(data.filePath)
+      }
+      
+    })
+  },
+
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow() {
+
+  },
+
+
+  /**
+   * 页面方法集合
+   */
+  //表单栏位值发生变化时
+  onValuesChange(e) {
+    console.log(e)
+    const { changedValues, allValues } = e.detail
+    // this.setValues(changedValues)
+    Object.keys(changedValues).forEach((field) => {
+      this.setData({
+          ['form.'+field]: changedValues[field],
+      })
+    })
+    console.log('onValuesChange \n', changedValues, allValues)
+  },
+  //图片上传
+  beforeUpload(e){
+    console.log(e)
+    if(e.detail.errMsg=="chooseMedia:ok"){
+      // var data = [{
+      //   status: 'done',
+      //   url: e.detail.tempFiles[0].tempFilePath,
+      // }]
+      var data = this.data.fileList
+      var url = e.detail.tempFiles[0].tempFilePath
+      data.push(
+        {
+          status: 'done',
+          url: url,
+        }
+      )
+      this.setData({ fileList:data })
+      this.uploadFile(url)
+    }
+  },
+  onRemove(e) {
+    console.log(e)
+    const { file, fileList } = e.detail
+    wx.showModal({
+      content: '确定删除?',
+      success: (res) => {
+        if (res.confirm) {
+          var data = this.data.fileList
+          this.setData({
+            fileList: data.filter((n) => n.url !== file.url),
+          })
+        }
+      },
+    })
+  },
+  uploadFile(tempFilePaths){
+    var that = this
+    upload.upload(tempFilePaths).then(res=>{
+      if(res.code == 200){
+        var guid = res.data[0]
+        var index = that.data.fileList.findIndex(item=>{
+          return item.url == tempFilePaths
+        })
+        that.setData(
+          {
+            ["fileList["+index+"].guid"]:guid
+          }
+        )
+        // var arr = that.data.form.fileGuids || []
+        // arr.push(res.data[0])
+        // that.setData(
+        //   {
+        //     ["form.fileGuids"]:arr
+        //   }
+        // )
+      }
+    })
+  },
+  //上传文件
+  // uploadFile(){
+  //   const that = this;  
+  //   wx.chooseMessageFile({  
+  //     count: 1, // 默认9,表示一次最多可以选择的文件个数  
+  //     type: 'file', // 可以指定是文件  
+  //     success(res) {  
+  //       console.log(res)
+  //       var obj = res.tempFiles[0]
+  //       var data = that.data.fileList
+  //       data.push(obj)
+  //       // that.setData(
+  //       //   {
+  //       //     fileList:data
+  //       //   }
+  //       // )
+  //       // 返回选定文件的本地文件路径列表,tempFilePath可以作为文件上传的标识  
+  //       const tempFilePaths = obj.path;  
+  //       upload.upload(tempFilePaths).then(res=>{
+  //         if(res.code == 200){
+  //           var arr = that.data.form.fileGuids
+  //           if(!arr){
+  //             arr = []
+  //           }
+  //           arr.push(res.data[0])
+  //           that.setData(
+  //             {
+  //               ["form.fileGuids"]:arr,
+  //               fileList:data
+  //             }
+  //           )
+  //         }
+  //       })
+  //     }  
+  //   }); 
+  // },
+  //输入备注
+  changRemark(e){
+    this.setData(
+      {
+        ["form.description"]:e.detail.value
+      }
+    )
+  },
+  //修改专利无法导出?
+  onChange(e){
+    this.setData(
+      {
+        ["form.patentExport"]:e.detail
+      }
+    )
+  },
+  //提交工单
+  submit(){
+    var key = api.isLogin()
+    if(!key){
+      return false
+    }
+    var that = this
+    const { validateFields } = $wuxForm()
+    validateFields((err, values) => {
+      console.log(err)
+      if (!err) {
+        var fileGuids = that.data.fileList.map(item=>{
+          return item.guid
+        })
+        var params = {
+          ...that.data.form,
+          fileGuids:fileGuids
+        }
+        wx.showLoading({
+          title: '加载中',
+        })
+        api.addOrUpdateProduct(params).then(res=>{
+          if(res.code == 200){
+            var pages = getCurrentPages()
+            var prepage = pages[pages.length-2]
+            var product = {
+              concernType : params.concernType,
+              id:res.data[0],
+              key:params.searchCondition,
+              filePath:that.data.fileList[0]?.url
+            }
+            prepage.setData({
+              product : product,
+              showDialog:false,
+              followType:null,
+            })
+
+            wx.navigateBack()
+          }
+        })
+      }else{
+        var error = Object.keys(err)
+        var key = error[0]
+        var len = err[key].errors.length
+        var message = err[key].errors[len-1].message
+        wx.showModal({
+          title: '提示',
+          content: message,
+          complete: (res) => {
+            if (res.cancel) {
+              
+            }
+        
+            if (res.confirm) {
+              
+            }
+          }
+        })
+      }
+    })
+  },
+
+
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload() {
+
+  },
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh() {
+
+  },
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom() {
+
+  },
+
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage() {
+
+  }
+})

+ 16 - 0
pages/form/addProduct/addProduct.json

@@ -0,0 +1,16 @@
+{
+  "navigationStyle": "custom",
+  "usingComponents": {
+    "wux-form": "/miniprogram_npm/wux-weapp/form",
+    "wux-field":"/miniprogram_npm/wux-weapp/field/index",
+    "wux-input":"/miniprogram_npm/wux-weapp/input/index",
+    "navBar": "/myComponents/navBar/navBar",
+    "van-dropdown-menu": "/miniprogram_npm/@vant/weapp/dropdown-menu/index",
+    "van-dropdown-item": "/miniprogram_npm/@vant/weapp/dropdown-item/index",
+    "my-form-item":"/myComponents/formItem/formItem",
+    "van-radio": "/miniprogram_npm/@vant/weapp/radio/index",
+    "van-radio-group": "/miniprogram_npm/@vant/weapp/radio-group/index",
+    "wux-upload": "/miniprogram_npm/wux-weapp/upload/index",
+    "wux-textarea": "/miniprogram_npm/wux-weapp/textarea/index"
+  }
+}

+ 79 - 0
pages/form/addProduct/addProduct.wxml

@@ -0,0 +1,79 @@
+<!--pages/form/addProduct/addProduct.wxml-->
+<navBar></navBar>
+<van-notify id="van-notify" />
+<view class="addProduct">
+  <view class="headTitle">
+    完善产品信息
+  </view>
+  <scroll-view scroll-y class="form">
+    <wux-form
+      id="wux-form"
+      layout="none"
+      validateMessages="{{ validateMessages }}"
+      bind:change="onValuesChange"
+    >
+      <wux-field name="name" initialValue="{{''}}" rules="{{ [{ required: true,message:'产品名称不能为空' } ] }}">
+        <my-form-item labelWidth="{{labelWidth}}" required custom-class="form_label">
+          <view slot="label" >
+            产品名称
+          </view>
+          <wux-input  placeholder="请输入产品名称" />
+        </my-form-item>
+      </wux-field>
+      <wux-field name="searchCondition" initialValue="{{form.searchCondition}}">
+        <my-form-item labelWidth="{{labelWidth}}" custom-class="form_label">
+          <view slot="label" >
+            关键词
+          </view>
+          <wux-input placeholder="请输入关键词人" />
+        </my-form-item>
+      </wux-field>
+      <wux-field name="competitorCom" initialValue="{{''}}">
+        <my-form-item labelWidth="{{labelWidth}}"  custom-class="form_label">
+          <view slot="label" >
+            竞品公司
+          </view>
+          <wux-input  placeholder="请输入竞品公司" />
+        </my-form-item>
+      </wux-field>
+      <wux-field name="competitorLink" initialValue="{{''}}" >
+        <my-form-item labelWidth="{{labelWidth}}" custom-class="form_label">
+          <view slot="label" >
+            竞品链接
+          </view>
+          <wux-input placeholder="请输入竞品链接" />
+        </my-form-item>
+      </wux-field>
+    </wux-form>
+    <view class="label">
+      附图
+    </view>
+    <view class="upload">
+      <!-- <text class="iconfont myIconshangchuan"></text> -->
+      <wux-upload
+      listType="picture-card"
+      fileList="{{ fileList }}"
+      controlled
+      uploaded="false"
+      bind:before="beforeUpload"
+      bind:change="onChange"
+      bind:success="onSuccess"
+      bind:fail="onFail"
+      bind:complete="onComplete"
+      bind:preview="onPreview"
+      bind:remove="onRemove"
+    >
+      <text>+</text>
+    </wux-upload>
+    </view>
+    <view class="label">
+      描述
+    </view>
+    <view class="value">
+      <wux-textarea value="{{ form.description }}" bind:change="changRemark"/>
+    </view>
+    <view class="foot" bind:tap="submit">
+      提交
+    </view>
+  </scroll-view>
+</view>

+ 39 - 0
pages/form/addProduct/addProduct.wxss

@@ -0,0 +1,39 @@
+/* pages/form/addProduct/addProduct.wxss */
+.addProduct{
+  padding: 0 25rpx;
+  height: calc(100% - 150rpx);
+  background-color: #ffffff;
+}
+.form{
+  height: calc(100vh - 300rpx);
+  margin-top: 10rpx;
+}
+.label{
+  background-color: var(--themeColor);
+  text-align: center;
+  line-height: 60rpx;
+  color: #ffffff;
+  border-radius: 10rpx;
+  font-size: 14px;
+}
+.upload{
+  margin: 15rpx 0;
+  /* border: 1px solid var(--themeColor); */
+  /* border-radius: 15rpx; */
+  text-align: center;
+  line-height: 120rpx;
+}
+.value{
+  padding: 15rpx;
+  margin: 15rpx 0;
+  border: 1px solid var(--themeColor);
+  border-radius: 15rpx;
+  min-height: 120rpx;
+}
+.foot{
+  padding: 15rpx 25rpx;
+  background-color: var(--themeColor);
+  color: #ffffff;
+  text-align: center;
+  border-radius: 15rpx;
+}

+ 5 - 1
pages/form/appeal/appeal.js

@@ -90,12 +90,13 @@ Page({
       //   status: 'done',
       //   url: e.detail.tempFiles[0].tempFilePath,
       // }]
+      var that = this
       this.setData({ imageUrl:e.detail.tempFiles[0].tempFilePath })
       upload.upload(tempFilePaths).then(res=>{
         if(res.code == 200){
           var arr = []
           arr.push(res.data[0])
-          this.setData(
+          that.setData(
             {
               ["form.fileGuids"]:arr
             }
@@ -166,6 +167,9 @@ Page({
           fileGuids:this.data.form.fileGuids,
           respondingAddDTO:this.data.form
         }
+        wx.showLoading({
+          title: '加载中',
+        })
         api.addTicket(params).then(res=>{
           if(res.code == 200){
             wx.navigateTo({

+ 33 - 5
pages/form/application/application.js

@@ -23,7 +23,8 @@ Page({
       { text: '实用新型', value: '实用新型' },
       { text: '商标', value: '商标' },
       { text: '版权', value: '版权' },
-    ]
+    ],
+    fileList:[],
   },
 
   /**
@@ -82,18 +83,27 @@ Page({
       type: 'file', // 可以指定是文件  
       success(res) {  
         console.log(res)
+        var obj = res.tempFiles[0]
+        var data = that.data.fileList
+        data.push(obj)
+        // that.setData(
+        //   {
+        //     fileList:data
+        //   }
+        // )
         // 返回选定文件的本地文件路径列表,tempFilePath可以作为文件上传的标识  
-        const tempFilePaths = res.tempFiles[0].path;  
+        const tempFilePaths = obj.path;  
         upload.upload(tempFilePaths).then(res=>{
           if(res.code == 200){
-            var arr = this.data.form.fileGuids
+            var arr = that.data.form.fileGuids
             if(!arr){
               arr = []
             }
             arr.push(res.data[0])
-            this.setData(
+            that.setData(
               {
-                ["form.fileGuids"]:arr
+                ["form.fileGuids"]:arr,
+                fileList:data
               }
             )
           }
@@ -101,6 +111,21 @@ Page({
       }  
     }); 
   },
+  //删除文件
+  delFile(e){
+    var {index} = e.currentTarget.dataset
+    console.log(this.data.form)
+    var data = this.data.fileList
+    data.splice(index,1)
+    var fileGuid = this.data.form.fileGuids
+    fileGuid.splice(index,1)
+    this.setData(
+      {
+        fileList:data,
+        ["form.fileGuids"]:arr
+      }
+    )
+  },
   //输入备注
   changRemark(e){
     this.setData(
@@ -155,6 +180,9 @@ Page({
           fileGuids:this.data.form.fileGuids,
           ticketPatentApplyAddDTO:this.data.form
         }
+        wx.showLoading({
+          title: '加载中',
+        })
         api.addTicket(params).then(res=>{
           if(res.code == 200){
             wx.navigateTo({

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

@@ -95,6 +95,14 @@
     <view class="upload" bind:tap="uploadFile">
       <text class="iconfont myIconshangchuan"></text>
     </view>
+    <view>
+      <view class="file" wx:for="{{fileList}}" wx:key="index">
+        <wux-ellipsis class="head_left_title" direction="end" content="{{ item.name }}"/>
+        <view>
+          <van-icon name="close" data-index="index" bind:tap="delFile"/>
+        </view>
+      </view>
+    </view>
     <view class="label">
       备注
     </view>
@@ -110,9 +118,9 @@
         <view class="foot_btn" bind:tap="submit">
           提交工单
         </view>
-        <view class="foot_label2">
+        <!-- <view class="foot_label2">
           预估费用:1.5W
-        </view>
+        </view> -->
       </view>
     </view>
   </scroll-view>

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

@@ -23,6 +23,14 @@
   text-align: center;
   line-height: 120rpx;
 }
+
+.file{
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+  padding: 10rpx 0;
+}
+
 .value{
   padding: 15rpx;
   margin: 15rpx 0;

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

@@ -166,6 +166,9 @@ Page({
             fileGuids:this.data.form.fileGuids,
             protectionAddDTO:this.data.form
           }
+          wx.showLoading({
+            title: '加载中',
+          })
           api.addTicket(params).then(res=>{
             if(res.code == 200){
               wx.navigateTo({

+ 43 - 3
pages/form/riskAssessment/riskAssessment.js

@@ -15,6 +15,7 @@ Page({
       unableExport:true
     },
     labelWidth:350,
+    fileList:[],
   },
 
   /**
@@ -72,14 +73,50 @@ Page({
       count: 1, // 默认9,表示一次最多可以选择的文件个数  
       type: 'file', // 可以指定是文件  
       success(res) {  
+        console.log(res)
+        var obj = res.tempFiles[0]
+        var data = that.data.fileList
+        data.push(obj)
+        // that.setData(
+        //   {
+        //     fileList:data
+        //   }
+        // )
         // 返回选定文件的本地文件路径列表,tempFilePath可以作为文件上传的标识  
-        const tempFilePaths = res.tempFilePaths[0];  
-        upload(tempFilePaths).then(res=>{
-          console.log(res)
+        const tempFilePaths = obj.path;  
+        upload.upload(tempFilePaths).then(res=>{
+          if(res.code == 200){
+            var arr = that.data.form.fileGuids
+            if(!arr){
+              arr = []
+            }
+            arr.push(res.data[0])
+            that.setData(
+              {
+                ["form.fileGuids"]:arr,
+                fileList:data
+              }
+            )
+          }
         })
       }  
     }); 
   },
+  //删除文件
+  delFile(e){
+    var {index} = e.currentTarget.dataset
+    console.log(this.data.form)
+    var data = this.data.fileList
+    data.splice(index,1)
+    var fileGuid = this.data.form.fileGuids
+    fileGuid.splice(index,1)
+    this.setData(
+      {
+        fileList:data,
+        ["form.fileGuids"]:arr
+      }
+    )
+  },
   //输入备注
   changRemark(e){
     this.setData(
@@ -114,6 +151,9 @@ Page({
           fileGuids:this.data.form.fileGuids,
           ticketFillInAddDTO:this.data.form
         }
+        wx.showLoading({
+          title: '加载中',
+        })
         api.addTicket(params).then(res=>{
           if(res.code == 200){
             wx.navigateTo({

+ 9 - 1
pages/form/riskAssessment/riskAssessment.wxml

@@ -36,7 +36,7 @@
           <wux-input maxlength="11" placeholder="请输入手机号" />
         </my-form-item>
       </wux-field>
-      <wux-field name="contactMail" initialValue="{{''}}" rules="{{ [{ required: true,message:'邮箱不能为空' },{type:'emain',message:'邮箱格式错误'} ] }}">
+      <wux-field name="contactMail" initialValue="{{''}}" rules="{{ [{ required: true,message:'邮箱不能为空' },{type:'email',message:'邮箱格式错误'} ] }}">
         <my-form-item labelWidth="{{labelWidth}}" required custom-class="form_label">
           <view slot="label" >
             联系邮箱
@@ -64,6 +64,14 @@
     <view class="upload" bind:tap="uploadFile">
       <text class="iconfont myIconshangchuan"></text>
     </view>
+    <view>
+      <view class="file" wx:for="{{fileList}}" wx:key="index">
+        <wux-ellipsis class="head_left_title" direction="end" content="{{ item.name }}"/>
+        <view>
+          <van-icon name="close" data-index="index" bind:tap="delFile"/>
+        </view>
+      </view>
+    </view>
     <view class="label">
       请问您遇到什么问题了呢?
     </view>

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

@@ -30,6 +30,12 @@
   border-radius: 15rpx;
   min-height: 120rpx;
 }
+.file{
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+  padding: 10rpx 0;
+}
 .foot{
   padding: 15rpx 25rpx;
   background-color: var(--themeColor);

+ 5 - 2
pages/hotProduct/hotProduct.js

@@ -23,14 +23,14 @@ Page({
    * 生命周期函数--监听页面加载
    */
   onLoad(options) {
-    
+    this.init()
   },
 
   /**
    * 生命周期函数--监听页面初次渲染完成
    */
   onReady() {
-    this.init()
+    
   },
 
   /**
@@ -72,6 +72,9 @@ Page({
   //获取爆款产品
   getProductList(){
     var params = this.data.queryParams
+    wx.showLoading({
+      title: '加载中',
+    })
     api.queryHotProduct(params).then(res=>{
       if(res.code == 200){
         if(res.data.data.length>0){

+ 16 - 0
pages/login/login.js

@@ -183,6 +183,9 @@ Page({
               phoneNum:this.data.loginMessage.phone,
               phoneCode:this.data.loginMessage.code
             }
+            wx.showLoading({
+              title: '加载中',
+            })
             api.loginByPhone(data).then(res=>{
               console.log(res)
               if(res.code == 200){
@@ -197,7 +200,17 @@ Page({
   //登录后操作
   isLogin({token,id,isFirst,phone}){
     wx.setStorageSync('token',token)
+    this.getPersonRights()
     wx.navigateBack()
+    
+  },
+  getPersonRights(){
+    api.getPersonRights({},false).then(res=>{
+      if(res.code == 200){
+        var data = JSON.stringify(res.data.data)
+        wx.setStorageSync('vip', data)
+      }
+    })
   },
   //跳转到注册界面
   register(){
@@ -222,6 +235,9 @@ Page({
           success: (res) => {
             if(res.errMsg == 'login:ok'){
               data.code = res.code
+              wx.showLoading({
+                title: '加载中',
+              })
               api.loginByWeChat(data).then(res=>{
                 if(res.code == 200){
                   this.isLogin(res.data)

+ 142 - 22
pages/memberCenter/memberCenter.js

@@ -1,10 +1,13 @@
 // pages/memberCenter/memberCenter.js
+const api = require('../../api/index')
+const pay = require('../../utils/pay')
 Page({
 
   /**
    * 页面的初始数据
    */
   data: {
+    userinfo:{},
     equity:[
       {
         icon:'/static/svg/会员下载.svg',
@@ -42,14 +45,19 @@ Page({
         grade:'S级会员',
         money:'888'
       },
-    ]
+    ],
+    choseVip:null,
+    tableData:[],//会员权益
+    tableHead:[]
   },
 
   /**
    * 生命周期函数--监听页面加载
    */
   onLoad(options) {
-
+    this.getUserinfo()
+    this.queryAllVip()
+    
   },
 
   /**
@@ -69,29 +77,141 @@ Page({
   /**
    * 页面功能
    */
+  //获取所有会员
+   queryAllVip(){
+    var that = this
+    api.queryAllVip().then(res=>{
+      if(res.code == 200){
+        console.log(res)
+        var data = res.data.data
+        var grades = []
+        var tableHead = [
+          {
+            key:"functionName",
+            name:''
+          }
+        ]
+        data.forEach(item => {
+          var config = JSON.parse(item.configParameter)
+          var obj =  {
+            background_icon:config.background_icon,
+            background_color:config.background_color,
+            grade:item.name,
+            money:item.price,
+            vipUuid:item.vipUuid
+          }
+          tableHead.push(
+            {
+              key:item.vipUuid,
+              name:item.name
+            }
+          )
+          grades.push(obj)
+        })
+        that.setData(
+          {
+            grades:grades,
+            tableHead:tableHead,
+            choseVip:null
+          }
+        )
+        that.getVipRights()
+        console.log(that.data.grades)
+      }
+    })
+  },
+  //获取会员权益
+  getVipRights(){
+    var that = this
+    api.getVipRights().then(res=>{
+      if(res.code == 200){
+        var data = res.data.data
+        var tableData = []
+        for(var i = 0;i<data.length;i++){
+          var obj = {
+            functionName:data[i].functionName
+          }
+          var right = data[i].vipRightsVOList
+          for(var j = 0;j<that.data.tableHead.length;j++){
+            var head = that.data.tableHead[j]
+            if(head.key == 'functionName'){
+              continue
+            }
+            var obj2 = right.find(item=>{
+              return item.vipUuid == head.key
+            })
+            if(obj2){
+              obj[head.key] = obj2.description
+            }else{
+              obj[head.key] = ''
+            }
+          }
+          tableData.push(obj)
+        }
+        that.setData(
+          {
+            tableData:tableData
+          }
+        )
+        console.log(that.data.tableHead,that.data.tableData)
+      }
+    })
+  },
+  //获取用户信息
+  getUserinfo(){
+    api.selectPerson().then(res=>{
+      if(res.code == 200){
+        this.setData(
+          {
+            userinfo:res.data
+          }
+        )
+      }
+    })
+  },
+  //选择开通会员类型
+  chooseVip(e){
+    var {item} = e.currentTarget.dataset
+    this.setData(
+      {
+        choseVip:item
+      }
+    )
+  },
   //开通会员
   openVip(){
-    wx.requestVirtualPayment({
-      signData: JSON.stringify({
-        offerId: '123',
-        buyQuantity: 1,
-        env: 0,
-        currencyType: 'CNY',
-        productId: 'testproductId',
-        goodsPrice: 10,
-        outTradeNo: 'xxxxxx',
-        attach: 'testdata',
-      }),
-      paySig: 'd0b8bbccbe109b11549bcfd6602b08711f46600965253a949cd6a2b895152f9d',
-      signature: 'd0b8bbccbe109b11549bcfd6602b08711f46600965253a949cd6a2b895152f9d',
-      mode: 'short_series_goods',
-      success(res) {
-        console.log('requestVirtualPayment success', res)
-      },
-      fail({ errMsg, errCode }) {
-        console.error(errMsg, errCode)
-      },
+    if(!this.data.choseVip){
+      api.notify(
+        {
+          type:'warning',
+          message:'请先选择需要开通会员的类型',
+          top:'90'
+        }
+      )
+    }
+    var params = {
+      goodType:1,
+      goodUuid:this.data.choseVip.vipUuid
+    }
+    wx.showLoading({
+      title: '加载中',
+    })
+    pay.payMoney(params).then(res=>{
+      console.log(res)
+      if(res.errMsg == 'requestPayment:ok'){
+        api.notify(
+          {
+            type:'success',
+            message:'开通会员成功',
+            top:'90'
+          }
+        )
+        this.getUserinfo()
+      }
+    }).catch(error=>{
+
     })
+  
   },
 
 

+ 2 - 1
pages/memberCenter/memberCenter.json

@@ -1,6 +1,7 @@
 {
   "navigationStyle": "custom",
   "usingComponents": {
-    "wux-avatar":"/miniprogram_npm/wux-weapp/avatar/index"
+    "wux-avatar":"/miniprogram_npm/wux-weapp/avatar/index",
+    "mytable":"/myComponents/table/table"
   }
 }

+ 9 - 5
pages/memberCenter/memberCenter.wxml

@@ -1,17 +1,19 @@
 <!--pages/memberCenter/memberCenter.wxml-->
 <navBar></navBar>
+<van-notify id="van-notify"></van-notify>
 <view class="memberCenter">
   <view class="headTitle">会员中心</view>
   <view class="content">
     <view class="userinfo">
       <view class="left">
-        <wux-avatar size="large" src="/static/image/logo-3.png"></wux-avatar>
+        <wux-avatar size="large" wx:if="{{userinfo.fileGuid}}" src="imgHttp{{userinfo.fileGuid}}"></wux-avatar>
+      <wux-avatar size="large" wx:else src="/static/image/unlogin.jpeg"></wux-avatar>
         <view class="message">
-          <view class="name">昵称</view>
+          <view class="name">{{userinfo.name || userinfo.phoneNum}}</view>
           <view class="description">请选择您要开通的会员等级</view>
         </view>
       </view>
-      <view class="type"> <text class="iconfont myIconrenyuan icon"></text> 普通会员</view>
+      <view class="type"> <text class="iconfont myIconrenyuan icon"></text> {{userinfo.vip.name}}</view>
     </view>
     <view class="equity">
       <view class="equity_item" wx:for="{{equity}}" wx:key="index">
@@ -21,7 +23,7 @@
       </view>
     </view>
     <view class="grades">
-      <view class="grades_item backGroundImage" wx:for="{{grades}}" wx:key="index" style="background-image: url('{{item.background_icon}}');background-color: {{item.background_color}};">
+      <view  wx:for="{{grades}}" wx:key="index" class="grades_item backGroundImage {{choseVip.vipUuid == item.vipUuid?'checked':''}}" style="background-image: url('{{item.background_icon}}');background-color: {{item.background_color}};" data-item="{{item}}" bind:tap="chooseVip">
         <view class="grades_item_label">{{item.grade}}</view>
         <view class="money">¥<text class="money_value">{{item.money}}</text>/年</view>
       </view>
@@ -29,7 +31,9 @@
     <view class="headTitle" bind:tap="openVip">立即开通</view>
     <view class="equityDetails">
       <view class="equityDetails_title">会员权益说明</view>
-      <view class="equityDetails_content"></view>
+      <view class="equityDetails_content">
+        <mytable thead="{{tableHead}}" data="{{tableData}}"></mytable>
+      </view>
     </view>
   </view>
   

+ 8 - 0
pages/memberCenter/memberCenter.wxss

@@ -98,6 +98,14 @@
   font-size: 50rpx;
 }
 
+.checked{
+  box-shadow: 
+  5px 5px 0 0 var(--themeColor), 
+  -5px 5px 0 0 var(--themeColor), /* 左上角 */
+  5px -5px 0 0 var(--themeColor), /* 右上角 */
+  -5px -5px 0 0 var(--themeColor); /* 右下角 */
+}
+
 .equityDetails{
   margin-top: 20rpx;
 }

+ 24 - 2
pages/mine/mine.js

@@ -48,9 +48,14 @@ Page({
     imgHttp:app.globalData.imghttp,
     show:false,
     actions: [
+      // {
+      //   name: '编辑信息',
+      //   page:''
+      // },
       {
-        name: '编辑信息',
-        page:''
+        name: '退出登录',
+        page:'',
+        method:'logout'
       },
     ]
   },
@@ -124,6 +129,7 @@ Page({
   },
   //修改个人信息
   editMessage(){
+    // return false
     this.setData(
       {
         show:true
@@ -137,6 +143,22 @@ Page({
   //选择弹窗选项
   onSelect(event) {
     console.log(event.detail);
+    var btn = event.detail
+    this[btn.method]()
+  },
+  //退出登录
+  logout(){
+    api.logout().then(res=>{
+      if(res.code == 200){
+        this.setData(
+          {
+            isLogin:false
+          }
+        )
+        wx.setStorageSync('token', '')
+      }
+    })
+    
   },
   //点击菜单
   clickMenu(e){

+ 1 - 1
pages/mine/mine.wxml

@@ -13,7 +13,7 @@
       <wux-avatar size="large" wx:else src="/static/image/unlogin.jpeg" bind:tap="editMessage"></wux-avatar>
       <view class="message">
         <view class="name">{{userinfo.name || userinfo.phoneNum}}</view>
-        <view class="type"> <text class="iconfont myIconrenyuan icon"></text> 普通用户</view>
+        <view class="type"> <text class="iconfont myIconrenyuan icon"></text> {{userinfo.vip.name}}</view>
       </view>
     </view>
     <view class="right" bind:tap="openVIP">

+ 58 - 6
pages/myFollow/myFollow.js

@@ -1,5 +1,6 @@
 // pages/myFollow/myFollow.js
 const api = require('../../api/index')
+const app = getApp()
 import { $startWuxRefresher, $stopWuxRefresher,$stopWuxLoader} from '../../miniprogram_npm/wux-weapp/index'
 Page({
 
@@ -33,7 +34,7 @@ Page({
         checked:false
       },
       {
-        type:4,
+        type:0,
         label:'黑名单',
         icon:'myIconicon-test',
         checked:false
@@ -47,14 +48,14 @@ Page({
    * 生命周期函数--监听页面加载
    */
   onLoad(options) {
-    
+    this.init()
   },
 
   /**
    * 生命周期函数--监听页面初次渲染完成
    */
   onReady() {
-    this.init()
+    
   },
 
   /**
@@ -78,7 +79,7 @@ Page({
       {
         queryParams:params,
         total:0,
-        tableData:[]
+        tableData:[],
       }
     )
     this.getMyFollowProductList()
@@ -92,8 +93,59 @@ Page({
     console.log('onRefresh')
     this.init()
   },
+  //取消关注
+  cancelFollow(e){
+    var index = e.detail
+    var data = this.data.tableData
+    data.splice(index,1)
+    this.setData(
+      {
+        tableData:data
+      }
+    )
+    this.getMyFollowProductList(1)
+  },
   //获取关注的产品
-  getMyFollowProductList(){},
+  getMyFollowProductList(type){
+    var params = {
+      ...this.data.queryParams,
+      concernTypes:this.data.checked
+    }
+    wx.showLoading({
+      title: '加载中',
+    })
+    api.queryConcernProduct(params).then(res=>{
+      if(res.code == 200){
+        var data = this.data.tableData
+        wx.hideLoading()
+        if(type){
+            var startIndex = (this.data.queryParams.current-1)*this.data.queryParams.size
+            var endIndex = data.length
+            var len = endIndex - startIndex
+            data.splice(startIndex,len,...res.data.data)
+        }else{
+            data = data.concat(res.data.data)
+        }
+        
+        
+        this.setData(
+          {
+            tableData:data,
+            total:res.data.total
+          }
+        )
+        api.notify(
+          {
+            type:'success',
+            message:'查询成功',
+            top:wx.getStorageSync('height')
+          }
+        )
+      }
+    }).catch(error=>{
+      wx.hideLoading()
+    })
+  },
   //加载更多
   loadMore(){
     var current = this.data.queryParams.current
@@ -110,7 +162,7 @@ Page({
     this.setData({
       checked: data,
     });
-    this.getMyFollowProductList()
+    this.init()
   },
 
   /**

+ 1 - 1
pages/myFollow/myFollow.wxml

@@ -20,7 +20,7 @@
     </van-checkbox-group>
   </view>
   <scroll-view wx:if="{{tableData.length>0}}" type="list" scroll-y class="main">
-    <myProduct tableData="{{tableData}}" total="{{total}}" bindloadMore="loadMore"></myProduct>
+    <myProduct tableData="{{tableData}}" total="{{total}}" isFollow="{{true}}" bindloadMore="loadMore" bindcancelFollow="cancelFollow"></myProduct>
   </scroll-view>
   <van-empty wx:else description="暂无数据" />
 </view>

+ 4 - 1
pages/myFollow/myFollow.wxss

@@ -11,7 +11,9 @@
   font-weight: bolder;
   border-radius: 10rpx;
 }
-
+.filter{
+  margin-top: 10rpx;
+}
 .checkbox_icon{
   font-size: 35rpx;
 }
@@ -35,4 +37,5 @@
   overflow-y: hidden;
   height: calc(100vh - 320rpx);
   box-sizing: border-box;
+  margin-top: 10rpx;
 }

+ 35 - 4
pages/myWork/myWork.js

@@ -1,7 +1,7 @@
 // pages/myWork/myWork.js
 const api = require('../../api/index')
 const app = getApp()
-import { $startWuxRefresher, $stopWuxRefresher,$stopWuxLoader} from '../../miniprogram_npm/wux-weapp/index'
+const pay = require('../../utils/pay')
 Page({
 
   /**
@@ -41,7 +41,8 @@ Page({
       {
         label:'支付',
         method:'payMoney',
-        icon:''
+        icon:'',
+        type:2
       },
       {
         label:'确认',
@@ -121,13 +122,17 @@ Page({
   },
   //获取检索记录
   getMyWork(){
+    wx.showLoading({
+      title: '加载中',
+    })
     api.queryTicket(this.data.queryParams).then(res=>{
       if(res.code == 200){
         var data = this.data.tableData
         data = data.concat(res.data.data)
         this.setData(
           {
-            tableData:data
+            tableData:data,
+            total:res.data.total
           }
         )
       }
@@ -149,9 +154,35 @@ Page({
     var data = e.detail
     this[data.method](data.data,data.index)
   },
-  //支付
+  //支付3
   payMoney(data,index){
     console.log(data)
+    var params = {
+      goodType:0,
+      goodUuid:data.num
+    }
+    wx.showLoading({
+      title: '加载中',
+    })
+    pay.payMoney(params).then(res=>{
+      console.log(res)
+      if(res.errMsg == 'requestPayment:ok'){
+        api.notify(
+          {
+            type:'success',
+            message:'支付成功',
+            top:'90'
+          }
+        )
+        this.setData(
+          {
+            ["tableData["+index+"].ticketProgress"]:3
+          }
+        )
+      }
+    }).catch(error=>{
+
+    })
   },
   //取消5
   cancel(data,index){

+ 8 - 7
pages/myWork/myWork.wxml

@@ -21,7 +21,8 @@
         <view slot="head_right">
           {{ticketProgress[item.ticketProgress]}}
         </view>
-        <view>
+        <view class="card_body">
+          <view class="price" wx:if="{{item.price}}">¥{{item.price}}</view>
           <view class="content" wx:if="{{item.ticketType == 4}}">
             <view class="content_item">
               申请类型:{{item[ticketTypeFiled[item.ticketType]].appType}}
@@ -101,15 +102,15 @@
             </view>
           </view>
           <view class="content" wx:if="{{item.ticketType == 1}}">
-            <view class="content_item" wx:if="{{item[ticketTypeFiled[item.ticketType]].tortType}}">
-              公司名称:{{item[ticketTypeFiled[item.ticketType]].tortType}}
+            <view class="content_item" wx:if="{{item[ticketTypeFiled[item.ticketType]].companyName}}">
+              公司名称:{{item[ticketTypeFiled[item.ticketType]].companyName}}
             </view>
             <view class="content_item">
-              专利无法导出?:{{item[ticketTypeFiled[item.ticketType]].tortClassify}}
+              专利无法导出?:{{item[ticketTypeFiled[item.ticketType]].patentExport?'是':'否'}}
             </view>
-            <view class="content_item">
+            <!-- <view class="content_item">
               附图:{{item[ticketTypeFiled[item.ticketType]].ifHavePatent?'是':'否'}}
-            </view>
+            </view> -->
             <view class="content_item">
               具体问题:{{item[ticketTypeFiled[item.ticketType]].description}}
             </view>
@@ -123,7 +124,7 @@
     <view class="loadData" wx:if="{{total && tableData.length>0}}">
       <view wx:if="{{total>tableData.length}}" bind:tap="loadMore">加载更多</view>
       <wux-spin wux-class="spin" size="small" wx:elif="{{loading}}"/>
-      <view wx:elif="total>10">没有更多了</view>
+      <view wx:elif="{{total>10}}">没有更多了</view>
     </view>
   </scroll-view>
   <van-empty wx:else description="暂无数据" />

+ 10 - 0
pages/myWork/myWork.wxss

@@ -26,4 +26,14 @@
 .content_item{
   margin: 5px 0;
   color: var(--themeColor);
+}
+
+.card_body{
+  position: relative;
+}
+.price{
+  position: absolute;
+  bottom: 0px;
+  right: 10px;
+  color: red;
 }

+ 3 - 0
pages/riskAssessment/riskAssessment.js

@@ -66,6 +66,9 @@ Page({
       current:1,
       size:6
     }
+    wx.showLoading({
+      title: '加载中',
+    })
     api.queryHotProduct(params).then(res=>{
       if(res.code == 200){
         this.setData(

+ 34 - 3
pages/searchRecords/searchRecords.js

@@ -17,20 +17,27 @@ Page({
     loading:false,
     imgHttp:app.globalData.imghttp,
     scrollTop: 0,
+    menu:[
+      {
+        label:'删除',
+        method:'del',
+        icon:''
+      },
+    ]
   },
 
   /**
    * 生命周期函数--监听页面加载
    */
   onLoad(options) {
-    
+    this.init()
   },
 
   /**
    * 生命周期函数--监听页面初次渲染完成
    */
   onReady() {
-    this.init()
+    
   },
 
   /**
@@ -81,9 +88,33 @@ Page({
       urls:imgs,
     })
   },
+  //菜单点击
+  clickMenu(e){
+    console.log(e)
+    var data = e.detail
+    this[data.method](data.data,data.index)
+  },
+  del(data,index){
+
+  },
   //获取检索记录
   getSearchRecords(){
-
+    wx.showLoading({
+      title: '加载中',
+    })
+    api.querySearchRecords(this.data.queryParams).then(res=>{
+      if(res.code == 200){
+        console.log(res)
+        var data = this.data.tableData
+        data = data.concat(res.data.data)
+        this.setData(
+          {
+            tableData:data,
+            total:res.data.total
+          }
+        )
+      }
+    })
   },
   //加载更多
   loadMore(){

+ 14 - 7
pages/searchRecords/searchRecords.wxml

@@ -13,23 +13,30 @@
   </view>
   <scroll-view wx:if="{{tableData.length>0}}" type="list" scroll-y class="main">
     <block wx:for="{{tableData}}" wx:key="index">
-      <myCard>
-        <view slot="head_left">
-          {{index}}{{item.name}}
+      <myCard edit="{{false}}" menu="{{menu}}" data="{{item}}" index="{{index}}" bindvalue='clickMenu'>
+        <view slot="head_left" class="head_left">
+          <van-tag round color="#3f395c">{{index+ 1}}</van-tag>  
+          <wux-ellipsis class="head_left_title" wx:if="{{item.productId}}" direction="end" content="{{ item.searchCondition }}"/>
         </view>
         <view slot="head_right">
-          {{item.time}}
+          {{item.searchTime}}
         </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"/>  
+          <block wx:if="{{item.productFiles && item.productFiles.length>0}}" >
+            <swiper-item wx:for="{{item.productFiles}}" wx:for-item="img" wx:key="index">
+              <image src="{{imgHttp+img}}" class="slide-image" mode="aspectFit"/>  
             </swiper-item>
           </block>
+          <swiper-item wx:else>
+            <image  class="slide-image" src="/static/image/empty.gif" mode="aspectFit"/>
+          </swiper-item>
         </swiper>
         </view>
+        <view wx:if="{{!item.productId}}">
+          <wux-ellipsis direction="end" content="{{ item.searchCondition }}"/>
+        </view>
       </myCard>
     </block>
     <view class="loadData" wx:if="{{total && tableData.length>0}}">

+ 13 - 0
pages/searchRecords/searchRecords.wxss

@@ -11,6 +11,15 @@
   font-weight: bolder;
   border-radius: 10rpx;
 }
+.head_left{
+  display: flex;
+  align-items: center;
+ 
+}
+.head_left_title{
+  margin-left: 10rpx;
+}
+
 
 
 .main{
@@ -19,4 +28,8 @@
   margin-top: 15rpx;
   height: calc(100vh - 280rpx);
   box-sizing: border-box;
+}
+.slide-image{
+  height: 100%;
+  width: 100%;
 }

+ 269 - 13
pages/searchResults/searchResults.js

@@ -1,7 +1,7 @@
 // pages/searchResults/searchResults.js
 const app = getApp()
 const api = require('../../api/index')
-import { $startWuxRefresher, $stopWuxRefresher,$stopWuxLoader} from '../../miniprogram_npm/wux-weapp/index'
+import { $startWuxRefresher, $stopWuxRefresher,$stopWuxLoader,$wuxGallery} from '../../miniprogram_npm/wux-weapp/index'
 Page({
 
   /**
@@ -9,18 +9,43 @@ Page({
    */
   data: {
     imgHttp:app.globalData.imghttp,
+    phone:app.globalData.phone,
     queryParams:{
       current:1,
       size:10
     },
+    ifAddSearchRecord:true,
     total:0,
     loading:false,
     tableData:[],
     keyword:'',
     scrollTop: 0,
-    searchType:1,//检索类型
+    searchType:1,//检索类型1是爆款产品0是手动检索
     product:{},//产品信息
     patentNoList:[],
+    patentList:[],
+    buttons:[
+      {
+        label: '提交工单',
+        method:'check'
+      },
+      {
+        label: '一键导出',
+        method:'export'
+      },
+      {
+        label:'人工客服',
+        method:'makePhoneCall'
+      }
+    ],
+    concernType:{
+      '0':'myIconicon-test',//黑
+      '1':'myIconanquanbangzhu',//白
+      '2':'myIcongroup43'//灰
+    },
+    showDialog:false,
+    followType:null,
+    isAdd:false
   },
 
   /**
@@ -33,6 +58,7 @@ Page({
         product:JSON.parse(decodeURIComponent(options.product))
       }
     )
+    console.log(this.data.product)
     this.init()
   },
 
@@ -86,10 +112,18 @@ Page({
       imgs.push(this.data.imgHttp + imglist[i].guid)
     }
     current = this.data.imgHttp + current
-    wx.previewImage({
+    $wuxGallery().show({
       current,
-      urls:imgs,
+      urls: imgs.map((n) => ({ image: n, remark: n })),
+      indicatorDots: true,
+      indicatorColor: '#fff',
+      indicatorActiveColor: '#04BE02',
+      showDelete:false
     })
+    // wx.previewImage({
+    //   current,
+    //   urls:imgs,
+    // })
   },
   //修改输入的关键词
   changeKeyword(e){
@@ -107,21 +141,16 @@ Page({
   search(e){
     // console.log(e)
   },
-  //一键导出
-  export(e){
-    wx.navigateTo({
-      url: '/pages/selectedPatents/selectedPatents',
-    })
-  },
 
   //查询产品相关专利
   getPatentVectors(){
     console.log(this.data.product)
     var params = {
       pageNum:this.data.queryParams.current,
-      pageSize:this.data.queryParams.size
+      pageSize:this.data.queryParams.size,
+      ifAddSearchRecord:this.data.ifAddSearchRecord
     }
-    if(this.data.product.id){
+    if(this.data.searchType == 1){
       params.productId = this.data.product.id
     }else{
       params.key = this.data.product.key
@@ -135,6 +164,9 @@ Page({
     if(this.data.product.filePath){
       url = "getPatentVectorsByImage"
     }
+    wx.showLoading({
+      title: '加载中',
+    })
     api[url](data,this.data.product.filePath).then(res=>{
       if(res.code == 200){
         console.log(res)
@@ -144,7 +176,8 @@ Page({
         this.setData(
           {
             tableData:this.data.tableData.concat(res.data.data),
-            total:res.data.total
+            total:res.data.total,
+            ifAddSearchRecord:false
           }
         )
         for(let i = 0;i<res.data.data.length;i++){
@@ -186,8 +219,21 @@ Page({
   //选择专利
   changePatentNoList(event) {
     console.log(event)
+    var {item,appNo} = event.currentTarget.dataset
+    var data = event.detail
+    var patent = this.data.patentList
+    var index = data.indexOf(appNo)
+    if(index != -1){
+      var index1 = patent.findIndex(item=>{
+        return item.appNo == appNo
+      })
+      patent.splice(index1,1)
+    }else{
+      patent.push(item)
+    }
     this.setData({
       patentNoList: event.detail,
+      patentList:patent
     });
   },
 
@@ -197,8 +243,218 @@ Page({
 
   //查看已选择的专利
   clickButton(e){
+    console.log(e)
+    var that = this
+    wx.navigateTo({
+      url: '/pages/selectedPatents/selectedPatents',
+      events: {
+        // 为指定事件添加一个监听器,获取被打开页面传送到当前页面的数据
+        acceptDataFromOpenedPage: function(data) {
+          console.log(data)
+        },
+        someEvent: function(data) {
+          console.log(data)
+        }
+      },
+      success: function(res) {
+        // 通过eventChannel向被打开页面传送数据
+        res.eventChannel.emit('acceptDataFromOpenerPage', { data: that.data.patentList })
+      }
+    })
+  },
+
+  //关注产品
+  open(){
+    this.setData(
+      {
+        showDialog:true
+      }
+    )
+  },
+  //取消关注
+  closeDialog(){
+    this.setData(
+      {
+        showDialog:false,
+        followType:null,
+      }
+    )
+  },
+  attention(e){
+    var {type} = e.currentTarget.dataset
+    this.setData(
+      {
+        followType:type
+      }
+    )
+  },
+  //是否收藏
+  changeIsAdd(e){
+    
+    this.setData(
+      {
+        isAdd:e.detail
+      }
+    )
+    console.log(e)
+  },
+  //确认关注
+  confirm(){
+    console.log(this.data.followType)
+    if(this.data.followType != 0 && !this.data.followType){
+      api.notify(
+        {
+          type:'warning',
+          message:'请选择关注类型',
+          top:'90'
+        }
+      )
+      return false
+    }
+    var that = this
+    if(this.data.searchType == 0){
+      console.log(1)
+      wx.navigateTo({
+        url: `/pages/form/addProduct/addProduct`,
+        success: function(res) {
+          // 通过eventChannel向被打开页面传送数据
+          var data = {
+            ...that.data.product,
+            concernType:that.data.followType
+          }
+          res.eventChannel.emit('acceptDataFromOpenerPage', data)
+        }
+      })
+      return false
+    }
+    var params = {
+      productId:this.data.product.id,
+      concernType:this.data.followType
+    }
+    wx.showLoading({
+      title: '加载中',
+    })
+    
+    api.follow(params).then(res=>{
+      if(res.code == 200){
+        var obj = {
+          type: 'success', 
+          message: '关注成功',
+          top:'90'
+        }
+        api.notify(obj)
+        that.setData({
+          ['product.concernType'] : that.data.followType,
+        })
+        that.closeDialog()
+        // console.log(that.data.isAdd,this.data.patentNoList)
+        if(that.data.isAdd ){
+          that.setData(
+            {
+              idAdd:false
+            }
+          )
+          if(that.data.patentNoList && that.data.patentNoList.length>0){
+            var params1 = {
+              productId:that.data.product.id,
+              patentNos:that.data.patentNoList
+            }
+            api.collectPatent(params1).then(res=>{
+              if(res.code == 200){
+                
+              }
+            })
+          }
+        }
+      }
+    })
+  },
 
+  //取消关注
+  cancelFollow(e){
+    if(!this.data.product.id){
+      return false
+    }
+    wx.showModal({
+      title: '提示',
+      content: '确认取消关注?',
+      complete: (res) => {
+        if (res.cancel) {}
+        if (res.confirm) {
+          var product = this.data.product
+          var params = {
+            productId:product.id
+          }
+          wx.showLoading({
+            title: '取消中',
+          })
+          api.unFollow(params).then(res=>{
+            if(res.code == 200){
+              var obj = {
+                type: 'success', 
+                message: '取关成功',
+              }
+              if(this.properties.isFollow){
+                obj.top = '90'
+              }
+              api.notify(obj)
+              this.setData({
+                ['product.concernType'] : null
+              })
+              if(this.data.searchType == 0){
+                this.setData({
+                  ['product.id'] : null
+                })
+              }
+            }
+          })
+        }
+      }
+    })
   },
+ //监控
+ control(e){
+  // var index = e.currentTarget.dataset.index
+  wx.showModal({
+    title: '提示',
+    content: '敬请期待!',
+    complete: (res) => {
+      if (res.cancel) {}
+      if (res.confirm) {}
+    }
+  })
+},
+//点击button
+onClick(e){
+  console.log(e)
+  var btn = e.detail.value
+  this[btn.method]()
+},
+//导出
+export(){
+
+  if(!this.data.patentNoList || this.data.patentNoList.length==0){
+    wx.showToast({
+      title: '您未选择专利!',
+      icon:'none',
+      duration: 2000
+    })
+    return false
+  }
+
+},
+//我要查风险
+check(){
+  wx.navigateTo({
+    url: '/pages/form/riskAssessment/riskAssessment',
+  })
+},
+makePhoneCall(){
+  wx.makePhoneCall({
+    phoneNumber: this.data.phone
+  })
+},
+
 
   /**
    * 生命周期函数--监听页面隐藏

+ 3 - 1
pages/searchResults/searchResults.json

@@ -6,6 +6,8 @@
     "van-divider": "/miniprogram_npm/@vant/weapp/divider/index",
     "myFloatButton":"/myComponents/floatButton/floatButton",
     "van-checkbox": "/miniprogram_npm/@vant/weapp/checkbox/index",
-  "van-checkbox-group": "/miniprogram_npm/@vant/weapp/checkbox-group/index"
+  "van-checkbox-group": "/miniprogram_npm/@vant/weapp/checkbox-group/index",
+  "wux-gallery": "/miniprogram_npm/wux-weapp/gallery/index",
+  "myDialog":"/myComponents/dialog/dialog"
   }
 }

+ 61 - 15
pages/searchResults/searchResults.wxml

@@ -1,7 +1,45 @@
 <!--pages/searchResults/searchResults.wxml-->
 <navBar></navBar>
+<wux-gallery id="wux-gallery" />
 <van-notify id="van-notify" />
 <myFloatButton count="{{patentNoList.length}}" bind:click="clickButton"></myFloatButton>
+<myDialog isShown="{{showDialog}}" title="选择关注的类型" bindcancel="closeDialog" bindconfirm="confirm">
+  <view>
+    <view class="grids"  bordered="{{ false }}">
+        <view class="grid {{followType == 1?'checked':''}}" data-type="1" catch:tap="attention">
+          <view class="iconfont myIconanquanbangzhu operate_icon"></view>
+          <view class="operate_text">白名单</view>
+        </view>
+        <view class="line"></view>
+        <view class="grid {{followType == 2?'checked':''}}" data-type="2"  catch:tap="attention">
+          <view class="iconfont myIcongroup43 operate_icon"></view>
+          <view class="operate_text">灰名单</view>
+        </view>
+        <view class="line"></view>
+        <view class="grid {{followType == 0?'checked':''}}" data-type="0" catch:tap="attention">
+          <view class="iconfont myIconicon-test operate_icon"></view>
+          <view class="operate_text">黑名单</view>
+        </view>
+      </view>
+      <view class="isAdd">
+        <van-checkbox value="{{ isAdd }}" bind:change="changeIsAdd">选择的专利是否收藏到对应产品当中</van-checkbox>
+      </view>
+  </view>
+</myDialog>
+<wux-fab-button
+  position="bottomRight"
+  theme="balanced"
+  direction="vertical"
+  reverse="{{false}}"
+  spaceBetween="{{ 10 }}"
+  sAngle="{{ 0 }}"
+  eAngle="{{ 360 }}"
+  buttons="{{ buttons }}"
+  bind:change="onChange"
+  bind:click="onClick"
+  bind:contact="onContact"
+  bind:getuserinfo="onGotUserInfo"
+/>
 <wux-refresher
   id="wux-refresher"
   bind:pulling="onPulling"
@@ -19,28 +57,35 @@
   </view>
   <view class="product">
     <view class="product_head">
-      <view class="product_text"> <text wx:if="{{product.name}}">产品名称:{{product.name}}</text></view>
-      <view class="product_icon">
+      <view class="product_text"> 
+        <wux-ellipsis class="head_left_title" wx:if="{{product.name}}" direction="end" content="产品名称:{{ product.name }}"/>
+      <!-- <text wx:if="{{product.name}}">产品名称:{{product.name}}</text> -->
+      </view>
+      <view wx:if="{{product.concernType == 0 || product.concernType}}" class="product_icon">
+        <view  class="iconfont {{concernType[product.concernType]}}" style="font-size: 50rpx;" catch:tap="cancelFollow"></view>
+        <view  class="iconfont myIconmonitor" data-index="{{index}}" catch:tap="control"></view>
+      </view>
+      <view wx:else class="product_icon">
         <view class="iconfont myIconguanzhu" data-index="{{index}}" bind:tap="open"></view>
         <view class="iconfont myIconmonitor" data-index="{{index}}" bind:tap="control"></view>
       </view>
     </view>
     <view>
-      <swiper class="swiper" autoplay="{{true}}" interval="{{3000}}"  duration="{{500}}" indicator-dots="{{false}}">  
+      <swiper class="swiper" autoplay="{{false}}" interval="{{3000}}"  duration="{{500}}" indicator-dots="{{false}}">  
         <block wx:if="{{searchType == 1 && product.systemFileList && product.systemFileList.length>0}}">  
           <swiper-item wx:for="{{product.systemFileList}}" wx:for-item="img" wx:key="*this">  
             <!-- <image src="{{imgHttp+img.guid}}" class="slide-image" />   -->
-            <view class="slide-image" style="background-image: url('{{imgHttp+img.guid}}')"></view>
-            <!-- <image src="{{imgHttp+img.guid}}" class="slide-image" data-current="{{img}}" data-imgList="{{item.systemFileList}}" bindtap="previewImage"/>   -->
+            <!-- <view class="slide-image" style="background-image: url('{{imgHttp+img.guid}}')"></view> -->
+            <image src="{{imgHttp+img.guid}}" class="slide-image" mode="aspectFit"/>  
           </swiper-item>  
         </block> 
         <swiper-item wx:elif="{{searchType == 0 && product.filePath}}">
-          <!-- <image  class="slide-image" src="/static/image/empty.gif" mode=""/> -->
-          <view class="slide-image" style="background-image: url('{{product.filePath}}')"></view>
+          <image  class="slide-image" src="{{product.filePath}}" mode="aspectFit"/>
+          <!-- <view class="slide-image" style="background-image: url('{{product.filePath}}')"></view> -->
         </swiper-item>
         <swiper-item wx:else>
-          <!-- <image  class="slide-image" src="/static/image/empty.gif" mode=""/> -->
-          <view class="slide-image" style="background-image: url('/static/image/empty.gif')"></view>
+          <image  class="slide-image" src="/static/image/empty.gif" mode="aspectFit"/>
+          <!-- <view class="slide-image" style="background-image: url('/static/image/empty.gif')"></view> -->
         </swiper-item>
       </swiper>
     </view>
@@ -54,9 +99,9 @@
       <view class="content_head_description">注:非会员可选择100条</view>
       <view class="content_head_result">
         <view class="content_head_result_description">以下是您的检索结果:</view>
-        <view class="content_head_result_btn" bind:tap="export">
+        <!-- <view class="content_head_result_btn" bind:tap="export">
           一键导出
-        </view>
+        </view> -->
       </view>
     </view>
     <view class="content_result" wx:if="{{tableData.length>0}}">
@@ -66,16 +111,17 @@
             <van-tag round color="#3f395c">{{index+ 1}}</van-tag>  专利号:{{item.appNo}}
           </view>
           <view slot="head_right">
-            <van-checkbox-group value="{{ patentNoList }}" data-item="{{item}}" bind:change="changePatentNoList">
-              <van-checkbox name="{{item.appNo}}" bind:tap="onchange"></van-checkbox>
+            <van-checkbox-group value="{{ patentNoList }}" data-item="{{item}}" data-index="{{index}}" data-appNo="{{item.appNo}}"  bind:change="changePatentNoList">
+              <van-checkbox name="{{item.appNo}}"></van-checkbox>
             </van-checkbox-group>
           </view>
           <view>
             <swiper indicator-dots="{{true}}"
-            autoplay="{{true}}" interval="{{2000}}" duration="{{500}}">
+            autoplay="{{false}}" interval="{{2000}}" duration="{{500}}">
             <block wx:if="{{item.imageList && item.imageList.length>0}}" wx:for="{{item.imageList}}" wx:for-item="img" wx:key="index">
               <swiper-item>
                 <view style="background-image: url('{{imgHttp+img.guid}}')" class="slide-image" data-current="{{img}}" data-imgList="{{item.imageList}}" bind:tap="previewImage"></view>  
+                 <!-- <image src="{{imgHttp+img.guid}}" class="slide-image" data-current="{{img}}" data-imgList="{{item.systemFileList}}" bindtap="previewImage" mode="aspectFit"/>   -->
               </swiper-item>
             </block>
           </swiper>
@@ -88,7 +134,7 @@
       <view class="loadData" wx:if="{{total && tableData.length>0}}">
         <view wx:if="{{total>tableData.length}}" bind:tap="loadMore">加载更多</view>
         <wux-spin wux-class="spin" size="small" wx:elif="{{loading}}"/>
-        <view wx:elif="total>10">没有更多了</view>
+        <view wx:elif="{{total>10}}">没有更多了</view>
       </view>
     </view>
     <van-empty wx:else description="暂无数据" />

+ 40 - 0
pages/searchResults/searchResults.wxss

@@ -47,6 +47,9 @@
 
 .content_head{
   font-size: 30rpx;
+  display: flex;
+  justify-content: space-between;
+  flex-direction: row-reverse;
 }
 .content_head_description{
   text-align: end;
@@ -67,4 +70,41 @@
   border-radius: 15rpx;
   text-align: center;
   color: #ffffff;
+}
+
+
+.grids{
+  background-color: rgb(230 230 230);
+  height:180rpx;
+  display: flex;
+  justify-content: space-around;
+  align-items: center;
+}
+.grid{
+  /* height: 100%; */
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+}
+
+.line{
+  width: 1px !important;
+  height: 70rpx;
+  background-color: rgb(113 109 133);
+  float: right;
+}
+.operate_text{
+  font-size: 20rpx;
+}
+.operate_icon{
+  margin-bottom: 10rpx;
+  font-size: 60rpx;
+}
+.checked{
+  /* background-color: green; */
+  color:green;
+}
+.isAdd{
+  margin-top: 15rpx;
+  font-size: 14px;
 }

+ 45 - 1
pages/selectedPatents/selectedPatents.js

@@ -1,4 +1,5 @@
 // pages/selectedPatents/selectedPatents.js
+import { $wuxGallery} from '../../miniprogram_npm/wux-weapp/index'
 const app = getApp()
 Page({
 
@@ -14,7 +15,19 @@ Page({
    * 生命周期函数--监听页面加载
    */
   onLoad(options) {
-
+    const eventChannel = this.getOpenerEventChannel()
+    var that = this
+    // eventChannel.emit('acceptDataFromOpenedPage', {data: 'test'});
+    // eventChannel.emit('someEvent', {data: 'test'});
+    // 监听acceptDataFromOpenerPage事件,获取上一页面通过eventChannel传送到当前页面的数据
+    eventChannel.on('acceptDataFromOpenerPage', function(data) {
+      console.log(data)
+      that.setData(
+        {
+          tableData:data.data
+        }
+      )
+    })
   },
 
   /**
@@ -31,6 +44,37 @@ Page({
 
   },
 
+
+   //查看图片
+   previewImage(e) {
+    console.log(e)
+    var { 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
+    $wuxGallery().show({
+      current,
+      urls: imgs.map((n) => ({ image: n, remark: n })),
+      indicatorDots: true,
+      indicatorColor: '#fff',
+      indicatorActiveColor: '#04BE02',
+      showDelete:false
+    })
+    // wx.previewImage({
+    //   current,
+    //   urls:imgs,
+    // })
+  },
+  //人工服务
+  humanServices(){
+    wx.navigateTo({
+      url: '/pages/form/riskAssessment/riskAssessment',
+    })
+  },
+
+
   /**
    * 生命周期函数--监听页面隐藏
    */

+ 2 - 1
pages/selectedPatents/selectedPatents.json

@@ -3,6 +3,7 @@
   "usingComponents": {
     "navBar": "/myComponents/navBar/navBar",
     "myCard":"/myComponents/card/card",
-    "myFloatButton":"/myComponents/floatButton/floatButton"
+    "myFloatButton":"/myComponents/floatButton/floatButton",
+    "wux-gallery": "/miniprogram_npm/wux-weapp/gallery/index"
   }
 }

+ 17 - 11
pages/selectedPatents/selectedPatents.wxml

@@ -1,7 +1,7 @@
 <!--pages/selectedPatents/selectedPatents.wxml-->
 <navBar></navBar>
 <van-notify id="van-notify" />
-
+<wux-gallery id="wux-gallery" />
 <view class="selectedPatents">
   <view class="head">
     <view>
@@ -11,31 +11,37 @@
   </view>
   <scroll-view scroll-y class="content">
     <block wx:for="{{tableData}}" wx:key="index">
-        <myCard edit="{{false}}">
+    <view class="content_item">
+     <myCard edit="{{false}}">
           <view slot="head_left">
-            {{index}}{{item.name}}
+            <van-tag round color="#3f395c">{{index+ 1}}</van-tag>  专利号:{{item.appNo}}
           </view>
           <view slot="head_right">
-            <!-- <van-radio name="2"></van-radio> -->
+            <van-checkbox-group value="{{ patentNoList }}" data-item="{{item}}" data-index="{{index}}" data-appNo="{{item.appNo}}"  bind:change="changePatentNoList">
+              <van-checkbox name="{{item.appNo}}"></van-checkbox>
+            </van-checkbox-group>
           </view>
           <view>
             <swiper indicator-dots="{{true}}"
-            autoplay="{{true}}" interval="{{2000}}" duration="{{500}}">
-            <block wx:for="{{item.systemFileList}}" wx:for-item="img" wx:key="*this">
+            autoplay="{{false}}" interval="{{2000}}" duration="{{500}}">
+            <block wx:if="{{item.imageList && item.imageList.length>0}}" wx:for="{{item.imageList}}" wx:for-item="img" wx:key="index">
               <swiper-item>
-                <image src="{{imgHttp+img.guid}}" class="slide-image" data-current="{{img}}" data-imgList="{{item.systemFileList}}" bindtap="previewImage"/>  
+                <view style="background-image: url('{{imgHttp+img.guid}}')" class="slide-image" data-current="{{img}}" data-imgList="{{item.imageList}}" bind:tap="previewImage"></view>  
+                 <!-- <image src="{{imgHttp+img.guid}}" class="slide-image" data-current="{{img}}" data-imgList="{{item.systemFileList}}" bindtap="previewImage" mode="aspectFit"/>   -->
               </swiper-item>
             </block>
           </swiper>
-          <view>
-            专利权人:
+          <view wx:if="{{item.rightHolder && item.rightHolder.length>0}}">
+            专利权人:{{item.rightHolder[0].name}}
           </view>
           </view>
         </myCard>
+    </view>
+       
       </block>
   </scroll-view>
   <view class="foot">
-    <view class="foot_btn">人工服务</view>
-    <view class="foot_btn">导出专利</view>
+    <view class="foot_btn" bind:tap="humanServices">人工服务</view>
+    <view class="foot_btn" bind:tap="export">导出专利</view>
   </view>
 </view>

+ 15 - 2
pages/selectedPatents/selectedPatents.wxss

@@ -10,12 +10,25 @@
 .head_text{
   font-weight: bold;
 }
-
+.swiper{
+  height: 200rpx;
+}
+.slide-image {  
+  width: 100%;  
+  height: 100%;  
+  background-size:contain; /* 图片覆盖整个容器,可能部分图片不可见 */  
+  background-position: center; /* 图片居中显示 */  
+  background-repeat: no-repeat; /* 图片不重复 */  
+}
 .content{
   border: 2px solid var(--themeColor);
   border-radius: 10rpx;
   height: 1000rpx;
-  margin: 10rpx 0;
+  margin: 10rpx auto;
+}
+.content_item{
+  margin: auto;
+  padding-left: 5rpx;
 }
 
 .foot{

+ 1 - 1
pages/successReminder/successReminder.wxml

@@ -4,7 +4,7 @@
   <view class="content">
     您的{{type}}工单已提交成功,工作人员会在48小时内通过邮箱或电话联系您,请注意收听
   </view>
-  <view wx:if="description" class="description">
+  <view wx:if="{{description}}" class="description">
     注:{{description}}
   </view>
 

File diff suppressed because it is too large
+ 7 - 3
static/iconfont/iconfont.wxss


+ 41 - 3
utils/pay.js

@@ -1,3 +1,41 @@
-function payMoney(){
-  
-}
+const api = require('../api/index')
+function payMoney(data){
+  return new Promise((resolve, reject) => { 
+    api.weixinpay(data).then(res=>{
+      console.log(res)
+      if(res.code == 200){
+        var obj = res.data.data
+        wx.hideLoading()
+        wx.requestPayment
+            (
+              {
+                "timeStamp": `${obj.timestamp}`,
+                "nonceStr": obj.nonceStr,
+                "package": "prepay_id="+obj.prepayId,
+                "signType":obj.signType,
+                "paySign": obj.signature,
+                "success":function(res){
+                  // console.log(res)
+                  // resolve(res); 
+                },
+                "fail":function(res){
+                  // console.log(res)
+                  resolve(res); 
+                },
+                "complete":function(res){
+                  console.log(res)
+                  resolve(res); 
+                }
+              }
+            )
+      }
+    }).catch(error=>{
+      reject(error || '未知错误'); 
+    })
+  })
+}
+
+// 导出请求方法  
+module.exports = {  
+  payMoney: (data) => payMoney(data)
+};

+ 15 - 11
utils/request.js

@@ -1,11 +1,9 @@
 // request.js  
 import Notify from '../miniprogram_npm/@vant/weapp/notify/notify';
 import { $startWuxRefresher, $stopWuxRefresher,$stopWuxLoader} from '../miniprogram_npm/wux-weapp/index';
-
-
 // 配置项  
 const config = {  
-  baseURL: 'http://192.168.1.2:8901', // 基础URL  
+  baseURL: 'http://192.168.1.6:8901', // 基础URL  
   // baseURL: 'https://www.xsip.cn', // 基础URL  
   timeout: 30000, // 超时时间(单位ms)  
   header: {  
@@ -26,19 +24,24 @@ function request(url, method = 'GET', data = {}, header = {},isLogin=true) {
     var route = pages[pages.length - 1]?.route
     console.log(config.tabbar,route)
     if(route && config.tabbar.indexOf(route)==-1){
-      obj.top = "90"
+      obj.top = wx.getStorageSync('height')
+    }
+    var str = ''
+    if(method === 'GET'){
+      str ='?' + Object.keys(data).map(key => `${key}=${encodeURIComponent(data[key])}`).join('&')
     }
     wx.request({  
-      url: config.baseURL + url,  
+      url: config.baseURL + url + str,  
       method: method.toUpperCase(),  
       data: method === 'GET' ? {} : data, // GET请求时将data置为空对象  
       header: {  
         ...config.header,  
         ...header,  
-        "Cookie": "token="+wx.getStorageSync('token')
+        "Cookie": wx.getStorageSync('token')
       },  
       timeout: config.timeout,  
       success: function(res){  
+        wx.hideLoading()
         // 根据业务逻辑处理成功响应  
         if (res.data && res.data.code === 200) { // 假设服务器返回code为200表示成功 
           resolve(res.data);  
@@ -77,7 +80,7 @@ function request(url, method = 'GET', data = {}, header = {},isLogin=true) {
       },  
       fail: function(error) { 
         console.log(error) 
-        
+        wx.hideLoading()
         // 处理请求失败 
         // wx.showToast({
         //   title: '请求失败',
@@ -105,7 +108,7 @@ function upload(url="/fileManager/uploadNormalFile", path = '', header = {},form
     var route = pages[pages.length - 1]?.route
     console.log(config.tabbar,route)
     if(route && config.tabbar.indexOf(route)==-1){
-      obj.top = "90"
+      obj.top = wx.getStorageSync('height')
     }
     wx.uploadFile({  
       url: config.baseURL + url, //仅为示例,非真实的接口地址
@@ -115,10 +118,11 @@ function upload(url="/fileManager/uploadNormalFile", path = '', header = {},form
       header: {  
         ...config.header,  
         ...header,  
-        "Cookie": "token="+wx.getStorageSync('token')
+        "Cookie": wx.getStorageSync('token')
       },  
       timeout: config.timeout,  
-      success: function(res){  
+      success: function(res){ 
+        wx.hideLoading() 
         if(res.data){
           res.data = JSON.parse(res.data)
         }
@@ -160,7 +164,7 @@ function upload(url="/fileManager/uploadNormalFile", path = '', header = {},form
       },  
       fail: function(error) { 
         console.log(error) 
-        
+        wx.hideLoading()
         // 处理请求失败 
         // wx.showToast({
         //   title: '请求失败',

+ 7 - 5
utils/upload.js

@@ -2,9 +2,10 @@
 import Notify from '../miniprogram_npm/@vant/weapp/notify/notify';
 import { $startWuxRefresher, $stopWuxRefresher,$stopWuxLoader} from '../miniprogram_npm/wux-weapp/index';
 const token = wx.getStorageSync('token')
+const app = getApp()
 const config = {  
-  baseURL: 'http://192.168.1.6:8802', // 基础URL 
-  // baseURL: 'https://www.xsip.cn', // 基础URL   
+  // baseURL: 'http://192.168.1.6:8802', // 基础URL 
+  baseURL: 'https://www.xsip.cn', // 基础URL   
   timeout: 30000, // 超时时间(单位ms)  
   header: {  
     'content-type': 'application/json', // 默认请求头  
@@ -24,7 +25,7 @@ function upload(url="/fileManager/uploadNormalFile", path = '', header = {},form
     var route = pages[pages.length - 1]?.route
     console.log(config.tabbar,route)
     if(route && config.tabbar.indexOf(route)==-1){
-      obj.top = "90"
+      obj.top = app.globalData.navBarHeight
     }
     wx.uploadFile({  
       url: config.baseURL + url, //仅为示例,非真实的接口地址
@@ -37,10 +38,11 @@ function upload(url="/fileManager/uploadNormalFile", path = '', header = {},form
       header: {  
         ...config.header,  
         ...header,  
-        "Cookie": "token="+wx.getStorageSync('token')
+        "Cookie": wx.getStorageSync('token')
       },  
       timeout: config.timeout,  
       success: function(res){  
+        wx.hideLoading()
         if(res.data){
           res.data = JSON.parse(res.data)
         }
@@ -82,7 +84,7 @@ function upload(url="/fileManager/uploadNormalFile", path = '', header = {},form
       },  
       fail: function(error) { 
         console.log(error) 
-        
+        wx.hideLoading()
         // 处理请求失败 
         // wx.showToast({
         //   title: '请求失败',