云仓商品分类
This commit is contained in:
parent
d6735349d5
commit
7c06941d59
17
api/api.js
17
api/api.js
@ -1,4 +1,19 @@
|
||||
import request from "@/utils/request.js";
|
||||
|
||||
/**
|
||||
* 获取云仓分类
|
||||
*
|
||||
*/
|
||||
export function cloudWarehouse(data) {
|
||||
return request.get("store/product/cloudWarehouse", data);
|
||||
}
|
||||
/**
|
||||
* 获取云仓分类
|
||||
*
|
||||
*/
|
||||
export function getCityCloundShop(data) {
|
||||
return request.get("city/get_cloud_shop", data);
|
||||
}
|
||||
/**
|
||||
* 商品扫码枪查询商品是否存在
|
||||
*
|
||||
@ -19,7 +34,7 @@ export function get_cloud_shop(street_code) {
|
||||
return request.get(`city/get_cloud_shop?street_code=${street_code}`, {}, { noAuth: true });
|
||||
}
|
||||
export function post_product_import(id) {
|
||||
return request.post(`micro/product_import`,{ id: id }, { noAuth: true });
|
||||
return request.post(`micro/product_import`, { id: id }, { noAuth: true });
|
||||
}
|
||||
/**
|
||||
* 公共接口 ,优惠券接口 , 行业此讯 , 手机号码注册
|
||||
|
@ -9,7 +9,8 @@ let httpApiThree
|
||||
// 网络接口修改此字符 小程序域名要求https
|
||||
// let httpApi = 'http://192.168.31.110:8324' // 测试
|
||||
if (process.env.NODE_ENV === "development") {
|
||||
httpApi = "https://crmeb-test.shop.lihaink.cn"
|
||||
// httpApi = "https://crmeb-test.shop.lihaink.cn"
|
||||
httpApi = "http://192.168.0.109:8325"
|
||||
// #ifdef MP-WEIXIN
|
||||
httpApiTwo = "http://cms.com"
|
||||
httpApiThree = 'http://ceshi-oa.lihaink.cn'
|
||||
|
@ -7,30 +7,30 @@
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: CRMEB Team <admin@crmeb.com>
|
||||
// +----------------------------------------------------------------------
|
||||
export function goShopDetail(item,uid) {
|
||||
return new Promise(resolve => {
|
||||
if (item.product_type === 1) {
|
||||
uni.navigateTo({
|
||||
url: `/pages/activity/goods_seckill_details/index?id=${item.product_id}&time=${item.stop_time}`
|
||||
})
|
||||
} else if (item.product_type === 2) {
|
||||
uni.navigateTo({
|
||||
url: `/pages/activity/presell_details/index?id=${item.activity_id}`
|
||||
})
|
||||
} else if (item.product_type === 0 || item.product_type === 10) {
|
||||
uni.navigateTo({
|
||||
url: `/pages/goods_details/index?id=${item.product_id}`
|
||||
})
|
||||
}else if (item.product_type === 4) {
|
||||
uni.navigateTo({
|
||||
url: `/pages/activity/combination_details/index?id=${item.activity_id}`
|
||||
})
|
||||
}else if (item.product_type === 40) {
|
||||
uni.navigateTo({
|
||||
url: `/pages/activity/combination_status/index?id=${item.activity_id}`
|
||||
})
|
||||
}else {
|
||||
resolve(item);
|
||||
}
|
||||
});
|
||||
}
|
||||
export function goShopDetail(item, uid) {
|
||||
return new Promise(resolve => {
|
||||
if (item.product_type === 1) {
|
||||
uni.navigateTo({
|
||||
url: `/pages/activity/goods_seckill_details/index?id=${item.product_id}&time=${item.stop_time}`
|
||||
})
|
||||
} else if (item.product_type === 2) {
|
||||
uni.navigateTo({
|
||||
url: `/pages/activity/presell_details/index?id=${item.activity_id}`
|
||||
})
|
||||
} else if (item.product_type === 0 || item.product_type === 10) {
|
||||
uni.navigateTo({
|
||||
url: `/pages/goods_details/index?id=${item.product_id}&referer=${item.referer}`
|
||||
})
|
||||
} else if (item.product_type === 4) {
|
||||
uni.navigateTo({
|
||||
url: `/pages/activity/combination_details/index?id=${item.activity_id}`
|
||||
})
|
||||
} else if (item.product_type === 40) {
|
||||
uni.navigateTo({
|
||||
url: `/pages/activity/combination_status/index?id=${item.activity_id}`
|
||||
})
|
||||
} else {
|
||||
resolve(item);
|
||||
}
|
||||
});
|
||||
}
|
@ -169,6 +169,12 @@
|
||||
"navigationBarTitleText": "",
|
||||
"enablePullDownRefresh": true
|
||||
}
|
||||
}, {
|
||||
"path": "goods_list/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "里海云仓",
|
||||
"enablePullDownRefresh": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "supply_chain/goods_list",
|
||||
|
@ -275,7 +275,8 @@
|
||||
<!-- #endif -->
|
||||
<view v-else class="product_content">
|
||||
<view v-if="description.content && description.content.title" class="title">
|
||||
{{description.content.title}}</view>
|
||||
{{description.content.title}}
|
||||
</view>
|
||||
<view v-if="description.content && description.content.image" class="pictures">
|
||||
<image v-for="(item,index) in description.content.image" :key="index" :src="item"></image>
|
||||
</view>
|
||||
@ -571,7 +572,8 @@
|
||||
show: false,
|
||||
params: []
|
||||
},
|
||||
product_type: 0
|
||||
product_type: 0,
|
||||
referer: ''
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
@ -580,6 +582,7 @@
|
||||
])),
|
||||
},
|
||||
onLoad(options) {
|
||||
this.referer = options.referer
|
||||
if (options.product_type) {
|
||||
this.product_type = options.product_type
|
||||
}
|
||||
@ -1336,7 +1339,7 @@
|
||||
that.isOpen = that.attr.cartAttr = false;
|
||||
if (news) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/users/order_confirm/index?cartId=' + res.data.cart_id
|
||||
url: `/pages/users/order_confirm/index?cartId=${res.data.cart_id}&referer=${that.referer}`
|
||||
});
|
||||
} else {
|
||||
that.$util.Tips({
|
||||
|
@ -1,88 +1,159 @@
|
||||
<template>
|
||||
<view class="cloud_entrepot">
|
||||
<view class="cloud_entrepot" :style="{'min-height': winHeight + 'px'}">
|
||||
<view class="head-wrapper"></view>
|
||||
<view class="town-title">通滩镇里海云仓</view>
|
||||
<view class="town-title">{{town}}里海云仓</view>
|
||||
<view class="body-wrapper">
|
||||
<block v-for="(item,index) in cloudList" :key="index">
|
||||
<view class="item" :style="{'background-image': `url(${item.bg})`}">
|
||||
<text class="item-title">{{item.title}}</text>
|
||||
<navigator class="item"
|
||||
:url="`/pages/nongKe/goods_list/index?cate_id=${item.category_id}&street=${street_code}&name=${item.title}`"
|
||||
:style="{'background-image': `url(${item.bg})`}">
|
||||
<text class="item-title">{{item.title}}云仓服务</text>
|
||||
<text>{{item.text}}</text>
|
||||
<view class="chakan-btn" @click="navigator">查看</view>
|
||||
</view>
|
||||
</navigator>
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
let url = 'https://lihai001.oss-cn-chengdu.aliyuncs.com/public/kk/luzhou/static4/13';
|
||||
import { getCityCloundShop } from '@/api/api.js'
|
||||
import { Toast } from '@/libs/uniApi';
|
||||
export default {
|
||||
data() {
|
||||
let src = 'https://lihai001.oss-cn-chengdu.aliyuncs.com/public/kk/luzhou/static4/13';
|
||||
return {
|
||||
winHeight: 0,
|
||||
cloudList: [{
|
||||
title: '商超服务云仓服务',
|
||||
title: '商超服务',
|
||||
text: '便捷商超购物,包送到家',
|
||||
bg: url + '/shangchao.png'
|
||||
bg: src + '/shangchao.png',
|
||||
show: false,
|
||||
category_id: 25
|
||||
},
|
||||
{
|
||||
title: '农副产品云仓服务',
|
||||
title: '农副产品',
|
||||
text: '瓜果蔬菜线上购买',
|
||||
bg: url + '/nongfu.png'
|
||||
bg: src + '/nongfu.png',
|
||||
show: false,
|
||||
category_id: 26
|
||||
},
|
||||
{
|
||||
title: '生活服务云仓服务',
|
||||
title: '生活服务',
|
||||
text: '生活服务样样齐全',
|
||||
bg: url + '/shenghuo.png'
|
||||
bg: src + '/shenghuo.png',
|
||||
show: false,
|
||||
category_id: 23
|
||||
},
|
||||
{
|
||||
title: '农业生产云仓服务',
|
||||
title: '农业生产',
|
||||
text: '种子化肥送到家',
|
||||
bg: url + '/nongye.png'
|
||||
bg: src + '/nongye.png',
|
||||
show: false,
|
||||
category_id: 22
|
||||
},
|
||||
{
|
||||
title: '物流溯源云仓服务',
|
||||
title: '物流溯源',
|
||||
text: '追溯产品源头',
|
||||
bg: url + '/wuliu.png'
|
||||
bg: src + '/wuliu.png',
|
||||
show: false,
|
||||
category_id: 2541
|
||||
},
|
||||
{
|
||||
title: '坝坝宴云仓服务',
|
||||
title: '坝坝宴',
|
||||
text: '农家各种酒席宴会',
|
||||
bg: url + '/yan.png'
|
||||
bg: src + '/yan.png',
|
||||
show: false,
|
||||
category_id: 21
|
||||
},
|
||||
{
|
||||
title: '文娱旅游云仓服务',
|
||||
title: '文娱旅游',
|
||||
text: '周边好玩景点',
|
||||
bg: url + '/shangchao.png'
|
||||
bg: src + '/shangchao.png',
|
||||
show: false,
|
||||
category_id: 2542
|
||||
},
|
||||
{
|
||||
title: '民生公益云仓服务',
|
||||
title: '民生公益',
|
||||
text: '扶贫助学项目',
|
||||
bg: url + '/minsheng.png'
|
||||
bg: src + '/minsheng.png',
|
||||
show: false,
|
||||
category_id: 2543
|
||||
},
|
||||
{
|
||||
title: '医疗保健云仓服务',
|
||||
title: '医疗保健',
|
||||
text: '便捷医疗服务',
|
||||
bg: url + '/yiliao.png'
|
||||
bg: src + '/yiliao.png',
|
||||
show: false,
|
||||
category_id: 2544
|
||||
},
|
||||
{
|
||||
title: '教育培训云仓服务',
|
||||
title: '教育培训',
|
||||
text: '更完善的教育系统',
|
||||
bg: url + '/jiaoyu.png'
|
||||
bg: src + '/jiaoyu.png',
|
||||
show: false,
|
||||
category_id: 2545
|
||||
},
|
||||
{
|
||||
title: '装修建筑云仓服务',
|
||||
title: '装修建筑',
|
||||
text: '个人家庭商铺装修',
|
||||
bg: url + '/zhuangxiu.png'
|
||||
bg: src + '/zhuangxiu.png',
|
||||
show: false,
|
||||
category_id: 2547
|
||||
},
|
||||
{
|
||||
title: '交金融宝',
|
||||
text: '个人家庭商铺装修',
|
||||
bg: src + '/zhuangxiu.png',
|
||||
show: false,
|
||||
category_id: 2546
|
||||
},
|
||||
{
|
||||
title: '农贸基地',
|
||||
text: '个人家庭商铺装修',
|
||||
bg: src + '/zhuangxiu.png',
|
||||
show: false,
|
||||
category_id: 2548
|
||||
},
|
||||
{
|
||||
title: '供销综合',
|
||||
text: '个人家庭商铺装修',
|
||||
bg: src + '/zhuangxiu.png',
|
||||
show: false,
|
||||
category_id: 2549
|
||||
}
|
||||
]
|
||||
],
|
||||
street_code: '',
|
||||
town: ''
|
||||
}
|
||||
},
|
||||
onLoad() {},
|
||||
onLoad(e) {
|
||||
uni.getSystemInfo({
|
||||
success: (res) => {
|
||||
this.winHeight = res.windowHeight
|
||||
},
|
||||
});
|
||||
this.street_code = e.street
|
||||
this.town = e.town
|
||||
this.getCloundShop()
|
||||
},
|
||||
onShow() {},
|
||||
onPullDownRefresh() {
|
||||
uni.stopPullDownRefresh()
|
||||
},
|
||||
methods: {
|
||||
async getCloundShop() {
|
||||
const { data } = await getCityCloundShop({ street_code: 510502102 })
|
||||
data.length < 1 ? Toast("暂无云仓") : ''
|
||||
data.map(item => {
|
||||
this.cloudList.forEach(itens => {
|
||||
itens.show = true
|
||||
// if (itens.category_id == item.category_id) {
|
||||
// itens.show = true
|
||||
// }
|
||||
})
|
||||
})
|
||||
},
|
||||
navigator() {
|
||||
uni.navigateTo({
|
||||
url: '/pages/user/index'
|
||||
@ -96,6 +167,7 @@
|
||||
.cloud_entrepot {
|
||||
background: url("https://lihai001.oss-cn-chengdu.aliyuncs.com/public/kk/luzhou/static4/13/ycbg.png") no-repeat;
|
||||
background-size: cover;
|
||||
padding-bottom: 92.98rpx;
|
||||
}
|
||||
|
||||
.head-wrapper {
|
||||
@ -149,6 +221,7 @@
|
||||
margin-bottom: 21.05rpx;
|
||||
background-repeat: no-repeat;
|
||||
background-size: 100% 100%;
|
||||
box-sizing: border-box;
|
||||
|
||||
text {
|
||||
display: block;
|
||||
|
1008
pages/nongKe/goods_list/index.vue
Normal file
1008
pages/nongKe/goods_list/index.vue
Normal file
File diff suppressed because it is too large
Load Diff
@ -418,15 +418,6 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
// +----------------------------------------------------------------------
|
||||
// | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2016~2021 https://www.crmeb.com All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: CRMEB Team <admin@crmeb.com>
|
||||
// +----------------------------------------------------------------------
|
||||
import request from "@/utils/request.js";
|
||||
import WaterfallsFlow from '@/components/WaterfallsFlow/WaterfallsFlow.vue'
|
||||
import easyLoadimage from '@/components/easy-loadimage/easy-loadimage.vue'
|
||||
@ -1084,20 +1075,21 @@
|
||||
},
|
||||
// 去商品详情页
|
||||
goGoodsDetail(item) {
|
||||
console.log('item111', item);
|
||||
goShopDetail(item, this.uid).then(res => {
|
||||
if (this.isLogin) {
|
||||
initiateAssistApi(item.activity_id).then(res => {
|
||||
let id = res.data.product_assist_set_id;
|
||||
uni.hideLoading();
|
||||
uni.navigateTo({
|
||||
url: '/pages/activity/assist_detail/index?id=' + id
|
||||
});
|
||||
}).catch((err) => {
|
||||
uni.showToast({
|
||||
title: err,
|
||||
icon: 'none'
|
||||
})
|
||||
});
|
||||
// initiateAssistApi(item.activity_id).then(res => {
|
||||
// let id = res.data.product_assist_set_id;
|
||||
// uni.hideLoading();
|
||||
// uni.navigateTo({
|
||||
// url: `/pages/activity/assist_detail/index?id=${id}`
|
||||
// });
|
||||
// }).catch((err) => {
|
||||
// uni.showToast({
|
||||
// title: err,
|
||||
// icon: 'none'
|
||||
// })
|
||||
// });
|
||||
} else {
|
||||
this.isAuto = true;
|
||||
this.isShowAuth = true
|
||||
|
@ -161,11 +161,11 @@
|
||||
})
|
||||
},
|
||||
go_shop() {
|
||||
if (this.mer_id == 0) {
|
||||
return Toast('当前区域没有云仓库')
|
||||
}
|
||||
// if (this.mer_id == 0) {
|
||||
// return Toast('当前区域没有云仓库')
|
||||
// }
|
||||
uni.navigateTo({
|
||||
url: '/pages/nongKe/cloud_entrepot/index'
|
||||
url: `/pages/nongKe/cloud_entrepot/index?street=${this.street_id}&town=${this.town}`
|
||||
})
|
||||
// uni.navigateTo({
|
||||
// url: '/pages/store/home/index?id=' + this.mer_id + '&LihaiYun=Lihai'
|
||||
|
Loading…
x
Reference in New Issue
Block a user