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 3aee943..10e29d1 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 baa5de9..8680643 100644
--- a/pages.json
+++ b/pages.json
@@ -28,11 +28,11 @@
"path": "pages/equity/index",
"name": "equity",
"style": {
- "navigationBarTitleText": "通证商城",
+ "navigationBarTitleText": "通证商城 购你所想",
"navigationBarTextStyle": "white",
"app-plus":{
"titleNView": {
- "backgroundImage": "linear-gradient(to right, #7c52fc, #976dff)",
+ "backgroundColor": "#7c52fc",
"buttons": [{
"text": "\ue603",
"fontSrc":"/static/iconfont.ttf",
@@ -333,13 +333,13 @@
"path": "pages/goods/addClassify",
"name": "goodsaddClassify",
"style": {
- "navigationBarTitleText": "发布商品类目"
+ "navigationBarTitleText": "发布权证类目"
}
},{
"path": "pages/goods/details",
"name": "goodsDetails",
"style": {
- "navigationBarTitleText": "商品详情",
+ "navigationBarTitleText": "权证详情",
"navigationBarTextStyle":"white",
"titleNView": {
"backgroundImage": "linear-gradient(to right, #7c52fc, #976dff)",
diff --git a/pages/equity/index.vue b/pages/equity/index.vue
index 89a5659..13444d3 100644
--- a/pages/equity/index.vue
+++ b/pages/equity/index.vue
@@ -22,28 +22,35 @@
查看全部
-
-
-
-
- 每日推荐小易精选 推荐好物
-
-
-
-
-
-
- {{position.one.specal_tags.is_allow_values}}
- {{position.one.name}}
+
+
+
+ 每日推荐链商精选 推荐好物
- ¥{{position.one.original_price}}
- {{position.one.specal_tags.is_self}}
-
-
-
- {{item.name}}
- ¥{{item.original_price}}
+
+
+
+
+ {{position.one.specal_tags.is_allow_values}}
+ {{position.one.name}}
+
+ ¥{{position.one.original_price}}
+
+ 贡献值:{{position.one.price.pv}}
+
+
+ {{position.one.specal_tags.is_self}}
+
+
+
+
+ {{item.name}}
+
+ 贡献值:{{item.price.pv}}
+
+ ¥{{item.original_price}}
+
@@ -340,7 +347,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 a6a7c43..ff42ffd 100644
--- a/pages/equity/search.vue
+++ b/pages/equity/search.vue
@@ -1,17 +1,30 @@
-
+
搜索
-
- 价格
-
+
+ {{goodsType[goodsTypeIndex].name || ''}}
+
- 全部分类
+
+ {{searchType == 0 ? '价格' : '信用值'}}
+
+
+
+ 贡献值
+
+
+ 全部分类
+
+
+ {{companyName}}
+
@@ -28,7 +41,8 @@
import {
searchUrl,
companyCategory,
- randgoodsUrl
+ randgoodsUrl,
+ shopself
} from '@/apis/interfaces/goods'
export default {
data() {
@@ -36,19 +50,58 @@
nameVal: '',
searchArr: [],
marketType: 'asc', // 排序
+ pvType:'asc',
+ categoryArr: [], // 分类数组--企业
+ companyId: '', // 分类数组--企业id
+ companyName: '选择行业',
+ companyShow: false,
+ goodsType: [],
+ goodsTypeIndex: 0,
// 分页
pageStatus: '',
- goodsPage: 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' //商品关键字
+ if (this.searchType == '1') wechaUrl = 'companies/rand' //商品关键字
randgoodsUrl('mall/randgoods', {
type: 1
}).then(res => {
this.nameVal = res.name
})
+
+ // 企业分类数据
+ if (this.searchType == '1') {
+ companyCategory().then(res => {
+ 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({
@@ -64,7 +117,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 (this.goodsPage === 1) {
this.searchArr = []
@@ -89,6 +144,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()
},
@@ -160,7 +222,9 @@
.tabs-item {
font-size: $title-size-m;
color: $text-gray;
-
+ .activess{
+ color: $mian-color;
+ }
.icon {
width: 32rpx;
height: 32rpx;
diff --git a/pages/goods/attestation.vue b/pages/goods/attestation.vue
index 15943ed..1b36687 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 @@