ソースを参照

添加关于界面

zhuliu 1 年間 前
コミット
f893ad0077

+ 4 - 2
app.js

@@ -39,10 +39,11 @@ App({
         imghttp:'https://www.xsip.cn/fileManager/downloadFile?fileId='
       }, // 生产环境地址  
     }
-    const accountInfo = wx.getAccountInfoSync();  
+    const accountInfo = wx.getAccountInfoSync(); 
     const envVersion = accountInfo.miniProgram.envVersion;  
     that.globalData.localImagePath = Path[envVersion].localImagePath;
     that.globalData.imghttp = Path[envVersion].imghttp;
+    that.globalData.version = accountInfo.miniProgram.version; 
   },
   globalData: {
     userInfo: null,
@@ -55,7 +56,8 @@ App({
     windowWidth:0,
     phone:'0755-82839168',
     localImagePath:'',//发布是'.',本地开发是''
-    imghttp:'https://www.xsip.cn/fileManager/downloadFile?fileId='
+    imghttp:'https://www.xsip.cn/fileManager/downloadFile?fileId=',
+    version:''
   },
   getPersonRights(){
     api.getPersonRights({},false).then(res=>{

+ 10 - 2
app.json

@@ -23,7 +23,10 @@
     "pages/personalInformation/personalInformation",
     "pages/patentDetails/patentDetails",
     "pages/showImageList/showImageList",
-    "pages/monitor/monitoringRecord"
+    "pages/monitor/monitoringRecord",
+    "pages/about/about",
+    "pages/about/introduce",
+    "pages/about/connection"
   ],
   "tabBar": {
     "list": [
@@ -83,5 +86,10 @@
     "prod": {
       "apiUrl": "https://prod-api.yourdomain.com"
     }
-  }
+  },
+  "permission": {  
+    "scope.userLocation": {  
+      "desc": "你的位置信息将用于小程序地图定位功能"  
+    }  
+  } 
 }

+ 10 - 2
myComponents/dialog/dialog.js

@@ -32,7 +32,11 @@ Component({
       // 是否显示Dialog
       isShown: {
           type: Boolean,
-          value: false
+          value: false,
+      },
+      showFoot:{
+        type:Boolean,
+        value:true
       }
   },
 
@@ -42,7 +46,7 @@ Component({
    */
   data: {
       // 弹窗显示控制
-      // isShow: false
+      isShow: false
   },
 
   /**
@@ -61,6 +65,10 @@ Component({
       _confirmEvent() {
           //触发成功回调
           this.triggerEvent("confirm");   //confirmEvent由调用方声明和定义,在调用方 bind:confirmEvent 来声明,在js中定义函数
+      },
+
+      close(){
+        this.triggerEvent("cancel")
       }
   }
 })

+ 3 - 1
myComponents/dialog/dialog.json

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

+ 5 - 2
myComponents/dialog/dialog.wxml

@@ -2,11 +2,14 @@
 <view class='wx_dialog_container' hidden="{{!isShown}}">
     <view class='wx-mask'></view>
     <view class='wx-dialog'>
-        <view class='wx-dialog-title'>{{ title }}</view>
+        <view class='wx-dialog-title'>
+          {{ title }}
+          <van-icon custom-class="vanIcon" name="close" bind:tap="close"/>
+        </view>
         <view class='wx-dialog-content'>
           <slot></slot>
         </view>
-        <view class='wx-dialog-footer'>
+        <view class='wx-dialog-footer' wx:if="{{showFoot}}">
             <view class='wx-dialog-btn' catchtap='_cancelEvent'>{{ cancelText }}</view>
             <view class='wx-dialog-btn' catchtap='_confirmEvent'>{{ confirmText }}</view>
         </view>

+ 3 - 1
myComponents/dialog/dialog.wxss

@@ -28,6 +28,8 @@
 .wx-dialog-title {
   font-size: 18px;
   padding: 15px 15px 5px;
+  display: flex;
+  justify-content: space-between;
 }
 
 .wx-dialog-content {
@@ -92,4 +94,4 @@
   transform-origin: 0 0;
   -webkit-transform: scaleX(0.5);
   transform: scaleX(0.5);
-}
+}

+ 89 - 0
pages/about/about.js

@@ -0,0 +1,89 @@
+// pages/about/about.js
+const app = getApp()
+Page({
+
+  /**
+   * 页面的初始数据
+   */
+  data: {
+    version:app.globalData.version,
+    menu:[
+      {
+        type:1,
+        label:'助手介绍',
+        icon:'',
+        page:'/pages/about/introduce'
+      },
+      {
+        type:2,
+        label:'联系我们',
+        icon:'',
+        page:'/pages/about/connection'
+      },
+    ],
+  },
+
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad(options) {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow() {
+
+  },
+
+  //点击跳转
+  clickMenu(e){
+    var {page} = e.currentTarget.dataset
+      wx.navigateTo({
+        url: page,
+      })
+  },
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload() {
+
+  },
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh() {
+
+  },
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom() {
+
+  },
+
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage() {
+
+  }
+})

+ 6 - 0
pages/about/about.json

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

+ 15 - 0
pages/about/about.wxml

@@ -0,0 +1,15 @@
+<!--pages/about/about.wxml-->
+<view class="about">
+  <view class="head">
+    <view class="img">
+      <image class="img" src="/static/image/logo-3.png" mode="aspectFit"/>
+    </view>
+    <view class="title">跨境电商专利助手</view>
+    <view class="version">{{version}}</view>
+  </view>
+  <view class="menu_list">
+      <van-cell custom-class='vanCell' wx:for="{{menu}}" 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>
+  </view>
+</view>

+ 30 - 0
pages/about/about.wxss

@@ -0,0 +1,30 @@
+/* pages/about/about.wxss */
+.head{
+  padding-top: 50px;
+}
+.img{
+  width: 120px;
+  height: 70px;
+  margin: auto;
+}
+.title{
+  text-align: center;
+  color: var(--themeColor);
+  font-weight: bold;
+  padding: 8px;
+}
+.version{
+  text-align: center;
+  color: var(--themeColor);
+  padding: 8px;
+}
+
+.menu_list{
+  padding: 10px 15px;
+}
+.vanCell{
+  padding:30rpx 15rpx !important;
+  color: var(--themeColor) !important;
+  border-bottom: 1px solid var(--themeColor);
+  font-weight: bolder;
+}

+ 86 - 0
pages/about/connection.js

@@ -0,0 +1,86 @@
+// pages/about/connection.js
+const app = getApp()
+Page({
+
+  /**
+   * 页面的初始数据
+   */
+  data: {
+    phone:app.globalData.phone,
+    longitude:'113.944952',
+    latitude:'22.528968',
+    markers:[
+      {
+        id:1,
+        longitude:'113.944952',
+        latitude:'22.528968',
+        iconPath:'/static/image/position.png',
+        width:20,
+        height:40
+      }
+    ]
+  },
+
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad(options) {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow() {
+
+  },
+
+
+  makePhoneCall(){
+    wx.makePhoneCall({
+      phoneNumber: this.data.phone
+    })
+  },
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload() {
+
+  },
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh() {
+
+  },
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom() {
+
+  },
+
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage() {
+
+  }
+})

+ 3 - 0
pages/about/connection.json

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

+ 32 - 0
pages/about/connection.wxml

@@ -0,0 +1,32 @@
+<!--pages/about/connection.wxml-->
+<view>
+  <view class="img">
+    <image class="img" src="/static/image/logo-3.png" mode="aspectFit"/>
+  </view>
+  <view class="title">联系我们</view>
+  <view class="contact_information">
+    <view class="contact_information_item">
+      <view class="contact_information_item_icon">
+        <image class="img_item" src="/static/image/email.png" alt="aspectFit"/>
+      </view>
+      <view class="contact_information_item_text">xiaoshi@mail.com</view>
+    </view>
+    <view class="contact_information_item">
+      <view class="contact_information_item_icon">
+        <image class="img_item" src="/static/image/phone.png" alt="aspectFit"/>
+      </view>
+      <view class="contact_information_item_text" bind:tap="makePhoneCall">{{phone}}</view>
+    </view>
+    <view class="contact_information_item">
+      <view class="contact_information_item_icon">
+        <image class="img_item" src="/static/image/address.png" alt="aspectFit"/>
+      </view>
+      <view class="map">  
+          <map class="map" id="myMap" latitude="{{latitude}}" markers="{{markers}}" longitude="{{longitude}}" show-location="{{true}}" bindmarkertap="markerTap"></map>  
+        </view>
+    </view>
+    <view class="contact_information_item_text">
+      广东省深圳市南山区粤兴三道8号中国地质大学产学研基地中地大楼A209
+    </view>
+  </view>
+</view>

+ 43 - 0
pages/about/connection.wxss

@@ -0,0 +1,43 @@
+/* pages/about/connection.wxss */
+.img{
+  width: 100px;
+  height:40px;
+  margin: auto;
+}
+.title{
+  text-align: center;
+  color: var(--themeColor);
+  font-weight: bold;
+  margin-top: 8px;
+  font-family: '微软雅黑';
+}
+.contact_information{
+  padding:10px 20px;
+}
+.contact_information_item_icon{
+  width: 30px;
+  height: 30px;
+  line-height: 30px;
+  margin: auto;
+}
+.img_item{
+  width: 100%;
+  height: 100%;
+  margin: auto;
+}
+.contact_information_item_text{
+  color: var(--themeColor);
+  margin: 10px auto;
+  padding: 3px 8px;
+  width: fit-content;
+  border: 1px var(--themeColor) solid;
+  border-radius: 5px;
+  font-weight: bold;
+  font-size: 14px;
+  text-align: center;
+}
+.map{
+  margin-top: 8px;
+  width: 100%;
+  height: 300px;
+}

+ 66 - 0
pages/about/introduce.js

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

+ 3 - 0
pages/about/introduce.json

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

+ 12 - 0
pages/about/introduce.wxml

@@ -0,0 +1,12 @@
+<!--pages/about/introduce.wxml-->
+<view>
+  <view class="img">
+    <image class="img" src="/static/image/logo-3.png" mode="aspectFit"/>
+  </view>
+  <view class="title">跨境电商专利助手</view>
+  <view class="content">
+    <view class="content_item">小世电商专利助手小程序旨在为跨境电商提供一站式的知识产权专业服务。</view>
+    <view class="content_item">主要提供爆款产品专利库、上架产品的专利侵权风险排查、产品下架意见分析、专利侵权行为投诉、协助维权、专利申请的相关服务。</view>
+    <view class="content_item">以协助跨境电商的商家打好知识产权这把出海“保护伞”,避开知产雷区,为自己的品牌保驾护航,提高企业竞争力。</view>
+  </view>
+</view>

+ 21 - 0
pages/about/introduce.wxss

@@ -0,0 +1,21 @@
+/* pages/about/introduce.wxss */
+.img{
+  width: 100px;
+  height: 70px;
+  margin: auto;
+}
+.title{
+  text-align: center;
+  color: var(--themeColor);
+  font-weight: bold;
+  padding: 8px;
+  font-family: '微软雅黑';
+}
+.content{
+  padding: 10px 15px;
+}
+.content_item{
+  text-indent: 2em;
+  line-height: 1.5em;
+  color: var(--themeColor);
+}

+ 18 - 1
pages/hotProduct/hotProduct.js

@@ -15,7 +15,8 @@ Page({
     total:25,
     triggered:false,
     load:false,
-    hasMore:true
+    hasMore:true,
+    showDialog:false,
   },
 
   /**
@@ -129,6 +130,22 @@ Page({
 
   },
 
+  //打开提示框
+  showTishi(){
+    this.setData(
+      {
+        showDialog:true
+      }
+    )
+  },
+  closeDialog(){
+    this.setData(
+      {
+        showDialog:false
+      }
+    )
+  },
+
   /**
    * 生命周期函数--监听页面隐藏
    */

+ 2 - 1
pages/hotProduct/hotProduct.json

@@ -1,5 +1,6 @@
 {
   "usingComponents": {
-    "myProduct":"/myComponents/product/product"
+    "myProduct":"/myComponents/product/product",
+    "myDialog":"/myComponents/dialog/dialog"
   }
 }

+ 17 - 0
pages/hotProduct/hotProduct.wxml

@@ -1,9 +1,26 @@
 <!--pages/hotProduct/hotProduct.wxml-->
 <van-notify id="van-notify" />
+<myDialog isShown="{{showDialog}}" title="爆款风险" showFoot="{{false}}" bindcancel="closeDialog">
+  <view class="dialog_content">
+    <view class="dialog_content_text">
+     <span class="dialog_content_point">爆款产品</span>是指在商品销售中,供不应求,销售量很高的商品,通常所说的卖的很多,人气很高的商品,广泛应用于网店、实物店铺(此款小程序只针对亚马逊)。另一种说法是牛品,爆款商品,爆款宝贝,人气宝贝,热卖商品。
+    </view>
+    
+    <view class="dialog_content_text" style="margin-top:10px">
+      而此页面的<span class="dialog_content_point">爆款风险</span>是指:在亚马逊各个店铺中热卖、销量高的商品,您想去卖,是否会出现相应的侵权风险等一系列问题。
+    </view>
+    
+  </view>
+</myDialog>
 <view class="hotProduct">
   <view class="search">
     <myInput value="{{keyword}}" placeholder="请输入产品相关关键词" bindchange="changeKeyword" bindsearch="search" bindclickInnerIcon="clickInnerIcon"></myInput>
   </view>
+
+  <view class="tishi">
+    爆款产品<van-icon custom-class="vanIcon" name="info" bind:tap="showTishi"/>
+  </view>
+
   <view class="menuList">
     <view class="menu_item green">
       <text class="iconfont myIconanquanbangzhu"></text>

+ 17 - 0
pages/hotProduct/hotProduct.wxss

@@ -33,4 +33,21 @@
   overflow-y: hidden;
   height: calc(100vh - 220rpx);
   box-sizing: border-box;
+}
+
+.tishi{
+  padding: 10rpx 0;
+  color: var(--themeColor);
+  font-weight: bold;
+}
+.vanIcon{
+  margin-left: 5px !important;
+}
+.dialog_content{
+  color:black;
+  text-align: left;
+  padding-bottom: 20px;
+}
+.dialog_content_point{
+  color: var(--themeColor);
 }

+ 7 - 0
pages/mine/mine.js

@@ -42,6 +42,13 @@ Page({
         icon:'myIconmonitor',
         page:'/pages/monitor/monitor'
       },
+      {
+        type:5,
+        label:'关于我们',
+        icon:'',
+        page:'/pages/about/about',
+        noLogin:true
+      },
     ],
     isLogin:false,
     userinfo:{},

+ 1 - 1
pages/mine/mine.wxml

@@ -42,7 +42,7 @@
   </view> -->
   <!-- <wux-divider wux-class="line" show-text="{{ false }}" /> -->
   <view class="menu_list">
-      <van-cell custom-class='vanCell' wx:for="{{menu2}}" wx:key="index" title="{{item.label}}" is-link data-page="{{item.page}}" bind:click="clickMenu">
+      <van-cell custom-class='vanCell' wx:for="{{menu2}}" wx:key="index" title="{{item.label}}" is-link data-page="{{item.page}}" data-login="{{item.noLogin}}" 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">

+ 17 - 0
pages/riskAssessment/riskAssessment.js

@@ -10,6 +10,7 @@ Page({
     tableData:[],
     keyword:'',
     scrolltop: 20,
+    showDialog:false,
   },
 
   /**
@@ -82,6 +83,22 @@ Page({
     
   },
 
+  //打开提示框
+  showTishi(){
+    this.setData(
+      {
+        showDialog:true
+      }
+    )
+  },
+  closeDialog(){
+    this.setData(
+      {
+        showDialog:false
+      }
+    )
+  },
+
   /**
    * 生命周期函数--监听页面隐藏
    */

+ 2 - 1
pages/riskAssessment/riskAssessment.json

@@ -2,6 +2,7 @@
   "navigationStyle": "custom",
   "usingComponents": {
     "navBar": "/myComponents/navBar/navBar",
-    "myProduct":"/myComponents/product/product"
+    "myProduct":"/myComponents/product/product",
+    "myDialog":"/myComponents/dialog/dialog"
   }
 }

+ 15 - 0
pages/riskAssessment/riskAssessment.wxml

@@ -1,10 +1,25 @@
 <!--pages/riskAssessment/riskAssessment.wxml-->
 <navBar backType="editLaw"></navBar>
 <van-notify id="van-notify" />
+<myDialog isShown="{{showDialog}}" title="爆款风险" showFoot="{{false}}" bindcancel="closeDialog">
+  <view class="dialog_content">
+    <view class="dialog_content_text">
+     <span class="dialog_content_point">爆款产品</span>是指在商品销售中,供不应求,销售量很高的商品,通常所说的卖的很多,人气很高的商品,广泛应用于网店、实物店铺(此款小程序只针对亚马逊)。另一种说法是牛品,爆款商品,爆款宝贝,人气宝贝,热卖商品。
+    </view>
+    
+    <view class="dialog_content_text" style="margin-top:10px">
+      而此页面的<span class="dialog_content_point">爆款风险</span>是指:在亚马逊各个店铺中热卖、销量高的商品,您想去卖,是否会出现相应的侵权风险等一系列问题。
+    </view>
+    
+  </view>
+</myDialog>
 <view class="padding_50 content">
   <view class="search">
     <myInput value="{{keyword}}" placeholder="请输入产品相关关键词" bindchange="changeKeyword" bindsearch="search" bindclickInnerIcon="clickInnerIcon"></myInput>
   </view>
+  <view class="tishi">
+    爆款产品<van-icon custom-class="vanIcon" name="info" bind:tap="showTishi"/>
+  </view>
   <view class="main">
     <myProduct tableData="{{tableData}}"></myProduct>
   </view>

+ 17 - 0
pages/riskAssessment/riskAssessment.wxss

@@ -13,3 +13,20 @@
   object-fit: cover;
 }
 
+.tishi{
+  padding: 10rpx 0;
+  color: var(--themeColor);
+  font-weight: bold;
+}
+.vanIcon{
+  margin-left: 5px !important;
+}
+.dialog_content{
+  color:black;
+  text-align: left;
+  padding-bottom: 20px;
+}
+.dialog_content_point{
+  color: var(--themeColor);
+}
+

BIN
static/image/address.png


BIN
static/image/email.png


BIN
static/image/phone.png


BIN
static/image/position.png


+ 1 - 1
utils/request.js

@@ -15,7 +15,7 @@ const config = {
   tabbar:["pages/index/index","pages/hotProduct/hotProduct","pages/mine/mine"]
 };  
 const apiUrl = {  
-  develop: 'http://192.168.2.111:8902', // 开发环境地址  
+  develop: 'https://www.xsip.cn', // 开发环境地址  
   trial: 'https://www.xsip.cn/test', // 测试环境地址  
   release: 'https://www.xsip.cn' // 生产环境地址  
 };