瀏覽代碼

update code

zhuliu 1 年之前
父節點
當前提交
15adca41c3
共有 61 個文件被更改,包括 881 次插入299 次删除
  1. 28 1
      api/index.js
  2. 2 2
      api/user.js
  3. 16 0
      api/work.js
  4. 11 2
      app.js
  5. 4 2
      app.json
  6. 1 1
      miniprogram_npm/@vant/weapp/notify/index.wxml
  7. 2 2
      miniprogram_npm/wux-weapp/ellipsis/index.wxml
  8. 5 1
      miniprogram_npm/wux-weapp/input/index.wxss
  9. 4 1
      miniprogram_npm/wux-weapp/textarea/index.wxss
  10. 38 0
      myComponents/bubble/bubble.js
  11. 4 0
      myComponents/bubble/bubble.json
  12. 6 0
      myComponents/bubble/bubble.wxml
  13. 24 0
      myComponents/bubble/bubble.wxss
  14. 2 1
      myComponents/card/card.json
  15. 3 2
      myComponents/card/card.wxml
  16. 17 3
      myComponents/card/card.wxss
  17. 1 1
      myComponents/formItem/form.wxss
  18. 4 0
      myComponents/formItem/formItem.js
  19. 2 1
      myComponents/formItem/formItem.wxml
  20. 9 1
      myComponents/formItem/formItem.wxss
  21. 2 3
      myComponents/myInput/myInput.wxml
  22. 13 3
      myComponents/myInput/myInput.wxss
  23. 12 12
      myComponents/navBar/navBar.js
  24. 3 1
      myComponents/navBar/navBar.json
  25. 2 2
      myComponents/navBar/navBar.wxml
  26. 8 0
      myComponents/navBar/navBar.wxss
  27. 6 1
      myComponents/product/product.js
  28. 2 1
      myComponents/product/product.json
  29. 11 10
      myComponents/product/product.wxml
  30. 6 1
      myComponents/product/product.wxss
  31. 73 18
      pages/form/appeal/appeal.js
  32. 21 23
      pages/form/appeal/appeal.wxml
  33. 3 1
      pages/form/appeal/appeal.wxss
  34. 63 17
      pages/form/application/application.js
  35. 20 20
      pages/form/application/application.wxml
  36. 2 1
      pages/form/application/application.wxss
  37. 85 38
      pages/form/rightsProtection/rightsProtection.js
  38. 35 27
      pages/form/rightsProtection/rightsProtection.wxml
  39. 7 1
      pages/form/rightsProtection/rightsProtection.wxss
  40. 44 26
      pages/form/riskAssessment/riskAssessment.js
  41. 13 13
      pages/form/riskAssessment/riskAssessment.wxml
  42. 2 1
      pages/form/riskAssessment/riskAssessment.wxss
  43. 1 1
      pages/hotProduct/hotProduct.js
  44. 1 1
      pages/index/index.wxss
  45. 47 6
      pages/mine/mine.js
  46. 2 1
      pages/mine/mine.json
  47. 18 12
      pages/mine/mine.wxml
  48. 2 1
      pages/monitor/monitor.js
  49. 1 1
      pages/monitor/monitor.wxss
  50. 2 1
      pages/myFollow/myFollow.js
  51. 1 1
      pages/myFollow/myFollow.wxss
  52. 32 2
      pages/myWork/myWork.js
  53. 102 7
      pages/myWork/myWork.wxml
  54. 9 2
      pages/myWork/myWork.wxss
  55. 2 1
      pages/riskAssessment/riskAssessment.js
  56. 2 1
      pages/searchRecords/searchRecords.js
  57. 3 2
      pages/searchResults/searchResults.js
  58. 1 1
      pages/selectedPatents/selectedPatents.js
  59. 3 3
      pages/successReminder/successReminder.js
  60. 34 13
      utils/request.js
  61. 2 1
      utils/upload.js

+ 28 - 1
api/index.js

@@ -3,11 +3,38 @@ const login = require('./login')
 const category = require('./category')
 const product = require('./product')
 const user = require('./user.js')
+const work = require('./work')
 
+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(),
   ...search,
   ...login,
   ...category,
   ...product,
-  ...user
+  ...user,
+  ...work
 }

+ 2 - 2
api/user.js

