Browse Source

2期改造更新

Linwei 11 months ago
parent
commit
feb847a4d0
48 changed files with 4117 additions and 77 deletions
  1. 124 0
      http/api/common.js
  2. 9 5
      http/config/config.js
  3. 2 1
      manifest.json
  4. 71 0
      pages.json
  5. 13 4
      pages/components/comment.vue
  6. 18 2
      pages/components/wenzhanList.vue
  7. 17 11
      pages/home/ArticleDetails.vue
  8. 287 0
      pages/home/AskingQuestions.vue
  9. 8 1
      pages/home/Information.vue
  10. 312 0
      pages/home/base/commentNew.vue
  11. 1 0
      pages/home/exchange.vue
  12. 354 0
      pages/home/exchangeDetails.vue
  13. 251 0
      pages/home/exchangeNew.vue
  14. 1 1
      pages/index/base/head.vue
  15. 97 0
      pages/index/base/labelItem.vue
  16. 4 2
      pages/index/base/newVideo.vue
  17. 4 1
      pages/index/base/news.vue
  18. 5 1
      pages/index/index.vue
  19. 7 3
      pages/market/PublishComments.vue
  20. 102 19
      pages/market/allOrder.vue
  21. 56 7
      pages/market/confirmOrder.vue
  22. 15 4
      pages/market/market.vue
  23. 1 1
      pages/myinfo/address.vue
  24. 3 0
      pages/myinfo/login.vue
  25. 37 3
      pages/myinfo/myinfo.vue
  26. 4 2
      pages/myinfo/notifiesPageDetails.vue
  27. 23 9
      pages/myinfo/userInfo.vue
  28. BIN
      static/index/icon_gongysc.png
  29. BIN
      static/index/icon_hudongwd.png
  30. BIN
      static/myinfo/icomx_dianzan.png
  31. BIN
      static/myinfo/icomx_dianzan1.png
  32. BIN
      static/myinfo/icomx_gysrz.png
  33. BIN
      static/myinfo/icomx_message2.png
  34. BIN
      static/myinfo/icomx_wodgongy.png
  35. BIN
      static/myinfo/iconx_wodwd.png
  36. BIN
      static/myinfo/img_shenfzfm.png
  37. BIN
      static/myinfo/img_shenfzzm.png
  38. BIN
      static/myinfo/img_yingyezhiz.png
  39. BIN
      static/supplier/icon_gonyings.png
  40. BIN
      static/supplier/icon_success1.png
  41. 556 0
      supplierPages/pages/supplier/SupplierEntryForm.vue
  42. 242 0
      supplierPages/pages/supplier/SupplyDeclaration.vue
  43. 225 0
      supplierPages/pages/supplier/base/SupplyDeclarationFrom.vue
  44. 263 0
      supplierPages/pages/supplier/base/SupplyDeclarationList.vue
  45. 198 0
      supplierPages/pages/supplier/base/SupplypProductDetails.vue
  46. 261 0
      supplierPages/pages/supplier/base/marketItem.vue
  47. 52 0
      supplierPages/pages/supplier/supplierSuccess.vue
  48. 494 0
      supplierPages/pages/supplier/supplyMarket.vue

+ 124 - 0
http/api/common.js

@@ -238,6 +238,19 @@ export const orderAgain = (orderId) => request({
 	method: 'POST',
 	// data: data
 })
+//前端支付完成回调
+export const payPaying = (orderId) => request({
+	url: `/open/wechat/pay/paying/${orderId}`,
+	method: 'POST',
+	// data: data
+})
+
+//退款申请
+export const refundApply = (orderId) => request({
+	url: `/open/wechat/pay/refundApply/${orderId}`,
+	method: 'POST',
+	// data: data
+})
 
 
 
@@ -307,4 +320,115 @@ export const notifiesPage = (data) => request({
 export const notifiesDetails = (id) => request({
 	url: `/open/wechat/common/notifies/${id}`,
 	method: 'POST'
+})
+
+
+//所在城市
+export const getAreaList = (data) => request({
+	url: `/open/vendor/getAreaList`,
+	method: 'GET',
+	data: data
+})
+//获取主营类目列表
+export const getCategoryList = (id) => request({
+	url: `/open/vendor/getCategoryList`,
+	method: 'GET'
+})
+//供应商入驻
+export const settledVendor = (data) => request({
+	url: `/open/vendor/settledVendor`,
+	method: 'POST',
+	data: data
+})
+//我的供应商信息
+export const myVendor = (data) => request({
+	url: `/open/vendor/myVendor`,
+	method: 'POST',
+	data: data
+})
+//可申报商品
+export const supplierList = (data) => request({
+	url: `/open/vendor/supplierList`,
+	method: 'POST',
+	data: data
+})
+
+//我的申报记录
+export const myDeclareSupplier = (data) => request({
+	url: `/open/vendor/myDeclareSupplier`,
+	method: 'POST',
+	data: data
+})
+//采购单申报
+export const declareSupplier = (data) => request({
+	url: `/open/vendor/declareSupplier`,
+	method: 'POST',
+	data: data
+})
+
+//采购单列表-按供应商
+export const vendorListOfDeclare = (data) => request({
+	url: `/open/vendor/vendorListOfDeclare`,
+	method: 'POST',
+	data: data
+})
+//采购单列表-按产品
+export const supplierListOfProduct = (data) => request({
+	url: `/open/vendor/supplierListOfProduct`,
+	method: 'POST',
+	data: data
+})
+//供应商商品列表
+export const vendorDeclareList = (vendorId) => request({
+	url: `/open/vendor/vendorDeclareList/${vendorId}`,
+	method: 'POST'
+})
+
+
+
+
+
+
+
+// 互动问答
+
+//主题列表
+export const getContentPage = (data,sortType) => request({
+	url: `/open/topicQa/contentPage/${sortType}`,
+	method: 'POST',
+	data: data
+})
+//创建提问
+export const createQuestion = (data) => request({
+	url: `/open/topicQa/createQuestion`,
+	method: 'POST',
+	data: data
+})
+//主题详情及楼层回复
+export const topicQaDetail = (data,topicId)=> request({
+	url: `/open/topicQa/detail/${topicId}`,
+	method: 'POST',
+	data: data
+})
+//回复列表
+export const QareplyPage = (data) => request({
+	url: `/open/topicQa/replyPage`,
+	method: 'POST',
+	data: data
+})
+//回复主题/楼层
+export const Qareplybyid = (data,topicId) => request({
+	url: `/open/topicQa/reply/${topicId}`,
+	method: 'POST',
+	data: data
+})
+//点赞 (再次点击取消点赞)
+export const Qalike = (replyId) => request({
+	url: `/open/topicQa/like/${replyId}`,
+	method: 'POST',
+})
+//关注问题(次点击取消关注)
+export const Qacollect = (topicId) => request({
+	url: `/open/topicQa/collect/${topicId}`,
+	method: 'POST',
 })

+ 9 - 5
http/config/config.js

@@ -1,9 +1,13 @@
-//请求地址
-// const BASEURL = "https://lqh.zyjsfz.cn"
-const BASEURL = "http://120.26.86.247:9	898"
-const appid = "wx1ce6c9916db76eab"
-const secret = "55c58b1cccee46069c6fdbf1de2dd1ea"
+//正式
+const BASEURL = "https://dachang.haijiacheng.com/prod-api"
+const appid = 'wx255dd0c001bdaa93'
+const secret = "d987bc050af90ec3074dd45f492239ce"
+
 
+//开发
+// const BASEURL = "https://lqh.zyjsfz.cn"
+// const appid = "wx1ce6c9916db76eab"
+// const secret = "55c58b1cccee46069c6fdbf1de2dd1ea"
 
 export default {
 	BASEURL,

+ 2 - 1
manifest.json

@@ -62,7 +62,8 @@
         "appid" : "wx1ce6c9916db76eab",
         "setting" : {
             "urlCheck" : false,
-            "es6" : false
+            "es6" : false,
+            "minified" : true
         },
         "usingComponents" : true
     },

+ 71 - 0
pages.json

@@ -33,6 +33,27 @@
 			}
 		},
 		{
+			"path" : "pages/home/exchangeNew",
+			"style" : 
+			{
+				"navigationBarTitleText" : "互动问答"
+			}
+		},
+		{
+			"path" : "pages/home/AskingQuestions",
+			"style" : 
+			{
+				"navigationBarTitleText" : "提问"
+			}
+		},
+		{
+			"path" : "pages/home/exchangeDetails",
+			"style" : 
+			{
+				"navigationBarTitleText" : "互动问答"
+			}
+		},
+		{
 			"path" : "pages/home/ArticleDetails",
 			"style" : 
 			{
@@ -46,6 +67,7 @@
 				"navigationBarTitleText" : "分类"
 			}
 		},
+		
 		{
 			"path" : "pages/market/commodity",
 			"style" : 
@@ -138,6 +160,55 @@
 			}
 		}
 	],
