Merge branch 'old' of https://gitea.lihaink.cn/mkm/nk-shop2.0 into wpf
2
App.vue
@ -10,7 +10,7 @@
|
||||
// +----------------------------------------------------------------------
|
||||
// #ifdef APP-PLUS
|
||||
let jpushModule = uni.requireNativePlugin("JG-JPush");
|
||||
const mp = uni.requireNativePlugin('uniMP');
|
||||
const mp = uni.requireNativePlugin('uniMP');
|
||||
// #endif
|
||||
import {
|
||||
checkLogin
|
||||
|
@ -82,11 +82,16 @@ export function videoList(data) {
|
||||
});
|
||||
}
|
||||
/**自己的视频列表*/
|
||||
export function deoList(id) {
|
||||
return request.get(`community/show/${id}`);
|
||||
}
|
||||
|
||||
export function myVideoList(id,data) {
|
||||
return request.get(`community/user/community_video/${id}`, data, {
|
||||
noAuth: true
|
||||
});
|
||||
}
|
||||
|
||||
/**文章点赞*/
|
||||
export function graphicStartApi(id, status) {
|
||||
return request.post(`community/start/${id}`, status);
|
||||
|
@ -13,6 +13,13 @@ import request from "@/utils/request.js";
|
||||
* 获取商品详情
|
||||
*/
|
||||
export const getProductDetailsAPI = (data) => request.get('micro/product_details', data)
|
||||
|
||||
/**
|
||||
*商品列表
|
||||
*/
|
||||
export const spuInfo = (id,data) => request.get('product/spu/street/'+id, data)
|
||||
|
||||
|
||||
/**
|
||||
* 线下导入
|
||||
*/
|
||||
|
357
api/store.js
@ -5,14 +5,14 @@ import request from "@/utils/request.js";
|
||||
*
|
||||
*/
|
||||
export function microSeachBarCode(data) {
|
||||
return request.get('micro/seach_bar_code', data);
|
||||
return request.get('micro/seach_bar_code', data);
|
||||
}
|
||||
/**
|
||||
* 获取收款二维码
|
||||
* @returns {*}
|
||||
*/
|
||||
export function createtApi(data) {
|
||||
return request.post('v2/micropay/create', data);
|
||||
return request.post('v2/micropay/create', data);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -20,7 +20,7 @@ export function createtApi(data) {
|
||||
* @returns {*}
|
||||
*/
|
||||
export function addCartApi(data) {
|
||||
return request.post('v2/micropay/addCart', data);
|
||||
return request.post('v2/micropay/addCart', data);
|
||||
}
|
||||
/**
|
||||
* 获取产品详情
|
||||
@ -28,9 +28,9 @@ export function addCartApi(data) {
|
||||
*
|
||||
*/
|
||||
export function getProductDetail(id, data) {
|
||||
return request.get('store/product/detail/' + id, data, {
|
||||
noAuth: true
|
||||
});
|
||||
return request.get('store/product/detail/' + id, data, {
|
||||
noAuth: true
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 获取预览商品详情
|
||||
@ -38,16 +38,16 @@ export function getProductDetail(id, data) {
|
||||
*
|
||||
*/
|
||||
export function getPreviewProDetail(data) {
|
||||
return request.get('store/product/preview', data, {
|
||||
noAuth: true
|
||||
});
|
||||
return request.get('store/product/preview', data, {
|
||||
noAuth: true
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 产品分享二维码 推广员
|
||||
* @param int id
|
||||
*/
|
||||
export function getProductCode(id, data) {
|
||||
return request.get('store/product/qrcode/' + id, data);
|
||||
return request.get('store/product/qrcode/' + id, data);
|
||||
}
|
||||
/**
|
||||
* 添加收藏
|
||||
@ -55,7 +55,7 @@ export function getProductCode(id, data) {
|
||||
* @param string category product=普通产品,product_seckill=秒杀产品
|
||||
*/
|
||||
export function collectAdd(data) {
|
||||
return request.post('user/relation/create', data);
|
||||
return request.post('user/relation/create', data);
|
||||
}
|
||||
/**
|
||||
* 删除收藏产品
|
||||
@ -63,14 +63,14 @@ export function collectAdd(data) {
|
||||
* @param string category product=普通产品,product_seckill=秒杀产品
|
||||
*/
|
||||
export function collectDel(data) {
|
||||
return request.post('user/relation/delete', data);
|
||||
return request.post('user/relation/delete', data);
|
||||
}
|
||||
/**
|
||||
* 购车添加
|
||||
*
|
||||
*/
|
||||
export function postCartAdd(data) {
|
||||
return request.post('user/cart/create', data);
|
||||
return request.post('user/cart/create', data);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -78,73 +78,73 @@ export function postCartAdd(data) {
|
||||
*
|
||||
*/
|
||||
export function getCategoryList() {
|
||||
return request.get('store/product/category/lst', {}, {
|
||||
noAuth: true
|
||||
});
|
||||
return request.get('store/product/category/lst', {}, {
|
||||
noAuth: true
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 获取产品列表
|
||||
* @param object data
|
||||
*/
|
||||
export function getProductslist(data) {
|
||||
if (data.brand_id && Array.isArray(data.brand_id)) {
|
||||
data = {
|
||||
...data
|
||||
}
|
||||
data.brand_id = data.brand_id.toString()
|
||||
}
|
||||
return request.get('product/spu/lst', data, {
|
||||
noAuth: true
|
||||
});
|
||||
if (data.brand_id && Array.isArray(data.brand_id)) {
|
||||
data = {
|
||||
...data
|
||||
}
|
||||
data.brand_id = data.brand_id.toString()
|
||||
}
|
||||
return request.get('product/spu/lst', data, {
|
||||
noAuth: true
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 获取优惠券商品列表
|
||||
* @param object data
|
||||
*/
|
||||
export function getCouponProductlist(data) {
|
||||
if (data.brand_id && Array.isArray(data.brand_id)) {
|
||||
data = {
|
||||
...data
|
||||
}
|
||||
data.brand_id = data.brand_id.toString()
|
||||
}
|
||||
return request.get('product/spu/coupon_product', data, {
|
||||
noAuth: true
|
||||
});
|
||||
if (data.brand_id && Array.isArray(data.brand_id)) {
|
||||
data = {
|
||||
...data
|
||||
}
|
||||
data.brand_id = data.brand_id.toString()
|
||||
}
|
||||
return request.get('product/spu/coupon_product', data, {
|
||||
noAuth: true
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 获取品牌列表
|
||||
* @param object data
|
||||
*/
|
||||
export function getBrandlist(data) {
|
||||
return request.get('store/product/brand/lst', data, {
|
||||
noAuth: true
|
||||
});
|
||||
return request.get('store/product/brand/lst', data, {
|
||||
noAuth: true
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 获取推荐产品
|
||||
*
|
||||
*/
|
||||
export function getProductHot(page, limit) {
|
||||
return request.get("product/spu/recommend", {
|
||||
page: page === undefined ? 1 : page,
|
||||
limit: limit === undefined ? 10 : limit
|
||||
}, {
|
||||
noAuth: true
|
||||
});
|
||||
return request.get("product/spu/recommend", {
|
||||
page: page === undefined ? 1 : page,
|
||||
limit: limit === undefined ? 10 : limit
|
||||
}, {
|
||||
noAuth: true
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 获取商户推荐产品
|
||||
*
|
||||
*/
|
||||
export function getMerProductHot(id, data) {
|
||||
return request.get(`product/spu/recommend`, {
|
||||
page: data.page === undefined ? 1 : data.page,
|
||||
limit: data.limit === undefined ? 10 : data.limit,
|
||||
mer_id: id || ''
|
||||
}, {
|
||||
noAuth: true
|
||||
});
|
||||
return request.get(`product/spu/recommend`, {
|
||||
page: data.page === undefined ? 1 : data.page,
|
||||
limit: data.limit === undefined ? 10 : data.limit,
|
||||
mer_id: id || ''
|
||||
}, {
|
||||
noAuth: true
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 批量收藏
|
||||
@ -153,7 +153,7 @@ export function getMerProductHot(id, data) {
|
||||
* @param string category
|
||||
*/
|
||||
export function collectAll(data) {
|
||||
return request.post('user/relation/batch/create', data);
|
||||
return request.post('user/relation/batch/create', data);
|
||||
}
|
||||
/**
|
||||
* 首页产品的轮播图和产品信息
|
||||
@ -161,23 +161,23 @@ export function collectAll(data) {
|
||||
*
|
||||
*/
|
||||
export function getGroomList(type, data) {
|
||||
return request.get('product/spu/hot/' + type, data, {
|
||||
noAuth: true
|
||||
});
|
||||
return request.get('product/spu/hot/' + type, data, {
|
||||
noAuth: true
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 获取商品收藏列表
|
||||
* @param object data
|
||||
*/
|
||||
export function getCollectUserList(data) {
|
||||
return request.get('user/relation/product/lst', data)
|
||||
export function getCollectUserList(data) {
|
||||
return request.get('user/relation/product/lst', data)
|
||||
}
|
||||
/**
|
||||
* 获取商品收藏列表 -- 删除
|
||||
* @param object data
|
||||
*/
|
||||
export function userCollectDel(data) {
|
||||
return request.post('user/relation/batch/delete', data)
|
||||
return request.post('user/relation/batch/delete', data)
|
||||
}
|
||||
/**
|
||||
* 获取产品评论
|
||||
@ -186,43 +186,43 @@ export function userCollectDel(data) {
|
||||
*
|
||||
*/
|
||||
export function getReplyList(id, data) {
|
||||
return request.get('store/product/reply/lst/' + id, data, {
|
||||
noAuth: true
|
||||
})
|
||||
return request.get('store/product/reply/lst/' + id, data, {
|
||||
noAuth: true
|
||||
})
|
||||
}
|
||||
/**
|
||||
* 产品评价数量和好评度
|
||||
* @param int id
|
||||
*/
|
||||
export function getReplyConfig(id) {
|
||||
return request.get('reply/config/' + id);
|
||||
return request.get('reply/config/' + id);
|
||||
}
|
||||
/**
|
||||
* 获取搜索关键字获取
|
||||
*
|
||||
*/
|
||||
export function getSearchKeyword() {
|
||||
return request.get('common/hot_keyword', {}, {
|
||||
noAuth: true
|
||||
});
|
||||
return request.get('common/hot_keyword', {}, {
|
||||
noAuth: true
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 门店列表
|
||||
* @returns {*}
|
||||
*/
|
||||
export function storeListApi(data) {
|
||||
return request.get("store_list", data, {
|
||||
noAuth: true
|
||||
});
|
||||
return request.get("store_list", data, {
|
||||
noAuth: true
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 商户列表
|
||||
* @returns {*}
|
||||
*/
|
||||
export function storeMerchantList(data) {
|
||||
return request.get("store/merchant/lst", data, {
|
||||
noAuth: true
|
||||
});
|
||||
return request.get("store/merchant/lst", data, {
|
||||
noAuth: true
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 获取商铺详情
|
||||
@ -230,9 +230,9 @@ export function storeMerchantList(data) {
|
||||
* @param {Object} data 商铺数据
|
||||
*/
|
||||
export function getStoreDetail(id, data) {
|
||||
return request.get("store/merchant/detail/" + id, data, {
|
||||
noAuth: true
|
||||
});
|
||||
return request.get("store/merchant/detail/" + id, data, {
|
||||
noAuth: true
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 获取商铺商品列表
|
||||
@ -240,9 +240,9 @@ export function getStoreDetail(id, data) {
|
||||
* @param {Object} data 商铺商品列表数据
|
||||
*/
|
||||
export function getStoreGoods(id, data) {
|
||||
return request.get("product/spu/merchant/" + id, data, {
|
||||
noAuth: true
|
||||
});
|
||||
return request.get("product/spu/merchant/" + id, data, {
|
||||
noAuth: true
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 获取商铺分类列表
|
||||
@ -250,77 +250,77 @@ export function getStoreGoods(id, data) {
|
||||
* @param {Object} data
|
||||
*/
|
||||
export function getStoreCategory(id, data) {
|
||||
return request.get("store/merchant/category/lst/" + id, data, {
|
||||
noAuth: true
|
||||
});
|
||||
return request.get("store/merchant/category/lst/" + id, data, {
|
||||
noAuth: true
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 关注商铺
|
||||
* @param {Object} type_id 商铺 id
|
||||
*/
|
||||
export function followStore(type_id) {
|
||||
return request.post("user/relation/create", {
|
||||
type: 10,
|
||||
type_id: type_id
|
||||
});
|
||||
return request.post("user/relation/create", {
|
||||
type: 10,
|
||||
type_id: type_id
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 取消商铺关注
|
||||
* @param {Object} type_id 商铺 id
|
||||
*/
|
||||
export function unfollowStore(type_id) {
|
||||
return request.post("user/relation/delete", {
|
||||
type: 10,
|
||||
type_id: type_id
|
||||
});
|
||||
return request.post("user/relation/delete", {
|
||||
type: 10,
|
||||
type_id: type_id
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 获取商铺优惠券
|
||||
* @param {Object} id
|
||||
*/
|
||||
export function getStoreCoupon(id) {
|
||||
return request.get("coupon/store/" + id, {
|
||||
noAuth: true
|
||||
});
|
||||
return request.get("coupon/store/" + id, {
|
||||
noAuth: true
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 获取商铺优惠券
|
||||
*/
|
||||
export function getMerchantLst(data) {
|
||||
return request.get("user/relation/merchant/lst", data, {
|
||||
noAuth: true
|
||||
});
|
||||
return request.get("user/relation/merchant/lst", data, {
|
||||
noAuth: true
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 物流信息
|
||||
*/
|
||||
export function express(id) {
|
||||
return request.post("ordero/express/" + id, {
|
||||
noAuth: true
|
||||
});
|
||||
return request.post("ordero/express/" + id, {
|
||||
noAuth: true
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 子集分类
|
||||
* @returns {*}
|
||||
*/
|
||||
export function storeCategory(pid) {
|
||||
return request.get("store/product/category", pid, {
|
||||
noAuth: true
|
||||
});
|
||||
return request.get("store/product/category", pid, {
|
||||
noAuth: true
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 分销说明
|
||||
* @returns {*}
|
||||
*/
|
||||
export function bagExplain() {
|
||||
return request.get("store/product/bag/explain");
|
||||
return request.get("store/product/bag/explain");
|
||||
}
|
||||
/**
|
||||
* 分销礼包推荐列表
|
||||
* @returns {*}
|
||||
*/
|
||||
export function bagRecommend() {
|
||||
return request.get("product/spu/bag/recommend");
|
||||
return request.get("product/spu/bag/recommend");
|
||||
}
|
||||
/**
|
||||
* 分销礼包列表
|
||||
@ -328,56 +328,56 @@ export function bagRecommend() {
|
||||
*/
|
||||
export function productBag(data) {
|
||||
|
||||
return request.get("product/spu/bag", data, {
|
||||
noAuth: true
|
||||
});
|
||||
return request.get("product/spu/bag", data, {
|
||||
noAuth: true
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 商铺二维码
|
||||
* @returns {*}
|
||||
*/
|
||||
export function merchantQrcode(id, data) {
|
||||
return request.get("store/merchant/qrcode/" + id, data, {
|
||||
noAuth: true
|
||||
});
|
||||
return request.get("store/merchant/qrcode/" + id, data, {
|
||||
noAuth: true
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 推荐商品
|
||||
* @returns {*}
|
||||
*/
|
||||
export function merchantProduct(id, data) {
|
||||
if (data.brand_id && Array.isArray(data.brand_id)) {
|
||||
data = {
|
||||
...data
|
||||
}
|
||||
data.brand_id = data.brand_id.toString()
|
||||
}
|
||||
return request.get("product/spu/merchant/" + id, data, {
|
||||
noAuth: true
|
||||
});
|
||||
if (data.brand_id && Array.isArray(data.brand_id)) {
|
||||
data = {
|
||||
...data
|
||||
}
|
||||
data.brand_id = data.brand_id.toString()
|
||||
}
|
||||
return request.get("product/spu/merchant/" + id, data, {
|
||||
noAuth: true
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 推荐商品banner
|
||||
* @returns {*}
|
||||
*/
|
||||
export function getHotBanner(type) {
|
||||
return request.get("common/hot_banner/" + type, {}, {
|
||||
noAuth: true
|
||||
});
|
||||
return request.get("common/hot_banner/" + type, {}, {
|
||||
noAuth: true
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 商户入驻表单
|
||||
* @returns {*}
|
||||
*/
|
||||
export function create(data) {
|
||||
return request.post("intention/create", data);
|
||||
return request.post("intention/create", data);
|
||||
}
|
||||
/**
|
||||
* 商户入驻短信验证码
|
||||
* @returns {*}
|
||||
*/
|
||||
export function verify(data) {
|
||||
return request.post("auth/verify", data);
|
||||
return request.post("auth/verify", data);
|
||||
}
|
||||
/**
|
||||
* 获取秒杀商品详情
|
||||
@ -385,36 +385,36 @@ export function verify(data) {
|
||||
*
|
||||
*/
|
||||
export function getSeckillProductDetail(id) {
|
||||
return request.get('store/product/seckill/detail/' + id, {}, {
|
||||
noAuth: true
|
||||
});
|
||||
return request.get('store/product/seckill/detail/' + id, {}, {
|
||||
noAuth: true
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 直播推荐列表
|
||||
* @returns {*}
|
||||
*/
|
||||
export function getLiveList(data) {
|
||||
return request.get(`broadcast/hot`, data, {
|
||||
noAuth: true
|
||||
});
|
||||
return request.get(`broadcast/hot`, data, {
|
||||
noAuth: true
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 直播列表
|
||||
* @returns {*}
|
||||
*/
|
||||
export function getBroadcastListApi(data) {
|
||||
return request.get("broadcast/lst", data, {
|
||||
noAuth: true
|
||||
});
|
||||
return request.get("broadcast/lst", data, {
|
||||
noAuth: true
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 商户分类
|
||||
* @returns {*}
|
||||
*/
|
||||
export function merClassifly() {
|
||||
return request.get("intention/cate", {}, {
|
||||
noAuth: true
|
||||
});
|
||||
return request.get("intention/cate", {}, {
|
||||
noAuth: true
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 获取预售商品详情
|
||||
@ -422,9 +422,9 @@ export function merClassifly() {
|
||||
*
|
||||
*/
|
||||
export function getPresellProductDetail(id) {
|
||||
return request.get('store/product/presell/detail/' + id, {}, {
|
||||
noAuth: true
|
||||
});
|
||||
return request.get('store/product/presell/detail/' + id, {}, {
|
||||
noAuth: true
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 获取商户申请记录
|
||||
@ -432,7 +432,7 @@ export function getPresellProductDetail(id) {
|
||||
*
|
||||
*/
|
||||
export function getApplicationRecordList(data) {
|
||||
return request.get('intention/lst', data);
|
||||
return request.get('intention/lst', data);
|
||||
}
|
||||
/**
|
||||
* 获取商户申请详情
|
||||
@ -440,7 +440,7 @@ export function getApplicationRecordList(data) {
|
||||
*
|
||||
*/
|
||||
export function getGoodsDetails(id) {
|
||||
return request.get('intention/detail/' + id, {});
|
||||
return request.get('intention/detail/' + id, {});
|
||||
}
|
||||
|
||||
/**
|
||||
@ -449,7 +449,7 @@ export function getGoodsDetails(id) {
|
||||
*
|
||||
*/
|
||||
export function updateGoodsRecord(id, data) {
|
||||
return request.post('intention/update/' + id, data);
|
||||
return request.post('intention/update/' + id, data);
|
||||
}
|
||||
/**
|
||||
* 获取定位详细地址
|
||||
@ -457,9 +457,9 @@ export function updateGoodsRecord(id, data) {
|
||||
*
|
||||
*/
|
||||
export function getGeocoder(data) {
|
||||
return request.get(`lbs/geocoder?location=${data.lat},${data.long}`, {}, {
|
||||
noAuth: true
|
||||
});
|
||||
return request.get(`lbs/geocoder?location=${data.lat},${data.long}`, {}, {
|
||||
noAuth: true
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 获取店铺类型
|
||||
@ -467,80 +467,109 @@ export function getGeocoder(data) {
|
||||
*
|
||||
*/
|
||||
export function getStoreTypeApi() {
|
||||
return request.get('intention/type', {sift_store:0}, {
|
||||
noAuth: true
|
||||
});
|
||||
return request.get('intention/type', {
|
||||
sift_store: 0
|
||||
}, {
|
||||
noAuth: true
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 到货通知
|
||||
*
|
||||
*/
|
||||
export function arrivalNoticeApi(data) {
|
||||
return request.post('store/product/increase_take', data);
|
||||
return request.post('store/product/increase_take', data);
|
||||
}
|
||||
|
||||
/*
|
||||
获取图片验证码
|
||||
*/
|
||||
export function getCaptcha() {
|
||||
return request.get('captcha');
|
||||
return request.get('captcha');
|
||||
}
|
||||
|
||||
/*
|
||||
获取店铺资质
|
||||
*/
|
||||
export function storeCertificate(data) {
|
||||
return request.post(`store/certificate/${data.merId}`, data)
|
||||
return request.post(`store/certificate/${data.merId}`, data)
|
||||
}
|
||||
/**
|
||||
* 本地服务列表
|
||||
* @returns {*}
|
||||
*/
|
||||
export function storeServiceList(id, data) {
|
||||
return request.get(`product/spu/local/${id}`, data, {
|
||||
noAuth: true
|
||||
});
|
||||
return request.get(`product/spu/local/${id}`, data, {
|
||||
noAuth: true
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 复制口令
|
||||
* @returns {*}
|
||||
*/
|
||||
export function copyPasswordApi(data) {
|
||||
return request.get(`product/spu/copy`, data, {
|
||||
noAuth: true
|
||||
});
|
||||
return request.get(`product/spu/copy`, data, {
|
||||
noAuth: true
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 口令搜索
|
||||
* @returns {*}
|
||||
*/
|
||||
export function copyPasswordSearch(data) {
|
||||
return request.get(`command/copy`, data, {
|
||||
noAuth: true
|
||||
});
|
||||
return request.get(`command/copy`, data, {
|
||||
noAuth: true
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 套餐列表
|
||||
* @returns {*}
|
||||
*/
|
||||
export function getDiscountsLst(data) {
|
||||
return request.get(`discounts/lst`, data, {
|
||||
noAuth: true
|
||||
});
|
||||
return request.get(`discounts/lst`, data, {
|
||||
noAuth: true
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 套餐--立即购买
|
||||
* @returns {*}
|
||||
*/
|
||||
export function discountsCartAdd(data) {
|
||||
return request.post('user/cart/batchCreate', data);
|
||||
return request.post('user/cart/batchCreate', data);
|
||||
}
|
||||
/**
|
||||
* 商品--价格说明
|
||||
* @returns {*}
|
||||
*/
|
||||
export function priceRuleApi(id) {
|
||||
return request.get(`store/product/price_rule/${id}`, {}, {
|
||||
noAuth: true
|
||||
});
|
||||
return request.get(`store/product/price_rule/${id}`, {}, {
|
||||
noAuth: true
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 供销市场标签
|
||||
* @returns {*}
|
||||
*/
|
||||
export function supMenuApi(data) {
|
||||
return request.get('intention/cate', data);
|
||||
}
|
||||
/**
|
||||
* 供销市场标签
|
||||
* @returns {*}
|
||||
*/
|
||||
export function supAgoodsApi(data) {
|
||||
return request.get('store/merchant/lst', data);
|
||||
}
|
||||
// /api/store / merchant / lst ? page = 1 & limit = 10 & order = & category_id = 22 & type_id = 10 & street_id = &
|
||||
// credit_buy =
|
||||
// /api/region/:street_id/merchant
|
||||
/**
|
||||
* 附近商家
|
||||
* @returns {*}
|
||||
*/
|
||||
// export function supAgoodsApi(data) {
|
||||
// return request.get('store/merchant/lst', data);
|
||||
// }
|
||||
export function vicinityStoreApi(data) {
|
||||
return request.get(`region/${data}/merchant`);
|
||||
}
|
208
components/WaterfallsFlow/WaterfallsFlowo.vue
Normal file
@ -0,0 +1,208 @@
|
||||
<template>
|
||||
<view :class="'wf-page wf-page'+type">
|
||||
<!-- left -->
|
||||
|
||||
|
||||
<view>
|
||||
|
||||
<view id="left" v-if="leftList.length">
|
||||
<view v-for="(item,index) in leftList" :key="index"
|
||||
class="wf-itema" @tap="itemTap(item)">
|
||||
<WaterfallsFlowItem :item="item" :isStore="isStore" :type="type" @goShop="goShop"/>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- right -->
|
||||
<view>
|
||||
<view id="right" v-if="rightList.length">
|
||||
<view v-for="(item,index) in rightList" :key="index"
|
||||
class="wf-itemb" @tap="itemTap(item)">
|
||||
<WaterfallsFlowItem :item="item" :isStore="isStore" :type="type" @goShop="goShop"/>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import WaterfallsFlowItem from '../WaterfallsFlowItem/WaterfallsFlowItemo.vue'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
WaterfallsFlowItem
|
||||
},
|
||||
props: {
|
||||
// 瀑布流列表
|
||||
wfList: {
|
||||
type: Array,
|
||||
require: true
|
||||
},
|
||||
updateNum: {
|
||||
type: Number,
|
||||
default: 10
|
||||
},
|
||||
type: {
|
||||
type: Number,
|
||||
default: 0
|
||||
},
|
||||
isStore: {
|
||||
type: [String, Number],
|
||||
default: '1'
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
allList: [], // 全部列表
|
||||
leftList: [], // 左边列表
|
||||
rightList: [], // 右边列表
|
||||
mark: 0, // 列表标记
|
||||
boxHeight: [], // 下标0和1分别为左列和右列高度
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
// 监听列表数据变化
|
||||
wfList: {
|
||||
|
||||
handler(nVal,oVal){
|
||||
|
||||
// 如果数据为空或新的列表数据少于旧的列表数据(通常为下拉刷新或切换排序或使用筛选器),初始化变量
|
||||
if (!this.wfList.length ||
|
||||
(this.wfList.length === this.updateNum && this.wfList.length <= this.allList.length)) {
|
||||
this.allList = [];
|
||||
this.leftList = [];
|
||||
this.rightList = [];
|
||||
this.boxHeight = [];
|
||||
this.mark = 0;
|
||||
}
|
||||
|
||||
// 如果列表有值,调用waterfall方法
|
||||
if (this.wfList.length) {
|
||||
this.allList = this.wfList;
|
||||
this.leftList = [];
|
||||
this.rightList = [];
|
||||
this.boxHeight = [];
|
||||
this.allList.forEach((v, i) => {
|
||||
if(this.allList.length < 3 || (this.allList.length <= 7 && this.allList.length - i > 1) || (this.allList.length > 7 && this.allList.length - i > 2)) {
|
||||
if(i % 2){
|
||||
this.rightList.push(v);
|
||||
}else{
|
||||
this.leftList.push(v);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
if(this.allList.length < 3){
|
||||
this.mark = this.allList.length+1;
|
||||
}else if(this.allList.length <= 7){
|
||||
this.mark = this.allList.length - 1;
|
||||
}else{
|
||||
this.mark = this.allList.length - 2;
|
||||
}
|
||||
if(this.mark < this.allList.length){
|
||||
this.waterFall()
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
immediate: true,
|
||||
deep:true
|
||||
},
|
||||
mounted(){
|
||||
|
||||
},
|
||||
|
||||
// 监听标记,当标记发生变化,则执行下一个item排序
|
||||
mark() {
|
||||
const len = this.allList.length;
|
||||
if (this.mark < len && this.mark !== 0 && this.boxHeight.length) {
|
||||
this.waterFall();
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 瀑布流排序
|
||||
waterFall() {
|
||||
const i = this.mark;
|
||||
|
||||
if (i == 0) {
|
||||
// 初始化,从左边开始插入
|
||||
this.leftList.push(this.allList[i]);
|
||||
// 更新左边列表高度
|
||||
this.getViewHeight(0);
|
||||
} else if (i == 1) {
|
||||
// 第二个item插入,默认为右边插入
|
||||
this.rightList.push(this.allList[i]);
|
||||
// 更新右边列表高度
|
||||
this.getViewHeight(1);
|
||||
} else {
|
||||
// 根据左右列表高度判断下一个item应该插入哪边
|
||||
if(!this.boxHeight.length){
|
||||
this.rightList.length < this.leftList.length
|
||||
? this.rightList.push(this.allList[i])
|
||||
: this.leftList.push(this.allList[i]);
|
||||
} else {
|
||||
const leftOrRight = this.boxHeight[0] > this.boxHeight[1] ? 1 : 0;
|
||||
if (leftOrRight) {
|
||||
this.rightList.push(this.allList[i])
|
||||
} else {
|
||||
this.leftList.push(this.allList[i])
|
||||
}
|
||||
}
|
||||
// 更新插入列表高度
|
||||
this.getViewHeight();
|
||||
}
|
||||
},
|
||||
// 获取列表高度
|
||||
getViewHeight() {
|
||||
// 使用nextTick,确保页面更新结束后,再请求高度
|
||||
this.$nextTick(() => {
|
||||
setTimeout(()=>{
|
||||
uni.createSelectorQuery().in(this).select('#right').boundingClientRect(res => {
|
||||
res ? this.boxHeight[1] = res.height : '';
|
||||
uni.createSelectorQuery().in(this).select('#left').boundingClientRect(res => {
|
||||
res ? this.boxHeight[0] = res.height : '';
|
||||
this.mark = this.mark + 1;
|
||||
}).exec();
|
||||
}).exec();
|
||||
},100)
|
||||
})
|
||||
},
|
||||
// item点击
|
||||
itemTap(item) {
|
||||
// this.$emit('itemTap', item)
|
||||
},
|
||||
// item点击
|
||||
goShop(item) {
|
||||
this.$emit('goShop', item)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
$page-padding: 10px;
|
||||
$grid-gap: 5px;
|
||||
|
||||
.wf-page {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr;
|
||||
grid-gap: $grid-gap;
|
||||
}
|
||||
.wf-itema {
|
||||
width: 356rpx;
|
||||
padding-bottom: $grid-gap;
|
||||
}
|
||||
.wf-itemb {
|
||||
width: 356rpx;
|
||||
padding-bottom: $grid-gap;
|
||||
}
|
||||
.wf-page1 .wf-item{
|
||||
margin-top: 20rpx;
|
||||
background-color: #fff;
|
||||
border-radius: 20rpx;
|
||||
padding-bottom: 0;
|
||||
}
|
||||
.wf-item-page{
|
||||
padding-bottom: 20rpx;
|
||||
}
|
||||
</style>
|
210
components/WaterfallsFlow/WaterfallsFlows.vue
Normal file
@ -0,0 +1,210 @@
|
||||
<template>
|
||||
<view :class="'wf-page wf-page'+type">
|
||||
<!-- left -->
|
||||
|
||||
|
||||
<view>
|
||||
|
||||
<view id="left" v-if="leftList.length">
|
||||
<view v-for="(item,index) in leftList" :key="index"
|
||||
class="wf-itema" @tap="itemTap(item)">
|
||||
<WaterfallsFlowItem :item="item" :isStore="isStore" :type="type" @goShop="goShop"/>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- right -->
|
||||
<view>
|
||||
<view id="right" v-if="rightList.length">
|
||||
<view v-for="(item,index) in rightList" :key="index"
|
||||
class="wf-itemb" @tap="itemTap(item)">
|
||||
<WaterfallsFlowItem :item="item" :isStore="isStore" :type="type" @goShop="goShop"/>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import WaterfallsFlowItem from '../WaterfallsFlowItem/WaterfallsFlowItems.vue'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
WaterfallsFlowItem
|
||||
},
|
||||
props: {
|
||||
// 瀑布流列表
|
||||
wfList: {
|
||||
type: Array,
|
||||
require: true
|
||||
},
|
||||
updateNum: {
|
||||
type: Number,
|
||||
default: 10
|
||||
},
|
||||
type: {
|
||||
type: Number,
|
||||
default: 0
|
||||
},
|
||||
isStore: {
|
||||
type: [String, Number],
|
||||
default: '1'
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
allList: [], // 全部列表
|
||||
leftList: [], // 左边列表
|
||||
rightList: [], // 右边列表
|
||||
mark: 0, // 列表标记
|
||||
boxHeight: [], // 下标0和1分别为左列和右列高度
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
// 监听列表数据变化
|
||||
wfList: {
|
||||
|
||||
handler(nVal,oVal){
|
||||
|
||||
// 如果数据为空或新的列表数据少于旧的列表数据(通常为下拉刷新或切换排序或使用筛选器),初始化变量
|
||||
if (!this.wfList.length ||
|
||||
(this.wfList.length === this.updateNum && this.wfList.length <= this.allList.length)) {
|
||||
this.allList = [];
|
||||
this.leftList = [];
|
||||
this.rightList = [];
|
||||
this.boxHeight = [];
|
||||
this.mark = 0;
|
||||
}
|
||||
|
||||
// 如果列表有值,调用waterfall方法
|
||||
if (this.wfList.length) {
|
||||
this.allList = this.wfList;
|
||||
this.leftList = [];
|
||||
this.rightList = [];
|
||||
this.boxHeight = [];
|
||||
this.allList.forEach((v, i) => {
|
||||
if(this.allList.length < 3 || (this.allList.length <= 7 && this.allList.length - i > 1) || (this.allList.length > 7 && this.allList.length - i > 2)) {
|
||||
if(i % 2){
|
||||
this.rightList.push(v);
|
||||
}else{
|
||||
this.leftList.push(v);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
if(this.allList.length < 3){
|
||||
this.mark = this.allList.length+1;
|
||||
}else if(this.allList.length <= 7){
|
||||
this.mark = this.allList.length - 1;
|
||||
}else{
|
||||
this.mark = this.allList.length - 2;
|
||||
}
|
||||
if(this.mark < this.allList.length){
|
||||
this.waterFall()
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
immediate: true,
|
||||
deep:true
|
||||
},
|
||||
mounted(){
|
||||
|
||||
this.getUserInfo()
|
||||
},
|
||||
|
||||
// 监听标记,当标记发生变化,则执行下一个item排序
|
||||
mark() {
|
||||
const len = this.allList.length;
|
||||
if (this.mark < len && this.mark !== 0 && this.boxHeight.length) {
|
||||
this.waterFall();
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
|
||||
// 瀑布流排序
|
||||
waterFall() {
|
||||
const i = this.mark;
|
||||
if (i == 0) {
|
||||
// 初始化,从左边开始插入
|
||||
this.leftList.push(this.allList[i]);
|
||||
// 更新左边列表高度
|
||||
this.getViewHeight(0);
|
||||
} else if (i == 1) {
|
||||
// 第二个item插入,默认为右边插入
|
||||
this.rightList.push(this.allList[i]);
|
||||
// 更新右边列表高度
|
||||
this.getViewHeight(1);
|
||||
} else {
|
||||
// 根据左右列表高度判断下一个item应该插入哪边
|
||||
if(!this.boxHeight.length){
|
||||
this.rightList.length < this.leftList.length
|
||||
? this.rightList.push(this.allList[i])
|
||||
: this.leftList.push(this.allList[i]);
|
||||
} else {
|
||||
const leftOrRight = this.boxHeight[0] > this.boxHeight[1] ? 1 : 0;
|
||||
if (leftOrRight) {
|
||||
this.rightList.push(this.allList[i])
|
||||
} else {
|
||||
this.leftList.push(this.allList[i])
|
||||
}
|
||||
}
|
||||
// 更新插入列表高度
|
||||
this.getViewHeight();
|
||||
}
|
||||
},
|
||||
// 获取列表高度
|
||||
getViewHeight() {
|
||||
// 使用nextTick,确保页面更新结束后,再请求高度
|
||||
this.$nextTick(() => {
|
||||
setTimeout(()=>{
|
||||
uni.createSelectorQuery().in(this).select('#right').boundingClientRect(res => {
|
||||
res ? this.boxHeight[1] = res.height : '';
|
||||
uni.createSelectorQuery().in(this).select('#left').boundingClientRect(res => {
|
||||
res ? this.boxHeight[0] = res.height : '';
|
||||
this.mark = this.mark + 1;
|
||||
}).exec();
|
||||
}).exec();
|
||||
},100)
|
||||
})
|
||||
},
|
||||
// item点击
|
||||
itemTap(item) {
|
||||
// this.$emit('itemTap', item)
|
||||
},
|
||||
// item点击
|
||||
goShop(item) {
|
||||
this.$emit('goShop', item)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
$page-padding: 10px;
|
||||
$grid-gap: 5px;
|
||||
|
||||
.wf-page {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr;
|
||||
grid-gap: $grid-gap;
|
||||
}
|
||||
.wf-itema {
|
||||
width: 356rpx;
|
||||
padding-bottom: $grid-gap;
|
||||
}
|
||||
.wf-itemb {
|
||||
width: 356rpx;
|
||||
padding-bottom: $grid-gap;
|
||||
}
|
||||
.wf-page1 .wf-item{
|
||||
margin-top: 20rpx;
|
||||
background-color: #fff;
|
||||
border-radius: 20rpx;
|
||||
padding-bottom: 0;
|
||||
}
|
||||
.wf-item-page{
|
||||
padding-bottom: 20rpx;
|
||||
}
|
||||
</style>
|
206
components/WaterfallsFlowItem/WaterfallsFlowItemo.vue
Normal file
@ -0,0 +1,206 @@
|
||||
<template>
|
||||
<view class="wf-item-page" @click="gogogo(item)">
|
||||
|
||||
<image :src="item.image" mode="widthFix" class="item-img" />
|
||||
|
||||
<view class="title">{{item.store_name}}</view>
|
||||
<!-- <view class="tag">
|
||||
<view class="tag-one">
|
||||
自营商品
|
||||
</view>
|
||||
<view class="tag-two">
|
||||
|
||||
<text class="tag-twoa">折</text>
|
||||
<text class="tag-twob">满20包邮</text>
|
||||
</view>
|
||||
</view> -->
|
||||
<view class="relase">
|
||||
<view class="relase-one">
|
||||
{{item.rate}}
|
||||
</view>
|
||||
<view class="relase-two">
|
||||
{{item.reply_count}}评论
|
||||
</view>
|
||||
</view>
|
||||
<view class="price">
|
||||
<span>¥</span>{{item.price.split('.')[0]}}.<text>{{item.price.split('.')[1]}}</text>
|
||||
</view>
|
||||
<view class="item-info">
|
||||
<view class="info-title" style="margin-right: 10rpx;">
|
||||
{{item.merchant.mer_name}}
|
||||
</view>
|
||||
<view class="info-img">
|
||||
<image src="@/static/images/you.png" mode="aspectFit"></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: {
|
||||
item: {
|
||||
type: Object,
|
||||
require: true
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
gogogo(item) {
|
||||
|
||||
uni.navigateTo({
|
||||
url: '/pages/goods_details/index?id=' + item.product_id
|
||||
})
|
||||
},
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.wf-item-page {
|
||||
background: #fff;
|
||||
overflow: hidden;
|
||||
border-radius: 5px;
|
||||
|
||||
}
|
||||
|
||||
.item-img {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.item-info {}
|
||||
|
||||
.title {
|
||||
font-size: 30rpx;
|
||||
font-family: PingFang SC-Medium, PingFang SC;
|
||||
font-weight: 500;
|
||||
color: #333333;
|
||||
margin: 12px 0;
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 2;
|
||||
-webkit-box-orient: vertical;
|
||||
|
||||
margin-left: 21rpx;
|
||||
}
|
||||
|
||||
.tag {
|
||||
display: flex;
|
||||
margin-left: 21rpx;
|
||||
|
||||
.tag-one {
|
||||
|
||||
text-align: center;
|
||||
padding: 2rpx 9rpx;
|
||||
border-radius: 11rpx 11rpx 11rpx 11rpx;
|
||||
border: 1px solid #3274F9;
|
||||
font-size: 19rpx;
|
||||
font-family: PingFang SC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
margin-right: 15rpx;
|
||||
}
|
||||
|
||||
.tag-two {
|
||||
|
||||
.tag-twoa {
|
||||
width: 130rpx;
|
||||
text-align: center;
|
||||
padding-left: 15rpx;
|
||||
padding-right: 7rpx;
|
||||
border-radius: 11rpx 0px 0px 0rpx;
|
||||
border: 1px solid #F84221;
|
||||
font-size: 19rpx;
|
||||
font-family: PingFang SC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
.tag-twob {
|
||||
width: 130rpx;
|
||||
text-align: center;
|
||||
padding: 2rpx 9rpx;
|
||||
border-radius: 0px 11rpx 11rpx 0px;
|
||||
border: 1px solid #F84221;
|
||||
font-size: 19rpx;
|
||||
font-family: PingFang SC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.relase {
|
||||
display: flex;
|
||||
margin-left: 21rpx;
|
||||
margin-top: 12rpx;
|
||||
height: 26rpx;
|
||||
line-height: 26rpx;
|
||||
.relase-one {
|
||||
// font-style: italic;
|
||||
transform: skewX(-15deg);
|
||||
font-size: 26rpx;
|
||||
font-family: SF Pro Display-Regular Italic, SF Pro Display;
|
||||
font-weight: 600;
|
||||
color: #FF6D20;
|
||||
|
||||
}
|
||||
|
||||
.relase-two {
|
||||
font-size: 23rpx;
|
||||
font-family: PingFang SC-Regular, PingFang SC;
|
||||
font-weight: 500;
|
||||
color: #B3B3B3;
|
||||
margin-left: 13rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.price {
|
||||
margin-left: 21rpx;
|
||||
margin-bottom: 10rpx;
|
||||
color: #F84221;
|
||||
font-size: 44rpx;
|
||||
font-weight: 600;
|
||||
|
||||
span {
|
||||
color: #F84221;
|
||||
font-size: 30rpx;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
text {
|
||||
color: #F84221;
|
||||
font-size: 37rpx;
|
||||
font-weight: 400;
|
||||
}
|
||||
}
|
||||
|
||||
.item-info {
|
||||
margin-left: 21rpx;
|
||||
margin-bottom: 25rpx;
|
||||
display: flex;
|
||||
|
||||
width: 280rpx;
|
||||
height: 39rpx;
|
||||
line-height: 39rpx;
|
||||
background: #F4F7FE;
|
||||
border-radius: 19rpx 19rpx;
|
||||
opacity: 1;
|
||||
font-size: 23rpx;
|
||||
padding-left: 11rpx;
|
||||
font-family: PingFang SC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #737373;
|
||||
|
||||
.info-img {
|
||||
width: 21rpx;
|
||||
height: 21rpx;
|
||||
margin-top: 5rpx;
|
||||
|
||||
image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
138
components/WaterfallsFlowItem/WaterfallsFlowItems.vue
Normal file
@ -0,0 +1,138 @@
|
||||
<template>
|
||||
<view class="wf-item-page" @click="gogogo(item)">
|
||||
|
||||
|
||||
|
||||
<image :src="item.image[0]" mode="widthFix" class="item-img" />
|
||||
|
||||
<view class="goods_item_img" v-if="item.video_link.length>0">
|
||||
<image src="@/static/images/sp.png" mode="aspectFill"></image>
|
||||
</view>
|
||||
<view class="title">{{item.title}}</view>
|
||||
<view class="item-info">
|
||||
<image :src="(item.author && item.author.avatar) || '/static/images/f.png'" mode="aspectFill"
|
||||
class="info-avatar" />
|
||||
<view class="info-nickname">{{ item.author.nickname }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
getUserInfo
|
||||
} from '@/api/user.js';
|
||||
export default {
|
||||
props: {
|
||||
item: {
|
||||
type: Object,
|
||||
require: true
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
|
||||
data() {
|
||||
return {
|
||||
user_id: ''
|
||||
}
|
||||
},
|
||||
|
||||
mounted() {
|
||||
this.getUserInfo()
|
||||
},
|
||||
|
||||
|
||||
methods: {
|
||||
/**
|
||||
* 获取个人用户信息
|
||||
*/
|
||||
getUserInfo: function() {
|
||||
let that = this;
|
||||
getUserInfo().then(res => {
|
||||
this.user_id = res.data.uid
|
||||
});
|
||||
},
|
||||
gogogo(item) {
|
||||
if (item.video_link.length > 0) {
|
||||
uni.navigateTo({
|
||||
// #ifdef MP || H5
|
||||
url: `/pages/short_video/nvueSwiper/index?id=${item.community_id}&uid=${this.user_id}&user=1`
|
||||
// #endif
|
||||
// #ifdef APP
|
||||
url: `/pages/short_video/appSwiper/index?id=${item.community_id}&uid=${this.user_id}&user=1`
|
||||
// #endif
|
||||
})
|
||||
|
||||
} else {
|
||||
uni.navigateTo({
|
||||
url: `/pages/plantGrass/plant_detail/index?id=${item.community_id}`
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.wf-item-page {
|
||||
background: #fff;
|
||||
overflow: hidden;
|
||||
border-radius: 5px;
|
||||
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.item-img {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.item-info {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
.goods_item_img {
|
||||
position: absolute;
|
||||
top: 20rpx;
|
||||
right: 18rpx;
|
||||
width: 52rpx;
|
||||
height: 52rpx;
|
||||
z-index: 1 !important;
|
||||
|
||||
|
||||
image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.title {
|
||||
font-size: 30rpx;
|
||||
font-family: PingFang SC-Medium, PingFang SC;
|
||||
font-weight: 500;
|
||||
color: #333333;
|
||||
margin: 12px 0;
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 2;
|
||||
-webkit-box-orient: vertical;
|
||||
padding: 0 5px;
|
||||
}
|
||||
|
||||
.info-avatar {
|
||||
width: 49rpx;
|
||||
height: 49rpx;
|
||||
border-radius: 50%;
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
.info-nickname {
|
||||
font-size: 12px;
|
||||
color: #333;
|
||||
}
|
||||
</style>
|
@ -9,9 +9,10 @@
|
||||
<view class="close" @click="closeShowBox"><text class="iconfont icon-guanbi"></text></view>
|
||||
</view>
|
||||
<view class="box">
|
||||
<view class="check-item" v-for="(item,index) in radioList" :key="index" :class="{on:index == radioIndex}">
|
||||
<view class="check-item" v-for="(item,index) in radioList" :key="index"
|
||||
:class="{on:index == radioIndex}">
|
||||
<view>{{item.title}}</view>
|
||||
<view class="radio" @click="bindCheck(item,index)">
|
||||
<view class="radio" @click="bindCheck(item,index)">
|
||||
<block v-if="index == newData.order.isTake">
|
||||
<view class="iconfont icon-xuanzhong1"></view>
|
||||
</block>
|
||||
@ -39,77 +40,79 @@
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: CRMEB Team <admin@crmeb.com>
|
||||
// +----------------------------------------------------------------------
|
||||
import { mapGetters } from "vuex";
|
||||
export default{
|
||||
name:'checkDelivery',
|
||||
props:{
|
||||
isShowBox:{
|
||||
type:Boolean,
|
||||
default:false
|
||||
import {
|
||||
mapGetters
|
||||
} from "vuex";
|
||||
export default {
|
||||
name: 'checkDelivery',
|
||||
props: {
|
||||
isShowBox: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
activeObj:{
|
||||
type:Object,
|
||||
default:function(){
|
||||
activeObj: {
|
||||
type: Object,
|
||||
default: function() {
|
||||
return {}
|
||||
}
|
||||
},
|
||||
deliveryName:{
|
||||
type:String,
|
||||
default:'快递配送'
|
||||
deliveryName: {
|
||||
type: String,
|
||||
default: '快递配送'
|
||||
},
|
||||
radioList:{
|
||||
type:Array,
|
||||
default: [
|
||||
{
|
||||
title:'快递配送',
|
||||
check:true
|
||||
radioList: {
|
||||
type: Array,
|
||||
default: [{
|
||||
title: '快递配送',
|
||||
check: true
|
||||
},
|
||||
{
|
||||
title:'到店核销',
|
||||
check:false
|
||||
title: '到店核销',
|
||||
check: false
|
||||
}
|
||||
],
|
||||
},
|
||||
},
|
||||
computed: mapGetters(['viewColor']),
|
||||
data(){
|
||||
data() {
|
||||
return {
|
||||
radioIndex:0,
|
||||
oldRadioIndex:'', //旧的索引
|
||||
newData:{}
|
||||
radioIndex: 0,
|
||||
oldRadioIndex: '', //旧的索引
|
||||
newData: {}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.newData = JSON.parse(JSON.stringify(this.activeObj))
|
||||
},
|
||||
methods:{
|
||||
methods: {
|
||||
// 关闭配送方式弹窗
|
||||
closeShowBox(){
|
||||
closeShowBox() {
|
||||
this.$emit('close')
|
||||
},
|
||||
// 选择配送方式
|
||||
bindCheck(item,index){
|
||||
bindCheck(item, index) {
|
||||
this.newData.order.isTake = index
|
||||
},
|
||||
confirmBtn(){
|
||||
this.$emit('confirmBtn',this.newData)
|
||||
confirmBtn() {
|
||||
this.$emit('confirmBtn', this.newData)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.mask-box{
|
||||
.bg{
|
||||
.mask-box {
|
||||
.bg {
|
||||
z-index: 30;
|
||||
position: fixed;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: rgba(0,0,0,0.5);
|
||||
background: rgba(0, 0, 0, 0.5);
|
||||
}
|
||||
.mask-content{
|
||||
|
||||
.mask-content {
|
||||
z-index: 40;
|
||||
position: fixed;
|
||||
left: 0;
|
||||
@ -119,45 +122,54 @@
|
||||
border-radius: 16rpx 16rpx 0 0;
|
||||
transform: translate3d(0, 100%, 0);
|
||||
transition: all .3s cubic-bezier(.25, .5, .5, .9);
|
||||
.title-bar{
|
||||
|
||||
.title-bar {
|
||||
position: relative;
|
||||
text-align: center;
|
||||
padding: 30rpx 0;
|
||||
margin-bottom: 20rpx;
|
||||
font-size: 32rpx;
|
||||
color: #282828;
|
||||
.close{
|
||||
|
||||
.close {
|
||||
position: absolute;
|
||||
right: 30rpx;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
.iconfont{
|
||||
|
||||
.iconfont {
|
||||
color: #8A8A8A;
|
||||
}
|
||||
}
|
||||
}
|
||||
.box{
|
||||
|
||||
.box {
|
||||
padding: 0 30rpx;
|
||||
.check-item{
|
||||
|
||||
.check-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
height: 40rpx;
|
||||
margin-bottom: 50rpx;
|
||||
font-size: 28rpx;
|
||||
.iconfont{
|
||||
|
||||
.iconfont {
|
||||
font-size: 38rpx;
|
||||
color: #CCCCCC;
|
||||
&.icon-xuanzhong1{
|
||||
|
||||
&.icon-xuanzhong1 {
|
||||
color: var(--view-theme);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.foot{
|
||||
|
||||
.foot {
|
||||
padding: 15rpx 30rpx;
|
||||
border-top: 1px solid #F5F5F5;
|
||||
.btn{
|
||||
|
||||
.btn {
|
||||
width: 100%;
|
||||
height: 70rpx;
|
||||
line-height: 70rpx;
|
||||
@ -168,9 +180,10 @@
|
||||
background: var(--view-theme);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.animated {
|
||||
animation-duration: .3s
|
||||
}
|
||||
</style>
|
||||
</style>
|
@ -45,6 +45,7 @@
|
||||
{{item.product_num - item.refund_num}}</view>
|
||||
<view class='btn-item err' v-if="item.is_refund >1">已退款 x
|
||||
{{item.product_num - item.refund_num}}</view>
|
||||
|
||||
<view class='btn-item' v-if='item.is_reply==0 && evaluate==2 && item.is_refund==0'
|
||||
@click.stop="evaluateTap(item.order_product_id,orderId)">去评价</view>
|
||||
<view class='btn-item on' v-else-if="item.is_reply==1 && evaluate==2">已评价</view>
|
||||
@ -114,9 +115,8 @@
|
||||
<view class="btn-item"
|
||||
v-if="(item.is_refund ==0 && (evaluate != 10 && evaluate != 11) && orderData.refund_status || item.refund_num > 0)&& evaluate!=9 &&evaluate != 1&&evaluate !=4&& evaluate!=3 || evaluate==2"
|
||||
@click.stop="refund(item)">申请退款</view>
|
||||
|
||||
<view class='btn-item'
|
||||
v-if='item.is_reply==0 && evaluate!=2&& evaluate!=3 && evaluate!=8&& evaluate!=9&& item.refund_num > 0'
|
||||
v-if='item.is_reply==0 && evaluate!=2&& evaluate!=3&& evaluate!=7&& evaluate!=8&& evaluate!=9&& item.refund_num > 0'
|
||||
@click.stop="evaluateTap(item.order_product_id,orderId)">去评价</view>
|
||||
<view class='btn-item on' v-else-if="item.is_reply==1 && evaluate==2">已评价</view>
|
||||
</view>
|
||||
|
@ -4,25 +4,23 @@
|
||||
<view class="bg-img">
|
||||
<img :src="bgColor" alt="">
|
||||
</view>
|
||||
<view class="" style="height: 40rpx;">
|
||||
|
||||
</view>
|
||||
<!-- <view class="site-box flex_a_c_j_sb">
|
||||
|
||||
<view class="site-box flex_a_c_j_sb">
|
||||
|
||||
<view class="place_wrapper flex_a_c" @click="selectLocation">
|
||||
<view class="iconfont icon-weizhi"></view>
|
||||
<view class="town_name">{{street}}</view>
|
||||
</view>
|
||||
|
||||
<navigator url="/pages/chat/customer_list/index?type=0" hover-class="none">
|
||||
<view class="iconfont icon-xiaoxi" style="color:#fff;"></view>
|
||||
</navigator>
|
||||
|
||||
</view> -->
|
||||
</view>
|
||||
<!-- 搜索栏 -->
|
||||
<navigator url="/pages/columnGoods/goods_search/index" hover-class="none" class="search_content flex_a_c_j_sb">
|
||||
<view class="flex_a_c">
|
||||
<view class="iconfont icon-sousuo" style="font-size: 39rpx;"></view>
|
||||
<input type="text" v-model="keyword" placeholder="搜索产品或店铺" placeholder-style="font-size: 30rpx;" disabled>
|
||||
<input type="text" v-model="keyword" placeholder="搜索产品或店铺" placeholder-style="font-size: 30rpx;"
|
||||
disabled>
|
||||
</view>
|
||||
<button class="search_btn">搜索</button>
|
||||
</navigator>
|
||||
@ -33,8 +31,7 @@
|
||||
indicator-active-color="#fff">
|
||||
<block v-for="(item,index) in swiper['url']" :key="index">
|
||||
<swiper-item class="swi_item" @click="swiperClick(item)">
|
||||
<u--image :showLoading="true" :src="item.img" width="724rpx" height="259rpx"
|
||||
mode="aspectFill">
|
||||
<u--image :showLoading="true" :src="item.img" width="724rpx" height="259rpx" mode="aspectFit">
|
||||
</u--image>
|
||||
</swiper-item>
|
||||
</block>
|
||||
@ -73,12 +70,18 @@
|
||||
location_Arr: {
|
||||
type: Object,
|
||||
default: () => ({})
|
||||
}
|
||||
},
|
||||
town: {
|
||||
type: String,
|
||||
default: false
|
||||
},
|
||||
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
defaInd: [0, 0],
|
||||
street: '',
|
||||
|
||||
showPicker: false,
|
||||
styleConfig: [],
|
||||
columnData: [],
|
||||
@ -95,28 +98,29 @@
|
||||
interval: 2000, // 自动切换时间间隔
|
||||
duration: 400 // 滑动动画时长
|
||||
},
|
||||
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
street: {
|
||||
handler(newVal, oldVal) {
|
||||
this.street = newVal
|
||||
},
|
||||
street(nval, val) {
|
||||
this.street = nval
|
||||
}
|
||||
},
|
||||
|
||||
created() {
|
||||
|
||||
|
||||
this.getBanner()
|
||||
this.Area()
|
||||
|
||||
},
|
||||
|
||||
mounted() {
|
||||
this.appLocation()
|
||||
this.$bus.$on('value-updated', (newValue) => {
|
||||
// 更新组件的值
|
||||
this.street = newValue.split(',')[0]
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
methods: {
|
||||
swiperClick(item) {
|
||||
const url = item.info[1].value
|
||||
@ -128,44 +132,20 @@
|
||||
this.isSelectPlace ? this.showPicker = true : ''
|
||||
|
||||
},
|
||||
appLocation() {
|
||||
uni.getLocation({
|
||||
type: 'wgs84',
|
||||
timeout: '10',
|
||||
success: (res) => {
|
||||
// console.log(res)
|
||||
|
||||
let latitude, longitude;
|
||||
latitude = res.latitude.toString();
|
||||
longitude = res.longitude.toString();
|
||||
getGeocoder({
|
||||
lat: latitude,
|
||||
long: longitude
|
||||
}).then(res => {
|
||||
this.street = res.data.address_component.street
|
||||
Cache.set('ADRESS_LOCATION', this.street)
|
||||
}).catch(err => {
|
||||
uni.showToast({
|
||||
title: err,
|
||||
icon: 'none'
|
||||
})
|
||||
})
|
||||
},
|
||||
fail: (err) => {
|
||||
|
||||
uni.showToast({
|
||||
title: "获取定位超时",
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
confirm(e) {
|
||||
this.street = e.value[1].name
|
||||
|
||||
this.showPicker = false
|
||||
this.$emit('selectPlce', e)
|
||||
Cache.set('ADRESS_LOCATION', e.value[1].name)
|
||||
this.$emit('change', e)
|
||||
this.street = e.value[1].name
|
||||
this.$nextTick(() => {
|
||||
this.$bus.$emit('value-updated',e.value[1].name + ',' +e.value[1].code);
|
||||
|
||||
})
|
||||
|
||||
|
||||
|
||||
},
|
||||
changeHandler(e) {
|
||||
const {
|
||||
@ -206,9 +186,11 @@
|
||||
} = e.detail;
|
||||
if (source === 'autoplay' || source === 'touch') {
|
||||
this.bgColor = this.swiper.url[e.detail.current]['img']
|
||||
this.$emit('kkchange',this.bgColor)
|
||||
this.$emit('kkchange', this.bgColor)
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
// 对象转数组
|
||||
objToArr(data) {
|
||||
let obj = Object.keys(data).sort();
|
||||
@ -237,7 +219,7 @@
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
<style lang="scss" scoped>
|
||||
.zbp-head-wrapper {
|
||||
position: relative;
|
||||
padding-top: 78.95rpx;
|
||||
@ -251,7 +233,7 @@
|
||||
transform: translate(-50%, 0);
|
||||
width: 102%;
|
||||
height: 133px;
|
||||
border-radius: 30px 30px 0 0;
|
||||
border-radius: 30px 30px 0 0;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
@ -284,6 +266,8 @@
|
||||
height: 66.67rpx;
|
||||
margin-bottom: 26.32rpx;
|
||||
position: relative;
|
||||
z-index: 9999;
|
||||
|
||||
|
||||
// 位置
|
||||
.place_wrapper {
|
||||
|
@ -9,11 +9,11 @@ let httpApiThree
|
||||
// 网络接口修改此字符 小程序域名要求https
|
||||
// let httpApi = 'http://192.168.31.110:8324' // 测试
|
||||
if (process.env.NODE_ENV === "development") {
|
||||
// httpApi = 'https://shop.lihaink.cn' // 生产
|
||||
httpApi = "https://crmeb-test.shop.lihaink.cn"
|
||||
// httpApi = 'https://shop.lihaink.cn' // 生产
|
||||
httpApi = "https://crmeb-test.shop.lihaink.cn"
|
||||
// httpApi = "http://192.168.0.222"
|
||||
// httpApi = "http://192.168.0.108:8325"
|
||||
// httpApi = 'http://192.168.0.108:8325'
|
||||
// httpApi = "http://192.168.0.108:8325"
|
||||
// httpApi = 'http://192.168.0.108:8325'
|
||||
// #ifdef MP-WEIXIN
|
||||
httpApiTwo = "https://nk.lihaink.cn"
|
||||
httpApiThree = 'http://ceshi-oa.lihaink.cn'
|
||||
|
2
main.js
@ -23,7 +23,7 @@ Vue.prototype.$util = util;
|
||||
Vue.prototype.$Cache = Cache;
|
||||
Vue.prototype.$eventHub = new Vue();
|
||||
Vue.config.productionTip = false
|
||||
|
||||
Vue.prototype.$bus = new Vue();
|
||||
// #ifdef H5
|
||||
import { parseQuery } from "./utils";
|
||||
import Auth from './libs/wechat';
|
||||
|
@ -30,7 +30,8 @@
|
||||
"OAuth" : {},
|
||||
"UniMP" : {
|
||||
"description" : "uni小程序"
|
||||
}
|
||||
},
|
||||
"Maps" : {}
|
||||
},
|
||||
"safearea" : {
|
||||
"bottom" : {
|
||||
@ -94,8 +95,8 @@
|
||||
"sdkConfigs" : {
|
||||
"maps" : {
|
||||
"amap" : {
|
||||
"appkey_ios" : "",
|
||||
"appkey_android" : ""
|
||||
"appkey_ios" : "048d9f3f323eea894b49c3a7edbc8d87",
|
||||
"appkey_android" : "048d9f3f323eea894b49c3a7edbc8d87"
|
||||
}
|
||||
},
|
||||
"payment" : {
|
||||
|
67
pages.json
@ -95,15 +95,14 @@
|
||||
}
|
||||
|
||||
}, {
|
||||
"path" : "pages/moreProject/moreProject",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText": "更多功能",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
|
||||
}
|
||||
],
|
||||
"path": "pages/moreProject/moreProject",
|
||||
"style": {
|
||||
"navigationBarTitleText": "更多功能",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
|
||||
}
|
||||
],
|
||||
"subPackages": [{
|
||||
"root": "pages/goods_cate",
|
||||
"name": "goods_cate",
|
||||
@ -208,6 +207,33 @@
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
|
||||
}, {
|
||||
"path": "supply_chain/supplierA",
|
||||
"style": {
|
||||
"enablePullDownRefresh": true,
|
||||
"navigationBarTitleText": "",
|
||||
"navigationBarBackgroundColor": "#e93323",
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
|
||||
},
|
||||
{
|
||||
"path": "supply_chain/suppliers",
|
||||
"style": {
|
||||
"enablePullDownRefresh": true,
|
||||
"navigationBarTitleText": "",
|
||||
"navigationBarBackgroundColor": "#e93323",
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
|
||||
}, {
|
||||
"path": "supply_chain/maps",
|
||||
"style": {
|
||||
"navigationBarTitleText": "",
|
||||
"navigationBarBackgroundColor": "#e93323",
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
|
||||
}, {
|
||||
"path": "supply_chain/merchant",
|
||||
"style": {
|
||||
@ -244,6 +270,14 @@
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
|
||||
}, {
|
||||
"path": "specialty/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "名优特产",
|
||||
"enablePullDownRefresh": false,
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -713,13 +747,13 @@
|
||||
"root": "pages/releaseManagement",
|
||||
"name": "releaseManagement",
|
||||
"pages": [{
|
||||
"path": "index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "发布管理",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
"path": "index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "发布管理",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
|
||||
},
|
||||
},
|
||||
{
|
||||
"path": "details/index",
|
||||
"style": {
|
||||
@ -727,7 +761,8 @@
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
|
||||
}]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"root": "pages/commissionedSales",
|
||||
|
@ -77,6 +77,7 @@
|
||||
<view v-else class='list'>
|
||||
<WaterfallsFlow :wfList='productList' @itemTap="godDetail" :type="1" @goShop="goShop"/>
|
||||
</view>
|
||||
|
||||
<view class='noCommodity' v-if="productList.length==0 && where.page > 1">
|
||||
<view class='pictrue' style="margin: 60rpx auto;">
|
||||
<image src='/static/images/noCart.png'></image>
|
||||
|
@ -559,9 +559,10 @@
|
||||
limit: this.sotreParam.limit,
|
||||
order: this.sotreParam.order,
|
||||
category_id: this.sotreParam.category_id,
|
||||
type_id: 10
|
||||
type_id: this.sotreParam.type_id
|
||||
|
||||
}
|
||||
console.log(this.sotreParam.category_id)
|
||||
if (this.latitude) {
|
||||
serachData.location = this.latitude + ',' + this.longitude
|
||||
}
|
||||
@ -576,7 +577,7 @@
|
||||
this.storeList = this.storeList.concat(res.data.list)
|
||||
this.count = res.data.count
|
||||
this.loading = false
|
||||
console.log(this.storeList);
|
||||
|
||||
})
|
||||
},
|
||||
// 店铺排序
|
||||
@ -682,6 +683,7 @@
|
||||
},
|
||||
// 组件确定
|
||||
confirm2(data) {
|
||||
|
||||
let arr1 = [],
|
||||
arr2 = []
|
||||
if (data.storeTypeArr.length == 0) {
|
||||
|
@ -1,364 +1,377 @@
|
||||
<template>
|
||||
<view class="Circle_friends">
|
||||
<view class="circle_friends_wrapper">
|
||||
<view class="Circle_friends">
|
||||
<view class="circle_friends_wrapper">
|
||||
|
||||
<zbpSwiper></zbpSwiper>
|
||||
<zbpSwiper></zbpSwiper>
|
||||
|
||||
<view class="tabs_wrapper">
|
||||
<u-tabs :list="tabsData.list" @click="tabsChange" lineColor="#F84221" keyName="cate_name"></u-tabs>
|
||||
</view>
|
||||
<view class="tabs_wrapper">
|
||||
<u-tabs :list="tabsData.list" @click="tabsChange" lineColor="#F84221" keyName="cate_name"></u-tabs>
|
||||
</view>
|
||||
|
||||
<view class="goods">
|
||||
<block v-for="(item,index) in cateGoods" :key="index">
|
||||
<view class="goods_item" @click="gogogo(item)">
|
||||
<image class="goods_img" :src="item.image[0]" mode="aspectFill"></image>
|
||||
<view class="botm">
|
||||
<view class="title">{{item.title}}</view>
|
||||
<view class="goods_info flex_a_c">
|
||||
<view class="l_info flex_a_c">
|
||||
<image :src="(item.author && item.author.avatar) || '/static/images/f.png'" mode="aspectFill"
|
||||
class="g_img"></image>
|
||||
<view class="g_name">{{item.author && item.author.nickname}}</view>
|
||||
</view>
|
||||
<view class="nice_box" @click.stop="giveStart(item)">
|
||||
<text class="iconfont" :class="item.relevance_id ? 'icon-shoucang1' : 'icon-dianzan'"></text>
|
||||
<text class="collect">{{item.count_start}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
<view class="empty_wrapper" v-if="emptyShow">
|
||||
<u-empty :show="emptyShow" mode="list" icon="http://cdn.uviewui.com/uview/empty/list.png"></u-empty>
|
||||
</view>
|
||||
</view>
|
||||
<view class="goods">
|
||||
<block v-for="(item,index) in cateGoods" :key="index">
|
||||
<view class="goods_item" @click="gogogo(item)">
|
||||
<image class="goods_img" :src="item.image[0]" mode="aspectFit"></image>
|
||||
<view class="botm">
|
||||
<view class="title">{{item.title}}</view>
|
||||
<view class="goods_info flex_a_c">
|
||||
<view class="l_info flex_a_c">
|
||||
<image :src="(item.author && item.author.avatar) || '/static/images/f.png'"
|
||||
mode="aspectFit" class="g_img"></image>
|
||||
<view class="g_name">{{item.author && item.author.nickname}}</view>
|
||||
</view>
|
||||
<view class="nice_box" @click.stop="giveStart(item)">
|
||||
<text class="iconfont"
|
||||
:class="item.relevance_id ? 'icon-shoucang1' : 'icon-dianzan'"></text>
|
||||
<text class="collect">{{item.count_start}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
<view class="empty_wrapper" v-if="emptyShow">
|
||||
<u-empty :show="emptyShow" mode="list" icon="http://cdn.uviewui.com/uview/empty/list.png"></u-empty>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<u-picker :defaultIndex="[0,0]" :show="showPicker" ref="uPicker" :columns="columnData" @confirm="confirm"
|
||||
@cancel="showPicker = false" @change="changeHandler" keyName="name"></u-picker>
|
||||
<u-picker :defaultIndex="[0,0]" :show="showPicker" ref="uPicker" :columns="columnData" @confirm="confirm"
|
||||
@cancel="showPicker = false" @change="changeHandler" keyName="name"></u-picker>
|
||||
|
||||
<!-- <view class="bg_color"></view> -->
|
||||
<!-- <view class="bg_color"></view> -->
|
||||
|
||||
<!-- <m-tabbar native>
|
||||
<!-- <m-tabbar native>
|
||||
<template v-slot:tabbar_index_2>
|
||||
<view class="custom_style">
|
||||
<view class="custom_style_icon"></view>
|
||||
</view>
|
||||
</template>
|
||||
</m-tabbar> -->
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import mTabbar from '@/components/m-tabbar/m-tabbar.vue'
|
||||
import zbpSwiper from '@/components/zbpSwiper'
|
||||
import { getSlideAPI } from '@/api/lihai.js'
|
||||
import { graphicLstApi, getTopicList, graphicStartApi } from '@/api/community.js'
|
||||
import { getIndexData, getDiy } from '@/api/api.js'
|
||||
import { getGeocoder, merClassifly } from '@/api/store.js';
|
||||
import { getArea, getStreet } from '@/api/article.js';
|
||||
import { Toast } from '@/libs/uniApi'
|
||||
export default {
|
||||
components: {
|
||||
mTabbar,
|
||||
zbpSwiper
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
bgColor: '',
|
||||
showPicker: false,
|
||||
columnData: [],
|
||||
show: false,
|
||||
swiper: {
|
||||
url: [{
|
||||
img: ''
|
||||
}],
|
||||
indicatorDots: true, // 显示面板指示点
|
||||
vertical: false, // 滑动方向是否为纵向
|
||||
autoplay: true, // 是否自动切换
|
||||
interval: 2000, // 自动切换时间间隔
|
||||
duration: 500 // 滑动动画时长
|
||||
},
|
||||
tabsData: {
|
||||
list: [],
|
||||
tabsActive: 0
|
||||
},
|
||||
where: {
|
||||
category_id: 0,
|
||||
page: 1,
|
||||
limit: 30
|
||||
},
|
||||
currentItemId: 69, // 默认获取 社区的数据 0 表示推荐 || 69 社区
|
||||
keyword: '',
|
||||
location: '',
|
||||
emptyShow: false,
|
||||
street: '',
|
||||
cateGoods: []
|
||||
}
|
||||
},
|
||||
onPullDownRefresh() {
|
||||
this.getCateList()
|
||||
this.getGoods()
|
||||
this.selfLocation()
|
||||
this.Area()
|
||||
uni.stopPullDownRefresh()
|
||||
},
|
||||
onLoad() {
|
||||
this.getCateList()
|
||||
this.getGoods()
|
||||
this.selfLocation()
|
||||
this.Area()
|
||||
},
|
||||
onShow() {},
|
||||
methods: {
|
||||
confirm(e) {
|
||||
this.where.street_id = e.value[1].code
|
||||
this.showPicker = false
|
||||
},
|
||||
changeHandler(e) {
|
||||
const {
|
||||
columnIndex,
|
||||
value,
|
||||
values,
|
||||
index,
|
||||
picker = this.$refs.uPicker
|
||||
} = e;
|
||||
if (columnIndex === 0) {
|
||||
getStreet({
|
||||
area_code: value[0]['code']
|
||||
}).then(res => {
|
||||
this.$refs.uPicker.setColumnValues(1, res.data);
|
||||
});
|
||||
}
|
||||
},
|
||||
Area() {
|
||||
getArea({
|
||||
city_code: 510500
|
||||
}).then(res => {
|
||||
this.$refs.uPicker.setColumnValues(0, res.data);
|
||||
this.Street(res.data[0]['code']);
|
||||
});
|
||||
},
|
||||
Street(code) {
|
||||
getStreet({
|
||||
area_code: code
|
||||
}).then(res => {
|
||||
this.$refs.uPicker.setColumnValues(1, res.data);
|
||||
});
|
||||
},
|
||||
gogogo(item) {
|
||||
if (this.tabsData.tabsActive == 1) {
|
||||
uni.navigateTo({
|
||||
//#ifdef APP
|
||||
url: '/pages/short_video/appSwiper/index?id=' + item.community_id
|
||||
//#endif
|
||||
//#ifndef APP
|
||||
url: '/pages/short_video/nvueSwiper/index?id=' + item.community_id
|
||||
//#endif
|
||||
})
|
||||
} else {
|
||||
uni.navigateTo({
|
||||
url: '/pages/plantGrass/plant_detail/index?id=' + item.community_id
|
||||
})
|
||||
}
|
||||
},
|
||||
giveStart(item) {
|
||||
let status = item.relevance_id ? 0 : 1
|
||||
graphicStartApi(item.community_id, {
|
||||
status: status
|
||||
}).then(res => {
|
||||
Toast(res.message)
|
||||
this.getGoods()
|
||||
})
|
||||
},
|
||||
dianji() {
|
||||
this.show = !this.show
|
||||
},
|
||||
// 获取发现商品
|
||||
getGoods: function() {
|
||||
// 数据写死:默认社区数据 category_id=69&page=1&limit=30
|
||||
graphicLstApi(this.where).then(res => {
|
||||
this.cateGoods = res.data.list
|
||||
res.data.list.length <= 0 ? this.emptyShow = true : this.emptyShow = false
|
||||
})
|
||||
},
|
||||
/*获取分类列表*/
|
||||
async getCateList() {
|
||||
const {
|
||||
data
|
||||
} = await getTopicList()
|
||||
this.tabsData.list = [{
|
||||
cate_name: "推荐",
|
||||
category_id: 0
|
||||
}, {
|
||||
cate_name: "视频",
|
||||
category_id: -1,
|
||||
children: []
|
||||
}, ...data]
|
||||
},
|
||||
tabsChange(item) {
|
||||
this.where.category_id = item.category_id
|
||||
this.getGoods()
|
||||
this.street_id = item.id
|
||||
this.tabsData.tabsActive = item.index
|
||||
if (item.index == 1) {
|
||||
uni.navigateTo({
|
||||
// #ifdef MP || H5
|
||||
url: '/pages/short_video/nvueSwiper/index?id=' + this.cateGoods[0].community_id
|
||||
// #endif
|
||||
// #ifdef APP
|
||||
url: `/pages/short_video/appSwiper/index?id=${this.cateGoods[0].community_id}`
|
||||
// #endif
|
||||
})
|
||||
}
|
||||
},
|
||||
selfLocation() {
|
||||
uni.getLocation({
|
||||
type: 'gcj02',
|
||||
success: (res) => {
|
||||
let latitude, longitude;
|
||||
latitude = res.latitude.toString();
|
||||
longitude = res.longitude.toString();
|
||||
getGeocoder({ lat: latitude, long: longitude }).then(res => {
|
||||
this.$store.commit('setLocation', res.data)
|
||||
this.street = res.data.address_component.street
|
||||
}).catch(err => {
|
||||
uni.showToast({
|
||||
title: err,
|
||||
icon: 'none'
|
||||
})
|
||||
})
|
||||
},
|
||||
fail: (err) => {
|
||||
uni.showToast({
|
||||
title: err.errMsg,
|
||||
icon: 'none',
|
||||
duration: 1000
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
}
|
||||
}
|
||||
import mTabbar from '@/components/m-tabbar/m-tabbar.vue'
|
||||
import zbpSwiper from '@/components/zbpSwiper'
|
||||
import {
|
||||
getSlideAPI
|
||||
} from '@/api/lihai.js'
|
||||
import {
|
||||
graphicLstApi,
|
||||
getTopicList,
|
||||
graphicStartApi
|
||||
} from '@/api/community.js'
|
||||
import {
|
||||
getIndexData,
|
||||
getDiy
|
||||
} from '@/api/api.js'
|
||||
import {
|
||||
getGeocoder,
|
||||
merClassifly
|
||||
} from '@/api/store.js';
|
||||
import {
|
||||
getArea,
|
||||
getStreet
|
||||
} from '@/api/article.js';
|
||||
import {
|
||||
Toast
|
||||
} from '@/libs/uniApi'
|
||||
export default {
|
||||
components: {
|
||||
mTabbar,
|
||||
zbpSwiper
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
bgColor: '',
|
||||
showPicker: false,
|
||||
columnData: [],
|
||||
show: false,
|
||||
swiper: {
|
||||
url: [{
|
||||
img: ''
|
||||
}],
|
||||
indicatorDots: true, // 显示面板指示点
|
||||
vertical: false, // 滑动方向是否为纵向
|
||||
autoplay: true, // 是否自动切换
|
||||
interval: 2000, // 自动切换时间间隔
|
||||
duration: 500 // 滑动动画时长
|
||||
},
|
||||
tabsData: {
|
||||
list: [],
|
||||
tabsActive: 0
|
||||
},
|
||||
where: {
|
||||
category_id: 0,
|
||||
page: 1,
|
||||
limit: 30
|
||||
},
|
||||
currentItemId: 69, // 默认获取 社区的数据 0 表示推荐 || 69 社区
|
||||
keyword: '',
|
||||
location: '',
|
||||
emptyShow: false,
|
||||
street: '',
|
||||
cateGoods: []
|
||||
}
|
||||
},
|
||||
onPullDownRefresh() {
|
||||
this.getCateList()
|
||||
this.getGoods()
|
||||
this.selfLocation()
|
||||
this.Area()
|
||||
uni.stopPullDownRefresh()
|
||||
},
|
||||
onLoad() {
|
||||
this.getCateList()
|
||||
this.getGoods()
|
||||
this.selfLocation()
|
||||
this.Area()
|
||||
},
|
||||
onShow() {},
|
||||
methods: {
|
||||
confirm(e) {
|
||||
this.where.street_id = e.value[1].code
|
||||
this.showPicker = false
|
||||
},
|
||||
|
||||
changeHandler(e) {
|
||||
const {
|
||||
columnIndex,
|
||||
value,
|
||||
values,
|
||||
index,
|
||||
picker = this.$refs.uPicker
|
||||
} = e;
|
||||
if (columnIndex === 0) {
|
||||
getStreet({
|
||||
area_code: value[0]['code']
|
||||
}).then(res => {
|
||||
this.$refs.uPicker.setColumnValues(1, res.data);
|
||||
});
|
||||
}
|
||||
},
|
||||
Area() {
|
||||
getArea({
|
||||
city_code: 510500
|
||||
}).then(res => {
|
||||
this.$refs.uPicker.setColumnValues(0, res.data);
|
||||
this.Street(res.data[0]['code']);
|
||||
});
|
||||
},
|
||||
Street(code) {
|
||||
getStreet({
|
||||
area_code: code
|
||||
}).then(res => {
|
||||
this.$refs.uPicker.setColumnValues(1, res.data);
|
||||
});
|
||||
},
|
||||
gogogo(item) {
|
||||
if (this.tabsData.tabsActive == 1) {
|
||||
uni.navigateTo({
|
||||
url: `/pages/short_video/appSwiper/index?id=${this.cateGoods[0].community_id}`
|
||||
})
|
||||
|
||||
} else {
|
||||
uni.navigateTo({
|
||||
url: '/pages/plantGrass/plant_detail/index?id=' + item.community_id
|
||||
})
|
||||
}
|
||||
},
|
||||
giveStart(item) {
|
||||
let status = item.relevance_id ? 0 : 1
|
||||
graphicStartApi(item.community_id, {
|
||||
status: status
|
||||
}).then(res => {
|
||||
Toast(res.message)
|
||||
this.getGoods()
|
||||
})
|
||||
},
|
||||
dianji() {
|
||||
this.show = !this.show
|
||||
},
|
||||
// 获取发现商品
|
||||
getGoods: function() {
|
||||
// 数据写死:默认社区数据 category_id=69&page=1&limit=30
|
||||
graphicLstApi(this.where).then(res => {
|
||||
this.cateGoods = res.data.list
|
||||
res.data.list.length <= 0 ? this.emptyShow = true : this.emptyShow = false
|
||||
})
|
||||
},
|
||||
/*获取分类列表*/
|
||||
async getCateList() {
|
||||
const {
|
||||
data
|
||||
} = await getTopicList()
|
||||
this.tabsData.list = [{
|
||||
cate_name: "推荐",
|
||||
category_id: 0
|
||||
}, {
|
||||
cate_name: "视频",
|
||||
category_id: -1,
|
||||
children: []
|
||||
}, ...data]
|
||||
},
|
||||
tabsChange(item) {
|
||||
this.where.category_id = item.category_id
|
||||
this.getGoods()
|
||||
this.street_id = item.id
|
||||
this.tabsData.tabsActive = item.index
|
||||
if (item.index == 1) {
|
||||
uni.navigateTo({
|
||||
url: `/pages/short_video/appSwiper/index?id=${this.cateGoods[0].community_id}`
|
||||
})
|
||||
}
|
||||
},
|
||||
selfLocation() {
|
||||
uni.getLocation({
|
||||
type: 'gcj02',
|
||||
success: (res) => {
|
||||
let latitude, longitude;
|
||||
latitude = res.latitude.toString();
|
||||
longitude = res.longitude.toString();
|
||||
getGeocoder({
|
||||
lat: latitude,
|
||||
long: longitude
|
||||
}).then(res => {
|
||||
this.$store.commit('setLocation', res.data)
|
||||
this.street = res.data.address_component.street
|
||||
}).catch(err => {
|
||||
uni.showToast({
|
||||
title: err,
|
||||
icon: 'none'
|
||||
})
|
||||
})
|
||||
},
|
||||
fail: (err) => {
|
||||
uni.showToast({
|
||||
title: err.errMsg,
|
||||
icon: 'none',
|
||||
duration: 1000
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
page {
|
||||
// background: linear-gradient(180deg, #FFFFFF 0%, #F6F6F6 100%);
|
||||
}
|
||||
page {
|
||||
// background: linear-gradient(180deg, #FFFFFF 0%, #F6F6F6 100%);
|
||||
}
|
||||
|
||||
.Circle_friends {
|
||||
position: relative;
|
||||
padding: 0 0 87.72rpx 0;
|
||||
background: linear-gradient(180deg, #FFFFFF 0%, #F6F6F6 100%);
|
||||
}
|
||||
.Circle_friends {
|
||||
position: relative;
|
||||
padding: 0 0 87.72rpx 0;
|
||||
background: linear-gradient(180deg, #FFFFFF 0%, #F6F6F6 100%);
|
||||
}
|
||||
|
||||
.circle_friends_wrapper {
|
||||
position: relative;
|
||||
z-index: 2;
|
||||
}
|
||||
.circle_friends_wrapper {
|
||||
position: relative;
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
|
||||
.search_wrapper {
|
||||
width: 694.74rpx;
|
||||
margin: 0 auto;
|
||||
}
|
||||
.search_wrapper {
|
||||
width: 694.74rpx;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.tabs_wrapper {
|
||||
width: 694.74rpx;
|
||||
margin: 0 auto;
|
||||
margin-bottom: 21.05rpx;
|
||||
}
|
||||
.tabs_wrapper {
|
||||
width: 694.74rpx;
|
||||
margin: 0 auto;
|
||||
margin-bottom: 21.05rpx;
|
||||
}
|
||||
|
||||
.empty_wrapper {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
.empty_wrapper {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.goods {
|
||||
margin: 0 auto;
|
||||
width: 694.74rpx;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: space-between;
|
||||
.goods {
|
||||
margin: 0 auto;
|
||||
width: 694.74rpx;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: space-between;
|
||||
|
||||
.goods_item {
|
||||
width: 342.11rpx;
|
||||
height: 491.23rpx;
|
||||
border-radius: 8px;
|
||||
overflow: hidden;
|
||||
background-color: #fff;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
margin-bottom: 10.53rpx;
|
||||
.goods_item {
|
||||
width: 342.11rpx;
|
||||
height: 491.23rpx;
|
||||
border-radius: 8px;
|
||||
overflow: hidden;
|
||||
background-color: #fff;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
margin-bottom: 10.53rpx;
|
||||
|
||||
.goods_img {
|
||||
width: 100%;
|
||||
height: 294.74rpx;
|
||||
}
|
||||
.goods_img {
|
||||
width: 100%;
|
||||
height: 294.74rpx;
|
||||
}
|
||||
|
||||
.botm {
|
||||
flex: 1;
|
||||
padding: 0 14.04rpx;
|
||||
padding-bottom: 21.05rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
.botm {
|
||||
flex: 1;
|
||||
padding: 0 14.04rpx;
|
||||
padding-bottom: 21.05rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
|
||||
.title {
|
||||
margin: 12px 0;
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 2;
|
||||
-webkit-box-orient: vertical;
|
||||
}
|
||||
.title {
|
||||
margin: 12px 0;
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 2;
|
||||
-webkit-box-orient: vertical;
|
||||
}
|
||||
|
||||
.goods_info {
|
||||
justify-content: space-between;
|
||||
.goods_info {
|
||||
justify-content: space-between;
|
||||
|
||||
.g_img {
|
||||
width: 60rpx;
|
||||
height: 60rpx;
|
||||
border-radius: 50%;
|
||||
}
|
||||
.g_img {
|
||||
width: 60rpx;
|
||||
height: 60rpx;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.g_name {
|
||||
margin-left: 8.77rpx;
|
||||
width: 100.63rpx;
|
||||
text-overflow: ellipsis;
|
||||
/* 溢出显示省略号 */
|
||||
overflow: hidden;
|
||||
/* 溢出隐藏 */
|
||||
white-space: nowrap;
|
||||
/* 强制不换行 */
|
||||
}
|
||||
.g_name {
|
||||
margin-left: 8.77rpx;
|
||||
width: 100.63rpx;
|
||||
text-overflow: ellipsis;
|
||||
/* 溢出显示省略号 */
|
||||
overflow: hidden;
|
||||
/* 溢出隐藏 */
|
||||
white-space: nowrap;
|
||||
/* 强制不换行 */
|
||||
}
|
||||
|
||||
.nice_box {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
.nice_box {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.isshow {
|
||||
color: #FE3530 !important;
|
||||
}
|
||||
.isshow {
|
||||
color: #FE3530 !important;
|
||||
}
|
||||
|
||||
.iconfont {
|
||||
font-size: 30rpx;
|
||||
}
|
||||
.iconfont {
|
||||
font-size: 30rpx;
|
||||
}
|
||||
|
||||
.icon-shoucang1 {
|
||||
color: #F84221;
|
||||
}
|
||||
.icon-shoucang1 {
|
||||
color: #F84221;
|
||||
}
|
||||
|
||||
.collect {
|
||||
font-size: 24rpx;
|
||||
margin-left: 5rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.collect {
|
||||
font-size: 24rpx;
|
||||
margin-left: 5rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
@ -28,7 +28,7 @@
|
||||
</view>
|
||||
<view class="advertItem02 advertItem05 acea-row" v-if="style==4">
|
||||
<view class="item" v-for="(item,index) in picList" :key="index" @click="goDetail(item)">
|
||||
<image :src="item.image" mode="aspectFill" :style="'height:'+ imageH +'rpx;'"></image>
|
||||
<image :src="item.image" mode="aspectFit" :style="'height:'+ imageH +'rpx;'"></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="advertItem02 advertItem06 acea-row" v-if="style==5">
|
||||
|
@ -1,36 +1,79 @@
|
||||
<template>
|
||||
<view class="Circle_friends">
|
||||
<view class="circle_friends_wrapper">
|
||||
<view v-if="isFshow">
|
||||
<view class="site-box flex_a_c_j_sb" :style="{'background-color':backColor}">
|
||||
|
||||
<view class="site-box flex_a_c_j_sb">
|
||||
<view class="place_wrapper flex_a_c" >
|
||||
<view class="iconfont icon-weizhi" style="margin-left: 20rpx;"></view>
|
||||
<view class="town_name">{{street}}</view>
|
||||
<view :class="['place_wrapper','flex_a_c',isFshow?'sitebox':'']" @click="selectLocation">
|
||||
<view :class="['iconfont','icon-weizhi',isFshow?'sitebox':'']" style="margin-left: 20rpx;">
|
||||
</view>
|
||||
<view class="town_name">{{street}}</view>
|
||||
</view>
|
||||
<navigator url="/pages/chat/customer_list/index?type=0" hover-class="none">
|
||||
<view :class="['iconfont','icon-xiaoxi',isFshow?'sitebox':'']" style="color:#fff;"></view>
|
||||
</navigator>
|
||||
</view>
|
||||
<!-- <view class="site-box ','flex_a_c_j_sb'" v-if="ishshow">
|
||||
<view class="bg-img">
|
||||
<img :src="bgColor" alt="">
|
||||
</view>
|
||||
</view> -->
|
||||
|
||||
<navigator url="/pages/chat/customer_list/index?type=0" hover-class="none">
|
||||
<view class="iconfont icon-xiaoxi" style="color:#fff;"></view>
|
||||
</navigator>
|
||||
<view class="bg-img" v-if="isFshow">
|
||||
<img :src="bgColor" alt="">
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
<zbpSwiper :isSelectPlace="true" :location_Arr="locationArr" @kkchange='kkchange'></zbpSwiper>
|
||||
<zbpSwiper ref='list' :isSelectPlace="true" :town='street' :show='show' :location_Arr="locationArr" @kkchange='kkchange'
|
||||
@change='dchange'>
|
||||
</zbpSwiper>
|
||||
|
||||
|
||||
|
||||
<view class="tabs_wrapper">
|
||||
<u-tabs :list="tabsData.list" @click="tabsChange" lineColor="#F84221" keyName="cate_name"
|
||||
:activeStyle="activeStyle" itemStyle="padding-left: 0px; height: 33px;"></u-tabs>
|
||||
:activeStyle="activeStyle" itemStyle="padding-left: 0px; height: 33px;"></u-tabs>
|
||||
</view>
|
||||
<view class="">
|
||||
|
||||
</view>
|
||||
<view class="goodslist">
|
||||
<view class="goods">
|
||||
<view v-for="(item,index) in cateGoods" :key="index" v-if='index%2!=0'>
|
||||
<WaterfallsFlow :wfList='cateGoods' />
|
||||
|
||||
<!-- <view class="goods">
|
||||
<view v-for="(item,index) in cateGoods" :key="index">
|
||||
|
||||
<view :class="[index%2==0?'goods_item':'goods_items']" @click="gogogo(item)">
|
||||
<view class="kk" v-if="index%2==0">
|
||||
|
||||
<image :src="item.image[0]" mode="aspectFit" style="width:'365rpx';height:251rpx">
|
||||
</image>
|
||||
</view>
|
||||
<view style="width:'365rpx';height:336rpx" v-else>
|
||||
<image :src="item.image[0]" mode="aspectFit" style="width:'365rpx';height:336rpx">
|
||||
</image>
|
||||
</view>
|
||||
<view class="goods_item_img" v-if="item.video_link.length>0">
|
||||
<image src="@/static/images/sp.png" mode="aspectFit"></image>
|
||||
</view>
|
||||
<view class="botm">
|
||||
<view class="title">{{item.title}}</view>
|
||||
<view class="goods_info flex_a_c">
|
||||
<view class="l_info flex_a_c">
|
||||
<image :src="(item.author && item.author.avatar) || '/static/images/f.png'"
|
||||
mode="aspectFit" class="g_img"></image>
|
||||
<view class="g_name">{{item.author && item.author.nickname}}</view>
|
||||
</view>
|
||||
<view class="nice_box" @click.stop="giveStart(item)">
|
||||
<text class="iconfont"
|
||||
:class="item.relevance_id ? 'icon-shoucang1' : 'icon-dianzan'"></text>
|
||||
<text class="collect">{{item.count_start}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view> -->
|
||||
<!--<view class="goods">
|
||||
<view v-for="(item,i) in cateGoods" :key="i" v-if='i%2!=0'>
|
||||
<view class="goods_item" @click="gogogo(item)">
|
||||
<view style="height: 251rpx;">
|
||||
<u--image :src="item.image[0]" width="356rpx" height="251rpx" :showLoading="true"
|
||||
@ -42,48 +85,14 @@
|
||||
</view>
|
||||
|
||||
<view class="goods_item_img" v-if="item.video_link.length>0">
|
||||
<image src="@/static/images/sp.png" mode="aspectFill"></image>
|
||||
<image src="@/static/images/sp.png" mode="aspectFit"></image>
|
||||
</view>
|
||||
<view class="botm">
|
||||
<view class="title">{{item.title}}</view>
|
||||
<view class="goods_info flex_a_c">
|
||||
<view class="l_info flex_a_c">
|
||||
<image :src="(item.author && item.author.avatar) || '/static/images/f.png'"
|
||||
mode="aspectFill" class="g_img"></image>
|
||||
<view class="g_name">{{item.author && item.author.nickname}}</view>
|
||||
</view>
|
||||
<view class="nice_box" @click.stop="giveStart(item)">
|
||||
<text class="iconfont"
|
||||
:class="item.relevance_id ? 'icon-shoucang1' : 'icon-dianzan'"></text>
|
||||
<text class="collect">{{item.count_start}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="goods">
|
||||
<view v-for="(item,index) in cateGoods" :key="index" v-if='index%2==0'>
|
||||
<view class="goods_items" @click="gogogo(item)">
|
||||
|
||||
<view style="height: 336rpx;">
|
||||
<u--image :src="item.image[0]" width="356rpx" height="336rpx" :showLoading="true"
|
||||
lazyLoad fade duration="450">
|
||||
<template v-slot:loading>
|
||||
<u-loading-icon color="#f5f5f5"></u-loading-icon>
|
||||
</template>
|
||||
</u--image>
|
||||
</view>
|
||||
|
||||
<view class="goods_item_img" v-if="item.video_link.length>0">
|
||||
<image src="@/static/images/sp.png" mode="aspectFill"></image>
|
||||
</view>
|
||||
<view class="botm">
|
||||
<view class="title">{{item.title}}</view>
|
||||
<view class="goods_info flex_a_c">
|
||||
<view class="l_info flex_a_c">
|
||||
<image :src="(item.author && item.author.avatar) || '/static/images/f.png'"
|
||||
mode="aspectFill" class="g_img"></image>
|
||||
mode="aspectFit" class="g_img"></image>
|
||||
<view class="g_name">{{item.author && item.author.nickname}}</view>
|
||||
</view>
|
||||
<view class="nice_box" @click.stop="giveStart(item)">
|
||||
@ -96,6 +105,7 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
-->
|
||||
|
||||
|
||||
|
||||
@ -132,6 +142,7 @@
|
||||
import mTabbar from '@/components/m-tabbar/m-tabbar.vue'
|
||||
import zbpSwiper from '@/components/zbpSwiper'
|
||||
import easyLoadimage from '@/components/easy-loadimage/easy-loadimage.vue';
|
||||
import WaterfallsFlow from '@/components/WaterfallsFlow/WaterfallsFlows.vue'
|
||||
|
||||
import {
|
||||
getSlideAPI
|
||||
@ -162,7 +173,8 @@
|
||||
components: {
|
||||
mTabbar,
|
||||
zbpSwiper,
|
||||
easyLoadimage
|
||||
easyLoadimage,
|
||||
WaterfallsFlow
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@ -190,7 +202,7 @@
|
||||
where: {
|
||||
category_id: 0,
|
||||
page: 1,
|
||||
limit: 15
|
||||
limit: 6
|
||||
},
|
||||
currentItemId: 69, // 默认获取 社区的数据 0 表示推荐 || 69 社区
|
||||
keyword: '',
|
||||
@ -203,23 +215,28 @@
|
||||
streeta_id: '',
|
||||
street: '',
|
||||
bgColor: '',
|
||||
backColor: 'rgba(248, 66, 33, 0)',
|
||||
isFshow: false,
|
||||
scrollTop: 0,
|
||||
show: true
|
||||
}
|
||||
},
|
||||
|
||||
onPullDownRefresh() {
|
||||
this.getCateList()
|
||||
this.cateGoods = []
|
||||
this.getGoods()
|
||||
this.selfLocation()
|
||||
|
||||
this.Area()
|
||||
uni.stopPullDownRefresh()
|
||||
},
|
||||
|
||||
onLoad() {
|
||||
|
||||
this.getCateList()
|
||||
this.getArticle()
|
||||
this.getGoods()
|
||||
this.selfLocation()
|
||||
|
||||
this.Area()
|
||||
this.setPermissions()
|
||||
|
||||
@ -236,36 +253,54 @@
|
||||
})
|
||||
|
||||
},
|
||||
onShow() {},
|
||||
|
||||
onReachBottom() {
|
||||
if (this.status == 'nomore') return;
|
||||
this.status = 'loading';
|
||||
|
||||
this.where.page = ++this.where.page;
|
||||
this.getGoods()
|
||||
},
|
||||
mounted() {
|
||||
this.selfLocation()
|
||||
// #ifdef H5
|
||||
|
||||
// #endif
|
||||
// 监听页面滚动事件
|
||||
window.addEventListener("scroll", this.scrolling);
|
||||
// #endif
|
||||
|
||||
this.$bus.$on('value-updated', (newValue) => {
|
||||
// 更新父组件的值
|
||||
this.street = newValue.split(',')[0]
|
||||
|
||||
});
|
||||
},
|
||||
// #ifdef APP-PLUS
|
||||
onPageScroll(e) {
|
||||
// this.scrollTop = e.scrollTop;
|
||||
console.log(e.scrollTop)
|
||||
if(e.scrollTop>0){
|
||||
this.isFshow=true
|
||||
}else{
|
||||
this.isFshow=false
|
||||
|
||||
const scrollTop = e.scrollTop;
|
||||
|
||||
// 导航条颜色透明渐变
|
||||
|
||||
if (scrollTop <= 20) {
|
||||
this.backColor = 'rgba(248, 66, 33, 0)'
|
||||
this.isFshow = false
|
||||
this.show = true
|
||||
} else if (20 < scrollTop && scrollTop <= 100) {
|
||||
this.backColor = 'rgba(248, 66, 33, .5)'
|
||||
this.isFshow = true
|
||||
this.show = false
|
||||
} else if (scrollTop > 100) {
|
||||
this.backColor = 'rgba(248, 66, 33, 1)'
|
||||
this.isFshow = true
|
||||
this.show = false
|
||||
}
|
||||
|
||||
|
||||
|
||||
},
|
||||
// #endif
|
||||
|
||||
|
||||
methods: {
|
||||
|
||||
|
||||
scrolling() {
|
||||
// 滚动条距文档顶部的距离
|
||||
let scrollTop =
|
||||
@ -274,7 +309,7 @@
|
||||
document.body.scrollTop;
|
||||
// 滚动条滚动的距离
|
||||
let scrollStep = scrollTop - this.oldScrollTop;
|
||||
console.log("header 滚动距离 ", scrollTop);
|
||||
// console.log("header 滚动距离 ", scrollTop);
|
||||
// 更新——滚动前,滚动条距文档顶部的距离
|
||||
this.oldScrollTop = scrollTop;
|
||||
|
||||
@ -288,20 +323,23 @@
|
||||
//滚动条到底部的条件
|
||||
if (scrollTop + windowHeight == scrollHeight) {
|
||||
//你想做的事情
|
||||
console.log("header 你已经到底部了");
|
||||
// console.log("header 你已经到底部了");
|
||||
}
|
||||
if (scrollStep < 0) {
|
||||
|
||||
if (scrollTop <= 20) {
|
||||
this.backColor = 'rgba(248, 66, 33, 0)'
|
||||
this.isFshow = false
|
||||
console.log("header 滚动条向上滚动了!");
|
||||
} else {
|
||||
} else if (20 < scrollTop && scrollTop <= 100) {
|
||||
this.backColor = 'rgba(248, 66, 33, .5)'
|
||||
this.isFshow = true
|
||||
console.log("header 滚动条向下滚动了!");
|
||||
}
|
||||
// 判断是否到了最顶部
|
||||
if (scrollTop <= 0) {
|
||||
this.isFshow = false
|
||||
console.log("header 到了最顶部")
|
||||
} else if (scrollTop > 100) {
|
||||
this.backColor = 'rgba(248, 66, 33, 1)'
|
||||
this.isFshow = true
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
|
||||
kkchange(e) {
|
||||
@ -357,8 +395,17 @@
|
||||
res.data.length > 0 ? this.isYunCang = 1 : this.isYunCang = 0
|
||||
})
|
||||
},
|
||||
selectLocation() {
|
||||
this.showPicker = true
|
||||
},
|
||||
confirm(e) {
|
||||
this.where.street_id = e.value[1].code
|
||||
|
||||
this.street = e.value[1].name
|
||||
|
||||
this.$nextTick(() => {
|
||||
this.$bus.$emit('value-updated',e.value[1].name + ',' +e.value[1].code);
|
||||
|
||||
})
|
||||
this.showPicker = false
|
||||
},
|
||||
changeHandler(e) {
|
||||
@ -392,9 +439,13 @@
|
||||
this.$refs.uPicker.setColumnValues(1, res.data);
|
||||
});
|
||||
},
|
||||
dchange(e) {
|
||||
|
||||
this.$refs.list.street = e.value[1].name
|
||||
this.street = e.value[1].name
|
||||
},
|
||||
gogogo(item) {
|
||||
if (item.video_link.length > 0) {
|
||||
|
||||
uni.navigateTo({
|
||||
// #ifdef MP || H5
|
||||
url: `/pages/short_video/nvueSwiper/index?id=${item.community_id}`
|
||||
@ -458,10 +509,6 @@
|
||||
this.tabsData.list = [{
|
||||
cate_name: "推荐",
|
||||
category_id: 0
|
||||
}, {
|
||||
cate_name: "视频",
|
||||
category_id: -1,
|
||||
children: []
|
||||
}, ...data]
|
||||
},
|
||||
tabsChange(item) {
|
||||
@ -485,7 +532,7 @@
|
||||
type: 'wgs84',
|
||||
timeout: '10',
|
||||
success: (res) => {
|
||||
// console.log(res)
|
||||
|
||||
this.isshow = false
|
||||
let latitude, longitude;
|
||||
latitude = res.latitude.toString();
|
||||
@ -494,11 +541,14 @@
|
||||
lat: latitude,
|
||||
long: longitude
|
||||
}).then(res => {
|
||||
uni.setStorageSync('adress_location', res.data.address)
|
||||
// that.$store.dispatch('setLocation', res.data)
|
||||
|
||||
let town = res.data.address_reference.town.title
|
||||
let street_id = res.data.address_reference.town.id
|
||||
this.street = res.data.address_component.street
|
||||
Cache.set('ADRESS_LOCATION', this.street)
|
||||
|
||||
this.$nextTick(() => {
|
||||
this.$bus.$emit('value-updated',this.street + ',' +street_id);
|
||||
|
||||
})
|
||||
}).catch(err => {
|
||||
uni.showToast({
|
||||
title: err,
|
||||
@ -547,15 +597,18 @@
|
||||
var Build = plus.android.importClass("android.os.Build");
|
||||
//android 8.0引导
|
||||
if (Build.VERSION.SDK_INT >= 26) {
|
||||
var intent = new Intent('android.settings.APP_NOTIFICATION_SETTINGS');
|
||||
var intent = new Intent(
|
||||
'android.settings.APP_NOTIFICATION_SETTINGS');
|
||||
intent.putExtra('android.provider.extra.APP_PACKAGE', pkName);
|
||||
} else if (Build.VERSION.SDK_INT >= 21) { //android 5.0-7.0
|
||||
var intent = new Intent('android.settings.APP_NOTIFICATION_SETTINGS');
|
||||
var intent = new Intent(
|
||||
'android.settings.APP_NOTIFICATION_SETTINGS');
|
||||
intent.putExtra("app_package", pkName);
|
||||
intent.putExtra("app_uid", uid);
|
||||
} else { //(<21)其他--跳转到该应用管理的详情页
|
||||
intent.setAction(Settings.ACTION_APPLICATION_DETAILS_SETTINGS);
|
||||
var uri = Uri.fromParts("package", mainActivity.getPackageName(),
|
||||
var uri = Uri.fromParts("package", mainActivity
|
||||
.getPackageName(),
|
||||
null);
|
||||
intent.setData(uri);
|
||||
}
|
||||
@ -587,7 +640,8 @@
|
||||
success: function(res) {
|
||||
if (res.confirm) {
|
||||
var app = plus.ios.invoke('UIApplication', 'sharedApplication');
|
||||
var setting = plus.ios.invoke('NSURL', 'URLWithString:', 'app-settings:');
|
||||
var setting = plus.ios.invoke('NSURL', 'URLWithString:',
|
||||
'app-settings:');
|
||||
plus.ios.invoke(app, 'openURL:', setting);
|
||||
plus.ios.deleteObject(setting);
|
||||
plus.ios.deleteObject(app);
|
||||
@ -602,10 +656,10 @@
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
<style lang="scss" scoped>
|
||||
page {
|
||||
background-color: #F4F7FE;
|
||||
;
|
||||
|
||||
// background: linear-gradient(180deg, #FFFFFF 0%, #F6F6F6 100%);
|
||||
}
|
||||
|
||||
@ -643,39 +697,72 @@
|
||||
background: linear-gradient(180deg, #FFFFFF 0%, #F6F6F6 100%);
|
||||
}
|
||||
|
||||
.bg-img {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
top: 0;
|
||||
/* #ifdef MP || APP-PLUS */
|
||||
z-index: -100;
|
||||
/* #endif */
|
||||
/* #ifdef H5 */
|
||||
z-index: -100;
|
||||
/* #endif */
|
||||
z-index: -100;
|
||||
filter: blur(0);
|
||||
overflow: hidden;
|
||||
|
||||
|
||||
img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
filter: blur(30rpx);
|
||||
transform: scale(1.5);
|
||||
// .bg-img {
|
||||
// position: absolute;
|
||||
// width: 100%;
|
||||
// height: 100%;
|
||||
|
||||
// top: 0;
|
||||
// /* #ifdef MP || APP-PLUS */
|
||||
// z-index: -100;
|
||||
// /* #endif */
|
||||
// /* #ifdef H5 */
|
||||
// z-index: -100;
|
||||
// /* #endif */
|
||||
// z-index: -100;
|
||||
// filter: blur(0);
|
||||
// overflow: hidden;
|
||||
|
||||
|
||||
// img {
|
||||
// width: 100%;
|
||||
// height: 100%;
|
||||
// filter: blur(30rpx);
|
||||
// transform: scale(1.5);
|
||||
// }
|
||||
// }
|
||||
|
||||
|
||||
.sitebox {
|
||||
animation-name: fadeIn;
|
||||
animation-duration: 3s;
|
||||
animation-fill-mode: forwards;
|
||||
}
|
||||
|
||||
@keyframes fadeIn {
|
||||
from {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
to {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.site-box {
|
||||
width: 100%;
|
||||
height: 120rpx;
|
||||
/* #ifdef MP || APP-PLUS */
|
||||
height: 160rpx;
|
||||
/* #endif */
|
||||
/* #ifdef H5 */
|
||||
height: 120rpx;
|
||||
/* #endif */
|
||||
margin-bottom: 26.32rpx;
|
||||
position: absolute;
|
||||
top: 0rpx;
|
||||
position: fixed;
|
||||
z-index: 999;
|
||||
padding-top: 30rpx;
|
||||
/* #ifdef MP || APP-PLUS */
|
||||
padding-top: 75rpx;
|
||||
/* #endif */
|
||||
/* #ifdef H5 */
|
||||
padding-top: 25rpx;
|
||||
/* #endif */
|
||||
// background-color: #e5e5e5;
|
||||
|
||||
padding-right: 20rpx;
|
||||
|
||||
// 位置
|
||||
@ -684,16 +771,22 @@
|
||||
margin-right: 24.56rpx;
|
||||
font-size: 30rpx;
|
||||
|
||||
opacity: 0;
|
||||
|
||||
.town_name {
|
||||
margin-left: 21rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.iconfont {
|
||||
opacity: 0;
|
||||
font-size: 30rpx;
|
||||
font-size: 35.09rpx;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
.circle_friends_wrapper {
|
||||
position: relative;
|
||||
|
||||
@ -804,7 +897,7 @@
|
||||
}
|
||||
|
||||
.goodslist {
|
||||
display: flex;
|
||||
// display: flex;
|
||||
margin: 0 auto;
|
||||
width: 725rpx;
|
||||
}
|
||||
@ -813,9 +906,13 @@
|
||||
margin: 0 auto;
|
||||
width: 725rpx;
|
||||
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: space-between;
|
||||
|
||||
.goods_item {
|
||||
width: 356rpx;
|
||||
height: 450rpx;
|
||||
border: 1px solid;
|
||||
border-radius: 8px;
|
||||
overflow: hidden;
|
||||
background-color: #fff;
|
||||
@ -823,6 +920,12 @@
|
||||
flex-direction: column;
|
||||
margin-bottom: 10.53rpx;
|
||||
position: relative;
|
||||
margin-top: -40rpx;
|
||||
|
||||
.kk {
|
||||
width: 365rpx;
|
||||
height: 251rpx;
|
||||
}
|
||||
|
||||
.goods_item_img {
|
||||
position: absolute;
|
||||
@ -919,7 +1022,7 @@
|
||||
|
||||
.goods_items {
|
||||
width: 356rpx;
|
||||
height: 536rpx;
|
||||
|
||||
|
||||
border-radius: 8px;
|
||||
overflow: hidden;
|
||||
|
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<view class="gather">
|
||||
<block v-if="isShow">
|
||||
<view class="special_work com" v-if="userInfoData.mer_info.type_id === 12">
|
||||
<view class="special_work com" v-if="userInfoData.mer_info.type_code === 'TypeSupplyChain'">
|
||||
<view class="special_work com" v-if="true">
|
||||
<view class="title">市级供应链</view>
|
||||
<view class="content">
|
||||
@ -62,7 +62,7 @@
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="business com" v-if="userInfoData.mer_info.type_id === 10">
|
||||
<view class="business com" v-if="userInfoData.mer_info.type_code === 'TypeStore'">
|
||||
<view class="business com" v-if="true">
|
||||
<view class="special_work com">
|
||||
<view class="title">我的店铺</view>
|
||||
@ -155,7 +155,7 @@
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="business com" v-if="userInfoData.mer_info.type_id!=null&&userInfoData.mer_info.type_id === 11">
|
||||
<view class="business com" v-if="userInfoData.mer_info.type_code === 'TypeCloudWarehouse'">
|
||||
<view class="business com" v-if="true">
|
||||
<view class="special_work com">
|
||||
<view class="title">里海云仓</view>
|
||||
@ -226,8 +226,53 @@
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="business com" v-if="userInfoData.mer_info.type_code === 'TypeFeaturedCultural'|| userInfoData.mer_info.type_code === 'TypeFamousSpecialties'|| userInfoData.mer_info.type_code === 'TypeLocalCuisine' ">
|
||||
<view class="business com" v-if="true">
|
||||
<view class="special_work com">
|
||||
<view class="title">我的店铺</view>
|
||||
<view class="content ">
|
||||
|
||||
<view class="examine" @click="navigator(`/pages/users/embody/embody?mer_id=${mer_id}`)">
|
||||
<image class="icon_img" :src="`${prefix}txgl.png`" mode="aspectFill">
|
||||
</image>
|
||||
<text class="text">提现管理</text>
|
||||
</view>
|
||||
|
||||
<view class="examine"
|
||||
@click="navigator(`/pages/chat/customer_list/index?type=1&mer_id=${mer_id}`)">
|
||||
<image class="icon_img" :src="`${prefix}kfjl.png`" mode="aspectFill">
|
||||
</image>
|
||||
<text class="text">客服记录</text>
|
||||
</view>
|
||||
<view class="examine"
|
||||
@click="navigator(`/pages/admin/order_cancellation/index?mer_id=${mer_id}`)">
|
||||
<image class="icon_img" :src="`${prefix}ddhx.png`" mode="aspectFill">
|
||||
</image>
|
||||
<text class="text">订单核销</text>
|
||||
</view>
|
||||
<view class="examine"
|
||||
@click="navigator(`/pages/admin/order/index?mer_id=${mer_id}&type_id=${userInfoData.mer_info.type_id}`)">
|
||||
<image class="icon_img" :src="`${prefix}ddgl.png`" mode="aspectFill">
|
||||
</image>
|
||||
<text class="text">订单管理</text>
|
||||
</view>
|
||||
<view class="examine" @click="navigator(`/pages/product/list/index?mer_id=${mer_id}`)">
|
||||
<image class="icon_img" :src="`${prefix}spgl.png`" mode="aspectFill">
|
||||
</image>
|
||||
<text class="text">商品管理</text>
|
||||
</view>
|
||||
<view class="examine"
|
||||
@click="navigator(`/pages/product/basicSet?mer_id=${mer_id}`, '商户设置')">
|
||||
<image class="icon_img" :src="`${prefix}shsz.png`" mode="aspectFill">
|
||||
</image>
|
||||
<text class="text">商户设置</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
</block>
|
||||
<!-- <m-tabbar native>
|
||||
<template v-slot:tabbar_index_2>
|
||||
@ -270,7 +315,7 @@
|
||||
import {
|
||||
getDiy
|
||||
} from '@/api/api.js'
|
||||
|
||||
|
||||
export default {
|
||||
components: {
|
||||
mTabbar,
|
||||
@ -292,7 +337,7 @@
|
||||
isShow: false,
|
||||
bgColor: '',
|
||||
isFshow: false,
|
||||
street:''
|
||||
street: ''
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
@ -317,30 +362,15 @@
|
||||
},
|
||||
mounted() {
|
||||
this.appLocation()
|
||||
// #ifdef H5
|
||||
// 监听页面滚动事件
|
||||
window.addEventListener("scroll", this.scrolling);
|
||||
// #endif
|
||||
|
||||
|
||||
},
|
||||
// #ifdef APP-PLUS
|
||||
onPageScroll(e) {
|
||||
// this.scrollTop = e.scrollTop;
|
||||
console.log(e.scrollTop)
|
||||
if (e.scrollTop > 0) {
|
||||
this.isFshow = true
|
||||
} else {
|
||||
this.isFshow = false
|
||||
}
|
||||
|
||||
},
|
||||
// #endif
|
||||
|
||||
methods: {
|
||||
|
||||
|
||||
appLocation() {
|
||||
|
||||
|
||||
appLocation() {
|
||||
uni.getLocation({
|
||||
type: 'wgs84',
|
||||
timeout: '10',
|
||||
@ -373,7 +403,7 @@
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
scrolling() {
|
||||
// 滚动条距文档顶部的距离
|
||||
let scrollTop =
|
||||
@ -521,7 +551,7 @@
|
||||
// padding: 17.54rpx;
|
||||
width: 694.74rpx;
|
||||
// margin-top: 52.63rpx;
|
||||
padding-top: 32rpx;
|
||||
padding-top: 32rpx;
|
||||
border-radius: 17.54rpx;
|
||||
// box-shadow: 0px 0px 6px 1px rgba(0, 0, 0, 0.16);
|
||||
|
||||
|
299
pages/nongKe/specialty/index.vue
Normal file
@ -0,0 +1,299 @@
|
||||
<template>
|
||||
<view class="box">
|
||||
<view class="head">
|
||||
<view style="height: var(--status-bar-height);"></view>
|
||||
<!-- <u--image style="position: absolute;" :showLoading="true" src="/static/images/MYTC/BG.png" width="750rpx"
|
||||
height="748.25rpx" @click="click"></u--image> -->
|
||||
<view class="head_tit">
|
||||
<view class="head_tit_l">
|
||||
<view class="iconfont icon-xiangzuo"></view>
|
||||
<view
|
||||
style="font-size: 40rpx;font-weight: 700;margin-left: 30rpx; transform: skewX(-10deg);color:white;">
|
||||
名优特产
|
||||
</view>
|
||||
</view>
|
||||
<view class="head_tit_r" style="font-size: 29.79rpx;">
|
||||
江阳区 <text style="margin-left: 10rpx;" class="iconfont icon-xiangxia"></text>
|
||||
<view class="" style="font-size: 22.78rpx;">
|
||||
晴天30
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="head_serch">
|
||||
<view style="position: relative;">
|
||||
<u-search borderColor="#FF6D20" bgColor="white" :showAction="false" placeholder="搜索店铺名称"
|
||||
v-model="keyword" class="serch_cls"></u-search>
|
||||
<u--image class="img_cls" style="position: absolute; top: 3px;right: 3px;" :showLoading="true"
|
||||
src="/static/images/MYTC/SS.png" width="115.65rpx" height="56.82rpx"></u--image>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="head_content">
|
||||
<view style="font-size: 40rpx;font-weight: 700;color:white; margin-bottom: 10rpx;">
|
||||
精选特产
|
||||
</view>
|
||||
<view class="head_content_card">
|
||||
|
||||
<u-scroll-list>
|
||||
<view v-for="(item, index) in list" :key="index" class="goods_card">
|
||||
<u--image :showLoading="true" src="https://cdn.uviewui.com/uview/album/1.jpg"
|
||||
width="210.28rpx" height="210.28rpx" @click="click"></u--image>
|
||||
<view class="goods_tit">
|
||||
笑口常开地方就是的开发建设的开发建设的,v空间和客户可怜见立刻就
|
||||
</view>
|
||||
<view class="goods_price">
|
||||
$10.00
|
||||
</view>
|
||||
|
||||
<!-- <image :src="item.thumb"></image> -->
|
||||
</view>
|
||||
</u-scroll-list>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="store">
|
||||
<view class="goods_list">
|
||||
<view class="goods_cards" @click="goStore(item.mer_id)" v-for="(item,index) in storeList" :key="index">
|
||||
<view class="left">
|
||||
<u--image :showLoading="true" :src="item.mer_avatar" width="157.71rpx"
|
||||
height="157.71rpx"></u--image>
|
||||
</view>
|
||||
<view class="right">
|
||||
<view class="li heads" style="display: flex;">
|
||||
<text class="flag">特产</text>
|
||||
<text class="com_name">{{item.mer_name}}</text>
|
||||
<text
|
||||
style="font-weight: normal; font-size: 10rpx;color: red;padding:0 10rpx; border-radius: 10rpx; border: 1px solid red;">{{item.type_name}}</text>
|
||||
</view>
|
||||
<view class="li">
|
||||
<u--image v-for="item,index in [1,1,,1,1,1]" :key="index" :showLoading="true"
|
||||
src="/static/images/GXSC/PF.png" width="20.85rpx" height="19.85rpx"></u--image>
|
||||
<text style="margin-left: 10rpx;color: #FF6D20; ">5.0</text>
|
||||
<text>月销2000+</text>
|
||||
<text>20分钟</text>
|
||||
<text>1.1KM</text>
|
||||
</view>
|
||||
<view class="li" style="align-items: center;">
|
||||
<u--image :showLoading="true" src="/static/images/GXSC/DH.png" width="33.85rpx"
|
||||
height="33.85rpx"></u--image>
|
||||
<text> {{item.service_phone}}</text>
|
||||
</view>
|
||||
<view class="li" style="align-items: center;">
|
||||
<u--image :showLoading="true" src="/static/images/GXSC/SJ.png" width="33.85rpx"
|
||||
height="33.85rpx"></u--image>
|
||||
<text>{{item.mer_take_time[0]}}-{{item.mer_take_time[1]}}</text>
|
||||
</view>
|
||||
<view class="li" style="align-items: center;">
|
||||
<u--image :showLoading="true" src="/static/images/GXSC/DW.png" width="33.85rpx"
|
||||
height="33.85rpx"></u--image>
|
||||
<text class="address">{{item.mer_address}}</text>
|
||||
</view>
|
||||
|
||||
<view class="">
|
||||
assa
|
||||
</view>
|
||||
<!-- <view class="">
|
||||
<u-scroll-list>
|
||||
<view v-for="(item, index) in list" :key="index" class="goods_card_a">
|
||||
<u--image :showLoading="true" src="https://cdn.uviewui.com/uview/album/1.jpg"
|
||||
width="164.72rpx" height="164.72rpx" @click="click"></u--image>
|
||||
<view class="goods_tit_a">
|
||||
笑口常开地方就是的开发建设的开发建设的,v空间和客户可怜见立刻就
|
||||
</view>
|
||||
<view class="goods_price">
|
||||
$10.00
|
||||
</view>
|
||||
</view>
|
||||
</u-scroll-list>
|
||||
</view>
|
||||
-->
|
||||
|
||||
|
||||
</view>
|
||||
|
||||
</view>
|
||||
|
||||
</view>
|
||||
|
||||
|
||||
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
storeMerchantList,
|
||||
} from '@/api/store.js';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
keyword: "",
|
||||
list: [1, 1, 1, 1, 1, 1, 1, 1, ],
|
||||
storeList: [1, 1, 1, 1, 1, 1, 1, 1, 1]
|
||||
}
|
||||
},
|
||||
onLaunch() {
|
||||
console.log(46545)
|
||||
// storeMerchantList().then(res => {
|
||||
// // this.count = res.data.count
|
||||
// // this.storeList = this.storeList.concat(res.data.list)
|
||||
// // this.loading = false
|
||||
// // this.loadingIcon = false
|
||||
// console.log(res)
|
||||
// })
|
||||
|
||||
},
|
||||
onShow() {
|
||||
// console.log(46545)
|
||||
storeMerchantList().then(res => {
|
||||
// this.count = res.data.count
|
||||
this.storeList = res.data.list
|
||||
// this.loading = false
|
||||
// this.loadingIcon = false
|
||||
// console.log(res)
|
||||
})
|
||||
},
|
||||
methods: {},
|
||||
onPullDownRefresh() {
|
||||
uni.stopPullDownRefresh()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.head {
|
||||
// background-color: #F94621;
|
||||
background: url('/static/images/MYTC/BG.png') no-repeat;
|
||||
padding: 20rpx;
|
||||
border-radius: 0rpx 0rpx 31.54rpx 31.54rpx;
|
||||
|
||||
.head_tit {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
color: white;
|
||||
// margin-bottom: 20rpx;
|
||||
|
||||
.head_tit_l {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.head_tit_r {
|
||||
// display: flex;
|
||||
// align-items: center;
|
||||
}
|
||||
}
|
||||
|
||||
.head_serch {
|
||||
margin: 20rpx 0;
|
||||
}
|
||||
|
||||
.head_content {
|
||||
.head_content_card {
|
||||
background: linear-gradient(to bottom, #FCB9AD, #FFFBF9, #FFFFFF);
|
||||
border-radius: 21.03rpx 21.03rpx 21.03rpx 21.03rpx;
|
||||
overflow: hidden;
|
||||
padding: 20rpx 10rpx;
|
||||
|
||||
.goods_card {
|
||||
margin-right: 20rpx;
|
||||
}
|
||||
|
||||
.goods_tit {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 2;
|
||||
-webkit-box-orient: vertical;
|
||||
}
|
||||
|
||||
.goods_price {
|
||||
color: #F84221;
|
||||
font-size: 29.79rpx;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.store {
|
||||
.goods_list {
|
||||
margin-top: 20rpx;
|
||||
|
||||
.goods_cards {
|
||||
margin-top: 20rpx;
|
||||
height: auto;
|
||||
background-color: white;
|
||||
padding: 20rpx;
|
||||
border-radius: 20rpx;
|
||||
display: flex;
|
||||
// align-items: center;
|
||||
|
||||
.left {
|
||||
margin-right: 20rpx;
|
||||
width: 158rpx;
|
||||
height: 158rpx;
|
||||
background-color: red;
|
||||
border-radius: 20rpx;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.right {
|
||||
.heads {
|
||||
font-weight: bold;
|
||||
|
||||
.flag {
|
||||
background: linear-gradient(to bottom, #F84221, #FF6D20);
|
||||
width: 66.59rpx;
|
||||
height: 36.8rpx;
|
||||
text-align: center;
|
||||
font-size: 22.78rpx;
|
||||
color: white;
|
||||
border-radius: 10.51rpx 10.51rpx 10.51rpx 10.51rpx;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.goods_card_a {
|
||||
margin-right: 20rpx;
|
||||
}
|
||||
|
||||
.goods_tit_a {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 1;
|
||||
-webkit-box-orient: vertical;
|
||||
}
|
||||
|
||||
.li {
|
||||
display: flex;
|
||||
font-size: 26.29rpx;
|
||||
margin-bottom: 10rpx;
|
||||
|
||||
align-items: center;
|
||||
color: #737373;
|
||||
|
||||
text {
|
||||
margin: 0 10rpx 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.address {
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
width: 200px;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
</style>
|
@ -11,7 +11,7 @@
|
||||
<view class="store_site flex_a_c" v-if="store_item.street_name">{{ store_item.street_name }}</view>
|
||||
<view class="name">{{ store_item.mer_name }}</view>
|
||||
</view>
|
||||
<image class="high_img" :src="youZhiImg" mode="aspectFill"></image>
|
||||
<image class="high_img" :src="youZhiImg" mode="aspectFit"></image>
|
||||
</view>
|
||||
<view class="mct_msg_detail flex_a_c">
|
||||
<view class="product_score">{{ store_item.product_score }}分</view>
|
||||
@ -32,7 +32,7 @@
|
||||
<scroll-view scroll-x="true" class="goods_info">
|
||||
<view v-for="(itemn,indexn) in store_item.recommend" :key="indexn" class="goods_info_item"
|
||||
@click.stop="navTogoodsDetail(itemn.product_id)">
|
||||
<image class="goods_info_img" :src="itemn.image" mode="aspectFill"></image>
|
||||
<image class="goods_info_img" :src="itemn.image" mode="aspectFit"></image>
|
||||
<view class="goods_info_name">{{itemn.store_name}}</view>
|
||||
<view class="goods_info_price">¥{{itemn.price}}</view>
|
||||
</view>
|
||||
|
@ -11,7 +11,7 @@
|
||||
</view>
|
||||
<block v-for="(item,i) in goodsList" :key="i">
|
||||
<view class="list_item flex_a_c">
|
||||
<image class="goods_img" :src="item.image" mode="aspectFill"></image>
|
||||
<image class="goods_img" :src="item.image" mode="aspectFit"></image>
|
||||
<view class="r_box flex_a_c_j_sb">
|
||||
<view class="message">
|
||||
<view class="goodstitle">{{item.store_name}}</view>
|
||||
@ -43,7 +43,7 @@
|
||||
</view>
|
||||
<view class="sub_title">订货价</view>
|
||||
<input class="input" type="text" placeholder="请输入价格" v-model="goodsPrive">
|
||||
<!-- <view class="sub_title">库存量</view>
|
||||
<!-- <view class="sub_title">库存量</view>
|
||||
<input class="input" type="number" placeholder="请输入库存数量" v-model="goodsNum"> -->
|
||||
<view class="btns_box">
|
||||
<view class="cancel" @click="popupClose">取消</view>
|
||||
@ -53,7 +53,6 @@
|
||||
</u-popup>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
getStorage,
|
||||
@ -151,7 +150,7 @@
|
||||
const res = await productUpdate(this.merId, this.product_id, this.particulars)
|
||||
// Toast(message)
|
||||
this.getGoodsList()
|
||||
this.goodsList=[]
|
||||
this.goodsList = []
|
||||
this.popupShow = false
|
||||
this.goodsPrive = ''
|
||||
this.goodsNum = ''
|
||||
|
67
pages/nongKe/supply_chain/maps.vue
Normal file
@ -0,0 +1,67 @@
|
||||
<template>
|
||||
<view class="">
|
||||
<map id="map" :enable-zoom="true" :markers="markers" :scale="19" :latitude="28.908447" :enable-scroll="true"
|
||||
:longitude="105.439304" style="width: 100vw;height: 100vh;">
|
||||
<!-- <cover-image class="map_btn" @tap="test" src="../../static/img/logistics/DH.png">
|
||||
</cover-image> -->
|
||||
</map>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
vicinityStoreApi,
|
||||
supAgoodsApi
|
||||
} from '@/api/store.js';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
markers: [{
|
||||
id: 1,
|
||||
latitude: 28.908447,
|
||||
longitude: 105.439304,
|
||||
title: "测试商家名称",
|
||||
iconPath: "/static/images/GXSC/SJicon.png"
|
||||
}, {
|
||||
id: 2,
|
||||
latitude: 28.909447,
|
||||
longitude: 105.439304,
|
||||
title: "测试商家名称",
|
||||
iconPath: "/static/images/GXSC/SJicon.png"
|
||||
}, {
|
||||
id: 3,
|
||||
latitude: 28.908447,
|
||||
longitude: 105.459304,
|
||||
title: "测试商家名称",
|
||||
iconPath: "/static/images/GXSC/SJicon.png"
|
||||
}, ]
|
||||
}
|
||||
}
|
||||
|
||||
,
|
||||
onLoad(options) {
|
||||
let that = this
|
||||
// supAgoodsApi()
|
||||
vicinityStoreApi(options.street_id).then(res => {
|
||||
// console.log(res.data.list)
|
||||
res.data.list.forEach(item => {
|
||||
if (!item.lat) return
|
||||
this.markers = []
|
||||
// console.log(item)
|
||||
that.markers.push({
|
||||
id: item.mer_id,
|
||||
latitude: item.lat,
|
||||
longitude: item.long,
|
||||
title: item.mer_name,
|
||||
iconPath: "/static/images/GXSC/SJicon.png"
|
||||
|
||||
})
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
</style>
|
@ -20,7 +20,7 @@
|
||||
<block v-for="(item,index) in list" :key="index">
|
||||
<view class="item_list flex">
|
||||
<view>
|
||||
<image class="goods_image" :src="item.image" mode="aspectFill"></image>
|
||||
<image class="goods_image" :src="item.image" mode="aspectFit"></image>
|
||||
</view>
|
||||
<view class="left_goods_msg">
|
||||
<view class="name">{{ item.store_name }}</view>
|
||||
|
@ -33,7 +33,7 @@
|
||||
<view class="right_storee">
|
||||
<scroll-view scroll-y="true" style="height: 100%; overflow: hidden;" scroll-with-animation='true'
|
||||
@scrolltolower="scrolltolower" class="my-scroll-view">
|
||||
<image class="banner" :src="src" mode="aspectFill"></image>
|
||||
<image class="banner" :src="src" mode="aspectFit"></image>
|
||||
<view style="background-color: #fff;width: 100%;">
|
||||
<view class="tabs_box flex_a_c_j_sb">
|
||||
<view v-for="(item,index) in tabsList" :key="index" class="flex_a_c" :class="active==index?'active':''">
|
||||
|
@ -1,27 +1,108 @@
|
||||
<template>
|
||||
<view>
|
||||
|
||||
<view style="background-color: #F0F2F5;">
|
||||
<!-- <view style="height: var(--status-bar-height);background-color: red;height: 10vh;">dsfdsfsdfds</view> -->
|
||||
<view class='productList' :style="viewColor">
|
||||
<view class='search acea-row row-between-wrapper' :class="'styleType'+store_street_theme">
|
||||
|
||||
<view class="back" @click='backjJump()'>
|
||||
<view class="iconfont icon-xiangzuo"></view>
|
||||
<!-- 顶部 -->
|
||||
<view class="top">
|
||||
<view style="height: 10px;">
|
||||
|
||||
</view>
|
||||
|
||||
<view class='input acea-row row-between-wrapper'><text class='iconfont icon-sousuo'></text>
|
||||
<input placeholder='搜索店铺名称' placeholder-class='placeholder' confirm-type='search' name="search"
|
||||
:value='sotreParam.keyword' @confirm="searchSubmit"></input>
|
||||
</view>
|
||||
<!-- <view v-if="mer_location == 1" :class="'styleType'+store_street_theme" style="text-align: right;"
|
||||
class='iconfont search-right' @click='showMaoLocation(latitude,longitude)'>
|
||||
<view class="iconfont icon-dingwei"></view>
|
||||
<view class="right-text" v-if="recommend_address">
|
||||
{{recommend_address}}
|
||||
<view style="display: flex;justify-content: space-around; align-items: center;">
|
||||
<view class="back" @click='backjJump()'>
|
||||
<view class="iconfont icon-xiangzuo" style="color: #333333;"></view>
|
||||
</view>
|
||||
<view class="" style="font-size: 40rpx;font-weight: 700;transform: skewX(-10deg);">
|
||||
供销综合云市场
|
||||
</view>
|
||||
<view style="position: relative;width: 289.14rpx;">
|
||||
<!-- <text class='iconfont icon-sousuo'></text>
|
||||
<input placeholder='搜索店铺名称' placeholder-class='placeholder' confirm-type='search' name="search"
|
||||
:value='sotreParam.keyword' @confirm="searchSubmit"></input> -->
|
||||
<u-search borderColor="#FF6D20" bgColor="white" @change="test" :showAction="false"
|
||||
placeholder="请输入..." v-model="sotreParam.keyword" class="serch_cls"></u-search>
|
||||
<u--image @tap="searchSubmit" class="img_cls" style="position: absolute; top: 3px;right: 3px;"
|
||||
:showLoading="true" src="/static/images/GXSC/SS.png" width="115.65rpx"
|
||||
height="56.82rpx"></u--image>
|
||||
</view>
|
||||
<view class='iconfont search-right'
|
||||
@click="goMap(`/pages/nongKe/supply_chain/maps?street_id=${street_id}`)">
|
||||
<u--image :showLoading="true" src="/static/images/GXSC/DW.png" width="50.82rpx"
|
||||
height="50.82rpx"></u--image>
|
||||
</view>
|
||||
<view class="iconfont icon-xiangyou" v-if="recommend_address"></view>
|
||||
</view>
|
||||
--> </view>
|
||||
<view class="nav-wrapper" :class="'styleType'+store_street_theme">
|
||||
</view>
|
||||
<view class="content">
|
||||
<view style="background-color: red;height: 10px">
|
||||
asdasd
|
||||
</view>
|
||||
<view class="hot_serch">
|
||||
<text>热搜:</text> <text @click="hotSerchFn('小张副食')">小张副食</text> <text
|
||||
@click="hotSerchFn('正新酒店')">正新酒店</text>
|
||||
<text @click="hotSerchFn('麻辣鸡')">麻辣鸡</text>
|
||||
<text @click="hotSerchFn('手撕椒麻鸡')">手撕椒麻鸡</text>
|
||||
</view>
|
||||
|
||||
<view class="menu_cls">
|
||||
<u-scroll-list indicatorActiveColor='#FF6D20'>
|
||||
<view class="menu_li" @click="navGo(item.merchant_category_id)" v-for="item,index in menuList"
|
||||
:key="index">
|
||||
<!-- {{item.merchant_category_id}} -->
|
||||
<u--image :showLoading="true" :src="imgList[index]" width="94.63rpx" height="99.63rpx"
|
||||
style="margin-bottom: 20rpx;"></u--image>
|
||||
<text
|
||||
style="display: block;font-size: 26.29rpx; width: 15vw;">{{item.category_name}}</text>
|
||||
</view>
|
||||
</u-scroll-list>
|
||||
</view>
|
||||
|
||||
<view class="goods_list">
|
||||
<view class="goods_card" @click="goStore(item.mer_id)" v-for="(item,index) in storeList"
|
||||
:key="index">
|
||||
<view class="left">
|
||||
<u--image :showLoading="true" :src="item.mer_avatar" width="157.71rpx"
|
||||
height="157.71rpx"></u--image>
|
||||
</view>
|
||||
<view class="right">
|
||||
<view class="li head">
|
||||
<text class="com_name">{{item.mer_name}}</text>
|
||||
<text
|
||||
style="font-weight: normal;font-size: 19.28rpx;color: red;padding:0 10rpx; border-radius: 10rpx; border: 1px solid red;">{{item.type_name}}</text>
|
||||
</view>
|
||||
<view class="li">
|
||||
<u--image v-for="item,index in [1,1,,1,1,1]" :key="index" :showLoading="true"
|
||||
src="/static/images/GXSC/PF.png" width="20.85rpx" height="19.85rpx"></u--image>
|
||||
<text style="margin-left: 20rpx;color: #FF6D20; ">5.0</text>
|
||||
<text>月销{{item.sales}}</text>
|
||||
</view>
|
||||
<view class="li" style="align-items: center;">
|
||||
<u--image :showLoading="true" src="/static/images/GXSC/DH.png" width="33.85rpx"
|
||||
height="33.85rpx"></u--image>
|
||||
<text> {{item.service_phone}}</text>
|
||||
</view>
|
||||
<view class="li" style="align-items: center;">
|
||||
<u--image :showLoading="true" src="/static/images/GXSC/SJ.png" width="33.85rpx"
|
||||
height="33.85rpx"></u--image>
|
||||
<text>{{item.mer_take_time[0]}}-{{item.mer_take_time[1]}}</text>
|
||||
</view>
|
||||
<view class="li" style="align-items: center;">
|
||||
<u--image :showLoading="true" src="/static/images/GXSC/DW.png" width="33.85rpx"
|
||||
height="33.85rpx"></u--image>
|
||||
<text class="address">{{item.mer_address}}</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
|
||||
</view>
|
||||
|
||||
|
||||
</view>
|
||||
|
||||
<!-- 热搜 -->
|
||||
|
||||
|
||||
|
||||
<!-- <view class="nav-wrapper" :class="'styleType'+store_street_theme">
|
||||
<view class='nav acea-row row-middle' :class="'styleType'+store_street_theme">
|
||||
<view v-for="item in downMenus" :key="item.key" class='item'
|
||||
:class="{'font-colors':firstKey == item.key}" @click='set_where(item.key)'>
|
||||
@ -31,10 +112,14 @@
|
||||
<view class="line" :class="{'font-line':firstKey == item.key}">
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
</view>
|
||||
</view>
|
||||
|
||||
-->
|
||||
|
||||
<!-- 店铺 -->
|
||||
<!--
|
||||
<block>
|
||||
<view class="store-wrapper">
|
||||
<view class="store-item" v-for="(item,index) in storeList" :key="index">
|
||||
@ -43,7 +128,7 @@
|
||||
</view>
|
||||
<view class="zhezhao">
|
||||
</view>
|
||||
<view class="zhezhao1" @click="goStore(item.mer_id)">
|
||||
<view class="zhezhao1" @click="goStore(item.mer_id)">
|
||||
<view class="title">
|
||||
<view>{{item.mer_name}}
|
||||
</view>
|
||||
@ -170,9 +255,12 @@
|
||||
<view class='loadingicon acea-row row-center-wrapper' v-if="loading">
|
||||
<text class='loading iconfont icon-jiazai' :hidden='loading==false'></text>{{loadTitle}}
|
||||
</view>
|
||||
-->
|
||||
|
||||
|
||||
</view>
|
||||
<view class='no-shop' v-if="!storeList.length && !loading && !loadingIcon" v-cloak>
|
||||
<view class='pictrue' style="margin: 0 auto;">
|
||||
<view class='pictrue' style="margin: 0 auto;background-color: #F5F5F5;">
|
||||
<image src='../../../static/images/noCart.png'></image>
|
||||
<text>暂无店铺,快去搜索其他店铺吧</text>
|
||||
</view>
|
||||
@ -183,14 +271,15 @@
|
||||
<image src="@/static/images/guanbi.png" class="guanbi" @click="close"></image>
|
||||
</u-popup>
|
||||
</view>
|
||||
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
storeMerchantList,
|
||||
getGeocoder
|
||||
getGeocoder,
|
||||
supMenuApi
|
||||
} from '@/api/store.js';
|
||||
import recommend from './component/recommend';
|
||||
import rightSlider from './component/rightSlider';
|
||||
@ -217,6 +306,25 @@
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
imgList: [
|
||||
"/static/images/GXSC/BBY.png",
|
||||
"/static/images/GXSC/NYSC.png",
|
||||
"/static/images/GXSC/SHFW.png",
|
||||
"/static/images/GXSC/SCFW.png",
|
||||
"/static/images/GXSC/NFCP.png",
|
||||
"/static/images/GXSC/WLSY.png",
|
||||
"/static/images/GXSC/WYLY.png",
|
||||
"/static/images/GXSC/MSGY.png",
|
||||
"/static/images/GXSC/YLBJ.png",
|
||||
"/static/images/GXSC/JYPX.png",
|
||||
"/static/images/GXSC/JJRB.png",
|
||||
"/static/images/GXSC/ZXJZ.png",
|
||||
"/static/images/GXSC/NMJD.png",
|
||||
"/static/images/GXSC/GXZH.png",
|
||||
"/static/images/GXSC/DFTC.png",
|
||||
"/static/images/GXSC/JDMS.png",
|
||||
],
|
||||
street_id: "",
|
||||
price: 0,
|
||||
stock: 0,
|
||||
nows: false,
|
||||
@ -233,6 +341,7 @@
|
||||
brandList: [],
|
||||
downKey: 0,
|
||||
downStatus: false,
|
||||
menuList: [],
|
||||
// 下拉菜单
|
||||
downMenu: [{
|
||||
title: '默认',
|
||||
@ -283,18 +392,19 @@
|
||||
storeTypeArr: [], //店铺类型
|
||||
merList: [], //商户分类
|
||||
product_type: 0,
|
||||
show:false,
|
||||
image: '' ,//图片,
|
||||
credit_buy:'',//支持先货后款
|
||||
show: false,
|
||||
image: '', //图片,
|
||||
credit_buy: '', //支持先货后款
|
||||
};
|
||||
},
|
||||
onLoad(options) {
|
||||
console.log(options);
|
||||
// console.log(options);
|
||||
this.street_id = options.street_id
|
||||
this.product_type = options.product_type ?? 0
|
||||
if (options.street_id != undefined) {
|
||||
this.sotreParam.street_id = options.street_id
|
||||
}
|
||||
this.credit_buy=options.credit_buy
|
||||
this.credit_buy = options.credit_buy
|
||||
this.sotreParam.type_id = options.type_id
|
||||
this.sotreParam.type_id = options.type_id && options.type_id.split(',').toString() || ''
|
||||
this.sotreParam.category_id = options.cate_id && options.cate_id.split(',').toString() || ''
|
||||
@ -305,6 +415,10 @@
|
||||
this.storeMerchantList();
|
||||
this.getClassfication();
|
||||
this.getStoreType();
|
||||
supMenuApi().then(res => {
|
||||
this.menuList = res.data
|
||||
})
|
||||
|
||||
},
|
||||
computed: {
|
||||
downMenus: function() {
|
||||
@ -325,6 +439,28 @@
|
||||
}, mapGetters(['viewColor'])),
|
||||
},
|
||||
methods: {
|
||||
test() {
|
||||
if (this.sotreParam.keyword.length > 3) {
|
||||
this.sotreParam.keyword.slice(0, 3)
|
||||
this.sotreParam.keyword = this.sotreParam.keyword.slice(0, 3) + "..."
|
||||
console.log(this.sotreParam.keyword)
|
||||
}
|
||||
// console.log(this.sotreParam.keyword.length)
|
||||
},
|
||||
hotSerchFn(keywords) {
|
||||
this.sotreParam.keyword = keywords
|
||||
this.searchSubmit()
|
||||
},
|
||||
goMap(url) {
|
||||
uni.navigateTo({
|
||||
url
|
||||
})
|
||||
},
|
||||
navGo(id) {
|
||||
uni.navigateTo({
|
||||
url: `/pages/nongKe/supply_chain/supplierA?type_id=10&merchant_category_id=${id}&street_id=${this.street_id}`
|
||||
})
|
||||
},
|
||||
go_details: function(product_type, product_id) {
|
||||
if (product_type == 98) {
|
||||
uni.navigateTo({
|
||||
@ -494,7 +630,7 @@
|
||||
category_id: this.sotreParam.category_id,
|
||||
type_id: this.sotreParam.type_id,
|
||||
street_id: this.sotreParam.street_id,
|
||||
credit_buy:this.credit_buy
|
||||
credit_buy: this.credit_buy
|
||||
}
|
||||
if (this.latitude) {
|
||||
rqData.location = this.latitude + ',' + this.longitude
|
||||
@ -521,9 +657,9 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
searchSubmit: function(e) {
|
||||
searchSubmit: function() {
|
||||
let that = this;
|
||||
that.$set(that.sotreParam, 'keyword', e.detail.value);
|
||||
that.$set(that.sotreParam, 'keyword', this.sotreParam.keyword);
|
||||
this.set_where(this.firstKey)
|
||||
},
|
||||
// 右侧切换
|
||||
@ -611,55 +747,118 @@
|
||||
this.storeMerchantList()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.productList .search {
|
||||
width: 100%;
|
||||
height: 146rpx;
|
||||
padding: 0 20rpx;
|
||||
box-sizing: border-box;
|
||||
position: fixed;
|
||||
left: 0;
|
||||
top: 0;
|
||||
z-index: 9;
|
||||
display: flex;
|
||||
flex-wrap: nowrap;
|
||||
background-color: #fff;
|
||||
padding-top: 80rpx;
|
||||
padding-bottom: 20rpx;
|
||||
&.styleType1 {
|
||||
background-color: var(--view-theme);
|
||||
* {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.com_name {
|
||||
font-size: 33.29rpx;
|
||||
// background-color: red;
|
||||
max-width: 45vw;
|
||||
white-space: nowrap;
|
||||
/* 防止文字换行 */
|
||||
overflow: hidden;
|
||||
/* 超出部分隐藏 */
|
||||
text-overflow: ellipsis;
|
||||
/* 使用省略号表示溢出的内容 */
|
||||
// width: 200px;
|
||||
/* 可根据实际情况调整容器宽度 */
|
||||
}
|
||||
|
||||
.productList {
|
||||
// padding-top: 50rpx;
|
||||
// padding: 0 20rpx 0;
|
||||
|
||||
.top {
|
||||
padding-top: var(--status-bar-height);
|
||||
/* #ifdef H5 */
|
||||
padding-top: 30rpx;
|
||||
/* #endif */
|
||||
// padding-top: 80rpx;
|
||||
background-color: #F0F2F5;
|
||||
position: fixed;
|
||||
z-index: 999;
|
||||
width: 100%;
|
||||
// margin-top: 10px;
|
||||
}
|
||||
|
||||
.search-right {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
max-width: max-content;
|
||||
flex: 1;
|
||||
padding-left: 20rpx;
|
||||
.content {
|
||||
padding: 20rpx;
|
||||
}
|
||||
|
||||
.right-text {
|
||||
.menu_cls {
|
||||
background-color: white;
|
||||
// height: 199.77rpx;
|
||||
border-radius: 21.03rpx 21.03rpx 21.03rpx 21.03rpx;
|
||||
padding: 20rpx 20rpx 0 20rpx;
|
||||
|
||||
.menu_li {
|
||||
margin-right: 50rpx;
|
||||
// background-color: red;
|
||||
width: 50vw;
|
||||
// width: 120rpx;
|
||||
// display: inline-block;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
.goods_list {
|
||||
margin-top: 20rpx;
|
||||
|
||||
.goods_card {
|
||||
margin-top: 20rpx;
|
||||
height: auto;
|
||||
background-color: white;
|
||||
padding: 20rpx;
|
||||
border-radius: 20rpx;
|
||||
display: flex;
|
||||
// align-items: center;
|
||||
|
||||
.left {
|
||||
margin-right: 20rpx;
|
||||
width: 158rpx;
|
||||
height: 158rpx;
|
||||
border-radius: 20rpx;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.right {
|
||||
.head {
|
||||
font-weight: bold;
|
||||
// color: red;
|
||||
|
||||
}
|
||||
|
||||
.li {
|
||||
display: flex;
|
||||
font-size: 26.29rpx;
|
||||
margin-bottom: 10rpx;
|
||||
align-items: center;
|
||||
|
||||
text {
|
||||
margin: 0 20rpx 0 5rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.address {
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
font-size: 28rpx;
|
||||
width: max-content;
|
||||
color: #fff;
|
||||
padding: 0 10rpx;
|
||||
}
|
||||
|
||||
.icon-xiangyou,
|
||||
.icon-dingwei {
|
||||
font-size: 30rpx;
|
||||
color: #fff;
|
||||
width: 200px;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.search-right.styleType2 .right-text,
|
||||
.search-right.styleType3 .right-text {
|
||||
color: #282828;
|
||||
@ -687,6 +886,27 @@
|
||||
}
|
||||
}
|
||||
|
||||
.hot_serch {
|
||||
color: #B3B3B3;
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
margin-top: 40rpx;
|
||||
|
||||
flex-wrap: wrap;
|
||||
// margin-top: 50rpx;
|
||||
// padding-top: 100rpx;
|
||||
padding-top: var(--status-bar-height);
|
||||
// margin-top: 10px;
|
||||
/* #ifdef H5 */
|
||||
padding-top: 50rpx;
|
||||
/* #endif */
|
||||
// margin-top: 200rpx;
|
||||
|
||||
text {
|
||||
margin: 10rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.productList .search .input {
|
||||
flex: 1;
|
||||
height: 60rpx;
|
||||
@ -730,7 +950,7 @@
|
||||
z-index: 9;
|
||||
position: fixed;
|
||||
left: 0;
|
||||
top: 25px;
|
||||
top: 25px;
|
||||
width: 100%;
|
||||
margin-top: 86rpx;
|
||||
background-color: #fff;
|
||||
@ -1109,7 +1329,7 @@
|
||||
|
||||
.no-shop {
|
||||
background-color: #fff;
|
||||
padding-bottom: calc(100% - 176rpx);
|
||||
// padding-bottom: calc(100% - 176rpx);
|
||||
|
||||
.pictrue {
|
||||
display: flex;
|
||||
@ -1123,12 +1343,13 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.guanbi {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
margin: 30px auto;
|
||||
}
|
||||
|
||||
|
||||
.pop {
|
||||
z-index: 1;
|
||||
}
|
||||
|
1319
pages/nongKe/supply_chain/supplierA.vue
Normal file
1144
pages/nongKe/supply_chain/suppliers.vue
Normal file
@ -8,7 +8,7 @@
|
||||
<view class="text flex_a_c"><i class="iconfont icon-xinghao"></i>上传店铺背景图</view>
|
||||
<block v-if="images[0].img">
|
||||
<u--image :showLoading="true" :src="images[0].img" width="388px" height="210.53rpx" radius="4px"
|
||||
@click="delImg(0)" mode="aspectFill"></u--image>
|
||||
@click="delImg(0)" mode="aspectFit"></u--image>
|
||||
</block>
|
||||
<view v-else class="upload" @click="seleckImage(0)">
|
||||
<view class="iconfont icon-tupian1"></view>
|
||||
@ -20,7 +20,7 @@
|
||||
<view class="text flex_a_c"><i class="iconfont icon-xinghao"></i>上传店铺头像</view>
|
||||
<block v-if="images[1].img">
|
||||
<u--image :showLoading="true" :src="images[1].img" width="210.53rpx" height="210.53rpx"
|
||||
radius="4px" @click="delImg(1)" mode="aspectFill"></u--image>
|
||||
radius="4px" @click="delImg(1)" mode="aspectFit"></u--image>
|
||||
</block>
|
||||
<view v-else class="avatar_img" @click="seleckImage(1)">
|
||||
<view class="iconfont icon-tupian1"></view>
|
||||
|
@ -15,7 +15,7 @@
|
||||
<!-- 头部导航 -->
|
||||
|
||||
|
||||
<view v-if="!isUser" class="header" :style="{backgroundColor:currentNav==1?'':'#ffffff'}">
|
||||
<!-- <view v-if="!isUser" class="header" :style="{backgroundColor:currentNav==1?'':'#ffffff'}">
|
||||
|
||||
<view class="tool-bar">
|
||||
<view class='iconfont icon-xiangzuo' @tap='goBack'></view>
|
||||
@ -29,7 +29,7 @@
|
||||
<view class="items" @click.stop="navTap(3)">
|
||||
<text class="tName" :class="currentNav==3?'on':''">列表</text>
|
||||
</view>
|
||||
</view>
|
||||
</view> -->
|
||||
<swiper v-show="currentNav !== 3" :style="'width: '+ windowWidth +'px; height: '+ windowHeight +'px;'"
|
||||
:vertical="true" @animationfinish="animationfinish" @change="change" :current="k" :indicator-dots="false">
|
||||
<swiper-item v-for="(list,index) in dataList">
|
||||
@ -54,6 +54,7 @@
|
||||
5.show-loading:这里默认去掉播放转圈的标志
|
||||
v-if="Math.abs(k-index)<=1"
|
||||
-->
|
||||
|
||||
<video :id="list.community_id+''+index" :loop="true" :muted="list.isplay"
|
||||
:autoplay="index == k && isRoutine" :controls="false" :http-cache="true"
|
||||
:page-gesture="false" :show-fullscreen-btn="false" :show-loading="false"
|
||||
@ -161,7 +162,7 @@
|
||||
<navigator v-if="list.author && userInfo.uid != list.author.uid" hover-class="none"
|
||||
:url="'/pages/plantGrass/plant_user/index?id='+list.uid" class="pictrue">
|
||||
<image class="userAvatar"
|
||||
:src="list.author&&list.author.avatar || '/static/images/f.png'" mode="aspectFill">
|
||||
:src="list.author&&list.author.avatar || '/static/images/f.png'" mode="aspectFit">
|
||||
</image>
|
||||
<view v-if="!list.is_fans || !userInfo.uid" class="guanzhu"
|
||||
@click.stop="followAuthor(list)"><text
|
||||
@ -226,13 +227,13 @@
|
||||
@scrolltolower="getGoods()">
|
||||
<block v-for="(item,index) in cateGoods" :key="index">
|
||||
<view class="goods_item" @click="gogogo(item)">
|
||||
<image class="goods_img" :src="item.image[0]" mode="aspectFill"></image>
|
||||
<image class="goods_img" :src="item.image[0]" mode="aspectFit"></image>
|
||||
<view class="botm">
|
||||
<view class="title">{{item.title}}</view>
|
||||
<view class="goods_info flex_a_c">
|
||||
<view class="l_info flex_a_c">
|
||||
<image :src="(item.author && item.author.avatar) || '/static/images/f.png'"
|
||||
mode="aspectFill" class="g_img"></image>
|
||||
mode="aspectFit" class="g_img"></image>
|
||||
<view class="g_name">{{item.author && item.author.nickname}}</view>
|
||||
</view>
|
||||
<view class="nice_box flex_a_c" @click.stop="giveStart(item)">
|
||||
@ -293,7 +294,7 @@
|
||||
<!-- #endif -->
|
||||
</view>
|
||||
<canvas class="canvas" canvas-id='myCanvas' v-if="canvasStatus"></canvas>
|
||||
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize>
|
||||
<!-- <authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize> -->
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@ -314,6 +315,7 @@
|
||||
HTTP_REQUEST_URL
|
||||
} from '@/config/app';
|
||||
import {
|
||||
deoList,
|
||||
videoList,
|
||||
myVideoList,
|
||||
graphicStartApi,
|
||||
@ -350,7 +352,7 @@
|
||||
deleteHeight: 0,
|
||||
dataList: [],
|
||||
k: 0,
|
||||
max: 2,
|
||||
max: 1,
|
||||
oldVideo: "",
|
||||
voice: "",
|
||||
timeout: "",
|
||||
@ -418,6 +420,7 @@
|
||||
watch: {
|
||||
k(new_k, old_k) {
|
||||
const max = new_k + 2;
|
||||
|
||||
if (this.max < max) {
|
||||
this.max = max;
|
||||
}
|
||||
@ -425,6 +428,7 @@
|
||||
this.oldCurrent = this.currentNav
|
||||
return false
|
||||
}
|
||||
|
||||
this.dataList[old_k].playIng = false //如果视频暂停,就加载封面
|
||||
this.dataList[old_k].isplay = true
|
||||
this.dataList[old_k].state = 'pause'
|
||||
@ -447,6 +451,7 @@
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
console.log(options)
|
||||
this.getOptions(options);
|
||||
this.videoID = options.id;
|
||||
this.isUser = options.user == 1 ? true : false;
|
||||
@ -731,42 +736,56 @@
|
||||
},
|
||||
get() {
|
||||
let that = this
|
||||
// 1.这里引入后端请求数据
|
||||
that.isUser ?
|
||||
myVideoList(that.userUid, {
|
||||
page: that.page,
|
||||
limit: that.limit,
|
||||
is_star: that.isSatrt,
|
||||
community_id: that.videoID
|
||||
}).then(res => {
|
||||
that.videoData(res.data.list)
|
||||
if (res.data.list.length < that.limit) {
|
||||
this.loadMore = false;
|
||||
}
|
||||
}).catch(err => {
|
||||
return uni.showToast({
|
||||
title: err,
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
}) :
|
||||
graphicLstApi({
|
||||
page: that.page,
|
||||
limit: that.limit,
|
||||
category_id: -1
|
||||
}).then(res => {
|
||||
that.videoData(res.data.list)
|
||||
if (res.data.list.length < that.limit) {
|
||||
this.loadMore = false;
|
||||
}
|
||||
}).catch(err => {
|
||||
return uni.showToast({
|
||||
title: err,
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
})
|
||||
that.loadVideo = true
|
||||
that.loadVideo = true
|
||||
deoList(that.videoID).then(res => {
|
||||
// console.log(res.data)
|
||||
that.videoData([res.data])
|
||||
if (res.data.list.length < that.limit) {
|
||||
this.loadMore = false;
|
||||
}
|
||||
}).catch(err => {
|
||||
return uni.showToast({
|
||||
title: err,
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
})
|
||||
|
||||
// myVideoList(that.userUid, {
|
||||
// page: that.page,
|
||||
// limit: that.limit,
|
||||
// is_star: that.isSatrt,
|
||||
// community_id: that.videoID
|
||||
// }).then(res => {
|
||||
// that.videoData(res.data.list)
|
||||
// if (res.data.list.length < that.limit) {
|
||||
// this.loadMore = false;
|
||||
// }
|
||||
// }).catch(err => {
|
||||
// return uni.showToast({
|
||||
// title: err,
|
||||
// icon: 'none',
|
||||
// duration: 2000
|
||||
// });
|
||||
// })
|
||||
// :
|
||||
// graphicLstApi({
|
||||
// page: that.page,
|
||||
// limit: that.limit,
|
||||
// category_id: -1
|
||||
// }).then(res => {
|
||||
// that.videoData(res.data.list)
|
||||
// if (res.data.list.length < that.limit) {
|
||||
// this.loadMore = false;
|
||||
// }
|
||||
// }).catch(err => {
|
||||
// return uni.showToast({
|
||||
// title: err,
|
||||
// icon: 'none',
|
||||
// duration: 2000
|
||||
// });
|
||||
// })
|
||||
|
||||
},
|
||||
getFocusList() {
|
||||
let that = this;
|
||||
@ -802,16 +821,21 @@
|
||||
msg[i]['isplay'] = true
|
||||
msg[i]['loading'] = false
|
||||
that.dataList.push(msg[i])
|
||||
{console.log(i,that.k)}
|
||||
//#ifndef H5
|
||||
|
||||
if (i == 0 && that.k == 0) {
|
||||
|
||||
this.dataList[0].isplay = false
|
||||
this.dataList[0].playIng = true
|
||||
this.dataList[0].state = 'play'
|
||||
this.dataList[0].loading = false
|
||||
console.log('32')
|
||||
uni.createVideoContext(that.dataList[0].community_id + '' + 0, that).play()
|
||||
}
|
||||
//#endif
|
||||
}
|
||||
|
||||
//#ifdef MP
|
||||
if (this.k == 0) {
|
||||
this.videoShare(this.dataList[0]);
|
||||
@ -1258,8 +1282,8 @@
|
||||
z-index: 9;
|
||||
width: 750rpx;
|
||||
height: 120rpx;
|
||||
|
||||
|
||||
|
||||
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
@ -1371,7 +1395,7 @@
|
||||
|
||||
.userInfo {
|
||||
position: absolute;
|
||||
bottom: 60rpx;
|
||||
bottom: 120px;
|
||||
right: 20rpx;
|
||||
flex-direction: column;
|
||||
text-align: center;
|
||||
|
@ -1198,7 +1198,7 @@
|
||||
this.isTriggered = true;
|
||||
const newList = this.goods.reverse();
|
||||
this.goods = newList;
|
||||
this.getProductSpu()
|
||||
// this.getProductSpu()
|
||||
setTimeout(() => {
|
||||
this.isTriggered = false;
|
||||
}, 500)
|
||||
@ -1210,7 +1210,7 @@
|
||||
// 模拟触底刷新
|
||||
if (this.tabActive == 0) {
|
||||
setTimeout(() => {
|
||||
this.goods.push(...this.goods);
|
||||
// this.goods.push(...this.goods);
|
||||
}, 500)
|
||||
}
|
||||
},
|
||||
@ -1220,7 +1220,8 @@
|
||||
setTimeout(() => {
|
||||
const newList = this.goods.reverse();
|
||||
this.goods = newList;
|
||||
this.getProductSpu()
|
||||
// this.getGoods()
|
||||
// this.getProductSpu()
|
||||
// uni.startPullDownRefresh();
|
||||
// uni.stopPullDownRefresh();
|
||||
}, 500)
|
||||
|
2480
pages/user/index.vue
@ -49,17 +49,27 @@
|
||||
<view class='name'>¥{{items.cart_info.productAttr.price}}</view>
|
||||
<view class='name'>x {{items.product_num}}</view>
|
||||
</view>
|
||||
<!-- <view class="totalfooter">
|
||||
<!-- <view class="totalfooter">
|
||||
<view class='bnt b-color' v-if="items.is_imported == 0 && item.orderProduct.length > 1"
|
||||
@click="importshop(items.order_id,items.product_id,items.product_sku)">
|
||||
立即导入</view>
|
||||
</view> -->
|
||||
</view>
|
||||
<view class="totalfooter">
|
||||
<view class='bnt b-color' v-if="!item.orderProduct[indexs]"
|
||||
|
||||
<view class="totalfooter" v-if="items.is_imported == 1 ">
|
||||
<view class='bnt b-color'>
|
||||
已导入</view>
|
||||
</view>
|
||||
<view class="totalfooter" v-else>
|
||||
<view class='bnt b-color'
|
||||
@click="importshop(item.order_id,item.orderProduct[indexs].product_id,item.orderProduct[indexs].product_sku)">
|
||||
立即导入</view>
|
||||
</view>
|
||||
<!-- <view class="totalfooter">
|
||||
<view class='bnt b-color'
|
||||
@click="importshop(item.order_id,item.orderProduct[indexs].product_id,item.orderProduct[indexs].product_sku)">
|
||||
立即导入</view>
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
|
@ -8,7 +8,7 @@
|
||||
<text class="iconfont icon-sousuo"></text>
|
||||
<input v-model="where.keyword" confirm-type="search" placeholder="请输入关键字" class="input" />
|
||||
<view class="search_btn">
|
||||
<image src="@/static/images/serchbtn.png" mode="aspectFill" @click="handleSearch">
|
||||
<image src="@/static/images/serchbtn.png" mode="aspectFit" @click="handleSearch">
|
||||
</image>
|
||||
|
||||
</view>
|
||||
|
@ -10,10 +10,10 @@
|
||||
<view class='money'>{{userInfo.now_money || 0}}</view>
|
||||
</view>
|
||||
<!-- #ifdef APP-PLUS || H5 -->
|
||||
<navigator v-if="recharge_switch == 1" url="/pages/users/user_payment/index" hover-class="none" class='recharge t-color'>充值</navigator>
|
||||
<navigator url="/pages/users/user_payment/index" hover-class="none" class='recharge t-color'>充值</navigator>
|
||||
<!-- #endif -->
|
||||
<!-- #ifdef MP -->
|
||||
<view v-if="recharge_switch == 1" @click="openSubscribe('/pages/users/user_payment/index')" class='recharge t-color'>充值</view>
|
||||
<view @click="openSubscribe('/pages/users/user_payment/index')" class='recharge t-color'>充值</view>
|
||||
<!-- #endif -->
|
||||
</view>
|
||||
<view class='cumulative acea-row row-top'>
|
||||
@ -52,7 +52,7 @@
|
||||
</navigator>
|
||||
</view>
|
||||
</view>
|
||||
<recommend v-if="recommend_switch == 1" :hostProduct="hostProduct" :isLogin="isLogin"></recommend>
|
||||
<recommend :hostProduct="hostProduct" :isLogin="isLogin"></recommend>
|
||||
</view>
|
||||
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize>
|
||||
</view>
|
||||
|
BIN
static/images/GXSC/BBY.png
Normal file
After Width: | Height: | Size: 33 KiB |
BIN
static/images/GXSC/DH.png
Normal file
After Width: | Height: | Size: 2.4 KiB |
BIN
static/images/GXSC/DW.png
Normal file
After Width: | Height: | Size: 2.9 KiB |
BIN
static/images/GXSC/GXZH.png
Normal file
After Width: | Height: | Size: 32 KiB |
BIN
static/images/GXSC/JDMS.png
Normal file
After Width: | Height: | Size: 31 KiB |
BIN
static/images/GXSC/JJRB.png
Normal file
After Width: | Height: | Size: 36 KiB |
BIN
static/images/GXSC/JYPX.png
Normal file
After Width: | Height: | Size: 36 KiB |
BIN
static/images/GXSC/MSGY.png
Normal file
After Width: | Height: | Size: 27 KiB |
BIN
static/images/GXSC/NFCP.png
Normal file
After Width: | Height: | Size: 35 KiB |
BIN
static/images/GXSC/NMJD.png
Normal file
After Width: | Height: | Size: 36 KiB |
BIN
static/images/GXSC/NYSC.png
Normal file
After Width: | Height: | Size: 35 KiB |
BIN
static/images/GXSC/PF.png
Normal file
After Width: | Height: | Size: 779 B |
BIN
static/images/GXSC/SCFW.png
Normal file
After Width: | Height: | Size: 30 KiB |
BIN
static/images/GXSC/SHFW.png
Normal file
After Width: | Height: | Size: 32 KiB |
BIN
static/images/GXSC/SJ.png
Normal file
After Width: | Height: | Size: 2.1 KiB |
BIN
static/images/GXSC/SJicon.png
Normal file
After Width: | Height: | Size: 3.0 KiB |
BIN
static/images/GXSC/SS.png
Normal file
After Width: | Height: | Size: 5.7 KiB |
BIN
static/images/GXSC/WLSY.png
Normal file
After Width: | Height: | Size: 29 KiB |
BIN
static/images/GXSC/WYLY.png
Normal file
After Width: | Height: | Size: 37 KiB |
BIN
static/images/GXSC/YLBJ.png
Normal file
After Width: | Height: | Size: 32 KiB |
BIN
static/images/GXSC/ZXJZ.png
Normal file
After Width: | Height: | Size: 25 KiB |
BIN
static/images/MYTC/BG.png
Normal file
After Width: | Height: | Size: 408 KiB |
BIN
static/images/MYTC/PF.png
Normal file
After Width: | Height: | Size: 779 B |
BIN
static/images/MYTC/SCFW.png
Normal file
After Width: | Height: | Size: 30 KiB |
BIN
static/images/MYTC/SHFW.png
Normal file
After Width: | Height: | Size: 32 KiB |
BIN
static/images/MYTC/SJ.png
Normal file
After Width: | Height: | Size: 2.1 KiB |
BIN
static/images/MYTC/SJicon.png
Normal file
After Width: | Height: | Size: 3.0 KiB |
BIN
static/images/MYTC/SS.png
Normal file
After Width: | Height: | Size: 6.7 KiB |
BIN
static/images/f1.png
Normal file
After Width: | Height: | Size: 154 KiB |
BIN
static/images/f2.png
Normal file
After Width: | Height: | Size: 184 KiB |
BIN
static/images/f3.png
Normal file
After Width: | Height: | Size: 184 KiB |
BIN
static/images/f4.png
Normal file
After Width: | Height: | Size: 113 KiB |
BIN
static/images/f5.png
Normal file
After Width: | Height: | Size: 337 KiB |
BIN
static/images/f6.png
Normal file
After Width: | Height: | Size: 177 KiB |
BIN
static/images/f7.png
Normal file
After Width: | Height: | Size: 190 KiB |
BIN
static/images/p8.png
Normal file
After Width: | Height: | Size: 5.5 KiB |
BIN
static/images/p9.png
Normal file
After Width: | Height: | Size: 1.9 KiB |
BIN
static/images/pj.png
Normal file
After Width: | Height: | Size: 388 B |
BIN
static/images/pj1.png
Normal file
After Width: | Height: | Size: 340 B |
BIN
static/images/you.png
Normal file
After Width: | Height: | Size: 813 B |