@@ -2,8 +2,8 @@ const request = require('../utils/request')
 
 module.exports={ 
   //查询个人信息
-	selectPerson:(data)=>{
-		return request.post('/xiaoshi-weixinback/account/selectPerson',data)
+	selectPerson:(data,isLogin=true)=>{
+		return request.post('/xiaoshi-weixinback/account/selectPerson',data,isLogin)
   },
   //修改个人信息
   editPerson:(data)=>{

+ 16 - 0
api/work.js

@@ -0,0 +1,16 @@
+const request = require('../utils/request')
+
+module.exports={ 
+  //查询工单
+	queryTicket:(data)=>{
+		return request.post('/xiaoshi-weixinback/ticket/queryTicket',data)
+  },
+  //更新工单进度
+  updateTicketProcess:(data)=>{
+		return request.post('/xiaoshi-weixinback/ticket/updateTicketProcess',data)
+  },
+  //新增工单
+  addTicket:(data)=>{
+		return request.post('/xiaoshi-weixinback/ticket/addTicket',data)
+  },
+ }

+ 11 - 2
app.js

@@ -1,4 +1,5 @@
 // app.js
+const api = require('./api/index')
 App({
   onLaunch() {
     // 展示本地存储能力
@@ -20,6 +21,7 @@ App({
     that.globalData.menuTop = menuButtonInfo.top;
     that.globalData.menuHeight = menuButtonInfo.height;
     that.globalData.menuWidth = menuButtonInfo.width;
+    this.getUserInfo()
   },
   globalData: {
     userInfo: null,
@@ -30,6 +32,13 @@ App({
     menuWidth:0,
     windowHeight:0,
     windowWidth:0,
-    imghttp:'http://192.168.1.7:8801/'
-  }
+    imghttp:'https://www.xsip.cn/fileManager/downloadFile?fileId='
+  },
+  getUserInfo(){
+    api.selectPerson({},false).then(res=>{
+      if(res.code == 200){
+        
+      }
+    })
+  },
 })

+ 4 - 2
app.json

@@ -29,7 +29,7 @@
       },
       {
         "pagePath": "pages/hotProduct/hotProduct",
-        "text": "爆品专利数据库",
+        "text": "爆品风险",
         "iconPath": "/static/image/爆品.png",
         "selectedIconPath": "/static/image/爆品-click.png"
       },
@@ -53,7 +53,9 @@
     "wux-refresher": "/miniprogram_npm/wux-weapp/refresher/index",
     "wux-spin": "/miniprogram_npm/wux-weapp/spin/index",
     "navBar": "/myComponents/navBar/navBar",
-    "van-empty": "/miniprogram_npm/@vant/weapp/empty/index"
+    "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"
   },
   "componentFramework": "glass-easel",
   "sitemapLocation": "sitemap.json",

+ 1 - 1
miniprogram_npm/@vant/weapp/notify/index.wxml

@@ -14,7 +14,7 @@
   >
     <view
       wx:if="{{ safeAreaInsetTop }}"
-      style="height: {{ statusBarHeight }}px"
+      style="height: {{ top||statusBarHeight }}px"
     />
     <text>{{ message }}</text>
   </view>

+ 2 - 2
miniprogram_npm/wux-weapp/ellipsis/index.wxml

@@ -4,11 +4,11 @@
     </block>
     <block wx:elif="{{ expanded }}">
         <text>{{ content }}</text>
-        <text class="{{ classes.collapsed }}" wx-if="{{ exceeded && collapseText }}" data-expanded="0" catchtap="setExpanded">{{ collapseText }}</text>
+        <text class="{{ classes.collapsed }}" wx:if="{{ exceeded && collapseText }}" data-expanded="0" catchtap="setExpanded">{{ collapseText }}</text>
     </block>
     <block wx:else>
         <text>{{ ellipsised.leading }}</text>
-        <text class="{{ classes.expanded }}" wx-if="{{ exceeded && expandText }}" data-expanded="1" catchtap="setExpanded">{{ expandText }}</text>
+        <text class="{{ classes.expanded }}" wx:if="{{ exceeded && expandText }}" data-expanded="1" catchtap="setExpanded">{{ expandText }}</text>
         <text>{{ ellipsised.tailing }}</text>
     </block>
 </view>

文件差異過大導致無法顯示
+ 5 - 1
miniprogram_npm/wux-weapp/input/index.wxss


文件差異過大導致無法顯示
+ 4 - 1
miniprogram_npm/wux-weapp/textarea/index.wxss


+ 38 - 0
myComponents/bubble/bubble.js

@@ -0,0 +1,38 @@
+// myComponents/bubble/bubble.js
+Component({  
+  properties: {  
+    // 气泡框显示时的样式  
+    showStyle: {  
+      type: Object,  
+      value: {}  
+    }  
+  },  
+  data: {  
+    // 控制气泡框的显示与隐藏  
+    show: false  
+  },  
+  methods: {  
+    // 显示气泡框  
+    showBubble() {  
+      this.setData({  
+        show: true  
+      });  
+    },  
+    // 隐藏气泡框  
+    hideBubble() {  
+      this.setData({  
+        show: false  
+      });  
+    }  
+  },  
+  lifetimes: {  
+    // 组件加载时设置初始样式  
+    attached() {  
+      const { showStyle } = this.properties;  
+      this.setData({  
+        containerStyle: showStyle.containerStyle || '',  
+        contentStyle: showStyle.contentStyle || ''  
+      });  
+    }  
+  }  
+});

+ 4 - 0
myComponents/bubble/bubble.json

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

+ 6 - 0
myComponents/bubble/bubble.wxml

@@ -0,0 +1,6 @@
+<!--myComponents/bubble/bubble.wxml-->
+<view class="bubble-container" style="{{containerStyle}}">  
+  <view class="bubble-content" style="{{contentStyle}}">  
+    <slot></slot>  
+  </view>  
+</view>

+ 24 - 0
myComponents/bubble/bubble.wxss

@@ -0,0 +1,24 @@
+/* myComponents/bubble/bubble.wxss */
+.bubble-container {  
+  position: relative;  
+  display: inline-block;  
+}  
+  
+.bubble-content {  
+  position: absolute;  
+  padding: 10px;  
+  border-radius: 10px;  
+  background-color: rgba(255, 255, 255, 0.9);  
+  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);  
+  /* 根据需要添加动画 */  
+  transition: all 0.3s ease-in-out;  
+  /* 初始状态隐藏 */  
+  opacity: 0;  
+  transform: translateY(-10px);  
+}  
+  
+/* 展示时的样式 */  
+.bubble-container.show .bubble-content {  
+  opacity: 1;  
+  transform: translateY(0);  
+}

+ 2 - 1
myComponents/card/card.json

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

+ 3 - 2
myComponents/card/card.wxml

@@ -5,11 +5,12 @@
       <slot name="head_left"></slot>
     </view>
     <view class="head_right">
-      <view>
+      <view class="head_right_label">
         <slot name="head_right"></slot>
       </view>
-      <view wx:if="{{edit}}">
+      <view class="eidt" wx:if="{{edit}}" >
         <van-icon name="ellipsis" />
+     
       </view>
     </view>
   </view>

+ 17 - 3
myComponents/card/card.wxss

@@ -1,24 +1,38 @@
 /* myComponents/card/card.wxss */
-.head{
-  width: 100%;
+.myCard{
+  width: calc(100% - 10rpx);
   border-radius: 15rpx;
   border: 1rpx solid var(--themeColor);
   --padding:15rpx;
+  margin: 10px 0;
 }
 .head{
   border-bottom: 1rpx solid var(--themeColor);
   display: flex;
   justify-content: space-between;
   align-items: center;
+  padding: 10px 0;
+  font-size: 14px;
 }
 .head_right{
   display: flex;
   align-items: center;
   padding-right: var(--padding);
 }
+.head_right_label{
+  margin-right: 10px;
+  font-size: 14px;
+}
 .head_left{
   padding-left: var(--padding);
 }
 .body{
   padding: var(--padding);
-}
+}
+
+.edit{
+  position: relative;
+  width: 10px;
+  height: 10px;
+}
+

+ 1 - 1
myComponents/formItem/form.wxss

@@ -1,5 +1,5 @@
 .form_label>.left{
-  font-size: 35rpx;
+  font-size: 14px;
   background-color: var(--themeColor) !important;
   border-radius: 15rpx 0 0 15rpx;
   color: #ffffff;

+ 4 - 0
myComponents/formItem/formItem.js

@@ -22,6 +22,10 @@ Component({
     customClass:{
       type:String,
       value:''
+    },
+    required:{
+      type:Boolean,
+      value:false
     }
   },
 

+ 2 - 1
myComponents/formItem/formItem.wxml

@@ -2,9 +2,10 @@
 <view class="{{customClass}} myFormItem">
 	<view class="left" id="label" style="width: {{labelWidth?labelWidth:200}}rpx;text-align: {{labelPosition}};">
 		<view class="left_label">
+      <view wx:if="{{required}}" class="required"></view>
       <slot name="label"></slot>
     </view>
-    <text class="left_text">{{label}}</text>
+    <text class="left_text {{required?'required':''}}">{{label}}</text>
 	</view>
 	<view class="right">
 		<slot></slot>

+ 9 - 1
myComponents/formItem/formItem.wxss

@@ -22,6 +22,12 @@ page{
 	/* display: flex;
 	align-items: center; */
 }
+
+.required::after{
+  content:'*';
+  color:red;
+}
+
 .right{
 	border: 1rpx solid var(--themeColor);
 	border-left: 0;
@@ -31,7 +37,9 @@ page{
   height: initial;
   background-color: #ffffff;
 }
-
+.left_label{
+  display: flex;
+}
 .left_label:empty{
   display: none;
 }

+ 2 - 3
myComponents/myInput/myInput.wxml

@@ -43,13 +43,12 @@
       <text>+</text>
     </wux-upload>
     </view>
-    <view class="form">
+    <!-- <view class="form">
       <my-form-item label="产品名称">
         <input type="text"/>
       </my-form-item>
       <my-form-item label="关键词">
-        <!-- <textarea style="width:100%" auto-height="true"/> -->
         <wux-textarea clear autoHeight/>
       </my-form-item>
-    </view>
+    </view> -->
   </view>

+ 13 - 3
myComponents/myInput/myInput.wxss

@@ -16,16 +16,20 @@ page{
   line-height: 50rpx;
   padding: var(--padding) 60rpx var(--padding) var(--padding);
   border: 1rpx solid var(--themeColor);
+  display: flex;
+  align-items: center;
 }
 .inner_icon{
   height: 100%;
-  line-height: calc(50rpx + var(--padding) + var(--padding));
+  line-height: calc(50rpx + var(--padding) + var(--padding) + 10rpx);
+  /* line-height: 50rpx; */
   text-align: center;
   width:60rpx;
   position: absolute;
   right:0rpx;
   top: 0rpx;
   z-index: 1;
+  display: flex;
 }
 
 .input_type:empty + .default {
@@ -64,14 +68,20 @@ page{
 .placeholder{
   font-size: 30rpx;
 }
+.iconfont{
+  font-size: 50rpx;
+  
+}
 
 
 .editBox{
+  padding: 10rpx;
   display: flex;
-  align-items: stretch;
+  align-items: center;
+  border: 1px solid var(--themeColor);
 }
 .upload{
-  width: 250rpx;
+  width: auto;
   margin: auto;
 }
 

+ 12 - 12
myComponents/navBar/navBar.js

@@ -35,20 +35,20 @@ Component({
     clickBack(){
       var pages = getCurrentPages()
       if (pages.length >= 2) {
-        if(pages[pages.length-2].route == "pages/mine/mine" && pages[pages.length-1].route == "pages/login/login"){
+        // if(pages[pages.length-2].route == "pages/mine/mine" && pages[pages.length-1].route == "pages/login/login"){
           
-          // if(pages.length == 2){
-          //   wx.switchTab({
-          //     url: '/pages/index/index'
-          //   });
-          // }else{
-            wx.navigateBack({
-              delta: 2
-            })
-          // }
-        }else{
+        //   // if(pages.length == 2){
+        //   //   wx.switchTab({
+        //   //     url: '/pages/index/index'
+        //   //   });
+        //   // }else{
+        //     wx.navigateBack({
+        //       delta: 2
+        //     })
+        //   // }
+        // }else{
           wx.navigateBack()
-        }
+        // }
       } else {
           wx.switchTab({
               url: '/pages/index/index'

+ 3 - 1
myComponents/navBar/navBar.json

@@ -1,4 +1,6 @@
 {
   "component": true,
-  "usingComponents": {}
+  "usingComponents": {
+    "wux-safe-area": "/miniprogram_npm/wux-weapp/safe-area/index"
+  }
 }

+ 2 - 2
myComponents/navBar/navBar.wxml

@@ -2,7 +2,7 @@
 <!-- 自定义顶部栏 -->
 
 
-
+<wux-safe-area safeArea="top" wrapStyle="{{ { background: '#11c1f3'} }}" forceRender />
 	<view class="uni-pages">
          <!-- 自定义背景色,支持渐变色 -->
 		<view class="navigation" style="background:{{bgcolor}}">
@@ -11,7 +11,7 @@
 			<view class="nav-bar-inner">
                  <!-- 导航左边部分,是否显示操作胶囊 -->
 				<view class="image-box" wx:if="{{control}}"	style=" height:{{menuHeight}}px;width:{{menuWidth - 20}}px">
-          <view class="image iconfont myIconfanhui" style="font-size: 55rpx;" bind:tap="clickBack"></view>
+          <view class="image iconfont myIconfanhui" style="font-size: 40rpx;" bind:tap="clickBack"></view>
 					<view class="line"></view>
           <view class="image iconfont myIconzhuye1" bind:tap="clickHome"></view>
 				</view>

+ 8 - 0
myComponents/navBar/navBar.wxss

@@ -1,7 +1,13 @@
 /* myComponents/navBar/navBar.wxss */
 @import "/static/iconfont/iconfont.wxss";
+
 .uni-pages{
   background-color: #ffffff;
+  z-index: 999999;
+  position: fixed;
+  top: 0;
+  left: 0;
+  width: 100vw;
 }
 .nav-bar-inner {
   height: 32px;
@@ -27,6 +33,8 @@
 .image {
   width: 22px;
   height: 22px;
+  /* text-align: center; */
+  line-height: 22px;
 }
 .title {
   color: #000;

+ 6 - 1
myComponents/product/product.js

@@ -1,5 +1,6 @@
 // myComponents/product/product.js
 const app = getApp()
+const api = require('../../api/index')
 Component({
 
   /**
@@ -27,7 +28,7 @@ Component({
    * 组件的初始数据
    */
   data: {
-    imgHttp:app.globalData.imgHttp
+    imgHttp:app.globalData.imghttp
   },
 
   /**
@@ -75,6 +76,10 @@ Component({
     },
     //查看爆款产品专利
     checkMessage(){
+      var key = api.isLogin()
+      if(!key){
+        return false
+      }
       wx.navigateTo({
         url: '/pages/searchResults/searchResults',
       })

+ 2 - 1
myComponents/product/product.json

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

+ 11 - 10
myComponents/product/product.wxml

@@ -4,7 +4,8 @@
     <swiper class="swiper" autoplay="{{true}}" 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">  
-          <image src="{{imgHttp+img.guid}}" class="slide-image" />  
+          <!-- <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"/>   -->
         </swiper-item>  
       </block>  
@@ -17,31 +18,31 @@
         {{index + 1}}.{{item.name}}
       </view>
       <view class="icon">
-        <view class="iconfont myIconmonitor" data-index="{{index}}" bind:tap="control"></view>
-        <view class="iconfont myIconguanzhu" data-index="{{index}}" bind:tap="open"></view>
+        <view class="iconfont myIconmonitor" data-index="{{index}}" catch:tap="control"></view>
+        <view class="iconfont myIconguanzhu" data-index="{{index}}" catch:tap="open"></view>
       </view>
     </view>
-    <view class="product_operate" wx-if="{{item.show}}">
-    {{item.show}}
-      <view class="cancel" data-index="{{index}}" bind:tap="cancel">×</view>
+    <block wx:if="{{item.show == true}}">
+    <view  class="product_operate" >
+      <view class="cancel" data-index="{{index}}" catch:tap="cancel">×</view>
       <view class="grids"  bordered="{{ false }}">
-        <view class="grid" data-type="1" data-index="{{index}}" bind:tap="attention">
+        <view class="grid" data-type="1" data-index="{{index}}" catch:tap="attention">
           <view class="iconfont myIconanquanbangzhu operate_icon"></view>
           <view class="operate_text">白名单</view>
         </view>
         <view class="line"></view>
-        <view class="grid" data-type="1" data-index="{{index}}" bind:tap="attention">
+        <view class="grid" data-type="1" 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}}" bind:tap="attention">
+        <view class="grid" data-type="1" data-index="{{index}}" catch:tap="attention">
           <view class="iconfont myIconicon-test operate_icon"></view>
           <view class="operate_text">黑名单</view>
         </view>
       </view>
     </view>
-    
+  </block>
   </view>
   <view class="foot" wx:if="{{total && tableData.length>0}}">
     <view wx:if="{{total>tableData.length}}" bind:tap="loadMore">加载更多</view>

+ 6 - 1
myComponents/product/product.wxss

@@ -5,13 +5,18 @@
 }
 .slide-image {  
   width: 100%;  
-  height: 180rpx;  
+  height: 100%; 
+  /* object-fit: cover;  */
+  background-size:contain; /* 图片覆盖整个容器,可能部分图片不可见 */  
+  background-position: center; /* 图片居中显示 */  
+  background-repeat: no-repeat; /* 图片不重复 */  
 }
 
 .flex{
   width: 100%;  
   display: flex;
   justify-content: space-between;
+  align-items: center;
 }
 .icon{ 
   display: flex;

+ 73 - 18
pages/form/appeal/appeal.js

@@ -1,5 +1,6 @@
 // pages/form/appeal/appeal.js
 const upload = require("../../../utils/upload")
+const api = require('../../../api/index')
 import { $wuxForm} from '../../../miniprogram_npm/wux-weapp/index'
 Page({
 
@@ -11,16 +12,25 @@ Page({
       required: '%s 字段为必填',
     },
     form:{
-      type:0,
-      isOriginal:1,
-      complaintType:1,
+      complainAdinSite:'美国站',
+      complainedAdinSite:'美国站',
+      isOriginal:true,
+      complainedType:'商标',
+      ifTalked:true
     },
     labelWidth:350,
+    //站点
     countrys:[
-      { text: '美国站', value: 0 },
-      { text: '日本站', value: 1 },
-      { text: '德国站', value: 2 },
-      { text: '英国站', value: 3 },
+      { text: '美国站', value: '美国站' },
+      { text: '日本站', value: '日本站' },
+      { text: '德国站', value: '德国站' },
+      { text: '英国站', value: '英国站' },
+    ],
+    //被投诉类型
+    complainedTypes:[
+      { text: '商标', value: '商标' },
+      { text: '专利', value: '专利' },
+      { text: '版权', value: '版权' },
     ]
   },
 
@@ -91,15 +101,15 @@ Page({
   changRemark(e){
     this.setData(
       {
-        ["form.remark"]:e.detail.value
+        ["form.description"]:e.detail.value
       }
     )
   },
   //修改商品是否原创
-  onChange2(e){
+  onChange(e){
     this.setData(
       {
-        ["form.isOriginal"]:e.detail.value
+        ["form.isOriginal"]:e.detail
       }
     )
   },
@@ -107,29 +117,74 @@ Page({
   onChange1(e){
     this.setData(
       {
-        ["form.complaintType"]:e.detail.value
+        ["form.complainedType"]:e.detail
       }
     )
   },
-  //修改被投诉类型
+  //修改是否协商过
   onChange3(e){
     this.setData(
       {
-        ["form.haveNegotiated"]:e.detail.value
+        ["form.ifTalked"]:e.detail
       }
     )
   },
+  //修改下拉菜单值
+  changeVanDropdownnValue(e){
+    var label = e.currentTarget.dataset.label
+    if(label){
+      var detail = e.detail
+      this.setData(
+        {
+          ["form."+label]:detail
+        }
+      )
+    }
+  },
   //提交工单
   submit(){
+    var key = api.isLogin()
+    if(!key){
+      return false
+    }
     const { validateFields } = $wuxForm()
-    wx.navigateTo({
-      url: '/pages/successReminder/successReminder?id=1',
-    })
     validateFields((err, values) => {
       console.log(err)
-        if (!err) {
-
+      if (!err) {
+        var params = {
+          ticketType:3,
+          contactPerson:this.data.form.contactPerson,
+          contactPhone:this.data.form.contactPhone,
+          contactMail:this.data.form.contactMail,
+          fileGuids:this.data.form.fileGuids,
+          respondingAddDTO:this.data.form
         }
+        api.addTicket(params).then(res=>{
+          if(res.code == 200){
+            wx.navigateTo({
+              url: '/pages/successReminder/successReminder?id=3',
+            })
+          }
+        })
+      }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) {
+              
+            }
+          }
+        })
+      }
     })
   },
 

+ 21 - 23
pages/form/appeal/appeal.wxml

@@ -1,4 +1,4 @@
-<!--pages/form/appeal/appeal.wxml 申诉-->
+<!--pages/form/appeal/appeal.wxml 申诉3-->
 <navBar></navBar>
 <van-notify id="van-notify" />
 <view class="appeal">
@@ -12,21 +12,21 @@
       validateMessages="{{ validateMessages }}"
       bind:change="onValuesChange"
     >
-      <wux-field name="ADIN" initialValue="{{''}}" rules="{{ [{ required: true } ] }}">
-        <my-form-item labelWidth="{{labelWidth}}" custom-class="form_label">
+      <wux-field name="complainAdin" initialValue="{{''}}" rules="{{ [{ required: true,message:'投诉方ADIN号为必填' } ] }}">
+        <my-form-item labelWidth="{{labelWidth}}" required custom-class="form_label">
           <view slot="label" >
             <van-dropdown-menu custom-class="form_dropdown1">
-              <van-dropdown-item value="{{ form.type }}" options="{{ countrys }}" />
+              <van-dropdown-item value="{{ form.complainAdinSite }}" options="{{ countrys }}" data-label="complainAdinSite" bind:change="changeVanDropdownnValue"/>
             </van-dropdown-menu>
           </view>
           <wux-input  placeholder="请输入投诉方ADIN号" />
         </my-form-item>
       </wux-field>
-      <wux-field name="ADIN2" initialValue="{{''}}" rules="{{ [{ required: true } ] }}">
-        <my-form-item labelWidth="{{labelWidth}}" custom-class="form_label">
+      <wux-field name="complainedAdin" initialValue="{{''}}" rules="{{ [{ required: true,message:'投投诉方ADIN号为必填' } ] }}">
+        <my-form-item labelWidth="{{labelWidth}}" required custom-class="form_label">
           <view slot="label" >
             <van-dropdown-menu custom-class="form_dropdown1">
-              <van-dropdown-item value="{{ form.type }}" options="{{ countrys }}" />
+              <van-dropdown-item value="{{ form.complainedAdinSite }}" options="{{ countrys }}" data-label="complainedAdinSite" bind:change="changeVanDropdownnValue"/>
             </van-dropdown-menu>
           </view>
           <wux-input  placeholder="请输入被投诉方ADIN号" />
@@ -37,24 +37,22 @@
           <view slot="label" >
             商品是否原创
           </view>
-          <van-radio-group value="{{ form.isOriginal }}" bind:change="onChange2" >
+          <van-radio-group value="{{ form.isOriginal }}" bind:change="onChange" >
             <view class="form_radio">
-              <van-radio name="{{1}}">是</van-radio>
-              <van-radio name="{{2}}">否</van-radio>
+              <van-radio name="{{true}}">是</van-radio>
+              <van-radio name="{{false}}">否</van-radio>
             </view>
           </van-radio-group>
         </my-form-item>
       </wux-field>
-      <wux-field name="complaintType" initialValue="{{''}}">
+      <wux-field name="complainedType" initialValue="{{''}}">
         <my-form-item labelWidth="{{labelWidth}}" custom-class="form_label">
           <view slot="label" >
             被投诉类型
           </view>
-          <van-radio-group value="{{ form.complaintType }}" bind:change="onChange1" >
+          <van-radio-group value="{{ form.complainedType }}" bind:change="onChange1" >
             <view class="form_radio">
-              <van-radio name="{{1}}">商标</van-radio>
-              <van-radio name="{{2}}">专利</van-radio>
-              <van-radio name="{{3}}">版权</van-radio>
+              <van-radio wx:for="{{complainedTypes}}" wx:key="index" name="{{item.value}}">{{item.text}}</van-radio>
             </view>
           </van-radio-group>
         </my-form-item>
@@ -88,28 +86,28 @@
           </wux-upload>
         </my-form-item>
       </wux-field>
-      <wux-field name="haveNegotiated" initialValue="{{''}}">
+      <wux-field name="ifTalked" initialValue="{{''}}">
         <my-form-item labelWidth="{{labelWidth}}" custom-class="form_label">
           <view slot="label" >
             是否协商过
           </view>
-          <van-radio-group value="{{ form.haveNegotiated }}" bind:change="onChange3" >
+          <van-radio-group value="{{ form.ifTalked }}" bind:change="onChange3" >
             <view class="form_radio">
-              <van-radio name="{{1}}">是</van-radio>
-              <van-radio name="{{2}}">否</van-radio>
+              <van-radio name="{{true}}">是</van-radio>
+              <van-radio name="{{false}}">否</van-radio>
             </view>
           </van-radio-group>
         </my-form-item>
       </wux-field>
-      <wux-field name="phone" initialValue="{{''}}" rules="{{ [{ required: true },{validator:'checkPhone'} ] }}">
-        <my-form-item labelWidth="{{labelWidth}}" custom-class="form_label">
+      <wux-field name="contactPhone" initialValue="{{''}}" rules="{{ [{ required: true,message:'联系电话为必填' },{validator:'checkPhone'} ] }}">
+        <my-form-item labelWidth="{{labelWidth}}" required custom-class="form_label">
           <view slot="label" >
             联系电话
           </view>
           <wux-input maxlength="11" placeholder="请输入手机号" />
         </my-form-item>
       </wux-field>
-      <wux-field name="person" initialValue="{{''}}">
+      <wux-field name="contactPerson" initialValue="{{''}}">
         <my-form-item labelWidth="{{labelWidth}}" custom-class="form_label">
           <view slot="label" >
             联系人
@@ -122,7 +120,7 @@
       请详细说明被投诉全过程
     </view>
     <view class="value">
-      <wux-textarea value="{{ form.value }}" bind:change="changRemark"/>
+      <wux-textarea value="{{ form.description }}" bind:change="changRemark"/>
     </view>
     <view class="foot" bind:tap="submit">
       提交

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

@@ -14,9 +14,10 @@
 }
 .form_dropdown1 .van-dropdown-menu__title{
   color: #ffffff !important;
+  padding-left: 0 !important;
 }
 .form{
-  height: 1050rpx;
+  height: calc(100vh - 300rpx);
   margin-top: 10rpx;
 }
 .label{
@@ -25,6 +26,7 @@
   line-height: 60rpx;
   color: #ffffff;
   border-radius: 10rpx;
+  font-size: 14px;
 }
 .upload{
   margin: 15rpx 0;

+ 63 - 17
pages/form/application/application.js

@@ -1,5 +1,6 @@
 // pages/form/application/application.js
 const upload = require("../../../utils/upload")
+const api = require('../../../api/index')
 import { $wuxForm} from '../../../miniprogram_npm/wux-weapp/index'
 Page({
 
@@ -11,17 +12,17 @@ Page({
       required: '%s 字段为必填',
     },
     form:{
-      type:0,
-      isApplyOverseas:1,
-      hagueCertification:1,
+      appType:'发明专利',
+      appAbroad:true,
+      appApostille:true,
     },
     labelWidth:350,
     typeOptions:[
-      { text: '发明专利', value: 0 },
-      { text: '外观设计', value: 1 },
-      { text: '实用新型', value: 2 },
-      { text: '商标', value: 3 },
-      { text: '版权', value: 4 },
+      { text: '发明专利', value: '发明专利' },
+      { text: '外观设计', value: '外观设计' },
+      { text: '实用新型', value: '实用新型' },
+      { text: '商标', value: '商标' },
+      { text: '版权', value: '版权' },
     ]
   },
 
@@ -92,15 +93,15 @@ Page({
   changRemark(e){
     this.setData(
       {
-        ["form.remark"]:e.detail.value
+        ["form.description"]:e.detail.value
       }
     )
   },
   //修改是否海外申请
-  onChange2(e){
+  onChange(e){
     this.setData(
       {
-        ["form.isApplyOverseas"]:e.detail.value
+        ["form.appAbroad"]:e.detail
       }
     )
   },
@@ -108,21 +109,66 @@ Page({
   onChange1(e){
     this.setData(
       {
-        ["form.hagueCertification"]:e.detail.value
+        ["form.appApostille"]:e.detail
       }
     )
   },
+   //修改下拉菜单值
+   changeVanDropdownnValue(e){
+    var label = e.currentTarget.dataset.label
+    if(label){
+      var detail = e.detail
+      this.setData(
+        {
+          ["form."+label]:detail
+        }
+      )
+    }
+  },
   //提交工单
   submit(){
     const { validateFields } = $wuxForm()
-    wx.navigateTo({
-      url: '/pages/successReminder/successReminder?id=3',
-    })
+    var key = api.isLogin()
+    if(!key){
+      return false
+    }
     validateFields((err, values) => {
       console.log(err)
-        if (!err) {
-
+      if (!err) {
+        var params = {
+          ticketType:4,
+          contactPerson:this.data.form.contactPerson,
+          contactPhone:this.data.form.contactPhone,
+          contactMail:this.data.form.contactMail,
+          fileGuids:this.data.form.fileGuids,
+          ticketPatentApplyAddDTO:this.data.form
         }
+        api.addTicket(params).then(res=>{
+          if(res.code == 200){
+            wx.navigateTo({
+              url: '/pages/successReminder/successReminder?id=4',
+            })
+          }
+        })
+      }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) {
+              
+            }
+          }
+        })
+      }
     })
   },
 

+ 20 - 20
pages/form/application/application.wxml

@@ -1,4 +1,4 @@
-<!--pages/form/application/application.wxml 申请-->
+<!--pages/form/application/application.wxml 申请4-->
 <navBar></navBar>
 <van-notify id="van-notify" />
 <view class="application">
@@ -13,32 +13,32 @@
       bind:change="onValuesChange"
     >
       <wux-field name="applicationType" initialValue="{{''}}" rules="{{ [{ required: true } ] }}">
-        <my-form-item labelWidth="{{labelWidth}}" custom-class="form_label">
+        <my-form-item labelWidth="{{labelWidth}}" required custom-class="form_label">
           <view slot="label" >
             申请类型
           </view>
           <van-dropdown-menu custom-class="form_dropdown">
-            <van-dropdown-item value="{{ form.type }}" options="{{ typeOptions }}" />
+            <van-dropdown-item value="{{ form.appType }}" options="{{ typeOptions }}" data-label="appType" bind:change="changeVanDropdownnValue"/>
           </van-dropdown-menu>
         </my-form-item>
       </wux-field>
-      <wux-field name="applyingCountry" initialValue="{{''}}" rules="{{ [{ required: true } ] }}">
-        <my-form-item labelWidth="{{labelWidth}}" custom-class="form_label">
+      <wux-field name="appCountry" 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="industry" initialValue="{{''}}" rules="{{ [{ required: true } ] }}">
-        <my-form-item labelWidth="{{labelWidth}}" custom-class="form_label">
+      <wux-field name="industry" 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="technologyType" initialValue="{{''}}" rules="{{ [{ required: true } ] }}">
+      <wux-field name="techType" initialValue="{{''}}" rules="{{ [{ required: false } ] }}">
         <my-form-item labelWidth="{{labelWidth}}" custom-class="form_label">
           <view slot="label" >
             技术类型
@@ -46,41 +46,41 @@
           <wux-input  placeholder="请输入技术类型" />
         </my-form-item>
       </wux-field>
-      <wux-field name="isApplyOverseas" initialValue="{{''}}">
+      <wux-field name="appAbroad" initialValue="{{''}}">
         <my-form-item labelWidth="{{labelWidth}}" custom-class="form_label">
           <view slot="label" >
             是否海外申请
           </view>
-          <van-radio-group value="{{ form.isApplyOverseas }}" bind:change="onChange2" >
+          <van-radio-group value="{{ form.appAbroad }}" bind:change="onChange" >
             <view class="form_radio">
-              <van-radio name="{{1}}">是</van-radio>
-              <van-radio name="{{2}}">否</van-radio>
+              <van-radio name="{{true}}">是</van-radio>
+              <van-radio name="{{false}}">否</van-radio>
             </view>
           </van-radio-group>
         </my-form-item>
       </wux-field>
-      <wux-field name="hagueCertification" initialValue="{{''}}">
+      <wux-field name="appApostille" initialValue="{{''}}">
         <my-form-item labelWidth="{{labelWidth}}" custom-class="form_label">
           <view slot="label" >
             一同申请海牙认证
           </view>
-          <van-radio-group value="{{ form.hagueCertification }}" bind:change="onChange1" >
+          <van-radio-group value="{{ form.appApostille }}" bind:change="onChange1" >
             <view class="form_radio">
-              <van-radio name="{{1}}">是</van-radio>
-              <van-radio name="{{2}}">否</van-radio>
+              <van-radio name="{{true}}">是</van-radio>
+              <van-radio name="{{false}}">否</van-radio>
             </view>
           </van-radio-group>
         </my-form-item>
       </wux-field>
-      <wux-field name="phone" initialValue="{{''}}" rules="{{ [{ required: true },{validator:'checkPhone'} ] }}">
-        <my-form-item labelWidth="{{labelWidth}}" custom-class="form_label">
+      <wux-field name="contactPhone" initialValue="{{''}}" rules="{{ [{ required: true },{validator:'checkPhone'} ] }}">
+        <my-form-item labelWidth="{{labelWidth}}" required custom-class="form_label">
           <view slot="label" >
             联系电话
           </view>
           <wux-input maxlength="11" placeholder="请输入手机号" />
         </my-form-item>
       </wux-field>
-      <wux-field name="person" initialValue="{{''}}">
+      <wux-field name="contactPerson" initialValue="{{''}}">
         <my-form-item labelWidth="{{labelWidth}}" custom-class="form_label">
           <view slot="label" >
             联系人
@@ -99,7 +99,7 @@
       备注
     </view>
     <view class="value">
-      <wux-textarea value="{{ form.value }}" bind:change="changRemark"/>
+      <wux-textarea value="{{ form.description }}" bind:change="changRemark"/>
     </view>
     <view class="foot">
       <view></view>

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

@@ -5,7 +5,7 @@
   background-color: #ffffff;
 }
 .form{
-  height: 1050rpx;
+  height: calc(100vh - 300rpx);
   margin-top: 10rpx;
 }
 .label{
@@ -14,6 +14,7 @@
   line-height: 60rpx;
   color: #ffffff;
   border-radius: 10rpx;
+  font-size: 14px;
 }
 .upload{
   margin: 15rpx 0;

+ 85 - 38
pages/form/rightsProtection/rightsProtection.js

@@ -1,5 +1,6 @@
 // pages/form/rightsProtection/rightsProtection.js
 const upload = require("../../../utils/upload")
+const api = require('../../../api/index')
 import { $wuxForm} from '../../../miniprogram_npm/wux-weapp/index'
 Page({
 
@@ -11,32 +12,42 @@ Page({
       required: '%s 字段为必填',
     },
     form:{
-      type:0,
-      infringementType:0,
-      infringementClassify:0,
-      havePatentNo:1,
-      complaintType:1,
+      tortStoreAdinSite:'美国站',
+      tortType:'发明专利',
+      tortClassify:'产品侵权',
+      ifHavePatent:true,
+      problemDescription:'商品详细页上使用了未经授权的图片'
     },
     labelWidth:350,
+    //站点
     countrys:[
-      { text: '美国站', value: 0 },
-      { text: '日本站', value: 1 },
-      { text: '德国站', value: 2 },
-      { text: '英国站', value: 3 },
+      { text: '美国站', value: '美国站' },
+      { text: '日本站', value: '日本站' },
+      { text: '德国站', value: '德国站' },
+      { text: '英国站', value: '英国站' },
     ],
+    //侵权类型
     typeOptions:[
-      { text: '发明专利', value: 0 },
-      { text: '外观设计', value: 1 },
-      { text: '实用新型', value: 2 },
-      { text: '商标', value: 3 },
-      { text: '版权', value: 4 },
+      { text: '发明专利', value: '发明专利' },
+      { text: '外观设计', value: '外观设计' },
+      { text: '实用新型', value: '实用新型' },
+      { text: '商标', value: '商标' },
+      { text: '版权', value: '版权' },
     ],
-    typeOptions:[
-      { text: '产品侵权', value: 0 },
-      { text: '图片侵权', value: 1 },
-      { text: '背景侵权', value: 2 },
-      { text: '文字侵权', value: 3 },
+    //侵权分类
+    typeOptions2:[
+      { text: '产品侵权', value: '产品侵权' },
+      { text: '图片侵权', value: '图片侵权' },
+      { text: '背景侵权', value: '背景侵权' },
+      { text: '文字侵权', value: '文字侵权' },
     ],
+    //问题描述
+    problemDescriptions:[
+      { text: '商品详细页上使用了未经授权的图片', value: '商品详细页上使用了未经授权的图片' },
+      { text: '实际商品或其包装包含非盗版的未授权的内容', value: '实际商品或其包装包含非盗版的未授权的内容' },
+      { text: '商品详情页面上使用了未经授权的文本', value: '商品详情页面上使用了未经授权的文本' },
+      { text: '商品或其包装为盗版(全盘复制受版权保护的商品)', value: '商品或其包装为盗版(全盘复制受版权保护的商品)' },
+    ]
   },
 
   /**
@@ -66,7 +77,6 @@ Page({
    */
   //表单栏位值发生变化时
   onValuesChange(e) {
-    console.log(e)
     const { changedValues, allValues } = e.detail
     // this.setValues(changedValues)
     Object.keys(changedValues).forEach((field) => {
@@ -74,7 +84,6 @@ Page({
           ['form.'+field]: changedValues[field],
       })
     })
-    console.log('onValuesChange \n', changedValues, allValues)
   },
   //手机号校验
   checkPhone(rule, value){
@@ -106,44 +115,82 @@ Page({
   changRemark(e){
     this.setData(
       {
-        ["form.remark"]:e.detail.value
+        ["form.description"]:e.detail.value
       }
     )
   },
-  //修改商品是否原创
-  onChange2(e){
+  //修改是否拥有专利号
+  onChange(e){
     this.setData(
       {
-        ["form.isOriginal"]:e.detail.value
+        ["form.ifHavePatent"]:e.detail
       }
     )
   },
-  //修改被投诉类型
+  //修改哪一项最能描述您的问题?
   onChange1(e){
     this.setData(
       {
-        ["form.complaintType"]:e.detail.value
+        ["form.problemDescription"]:e.detail
       }
     )
   },
-  //修改被投诉类型
-  onChange3(e){
-    this.setData(
-      {
-        ["form.haveNegotiated"]:e.detail.value
-      }
-    )
+  //修改下拉菜单值
+  changeVanDropdownnValue(e){
+    var label = e.currentTarget.dataset.label
+    if(label){
+      var detail = e.detail
+      this.setData(
+        {
+          ["form."+label]:detail
+        }
+      )
+    }
   },
   //提交工单
   submit(){
+    var key = api.isLogin()
+    if(!key){
+      return false
+    }
     const { validateFields } = $wuxForm()
-    wx.navigateTo({
-      url: '/pages/successReminder/successReminder?id=2',
-    })
+    console.log(this.data.form)
     validateFields((err, values) => {
       console.log(err)
         if (!err) {
-
+          var params = {
+            ticketType:2,
+            contactPerson:this.data.form.contactPerson,
+            contactPhone:this.data.form.contactPhone,
+            contactMail:this.data.form.contactMail,
+            fileGuids:this.data.form.fileGuids,
+            protectionAddDTO:this.data.form
+          }
+          api.addTicket(params).then(res=>{
+            if(res.code == 200){
+              wx.navigateTo({
+                url: '/pages/successReminder/successReminder?id=2',
+              })
+            }
+          })
+        }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) {
+                
+              }
+            }
+          })
         }
     })
   },

+ 35 - 27
pages/form/rightsProtection/rightsProtection.wxml

@@ -1,4 +1,4 @@
-<!--pages/form/rightsProtection/rightsProtection.wxml 维权-->
+<!--pages/form/rightsProtection/rightsProtection.wxml 维权2-->
 <navBar></navBar>
 <van-notify id="van-notify" />
 <view class="appeal">
@@ -12,45 +12,45 @@
       validateMessages="{{ validateMessages }}"
       bind:change="onValuesChange"
     >
-      <wux-field name="ADIN" initialValue="{{''}}" rules="{{ [{ required: true } ] }}">
-        <my-form-item labelWidth="{{labelWidth}}" custom-class="form_label">
+      <wux-field name="tortStoreAdin" initialValue="{{''}}" rules="{{ [{ required: true,message:'侵权店铺ADIN号为必填' } ] }}">
+        <my-form-item labelWidth="{{labelWidth}}" required custom-class="form_label">
           <view slot="label" >
             <van-dropdown-menu custom-class="form_dropdown1">
-              <van-dropdown-item value="{{ form.type }}" options="{{ countrys }}" />
+              <van-dropdown-item value="{{ form.tortStoreAdinSite }}" options="{{ countrys }}" data-label="tortStoreAdinSite" bind:change="changeVanDropdownnValue"/>
             </van-dropdown-menu>
           </view>
-          <wux-input  placeholder="请输入投诉方ADIN号" />
+          <wux-input  placeholder="请输入侵权店铺ADIN号" />
         </my-form-item>
       </wux-field>
-      <wux-field name="infringementType" initialValue="{{''}}" rules="{{ [{ required: true } ] }}">
-        <my-form-item labelWidth="{{labelWidth}}" custom-class="form_label">
+      <wux-field name="tortType" initialValue="{{''}}" rules="{{ [{ required: true } ] }}">
+        <my-form-item labelWidth="{{labelWidth}}" required custom-class="form_label">
           <view slot="label" >
             侵权类型
           </view>
           <van-dropdown-menu custom-class="form_dropdown">
-            <van-dropdown-item value="{{ form.infringementType }}" options="{{ typeOptions }}" />
+            <van-dropdown-item value="{{ form.tortType }}" options="{{ typeOptions }}" data-label="tortType" bind:change="changeVanDropdownnValue"/>
           </van-dropdown-menu>
         </my-form-item>
       </wux-field>
-      <wux-field name="infringementClassify" initialValue="{{''}}" rules="{{ [{ required: true } ] }}">
-        <my-form-item labelWidth="{{labelWidth}}" custom-class="form_label">
+      <wux-field name="tortClassify" initialValue="{{''}}" rules="{{ [{ required: true } ] }}">
+        <my-form-item labelWidth="{{labelWidth}}" required custom-class="form_label">
           <view slot="label" >
             侵权分类
           </view>
           <van-dropdown-menu custom-class="form_dropdown">
-            <van-dropdown-item value="{{ form.infringementClassify }}" options="{{ typeOptions2 }}" />
+            <van-dropdown-item value="{{ form.tortClassify }}" options="{{ typeOptions2 }}" data-label="tortClassify" bind:change="changeVanDropdownnValue"/>
           </van-dropdown-menu>
         </my-form-item>
       </wux-field>
-      <wux-field name="havePatentNo" initialValue="{{''}}">
+      <wux-field name="ifHavePatent" initialValue="{{''}}">
         <my-form-item labelWidth="{{labelWidth}}" custom-class="form_label">
           <view slot="label" >
             是否拥有专利号
           </view>
-          <van-radio-group value="{{ form.havePatentNo }}" bind:change="onChange2" >
+          <van-radio-group value="{{ form.ifHavePatent }}" bind:change="onChange" >
             <view class="form_radio">
-              <van-radio name="{{1}}">是</van-radio>
-              <van-radio name="{{2}}">否</van-radio>
+              <van-radio name="{{true}}">是</van-radio>
+              <van-radio name="{{false}}">否</van-radio>
             </view>
           </van-radio-group>
         </my-form-item>
@@ -65,21 +65,29 @@
       </wux-field>
 
 
-      <wux-field name="question" initialValue="{{''}}">
+      <wux-field name="problemDescription" initialValue="{{''}}">
         <view class="label">
           哪一项最能描述您的问题?
         </view>
         <view>
-          <van-radio-group value="{{ form.havePatentNo }}" bind:change="onChange2" >
-              <van-radio name="{{1}}">商品详细页上使用了未经授权的图片</van-radio>
-              <van-radio name="{{2}}">实际商品或其包装包含非盗版的未授权的内容</van-radio>
-              <van-radio name="{{3}}">商品详情页面上使用了未经授权的文本</van-radio>
-              <van-radio name="{{4}}">商品或其包装为盗版(全盘复制受版权保护的商品)</van-radio>
+          <van-radio-group value="{{ form.problemDescription }}" bind:change="onChange1" >
+            <view class="van-radio_item" wx:for="{{problemDescriptions}}" wx:key="index">
+              <van-radio name="{{item.value}}">{{item.text}}</van-radio>
+            </view>
+            <!-- <view class="van-radio_item">
+              <van-radio name="2">实际商品或其包装包含非盗版的未授权的内容</van-radio>
+            </view>
+            <view class="van-radio_item">
+              <van-radio name="3">商品详情页面上使用了未经授权的文本</van-radio>
+            </view>
+            <view class="van-radio_item">
+              <van-radio name="4">商品或其包装为盗版(全盘复制受版权保护的商品)</van-radio>
+            </view> -->
           </van-radio-group>
         </view>
       </wux-field>
-      <wux-field name="url" initialValue="{{''}}" rules="{{ [{ required: true },{type:'url'} ] }}">
-        <my-form-item labelWidth="{{labelWidth}}" custom-class="form_label">
+      <wux-field name="tortStoreLink" initialValue="{{''}}" rules="{{ [{ required: true,message:'侵权店铺的链接为必填' },{type:'url',message:'侵权店铺的链接错误'} ] }}">
+        <my-form-item labelWidth="{{labelWidth}}" required custom-class="form_label">
           <view slot="label" >
             侵权店铺的链接
           </view>
@@ -87,15 +95,15 @@
         </my-form-item>
       </wux-field>
 
-      <wux-field name="phone" initialValue="{{''}}" rules="{{ [{ required: true },{validator:'checkPhone'} ] }}">
-        <my-form-item labelWidth="{{labelWidth}}" custom-class="form_label">
+      <wux-field name="contactPhone" initialValue="{{''}}" rules="{{ [{ required: true },{validator:'checkPhone'} ] }}">
+        <my-form-item labelWidth="{{labelWidth}}" required custom-class="form_label">
           <view slot="label" >
             联系电话
           </view>
           <wux-input maxlength="11" placeholder="请输入手机号" />
         </my-form-item>
       </wux-field>
-      <wux-field name="person" initialValue="{{''}}">
+      <wux-field name="contactPerson" initialValue="{{''}}">
         <my-form-item labelWidth="{{labelWidth}}" custom-class="form_label">
           <view slot="label" >
             联系人
@@ -108,7 +116,7 @@
       请提供更多信息,以便于我们了解您的问题
     </view>
     <view class="value">
-      <wux-textarea value="{{ form.value }}" placeholder="请输入版权作品的链接或者注册编号" bind:change="changRemark"/>
+      <wux-textarea value="{{ form.description }}" placeholder="请输入版权作品的链接或者注册编号" bind:change="changRemark"/>
     </view>
     <view class="foot" bind:tap="submit">
       提交

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

@@ -14,9 +14,10 @@
 }
 .form_dropdown1 .van-dropdown-menu__title{
   color: #ffffff !important;
+  padding-left: 0 !important;
 }
 .form{
-  height: 1050rpx;
+  height: calc(100vh - 300rpx);
   margin-top: 10rpx;
 }
 .label{
@@ -25,6 +26,7 @@
   line-height: 60rpx;
   color: #ffffff;
   border-radius: 10rpx;
+  font-size: 14px;
 }
 .upload{
   margin: 15rpx 0;
@@ -47,3 +49,7 @@
   text-align: center;
   border-radius: 15rpx;
 }
+.van-radio_item{
+  margin-top: 10rpx;
+  font-size: 14px !important;
+}

+ 44 - 26
pages/form/riskAssessment/riskAssessment.js

@@ -1,6 +1,6 @@
 // pages/form/riskAssessment/riskAssessment.js
-// pages/form/application/application.js
 const upload = require("../../../utils/upload")
+const api = require('../../../api/index')
 import { $wuxForm} from '../../../miniprogram_npm/wux-weapp/index'
 Page({
 
@@ -12,16 +12,9 @@ Page({
       required: '%s 字段为必填',
     },
     form:{
-      unableExport:1
+      unableExport:true
     },
     labelWidth:350,
-    typeOptions:[
-      { text: '发明专利', value: 0 },
-      { text: '外观设计', value: 1 },
-      { text: '实用新型', value: 2 },
-      { text: '商标', value: 3 },
-      { text: '版权', value: 4 },
-    ]
   },
 
   /**
@@ -91,37 +84,62 @@ Page({
   changRemark(e){
     this.setData(
       {
-        ["form.remark"]:e.detail.value
+        ["form.description"]:e.detail.value
       }
     )
   },
-  //修改是否海外申请
-  onChange2(e){
+  //修改专利无法导出?
+  onChange(e){
     this.setData(
       {
-        ["form.isApplyOverseas"]:e.detail.value
-      }
-    )
-  },
-  //修改一同申请海牙认证
-  onChange1(e){
-    this.setData(
-      {
-        ["form.hagueCertification"]:e.detail.value
+        ["form.patentExport"]:e.detail
       }
     )
   },
   //提交工单
   submit(){
+    var key = api.isLogin()
+    if(!key){
+      return false
+    }
     const { validateFields } = $wuxForm()
-    wx.navigateTo({
-      url: '/pages/successReminder/successReminder?id=4',
-    })
     validateFields((err, values) => {
       console.log(err)
-        if (!err) {
-
+      if (!err) {
+        var params = {
+          ticketType:1,
+          contactPerson:this.data.form.contactPerson,
+          contactPhone:this.data.form.contactPhone,
+          contactMail:this.data.form.contactMail,
+          fileGuids:this.data.form.fileGuids,
+          ticketFillInAddDTO:this.data.form
         }
+        api.addTicket(params).then(res=>{
+          if(res.code == 200){
+            wx.navigateTo({
+              url: '/pages/successReminder/successReminder?id=1',
+            })
+          }
+        })
+      }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) {
+              
+            }
+          }
+        })
+      }
     })
   },
 

+ 13 - 13
pages/form/riskAssessment/riskAssessment.wxml

@@ -1,4 +1,4 @@
-<!--pages/form/riskAssessment/riskAssessment.wxml 查风险-->
+<!--pages/form/riskAssessment/riskAssessment.wxml 查风险1-->
 <navBar></navBar>
 <van-notify id="van-notify" />
 <view class="application">
@@ -12,15 +12,15 @@
       validateMessages="{{ validateMessages }}"
       bind:change="onValuesChange"
     >
-      <wux-field name="companyName" initialValue="{{''}}" rules="{{ [{ required: true } ] }}">
-        <my-form-item labelWidth="{{labelWidth}}" custom-class="form_label">
+      <wux-field name="companyName" 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="person" initialValue="{{''}}">
+      <wux-field name="contactPerson" initialValue="{{''}}">
         <my-form-item labelWidth="{{labelWidth}}" custom-class="form_label">
           <view slot="label" >
             联系人
@@ -28,31 +28,31 @@
           <wux-input maxlength="11" placeholder="请输入联系人" />
         </my-form-item>
       </wux-field>
-      <wux-field name="phone" initialValue="{{''}}" rules="{{ [{ required: true },{validator:'checkPhone'} ] }}">
-        <my-form-item labelWidth="{{labelWidth}}" custom-class="form_label">
+      <wux-field name="contactPhone" initialValue="{{''}}" rules="{{ [{ required: true },{validator:'checkPhone'} ] }}">
+        <my-form-item labelWidth="{{labelWidth}}" required custom-class="form_label">
           <view slot="label" >
             联系电话
           </view>
           <wux-input maxlength="11" placeholder="请输入手机号" />
         </my-form-item>
       </wux-field>
-      <wux-field name="email" initialValue="{{''}}" rules="{{ [{ required: true },{type:'emain'} ] }}">
-        <my-form-item labelWidth="{{labelWidth}}" custom-class="form_label">
+      <wux-field name="contactMail" initialValue="{{''}}" rules="{{ [{ required: true,message:'邮箱不能为空' },{type:'emain',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="unableExport" initialValue="{{''}}">
+      <wux-field name="patentExport" initialValue="{{''}}">
         <my-form-item labelWidth="{{labelWidth}}" custom-class="form_label">
           <view slot="label" >
             专利无法导出
           </view>
-          <van-radio-group value="{{ form.unableExport }}" bind:change="onChange2" >
+          <van-radio-group value="{{ form.patentExport }}" bind:change="onChange" >
             <view class="form_radio">
-              <van-radio name="{{1}}">是</van-radio>
-              <van-radio name="{{2}}">否</van-radio>
+              <van-radio name="{{true}}">是</van-radio>
+              <van-radio name="{{false}}">否</van-radio>
             </view>
           </van-radio-group>
         </my-form-item>
@@ -68,7 +68,7 @@
       请问您遇到什么问题了呢?
     </view>
     <view class="value">
-      <wux-textarea value="{{ form.value }}" bind:change="changRemark"/>
+      <wux-textarea value="{{ form.description }}" bind:change="changRemark"/>
     </view>
     <view class="foot" bind:tap="submit">
       提交

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

@@ -5,7 +5,7 @@
   background-color: #ffffff;
 }
 .form{
-  height: 1050rpx;
+  height: calc(100vh - 300rpx);
   margin-top: 10rpx;
 }
 .label{
@@ -14,6 +14,7 @@
   line-height: 60rpx;
   color: #ffffff;
   border-radius: 10rpx;
+  font-size: 14px;
 }
 .upload{
   margin: 15rpx 0;

+ 1 - 1
pages/hotProduct/hotProduct.js

@@ -16,7 +16,7 @@ Page({
     },
     total:25,
     loading:false,
-    scrollTop: 0,
+    scrollTop: 10,
   },
 
   /**

+ 1 - 1
pages/index/index.wxss

@@ -16,7 +16,7 @@ page {
   width: 200rpx;
   height: 100rpx;
   margin: auto;
-  object-fit: cover;
+  object-fit:contain;
 }
 .title{
   text-align: center;

+ 47 - 6
pages/mine/mine.js

@@ -1,5 +1,6 @@
 // pages/mine/mine.js
 const api = require('../../api/index')
+const app = getApp()
 Page({
 
   /**
@@ -43,28 +44,52 @@ Page({
       },
     ],
     isLogin:false,
-    userinfo:{}
+    userinfo:{},
+    imgHttp:app.globalData.imghttp,
+    show:false,
+    actions: [
+      {
+        name: '编辑信息',
+        page:''
+      },
+    ]
   },
 
   /**
    * 生命周期函数--监听页面加载
    */
   onLoad(options) {
-    this.getUserinfo()
+    // this.getUserinfo()
   },
 
   /**
    * 生命周期函数--监听页面初次渲染完成
    */
   onReady() {
-
+    
   },
 
   /**
    * 生命周期函数--监听页面显示
    */
   onShow() {
-    
+   var token = wx.getStorageSync('token')
+   if(token){
+     if(!this.data.isLogin){
+       this.getUserinfo()
+       this.setData(
+        {
+          isLogin:true
+        }
+      )
+     }
+   }else{
+     this.setData(
+       {
+         isLogin:false
+       }
+     )
+   }
   },
 
 
@@ -73,7 +98,7 @@ Page({
    */
   //获取用户信息
   getUserinfo(){
-    api.selectPerson().then(res=>{
+    api.selectPerson({},false).then(res=>{
       if(res.code == 200){
         this.setData(
           {
@@ -97,6 +122,22 @@ Page({
       url: '/pages/login/login',
     })
   },
+  //修改个人信息
+  editMessage(){
+    this.setData(
+      {
+        show:true
+      }
+    )
+  },
+  //关闭底部弹窗
+  onClose() {
+    this.setData({ show: false });
+  },
+  //选择弹窗选项
+  onSelect(event) {
+    console.log(event.detail);
+  },
   //点击菜单
   clickMenu(e){
     var page = e.currentTarget.dataset.page
@@ -106,7 +147,7 @@ Page({
         url: page,
       })
     }else{
-      var token = wx.setStorageSync('token')
+      var token = wx.getStorageSync('token')
       if(token){
         wx.navigateTo({
           url: page,

+ 2 - 1
pages/mine/mine.json

@@ -4,6 +4,7 @@
     "wux-avatar":"/miniprogram_npm/wux-weapp/avatar/index",
     "van-cell": "/miniprogram_npm/@vant/weapp/cell/index",
     "van-cell-group": "/miniprogram_npm/@vant/weapp/cell-group/index",
-    "van-icon":"/miniprogram_npm/@vant/weapp/icon/index"
+    "van-icon":"/miniprogram_npm/@vant/weapp/icon/index",
+    "van-action-sheet": "/miniprogram_npm/@vant/weapp/action-sheet/index"
   }
 }

+ 18 - 12
pages/mine/mine.wxml

@@ -1,12 +1,19 @@
 <!--pages/mine/mine.wxml-->
 <van-notify id="van-notify" />
+<van-action-sheet
+  show="{{ show }}"
+  actions="{{ actions }}"
+  bind:close="onClose"
+  bind:select="onSelect"
+/>
 <view class="mine">
   <view class="head flex" wx:if="{{isLogin}}">
     <view class="flex">
-      <wux-avatar size="large" src="/static/image/logo-3.png"></wux-avatar>
+      <wux-avatar size="large" wx:if="{{userinfo.fileGuid}}" src="imgHttp{{userinfo.fileGuid}}" bind:tap="editMessage"></wux-avatar>
+      <wux-avatar size="large" wx:else src="/static/image/unlogin.jpeg" bind:tap="editMessage"></wux-avatar>
       <view class="message">
-        <view class="name">小世科技有限公司</view>
-        <view class="type"> <text class="iconfont myIconrenyuan icon"></text> 普通会员</view>
+        <view class="name">{{userinfo.name || userinfo.phoneNum}}</view>
+        <view class="type"> <text class="iconfont myIconrenyuan icon"></text> 普通用户</view>
       </view>
     </view>
     <view class="right" bind:tap="openVIP">
@@ -22,25 +29,24 @@
         <!-- <view> </view> -->
       </view>
     </view>
-    <view class="right" bind:tap="login">
+    <view class="right" bind:tap="login" style="font-size: 25rpx;">
       立即登录
     </view>
   </view>
   <wux-divider wux-class="line" show-text="{{ false }}" />
-  <view class="menu_icon">
+  <!-- <view class="menu_icon">
     <view class="menu_icon_item" wx:for="{{menu2}}" data-page="{{item.page}}" bind:tap="clickMenu">
       <view class="iconfont {{item.icon}} menu_icon_size"></view>
       <view>{{item.label}}</view>
     </view>
-  </view>
-  <wux-divider wux-class="line" show-text="{{ false }}" />
+  </view> -->
+  <!-- <wux-divider wux-class="line" show-text="{{ false }}" /> -->
   <view class="menu_list">
-      <!-- <view class="menu_list_item" wx:for="{{menu1}}">
-        <view class="menu_list_lable">{{ item.label }}</view>
-        <view class="menu_list_icon"> > </view>
-      </view> -->
-      <van-cell custom-class='vanCell' wx:for="{{menu1}}" title="{{item.label}}" is-link data-page="{{item.page}}" data-login="{{true}}" bind:click="clickMenu">
+      <van-cell custom-class='vanCell' wx:for="{{menu2}}" wx:key="index" title="{{item.label}}" is-link data-page="{{item.page}}" bind:click="clickMenu">
         <van-icon slot="right-icon" name="arrow" color="green" />
       </van-cell>
+      <!-- <van-cell custom-class='vanCell' wx:for="{{menu1}}" title="{{item.label}}" is-link data-page="{{item.page}}" data-login="{{true}}" bind:click="clickMenu">
+        <van-icon slot="right-icon" name="arrow" color="green" />
+      </van-cell> -->
   </view>
 </view>

+ 2 - 1
pages/monitor/monitor.js

@@ -12,7 +12,8 @@ Page({
       current:1,
       size:10
     },
-    total:0
+    total:0,
+    scrollTop: 10,
   },
 
   /**

+ 1 - 1
pages/monitor/monitor.wxss

@@ -17,6 +17,6 @@
   flex: 1;
   overflow-y: hidden;
   margin-top: 15rpx;
-  height: calc(100vh - 280rpx);
+  height: calc(100vh - 300rpx);
   box-sizing: border-box;
 }

+ 2 - 1
pages/myFollow/myFollow.js

@@ -39,7 +39,8 @@ Page({
         checked:false
       },
     ],
-    checked:[]
+    checked:[],
+    scrollTop: 10,
   },
 
   /**

+ 1 - 1
pages/myFollow/myFollow.wxss

@@ -33,6 +33,6 @@
 .main{
   flex: 1;
   overflow-y: hidden;
-  height: calc(100vh - 300rpx);
+  height: calc(100vh - 320rpx);
   box-sizing: border-box;
 }

+ 32 - 2
pages/myWork/myWork.js

@@ -15,7 +15,27 @@ Page({
     },
     total:0,
     loading:false,
-    imgHttp:app.globalData.imgHttp
+    imgHttp:app.globalData.imghttp,
+    scrollTop: 10,
+    ticketTypeFiled:{
+      '1':'ticketFillInAddDTO',
+      '2':'protectionAddDTO',
+      '3':'respondingAddDTO',
+      '4':'ticketPatentApplyAddDTO'
+    },
+    ticketTypes:{
+      '1':'我要查风险',
+      '2':'我要维权',
+      '3':'我要申诉',
+      '4':'我要申请'
+    },
+    ticketProgress:{
+      '1':'等待受理',
+      '2':'已受理,待支付',
+      '3':'正在处理中',
+      '4':'完成',
+      '5':'取消'
+    }
   },
 
   /**
@@ -83,7 +103,17 @@ Page({
   },
   //获取检索记录
   getMyWork(){
-
+    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
+          }
+        )
+      }
+    })
   },
   //加载更多
   loadMore(){

+ 102 - 7
pages/myWork/myWork.wxml

@@ -1,6 +1,7 @@
 <!--pages/myWork/myWork.wxml 我的工单-->
+
 <navBar></navBar>
-<van-notify id="van-notify" />
+<van-notify id="van-notify"/>
 <wux-refresher
   id="wux-refresher"
   bind:pulling="onPulling"
@@ -9,19 +10,113 @@
 >
 <view class="myWork">
   <view class="head">
-    <text>检索记录</text>
+    <text>提交工单记录</text>
   </view>
   <scroll-view wx:if="{{tableData.length>0}}" type="list" scroll-y class="main">
-    <block wx:for="{{tableData}}" wx:key="index">
+    <block wx:for="{{tableData}}" wx:for-item="item" wx:key="index">
       <myCard>
-        <view slot="head_left">
-          {{index}}{{item.name}}
+        <view slot="head_left" class="head_left">
+          {{index + 1}}. {{ticketTypes[item.ticketType]}}-工单
         </view>
         <view slot="head_right">
-          {{item.status}}
+          {{ticketProgress[item.ticketProgress]}}
         </view>
         <view>
-          content
+          <view class="content" wx:if="{{item.ticketType == 4}}">
+            <view class="content_item">
+              申请类型:{{item[ticketTypeFiled[item.ticketType]].appType}}
+            </view>
+            <view class="content_item">
+              申请国家:{{item[ticketTypeFiled[item.ticketType]].appCountry}}
+            </view>
+            <view class="content_item" wx:if="{{item[ticketTypeFiled[item.ticketType]].industry}}">
+              所属行业:{{item[ticketTypeFiled[item.ticketType]].industry}}
+            </view>
+            <view class="content_item" wx:if="{{item[ticketTypeFiled[item.ticketType]].techType}}">
+              技术类型:{{item[ticketTypeFiled[item.ticketType]].techType}}
+            </view>
+            <view class="content_item">
+              是否海外申请:{{item[ticketTypeFiled[item.ticketType]].appAbroad?'是':'否'}}
+            </view>
+            <view class="content_item">
+              一同申请海牙认证:{{item[ticketTypeFiled[item.ticketType]].appApostille?'是':'否'}}
+            </view>
+            <view class="content_item">
+              <!-- 附图:{{item[ticketTypeFiled[item.ticketType]].appType}} -->
+            </view>
+            <view class="content_item">
+              备注:{{item[ticketTypeFiled[item.ticketType]].description}}
+            </view>
+          </view>
+          <view class="content" wx:if="{{item.ticketType == 3}}">
+            <view class="content_item">
+              投诉方:{{item[ticketTypeFiled[item.ticketType]].complainAdinSite}}-{{item[ticketTypeFiled[item.ticketType]].complainAdin}}
+            </view>
+            <view class="content_item">
+              被投诉方:{{item[ticketTypeFiled[item.ticketType]].complainedAdinSite}}-{{item[ticketTypeFiled[item.ticketType]].complainedAdin}}
+            </view>
+            <view class="content_item">
+              商品是否原创:{{item[ticketTypeFiled[item.ticketType]].ifOriginal?'是':'否'}}
+            </view>
+            <view class="content_item">
+              被投诉类型:{{item[ticketTypeFiled[item.ticketType]].complainedType}}
+            </view>
+            <view class="content_item" wx:if="{{item[ticketTypeFiled[item.ticketType]].patentNo}}">
+              专利号:{{item[ticketTypeFiled[item.ticketType]].patentNo}}
+            </view>
+            <view class="content_item">
+              <!-- 附图:{{item[ticketTypeFiled[item.ticketType]].appType}} -->
+            </view>
+            <view class="content_item">
+              是否协商过:{{item[ticketTypeFiled[item.ticketType]].ifTalked?'是':'否'}}
+            </view>
+            <view class="content_item">
+              详情:{{item[ticketTypeFiled[item.ticketType]].description}}
+            </view>
+          </view>
+          <view class="content" wx:if="{{item.ticketType == 2}}">
+            <view class="content_item">
+              侵权店铺:{{item[ticketTypeFiled[item.ticketType]].tortStoreAdinSite}}-{{item[ticketTypeFiled[item.ticketType]].tortStoreAdin}}
+            </view>
+            <view class="content_item">
+              侵权类型:{{item[ticketTypeFiled[item.ticketType]].tortType}}
+            </view>
+            <view class="content_item">
+              侵权分类:{{item[ticketTypeFiled[item.ticketType]].tortClassify}}
+            </view>
+            <view class="content_item">
+              是否拥有专利号:{{item[ticketTypeFiled[item.ticketType]].ifHavePatent?'是':'否'}}
+            </view>
+            <view class="content_item" wx:if="{{item[ticketTypeFiled[item.ticketType]].patentNo}}">
+              专利号:{{item[ticketTypeFiled[item.ticketType]].patentNo}}
+            </view>
+            <view class="content_item">
+              描述:{{item[ticketTypeFiled[item.ticketType]].problemDescription}}
+            </view>
+            <view class="content_item">
+              店铺链接:{{item[ticketTypeFiled[item.ticketType]].tortStoreLink}}
+            </view>
+            <view class="content_item" >
+              其他信息:{{item[ticketTypeFiled[item.ticketType]].description}}
+            </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>
+            <view class="content_item">
+              专利无法导出?:{{item[ticketTypeFiled[item.ticketType]].tortClassify}}
+            </view>
+            <view class="content_item">
+              附图:{{item[ticketTypeFiled[item.ticketType]].ifHavePatent?'是':'否'}}
+            </view>
+            <view class="content_item">
+              具体问题:{{item[ticketTypeFiled[item.ticketType]].description}}
+            </view>
+          </view>
+          <view class="content_item">
+            创建时间:{{item.createTime}}
+          </view>
         </view>
       </myCard>
     </block>

+ 9 - 2
pages/myWork/myWork.wxss

@@ -16,7 +16,14 @@
 .main{
   flex: 1;
   overflow-y: hidden;
-  margin-top: 15rpx;
-  height: calc(100vh - 280rpx);
+  height: calc(100vh - 300rpx);
   box-sizing: border-box;
+}
+.head_left{
+  color: var(--themeColor);
+  font-weight: bold;
+}
+.content_item{
+  margin: 5px 0;
+  color: var(--themeColor);
 }

+ 2 - 1
pages/riskAssessment/riskAssessment.js

@@ -8,7 +8,8 @@ Page({
    */
   data: {
     tableData:[],
-    keyword:''
+    keyword:'',
+    scrollTop: 10,
   },
 
   /**

+ 2 - 1
pages/searchRecords/searchRecords.js

@@ -15,7 +15,8 @@ Page({
     },
     total:0,
     loading:false,
-    imgHttp:app.globalData.imgHttp
+    imgHttp:app.globalData.imghttp,
+    scrollTop: 10,
   },
 
   /**

+ 3 - 2
pages/searchResults/searchResults.js

@@ -8,7 +8,7 @@ Page({
    */
   data: {
     product:{},
-    imgHttp:app.globalData.imgHttp,
+    imgHttp:app.globalData.imghttp,
     queryParams:{
       current:1,
       size:10
@@ -16,7 +16,8 @@ Page({
     total:0,
     loading:false,
     tableData:[],
-    keyword:''
+    keyword:'',
+    scrollTop:10
   },
 
   /**

+ 1 - 1
pages/selectedPatents/selectedPatents.js

@@ -6,7 +6,7 @@ Page({
    * 页面的初始数据
    */
   data: {
-    imgHttp:app.globalData.imgHttp,
+    imgHttp:app.globalData.imghttp,
     tableData:[],
   },
 

+ 3 - 3
pages/successReminder/successReminder.js

@@ -15,7 +15,7 @@ Page({
   onLoad(options) {
     const types = [
       {
-        id:1,
+        id:3,
         type:'申诉',
         description:'为保证申诉顺利性,请先下架被投诉产品链接'
       },
@@ -25,12 +25,12 @@ Page({
         description:'为保证您的知识产品,请继续留意侵权方向'
       },
       {
-        id:3,
+        id:1,//查风险
         type:'',
         description:''
       },
       {
-        id:4,
+        id:4,//申请
         type:'',
         description:''
       },

+ 34 - 13
utils/request.js

@@ -1,24 +1,33 @@
 // request.js  
 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 config = {  
-  baseURL: 'http://192.168.1.16:8901', // 基础URL  
+  // baseURL: 'http://192.168.1.2:8901', // 基础URL  
+  baseURL: 'https://www.xsip.cn', // 基础URL  
   timeout: 30000, // 超时时间(单位ms)  
   header: {  
     'content-type': 'application/json', // 默认请求头  
-    "token":token
+    
     // 其他全局请求头...  
   },  
   // 其他全局配置...  
+  tabbar:["pages/index/index","pages/hotProduct/hotProduct","pages/mine/mine"]
 };  
   
 // 封装请求方法  
-function request(url, method = 'GET', data = {}, header = {}) {  
+function request(url, method = 'GET', data = {}, header = {},isLogin=true) {  
   return new Promise((resolve, reject) => {  
+    var obj = {
+      type: 'danger'
+    }
+    var pages = getCurrentPages()
+    var route = pages[pages.length - 1]?.route
+    if(config.tabbar.indexOf(route)==-1){
+      obj.top = "90"
+    }
     wx.request({  
       url: config.baseURL + url,  
       method: method.toUpperCase(),  
@@ -26,6 +35,7 @@ function request(url, method = 'GET', data = {}, header = {}) {
       header: {  
         ...config.header,  
         ...header,  
+        "Cookie": "token="+wx.getStorageSync('token')
       },  
       timeout: config.timeout,  
       success: function(res){  
@@ -35,13 +45,18 @@ function request(url, method = 'GET', data = {}, header = {}) {
         } else {  
           switch(res.data.code){
             case 401:
-              Notify({ type: 'danger', message: '未登录' });
-              wx.navigateTo({
-                url: '/pages/login/login',
-              })
+              if(isLogin){
+                // Notify({ type: 'danger', message: '未登录',top:'90' });
+                obj.message = '未登录'
+                wx.navigateTo({
+                  url: '/pages/login/login',
+                })
+              }
+              wx.setStorageSync('token', '')
               break;
             default:
-              Notify({ type: 'danger', message: '请求失败' });
+              obj.message = '请求失败'
+              // Notify({ type: 'danger', message: '请求失败',top:'90' });
              
           }
           // wx.showToast({
@@ -49,8 +64,12 @@ function request(url, method = 'GET', data = {}, header = {}) {
           //   icon: 'error',
           //   duration: 2000
           // })
+          Notify(obj)
           reject(res.data.message || '未知错误');  
         }  
+        if($stopWuxRefresher()){
+          $stopWuxRefresher()
+        }
       },  
       fail: function(error) { 
         console.log(error) 
@@ -61,7 +80,9 @@ function request(url, method = 'GET', data = {}, header = {}) {
         //   icon: 'error',
         //   duration: 2000
         // })
-        Notify({ type: 'danger', message: '请求失败' });
+        obj.message = '请求失败'
+        // Notify({ type: 'danger', message: '请求失败',top:'90' });
+        Notify(obj)
         reject(error);  
       },  
     });  
@@ -70,8 +91,8 @@ function request(url, method = 'GET', data = {}, header = {}) {
   
 // 导出请求方法  
 module.exports = {  
-  get: (url, data, header) => request(url, 'GET', data, header),  
-  post: (url, data, header) => request(url, 'POST', data, header),  
+  get: (url, data,isLogin, header) => request(url, 'GET', data, header,isLogin),  
+  post: (url, data,isLogin, header) => request(url, 'POST', data, header,isLogin),  
   // 可以继续添加其他方法,如put, delete等  
   // ...  
 };

+ 2 - 1
utils/upload.js

@@ -1,7 +1,8 @@
 // 配置项  
 const token = wx.getStorageSync('token')
 const config = {  
-  baseURL: 'http://192.168.1.6:8801', // 基础URL  
+  // baseURL: 'http://192.168.1.6:8801', // 基础URL 
+  baseURL: 'https://www.xsip.cn', // 基础URL   
   timeout: 30000, // 超时时间(单位ms)  
   header: {  
     'content-type': 'application/json', // 默认请求头