+	"subPackages": [
+		{
+			"root": "supplierPages",
+			"pages": [
+				{
+					"path" : "pages/supplier/SupplierEntryForm",
+					"style" : 
+					{
+						"navigationBarTitleText" : "供应商入驻"
+					}
+				},
+				{
+					"path" : "pages/supplier/supplierSuccess",
+					"style" : 
+					{
+						"navigationBarTitleText" : "供应商入驻"
+					}
+				},
+				{
+					"path" : "pages/supplier/SupplyDeclaration",
+					"style" : 
+					{
+						"navigationBarTitleText" : "供应申报"
+					}
+				},
+				{
+					"path" : "pages/supplier/supplyMarket",
+					"style" : 
+					{
+						"navigationBarTitleText" : "供应市场"
+					}
+				},
+				{
+					"path" : "pages/supplier/base/SupplyDeclarationFrom",
+					"style" : 
+					{
+						"navigationBarTitleText" : "供应申报"
+					}
+				},
+				{
+					"path" : "pages/supplier/base/SupplypProductDetails",
+					"style" : 
+					{
+						"navigationBarTitleText" : "供应商"
+					}
+				}
+			]
+		}
+	],
 	"globalStyle": {
 		"navigationBarTextStyle": "black",
 		"navigationBarTitleText": "",

+ 13 - 4
pages/components/comment.vue

@@ -43,7 +43,7 @@
             {{jiazaitext}}
         </view>
         <!-- 对主题进行回复 -->
-        <view class="w700 flex">
+        <view class="w700 flex bfixed">
             <u-input class="commentInput" placeholder="点击输入评论" v-model="inputValue" :auto-height="true" type="text"  />
             <view class="btn">
                 <u-button  shape="circle" size="medium" type="primary" 
@@ -75,7 +75,7 @@
                             <view class="rc_1" @click="toReply(item2,3)">{{item2.authorName || '未知用户'}}</view>
                             <view class="rc_2">{{item2.createTime}}</view>
                             <view class="rc_3" @click="toReply(item2,3)">
-                                <text v-if="item2.citeAuthorName">{{ ''+ item2.citeAuthorName + '回复:' }}</text>
+                                <text v-if="item2.citeAuthorName">{{ '@'+ item2.citeAuthorName + '回复:' }}</text>
                                 {{item2.content}}
                             </view>    
                         </view>
@@ -266,7 +266,7 @@ methods: {
 }
 </script>
 
-<style>
+<style lang="scss" scoped>
 .content{
     width: 750rpx;
     background-color: #FFFFFF;
@@ -314,6 +314,9 @@ methods: {
     font-size: 28rpx;
     font-weight: bold;
     color: #333333;
+    word-break: break-all;
+    text-overflow: ellipsis;
+    overflow: hidden;
 }
 .rc_2{
     width: 500rpx;
@@ -403,6 +406,12 @@ methods: {
     background: #EEEEEE;
     border-radius: 40rpx 40rpx 40rpx 40rpx; 
 }
-
+.bfixed{
+    background-color: #fff;
+    position: fixed;
+    bottom: 0px;
+    border: 20rpx solid #fff;
+    left: 0px;
+}
 </style>
     

+ 18 - 2
pages/components/wenzhanList.vue

@@ -10,7 +10,11 @@
                         {{item.title}}
                     </view>
                     <view class="box_type">
-                        <view :class="currentName == 'default' ?'type_one':'type_one_index'">{{item.subIdName}}</view>
+                        <view style="display: flex;justify-content: space-between;">
+                            <view v-for="item2 in item.columnTag" :class="currentName == 'default' ?'type_one':'type_one_index'">
+                                {{item2}}
+                            </view>
+                        </view>
                         <view>{{ computerTime(item) }}</view>
                     </view>
                 </view>
@@ -36,7 +40,18 @@ watch:{
         immediate: true,
         handler(val) {
         //    console.log(val);
-           this.newsList = val
+           this.newsList = val.map(v => {
+               let columnTag = []
+               if (v?.columnTag) {
+                columnTag = v?.columnTag.split(',')
+               }
+                
+                return {
+                    ...v,
+                    columnTag
+                }
+           })
+           console.log('this.newsList',this.newsList );
         },
     }
 },
@@ -123,6 +138,7 @@ methods: {
     background: #DEEEFC;
     border-radius: 8rpx 8rpx 8rpx 8rpx;
     opacity: 1;
+    margin-left: 4rpx;
     
     
     font-size: 28rpx;

+ 17 - 11
pages/home/ArticleDetails.vue

@@ -20,13 +20,13 @@
         <view class="time">
             {{ info.time }}
         </view>
-        <view class="vHtml" v-if="!showVido">
-            <u-parse class="vHtml" :content="info.content"></u-parse>
-        </view>
-        <view class="videoBox" v-else>
+        <view class="videoBox" v-if="info.videoUrl!=''">
             <!-- 视频组件 -->
             <video style="width: 710rpx;" :src="info.videoUrl"></video>
         </view>
+        <view class="vHtml" v-if="info.content!=''">
+            <u-parse class="vHtml" :content="info.content"></u-parse>
+        </view>
         <view class="linebox">
 
         </view>
@@ -85,13 +85,17 @@ export default {
             let res =  await getArticleDetailByOpen(query)
             if (res.data.code == 200) {
                 this.info = res.data.data
-
-                if (this.info.subIdName == '视频资讯') {
-                    this.info.videoUrl = this.info.videoList[0].fileUrl
-                    this.showVido = true
+                if (this.info.videoList && this.info.videoList.length>0) {
+                    this.info.videoUrl = this.info.videoList[0].fileUrl || ''
                 }else{
-                    this.showVido = false
+                    this.info.videoUrl = ''
                 }
+                // if (this.info.columnIdName == '视频资讯') {
+                //     this.info.videoUrl = this.info.videoList[0].fileUrl
+                //     this.showVido = true
+                // }else{
+                //     this.showVido = false
+                // }
                 
             }
         }
@@ -115,9 +119,11 @@ export default {
     font-family: PingFang SC, PingFang SC;
     font-weight: bold;
     color: #333333;
-    line-height: 56rpx;
+    /* line-height: 56rpx; */
+    display: flex;
+    align-items: center;
 
-    display: -webkit-box;
+    /* display: -webkit-box; */
     word-break: break-all;
     text-overflow: ellipsis;
     overflow: hidden;

+ 287 - 0
pages/home/AskingQuestions.vue

@@ -0,0 +1,287 @@
+<template>
+    <view class="bg">
+        <!-- 提问 -->
+        <view  class="commodity">
+            <view class="rateBox">
+                描述问题
+            </view>
+            <view class="pjBox">
+                <u--textarea  v-model="value1" placeholder="输入你想提问的问题..." 
+                count  maxlength="200" ></u--textarea>
+            </view>
+            
+            <view class="upload">
+                <u-upload
+                    :fileList="fileList1"
+                    @afterRead="afterRead"
+                    @delete="deletePic"
+                    name="1"
+                    multiple
+                    :maxCount="3"
+                ></u-upload>
+            </view>
+        </view>
+        <view style="height: 200rpx;"></view>
+        <view class="btnBox">
+            <view class="btn" @click="submit">
+                提交
+            </view>
+        </view>
+
+    </view>
+</template>
+<script>
+import env from "@/http/config/config.js"
+import { toastFunc } from "@/pages/util/util";
+import {createQuestion} from '@/http/api/common.js'
+export default {
+components: {
+},
+data() {
+    return {
+        fileList1:[],
+        value1:'',
+    }
+},
+onLoad() {
+
+},
+methods: {
+    linktoPublishComments(){
+        uni.navigateTo({
+             url: '/pages/market/PublishComments'
+        });
+    },
+    // 删除图片
+    deletePic(event) {
+        this[`fileList${event.name}`].splice(event.index, 1)
+    },
+    // 新增图片
+    async afterRead(event) {
+        // 当设置 multiple 为 true 时, file 为数组格式,否则为对象格式
+        let lists = [].concat(event.file)
+        let fileListLen = this[`fileList${event.name}`].length
+        lists.map((item) => {
+            this[`fileList${event.name}`].push({
+                ...item,
+                status: 'uploading',
+                message: '上传中'
+            })
+        })
+        for (let i = 0; i < lists.length; i++) {
+            const result = await this.uploadFilePromise(lists[i].url)
+            console.log('1111',result);
+            let item = this[`fileList${event.name}`][fileListLen]
+            this[`fileList${event.name}`].splice(fileListLen, 1, Object.assign(item, {
+                status: 'success',
+                message: '',
+                url: result
+            }))
+            fileListLen++
+        }
+    },
+    uploadFilePromise(url) {
+        return new Promise((resolve, reject) => {
+            let a = uni.uploadFile({
+                url: env.BASEURL + '/open/upload/uploadFile',
+                filePath: url,
+                name: 'file',
+                formData: {
+                    user: 'test'
+                },
+                success: (res) => {
+                    const fileData = JSON.parse(res.data)
+                    if (fileData.code == 500) {
+                        resolve('')
+                    }else{
+                        const fileData = JSON.parse(res.data)
+                        resolve(fileData.data)
+                    }
+                }
+            });
+        })
+    },
+    async submit(){
+        if (this.value1 == '') {
+            toastFunc('请填写问题')
+            return
+        }
+        let uploadList = this.fileList1.map(item=>{
+            return item.url
+        })
+        let res = await createQuestion({
+            content:this.value1,
+            uploadList:uploadList
+        })
+        if (res.data.code == 200) {
+            toastFunc('提问成功',()=>{
+                uni.navigateBack({
+                     delta: 1
+                });
+            })
+        }
+    },
+}
+}
+</script>
+
+<style>
+.bg{
+    width: 750rpx;
+    height: auto;
+    min-height: calc(100vh - 100rpx) ;
+    background: #F1F1F1;
+    border-radius: 0rpx 0rpx 0rpx 0rpx;
+
+    display: flex;
+    flex-direction: column;
+    align-items: center;
+}
+
+.commodity{
+    width: 702rpx;
+    height: auto;
+    /* min-height: 954rpx; */
+    background: #FFFFFF;
+    border-radius: 16rpx 16rpx 16rpx 16rpx;
+    opacity: 1;
+    margin-top: 24rpx;
+    /* padding-bottom: 100rpx; */
+}
+
+.commodity_title{
+    width: 650rpx;
+    height: 40rpx;
+    font-size: 28rpx;
+    font-weight: 500;
+    color: #999;
+    line-height: 40rpx;
+    padding: 24rpx 0 0 24rpx;
+
+    display: flex;
+    justify-content: space-between;
+    align-items: center;
+}
+
+
+
+.mc_item{
+	width: 702rpx;
+	height: 244rpx;
+	background: #FFFFFF;
+	border-radius: 16rpx 16rpx 16rpx 16rpx;
+	opacity: 1;
+	margin-top: 24rpx;
+}
+.item_swipe{
+	width: 678rpx;
+	height: 244rpx;
+	background: #FFFFFF;
+	border-radius: 16rpx 16rpx 16rpx 16rpx;
+	opacity: 1;
+	display: flex;
+    align-items: center;
+    flex-direction: row;
+	padding-left: 24rpx;
+}
+
+.box_img{
+    width: 180rpx;
+    height: 180rpx;
+    background-color: #999999;
+}
+.box_text{
+	width: 392rpx;
+	height: 200rpx;
+	margin-left: 20rpx;
+
+	display: flex;
+    flex-direction: column;
+    justify-content: space-between;
+}
+.box_title{
+	width: 392rpx;
+	height: 40rpx;
+	font-size: 28rpx;
+	font-weight: bold;
+	color: #333333;
+	line-height: 40rpx;
+
+	display: -webkit-box;
+    word-break: break-all;
+    text-overflow: ellipsis;
+    overflow: hidden;
+    -webkit-box-orient: vertical;
+    -webkit-line-clamp:1;
+}
+.box_type{
+	width: 410rpx;
+	height: 48rpx;
+	background: #EEEEEE;
+	border-radius: 8rpx 8rpx 8rpx 8rpx;
+	opacity: 1;
+
+	font-size: 28rpx;
+	font-weight: 500;
+	color: #999999;
+    padding-left: 24rpx;
+    line-height: 48rpx;
+
+	display: -webkit-box;
+    word-break: break-all;
+    text-overflow: ellipsis;
+    overflow: hidden;
+    -webkit-box-orient: vertical;
+    -webkit-line-clamp:1;
+}
+.box_num{
+	width: 410rpx;
+	display: flex;
+	justify-content: space-between;
+    align-items: center;
+}
+.rateBox{
+    display: flex;
+    margin: 24rpx;
+}
+.pjBox{
+    margin-left: 24rpx;
+
+    width: 654rpx;
+    /* height: 320rpx; */
+    background: #F1F1F1;
+    border-radius: 16rpx 16rpx 16rpx 16rpx;
+    opacity: 1;
+}
+.btnBox{
+    width: 750rpx;
+    height: 100rpx;
+    background: #FFFFFF;
+    border-radius: 0rpx 0rpx 0rpx 0rpx;
+    opacity: 1;
+
+    display: flex;
+    flex-direction: row;
+    justify-content: center;
+    align-items: center;
+    position: fixed;
+    bottom: 0;
+}
+.btn{
+    width: 702rpx;
+    height: 80rpx;
+    background: #46A6FF;
+    border-radius: 64rpx 64rpx 64rpx 64rpx;
+    opacity: 1;
+
+    font-weight: 500;
+    color: #FFFFFF;
+    line-height: 80rpx;
+    text-align: center;
+}
+.upload{
+    width: 702rpx;
+    margin: 48rpx 0 48rpx 24rpx;
+}
+</style>
+    

+ 8 - 1
pages/home/Information.vue

@@ -262,6 +262,9 @@ methods: {
     display: flex;
     justify-content: flex-start;
     width: 90vw;
+    overflow-x: auto;  
+    scroll-snap-type: x mandatory;  
+    scroll-padding: 50rpx; /* 为滚动容器提供内边距,确保内容不会紧贴边缘 */ 
 }
 
 
@@ -327,8 +330,10 @@ methods: {
     color: #46A6FF;
     line-height: 64rpx;
     text-align: center;
-
+    
     margin-right: 20rpx;
+    flex: 0 0 auto;
+    scroll-snap-align: start;
 
 }
 .btnview{
@@ -344,6 +349,8 @@ methods: {
     line-height: 64rpx;
     text-align: center;
     margin-right: 20rpx;
+    flex: 0 0 auto;
+    scroll-snap-align: start;
 
 }
 .loadmore{

+ 312 - 0
pages/home/base/commentNew.vue

@@ -0,0 +1,312 @@
+<template>
+    <view class="content">
+        <!-- 点击评论弹出层 -->
+        <u-popup :closeable='true' :round="10" :show="popupShow" @close="close" @open="open">
+            <view class="popupTitle">回复评论</view>
+            <view class="popupView">
+                <view class="scrollview">
+                    <!-- 弹出层中意见详情 -->
+                    <view class="one_comment_box">
+                        <view class="comment">
+                            <view class="photo">
+                                <u--image shape="circle" width="48rpx" height="48rpx" :src="popupData.authorLogo" ></u--image>
+                            </view>
+                            <view class="rc_1" >{{popupData.authorName || '未知用户'}}</view>
+                        </view>
+                        <view class="comment">
+                            <view class="rc_3" >{{popupData.content}}</view>    
+                        </view>
+                        <view class="comment_foot">
+                            <view class="rc_2" @click="toReply(popupData,2)">{{popupData.createTime + ' 回复 '}}</view>
+                        </view>
+                    </view>
+                    
+                    <u-line margin='10rpx 0' color="#e4e7ed" />
+                    <view v-for="(item2,index) in popupData.floorList" :key="index">
+                        <view :class="item2.citeAuthorName?'one_recomment_box':'one_comment_box'">
+                            <view class="comment">
+                                <view class="photo">
+                                    <u--image shape="circle" width="48rpx" height="48rpx" :src="item2.authorLogo" ></u--image>
+                                </view>
+                                <view class="rc_1">{{item2.authorName || '未知用户'}}</view>
+                            </view>
+                            <view class="comment">
+                                <view class="rc_3" >
+                                    <text v-if="item2.citeAuthorName">{{ '@'+ item2.citeAuthorName + '回复:' }}</text>
+                                    {{item2.content}}
+                                </view>  
+                            </view>
+                            <view class="comment_foot">
+                                <view class="rc_2" @click="toReply(item2,3)">{{item2.createTime  + ' 回复 '}}</view>
+                                <view class="flex" @click="setQalike(item2)" style="align-items: center;">
+                                    <u--image v-if="item2.isLike == '1'" shape="circle" width="48rpx" height="48rpx" src="/static/myinfo/icomx_dianzan1.png" ></u--image>
+                                    <u--image v-else shape="circle" width="48rpx" height="48rpx" src="/static/myinfo/icomx_dianzan.png" ></u--image>
+                                    <text  style="margin-left: 8rpx;color: #666666;">{{ item2.likesCount }}</text>
+                                </view>
+                            </view>
+                        </view>
+                    </view>
+                </view>
+            </view>
+            
+            <view class="btnflex">
+                <view  class="commentInput" >
+                    <u-input :placeholder="popupPlaceholder" v-model="inputValue2" :auto-height="true" type="text"  />
+                </view>
+                <view class="btn" @click="submit2">
+                    提交
+                </view>
+            </view>
+		</u-popup>
+    </view>
+</template>
+<script>
+import {Qalike,QareplyPage,Qareplybyid} from '@/http/api/common.js'
+import * as util from '@/pages/util/util.js'
+export default {
+    options: { styleIsolation: 'shared' },
+props: {
+    showComment: {
+        type: Boolean,
+        default: false,
+    },
+    CommentData: {
+        type: Object,
+        default: null,
+    },
+    
+},
+watch:{
+    showComment: {
+        immediate: true,
+        handler(val) {
+            //是否展示意见弹窗
+           this.popupShow = val
+        },
+    },
+    CommentData: {
+        immediate: true,
+        handler(val) {
+           //意见列表数据
+           this.popupData = val
+        },
+    },
+},
+data() {
+    return {
+        popupShow:false,
+        show:false,
+        inputValue:'',
+        inputValue2:'',
+        num:999,
+        popupData:{
+            authorName:'',
+            createTime:'',
+            content:'',
+            authorLogo:'',
+            floorList:[]
+        },
+        dataList:[],
+        curNow:0,
+        popupPlaceholder:'点击输入评论',
+        pageNum:1,
+        pageSize:2,//初始为2
+        jiazaitext:'加载更多',
+        replyType:2,//回复类型 1:回复主题 2:回复楼层 3:回复楼层内的评论
+        replyId:''
+    }
+},
+onReachBottom() {
+},
+methods: {
+    async setQalike(item){
+        let res = await Qalike(item.id)
+        if (item.isLike == '1') {
+            item.isLike = '2'
+            item.likesCount = item.likesCount - 1
+        }else{
+            item.isLike = '1'
+            item.likesCount = item.likesCount + 1
+        }
+    },
+    async getTopicReply(){
+        let res = await QareplyPage({
+            pageNum:1,
+            pageSize:100,
+            floorId:item.id,
+            topicId:item.topicId,
+        })
+        
+        this.CommentData = {
+            ...item,
+            floorList:res.data.data.rows || []
+        }
+    },
+    async submit2(){
+        //对子级回复
+        let res = await Qareplybyid({
+            floorId:this.popupData.id,
+            content:this.inputValue2,
+            replyId:this.replyId,
+            replyType:this.replyType, //回复类型 1:回复主题 2:回复楼层 3:回复楼层内的评论
+        },this.popupData.topicId)
+
+        if (res.data.code == 200) {
+            util.toastFunc('回复成功')
+            this.inputValue2 = ''
+
+            //初始化请求页签
+            this.pageNum = 1
+            this.dataList = []
+            //获取评论列表
+            this.getTopicReply()
+            this.$emit('initDatalist')
+        }
+    },
+    open() {
+        // console.log('open');
+    },
+    close() {
+        // this.popupShow = false
+        this.$emit('closeComment')
+    },
+    toReply(item,type){
+        //获取对谁回复
+        console.log(item);
+        this.replyType = type
+        if (type == 3) {
+            this.replyId = item.id
+        }else{
+            this.replyId = ''
+        }
+        this.popupPlaceholder = `对${item.authorName}回复`
+    }
+}
+}
+</script>
+
+<style lang="scss" scoped>
+.content{
+    width: 750rpx;
+
+    position: fixed;
+    bottom: 0;
+    z-index: 100;
+}
+.comment{
+    display: flex;
+    width: 700rpx;
+    
+    margin-top: 10rpx;
+}
+.right_content{
+     width: 598rpx;
+     margin-left: 26rpx;
+}
+.rc_1{
+    width: 500rpx;
+    height: 50rpx;
+    font-size: 28rpx;
+    font-weight: 400;
+    color: #666666;
+    word-break: break-all;
+    text-overflow: ellipsis;
+    overflow: hidden;
+    line-height: 50rpx;
+    margin-left: 16rpx;
+}
+.rc_2{
+    width: 500rpx;
+    height: 50rpx;
+    font-size: 28rpx;
+    font-weight: 400;
+    color: #999999;
+    line-height: 40rpx;
+}
+.rc_3{
+    max-width: 660rpx;
+    font-size: 32rpx;
+    font-weight: 500;
+    color: #333333;
+    line-height: 48rpx;
+    margin-bottom: 24rpx;
+}
+.btn{
+    width: 150rpx;
+    height: 70rpx;
+    margin-left: 20rpx;
+    border-radius: 40rpx;
+    background: #46a6ff;
+    text-align: center;
+    line-height: 70rpx;
+    font-size: 28rpx;
+    color: #fff;
+}
+.popupTitle{
+    width: 140rpx;
+    height: 45rpx;
+    line-height: 45rpx;
+    font-size: 32rpx;
+    font-family: PingFang SC, PingFang SC-Bold;
+    font-weight: 700;
+    text-align: left;
+    color: #333333;
+    margin: 30rpx;
+}
+.popupView{
+    height: 1000rpx;
+    display: flex;
+    padding-top: 10rpx;
+    flex-direction: column;
+    align-items: center;
+}
+.scrollview{
+    height: 900rpx;
+    overflow: auto;
+}
+.btnflex{
+    display: flex;
+    flex-direction: row;
+    align-items: center;
+    position: fixed;
+    bottom: 0;
+    left: 0;
+
+    width: 750rpx;
+    height: 100rpx;
+    background: #ffffff;
+}
+.commentInput{
+    width: 520rpx;
+    background: #EEEEEE;
+    border-radius: 40rpx 40rpx 40rpx 40rpx; 
+    margin-left: 30rpx;
+}
+.loadmore{
+    height:200rpx;
+    text-align: center;
+    font-size: 28rpx;
+    font-weight: 400;
+    color: #999;
+    padding-top: 24rpx;
+}
+.commentInput{
+    background: #EEEEEE;
+    border-radius: 40rpx 40rpx 40rpx 40rpx; 
+}
+.one_recomment_box{
+    width: 660rpx;
+    background: #f6f6f6;
+    margin: 0 auto;
+    padding: 20rpx;
+}
+.one_comment_box{
+    margin: 0 auto;
+    padding: 10rpx;
+}
+.comment_foot{
+    display: flex;
+    justify-content: space-between;
+}
+</style>
+    

+ 1 - 0
pages/home/exchange.vue

@@ -1,5 +1,6 @@
 <template>
     <view class="bg">
+        <!-- 互动天地 -->
         <view class="head">
             <view v-if="list1.length>0" class="margintb">
                 <u-tabs :current="tabCurrent" :list="list1" @click="tabsChange"></u-tabs>

+ 354 - 0
pages/home/exchangeDetails.vue

@@ -0,0 +1,354 @@
+<template>
+    <!-- 互动问答详情 -->
+    <view class="bg">
+        <view style="height: 10rpx;"></view>
+        <!-- 顶部 问题发起人 -->
+        <view class="wdbox">
+            <view class="wdflex" style="align-items: center;">
+                <view class="photo">
+                    <u--image shape="circle" width="80rpx" height="80rpx" :src="QaDetail.authorLogo" ></u--image>
+                </view>
+                <view class="wen_name">{{ QaDetail.authorName }}</view>
+                <view  class="follow" @click="setQacollect()">{{ QaDetail.isCollection == '2' ? '取消关注' : '关注问题' }}</view>
+            </view>
+            <view class="wdflex">
+                <!-- <view class="wen" style="background: #ff8c33">答</view> -->
+                <view class="wen_text">{{ QaDetail.content }}</view>
+            </view>
+            <view class="wdflex" style="justify-content: space-between;">
+                <view class="wen_text2">{{ QaDetail.createTime }}</view>
+                <view  class="wen_text2">{{ QaDetail.num  + '回复'}}</view>
+            </view>
+        </view>
+
+        <!-- 问题回复列表 -->
+        <view class="wdbox" v-for="item in newsList" :key="item.id">
+            <view class="wdflex" style="align-items: center;">
+                <view class="photo">
+                    <u--image shape="circle" width="80rpx" height="80rpx" :src="item.authorLogo" ></u--image>
+                </view>
+                <view class="wen_name">{{ item.authorName }}</view>
+            </view>
+
+            <view class="wdflex">
+                <view class="wen" style="background: #ff8c33">答</view>
+                <view class="wen_text" style="font-weight: 700;color: #666666;">{{ item.content }}</view>
+            </view>
+            <view class="wdflex" style="justify-content: space-between;align-items: center;">
+                <view class="wen_text2">{{ item.createTime }}</view>
+                <view class="flex wen_text2" style="width: 200rpx;">
+                    <view class="flex" style="align-items: center;" @click="openComment(item)">
+                        <u--image shape="circle" width="48rpx" height="48rpx" src="/static/myinfo/icomx_message2.png" ></u--image>
+                        <text style="margin-left: 8rpx;">{{ item.num }}</text>
+                    </view>
+                    <view class="flex" @click="setQalike(item)" style="align-items: center;">
+                        <u--image v-if="item.isLike == '1'" shape="circle" width="48rpx" height="48rpx" src="/static/myinfo/icomx_dianzan1.png" ></u--image>
+                        <u--image v-else shape="circle" width="48rpx" height="48rpx" src="/static/myinfo/icomx_dianzan.png" ></u--image>
+                        <text  style="margin-left: 8rpx;">{{ item.likesCount }}</text>
+                    </view>
+                </view>
+            </view>
+        </view>
+        <commentNew @initDatalist="'initDatalist'" :CommentData="CommentData" :showComment="showComment" @closeComment="closeComment"></commentNew>
+
+        <view class="loadmore" @click="loadmore()" >
+            {{jiazaitext}}
+        </view>
+        <view class="btnflex">
+            <view class="commentInput"> 
+                <u-input placeholder="评论" v-model="inputValue2"  type="text"  />
+            </view>
+            <view class="btn" @click="submit2">
+                提交
+            </view>
+        </view>
+        <view style="height:100rpx"></view>
+    </view>
+</template>
+<script>
+import {topicQaDetail,Qareplybyid,QareplyPage,Qalike,Qacollect} from '@/http/api/common.js'
+import commentNew from './base/commentNew.vue'
+import * as util from '@/pages/util/util.js'
+export default {
+    components: {
+        commentNew
+    },
+    
+data() {
+return {
+    newsList:[],
+    pageNum:1,
+    num:0,
+    topicId:'',
+    inputValue2:'',
+    jiazaitext:'加载更多',
+    loadingType:false,
+    showComment:false,
+    QaDetail:{
+        authorLogo:'',
+        name:'张三',
+        title:'我们睡着了,身体都在忙些什么呢?',
+        follow:'关注问题',
+        time:'2024-5-20 16:54 提问',
+        num:'4',
+        isCollection:'1',
+    },
+    CommentData:null
+}
+},
+onReachBottom() {
+    this.loadmore()
+},
+onLoad(e) {
+   this.topicId = e.id
+   this.initData()
+},
+methods: {
+    async setQacollect(){
+        let res = await Qacollect(this.QaDetail.id)
+        this.QaDetail.isCollection = this.QaDetail.isCollection == '1'? '2' : '1'
+    },
+    async setQalike(item){
+        let res = await Qalike(item.id)
+        if (item.isLike == '1') {
+            item.isLike = '2'
+            item.likesCount = item.likesCount - 1
+        }else{
+            item.isLike = '1'
+            item.likesCount = item.likesCount + 1
+        }
+    },
+    async submit2(){
+        //对主题回复
+        let res = await Qareplybyid({
+            floorId:'',
+            content:this.inputValue2,
+            replyId:'',
+            replyType:1, //回复类型 1:回复主题 2:回复楼层 3:回复楼层内的评论
+        },this.topicId)
+
+        if (res.data.code == 200) {
+            util.toastFunc('回复成功')
+            this.inputValue2 = ''
+
+            //初始化请求页签
+            this.pageNum = 1
+            this.CommentData = []
+            //获取评论列表
+            this.getTopicReply()
+            this.close()
+        }
+    },
+    async openComment(item){
+        //把选中的子项回复赋值
+        console.log(item);
+        let res = await QareplyPage({
+            pageNum:1,
+            pageSize:100,
+            floorId:item.id,
+            topicId:item.topicId,
+        })
+        
+        this.CommentData = {
+            ...item,
+            floorList:res.data.data.rows || []
+        },
+        this.showComment = true
+    },
+    closeComment(){
+        this.showComment = false
+    },
+    openAskingQuestions(e){
+        uni.navigateTo({ 
+            url: '/pages/home/AskingQuestions'
+        })
+    },
+    async initDatalist(){
+      
+        //每次切换页签初始化请求页签
+        this.pageNum = 1
+        this.newsList = []
+
+        await this.initData()
+    },
+     async initData(){
+
+        let data = {
+            pageNum:this.pageNum,
+            pageSize:10
+        }
+        let res = await topicQaDetail(data,this.topicId)
+        if (res.data.code == 200 ) {
+            this.QaDetail = res.data.data
+
+            let newrows = this.QaDetail.repliesPage.rows || []
+
+            this.newsList.push(...newrows)
+            this.num = this.QaDetail.repliesPage.total
+            if(this.newsList.length!=this.QaDetail.repliesPage.total){
+                this.jiazaitext="加载更多"
+            }else{
+                this.jiazaitext="已经到底"
+            }
+        }
+    },
+    //加载更多
+    loadmore(){
+        console.log('下拉加载',this.jiazaitext);
+        if (this.jiazaitext=="加载更多") {
+            this.pageNum=this.pageNum+1
+            this.jiazaitext="加载中..."
+            this.initData()
+        }
+    },
+}
+}
+</script>
+
+<style lang="less" scoped>
+.bg{
+    background-color: #F6F6F6;
+    width: 100vw;
+    min-height: 100vh;
+}
+
+.loadmore{
+    height:200rpx;
+    text-align: center;
+    font-size: 28rpx;
+    font-weight: 400;
+    color: #999;
+    padding-top: 24rpx;
+}
+.wdbox{
+    width: 660rpx;
+    min-height: 240rpx;
+    background: #ffffff;
+    margin: 26rpx;
+    padding: 20rpx;
+    border-radius: 16rpx;
+}
+.wen{
+    width: 40rpx;
+    height: 40rpx;
+    background: #0084ff;
+    border-radius: 8rpx;
+    font-size: 28rpx;
+    text-align: center;
+    line-height: 40rpx;
+    color: #fff;
+}
+.wen_text{
+    margin-left: 16rpx;
+    width: 590rpx;
+    font-size: 32rpx;
+    font-family: PingFang SC, PingFang SC-Bold;
+    font-weight: 700;
+    text-align: left;
+    color: #333333;
+
+    display: -webkit-box;
+    word-break: break-all;
+    text-overflow: ellipsis;
+    overflow: hidden;
+    -webkit-box-orient: vertical;
+    -webkit-line-clamp:2;
+}
+.wen_name{
+    margin-left: 16rpx;
+    width: 400rpx;
+    font-size: 32rpx;
+    font-family: PingFang SC, PingFang SC-Bold;
+    font-weight: 700;
+    text-align: left;
+    color: #666666;
+    word-break: break-all;
+    text-overflow: ellipsis;
+    overflow: hidden;
+}
+.wen_num{
+    margin-left: 56rpx;
+    width: 590rpx;
+    font-size: 28rpx;
+    font-family: PingFang SC, PingFang SC-Regular;
+    font-weight: 400;
+    text-align: left;
+    color: #0084ff;
+}
+.wen_text2{
+    font-size: 28rpx;
+    font-family: PingFang SC, PingFang SC-Regular;
+    font-weight: 400;
+    text-align: left;
+    color: #999999;
+}
+.wdflex{
+    display: flex;
+    justify-content: flex-start;
+    flex-direction: row;
+    margin-top: 24rpx;
+}
+.submitbtn{
+    width: 700rpx;
+    height: 80rpx;
+    background: #46a6ff;
+    border-radius: 40rpx;
+
+    text-align: center;
+    font-size: 28rpx;
+    font-family: PingFang SC, PingFang SC-Medium;
+    font-weight: 500;
+    color: #ffffff;
+    line-height: 80rpx;
+
+    position: fixed;
+    bottom: 10rpx;
+    left: 26rpx;
+}
+.follow{
+    width: 160rpx;
+    height: 64rpx;
+    background: #deeefc;
+    border-radius: 4px;
+
+    font-size: 28rpx;
+    font-family: PingFang SC, PingFang SC-Medium;
+    font-weight: 500;
+    text-align: center;
+    color: #0084ff;
+    line-height: 64rpx;
+}
+.btnflex{
+    display: flex;
+    flex-direction: row;
+    align-items: center;
+    position: fixed;
+    bottom: 0;
+    left: 0;
+
+    width: 750rpx;
+    height: 100rpx;
+    background: #ffffff;
+}
+.commentInput{
+    width: 520rpx;
+    background: #EEEEEE;
+    border-radius: 40rpx 40rpx 40rpx 40rpx; 
+    margin-left: 30rpx;
+}
+.btn{
+    width: 150rpx;
+    height: 70rpx;
+    margin-left: 20rpx;
+    border-radius: 40rpx;
+    background: #46a6ff;
+    text-align: center;
+    line-height: 70rpx;
+    font-size: 28rpx;
+    color: #fff;
+}
+/deep/.u-input{
+    border: 0px;
+}
+</style>
+    

+ 251 - 0
pages/home/exchangeNew.vue

@@ -0,0 +1,251 @@
+<template>
+    <!-- 互动问答 -->
+    <view class="bg">
+        <view class="head">
+            <view v-if="!showType" class="search" style="margin-top: 10rpx;background: #F6F6F6;">
+				<u-search bgColor='#F6F6F6' placeholder="请输入问题" 
+                :showAction='false'
+                @custom="searchList"  v-model="searchword"></u-search>
+                <view @click="searchList" class="searchBtn">搜索</view>
+			</view>
+            <view v-if="showType" class="margintb tabwiew" >
+                <u-tabs keyName='subIdName' @click="clicktabs" :list="list1"></u-tabs>
+            </view>
+		</view>
+
+
+        <view class="wdbox" v-for="item in newsList" :key="item.id">
+            <view class="wdflex">
+                <view class="wen">问</view>
+                <view class="wen_text">{{ item.content }}</view>
+            </view>
+            <view class="wdflex">
+                <view class="wen" style="background: #ff8c33">答</view>
+                <view class="wen_text" style="font-weight: 700;color: #666666;">{{ item.contentByLast || '暂无回答' }}</view>
+            </view>
+            <view class="wdflex" @click="openDetails(item)">
+                <view class="wen_num">全部{{item.num}}个回答></view> 
+            </view>
+        </view>
+    
+        <view class="submitbtn" @click="openAskingQuestions">
+            我也要提问
+        </view>
+        <view class="loadmore" @click="loadmore()" >
+            {{jiazaitext}}
+        </view>
+        <view style="height:100rpx"></view>
+    </view>
+</template>
+<script>
+import * as util from '@/pages/util/util.js'
+import {getContentPage} from '@/http/api/common.js'
+export default {
+    components: {
+
+    },
+    
+data() {
+return {
+    newsList:[],
+    pageNum:1,
+    num:0,
+    searchword:'',
+    jiazaitext:'加载更多',
+    loadingType:false,
+    showType:false,
+    listType:'',
+    list1:[
+        {
+            subIdName: '我的提问',
+            key:'1'
+        },
+        {
+            subIdName: '我的回复',
+            key:'2'
+        },
+        {
+            subIdName: '我的关注',
+            key:'3'
+        },
+        {
+            subIdName: '我的点赞',
+            key:'4'
+        }
+    ],
+}
+},
+onReachBottom() {
+    this.loadmore()
+},
+onLoad(e) {
+   console.log(e.showType);
+   if (e?.showType == 'mywenda') {
+        this.showType = true
+        this.listType = '1'
+   }
+},
+onShow(){
+    
+    this.pageNum = 1
+    this.newsList = []
+    this.initData()
+},
+methods: {
+    async clicktabs(item){
+        console.log(item.key);
+        this.listType = item.key
+
+        //每次切换页签初始化请求页签
+        this.pageNum = 1
+        this.newsList = []
+
+        await this.initData()
+    },
+    openDetails(e){
+        uni.navigateTo({ 
+            url: '/pages/home/exchangeDetails?id='+e.id
+        })
+    },
+    openAskingQuestions(e){
+        uni.navigateTo({ 
+            url: '/pages/home/AskingQuestions'
+        })
+    },
+
+    async searchList(){
+      
+        //每次切换页签初始化请求页签
+        this.pageNum = 1
+        this.newsList = []
+
+        await this.initData()
+    },
+     async initData(){
+        //获取互动问答列表
+
+        let data = {
+            pageNum:this.pageNum,
+            pageSize:10,
+            listType:this.listType
+        }
+        let res = await getContentPage(data,2)
+        if (res.data.code == 200 ) {
+            let newrows = res.data.data.rows || []
+
+            this.newsList.push(...newrows)
+            this.num = res.data.data.total
+            if(this.newsList.length!=res.data.data.total){
+                this.jiazaitext="加载更多"
+            }else{
+                this.jiazaitext="已经到底"
+            }
+        }
+    },
+    //加载更多
+    loadmore(){
+        console.log('下拉加载',this.jiazaitext);
+        if (this.jiazaitext=="加载更多") {
+            this.pageNum=this.pageNum+1
+            this.jiazaitext="加载中..."
+            this.initData()
+        }
+    },
+}
+}
+</script>
+
+<style>
+.bg{
+    background-color: #F6F6F6;
+    width: 100vw;
+    min-height: 100vh;
+}
+.head{
+    display: flex;
+    flex-direction: column;
+    align-items: center;
+    justify-content: center;
+    background: #FFFFFF;
+    opacity: 1;
+    height: 120rpx;
+}
+.u-search{
+    width: 90vw;
+}
+
+.loadmore{
+    height:200rpx;
+    text-align: center;
+    font-size: 28rpx;
+    font-weight: 400;
+    color: #999;
+    padding-top: 24rpx;
+}
+.wdbox{
+    width: 660rpx;
+    min-height: 240rpx;
+    background: #ffffff;
+    margin: 26rpx;
+    padding: 20rpx;
+}
+.wen{
+    width: 40rpx;
+    height: 40rpx;
+    background: #0084ff;
+    border-radius: 8rpx;
+    font-size: 28rpx;
+    text-align: center;
+    line-height: 40rpx;
+    color: #fff;
+}
+.wen_text{
+    margin-left: 16rpx;
+    width: 590rpx;
+    font-size: 32rpx;
+    font-family: PingFang SC, PingFang SC-Bold;
+    font-weight: 700;
+    text-align: left;
+    color: #333333;
+
+    display: -webkit-box;
+    word-break: break-all;
+    text-overflow: ellipsis;
+    overflow: hidden;
+    -webkit-box-orient: vertical;
+    -webkit-line-clamp:2;
+}
+.wen_num{
+    margin-left: 56rpx;
+    width: 590rpx;
+    font-size: 28rpx;
+    font-family: PingFang SC, PingFang SC-Regular;
+    font-weight: 400;
+    text-align: left;
+    color: #0084ff;
+}
+.wdflex{
+    display: flex;
+    justify-content: flex-start;
+    flex-direction: row;
+    margin-top: 24rpx;
+}
+.submitbtn{
+    width: 700rpx;
+    height: 80rpx;
+    background: #46a6ff;
+    border-radius: 40rpx;
+
+    text-align: center;
+    font-size: 28rpx;
+    font-family: PingFang SC, PingFang SC-Medium;
+    font-weight: 500;
+    color: #ffffff;
+    line-height: 80rpx;
+
+    position: fixed;
+    bottom: 10rpx;
+    left: 26rpx;
+}
+</style>
+    

+ 1 - 1
pages/index/base/head.vue

@@ -257,7 +257,7 @@ methods: {
 .swiperstyle{
     width: 702rpx;
     height: 300rpx;
-    box-shadow: 0px 0px 20px 0px rgba(0,0,0,0.5);
+    box-shadow: 0px 0px 20px 0px rgba(0,0,0,0.1);
     border-radius: 16rpx;
 }
 

+ 97 - 0
pages/index/base/labelItem.vue

@@ -0,0 +1,97 @@
+<template>
+    <view class="flexitem">
+        <view class="itemBox" @click="openLink(1)">
+            <view class="icon_left"></view>
+            <view>
+                <view class="i_title">供应市场</view>
+                <view class="i_conter">最新市场行情</view>
+            </view>
+            <view class="i_img">
+                <u--image width="80rpx" height="80rpx" src="/static/index/icon_gongysc.png" ></u--image>
+            </view>
+        </view>
+        <view class="itemBox" @click="openLink(2)" style="margin-left: 16rpx;background: #eff3ff;">
+            <view class="icon_left"></view>
+            <view>
+                <view class="i_title">互动问答</view>
+                <view class="i_conter">交流互动</view>
+            </view>
+            <view class="i_img">
+                <u--image width="80rpx" height="80rpx" src="/static/index/icon_hudongwd.png" ></u--image>
+            </view>
+        </view>
+    </view>
+</template>
+<script>
+export default {
+components: {
+},
+data() {
+    return {
+        info:[],
+        title:'互动天地',
+    }
+},
+async mounted() {
+},
+methods: {
+    openLink(type){
+        if (type == 1) {
+            //供应市场
+            uni.navigateTo({
+                url: '/supplierPages/pages/supplier/supplyMarket'
+            });
+        }else if (type == 2) {
+            //去互动问答
+            uni.navigateTo({
+                url: '/pages/home/exchangeNew'
+            });
+        }
+    }
+}
+}
+</script>
+
+<style lang="less" scoped>
+.flexitem{
+    display: flex;
+    justify-content: space-between;
+}
+.itemBox{
+    width: 343rpx;
+    height: 148rpx;
+    background: #e7f9f7;
+    border-radius: 16rpx;
+    display: flex;
+    align-items: center;
+    justify-content: space-between;
+}
+.icon_left{
+    width: 4px;
+    height: 12px;
+    background: #1dbfa1;
+    border-radius: 0px 4px 4px 0px;
+    margin-bottom: 36rpx;
+}
+.i_title{
+    width: 128rpx;
+    height: 45rpx;
+    font-size: 32rpx;
+    font-weight: 700;
+    text-align: left;
+    color: #333333;
+}
+.i_conter{
+    width: 168rpx;
+    height: 40rpx;
+    font-size: 28rpx;
+    font-weight: 400;
+    text-align: left;
+    color: #999999;
+}
+.i_img{
+    margin-right: 18rpx;
+}
+
+</style>
+    

+ 4 - 2
pages/index/base/newVideo.vue

@@ -34,8 +34,10 @@ methods: {
         this.menuslist = []
         if (res.data.code == 200) {
             this.info = res.data.data
-            this.menuslist = res.data.data.articleVoList
-
+            if (res.data.data.articleVoList) {
+                const arr = res.data.data.articleVoList;
+                this.menuslist = arr.slice(0, 2);
+            }
         }
     },
     clicktoMore(){

+ 4 - 1
pages/index/base/news.vue

@@ -36,7 +36,10 @@ methods: {
         this.menuslist = []
         if (res.data.code == 200) {
             this.info = res.data.data
-            this.menuslist = res.data.data.articleVoList
+            if (res.data.data.articleVoList) {
+                const arr = res.data.data.articleVoList;
+                this.menuslist = arr.slice(0, 3);
+            }
 
         }
     },

+ 5 - 1
pages/index/index.vue

@@ -6,6 +6,8 @@
 		<Market class="margintop20"></Market>
 		<!-- 商场分类 -->
 		<shoppingMalls class="margintop20"></shoppingMalls>
+		<!-- 页签跳转 -->
+		<labelItem class="margintop20"></labelItem>
 		<!-- 最新资讯 -->
 		<news class="margintop20"></news>
 		<!-- 最新视频 -->
@@ -22,6 +24,7 @@ import shoppingMalls from './base/shoppingMalls.vue'
 import news from './base/news.vue'
 import newVideo from './base/newVideo.vue'
 import Exchange from './base/Exchange.vue'
+import labelItem from './base/labelItem.vue'
 
 import {carouselList} from '@/http/api/common.js'
 export default {
@@ -31,7 +34,8 @@ export default {
 		shoppingMalls,
 		news,
 		newVideo,
-		Exchange
+		Exchange,
+		labelItem
 	},
 data() {
 	return {

+ 7 - 3
pages/market/PublishComments.vue

@@ -133,9 +133,13 @@ methods: {
                     user: 'test'
                 },
                 success: (res) => {
-                    setTimeout(() => {
-                        resolve(res.data.data)
-                    }, 1000)
+                    const fileData = JSON.parse(res.data)
+                    if (fileData.code == 500) {
+                        resolve('')
+                    }else{
+                        const fileData = JSON.parse(res.data)
+                        resolve(fileData.data)
+                    }
                 }
             });
         })

+ 102 - 19
pages/market/allOrder.vue

@@ -44,9 +44,13 @@
                 (含制作费、包装贷费)
             </view>
             <view class="btnright">
-                <view @click="toCancelOrder(item.id)" v-if="item.status=='1'" class="btn">取消订单</view>
+                <!-- <view @click="toCancelOrder(item.id)" v-if="item.status=='1'" class="btn">取消订单</view>
                 <view @click="linktoPublishComments()" v-if="item.type=='4'" class="btn">立即评价</view>
-                <view @click="toOrderAgain(item.id)" v-if="item.status=='3'||item.status=='2'" class="btn">再次购买</view>
+                <view @click="toOrderAgain(item.id)" v-if="item.status=='3'||item.status=='2'" class="btn">再次购买</view> -->
+
+                <view @click="reSubmitOrder(item)" v-if="item.status=='1'||item.status=='4'" class="btn">立即支付</view>
+                <view @click="toRefundApply(item.id)" v-if="item.status=='3'||item.status=='9'||item.status=='8'" class="btn">申请退款</view>
+                <view @click="toOrderAgain(item.id)" v-if="item.status=='7'||item.status=='-1'" class="btn">再次购买</view>
             </view>
         </view>
         <view class="loadmore" @click="loadmore()" >
@@ -59,7 +63,8 @@
     </view>
 </template>
 <script>
-import {orderPage,cancelOrder,orderAgain} from '@/http/api/common.js'
+import {orderPage,cancelOrder,orderAgain,payPaying,
+    confirmOrder,refundApply} from '@/http/api/common.js'
 import * as util from '@/pages/util/util.js'
 export default {
 components: {
@@ -72,22 +77,35 @@ data() {
                 key:''
             },
             {
-                subIdName: '未确认',
-                key:'1'
+                subIdName: '未付款',
+                key:'1,2,4'
             },
             {
-                subIdName: '已确认',
-                key:'2'
+                subIdName: '已付款',
+                key:'3,9,8'
             },
             {
-                subIdName: '已取消',
-                key:'3'
+                subIdName: '退款中',
+                key:'5,6'
             },
             {
-                subIdName: '已完成',
-                key:'4'
+                subIdName: '已取消',
+                key:'7,-1'
             }
         ],
+        typeNameObj:{
+            '-1':'取消支付',
+            '0':'预下单',
+            '1':'未支付',
+            '2':'支付中',
+            '3':'支付成功',
+            '4':'支付失败',
+            '5':'退款审核中',
+            '6':'退款中',
+            '7':'退款成功',
+            '8':'退款失败',
+            '9':'审核不通过'
+        },
         dataList:[],//订单列表
         status:'',
         pageSize:10,
@@ -96,7 +114,7 @@ data() {
     }
 },
 onLoad() {
-   
+    
 },
 onShow() {
     //每次切换页签初始化请求页签
@@ -109,6 +127,71 @@ onReachBottom() {
     this.loadmore()
 },
 methods: {
+    async reSubmitOrder(item){
+        //立即支付
+        let res = await confirmOrder({
+            remark:item.remark,
+            deliveryAddressId:item.deliveryAddressId,
+        },item.id)
+        if (res.data.code == 200) {
+            let PaymentData = res.data.data
+            const that = this;
+            // 调用微信支付
+            uni.requestPayment({
+                provider: 'wxpay',
+                timeStamp: PaymentData.timeStamp,
+                nonceStr: PaymentData.nonceStr,
+                package: PaymentData.packageVal,
+                signType: PaymentData.signType,
+                paySign: PaymentData.paySign,
+                appId: PaymentData.appId,
+                success(res) {
+                    uni.showLoading({
+                        title: '确认支付状态中...'
+                    });
+                    that.ConfirmPaymentStatus(item.id)
+                },
+                fail(err) {
+                    console.log('支付失败', err)
+                    uni.showToast({
+                        icon: 'none',
+                        title: '支付失败',
+                    })
+                }
+            })          
+        }     
+    },
+    async ConfirmPaymentStatus(id){
+        //确认支付状态
+        let res = await payPaying(id)
+        uni.hideLoading()
+        if (res.data.code == 200) {
+            util.toastFunc('支付成功',()=>{
+                this.status = ''
+                //每次切换页签初始化请求页签
+                this.pageNum = 1
+                this.dataList = []
+
+                this.getorderPage()
+            })
+        }else{
+            util.toastFunc(res.data.msg)
+        }
+        
+    },
+    async toRefundApply(id){
+        //申请退款
+        let res = await refundApply(id)
+        if (res.data.code == 200) {
+            util.toastFunc('申请退款成功',()=>{
+                this.status = ''
+                this.pageNum = 1
+                this.dataList = []
+
+                this.getorderPage()
+            })
+        }
+    },
     async toCancelOrder(id){
         //取消订单
         let res = await cancelOrder(id)
@@ -135,13 +218,13 @@ methods: {
         }
     },
     computerStatus(status){
-        let a = {
-            '1':'未确认',
-            '2':'已确认',
-            '3':'已取消',
-            '4':'已完成',
-        }
-        return a[status]
+        // let a = {
+        //     '1':'未确认',
+        //     '2':'已确认',
+        //     '3':'已取消',
+        //     '4':'已完成',
+        // }
+        return this.typeNameObj[status]
     },
      //加载更多
      loadmore(){

+ 56 - 7
pages/market/confirmOrder.vue

@@ -111,7 +111,9 @@
     </view>
 </template>
 <script>
-import {orderDetail,cancelOrderByConfirm,confirmOrder,deliveryAddressList} from '@/http/api/common.js'
+import {orderDetail,cancelOrderByConfirm,
+    confirmOrder,deliveryAddressList,
+    payPaying} from '@/http/api/common.js'
 import * as util from '@/pages/util/util.js'
 export default {
 components: {
@@ -196,18 +198,65 @@ methods: {
             remark:this.remark,
             deliveryAddressId:this.orderDetailData.deliveryAddressId,
         },this.orderDetailData.id)
+        if (res.data.code == 200) {
+            let PaymentData = res.data.data
+            console.log('PaymentData',PaymentData);
+            const that = this;
+            // 调用微信支付
+            uni.requestPayment({
+                provider: 'wxpay',
+                timeStamp: PaymentData.timeStamp,
+                nonceStr: PaymentData.nonceStr,
+                package: PaymentData.packageVal,
+                signType: PaymentData.signType,
+                paySign: PaymentData.paySign,
+                appId: PaymentData.appId,
+                success(res) {
+                    uni.showLoading({
+                        title: '确认支付状态中...'
+                    });
+                    that.ConfirmPaymentStatus()
+                    
+                },
+                fail(err) {
+                    console.log('支付失败', err)
+                    uni.showToast({
+                        icon: 'none',
+                        title: '支付失败',
+                    })
+                }
+            })
 
-        util.toastFunc('提交订单成功',()=>{
-            uni.switchTab({
-                url: '/pages/market/market',
-            });
-        })
+            
+        }
+        
+    },
+    async ConfirmPaymentStatus(){
+        //确认支付状态
+        let res = await payPaying(this.orderDetailData.id)
+        uni.hideLoading()
+        if (res.data.code == 200) {
+            util.toastFunc('支付成功',()=>{
+                uni.switchTab({
+                    url: '/pages/market/market',
+                });
+            })
+        }else{
+            util.toastFunc(res.data.msg)
+        }
+        
     },
     openaddress(){
         uni.navigateTo({
              url: '/pages/myinfo/address?selectAddress=1'
         });
-    }
+    },
+    createUuid() {
+        function S4() {
+            return (((1 + Math.random()) * 0x10000) | 0).toString(16).substring(1);
+        }
+        return (S4() + S4() + S4() + S4() + S4() + S4() + S4() + S4());
+    },
 }
 }
 </script>

+ 15 - 4
pages/market/market.vue

@@ -4,7 +4,7 @@
 			<view class="top_L">
 				<u-icon name="map" color="#999" size="16"></u-icon>
 				<view class="top_text">{{AddressData.address}}</view>
-				<u-icon name="arrow-right" color="#999" size="16"></u-icon>
+				<u-icon @click="linkto('address','1')" name="arrow-right" color="#999" size="16"></u-icon>
 			</view>
 			<view @click="linkto('address')" class="top_R">
 				编辑
@@ -158,7 +158,6 @@ data() {
 	};
 },
 async onShow(e) {
-	
 	if(uni.getStorageSync('AppAuthorization')){
 		 //获取地址列表
 		await this.getdeliveryAddressList()
@@ -166,6 +165,9 @@ async onShow(e) {
 		 //获取购物车列表
 		await this.getshoppingCartPage()
 	}
+	if (uni.getStorageSync('selectAddress')) {
+		this.AddressData = JSON.parse(uni.getStorageSync('selectAddress'))
+	}
 },
 methods: {
 	
@@ -175,6 +177,9 @@ methods: {
         if (res.data.code == 200) {
 			if (res.data.data) {
 				this.AddressData = res.data.data.find(v=>v.defaultAddress == '1')
+				if (res.data.data.lenght == 1) {
+					this.AddressData = res.data.data[0]
+				}
 			}
         }
         
@@ -329,12 +334,18 @@ methods: {
         }
     },
 	async submit(){
+		if (!this.AddressData || !this.AddressData?.id) {
+			util.toastFunc('请至少设置一个默认地址',()=>{
+				this.linkto('address')
+			})
+		}
 		//确认订单
 		if (this.tempCheckArray.lenght==0) {
 			util.toastFunc('已从购物车中移除',()=>{
 				this.getshoppingCartPage()
 			})
 		}
+		console.log('this.tempCheckArray',this.tempCheckArray);
 		let shoppingCarSubmitVOList = this.tempCheckArray.map(v => {
 			let a = {
 				id:v.id
@@ -355,10 +366,10 @@ methods: {
 			});
 		}
 	},
-	linkto(key){
+	linkto(key,type=''){
 		if (key == 'address') {
 			uni.navigateTo({
-				url: '/pages/myinfo/address'
+				url: '/pages/myinfo/address?selectAddress='+type
 			});
 		}
 		

+ 1 - 1
pages/myinfo/address.vue

@@ -70,7 +70,7 @@ export default {
 data() {
     return {
         list:[],
-        defaultAddress:false,
+        defaultAddress:true,
         ismodify:false,
         form:{
             contact:'',

+ 3 - 0
pages/myinfo/login.vue

@@ -43,11 +43,13 @@ methods: {
         if (uni.getStorageSync('wxcode')) {
             this.disabled = true
             let res = await login(uni.getStorageSync('wxcode'))
+            console.log('获取微信登录',res);
             if (res.data.code == 200) {
                 this.disabled = false
                 uni.setStorageSync("AppAuthorization",res.data.data.token);
                 //成功获取code 然后需要用户点击 获取手机号
                 if (res.data.data.hasMobile == false) {
+                    util.toastFunc('第一次登录请绑定手机号')
                     //判断是否绑定过手机号 如果false则去绑定
                     this.showGetPhoenBtn = true
                 }else{
@@ -92,6 +94,7 @@ methods: {
     async getphone(code){
         this.disabledPhone = true
         let res = await bindphone(code)
+        console.log('获取手机号',res);
         if (res.data.code == 200) {
             this.disabledPhone = false
             util.toastFunc('登录成功',()=>{

+ 37 - 3
pages/myinfo/myinfo.vue

@@ -2,7 +2,7 @@
   <view class="myinfo">
     <!-- 顶部信息 -->
     <view class="myinfo_top">
-      <view class="userImg">
+      <view @click="tologin()" class="userImg">
         <u--image width='128rpx' height="128rpx" :src="myinfo.img" shape="circle"></u--image>
       </view>  
       <view @click="tologin()" class="myinfo_text">
@@ -70,6 +70,7 @@ export default {
         id:'0',
         qm:'无',
         orderCount:'0',
+        isVendor:'0',
         img:'https://cdn.uviewui.com/uview/album/1.jpg',
       },
       list:[
@@ -102,18 +103,36 @@ export default {
       list2:[
         {
           id:1,
+          url:'/static/myinfo/icomx_wodgongy.png',
+          name:'供应申报',
+          linkto:'/supplierPages/pages/supplier/SupplyDeclaration'
+        },
+        {
+          id:2,
+          url:'/static/myinfo/icomx_gysrz.png',
+          name:'供应商入驻',
+          linkto:'/supplierPagespages/supplier/SupplierEntryForm'
+        },
+        {
+          id:3,
           url:'/static/myinfo/icomx_souc.png',
           name:'我的收藏',
           linkto:'/pages/market/BrowsingHistory?showType=shouchang'
         },
         {
-          id:2,
+          id:31,
+          url:'/static/myinfo/iconx_wodwd.png',
+          name:'我的问答',
+          linkto:'/pages/home/exchangeNew?showType=mywenda'
+        },
+        {
+          id:4,
           url:'/static/myinfo/icomx_dizhi.png',
           name:'我的地址',
           linkto:'/pages/myinfo/address'
         },
         {
-          id:3,
+          id:5,
           url:'/static/myinfo/icomx_message.png',
           name:'意见反馈',
           linkto:'/pages/myinfo/userInfo?showType=fangkui'
@@ -139,6 +158,7 @@ export default {
         this.myinfo.name = res.data.data.nickName
         this.myinfo.img = res.data.data.image
         this.myinfo.orderCount = res.data.data?.orderCount || 0
+        this.myinfo.isVendor= res.data.data?.isVendor || 0
         
       }
     },
@@ -152,6 +172,13 @@ export default {
       });
     },
     toUserInfo(){
+      if(!uni.getStorageSync('AppAuthorization')){
+        uni.navigateTo({
+          url: '/pages/myinfo/login'
+        });
+        //登录
+        return
+      }
       uni.navigateTo({
           url: '/pages/myinfo/userInfo'
       });
@@ -164,9 +191,16 @@ export default {
                 url: data.linkto
             });
           }else{
+            if (data.name == '供应商入驻' && this.myinfo?.isVendor == '1') {
+              uni.showToast({
+                title: '您已经入驻供应商了',
+                icon: 'none'
+              });
+            }else{
               uni.navigateTo({
                   url: data.linkto
               });
+            }
           }
       }
     }

+ 4 - 2
pages/myinfo/notifiesPageDetails.vue

@@ -57,9 +57,11 @@ methods: {
     font-family: PingFang SC, PingFang SC;
     font-weight: bold;
     color: #333333;
-    line-height: 56rpx;
+    /* line-height: 56rpx; */
+    display: flex;
+    align-items: center;
 
-    display: -webkit-box;
+    // display: -webkit-box;
     word-break: break-all;
     text-overflow: ellipsis;
     overflow: hidden;

+ 23 - 9
pages/myinfo/userInfo.vue

@@ -3,7 +3,7 @@
         <view v-if="showType == '1'" class="scrollview">
             <u--form :rules="rules" labelPosition="left" :model="form"  ref="uForm">
                 <u-form-item prop="username" :labelWidth="labelWidth" label="用户名"  borderBottom >
-                    <u--input placeholder="请输入用户名" v-model="form.username" border="none" ></u--input>
+                    <u--input maxlength="12" placeholder="请输入用户名" v-model="form.username" border="none" ></u--input>
                 </u-form-item>
                 <!-- 
                 <u-form-item prop="address" :labelWidth="labelWidth" label="签名"  borderBottom >
@@ -186,13 +186,22 @@ methods: {
         for (let i = 0; i < lists.length; i++) {
             const result = await this.uploadFilePromise(lists[i])
             console.log('result',result);
-            let item = this[`fileList${event.name}`][fileListLen]
-            this[`fileList${event.name}`].splice(fileListLen, 1, Object.assign(item, {
-                status: 'success',
-                message: '',
-                url: result
-            }))
-            fileListLen++
+            if (result != '') {
+                let item = this[`fileList${event.name}`][fileListLen]
+                this[`fileList${event.name}`].splice(fileListLen, 1, Object.assign(item, {
+                    status: 'success',
+                    message: '',
+                    url: result
+                }))
+                fileListLen++
+            }else{
+                toastFunc('上传失败,请删除重试')
+                this[`fileList${event.name}`].splice(fileListLen, 1, Object.assign({}, {
+                    status: 'fail',
+                    message: '',
+                    url: ''
+                }))
+            }
         }
     },
     uploadFilePromise(file) {
@@ -203,7 +212,12 @@ methods: {
                 name: 'file',
                 success: (res) => {
                     const fileData = JSON.parse(res.data)
-                    resolve(fileData.data.fileUrl)
+                    if (fileData.code == 500) {
+                        resolve('')
+                    }else{
+                        const fileData = JSON.parse(res.data)
+                        resolve(fileData.data.fileUrl)
+                    }
                 }
             });
         })

BIN
static/index/icon_gongysc.png


BIN
static/index/icon_hudongwd.png


BIN
static/myinfo/icomx_dianzan.png


BIN
static/myinfo/icomx_dianzan1.png


BIN
static/myinfo/icomx_gysrz.png


BIN
static/myinfo/icomx_message2.png


BIN
static/myinfo/icomx_wodgongy.png


BIN
static/myinfo/iconx_wodwd.png


BIN
static/myinfo/img_shenfzfm.png


BIN
static/myinfo/img_shenfzzm.png


BIN
static/myinfo/img_yingyezhiz.png


BIN
static/supplier/icon_gonyings.png


BIN
static/supplier/icon_success1.png


+ 556 - 0
supplierPages/pages/supplier/SupplierEntryForm.vue

@@ -0,0 +1,556 @@
+<template>
+<view class="bg">
+<view class="scrollview">
+    <u--form :rules="rules" labelPosition="left" :model="form"  ref="uForm">
+        <view class="formItemTitle">基本信息(必填)</view>
+        
+        <u-form-item class="formItem" prop="name" :labelWidth="labelWidth" label="供应商名称"  borderBottom >
+            <u--input :input-align="inputaligh" placeholder="填写供应商名称" v-model="form.name" border="none" clearable ></u--input>
+        </u-form-item>
+        <u-form-item class="formItem" prop="city" :labelWidth="labelWidth" label="供应商所在地"  borderBottom >
+            <view class="selectInput">
+                <u--input @click="cityShow=true" :disabled="true" :input-align="inputaligh" placeholder="选择所在地区" v-model="form.cityName" border="none" ></u--input>
+                <view @click="cityShow=true"><u-icon name="arrow-right"></u-icon></view>
+            </view>
+        </u-form-item>
+        <u-form-item class="formItem" prop="address" :labelWidth="labelWidth" label="详细地址"  borderBottom >
+            <u--input :input-align="inputaligh" placeholder="填写详细地址" v-model="form.address" border="none" clearable ></u--input>
+        </u-form-item>
+
+        <view class="margin20"></view>
+        <u-form-item class="formItem" prop="category" :labelWidth="labelWidth" label="主营类目"  borderBottom >
+            <view class="selectInput">
+                <u--input @click="categoryShow=true" :disabled="true" :input-align="inputaligh" placeholder="主营类目" v-model="form.categoryName" border="none" clearable ></u--input>
+                <view @click="categoryShow=true"><u-icon name="arrow-right"></u-icon></view>
+            </view>
+        </u-form-item>
+
+        <view class="margin20"></view>
+        <u-form-item class="formItem" prop="businessLicenseName" :labelWidth="labelWidth" label="营业注册名称"  borderBottom >
+            <u--input :input-align="inputaligh" placeholder="填写营业执照上企业名称" v-model="form.businessLicenseName" border="none" clearable ></u--input>
+        </u-form-item>
+        <u-form-item class="formItem" prop="businessLicenseNo" :labelWidth="labelWidth" label="营业执照号"  borderBottom >
+            <u--input :input-align="inputaligh" placeholder="请填写营业执照注册号" v-model="form.businessLicenseNo" border="none" clearable ></u--input>
+        </u-form-item>
+        <u-form-item class="formItem" prop="businessLicense" :labelWidth="labelWidth" label="营业执照照片"  borderBottom >
+            <view class="selectInput">
+                <u-upload
+                    :fileList="fileList1"
+                    @afterRead="afterRead"
+                    @delete="deletePic"
+                    name="1"
+                    multiple
+                    :maxCount="1"
+                ></u-upload>
+                <view style="color: #0084ff;font-size: 28rpx;" @click="openPopup(1)">查看示例</view>
+            </view>
+        </u-form-item>
+
+        <view class="margin20"></view>
+        <u-form-item class="formItem" prop="legalPersonName" :labelWidth="labelWidth" label="法人姓名"  borderBottom >
+            <u--input :input-align="inputaligh" placeholder="填写法人姓名" v-model="form.legalPersonName" border="none" clearable ></u--input>
+        </u-form-item>
+        <u-form-item class="formItem" prop="legalPersonCardNo" :labelWidth="labelWidth" label="法人身份证号"  borderBottom >
+            <u--input :input-align="inputaligh" placeholder="填写法人身份证号" v-model="form.legalPersonCardNo" border="none" clearable ></u--input>
+        </u-form-item>
+        <u-form-item class="formItem" prop="cardNoFront" :labelWidth="labelWidth" label="法人身份证照片 (正面)"  borderBottom >
+            <view class="selectInput">
+                <u-upload
+                    :fileList="fileList2"
+                    @afterRead="afterRead"
+                    @delete="deletePic"
+                    name="2"
+                    multiple
+                    :maxCount="1"
+                ></u-upload>
+                <view style="color: #0084ff;font-size: 28rpx;" @click="openPopup(2)">查看示例</view>
+            </view>
+        </u-form-item>
+        <u-form-item class="formItem" prop="cardNoReverse" :labelWidth="labelWidth" label="法人身份证照片 (反面)"  borderBottom >
+            <view class="selectInput">
+                <u-upload
+                    :fileList="fileList3"
+                    @afterRead="afterRead"
+                    @delete="deletePic"
+                    name="3"
+                    multiple
+                    :maxCount="1"
+                ></u-upload>
+                <view style="color: #0084ff;font-size: 28rpx;" @click="openPopup(3)">查看示例</view>
+            </view>
+        </u-form-item>
+
+        <view class="margin20"></view>
+        <u-form-item class="formItem" prop="contact" :labelWidth="labelWidth" label="联系人"  borderBottom >
+            <u--input :input-align="inputaligh" placeholder="输入联系人" v-model="form.contact" border="none" clearable ></u--input>
+        </u-form-item>
+        <u-form-item class="formItem" prop="phone" :labelWidth="labelWidth" label="联系电话"  borderBottom >
+            <u--input :input-align="inputaligh" placeholder="输入联系电话" v-model="form.phone" border="none" clearable ></u--input>
+        </u-form-item>
+        <u-picker ref="uPicker" @cancel="cityShow=false" keyName="name"  :show="cityShow" :columns="cityColumns" @confirm="cityPickerConfirm" @change="citypickerchange"></u-picker>
+        <u-picker @cancel="categoryShow=false" :show="categoryShow" keyName="dictValue" :columns="categoryColumns" @confirm="categoryPickerConfirm"></u-picker>
+    </u--form>
+    <u-popup :closeable='true' :round="10" :show="popupShow" @close="close" @open="open">
+        <view class="popupView">
+            <view class="popupImg">
+                <u--image width="500rpx" height="326rpx" :src="popupImgurl" ></u--image>
+            </view>
+        </view>
+        <view class="popupViewText">
+            {{ popupText }}
+        </view>
+        <view class="w700 btnflex">
+            <u-button  shape="circle" size="medium" type="primary" 
+            @click="close">{{ popupBtn }}</u-button>
+        </view>
+    </u-popup>
+    <view style="height: 100rpx;"></view>
+</view>
+
+<view class="btnbox" style="left: 24rpx;">
+    <!-- <view @click="submit('dosave')" class="btn">
+        保存
+    </view> -->
+    <view @click="submit('submit')" class="btn2">
+        提交审核
+    </view>
+</view>
+</view>
+</template>
+
+<script>
+import {
+    getAreaList,myInfo,getCategoryList,settledVendor
+    } from '@/http/api/common.js'
+import env from "@/http/config/config.js"
+import {toastFunc} from '@/pages/util/util.js'
+export default {
+
+data() {
+    return {
+        form:{
+            "name": "",
+            "contact": "",
+            "phone": "",
+            "businessLicense": "",
+            "cardNoFront": "",
+            "cardNoReverse": "",
+            "address": "",
+            "city": "",
+            "cityName": "",
+            "category": "",
+            "categoryName": "",
+            "businessLicenseName": "",
+            "businessLicenseNo": "",
+            "legalPersonName": "",
+            "legalPersonCardNo": ""
+        },
+        
+        rules: {
+            'name': {
+                type: 'string',
+                required: true,
+                message: '填写供应商名称',
+                trigger: ['blur', 'change']
+            },
+            'city': {
+                type: 'string',
+                required: true,
+                message: '请选择所在地区',
+                trigger: ['blur', 'change']
+            },
+            'address': {
+                type: 'string',
+                required: true,
+                message: '请填写详细地址',
+                trigger: ['blur', 'change']
+            },
+            'category': {
+                type: 'string',
+                required: true,
+                message: '请选择主营类目',
+                trigger: ['blur', 'change']
+            },
+            'businessLicenseName': {
+                type: 'string',
+                required: true,
+                message: '请填写营业执照上企业名称',
+                trigger: ['blur', 'change']
+            },
+            'businessLicenseNo': {
+                type: 'string',
+                required: true,
+                message: '请填写营业执照注册号',
+                trigger: ['blur', 'change']
+            },
+            'businessLicense': {
+                type: 'string',
+                required: true,
+                message: '请上传营业执照照片',
+                trigger: ['blur', 'change']
+            },
+            'legalPersonName': {
+                type: 'string',
+                required: true,
+                message: '请填写法人姓名',
+                trigger: ['blur', 'change']
+            },
+            'legalPersonCardNo': {
+                type: 'string',
+                required: true,
+                message: '请填写法人身份证号',
+                trigger: ['blur', 'change']
+            },
+            'cardNoFront': {
+                type: 'string',
+                required: true,
+                message: '请上传法人身份证照片 (正面)',
+                trigger: ['blur', 'change']
+            },
+            'cardNoReverse': {
+                type: 'string',
+                required: true,
+                message: '请上传法人身份证照片 (正面)',
+                trigger: ['blur', 'change']
+            },
+            'contact': {
+                type: 'string',
+                required: true,
+                message: '请输入联系人',
+                trigger: ['blur', 'change']
+            },
+            'phone':[ 
+                {
+                    type: 'string',
+                    required: true,
+                    message: '请输入联系电话',
+                    trigger: ['blur', 'change']
+                },
+                {
+                    validator: (rule, value, callback) => {
+                        return uni.$u.test.mobile(value);
+                    },
+                    message: '手机号码格式不正确',
+                    // 触发器可以同时用blur和change
+                    trigger: ['blur'],
+                }
+            ]
+        },
+        inputaligh:'right',
+        fileList1:[],
+        fileList2:[],
+        fileList3:[],
+        fileList:[],
+        file:[],
+        labelWidth:140,
+        popupShow:false,
+        popupText:'',
+        popupBtn:'上传营业执照',
+        popupImgurl:'',
+        cityShow:false,
+        cityloading:false,
+
+        cityColumns: [],
+        columnData: [],
+
+        categoryShow:false,
+        categoryColumns: [],
+        showType:'1',
+    }
+},
+components: {
+    
+},
+
+onLoad(e) {
+    this.getCategoryList()
+    this.getAreaList(2)
+},
+onReady() {
+    //如果需要兼容微信小程序,并且校验规则中含有方法等,只能通过setRules方法设置规则。
+    this.$refs.uForm?.setRules(this.rules)
+},
+
+methods: {
+    async getCategoryList(){
+        let res = await getCategoryList()
+        
+        this.categoryColumns.push(res.data.data)
+
+    },
+    //获取城市列表
+    async getAreaList(level,parentId=''){
+        let res = await getAreaList({
+            level,
+            parentId
+        })
+        this.cityColumns.push(res.data.data) 
+        await this.getColumnData(3,res.data.data[0].id)
+
+        const picker = this.$refs.uPicker
+        picker.setColumnValues(1, this.columnData[0])
+    },
+    //获取地区列表
+    async getColumnData(level,parentId=''){
+        this.cityloading = true
+        let res = await getAreaList({
+            level,
+            parentId
+        })
+        this.cityloading = false
+        
+        this.columnData.push(res.data.data)
+    },
+    cityPickerConfirm(e) {
+        console.log('confirm',e.value)
+        console.log('city',e.value[1].id)
+
+        this.form.city = e.value[1].id
+        this.form.cityName = e.value[1].name
+        this.cityShow = false
+    },
+    async citypickerchange(e){
+        const {
+            columnIndex,
+            index,
+            // 微信小程序无法将picker实例传出来,只能通过ref操作
+            picker = this.$refs.uPicker
+        } = e
+        if (columnIndex == 0) {
+            this.columnData = []
+            await this.getColumnData(3, this.cityColumns[0][index].id)
+            picker.setColumnValues(1, this.columnData[0])
+        }
+    },
+
+    openPopup(type) {
+        if (type == 1) {
+            this.popupText = '请参考图示提供营业执照,四角完整,确保证内容文字清晰可见,证件本身无残缺;上传图片要求:支持png、jpg、jpeg格式,1024MB内'
+            this.popupImgurl = '/static/myinfo/img_yingyezhiz.png'
+            this.popupBtn = '上传营业执照'
+        }else if (type == 2) {
+            this.popupText = '请参考图示提供法人身份证正反面照,四角完整、照片清晰、身份证原件、扫描件或复印件上传图片要求:支持png、jpg、jpeg格式,1024MB内'
+            this.popupImgurl = '/static/myinfo/img_shenfzzm.png'
+            this.popupBtn = '上传身份证正面'
+        }else{
+            this.popupText = '请参考图示提供法人身份证正反面照,四角完整、照片清晰、身份证原件、扫描件或复印件上传图片要求:支持png、jpg、jpeg格式,1024MB内'
+            this.popupImgurl = '/static/myinfo/img_shenfzfm.png'
+            this.popupBtn = '上传身份证反面'
+        }
+
+        this.popupShow = true
+        // console.log('open');
+    },
+    close() {
+        this.popupShow = false
+        // console.log('close');
+    },
+    categoryPickerConfirm(e) {
+        console.log('confirm', e.value[0])
+        this.form.category = e.value[0].dictKey
+        this.form.categoryName = e.value[0].dictValue
+        this.categoryShow = false
+    },
+   
+    async getmyInfo(){
+        let res = await myInfo()
+        if (res.data.code == 200) {
+        this.form.username = res.data.data.nickName
+
+        this.fileList1.push({
+            url:res.data.data.image
+        })
+        
+        }
+    },
+    async submit(type){
+        this.form.businessLicense = this.fileList1[0].url //营业执照
+        this.form.cardNoFront = this.fileList2[0].url  //身份证正面
+        this.form.cardNoReverse = this.fileList3[0].url //身份证反面
+
+        this.$refs.uForm.validate().then(async res1 => {
+            console.log(res1);
+            // if (type == 'dosave') {
+            //     //保存
+            // }else{
+
+            //     //提交
+            // }
+            let res = await settledVendor(this.form)
+            if (res.data.code == 200) {
+                uni.navigateTo({
+                    url: '/supplierPages/pages/supplier/supplierSuccess'
+                });
+            }
+        }).catch(errors => {
+            // uni.$u.toast('校验失败')
+        })
+    },
+    // 删除图片
+    deletePic(event) {
+        this[`fileList${event.name}`].splice(event.index, 1)
+    },
+    // 新增图片
+    async afterRead(event) {
+        // 当设置 multiple 为 true 时, file 为数组格式,否则为对象格式
+        console.log('event',event);
+        let lists = [].concat(event.file)
+        let fileListLen = this[`fileList${event.name}`].length
+        lists.map((item) => {
+            this[`fileList${event.name}`].push({
+                ...item,
+                status: 'uploading',
+                message: '上传中'
+            })
+        })
+        for (let i = 0; i < lists.length; i++) {
+            const result = await this.uploadFilePromise(lists[i])
+            console.log('result',result);
+            if (result != '') {
+                let item = this[`fileList${event.name}`][fileListLen]
+                this[`fileList${event.name}`].splice(fileListLen, 1, Object.assign(item, {
+                    status: 'success',
+                    message: '',
+                    url: result
+                }))
+                fileListLen++
+            }else{
+                toastFunc('上传失败,请删除重试')
+                this[`fileList${event.name}`].splice(fileListLen, 1, Object.assign({}, {
+                    status: 'fail',
+                    message: '',
+                    url: ''
+                }))
+            }
+        }
+    },
+    uploadFilePromise(file) {
+        return new Promise((resolve, reject) => {
+            let a = uni.uploadFile({
+                url: env.BASEURL + '/open/upload/uploadFile', // 仅为示例,非真实的接口地址
+                filePath: file.url,
+                name: 'file',
+                success: (res) => {
+                    const fileData = JSON.parse(res.data)
+                    if (fileData.code == 500) {
+                        resolve('')
+                    }else{
+                        const fileData = JSON.parse(res.data)
+                        resolve(fileData.data.fileUrl)
+                    }
+                }
+            });
+        })
+    },
+    
+
+}
+}
+</script>
+
+<style lang="scss">
+.bg{
+    width: 750rpx;
+    height: auto;
+    border-radius: 0rpx 0rpx 0rpx 0rpx;
+
+    display: flex;
+    flex-direction: column;
+    align-items: center;
+
+    background: #f6f6f6;
+}
+.scrollview{
+    width: 100vw;
+    height: calc(100vh - 120rpx);
+}
+.formItemTitle{
+    margin: 20rpx 0 20rpx 30rpx;
+}
+.btnbox{
+    display: flex;
+    position: fixed;
+    bottom: 20rpx;
+}
+.u-form-item{
+    background-color: #fff;
+}
+/deep/.u-form-item__body__left__content{
+    padding-left: 30rpx;
+}
+/deep/.u-form-item__body__right{
+    padding-right: 30rpx;
+}
+/deep/.u-form-item__body{
+    padding: 30rpx 0;
+}
+.selectInput{
+    display: flex;
+    flex-direction: row;
+    align-items: center;
+}
+.formItem {
+    background: #fff;
+}
+.btn{
+    width: 340rpx;
+    height: 80rpx;
+    background: #ffffff;
+    border: 1rpx solid #dddddd;
+    border-radius: 64rpx 64rpx 64rpx 64rpx;
+    opacity: 1;
+
+    font-size: 28rpx;
+    font-weight: 500;
+    color: #46A6FF;
+    line-height: 80rpx;
+    text-align: center;
+}
+.btn2{
+    width: 650rpx;
+    height: 80rpx;
+    background: #46A6FF;
+    border-radius: 64rpx 64rpx 64rpx 64rpx;
+    opacity: 1;
+
+    font-size: 28rpx;
+    font-weight: 500;
+    color: #FFFFFF;
+    line-height: 80rpx;
+    text-align: center;
+    margin-left: 10rpx;
+}
+.margin20{
+    margin-top: 20rpx;
+}
+.popupView{
+    height: 430rpx;
+    display: flex;
+    padding-top: 100rpx;
+    flex-direction: column;
+    align-items: center;
+}
+.popupImg{
+    width: 650rpx;
+    height: 400rpx;
+    background: #f6f6f6;
+    border-radius: 16rpx;
+    display: flex;
+    align-items: center;
+    justify-content: center;
+}
+.popupViewText{
+    width: 600rpx;
+    height: 120rpx;
+    font-size: 28rpx;
+    font-family: PingFang SC, PingFang SC-Regular;
+    font-weight: 400;
+    text-align: left;
+    color: #999999;
+    margin: 0 auto;
+}
+.btnflex{
+    padding: 24rpx;
+}
+</style>
+    

+ 242 - 0
supplierPages/pages/supplier/SupplyDeclaration.vue

@@ -0,0 +1,242 @@
+<template>
+    <view class="bg">
+        <!-- 供应申报 -->
+        <view class="head">
+			<view class="margintb w750" >
+                <view v-if="list1.length>0" class="w700">
+                    <u-tabs :scrollable="false" :current="tabCurrent" :list="list1" @change="tabsChange"></u-tabs>
+                </view>
+			</view>
+		</view>
+        <view style="height: 120rpx;"></view>
+        <view v-if="tabCurrent == 0">
+            <DeclarationList :listdata="supplierListData" :showType="0"></DeclarationList>
+        </view>
+        <view v-if="tabCurrent == 1">
+            <DeclarationList :listdata="myDeclareSupplierData" :showType="1"></DeclarationList>
+        </view>
+        
+    </view>
+</template>
+<script>
+import DeclarationList from './base/SupplyDeclarationList.vue'
+import * as util from '@/pages/util/util.js'
+import {supplierList,myDeclareSupplier} from '@/http/api/common.js'
+export default {
+    components: {
+        DeclarationList,
+    },
+    
+data() {
+return {
+    list1:[
+        {
+            name:'可申报商品',
+            id:'可申报商品',
+        },
+        {
+            name:'申报记录',
+            id:'申报记录',
+        },
+    ],
+    tabCurrent:0,
+    jiazaitext:'加载更多',
+    newsList:[],
+    loadingType:false,
+    supplierListData:[],
+    myDeclareSupplierData:[],
+}
+},
+onReachBottom() {
+},
+onUnload(){
+},
+async onLoad() {
+    this.getSupplierList()
+    this.getmyDeclareSupplier()
+},
+async onShow(){
+    
+},
+methods: {
+    //tab第一级页签选择
+    tabsChange(e) {
+        console.log('22222',e);
+        this.tabCurrent = e.index;
+    },
+    
+    async getSupplierList(){
+        let res = await supplierList()
+        if (res.data.code == 200) {
+            this.supplierListData = res.data.data?.rows || []
+        }
+    },
+    async getmyDeclareSupplier(){
+        let res = await myDeclareSupplier({
+            pageNum:100
+        })
+        if (res.data.code == 200) {
+            this.myDeclareSupplierData = res.data.data?.rows || []
+        }
+    },
+}
+}
+</script>
+
+<style>
+.bg{
+    background-color: #F6F6F6;
+    width: 100vw;
+    height: 100vh;
+}
+.head{
+    display: flex;
+    flex-direction: column;
+    align-items: center;
+    justify-content: center;
+    background: #FFFFFF;
+    opacity: 1;
+    height: 120rpx;
+    margin-bottom: 32rpx;
+
+    position: fixed;
+    z-index: 1;
+}
+.u-notice-bar{
+    width: 90vw;
+    margin: 0 auto;
+}
+.u-search{
+    width: 702rpx;
+    margin: 0 auto;
+}
+.margintb{
+    margin: 16rpx 0;
+    display: flex;
+    align-items: center;
+}
+.list2{
+    display: flex;
+    justify-content: flex-start;
+    width: 90vw;
+    overflow-x: auto;  
+    scroll-snap-type: x mandatory;  
+    scroll-padding: 50rpx; /* 为滚动容器提供内边距,确保内容不会紧贴边缘 */ 
+}
+
+
+.content{
+    width: 100vw;
+    background-color: #FFFFFF;
+    padding: 30rpx 0 30rpx 0;
+}
+.box{
+    display: flex;
+    margin: 20rpx auto;
+    justify-content: flex-start;
+    width: 90vw;
+    height: 160rpx;
+}
+.box_img{
+    width: 224rpx;
+    height: 150rpx;
+    border-radius: 16rpx;
+    background-color: #999999;
+}
+.box_right{
+    margin-left: 10rpx;
+    display: flex;
+    flex-direction: column;
+    justify-content: space-evenly;
+}
+.box_title{
+    width: 454rpx;
+    height: 80rpx;
+    font-size: 28rpx;
+    font-weight: bold;
+    color: #333333;
+    line-height: 40rpx;
+
+    display: -webkit-box;
+    word-break: break-all;
+    text-overflow: ellipsis;
+    overflow: hidden;
+    -webkit-box-orient: vertical;
+    -webkit-line-clamp:2;
+}
+.box_type{
+    display: flex;
+    justify-content: space-between;
+
+    font-size: 28rpx;
+    font-weight: 400;
+    color: #999999;
+    line-height: 40rpx;
+}
+
+
+.checkbtnview{
+    width: 160rpx;
+    height: 64rpx;
+    background: #DEEEFC;
+    border-radius: 40rpx 40rpx 40rpx 40rpx;
+    opacity: 1;
+
+    font-size: 28rpx;
+    font-weight: 400;
+    color: #46A6FF;
+    line-height: 64rpx;
+    text-align: center;
+    
+    margin-right: 20rpx;
+    flex: 0 0 auto;
+    scroll-snap-align: start;
+
+}
+.btnview{
+    width: 160rpx;
+    height: 64rpx;
+    background: #F1F1F1;
+    border-radius: 40rpx 40rpx 40rpx 40rpx;
+    opacity: 1;
+
+    font-size: 28rpx;
+    font-weight: 400;
+    color: #999;
+    line-height: 64rpx;
+    text-align: center;
+    margin-right: 20rpx;
+    flex: 0 0 auto;
+    scroll-snap-align: start;
+
+}
+
+.btnBox{
+    width: 750rpx;
+    height: 100rpx;
+    background: #FFFFFF;
+    border-radius: 0rpx 0rpx 0rpx 0rpx;
+    opacity: 1;
+
+    display: flex;
+    flex-direction: row;
+    justify-content: center;
+    align-items: center;
+    position: fixed;
+    bottom: 0;
+}
+.btn{
+    width: 702rpx;
+    height: 80rpx;
+    background: #46A6FF;
+    border-radius: 64rpx 64rpx 64rpx 64rpx;
+    opacity: 1;
+
+    font-weight: 500;
+    color: #FFFFFF;
+    line-height: 80rpx;
+    text-align: center;
+}
+
+</style>
+    

+ 225 - 0
supplierPages/pages/supplier/base/SupplyDeclarationFrom.vue

@@ -0,0 +1,225 @@
+<template>
+<view class="formbg">
+    <view class="scrollview">
+    <u--form :rules="rules" labelPosition="left" :model="form"  ref="uForm">
+        <u-form-item class="formItem" prop="businessName" :labelWidth="labelWidth" label="商品"  borderBottom >
+            <u--input :input-align="inputaligh" placeholder="填写供应商名称" v-model="form.supplierName" border="none" disabled ></u--input>
+        </u-form-item>
+
+        <view class="margin20"></view>
+        <u-form-item class="formItem" prop="num" :labelWidth="labelWidth" label="商品数量"  borderBottom >
+            <u--input :input-align="inputaligh" placeholder="填写商品数量(个)" v-model="form.num" border="none" clearable ></u--input>
+        </u-form-item>
+
+        <view class="margin20"></view>
+        <u-form-item class="formItem" prop="price" :labelWidth="labelWidth" label="商品价格"  borderBottom >
+            <u--input :input-align="inputaligh" placeholder="填写商品价格(元)" v-model="form.price" border="none" clearable ></u--input>
+        </u-form-item>
+
+        <view class="margin20"></view>
+
+        <u-form-item class="formItem" prop="contact" :labelWidth="labelWidth" label="联系人"  borderBottom >
+            <u--input :input-align="inputaligh" placeholder="请输入联系人" v-model="form.contact" border="none" clearable ></u--input>
+        </u-form-item>
+        
+        <view class="margin20"></view>
+
+        <u-form-item class="formItem" prop="phone" :labelWidth="labelWidth" label="联系电话"  borderBottom >
+            <u--input :input-align="inputaligh" placeholder="请输入联系电话" v-model="form.phone" border="none" clearable ></u--input>
+        </u-form-item>
+
+      
+    </u--form>
+    
+    <view style="height: 100rpx;"></view>
+</view>
+
+<view class="btnbox" style="left: 24rpx;">
+    <view @click="submit('submit')" class="btn2">
+        提交审核
+    </view>
+</view>
+</view>
+</template>
+
+<script>
+import {
+    declareSupplier
+    } from '@/http/api/common.js'
+export default {
+props: {
+    selectData: {
+        type: Object,
+        default: null,
+    },
+},
+data() {
+    return {
+        form:{
+            "supplierId": "",
+            "supplierName": "",
+            "num": "",
+            "price": "",
+            "contact": "",
+            "phone": "",
+        },
+        
+        rules: {
+            'num': {
+                type: 'string',
+                required: true,
+                message: '请填写数量',
+                trigger: ['blur', 'change']
+            },
+            'price': {
+                type: 'string',
+                required: true,
+                message: '请填写价格',
+                trigger: ['blur', 'change']
+            },
+            'contact': {
+                type: 'string',
+                required: true,
+                message: '请输入联系人',
+                trigger: ['blur', 'change']
+            },
+            'phone':[ 
+                {
+                    type: 'string',
+                    required: true,
+                    message: '请输入联系电话',
+                    trigger: ['blur', 'change']
+                },
+                {
+                    validator: (rule, value, callback) => {
+                        return uni.$u.test.mobile(value);
+                    },
+                    message: '手机号码格式不正确',
+                    // 触发器可以同时用blur和change
+                    trigger: ['blur'],
+                }
+            ]
+        },
+        inputaligh:'right',
+      
+        labelWidth:140,
+        popupShow:false,
+        popupText:'',
+        popupBtn:'上传营业执照',
+        popupImgurl:'',
+        cityShow:false,
+        cityloading:false,
+
+        cityColumns: [],
+        columnData: [],
+
+        categoryShow:false,
+        categoryColumns: [],
+        showType:'1',
+    }
+},
+components: {
+    
+},
+
+onLoad(e) {
+    let data = uni.getStorageSync('checkSupplierData')
+    this.form.supplierName = data.businessName
+    this.form.supplierId = data.id
+
+    console.log('this.form',this.form);
+},
+
+onReady() {
+    //如果需要兼容微信小程序,并且校验规则中含有方法等,只能通过setRules方法设置规则。
+    this.$refs.uForm?.setRules(this.rules)
+},
+
+methods: {
+    
+    async submit(type){
+       
+        this.$refs.uForm.validate().then(async res1 => {
+            console.log(res1);
+           
+            let res = await declareSupplier(this.form)
+            if (res.data.code == 200) {
+                uni.navigateTo({
+                    url: '/supplierPages/pages/supplier/supplierSuccess'
+                });
+            }
+        }).catch(errors => {
+            // uni.$u.toast('校验失败')
+        })
+    },
+
+}
+}
+</script>
+
+<style lang="less" scoped>
+.formbg{
+    width: 750rpx;
+    height: 100vh;
+    border-radius: 0rpx 0rpx 0rpx 0rpx;
+
+    display: flex;
+    flex-direction: column;
+    align-items: center;
+
+    background: #f6f6f6;
+
+    position: fixed;
+    top: 0;
+    z-index: 100;
+}
+.scrollview{
+    width: 100vw;
+    height: calc(100vh - 120rpx);
+}
+.formItemTitle{
+    margin: 20rpx 0 20rpx 30rpx;
+}
+
+.u-form-item{
+    background-color: #fff;
+}
+/deep/.u-form-item__body__left__content{
+    padding-left: 30rpx;
+}
+/deep/.u-form-item__body__right{
+    padding-right: 30rpx;
+}
+/deep/.u-form-item__body{
+    padding: 30rpx 0;
+}
+.selectInput{
+    display: flex;
+    flex-direction: row;
+    align-items: center;
+}
+.formItem {
+    background: #fff;
+}
+.btn2{
+    width: 650rpx;
+    height: 80rpx;
+    background: #46A6FF;
+    border-radius: 64rpx 64rpx 64rpx 64rpx;
+    opacity: 1;
+
+    font-size: 28rpx;
+    font-weight: 500;
+    color: #FFFFFF;
+    line-height: 80rpx;
+    text-align: center;
+    margin-left: 10rpx;
+}
+.margin20{
+    margin-top: 20rpx;
+}
+.btnflex{
+    padding: 24rpx;
+}
+</style>
+        

+ 263 - 0
supplierPages/pages/supplier/base/SupplyDeclarationList.vue

@@ -0,0 +1,263 @@
+<template>
+    <view>
+        <view >
+            <template v-if="showType == 0">
+            <view v-for="(item,index) in newsList" :key="index" class="box" >
+                <view style="margin-left: 24rpx;">
+                    <checkbox :checked="item.check" @click="checkitem(item)"  shape="circle"></checkbox>
+                </view>
+                <view >
+                    <u--image radius='16rpx' width="80rpx" height="80rpx" :src="item.pic" ></u--image>
+                </view>
+                <view class="box_right">
+                    <view >
+                        {{item.businessName}}
+                    </view>
+                </view>
+            </view>
+            </template>
+            <template v-if="showType == 1">
+            <view v-for="(item,index) in newsList" :key="index" class="box2" >
+                <view class="box_TOP">
+                    <view >
+                        <u--image radius='16rpx' width="128rpx" height="128rpx" :src="item.pic" ></u--image>
+                    </view>
+                    <view class="box_right">
+                        <view class="box_title2">
+                            {{item.supplierName}}
+                        </view>
+                        <!-- <view class="box_specifications">
+                            规格:{{item.price}} g/只
+                        </view> -->
+                        <view class="box_num">
+                            <view class="box_num_item">
+                                <text>售价:</text><text style="color:#333;">{{'¥' + item.price}}</text>
+                            </view>
+                            <view class="box_num_item">
+                                <text>数量:</text><text style="color:#333;">{{item.num + '个'}}</text>
+                            </view>
+                        </view>
+                    </view>
+                </view>
+                <view class="divider"></view>
+                <view class="box_BOTTOM">
+                    <view class="box_time">
+                        时间: {{item.createTime}}
+                    </view>
+                    <view :class="'box_type'+item.static">
+                        <text v-if="item.updownStatus == '0'">正在审核</text>
+                        <text v-if="item.updownStatus == '1'">上架</text>
+                        <text v-if="item.updownStatus == '2'">下架</text>
+                        <text v-if="item.updownStatus == '3'">审核不通过</text>
+                    </view>
+                </view>
+            </view>
+            </template>
+            <view v-if="showType == 0" class="btnBox">
+                <view class="btn" @click="openFrom()">
+                    添加供应申报
+                </view>
+            </view>
+        </view>
+    </view>
+</template>
+<script>
+export default {
+    components: {
+    },
+    props: {
+        listdata: {
+            type: Array,
+            default: [],
+        },
+        showType: {
+            type: Number,
+            default: 0,
+        },
+},
+watch:{
+    listdata: {
+        immediate: true,
+        handler(val) {
+           console.log(val);
+           this.newsList = val
+        },
+    }
+},
+data() {
+return {
+    newsList:[],
+    selectData:null,
+    showFrom:false,
+}
+},
+onLoad(e) {
+    
+},
+methods: {
+    openFrom(){
+        let data = this.newsList.find(item => item.check == true);
+        uni.setStorageSync('checkSupplierData',data)
+        uni.navigateTo({
+             url: '/supplierPages/pages/supplier/base/SupplyDeclarationFrom'
+        });
+    },
+    async checkitem(item){
+        console.log('item',item);
+        this.newsList.forEach(Listitem => {
+            if (Listitem.id == item.id) {
+                Listitem.check = true
+            }else{
+                Listitem.check = false
+            }
+        });
+	},
+}
+}
+</script>
+
+<style lang="less" scoped>
+.box{
+    width: 700rpx;
+    height: 128rpx;
+    background: #ffffff;
+    border-radius: 16rpx;
+    margin: 24rpx;
+
+    display: flex;
+    align-items: center;
+}
+.box_right{
+    width: 500rpx;
+    margin-left: 24rpx;
+}
+.box2{
+    width: 700rpx;
+    height: 273rpx;
+    background: #ffffff;
+    border-radius: 16rpx;
+    margin: 24rpx;
+
+    
+}
+.box_TOP{
+    width: 676rpx;
+    height: 152rpx;
+    display: flex;
+    align-items: center;
+    margin-left: 12rpx;
+}
+.box_BOTTOM{
+    width: 666rpx;
+    display: flex;
+    align-items: center;
+    margin-left: 12rpx;
+    justify-content: space-between;
+}
+
+.box_title2{
+    font-size: 28rpx;
+    font-weight: 500;
+    text-align: left;
+    color: #333333;
+}
+.box_specifications{
+    margin-top: 6rpx;
+    font-size: 24rpx;
+    font-weight: 500;
+    text-align: left;
+    color: #999999;
+}
+.box_num{
+    margin-top: 10rpx;
+    display: flex;
+    justify-content: space-between;
+}
+
+.box_num_item{
+    display: flex;
+    font-size: 28rpx;
+    color: #999999;
+}
+.box_time{
+    font-size: 28rpx;
+    font-weight: 400;
+    text-align: left;
+    color: #999999;
+}
+.box_type1{
+    width: 140rpx;
+    height: 56rpx;
+    background: #ffedec;
+    border-radius: 8rpx;
+
+    font-size: 28rpx;
+    font-family: PingFang SC, PingFang SC-Medium;
+    font-weight: 500;
+    text-align: left;
+    color: #ff655b;
+    line-height: 56rpx;
+    text-align: center;
+}
+.box_type2{
+    width: 140rpx;
+    height: 56rpx;
+    background: #deeefc;
+    border-radius: 8rpx;
+
+    font-size: 28rpx;
+    font-family: PingFang SC, PingFang SC-Medium;
+    font-weight: 500;
+    text-align: left;
+    color: #0084FF;
+    line-height: 56rpx;
+    text-align: center;
+}
+.box_type3{
+    width: 140rpx;
+    height: 56rpx;
+    background: #eee;
+    border-radius: 8rpx;
+
+    font-size: 28rpx;
+    font-family: PingFang SC, PingFang SC-Medium;
+    font-weight: 500;
+    text-align: left;
+    color: #999;
+    line-height: 56rpx;
+    text-align: center;
+}
+
+.btnBox{
+    width: 750rpx;
+    height: 100rpx;
+    background: #FFFFFF;
+    border-radius: 0rpx 0rpx 0rpx 0rpx;
+    opacity: 1;
+
+    display: flex;
+    flex-direction: row;
+    justify-content: center;
+    align-items: center;
+    position: fixed;
+    bottom: 0;
+}
+.btn{
+    width: 702rpx;
+    height: 80rpx;
+    background: #46A6FF;
+    border-radius: 64rpx 64rpx 64rpx 64rpx;
+    opacity: 1;
+
+    font-weight: 500;
+    color: #FFFFFF;
+    line-height: 80rpx;
+    text-align: center;
+}
+.divider{
+    width: 100%;
+    border-top: 1rpx solid #eee;
+    margin: 20rpx 0;
+}
+</style>
+    

+ 198 - 0
supplierPages/pages/supplier/base/SupplypProductDetails.vue

@@ -0,0 +1,198 @@
+<template>
+     <view style="background: #f6f6f6;height: 100vh;">
+        <view class="popupTitle">供应商品</view>
+        <view v-for="(item,index) in newsList" :key="index" class="box2" >
+            <view class="box_TOP">
+                <view >
+                    <u--image radius='16rpx' width="128rpx" height="128rpx" :src="item.pic" ></u--image>
+                </view>
+                <view class="box_right">
+                    <view class="box_title2">
+                        {{item.supplierName}}
+                    </view>
+                    <view class="box_num">
+                        <view class="box_num_item">
+                            <text>售价:</text><text style="color:#333;">{{'¥' + item.price}}</text>
+                        </view>
+                        <view class="box_num_item">
+                            <text>数量:</text><text style="color:#333;">{{item.num + '个'}}</text>
+                        </view>
+                    </view>
+                </view>
+            </view>
+        </view>
+    </view>
+</template>
+<script>
+import {vendorDeclareList} from '@/http/api/common.js'
+export default {
+    components: {
+    },
+data() {
+return {
+    newsList:[],
+    selectData:null,
+    showFrom:false,
+}
+},
+async onLoad(e) {
+    uni.setNavigationBarTitle({
+        title: e.name
+    })
+    let res = await vendorDeclareList(e.id)
+    this.newsList = res.data.data.rows
+
+},
+methods: {
+    
+}
+}
+</script>
+
+<style lang="less" scoped>
+.box{
+    width: 700rpx;
+    height: 128rpx;
+    background: #ffffff;
+    border-radius: 16rpx;
+    margin: 24rpx;
+
+    display: flex;
+    align-items: center;
+}
+.box_right{
+    width: 500rpx;
+    margin-left: 24rpx;
+}
+.box2{
+    width: 700rpx;
+    height: 160rpx;
+    background: #ffffff;
+    border-radius: 16rpx;
+    margin: 24rpx;
+
+    
+}
+.box_TOP{
+    width: 676rpx;
+    height: 152rpx;
+    display: flex;
+    align-items: center;
+    margin-left: 12rpx;
+}
+.box_BOTTOM{
+    width: 666rpx;
+    display: flex;
+    align-items: center;
+    margin-left: 12rpx;
+    justify-content: space-between;
+}
+
+.box_title2{
+    font-size: 28rpx;
+    font-weight: 500;
+    text-align: left;
+    color: #333333;
+}
+.box_specifications{
+    margin-top: 6rpx;
+    font-size: 24rpx;
+    font-weight: 500;
+    text-align: left;
+    color: #999999;
+}
+.box_num{
+    margin-top: 10rpx;
+    display: flex;
+    justify-content: space-between;
+}
+
+.box_num_item{
+    display: flex;
+    font-size: 28rpx;
+    color: #999999;
+}
+.box_time{
+    font-size: 28rpx;
+    font-weight: 400;
+    text-align: left;
+    color: #999999;
+}
+.box_type1{
+    width: 140rpx;
+    height: 56rpx;
+    background: #ffedec;
+    border-radius: 8rpx;
+
+    font-size: 28rpx;
+    font-family: PingFang SC, PingFang SC-Medium;
+    font-weight: 500;
+    text-align: left;
+    color: #ff655b;
+    line-height: 56rpx;
+    text-align: center;
+}
+.box_type2{
+    width: 140rpx;
+    height: 56rpx;
+    background: #deeefc;
+    border-radius: 8rpx;
+
+    font-size: 28rpx;
+    font-family: PingFang SC, PingFang SC-Medium;
+    font-weight: 500;
+    text-align: left;
+    color: #0084FF;
+    line-height: 56rpx;
+    text-align: center;
+}
+.box_type3{
+    width: 140rpx;
+    height: 56rpx;
+    background: #eee;
+    border-radius: 8rpx;
+
+    font-size: 28rpx;
+    font-family: PingFang SC, PingFang SC-Medium;
+    font-weight: 500;
+    text-align: left;
+    color: #999;
+    line-height: 56rpx;
+    text-align: center;
+}
+
+.btnBox{
+    width: 750rpx;
+    height: 100rpx;
+    background: #FFFFFF;
+    border-radius: 0rpx 0rpx 0rpx 0rpx;
+    opacity: 1;
+
+    display: flex;
+    flex-direction: row;
+    justify-content: center;
+    align-items: center;
+    position: fixed;
+    bottom: 0;
+}
+.btn{
+    width: 702rpx;
+    height: 80rpx;
+    background: #46A6FF;
+    border-radius: 64rpx 64rpx 64rpx 64rpx;
+    opacity: 1;
+
+    font-weight: 500;
+    color: #FFFFFF;
+    line-height: 80rpx;
+    text-align: center;
+}
+.popupTitle{
+    font-size: 32rpx;
+    font-weight: 700;
+    text-align: left;
+    color: #000000;
+    margin-left: 24rpx;
+}
+</style>
+    

+ 261 - 0
supplierPages/pages/supplier/base/marketItem.vue

@@ -0,0 +1,261 @@
+<template>
+    <view>
+        <view >
+            <template v-if="showType == 0">
+            <view v-for="(item,index) in newsList" :key="index" class="box" >
+                <view style="margin-left: 24rpx;margin-top: 24rpx;width: 640rpx;" class="box_BOTTOM" >
+                    <view class="box_time">
+                        <u--image radius='16rpx' width="48rpx" height="48rpx" src="/static/supplier/icon_gonyings.png" ></u--image>
+                        <text style="margin-left: 16rpx;">{{item.name}}</text> 
+                    </view>
+                    <view class="flexac" @click="openFrom(item)">
+                        <text style="margin-right: 16rpx;font-size: 28rpx;color: #999;">查看详情</text> 
+                        <u--image radius='16rpx' width="48rpx" height="48rpx" src="/static/myinfo/btn_right.png" ></u--image>
+                    </view>
+                </view>
+                <view class="divider"></view>
+                <view class="PICbox">
+                    <view style="margin-left: 24rpx;" v-for="picItem in item.declareList" :key="picItem.id">
+                        <view >
+                            <u--image radius='16rpx' width="128rpx" height="128rpx" :src="picItem.pic" ></u--image>
+                        </view>
+                    </view>
+                </view>
+                
+            </view>
+            </template>
+            <template v-if="showType == 1">
+            <view v-for="(item,index) in newsList" :key="index" class="box2" >
+                <view class="box_TOP">
+                    <view >
+                        <u--image radius='16rpx' width="128rpx" height="128rpx" :src="item.pic" ></u--image>
+                    </view>
+                    <view class="box_right">
+                        <view class="box_title2">
+                            {{item.supplierName}}
+                        </view>
+                        <!-- <view class="box_specifications">
+                            规格:{{item.price}} g/只
+                        </view> -->
+                        <view class="box_num">
+                            <view class="box_num_item">
+                                <text>售价:</text><text style="color:#333;">{{'¥' + item.price}}</text>
+                            </view>
+                            <view class="box_num_item">
+                                <text>数量:</text><text style="color:#333;">{{item.num + '个'}}</text>
+                            </view>
+                        </view>
+                    </view>
+                </view>
+                <view class="divider"></view>
+                <view class="box_BOTTOM" @click="openFrom(item)">
+                    <view class="box_time">
+                        <u--image radius='16rpx' width="48rpx" height="48rpx" src="/static/supplier/icon_gonyings.png" ></u--image>
+                        <text style="margin-left: 16rpx;">{{item.vendorName}}</text> 
+                    </view>
+                    <view>
+                        <u--image radius='16rpx' width="48rpx" height="48rpx" src="/static/myinfo/btn_right.png" ></u--image>
+                    </view>
+                </view>
+            </view>
+            </template>
+        </view>
+    </view>
+</template>
+<script>
+export default {
+    components: {
+    },
+    props: {
+        listdata: {
+            type: Array,
+            default: [],
+        },
+        showType: {
+            type: Number,
+            default: 0,
+        },
+},
+watch:{
+    listdata: {
+        immediate: true,
+        handler(val) {
+           console.log(val);
+           this.newsList = val
+        },
+    }
+},
+data() {
+return {
+    newsList:[],
+    selectData:null,
+    showFrom:false,
+}
+},
+onLoad(e) {
+    
+},
+methods: {
+    openFrom(item){
+        let id = item?.id || item?.vendorId;
+        let name = item?.name || item?.vendorName;
+        uni.navigateTo({
+             url: '/supplierPages/pages/supplier/base/SupplypProductDetails?id=' + id + '&name=' + name,
+        });
+    },
+   
+}
+}
+</script>
+
+<style lang="less" scoped>
+.box{
+    width: 700rpx;
+    height: 274rpx;
+    background: #ffffff;
+    border-radius: 16rpx;
+    margin: 24rpx;
+
+    display: flex;
+    flex-direction: column;
+}
+.box_right{
+    width: 500rpx;
+    margin-left: 24rpx;
+}
+.box2{
+    width: 700rpx;
+    height: 273rpx;
+    background: #ffffff;
+    border-radius: 16rpx;
+    margin: 24rpx;
+
+    
+}
+.box_TOP{
+    width: 676rpx;
+    height: 152rpx;
+    display: flex;
+    align-items: center;
+    margin-left: 12rpx;
+}
+.box_BOTTOM{
+    width: 666rpx;
+    display: flex;
+    align-items: center;
+    margin-left: 12rpx;
+    justify-content: space-between;
+}
+
+.box_title2{
+    font-size: 28rpx;
+    font-weight: 500;
+    text-align: left;
+    color: #333333;
+}
+.box_specifications{
+    margin-top: 6rpx;
+    font-size: 24rpx;
+    font-weight: 500;
+    text-align: left;
+    color: #999999;
+}
+.box_num{
+    margin-top: 10rpx;
+    display: flex;
+    justify-content: space-between;
+}
+
+.box_num_item{
+    display: flex;
+    font-size: 28rpx;
+    color: #999999;
+}
+.box_time{
+    font-size: 28rpx;
+    font-weight: 400;
+    text-align: left;
+    color: #999999;
+    display: flex;
+    align-items: center;
+}
+.box_type1{
+    width: 140rpx;
+    height: 56rpx;
+    background: #ffedec;
+    border-radius: 8rpx;
+
+    font-size: 28rpx;
+    font-family: PingFang SC, PingFang SC-Medium;
+    font-weight: 500;
+    text-align: left;
+    color: #ff655b;
+    line-height: 56rpx;
+    text-align: center;
+}
+.box_type2{
+    width: 140rpx;
+    height: 56rpx;
+    background: #deeefc;
+    border-radius: 8rpx;
+
+    font-size: 28rpx;
+    font-family: PingFang SC, PingFang SC-Medium;
+    font-weight: 500;
+    text-align: left;
+    color: #0084FF;
+    line-height: 56rpx;
+    text-align: center;
+}
+.box_type3{
+    width: 140rpx;
+    height: 56rpx;
+    background: #eee;
+    border-radius: 8rpx;
+
+    font-size: 28rpx;
+    font-family: PingFang SC, PingFang SC-Medium;
+    font-weight: 500;
+    text-align: left;
+    color: #999;
+    line-height: 56rpx;
+    text-align: center;
+}
+
+.btnBox{
+    width: 750rpx;
+    height: 100rpx;
+    background: #FFFFFF;
+    border-radius: 0rpx 0rpx 0rpx 0rpx;
+    opacity: 1;
+
+    display: flex;
+    flex-direction: row;
+    justify-content: center;
+    align-items: center;
+    position: fixed;
+    bottom: 0;
+}
+.btn{
+    width: 702rpx;
+    height: 80rpx;
+    background: #46A6FF;
+    border-radius: 64rpx 64rpx 64rpx 64rpx;
+    opacity: 1;
+
+    font-weight: 500;
+    color: #FFFFFF;
+    line-height: 80rpx;
+    text-align: center;
+}
+.divider{
+    width: 100%;
+    border-top: 1rpx solid #eee;
+    margin: 20rpx 0;
+}
+.PICbox{
+    margin-left: 24rpx;
+    display: flex;
+}
+</style>
+    

+ 52 - 0
supplierPages/pages/supplier/supplierSuccess.vue

@@ -0,0 +1,52 @@
+<template>
+    <view class="flexitem">
+        <view style="margin-top: 200rpx;">
+            <u--image width="160rpx" height="160rpx" src="/static/supplier/icon_success1.png" ></u--image>
+        </view>
+        <view style="margin-top: 40rpx;font-size: 48rpx; font-weight: 700; color: #333333;">
+            提交成功
+        </view>
+        <view style="margin-top: 40rpx;font-size: 32rpx; font-weight: 400; color: #999999; width: 480rpx;">
+            工作人员将会在工作日内审核您的申请,请及时留意通知!
+        </view>
+        <view style="width: 650rpx; height: 80rpx; background: #46a6ff; text-align: center;
+        border-radius: 40rpx;font-size: 28rpx;color: #ffffff;line-height: 80rpx;position: absolute;
+        bottom: 20px;" 
+        @click="openLink()">
+            返回首页
+        </view>
+    </view>
+</template>
+<script>
+export default {
+components: {
+},
+data() {
+    return {
+        info:[],
+        title:'互动天地',
+    }
+},
+async mounted() {
+},
+methods: {
+    openLink(){
+        uni.switchTab({ 
+            url: '/pages/index/index' 
+        })
+       
+    }
+}
+}
+</script>
+
+<style lang="less" scoped>
+.flexitem{
+    height: 100vh;
+    display: flex;
+    flex-direction: column;
+    align-items: center;
+}
+
+</style>
+    

+ 494 - 0
supplierPages/pages/supplier/supplyMarket.vue

@@ -0,0 +1,494 @@
+<!-- 供应市场 -->
+<template>
+    <view style="background: #f6f6f6;height: 100vh;">
+        <view class="searchBox" style="margin-top: 10rpx;">
+            <view class="search" style="margin-top: 10rpx;background: #F6F6F6;width: 630rpx;">
+                <u-search bgColor='#F6F6F6' placeholder="请输入关键词" 
+                :showAction='false' @custom="searchList"  v-model="searchword"></u-search>
+                <view @click="searchList" class="searchBtn">搜索</view>
+			</view>
+            <!-- <view @click="changeMode">
+                <u--image width="48rpx" height="48rpx" :src="Modeimg" ></u--image>
+            </view> -->
+        </view>
+        <view class="margintb tabwiew" >
+            <view>
+                <u-tabs keyName='subIdName' @click="changeMode" :list="list1"></u-tabs>
+            </view>
+            <view style="font-size: 32rpx;width: 100%;" class="flex flexfend">
+                <view @click="checkType('1')" :class="ischeck=='1'?'check':''">
+                    综合
+                </view>
+                <view class="flex" style="align-items: center;" @click="checkType('2')" :class="ischeck=='2'?'check':''">
+                    价格 <view>
+                            <u-icon name="arrow-up-fill" :color="checkup?'#46A6FF':'#ccc'" size="8"></u-icon>
+                            <u-icon name="arrow-down-fill" :color="!checkup?'#46A6FF':'#ccc'" size="8"></u-icon>
+                        </view>
+                </view>
+                <view class="flex" style="align-items: center;" @click="checkType('3')" :class="ischeck=='3'?'check':''">
+                    数量<view>
+                            <u-icon name="arrow-up-fill" :color="checkup2?'#46A6FF':'#ccc'" size="8"></u-icon>
+                            <u-icon name="arrow-down-fill" :color="!checkup2?'#46A6FF':'#ccc'" size="8"></u-icon>
+                        </view>
+                </view>
+                <view @click="openTabs()" class="selectTypebox">
+                    {{selectType}}<u--image style="margin-top: 10rpx;" width="40rpx" height="40rpx" src="/static/market/btn_screening.png" ></u--image>
+                </view>
+            </view>
+        </view>
+        <u-popup :closeable='true' :round="10" :show="showTabs" @close="close" @open="open">
+            <view class="popupView">
+                <view class="scrollview">
+                    <view class="popupTitle">品类</view>
+                    <view class="btnList" >
+                        <view @click="changeType(index)" 
+                        :class="item.plain ?'btnview': 'checkbtnview'" 
+                        v-for="(item,index) in tabsList" :key="index">
+                            {{ item.dictValue }}
+                        </view>
+                    </view>
+                    <view class="popupTitle">价格区间</view>
+                    <view class="popupInput">
+                        <u--input
+                            type="number"
+                            placeholder="最低价"
+                            v-model="minNum"
+                            maxlength="10"
+                        ></u--input>
+                        -
+                        <u--input
+                            type="number"
+                            placeholder="最高价"
+                            v-model="maxNum"
+                            maxlength="10"
+                        ></u--input>
+                    </view>
+                    <view class="popupTitle">数量区间</view>
+                    <view class="popupInput">
+                        <u--input
+                            type="number"
+                            placeholder="1"
+                            v-model="minPrice"
+                            maxlength="10"
+                        ></u--input>
+                        -
+                        <u--input
+                            type="number"
+                            placeholder="9999"
+                            v-model="maxPrice"
+                            maxlength="10"
+                        ></u--input>
+                    </view>
+                    
+                </view>
+                <view class="btnbox" style="left: 24rpx;">
+                    <view @click="resetpopup" class="btn">
+                        重置
+                    </view>
+                    <view @click="popupsubmit()" class="btn2">
+                        确定
+                    </view>
+                </view>
+            </view>
+        </u-popup>
+        <view v-if="tabCurrent == '0'">
+            <!-- 供应商列表 -->
+            <marketItem :listdata="vendorList" :showType="0"></marketItem>
+        </view>
+        <view v-if="tabCurrent == '1'">
+            <!-- 商品列表 -->
+            <marketItem :listdata="supplierList" :showType="1"></marketItem>
+        </view>
+        
+        <view class="loadmore" @click="loadmore()">
+            {{jiazaitext}}
+        </view>
+    </view>
+</template>
+<script>
+import marketItem from './base/marketItem.vue'
+
+import {vendorListOfDeclare,supplierListOfProduct,getCategoryList} from '@/http/api/common.js'
+export default {
+components: {
+    marketItem
+},
+data() {
+    return {
+        current:'commodity',
+        tabCurrent:'0',
+        checkup:true,
+        checkup2:true,
+        showTabs:false,
+        loadingType:false,
+        ischeck:'1',
+        searchword:'',
+        minNum:'',
+        maxNum:'',
+        maxPrice:'',
+        minPrice:'',
+        selectType:'筛选',
+        Modeimg:'/static/market/btn_chanpxx.png',
+        vendorList:[],//供应商列表
+        supplierList:[],//产品列表
+        tabsList:[],
+        tabsItem:[],
+        pageNum:1,
+        jiazaitext:'加载更多',
+        categoryId:'',
+        list1:[
+        {
+            subIdName: '供应商',
+            key:'0'
+        },
+        {
+            subIdName: '商品',
+            key:'1'
+        }
+    ],
+    }
+},
+async onLoad() {
+    
+    // 获取商品分类
+    await this.getcategoriesList()
+},
+async onShow(){
+    //每次切换页签初始化请求页签
+    this.pageNum = 1
+    this.vendorList = []
+    this.supplierList = []
+    //获取商品列表
+    await this.getProductPage()
+},
+onReachBottom() {
+    this.loadmore()
+},
+methods: {
+    resetpopup(){
+        this.changeType(0)
+        this.minNum=''
+        this.maxNum=''
+        this.maxPrice='' 
+        this.minPrice=''
+    },
+    async popupsubmit(){
+        this.pageNum = 1
+        this.vendorList = []
+        this.supplierList = []
+        
+        await this.getProductPage()
+        this.showTabs = false
+    },
+    async getProductPage(categoryId=''){
+        if (this.loadingType) {
+            //加载中禁止重复加载
+            return
+        }
+        this.loadingType=true
+        let data = {
+            priceSort:'ace', //价格排序 ace 小到大;desc 大到小
+            numSort:'ace', //数量排序 ace 小到大;desc 大到小
+
+            minNum:this.minNum, //最小价格
+            maxNum:this.maxNum, //最大价格
+
+            maxPrice:this.maxPrice, 
+            minPrice:this.minPrice, 
+
+            name:this.searchword, //标题,副标题搜索
+            pageSize:10,
+            pageNum:this.pageNum,
+            category:this.categoryId //类目id
+        }
+
+        if (this.ischeck == '1') {
+            //综合
+            data.priceSort = 'ace'
+            data.numSort = 'ace'
+        }else if (this.ischeck == '2') {
+            //价格
+            data.priceSort = this.checkup ? 'ace' : 'desc'
+        } else {
+            //数量
+            data.numSort = this.checkup2 ? 'ace' : 'desc'
+        }
+
+
+        if (this.tabCurrent == '0') {
+            //供应商
+            await this.getvendorList(data)
+        }else{
+            //商品
+            await this.getsupplierList(data)
+        }
+
+       
+    },
+    async getvendorList(data){
+        //供应商
+        let res =  await vendorListOfDeclare(data)
+        if (res.data.code == 200) {
+            let newrows = res.data.data?.rows || []
+
+            this.vendorList.push(...newrows)
+            
+            if(this.vendorList.length!=res.data.data.total){
+                this.jiazaitext="加载更多"
+            }else{
+                this.jiazaitext="已经到底"
+            }
+        }
+        this.loadingType=false
+    },
+    async getsupplierList(data){
+        //商品
+        let res =  await supplierListOfProduct(data)
+        if (res.data.code == 200) {
+            let newrows = res.data.data?.rows || []
+
+            this.supplierList.push(...newrows)
+            
+            if(this.supplierList.length!=res.data.data.total){
+                this.jiazaitext="加载更多"
+            }else{
+                this.jiazaitext="已经到底"
+            }
+        }
+        this.loadingType=false
+    },
+    async searchList(){
+        // if (this.searchword == '') {
+        //     return
+        // }
+        //每次切换页签初始化请求页签
+        this.pageNum = 1
+        this.vendorList = []
+        this.supplierList = []
+
+        await this.getProductPage()
+    },
+    //加载更多
+    loadmore(){
+        console.log('下拉加载',this.jiazaitext);
+        if (this.jiazaitext=="加载更多") {
+            this.pageNum=this.pageNum+1
+            this.jiazaitext="加载中..."
+            this.getProductPage()
+        }
+    },
+    async getcategoriesList(){
+        //获取商品分类
+        let res =  await getCategoryList()
+        if (res.data.code == 200) {
+
+            let list = res.data.data.map(v=>{
+                return {
+                    ...v,
+                    plain:true
+                }
+            })
+            let a = {
+                dictValue:'全部',
+                plain:false
+            }
+            this.tabsList.push(a)
+            this.tabsList.push(...list)
+        }
+    },
+    async openTabs(){
+        this.showTabs = true
+    },
+    changeType(index) {
+        //选择商品类目
+        this.tabsList.forEach(item => {
+            item.plain = true
+        });
+
+        this.tabsList[index].plain = false
+        this.selectType = this.tabsList[index].name
+        //每次切换页签初始化请求页签
+        this.pageNum = 1
+        this.vendorList = []
+        this.supplierList = []
+        this.categoryId = this.tabsList[index]?.dictKey || ''
+            // this.getProductPage()
+
+            // this.showTabs = false
+    },
+    checkType(type){
+        //选择列表排序类型
+        this.ischeck = type
+        if (this.ischeck == '2' && this.ischeck == type) {
+            this.checkup = !this.checkup
+        }
+        if (this.ischeck == '3' && this.ischeck == type) {
+            this.checkup2 = !this.checkup2
+        }
+
+        //每次切换页签初始化请求页签
+        this.pageNum = 1
+        this.vendorList = []
+        this.supplierList = []
+
+        this.getProductPage()
+
+    },
+    async changeMode(item){
+        console.log(item.key);
+        this.tabCurrent = item.key;
+
+        //每次切换页签初始化请求页签
+        this.pageNum = 1
+        this.vendorList = []
+        this.supplierList = []
+
+        await this.getProductPage()
+    },
+    open() {
+        // console.log('open');
+    },
+    close() {
+        this.showTabs = false
+        // console.log('close');
+    },
+}
+}
+</script>
+
+<style>
+.check{
+    color: #46A6FF;
+}
+.searchBox{
+    width: 750rpx;
+    height: 126rpx;
+    background: #FFFFFF;
+    border-radius: 0rpx 0rpx 0rpx 0rpx;
+    opacity: 1;
+
+    display: flex;
+    align-items: center;
+    justify-content: space-around;
+
+}
+
+.scrollview{
+    width: 750rpx;
+    height: 850rpx;
+    overflow: auto;
+}
+.loadmore{
+    height:200rpx;
+    text-align: center;
+    font-size: 28rpx;
+    font-weight: 400;
+    color: #999;
+    padding-top: 24rpx;
+}
+
+.btnList{
+    display: flex;
+    flex-direction: row;
+    flex-wrap: wrap;
+    justify-content: flex-start;
+}
+.checkbtnview{
+    width: 206rpx;
+    height: 80rpx;
+    background: #46A6FF;
+    border-radius: 40rpx 40rpx 40rpx 40rpx;
+    opacity: 1;
+
+    font-size: 28rpx;
+    font-weight: 400;
+    color: #FFFFFF;
+    line-height: 80rpx;
+    text-align: center;
+
+    margin: 20rpx;
+}
+.btnview{
+    width: 206rpx;
+    height: 80rpx;
+    background: #F1F1F1;
+    border-radius: 40rpx 40rpx 40rpx 40rpx;
+    opacity: 1;
+
+    font-size: 28rpx;
+    font-weight: 400;
+    color: #666;
+    line-height: 80rpx;
+    text-align: center;
+
+    margin: 20rpx;
+}
+.selectTypebox{
+    display: flex;
+    width: 200rpx;
+    align-items: flex-end;
+    justify-content: space-evenly;
+    border-left: 1rpx solid #ccc;
+    height: 40rpx;
+}
+.margintb{
+    margin: 16rpx 0;
+}
+.tabwiew{
+    background-color: white;
+    width: 100vw;
+    height: 150rpx;
+    display: flex;
+    font-size: 32rpx;
+    flex-direction: column;
+    align-items: center;
+}
+.btnbox{
+    display: flex;
+    position: fixed;
+    bottom: 20rpx;
+}
+.btn{
+    width: 340rpx;
+    height: 80rpx;
+    background: #ffffff;
+    border: 1rpx solid #dddddd;
+    border-radius: 64rpx 64rpx 64rpx 64rpx;
+    opacity: 1;
+
+    font-size: 28rpx;
+    font-weight: 500;
+    color: #46A6FF;
+    line-height: 80rpx;
+    text-align: center;
+}
+.btn2{
+    width: 340rpx;
+    height: 80rpx;
+    background: #46A6FF;
+    border-radius: 64rpx 64rpx 64rpx 64rpx;
+    opacity: 1;
+
+    font-size: 28rpx;
+    font-weight: 500;
+    color: #FFFFFF;
+    line-height: 80rpx;
+    text-align: center;
+    margin-left: 10rpx;
+}
+.popupTitle{
+    font-size: 32rpx;
+    font-weight: 700;
+    text-align: left;
+    color: #000000;
+    margin-left: 24rpx;
+}
+.popupInput{
+    width: 90%;
+    margin: 24rpx auto;
+    display: flex;
+    flex-direction: row;
+    align-items: center;
+}
+</style>
+