diff --git a/apis/interfaces/goods.js b/apis/interfaces/goods.js
index 4f227cb..f6ecbf4 100644
--- a/apis/interfaces/goods.js
+++ b/apis/interfaces/goods.js
@@ -187,7 +187,22 @@ const managesTracedTo = (id) => {
return request({
url: 'mall/goods/' + id + '/trace'
})
-}
+}
+// 商品第一条溯源
+const checkmessage = (id) => {
+ return request({
+ url: 'mall/goods/' + id + '/checkmessage'
+ })
+}
+
+// 商品类型 0全1自营2合作
+const shopself = () => {
+ return request({
+ url: 'mall/shopself'
+ })
+}
+
+
export {
managesGoodsIndex,
managesGoodsMint,
@@ -212,5 +227,7 @@ export {
mallBuyGoods,
managesChain,
managesAttestation,
- managesTracedTo
+ managesTracedTo,
+ checkmessage,
+ shopself
}
diff --git a/components/goods-list/goods-list.vue b/components/goods-list/goods-list.vue
index 02ce89a..92d4059 100644
--- a/components/goods-list/goods-list.vue
+++ b/components/goods-list/goods-list.vue
@@ -24,9 +24,10 @@
¥{{item.price.price_min}}
-
+
- 月销量{{item.sales}}
+
+ 贡献值:{{item.price.pv}}
@@ -167,6 +168,9 @@
line-height: 50rpx;
text-align: right;
@extend .nowrap;
+ display: flex;
+ align-items: center;
+ justify-content: flex-end;
}
}
}
diff --git a/pages.json b/pages.json
index eecd0ef..b2302cd 100644
--- a/pages.json
+++ b/pages.json
@@ -283,13 +283,13 @@
"path": "pages/goods/addClassify",
"name": "goodsaddClassify",
"style": {
- "navigationBarTitleText": "发布商品类目"
+ "navigationBarTitleText": "发布权证类目"
}
},{
"path": "pages/goods/details",
"name": "goodsDetails",
"style": {
- "navigationBarTitleText": "商品详情",
+ "navigationBarTitleText": "权证详情",
"navigationBarTextStyle":"white",
"titleNView": {
"backgroundColor": "#8b64fd",
diff --git a/pages/equity/index.vue b/pages/equity/index.vue
index e0916c3..c8369ea 100644
--- a/pages/equity/index.vue
+++ b/pages/equity/index.vue
@@ -120,7 +120,7 @@
- 每日推荐小易精选 推荐好物
+ 每日推荐链商精选 推荐好物
@@ -130,13 +130,20 @@
{{position.one.specal_tags.is_allow_values}}
{{position.one.name}}
- ¥{{position.one.original_price}}
+ ¥{{position.one.original_price}}
+
+ 贡献值:{{position.one.price.pv}}
+
+
{{position.one.specal_tags.is_self}}
{{item.name}}
+
+ 贡献值:{{item.price.pv}}
+
¥{{item.original_price}}
@@ -596,7 +603,7 @@
.title {
font-size: $title-size-lg;
@extend .nowrap;
- line-height: 60rpx;
+ line-height: 50rpx;
}
.price {
diff --git a/pages/equity/search.vue b/pages/equity/search.vue
index d947926..9fee220 100644
--- a/pages/equity/search.vue
+++ b/pages/equity/search.vue
@@ -1,21 +1,30 @@
-
+
搜索
+
+ {{goodsType[goodsTypeIndex].name || ''}}
+
+
- {{searchType == 0 ? '价格' : '信用值'}}
+ {{searchType == 0 ? '价格' : '信用值'}}
- 全部分类
+
+ 贡献值
+
+
+ 全部分类
+
{{companyName}}
-
+
@@ -45,7 +54,8 @@
import {
searchUrl,
companyCategory,
- randgoodsUrl
+ randgoodsUrl,
+ shopself
} from '@/apis/interfaces/goods'
export default {
data() {
@@ -54,18 +64,22 @@
searchArr: [],
searchType: '0', // 分类 0位商品 1为企业
marketType: 'asc', // 排序
+ pvType:'asc',
categoryArr: [], // 分类数组--企业
companyId: '', // 分类数组--企业id
companyName: '选择行业',
companyShow: false,
-
+ goodsType: [],
+ goodsTypeIndex: 0,
// 分页
pageStatus: '',
- page: 1
+ page: 1,
+ loaded:false
}
},
onLoad() {
this.searchType = this.$Route.query.type
+ this.getShopSelf()
// 商品分类默认关键字 type=0为商品列表; type=1为企业列表
let wechaUrl = '' // 定义接口来源名称
if (this.searchType == '0') wechaUrl = 'mall/randgoods' //商品关键字
@@ -82,8 +96,27 @@
this.categoryArr = res
})
}
+
},
methods: {
+ getShopSelf(){
+ shopself().then(res => {
+ this.goodsType = res
+ this.loaded = true
+ })
+ },
+ // 筛选自营和合作企业等条件
+ onType(e) {
+ uni.showActionSheet({
+ itemList: this.goodsType.map((item) => item.name),
+ success: e => {
+ if(this.goodsTypeIndex !== e.tapIndex){
+ this.goodsTypeIndex = e.tapIndex
+ this.getList()
+ }
+ }
+ });
+ },
// 商品详情
onGoods(e) {
this.$Router.push({
@@ -131,7 +164,9 @@
page: this.goodsPage,
order_by: this.marketType,
industry_id: this.companyId,
- name: this.nameVal
+ name: this.nameVal,
+ is_self:this.goodsType[this.goodsTypeIndex].id,
+ pv:this.pvType
}).then(res => {
if (res.page.current === 1) {
this.searchArr = []
@@ -156,6 +191,13 @@
// 筛选产品
onTabs(e) {
this.marketType = this.marketType == 'asc' ? 'desc' : 'asc'
+ this.pvType = ''
+ this.getList()
+ },
+
+ onPv(){
+ this.pvType = this.pvType == 'asc' ? 'desc' : 'asc'
+ this.marketType = ''
this.getList()
},
@@ -242,7 +284,9 @@
.tabs-item {
font-size: $title-size-m;
color: $text-gray;
-
+ .activess{
+ color: $main-color;
+ }
.icon {
width: 32rpx;
height: 32rpx;
diff --git a/pages/goods/attestation.vue b/pages/goods/attestation.vue
index c330b53..8f99cc6 100644
--- a/pages/goods/attestation.vue
+++ b/pages/goods/attestation.vue
@@ -3,58 +3,58 @@
区块链溯源码:{{info.token}}
- 商品认证
+ 权证认证
-
- {{info.goods.type ===1?'商品名称':'项目名称'}}:
+
+ {{info.goods.type ===1?'权证名称':'项目名称'}}:
{{info.goods.name || '暂无数据'}}
-
+
生产批次:
{{info.goods.batch || '暂无数据'}}
-
+
项目分类:
{{info.goods.category || '暂无数据'}}
-
+
规格:
{{info.goods.skus[0].unit || '暂无数据'}}
-
+
数量:
{{info.goods.skus[0].stock || '暂无数据'}}
-
+
售价:
{{info.goods.skus[0].price || '暂无数据'}}
-
+
生产日期:
{{info.goods.producted_at || '暂无数据'}}
-
+
{{info.goods.type ===1?'保质期':'有效期'}}:
{{info.goods.expiried_at || '暂无数据'}}
-
+
生产厂家:
{{info.goods.product_name || '暂无数据'}}
-
+
生产地:
{{info.goods.product_address || '暂无数据'}}
-
+
+
经营许可证:
{{info.goods.lisence || '暂无数据'}}
-
+
实物照片:
@@ -67,34 +67,34 @@
企业认证
-
+
企业名称:
{{info.certification.name || '暂无数据'}}
-
+
企业地址:
{{info.certification.address || '暂无数据'}}
-
+
统一信用代码:
{{info.certification.certification.code || '暂无数据'}}
-
+
行业:
{{info.certification.industry.title || '暂无数据'}}
-
+
经营范围:
{{info.certification.range || '暂无数据'}}
-
+
联系电话:
暂无数据
-
+
营业执照:
-
- 易品新境区块链溯源证书
+
+ 链商星球区块链溯源证书
区块链溯源证书:{{info.token}}
兹证明:
- {{info.company.name}},产品符合溯源规范,认证内容如下:特授权其产品在易品新境区块链溯源商城出售!
+ {{info.company.name}},产品符合溯源规范,认证内容如下:特授权其产品在链商星球区块链溯源商城出售!
交易哈希: {{info.hash}}
区块链高度: {{info.height}}
授权时间: {{info.applied_at}}
有效期至: {{info.ended_at}}
- 易品新境区块链有限公司
+ 安徽星煌数字科技有限公司
@@ -26,10 +26,12 @@