Merge branch 'old' of https://gitea.lihaink.cn/mkm/nk-shop2.0 into wpf
@ -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)
|
||||
|
||||
|
||||
/**
|
||||
* 线下导入
|
||||
*/
|
||||
|
31
api/store.js
@ -467,7 +467,9 @@ export function getGeocoder(data) {
|
||||
*
|
||||
*/
|
||||
export function getStoreTypeApi() {
|
||||
return request.get('intention/type', {sift_store:0}, {
|
||||
return request.get('intention/type', {
|
||||
sift_store: 0
|
||||
}, {
|
||||
noAuth: true
|
||||
});
|
||||
}
|
||||
@ -544,3 +546,30 @@ export function priceRuleApi(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,7 +9,8 @@
|
||||
<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)">
|
||||
<block v-if="index == newData.order.isTake">
|
||||
@ -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;
|
||||
@ -170,6 +182,7 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.animated {
|
||||
animation-duration: .3s
|
||||
}
|
||||
|
@ -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,26 +98,27 @@
|
||||
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: {
|
||||
@ -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;
|
||||
@ -284,6 +266,8 @@
|
||||
height: 66.67rpx;
|
||||
margin-bottom: 26.32rpx;
|
||||
position: relative;
|
||||
z-index: 9999;
|
||||
|
||||
|
||||
// 位置
|
||||
.place_wrapper {
|
||||
|
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" : {
|
||||
|
43
pages.json
@ -95,9 +95,8 @@
|
||||
}
|
||||
|
||||
}, {
|
||||
"path" : "pages/moreProject/moreProject",
|
||||
"style" :
|
||||
{
|
||||
"path": "pages/moreProject/moreProject",
|
||||
"style": {
|
||||
"navigationBarTitleText": "更多功能",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
@ -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"
|
||||
}
|
||||
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -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,103 +1,158 @@
|
||||
<template>
|
||||
<view class="gather">
|
||||
<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 @click="selectLocation" v-if="isFshow">
|
||||
<view
|
||||
class="site-box flex_a_c_j_sb"
|
||||
:style="{ 'background-color': backColor }"
|
||||
>
|
||||
<view :class="['place_wrapper', 'flex_a_c', isFshow ? 'sitebox' : '']">
|
||||
<view
|
||||
:class="['iconfont', 'icon-weizhi', isFshow ? 'sitebox' : '']"
|
||||
style="margin-left: 20rpx"
|
||||
>
|
||||
</view>
|
||||
|
||||
<navigator url="/pages/chat/customer_list/index?type=0" hover-class="none">
|
||||
<view class="iconfont icon-xiaoxi" style="color:#fff;"></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 class="bg-img" v-if="isFshow">
|
||||
<img :src="bgColor" alt="">
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<zbpSwiper :isSelectPlace="true" :location_Arr="locationArr" @kkchange='kkchange'></zbpSwiper>
|
||||
<u-empty :show="jurisdiction" marginTop="80" mode="permission" :text="emptyText"
|
||||
icon="http://cdn.uviewui.com/uview/empty/permission.png"></u-empty>
|
||||
<block v-if="!jurisdiction">
|
||||
<view class="business com special_work">
|
||||
<zbpSwiper
|
||||
:isSelectPlace="true"
|
||||
:location_Arr="locationArr"
|
||||
:town="street"
|
||||
@kkchange="kkchange"
|
||||
></zbpSwiper>
|
||||
<u-empty
|
||||
:show="jurisdiction"
|
||||
mode="permission"
|
||||
:text="emptyText"
|
||||
icon="http://cdn.uviewui.com/uview/empty/permission.png"
|
||||
></u-empty>
|
||||
<view class="business com special_work" v-if="jurisdiction == false">
|
||||
<view class="title project">
|
||||
<view>更多功能</view>
|
||||
<view class="edit" @click="editFlag = !editFlag">{{editFlag?'完成':'编辑'}}</view>
|
||||
<view class="edit" @click="editFlag = !editFlag">{{
|
||||
editFlag ? "完成" : "编辑"
|
||||
}}</view>
|
||||
</view>
|
||||
<view class="content">
|
||||
<block v-if="nowMenuList.length>0">
|
||||
<u-transition v-for="(item, index) in nowMenuList" :key="item.name" show>
|
||||
<view class="examine" @click="editFlag?removeMenu(item):clickMenu(item.type, item.data)">
|
||||
<image class="icon_img" :src="`${prefix}${item.icon}`" mode="aspectFill">
|
||||
<block v-if="nowMenuList.length > 0">
|
||||
<u-transition
|
||||
v-for="(item, index) in nowMenuList"
|
||||
:key="item.name"
|
||||
show
|
||||
>
|
||||
<view
|
||||
class="examine"
|
||||
@click="
|
||||
editFlag ? removeMenu(item) : clickMenu(item.type, item.data)
|
||||
"
|
||||
>
|
||||
<image
|
||||
class="icon_img"
|
||||
:src="`${prefix}${item.icon}`"
|
||||
mode="aspectFit"
|
||||
>
|
||||
</image>
|
||||
<u-icon v-if="editFlag" class="icon" name="minus-circle-fill" color="red"></u-icon>
|
||||
<text class="text">{{item.name}}</text>
|
||||
<u-icon
|
||||
v-if="editFlag"
|
||||
class="icon"
|
||||
name="minus-circle-fill"
|
||||
color="red"
|
||||
></u-icon>
|
||||
<text class="text">{{ item.name }}</text>
|
||||
</view>
|
||||
</u-transition>
|
||||
</block>
|
||||
<view v-else-if="!editFlag" @click="editFlag = true" style="text-align: center;width: 100%;color: #aaa;">还没有应用,点我添加应用</view>
|
||||
<view
|
||||
v-else-if="!editFlag"
|
||||
@click="editFlag = true"
|
||||
style="text-align: center; width: 100%; color: #aaa"
|
||||
>还没有应用,点我添加应用</view
|
||||
>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="editFlag" class="business com special_work edit_card">
|
||||
<view class="title project" style="padding: 0 28rpx;">
|
||||
<view class="title project" style="padding: 0 28rpx">
|
||||
<view>编辑功能</view>
|
||||
<view class="edit2" @click="editComfirm">完成</view>
|
||||
</view>
|
||||
<view class="content">
|
||||
<u-transition v-for="(item, index) in AllMenuList" :key="item.name" show>
|
||||
<u-transition
|
||||
v-for="(item, index) in AllMenuList"
|
||||
:key="item.name"
|
||||
show
|
||||
>
|
||||
<view class="examine" @click="pushMenu(item)">
|
||||
<image class="icon_img" :src="`${prefix}${item.icon}`" mode="aspectFill">
|
||||
<image
|
||||
class="icon_img"
|
||||
:src="`${prefix}${item.icon}`"
|
||||
mode="aspectFit"
|
||||
>
|
||||
</image>
|
||||
<u-icon class="icon" name="plus-circle-fill"></u-icon>
|
||||
<text class="text">{{item.name}}</text>
|
||||
<text class="text">{{ item.name }}</text>
|
||||
</view>
|
||||
</u-transition>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
|
||||
<view class="" v-if='jurisdiction==false&&isShow==false'>
|
||||
<view class="" v-if="jurisdiction == false && isShow == false">
|
||||
<emptyPage title="暂无信息"></emptyPage>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import mTabbar from '@/components/m-tabbar/m-tabbar.vue'
|
||||
import emptyPage from '@/components/emptyPage.vue';
|
||||
import zbpSwiper from '@/components/zbpSwiper'
|
||||
import {
|
||||
import Cache from '@/utils/cache';
|
||||
import mTabbar from '@/components/m-tabbar/m-tabbar.vue'
|
||||
import emptyPage from '@/components/emptyPage.vue';
|
||||
import zbpSwiper from '@/components/zbpSwiper'
|
||||
import {
|
||||
getArea,
|
||||
getStreet
|
||||
} from '@/api/article.js';
|
||||
import {
|
||||
mapState,
|
||||
mapGetters
|
||||
} from 'vuex'
|
||||
import {
|
||||
} from 'vuex'
|
||||
import {
|
||||
getWorkArticleCount,
|
||||
getSlideAPI
|
||||
} from '@/api/article.js'
|
||||
import {
|
||||
} from '@/api/article.js'
|
||||
import {
|
||||
getStoreList,
|
||||
getUserInfo
|
||||
} from '@/api/user.js'
|
||||
import {
|
||||
} from '@/api/user.js'
|
||||
import {
|
||||
getGeocoder,
|
||||
microSeachBarCode,
|
||||
microEadtProduct
|
||||
} from '@/api/store.js'
|
||||
import {
|
||||
} from '@/api/store.js'
|
||||
import {
|
||||
Toast
|
||||
} from '@/libs/uniApi';
|
||||
import {
|
||||
} from '@/libs/uniApi';
|
||||
import {
|
||||
getDiy
|
||||
} from '@/api/api.js';
|
||||
import uniMP from '@/utils/uniMP.js';
|
||||
} from '@/api/api.js';
|
||||
import uniMP from '@/utils/uniMP.js';
|
||||
|
||||
export default {
|
||||
export default {
|
||||
components: {
|
||||
mTabbar,
|
||||
zbpSwiper,
|
||||
emptyPage
|
||||
},
|
||||
data() {
|
||||
data () {
|
||||
return {
|
||||
locationArr: ({}),
|
||||
emptyText: '暂无可用应用',
|
||||
@ -112,12 +167,11 @@
|
||||
isShow: false,
|
||||
bgColor: '',
|
||||
isFshow: false,
|
||||
street:'',
|
||||
street: '',
|
||||
// 编辑中标记
|
||||
editFlag: false,
|
||||
// 所有菜单的按钮
|
||||
AllMenuList: [
|
||||
{
|
||||
AllMenuList: [{
|
||||
name: '商户平台',
|
||||
icon: 'spgl.png',
|
||||
data: '/pages/moreProject/moreProject',
|
||||
@ -130,17 +184,25 @@
|
||||
type: 1,
|
||||
},
|
||||
],
|
||||
nowMenuList: []
|
||||
nowMenuList: [],
|
||||
street: '',
|
||||
showPicker: false,
|
||||
columnData: [],
|
||||
bgColor: '',
|
||||
isFshow: false,
|
||||
backColor: 'rgba(248, 66, 33, 0)'
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters(['userInfo', 'location', 'isLogin'])
|
||||
},
|
||||
created() {},
|
||||
onLoad() {
|
||||
created () { },
|
||||
onLoad () {
|
||||
this.Area()
|
||||
this.initMenu();
|
||||
},
|
||||
onShow() {
|
||||
|
||||
onShow () {
|
||||
if (this.isLogin) {
|
||||
this.emptyText = '暂无可用应用'
|
||||
this.jurisdiction = false
|
||||
@ -149,82 +211,190 @@
|
||||
this.jurisdiction = true
|
||||
}
|
||||
this.getUserInfo()
|
||||
this.appLocation()
|
||||
|
||||
},
|
||||
onPullDownRefresh() {
|
||||
|
||||
onPullDownRefresh () {
|
||||
this.getUserInfo()
|
||||
uni.stopPullDownRefresh()
|
||||
},
|
||||
mounted() {
|
||||
beforeDestroy () {
|
||||
// 销毁监听事件
|
||||
this.$bus.$off('value-updated')
|
||||
},
|
||||
mounted () {
|
||||
if (this.street.length <= 0) {
|
||||
this.appLocation()
|
||||
}
|
||||
// #ifdef H5
|
||||
// 监听页面滚动事件
|
||||
// 监听页面滚动事件
|
||||
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 {
|
||||
onPageScroll (e) {
|
||||
const scrollTop = e.scrollTop;
|
||||
if (scrollTop <= 20) {
|
||||
this.backColor = 'rgba(248, 66, 33, 0)'
|
||||
this.isFshow = false
|
||||
} else if (20 < scrollTop && scrollTop <= 100) {
|
||||
this.backColor = 'rgba(248, 66, 33, .5)'
|
||||
this.isFshow = true
|
||||
} else if (scrollTop > 100) {
|
||||
this.backColor = 'rgba(248, 66, 33, 1)'
|
||||
this.isFshow = true
|
||||
|
||||
|
||||
}
|
||||
|
||||
},
|
||||
// #endif
|
||||
|
||||
methods: {
|
||||
scrolling () {
|
||||
// 滚动条距文档顶部的距离
|
||||
let scrollTop =
|
||||
window.pageYOffset ||
|
||||
document.documentElement.scrollTop ||
|
||||
document.body.scrollTop;
|
||||
// 滚动条滚动的距离
|
||||
let scrollStep = scrollTop - this.oldScrollTop;
|
||||
// console.log("header 滚动距离 ", scrollTop);
|
||||
// 更新——滚动前,滚动条距文档顶部的距离
|
||||
this.oldScrollTop = scrollTop;
|
||||
|
||||
//变量windowHeight是可视区的高度
|
||||
let windowHeight =
|
||||
document.documentElement.clientHeight || document.body.clientHeight;
|
||||
//变量scrollHeight是滚动条的总高度
|
||||
let scrollHeight =
|
||||
document.documentElement.scrollHeight || document.body.scrollHeight;
|
||||
|
||||
//滚动条到底部的条件
|
||||
if (scrollTop + windowHeight == scrollHeight) {
|
||||
//你想做的事情
|
||||
// console.log("header 你已经到底部了");
|
||||
}
|
||||
|
||||
|
||||
if (scrollTop <= 20) {
|
||||
this.backColor = 'rgba(248, 66, 33, 0)'
|
||||
this.isFshow = false
|
||||
} else if (20 < scrollTop && scrollTop <= 100) {
|
||||
this.backColor = 'rgba(248, 66, 33, .5)'
|
||||
this.isFshow = true
|
||||
} else if (scrollTop > 100) {
|
||||
this.backColor = 'rgba(248, 66, 33, 1)'
|
||||
this.isFshow = true
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
// 初始化菜单
|
||||
initMenu(){
|
||||
initMenu () {
|
||||
let all = uni.getStorageSync('gatherAllMenuList');
|
||||
let now = uni.getStorageSync('gatherNowMenuList');
|
||||
if(all){
|
||||
if (all) {
|
||||
this.AllMenuList = JSON.parse(all);
|
||||
}
|
||||
if(now){
|
||||
if (now) {
|
||||
this.nowMenuList = JSON.parse(now);
|
||||
}
|
||||
},
|
||||
clickMenu(e, data){
|
||||
switch(e){
|
||||
case 1: this.getUniMp(data);break;
|
||||
case 2: this.navigator(data);break;
|
||||
clickMenu (e, data) {
|
||||
switch (e) {
|
||||
case 1:
|
||||
this.getUniMp(data);
|
||||
break;
|
||||
case 2:
|
||||
this.navigator(data);
|
||||
break;
|
||||
}
|
||||
},
|
||||
// 添加菜单
|
||||
pushMenu(data){
|
||||
pushMenu (data) {
|
||||
this.nowMenuList.push(data);
|
||||
this.AllMenuList = this.AllMenuList.filter((item)=>{
|
||||
return item.name!=data.name;
|
||||
this.AllMenuList = this.AllMenuList.filter((item) => {
|
||||
return item.name != data.name;
|
||||
})
|
||||
},
|
||||
// 移除菜单
|
||||
removeMenu(data){
|
||||
removeMenu (data) {
|
||||
this.AllMenuList.push(data);
|
||||
this.nowMenuList = this.nowMenuList.filter((item)=>{
|
||||
return item.name!=data.name;
|
||||
this.nowMenuList = this.nowMenuList.filter((item) => {
|
||||
return item.name != data.name;
|
||||
})
|
||||
},
|
||||
// 编辑完成
|
||||
editComfirm(){
|
||||
editComfirm () {
|
||||
this.editFlag = false;
|
||||
uni.setStorageSync('gatherAllMenuList', JSON.stringify(this.AllMenuList));
|
||||
uni.setStorageSync('gatherNowMenuList', JSON.stringify(this.nowMenuList));
|
||||
},
|
||||
getUniMp(appid){
|
||||
getUniMp (appid) {
|
||||
console.log('点击供销平台');
|
||||
// #ifdef APP-PLUS
|
||||
uniMP.loadMP(appid);
|
||||
return ;
|
||||
return;
|
||||
// #endif
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: 'H5不支持打开小程序'
|
||||
})
|
||||
},
|
||||
appLocation() {
|
||||
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);
|
||||
});
|
||||
},
|
||||
selectLocation () {
|
||||
this.showPicker = true
|
||||
},
|
||||
confirm (e) {
|
||||
this.street = e.value[1].name
|
||||
|
||||
this.$nextTick(() => {
|
||||
this.$bus.$emit('value-updated', e.value[1].name + ',' + e.value[1].code);
|
||||
|
||||
})
|
||||
this.showPicker = false
|
||||
},
|
||||
appLocation () {
|
||||
uni.getLocation({
|
||||
type: 'wgs84',
|
||||
timeout: '10',
|
||||
@ -238,8 +408,14 @@
|
||||
lat: latitude,
|
||||
long: longitude
|
||||
}).then(res => {
|
||||
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,
|
||||
@ -258,55 +434,18 @@
|
||||
});
|
||||
},
|
||||
|
||||
scrolling() {
|
||||
// 滚动条距文档顶部的距离
|
||||
let scrollTop =
|
||||
window.pageYOffset ||
|
||||
document.documentElement.scrollTop ||
|
||||
document.body.scrollTop;
|
||||
// 滚动条滚动的距离
|
||||
let scrollStep = scrollTop - this.oldScrollTop;
|
||||
console.log("header 滚动距离 ", scrollTop);
|
||||
// 更新——滚动前,滚动条距文档顶部的距离
|
||||
this.oldScrollTop = scrollTop;
|
||||
|
||||
//变量windowHeight是可视区的高度
|
||||
let windowHeight =
|
||||
document.documentElement.clientHeight || document.body.clientHeight;
|
||||
//变量scrollHeight是滚动条的总高度
|
||||
let scrollHeight =
|
||||
document.documentElement.scrollHeight || document.body.scrollHeight;
|
||||
|
||||
//滚动条到底部的条件
|
||||
if (scrollTop + windowHeight == scrollHeight) {
|
||||
//你想做的事情
|
||||
console.log("header 你已经到底部了");
|
||||
}
|
||||
if (scrollStep < 0) {
|
||||
this.isFshow = false
|
||||
console.log("header 滚动条向上滚动了!");
|
||||
} else {
|
||||
this.isFshow = true
|
||||
console.log("header 滚动条向下滚动了!");
|
||||
}
|
||||
// 判断是否到了最顶部
|
||||
if (scrollTop <= 0) {
|
||||
this.isFshow = false
|
||||
console.log("header 到了最顶部")
|
||||
}
|
||||
},
|
||||
|
||||
kkchange(e) {
|
||||
kkchange (e) {
|
||||
this.bgColor = e
|
||||
},
|
||||
|
||||
navigator(url, t) {
|
||||
navigator (url, t) {
|
||||
// if (this.userInfoData.is_wsxx === 0 && t != '商户设置') return Toast("请完善商户信息");
|
||||
uni.navigateTo({
|
||||
url: url
|
||||
})
|
||||
},
|
||||
getUserInfo: function() {
|
||||
getUserInfo: function () {
|
||||
let that = this;
|
||||
getUserInfo().then(res => {
|
||||
that.userInfoData = res.data;
|
||||
@ -326,47 +465,51 @@
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.gather {
|
||||
.gather {
|
||||
padding-bottom: 164.91rpx;
|
||||
background: linear-gradient(180deg, #FFFFFF 0%, #F6F6F6 100%);
|
||||
background: linear-gradient(180deg, #ffffff 0%, #f6f6f6 100%);
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.sitebox {
|
||||
animation-name: fadeIn;
|
||||
animation-duration: 3s;
|
||||
animation-fill-mode: forwards;
|
||||
}
|
||||
|
||||
@keyframes fadeIn {
|
||||
from {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.bg-img {
|
||||
position: absolute;
|
||||
to {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
.site-box {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
top: 0;
|
||||
/* #ifdef MP || APP-PLUS */
|
||||
z-index: -100;
|
||||
height: 160rpx;
|
||||
/* #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);
|
||||
}
|
||||
}
|
||||
|
||||
.site-box {
|
||||
width: 100%;
|
||||
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 */
|
||||
|
||||
padding-right: 20rpx;
|
||||
|
||||
// 位置
|
||||
@ -375,33 +518,36 @@
|
||||
margin-right: 24.56rpx;
|
||||
font-size: 30rpx;
|
||||
|
||||
opacity: 0;
|
||||
|
||||
.town_name {
|
||||
margin-left: 21rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.iconfont {
|
||||
opacity: 0;
|
||||
font-size: 30rpx;
|
||||
font-size: 35.09rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.top_box {
|
||||
.top_box {
|
||||
// padding-top: 180rpx;
|
||||
background: linear-gradient(#36A2FF, #fff);
|
||||
}
|
||||
background: linear-gradient(#36a2ff, #fff);
|
||||
}
|
||||
|
||||
.com {
|
||||
.com {
|
||||
margin-left: 50%;
|
||||
transform: translate(-50%);
|
||||
}
|
||||
}
|
||||
|
||||
.business {
|
||||
.business {
|
||||
width: 694.74rpx;
|
||||
// margin-bottom: 175rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.special_work {
|
||||
.special_work {
|
||||
// padding: 17.54rpx;
|
||||
width: 694.74rpx;
|
||||
margin-top: 52.63rpx;
|
||||
@ -414,19 +560,22 @@
|
||||
margin-bottom: 38.6rpx;
|
||||
}
|
||||
|
||||
.project{
|
||||
.project {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: flex-end;
|
||||
.edit{
|
||||
|
||||
.edit {
|
||||
font-size: 26rpx;
|
||||
font-weight: 400;
|
||||
&::after{
|
||||
content: '>';
|
||||
|
||||
&::after {
|
||||
content: ">";
|
||||
margin-left: 10rpx;
|
||||
}
|
||||
}
|
||||
.edit2{
|
||||
|
||||
.edit2 {
|
||||
font-size: 26rpx;
|
||||
font-weight: 400;
|
||||
}
|
||||
@ -453,7 +602,7 @@
|
||||
height: 63.16rpx;
|
||||
}
|
||||
|
||||
.icon{
|
||||
.icon {
|
||||
position: absolute;
|
||||
top: 0rpx;
|
||||
right: 25rpx;
|
||||
@ -488,10 +637,10 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.edit_card{
|
||||
.edit_card {
|
||||
background-color: #fff;
|
||||
padding-top: 28rpx;
|
||||
}
|
||||
}
|
||||
</style>
|
@ -11,17 +11,18 @@
|
||||
<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>
|
||||
<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>
|
||||
<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="iconfont"
|
||||
:class="item.relevance_id ? 'icon-shoucang1' : 'icon-dianzan'"></text>
|
||||
<text class="collect">{{item.count_start}}</text>
|
||||
</view>
|
||||
</view>
|
||||
@ -52,12 +53,29 @@
|
||||
<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'
|
||||
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,
|
||||
@ -115,6 +133,7 @@
|
||||
this.where.street_id = e.value[1].code
|
||||
this.showPicker = false
|
||||
},
|
||||
|
||||
changeHandler(e) {
|
||||
const {
|
||||
columnIndex,
|
||||
@ -149,13 +168,9 @@
|
||||
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
|
||||
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
|
||||
@ -203,12 +218,7 @@
|
||||
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
|
||||
})
|
||||
}
|
||||
},
|
||||
@ -219,7 +229,10 @@
|
||||
let latitude, longitude;
|
||||
latitude = res.latitude.toString();
|
||||
longitude = res.longitude.toString();
|
||||
getGeocoder({ lat: latitude, long: longitude }).then(res => {
|
||||
getGeocoder({
|
||||
lat: latitude,
|
||||
long: longitude
|
||||
}).then(res => {
|
||||
this.$store.commit('setLocation', res.data)
|
||||
this.street = res.data.address_component.street
|
||||
}).catch(err => {
|
||||
|
@ -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,23 +1,30 @@
|
||||
<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="['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" style="color:#fff;"></view>
|
||||
<view :class="['iconfont','icon-xiaoxi',isFshow?'sitebox':'']" style="color:#fff;"></view>
|
||||
</navigator>
|
||||
<view class="bg-img" v-if="isFshow">
|
||||
</view>
|
||||
<!-- <view class="site-box ','flex_a_c_j_sb'" v-if="ishshow">
|
||||
<view class="bg-img">
|
||||
<img :src="bgColor" alt="">
|
||||
</view>
|
||||
</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>
|
||||
|
||||
|
||||
|
||||
@ -29,8 +36,44 @@
|
||||
|
||||
</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,31 +253,49 @@
|
||||
})
|
||||
|
||||
},
|
||||
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
|
||||
|
||||
@ -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%;
|
||||
/* #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,6 +226,51 @@
|
||||
</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>
|
||||
@ -292,7 +337,7 @@
|
||||
isShow: false,
|
||||
bgColor: '',
|
||||
isFshow: false,
|
||||
street:''
|
||||
street: ''
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
@ -317,25 +362,10 @@
|
||||
},
|
||||
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: {
|
||||
|
||||
|
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>
|
||||
@ -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="top">
|
||||
<view style="height: 10px;">
|
||||
|
||||
</view>
|
||||
<view style="display: flex;justify-content: space-around; align-items: center;">
|
||||
<view class="back" @click='backjJump()'>
|
||||
<view class="iconfont icon-xiangzuo"></view>
|
||||
<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>
|
||||
</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='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 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>
|
||||
<!-- <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}}
|
||||
</u-scroll-list>
|
||||
</view>
|
||||
<view class="iconfont icon-xiangyou" v-if="recommend_address"></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>
|
||||
<view class="nav-wrapper" :class="'styleType'+store_street_theme">
|
||||
<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)'>
|
||||
@ -34,7 +115,11 @@
|
||||
|
||||
</view>
|
||||
</view>
|
||||
|
||||
-->
|
||||
|
||||
<!-- 店铺 -->
|
||||
<!--
|
||||
<block>
|
||||
<view class="store-wrapper">
|
||||
<view class="store-item" v-for="(item,index) in storeList" :key="index">
|
||||
@ -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>
|
||||
@ -190,7 +278,8 @@
|
||||
<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)
|
||||
},
|
||||
// 右侧切换
|
||||
@ -616,49 +752,112 @@
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.productList .search {
|
||||
width: 100%;
|
||||
height: 146rpx;
|
||||
padding: 0 20rpx;
|
||||
box-sizing: border-box;
|
||||
* {
|
||||
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;
|
||||
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);
|
||||
z-index: 999;
|
||||
width: 100%;
|
||||
// margin-top: 10px;
|
||||
}
|
||||
|
||||
.search-right {
|
||||
.content {
|
||||
padding: 20rpx;
|
||||
}
|
||||
|
||||
.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;
|
||||
justify-content: space-between;
|
||||
max-width: max-content;
|
||||
flex: 1;
|
||||
padding-left: 20rpx;
|
||||
|
||||
text {
|
||||
margin: 0 20rpx 0 5rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.right-text {
|
||||
.address {
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
font-size: 28rpx;
|
||||
width: max-content;
|
||||
color: #fff;
|
||||
padding: 0 10rpx;
|
||||
width: 200px;
|
||||
}
|
||||
}
|
||||
|
||||
.icon-xiangyou,
|
||||
.icon-dingwei {
|
||||
font-size: 30rpx;
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
|
||||
.search-right.styleType2 .right-text,
|
||||
.search-right.styleType3 .right-text {
|
||||
@ -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;
|
||||
@ -1109,7 +1329,7 @@
|
||||
|
||||
.no-shop {
|
||||
background-color: #fff;
|
||||
padding-bottom: calc(100% - 176rpx);
|
||||
// padding-bottom: calc(100% - 176rpx);
|
||||
|
||||
.pictrue {
|
||||
display: flex;
|
||||
@ -1123,6 +1343,7 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.guanbi {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
|
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>
|
||||
|
@ -1,5 +1,6 @@
|
||||
<template>
|
||||
<view class="container">
|
||||
|
||||
<!--
|
||||
注意:这是 App 所用页面,请勿引入微信小程序或浏览器运行,最好运行在真机
|
||||
|
||||
@ -20,8 +21,8 @@
|
||||
】
|
||||
-->
|
||||
<!-- 头部导航 -->
|
||||
<view v-if="!isUser" class="header" :style="{backgroundColor:currentNav==1?'':'#fff'}" >
|
||||
<!-- <view class="items" @click.stop="navTap(2)">
|
||||
<!-- <view v-if="!isUser" class="header" :style="{backgroundColor:currentNav==1?'':'#000'}" >
|
||||
<view class="items" @click.stop="navTap(2)">
|
||||
<text class="tName" :class="currentNav==2?'on':''">关注</text>
|
||||
</view>
|
||||
<view class="items" @click.stop="navTap(1)">
|
||||
@ -29,14 +30,14 @@
|
||||
</view>
|
||||
<view class="items" @click.stop="navTap(3)">
|
||||
<text class="tName" :class="currentNav==3?'on':''">列表</text>
|
||||
</view> -->
|
||||
</view>
|
||||
<view class="noVideo acea-row row-center-wrapper" v-if="!dataList.length && !loadVideo">
|
||||
</view> -->
|
||||
<!-- <view class="noVideo acea-row row-center-wrapper" v-if="!dataList.length && !loadVideo">
|
||||
<view>
|
||||
<image :src="imgHost+'/static/no-video.png'" class="pictrue"></image>
|
||||
<text class="tips">暂无短视频内容哦~</text>
|
||||
</view>
|
||||
</view>
|
||||
</view> -->
|
||||
<view v-if="currentNav !== 3" :style="'width: '+ windowWidth +'px; height: '+ boxStyle.height +'px;'">
|
||||
<!--
|
||||
1.这里的 swiper 不是用来控制视频滑动的,而是用来控制左右滑动的,如果不需要的可以改成 view
|
||||
@ -47,9 +48,9 @@
|
||||
(1)Mac:按住 option 键,然后点击方法名,即可跳转到方法
|
||||
(2)windows:按住 Alt 键,然后鼠标左击,即可跳转到方法
|
||||
-->
|
||||
<list @loadmore="getData" @scroll="scrolls" :loadmoreoffset="wHeight*1" :show-scrollbar="false" ref="listBox"
|
||||
:pagingEnabled="true" :scrollable="true">
|
||||
<!-- 刷新模块 -->
|
||||
<list @loadmore="getData" @scroll="scrolls" :loadmoreoffset="wHeight*1" :show-scrollbar="false"
|
||||
ref="listBox" :pagingEnabled="true" :scrollable="true">
|
||||
|
||||
<refresh class="refresh" @refresh="onrefresh" @pullingdown="onpullingdown"
|
||||
:display="refreshing ? 'show' : 'hide'">
|
||||
<loading style="background-color: #FFFFFF;">
|
||||
@ -63,7 +64,7 @@
|
||||
<!-- 用div把视频模组套起来 -->
|
||||
<div :style="'width: '+ windowWidth +'px; height: '+ boxStyle.height +'px;'">
|
||||
<!-- <view v-if="Math.abs(k-i)<=1"> -->
|
||||
<view v-if="max > i">
|
||||
<view v-if="Math.abs(k-i)<=1">
|
||||
<view class="root">
|
||||
<!--
|
||||
具体视频参数可以参考官方文档
|
||||
@ -94,15 +95,17 @@
|
||||
(6)在 timeupdate 方法里加入,if(index == this.k){把里面的加一个总的判断}
|
||||
3.其他的下面有详解
|
||||
-->
|
||||
<video :ref="'item'+i" :id="item.community_id" :loop="true" :autoplay="i == k" :src="item.video_link"
|
||||
:muted="item.isplay" :enable-progress-gesture="false" :page-gesture="false" :controls="false"
|
||||
:show-loading="true" :show-fullscreen-btn="false" :show-center-play-btn="false" :style="boxStyle"
|
||||
<video :ref="'item'+i" :id="item.community_id" :loop="true" :autoplay="i == k"
|
||||
:src="item.video_link" :muted="item.isplay" :enable-progress-gesture="false"
|
||||
:page-gesture="false" :controls="false" :show-loading="true"
|
||||
:show-fullscreen-btn="false" :show-center-play-btn="false" :style="boxStyle"
|
||||
:object-fit="object_fit" @timeupdate="timeupdate($event,i)"></video>
|
||||
</view>
|
||||
<!-- 直接用 view 就行了,一样是可以覆盖原生组件的 -->
|
||||
<!-- 这个是暂停时出现的图标 -->
|
||||
<view class="videoHover" @click="tapVideoHover(item.state,$event)" :style="boxStyle">
|
||||
<image v-if="item.state=='pause'" class="playState" src="../static/img/index/play.png"></image>
|
||||
<image v-if="item.state=='pause'" class="playState" src="../static/img/index/play.png">
|
||||
</image>
|
||||
</view>
|
||||
<!--审核状态-->
|
||||
<view v-if="item.status==-1 || item.status==0 || item.status==-2" class="video-status">
|
||||
@ -137,19 +140,23 @@
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="item.relevance.length > 0 && k==i" class="product">
|
||||
<scroll-view class="scroll-view" scroll-x="true" style="white-space: nowrap; display: flex;"
|
||||
scroll-with-animation show-scrollbar="true">
|
||||
<scroll-view class="scroll-view" scroll-x="true"
|
||||
style="white-space: nowrap; display: flex;" scroll-with-animation
|
||||
show-scrollbar="true">
|
||||
<view class="product-item" v-for="(goods,idx) in item.relevance" :key="idx">
|
||||
<view v-if="goods.spu" class="item-count acea-row" @click="goDetail(goods.spu)">
|
||||
<view v-if="goods.spu" class="item-count acea-row"
|
||||
@click="goDetail(goods.spu)">
|
||||
<view class="picture">
|
||||
<image class="image" :src="goods.spu.image"></image>
|
||||
</view>
|
||||
<view class="product-text">
|
||||
<text class="name line1"
|
||||
v-if="goods.spu && goods.spu.store_name.length>=12">{{goods.spu.store_name.slice(0,12)}}...</text>
|
||||
<text class="name line1" v-else>{{goods.spu && goods.spu.store_name}}</text>
|
||||
<text class="name line1"
|
||||
v-else>{{goods.spu && goods.spu.store_name}}</text>
|
||||
<view class="product-price">
|
||||
<view class="price"><text class="sm">¥</text><text class="money">{{goods.spu.price}}</text>
|
||||
<view class="price"><text class="sm">¥</text><text
|
||||
class="money">{{goods.spu.price}}</text>
|
||||
</view>
|
||||
<text class="buy-btn">购买</text>
|
||||
</view>
|
||||
@ -170,30 +177,36 @@
|
||||
<!-- 1.头像 -->
|
||||
<navigator v-if="userInfo.uid != item.author.uid" hover-class="none"
|
||||
:url="'/pages/plantGrass/plant_user/index?id='+item.uid" class="pictrue">
|
||||
<image class="userAvatar" :src="item.author.avatar || '/static/images/f.png'" mode="aspectFill">
|
||||
<image class="userAvatar" :src="item.author.avatar || '/static/images/f.png'"
|
||||
mode="aspectFit">
|
||||
</image>
|
||||
<view v-if="!item.is_fans || userInfo.uid == 0" class="guanzhu" @click.stop="followAuthor(item)"><text
|
||||
<view v-if="!item.is_fans || userInfo.uid == 0" class="guanzhu"
|
||||
@click.stop="followAuthor(item)"><text
|
||||
class="iconfont icon-shangpinshuliang-jia">+</text></view>
|
||||
<view v-else class="yiguanzhu"><text class="iconfont"></text></view>
|
||||
</navigator>
|
||||
<!-- 2.点赞 -->
|
||||
<view @click="cLike(item);" style="margin-top: 5px;" :class="{'likeNumActive':item.relevance_id}">
|
||||
<image v-if="item.relevance_id" src="../static/img/index/xin.png" style="width: 32px; height: 32px;">
|
||||
<view @click="cLike(item);" style="margin-top: 5px;"
|
||||
:class="{'likeNumActive':item.relevance_id}">
|
||||
<image v-if="item.relevance_id" src="../static/img/index/xin.png"
|
||||
style="width: 32px; height: 32px;">
|
||||
</image>
|
||||
<image v-if="!item.relevance_id" src="../static/img/index/xin-2.png"
|
||||
style="width: 32px; height: 32px;"></image>
|
||||
<text class="info-text">{{item.count_start > 0 ? item.count_start : '点赞'}}</text>
|
||||
</view>
|
||||
<!-- 3.评论 -->
|
||||
<view v-if="community_reply_status == 1 && item.status == 1" class="comment" @click="toComment(item,i)"
|
||||
style="margin-top: 18px;">
|
||||
<image src="../static/img/index/evaluate.png" style="width: 54rpx; height: 50rpx;"></image>
|
||||
<view v-if="community_reply_status == 1 && item.status == 1" class="comment"
|
||||
@click="toComment(item,i)" style="margin-top: 18px;">
|
||||
<image src="../static/img/index/evaluate.png" style="width: 54rpx; height: 50rpx;">
|
||||
</image>
|
||||
<text class="info-text">{{item.count_reply>0 ? item.count_reply : '评论'}}</text>
|
||||
</view>
|
||||
<!-- 4.分享 -->
|
||||
<view v-if="item.status == 1" @click="appShare('WXSceneSession',item.community_id)"
|
||||
style="margin-top: 17px;">
|
||||
<image src="../static/img/index/share-fill.png" style="width: 40px; height: 40px;"></image>
|
||||
<image src="../static/img/index/share-fill.png" style="width: 40px; height: 40px;">
|
||||
</image>
|
||||
<text class="info-text">分享</text>
|
||||
</view>
|
||||
<!-- 5.自己的视频 -->
|
||||
@ -216,12 +229,15 @@
|
||||
<view v-if="showManage" class="manage">
|
||||
<view class="manage-gou"></view>
|
||||
<navigator hover-class="none"
|
||||
:url="'/pages/plantGrass/plant_release/index?id='+item.community_id+'&type=2'" class="items">
|
||||
<image src="../static/img/index/video-edit.png" style="width: 16px; height: 16px;"></image>
|
||||
:url="'/pages/plantGrass/plant_release/index?id='+item.community_id+'&type=2'"
|
||||
class="items">
|
||||
<image src="../static/img/index/video-edit.png" style="width: 16px; height: 16px;">
|
||||
</image>
|
||||
<text class="text">编辑</text>
|
||||
</navigator>
|
||||
<view class="items" @click.stop="deleteTopic(item)">
|
||||
<image src="../static/img/index/video-delete.png" style="width: 16px; height: 16px;"></image>
|
||||
<image src="../static/img/index/video-delete.png"
|
||||
style="width: 16px; height: 16px;"></image>
|
||||
<text class="text">删除</text>
|
||||
</view>
|
||||
</view>
|
||||
@ -232,7 +248,8 @@
|
||||
-->
|
||||
<!-- 3.阿里云视频截帧地址:https://help.aliyun.com/document_detail/64555.html -->
|
||||
<image v-if="item.isShowimage == true"
|
||||
:src="item.src+'?x-oss-process=video/snapshot,t_'+ currenttimes +'000,f_jpg'" mode="aspectFill"
|
||||
:src="item.src+'?x-oss-process=video/snapshot,t_'+ currenttimes +'000,f_jpg'"
|
||||
mode="aspectFit"
|
||||
:style="'width: 120upx; height: 160upx; border-radius: 10upx; position: absolute; bottom: '+ (ProgressBarBottom + 160) +'upx; left: '+ (currentPositions - 15) +'px;'">
|
||||
</image>
|
||||
</view>
|
||||
@ -241,21 +258,23 @@
|
||||
</list>
|
||||
</view>
|
||||
|
||||
<waterfall class="video-list" v-if="currentNav === 3" column-gap="6" column-count="2" :show-scrollbar="false" @loadmore="getGoods()"
|
||||
column-width="195px" :style="'width: '+ windowWidth +'px; height: '+ boxStyle.height +'px;'" >
|
||||
<waterfall class="video-list" v-if="currentNav === 3" column-gap="6" column-count="2" :show-scrollbar="false"
|
||||
@loadmore="getGoods()" column-width="195px"
|
||||
:style="'width: '+ windowWidth +'px; height: '+ boxStyle.height +'px;'">
|
||||
<cell class="goods_item" style="margin-bottom: 10px;" v-for="(item,index) in cateGoods" :key="item.uid"
|
||||
@click="gogogo(item)" >
|
||||
<image class="goods_img" :src="item.image[0]" mode="aspectFill"></image>
|
||||
@click="gogogo(item)">
|
||||
<image class="goods_img" :src="item.image[0]" mode="aspectFit"></image>
|
||||
<view class="botm">
|
||||
<text class="title">{{item.title}}</text>
|
||||
<view class="goods_info">
|
||||
<view class="l_info">
|
||||
<image :src="(item.author && item.author.avatar) || '/static/images/f.png'" mode="aspectFill"
|
||||
<image :src="(item.author && item.author.avatar) || '/static/images/f.png'" mode="aspectFit"
|
||||
class="g_img"></image>
|
||||
<text class="g_name">{{item.author && item.author.nickname}}</text>
|
||||
</view>
|
||||
<view class="nice_box flex_a_c" @click.stop="giveStart(item)">
|
||||
<text class="iconfont" :class="item.relevance_id ? 'icon-shoucang1' : 'icon-dianzan'"></text>
|
||||
<text class="iconfont"
|
||||
:class="item.relevance_id ? 'icon-shoucang1' : 'icon-dianzan'"></text>
|
||||
<text class="collect">{{item.count_start}}</text>
|
||||
|
||||
</view>
|
||||
@ -296,10 +315,11 @@
|
||||
<mentioned ref="mentioned" @close="closePopup" :list="moreList" :uid="authorUid"></mentioned>
|
||||
</view>
|
||||
</uni-popup>
|
||||
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize>
|
||||
<!--<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize> -->
|
||||
<view class="fixed-head">
|
||||
<view class="sys-head" :style="{height:statusBarHeight}"></view>
|
||||
<view class="tool-bar" @click='goBack()'>
|
||||
|
||||
<image class="icon-xiangzuo" src="../static/img/index/icon-back.png"></image>
|
||||
</view>
|
||||
</view>
|
||||
@ -308,9 +328,15 @@
|
||||
<script>
|
||||
const app = getApp();
|
||||
let sysHeight = uni.getSystemInfoSync().statusBarHeight
|
||||
import { toLogin } from '@/libs/login.js';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { configMap } from '@/utils';
|
||||
import {
|
||||
toLogin
|
||||
} from '@/libs/login.js';
|
||||
import {
|
||||
mapGetters
|
||||
} from 'vuex';
|
||||
import {
|
||||
configMap
|
||||
} from '@/utils';
|
||||
/*
|
||||
引入评论组件
|
||||
*/
|
||||
@ -318,6 +344,7 @@
|
||||
import mentioned from '../components/mentioned/mentioned.vue'
|
||||
import authorize from '@/components/Authorize';
|
||||
import {
|
||||
deoList,
|
||||
videoList,
|
||||
myVideoList,
|
||||
graphicStartApi,
|
||||
@ -326,10 +353,17 @@
|
||||
focusArticleLst,
|
||||
graphicLstApi
|
||||
} from '@/api/community.js';
|
||||
import { HTTP_REQUEST_URL } from '@/config/app.js';
|
||||
import { getUserInfo } from '@/api/user.js';
|
||||
import {
|
||||
HTTP_REQUEST_URL
|
||||
} from '@/config/app.js';
|
||||
import {
|
||||
getUserInfo
|
||||
} from '@/api/user.js';
|
||||
export default {
|
||||
computed: configMap({ statusBarHeight: 0, community_reply_status: 0 }, mapGetters(['isLogin', 'uid'])),
|
||||
computed: configMap({
|
||||
statusBarHeight: 0,
|
||||
community_reply_status: 0
|
||||
}, mapGetters(['isLogin', 'uid'])),
|
||||
data() {
|
||||
return {
|
||||
imgHost: HTTP_REQUEST_URL,
|
||||
@ -368,7 +402,7 @@
|
||||
newTime: 0, //跟手滑动后的最新时间💗
|
||||
timeNumber: 0, //🌟💗
|
||||
ProgressBarBottom: 20, //进度条离底部的距离💗
|
||||
object_fit: 'contain', //视频样式默认包含🌟💗
|
||||
object_fit: 'cover', //视频样式默认包含🌟💗
|
||||
mode: 'aspectFit', //图片封面样式🌟💗
|
||||
timeout: "", //🌟用来阻止 setTimeout()方法
|
||||
voice: "", //🌟用来阻止 setTimeout()方法
|
||||
@ -388,7 +422,9 @@
|
||||
currentNav: 1,
|
||||
limit: 6,
|
||||
page: 1,
|
||||
userInfo: { uid: 0 },
|
||||
userInfo: {
|
||||
uid: 0
|
||||
},
|
||||
moreList: [],
|
||||
isShowAuth: false, //是否隐藏授权
|
||||
isAuto: false, //没有授权的不会自动授权
|
||||
@ -453,12 +489,12 @@
|
||||
// console.log('到后台');
|
||||
},
|
||||
onLoad(options) {
|
||||
console.log(options);
|
||||
|
||||
this.videoID = options.id || 0;
|
||||
this.isUser = options.user == 1 ? true : false;
|
||||
this.userUid = options.uid ? options.uid : 0;
|
||||
this.isSatrt = options.tab == 1 ? 1 : 0;
|
||||
if (options.pid) app.globalData.spid = options.pid;
|
||||
// if (options.pid) app.globalData.spid = options.pid;
|
||||
// console.log('到后台');
|
||||
this.platform = uni.getSystemInfoSync().platform
|
||||
this.windowWidth = uni.getSystemInfoSync().screenWidth //获取屏幕宽度
|
||||
@ -466,7 +502,7 @@
|
||||
this.wHeight = uni.getSystemInfoSync().screenHeight; //获取屏幕高度
|
||||
this.boxStyle.height = this.wHeight; //改变视频高度
|
||||
this.get() //这一步,加载视频数据
|
||||
if (this.isLogin) this.getUserInfo()
|
||||
// if (this.isLogin) this.getUserInfo()
|
||||
},
|
||||
onReady() {},
|
||||
methods: {
|
||||
@ -559,6 +595,7 @@
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
// #endif
|
||||
/**
|
||||
* 获取个人用户信息
|
||||
@ -576,7 +613,9 @@
|
||||
this.isShowAuth = true
|
||||
} else {
|
||||
let status = 1
|
||||
followAuthorApi(item.uid, { status: status }).then(res => {
|
||||
followAuthorApi(item.uid, {
|
||||
status: status
|
||||
}).then(res => {
|
||||
if (res.status === 200) {
|
||||
item.is_fans = true
|
||||
}
|
||||
@ -606,7 +645,8 @@
|
||||
});
|
||||
setTimeout(function() {
|
||||
uni.redirectTo({
|
||||
url: '/pages/plantGrass/plant_user/index?id=' + item.uid
|
||||
url: '/pages/plantGrass/plant_user/index?id=' +
|
||||
item.uid
|
||||
})
|
||||
}, 1000);
|
||||
}
|
||||
@ -617,15 +657,15 @@
|
||||
}
|
||||
});
|
||||
},
|
||||
// 授权回调
|
||||
onLoadFun() {
|
||||
this.isShowAuth = false
|
||||
this.getUserInfo()
|
||||
},
|
||||
// // 授权回调
|
||||
// onLoadFun() {
|
||||
// this.isShowAuth = false
|
||||
// this.getUserInfo()
|
||||
// },
|
||||
// 授权关闭
|
||||
authColse: function(e) {
|
||||
this.isShowAuth = e
|
||||
},
|
||||
// authColse: function(e) {
|
||||
// this.isShowAuth = e
|
||||
// },
|
||||
moreTap(item) {
|
||||
item.isMore = !item.isMore;
|
||||
},
|
||||
@ -652,28 +692,10 @@
|
||||
let that = this;
|
||||
if (!that.loadVideo) return
|
||||
that.loadVideo = true
|
||||
that.isUser ?
|
||||
myVideoList(that.userUid, {
|
||||
page: that.page,
|
||||
limit: that.limit,
|
||||
is_star: that.isSatrt,
|
||||
community_id: that.videoID
|
||||
}).then(res => {
|
||||
|
||||
deoList(that.videoID).then(res => {
|
||||
that.loadVideo = false
|
||||
that.getVideoData(res.data.list);
|
||||
}).catch(err => {
|
||||
return uni.showToast({
|
||||
title: err,
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
}) :
|
||||
graphicLstApi({
|
||||
page: that.page,
|
||||
limit: that.limit,
|
||||
category_id: -1
|
||||
}).then(res => {
|
||||
that.getVideoData(res.data.list);
|
||||
that.getVideoData([res.data]);
|
||||
}).catch(err => {
|
||||
return uni.showToast({
|
||||
title: err,
|
||||
@ -681,6 +703,35 @@
|
||||
duration: 2000
|
||||
});
|
||||
})
|
||||
// that.isUser ?
|
||||
// myVideoList(that.userUid, {
|
||||
// page: that.page,
|
||||
// limit: that.limit,
|
||||
// is_star: that.isSatrt,
|
||||
// community_id: that.videoID
|
||||
// }).then(res => {
|
||||
// that.loadVideo = false
|
||||
// that.getVideoData(res.data.list);
|
||||
// }).catch(err => {
|
||||
// return uni.showToast({
|
||||
// title: err,
|
||||
// icon: 'none',
|
||||
// duration: 2000
|
||||
// });
|
||||
// }) :
|
||||
// graphicLstApi({
|
||||
// page: that.page,
|
||||
// limit: that.limit,
|
||||
// category_id: -1
|
||||
// }).then(res => {
|
||||
// that.getVideoData(res.data.list);
|
||||
// }).catch(err => {
|
||||
// return uni.showToast({
|
||||
// title: err,
|
||||
// icon: 'none',
|
||||
// duration: 2000
|
||||
// });
|
||||
// })
|
||||
},
|
||||
getFocusList() {
|
||||
let that = this;
|
||||
@ -699,16 +750,19 @@
|
||||
})
|
||||
},
|
||||
getVideoData(list) {
|
||||
console.log(list,'111111')
|
||||
if (list.length == 0) return
|
||||
let that = this;
|
||||
that.loadVideo = list.length == that.limit
|
||||
that.page = that.page + 1;
|
||||
// that.page = that.page + 1;
|
||||
that.page = 1
|
||||
var msg = list
|
||||
for (let i = 0; i < msg.length; i++) {
|
||||
msg[i]['isMore'] = false
|
||||
msg[i]['community_id'] = msg[i]['community_id'].toString()
|
||||
that.dataList.push(msg[i])
|
||||
}
|
||||
console.log(that.dataList)
|
||||
if (that.dataList.length !== 0) {
|
||||
that.dataList[that.k].state = 'play';
|
||||
setTimeout(function() {
|
||||
@ -831,17 +885,12 @@
|
||||
get() {
|
||||
// if(!this.loadVideo) return
|
||||
this.loadVideo = true
|
||||
// 这个方法主要就是用来第一次进入视频播放时用来处理的
|
||||
this.isUser ?
|
||||
myVideoList(this.userUid, {
|
||||
page: this.page,
|
||||
limit: this.limit,
|
||||
is_star: this.isSatrt,
|
||||
community_id: this.videoID
|
||||
}).then(async (res) => {
|
||||
// 这个方法主要就是用来第一次进入视频播放时用来处理
|
||||
deoList(this.videoID).then(async (res) => {
|
||||
this.loadVideo = false
|
||||
this.page = this.page + 1;
|
||||
var msg = res.data.list;
|
||||
this.page = 1;
|
||||
var msg = [res.data];
|
||||
console.log(res.data)
|
||||
for (let i = 0; i < msg.length; i++) {
|
||||
msg[i]['isMore'] = false
|
||||
msg[i]['playIng'] = false
|
||||
@ -851,6 +900,7 @@
|
||||
msg[i]['community_id'] = msg[i]['community_id'].toString()
|
||||
}
|
||||
this.dataList = msg;
|
||||
console.log(this.dataList)
|
||||
if (this.dataList.length !== 0) {
|
||||
this.dataList[this.k].state = 'play';
|
||||
uni.createVideoContext(this.dataList[this.k].community_id, this).play()
|
||||
@ -861,29 +911,62 @@
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
}) :
|
||||
graphicLstApi({
|
||||
page: this.page,
|
||||
limit: this.limit,
|
||||
category_id: -1
|
||||
}).then(async (res) => {
|
||||
this.page = this.page + 1;
|
||||
var msg = res.data.list;
|
||||
for (let i = 0; i < msg.length; i++) {
|
||||
msg[i]['isMore'] = false
|
||||
msg[i]['playIng'] = false
|
||||
msg[i]['state'] = false
|
||||
msg[i]['isplay'] = false
|
||||
msg[i]['community_id'] = msg[i]['community_id'].toString()
|
||||
}
|
||||
this.dataList = msg;
|
||||
}).catch(err => {
|
||||
return uni.showToast({
|
||||
title: err,
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
})
|
||||
|
||||
|
||||
|
||||
// this.isUser ?
|
||||
// myVideoList(this.userUid, {
|
||||
// page: this.page,
|
||||
// limit: this.limit,
|
||||
// is_star: this.isSatrt,
|
||||
// community_id: this.videoID
|
||||
// }).then(async (res) => {
|
||||
// this.loadVideo = false
|
||||
// this.page = this.page + 1;
|
||||
// var msg = res.data.list;
|
||||
// for (let i = 0; i < msg.length; i++) {
|
||||
// msg[i]['isMore'] = false
|
||||
// msg[i]['playIng'] = false
|
||||
// msg[i]['state'] = false
|
||||
// msg[i]['isplay'] = false
|
||||
// msg[i]['loading'] = false
|
||||
// msg[i]['community_id'] = msg[i]['community_id'].toString()
|
||||
// }
|
||||
// this.dataList = msg;
|
||||
// if (this.dataList.length !== 0) {
|
||||
// this.dataList[this.k].state = 'play';
|
||||
// uni.createVideoContext(this.dataList[this.k].community_id, this).play()
|
||||
// }
|
||||
// }).catch(err => {
|
||||
// return uni.showToast({
|
||||
// title: err,
|
||||
// icon: 'none',
|
||||
// duration: 2000
|
||||
// });
|
||||
// }) :
|
||||
// graphicLstApi({
|
||||
// page: this.page,
|
||||
// limit: this.limit,
|
||||
// category_id: -1
|
||||
// }).then(async (res) => {
|
||||
// this.page = this.page + 1;
|
||||
// var msg = res.data.list;
|
||||
// for (let i = 0; i < msg.length; i++) {
|
||||
// msg[i]['isMore'] = false
|
||||
// msg[i]['playIng'] = false
|
||||
// msg[i]['state'] = false
|
||||
// msg[i]['isplay'] = false
|
||||
// msg[i]['community_id'] = msg[i]['community_id'].toString()
|
||||
// }
|
||||
// this.dataList = msg;
|
||||
// }).catch(err => {
|
||||
// return uni.showToast({
|
||||
// title: err,
|
||||
// icon: 'none',
|
||||
// duration: 2000
|
||||
// });
|
||||
// })
|
||||
},
|
||||
onpullingdown() {
|
||||
this.refreshing = true
|
||||
@ -940,7 +1023,9 @@
|
||||
this.isShowAuth = true
|
||||
} else {
|
||||
let status = item.relevance_id ? 0 : 1
|
||||
graphicStartApi(item.community_id, { status: status }).then(res => {
|
||||
graphicStartApi(item.community_id, {
|
||||
status: status
|
||||
}).then(res => {
|
||||
if (item.relevance_id) {
|
||||
item.count_start--;
|
||||
item.count_start = item.count_start == 0 ? 0 : item.count_start
|
||||
@ -1250,7 +1335,7 @@
|
||||
|
||||
.userInfo {
|
||||
position: absolute;
|
||||
bottom: 30px;
|
||||
bottom: 120px;
|
||||
right: 10px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
@ -1633,6 +1718,6 @@
|
||||
|
||||
.root {
|
||||
background-color: #000000;
|
||||
|
||||
}
|
||||
</style>
|
||||
|
||||
|
@ -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,31 +736,10 @@
|
||||
},
|
||||
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)
|
||||
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;
|
||||
}
|
||||
@ -766,7 +750,42 @@
|
||||
duration: 2000
|
||||
});
|
||||
})
|
||||
that.loadVideo = true
|
||||
|
||||
// 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]);
|
||||
@ -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)
|
||||
|
@ -21,8 +21,9 @@
|
||||
<view class="bg"></view>
|
||||
<view class="user-info">
|
||||
<view class="avatar-box" :class="{on:userInfo.is_svip > 0 && svip_switch_status == 1}">
|
||||
<image class="avatar skeleton-radius" :src="userInfo.avatar ? userInfo.avatar : '/static/images/f.png'"
|
||||
@click="goEdit"></image>
|
||||
<image class="avatar skeleton-radius"
|
||||
:src="userInfo.avatar ? userInfo.avatar : '/static/images/f.png'" @click="goEdit">
|
||||
</image>
|
||||
<view class="headwear" v-if="userInfo.is_svip > 0 && svip_switch_status == 1">
|
||||
<image src="/static/images/headwear.png"></image>
|
||||
</view>
|
||||
@ -81,7 +82,8 @@
|
||||
</view>
|
||||
<navigator hover-class="none"
|
||||
:url="userInfo.is_svip > 0 ? '/pages/annex/vip_center/index' : '/pages/annex/vip_paid/index'"
|
||||
class="cardVipA acea-row row-between-wrapper" v-if="userInfo.svip_open && svip_switch_status == 1">
|
||||
class="cardVipA acea-row row-between-wrapper"
|
||||
v-if="userInfo.svip_open && svip_switch_status == 1">
|
||||
<image class="svip_user" src="/static/images/svip_user.png"></image>
|
||||
<view class="left-box">
|
||||
<view v-if="userInfo.is_svip > 0" class="small">累计为您节省{{userInfo.svip_save_money}}元</view>
|
||||
@ -105,7 +107,8 @@
|
||||
<view class="order-wrapper">
|
||||
<view class="order-hd flex skeleton-rect">
|
||||
<view class="left">我的订单</view>
|
||||
<view class="right flex" @click="authTo('/pages/users/order_list/index?status=-1&product_type=0')" hover-class="none"
|
||||
<view class="right flex"
|
||||
@click="authTo('/pages/users/order_list/index?status=-1&product_type=0')" hover-class="none"
|
||||
open-type="navigate">
|
||||
全部订单
|
||||
<text class="iconfont icon-xiangyou"></text>
|
||||
@ -233,19 +236,33 @@
|
||||
<script>
|
||||
let sysHeight = uni.getSystemInfoSync().statusBarHeight + 'px';
|
||||
import mTabbar from '@/components/m-tabbar/m-tabbar.vue'
|
||||
import { getMenuList, getUserInfo, setVisit } from '@/api/user.js';
|
||||
import { getVersion } from "@/api/public";
|
||||
import { orderData } from '@/api/order.js'
|
||||
import { mapGetters } from "vuex";
|
||||
import {
|
||||
getMenuList,
|
||||
getUserInfo,
|
||||
setVisit
|
||||
} from '@/api/user.js';
|
||||
import {
|
||||
getVersion
|
||||
} from "@/api/public";
|
||||
import {
|
||||
orderData
|
||||
} from '@/api/order.js'
|
||||
import {
|
||||
mapGetters
|
||||
} from "vuex";
|
||||
import authorize from '@/components/Authorize';
|
||||
import dayjs from '@/plugin/dayjs/dayjs.min.js';
|
||||
import Cache from '@/utils/cache';
|
||||
// #ifndef H5
|
||||
import passwordPopup from '@/components/passwordPopup';
|
||||
// #endif
|
||||
import { configMap } from '@/utils';
|
||||
import {
|
||||
configMap
|
||||
} from '@/utils';
|
||||
import Auth from '../../libs/wechat';
|
||||
import { HTTP_REQUEST_URL } from '@/config/app';
|
||||
import {
|
||||
HTTP_REQUEST_URL
|
||||
} from '@/config/app';
|
||||
const app = getApp();
|
||||
export default {
|
||||
components: {
|
||||
@ -309,22 +326,72 @@
|
||||
num: 0
|
||||
},
|
||||
],
|
||||
imgUrls: [{ url: '', pic: '' }],
|
||||
imgUrls: [{
|
||||
url: '',
|
||||
pic: ''
|
||||
}],
|
||||
userMenu: [],
|
||||
skeletonMenu: [],
|
||||
personalMenu: [
|
||||
{ pic: '', name: '', isShow: true },
|
||||
{ pic: '', name: '', isShow: true },
|
||||
{ pic: '', name: '', isShow: true },
|
||||
{ pic: '', name: '', isShow: true },
|
||||
{ pic: '', name: '', isShow: true },
|
||||
{ pic: '', name: '', isShow: true },
|
||||
{ pic: '', name: '', isShow: true },
|
||||
{ pic: '', name: '', isShow: true },
|
||||
{ pic: '', name: '', isShow: true },
|
||||
{ pic: '', name: '', isShow: true },
|
||||
{ pic: '', name: '', isShow: true },
|
||||
{ pic: '', name: '', isShow: true }
|
||||
personalMenu: [{
|
||||
pic: '',
|
||||
name: '',
|
||||
isShow: true
|
||||
},
|
||||
{
|
||||
pic: '',
|
||||
name: '',
|
||||
isShow: true
|
||||
},
|
||||
{
|
||||
pic: '',
|
||||
name: '',
|
||||
isShow: true
|
||||
},
|
||||
{
|
||||
pic: '',
|
||||
name: '',
|
||||
isShow: true
|
||||
},
|
||||
{
|
||||
pic: '',
|
||||
name: '',
|
||||
isShow: true
|
||||
},
|
||||
{
|
||||
pic: '',
|
||||
name: '',
|
||||
isShow: true
|
||||
},
|
||||
{
|
||||
pic: '',
|
||||
name: '',
|
||||
isShow: true
|
||||
},
|
||||
{
|
||||
pic: '',
|
||||
name: '',
|
||||
isShow: true
|
||||
},
|
||||
{
|
||||
pic: '',
|
||||
name: '',
|
||||
isShow: true
|
||||
},
|
||||
{
|
||||
pic: '',
|
||||
name: '',
|
||||
isShow: true
|
||||
},
|
||||
{
|
||||
pic: '',
|
||||
name: '',
|
||||
isShow: true
|
||||
},
|
||||
{
|
||||
pic: '',
|
||||
name: '',
|
||||
isShow: true
|
||||
}
|
||||
],
|
||||
autoplay: true,
|
||||
circular: true,
|
||||
@ -333,7 +400,9 @@
|
||||
isAuto: false, //没有授权的不会自动授权
|
||||
isShowAuth: false, //是否隐藏授权
|
||||
orderStatusNum: {},
|
||||
userInfo: { aratar: '/static/f.png' },
|
||||
userInfo: {
|
||||
aratar: '/static/f.png'
|
||||
},
|
||||
MyMenus: [],
|
||||
is_promoter: 0, //推广人开关 1开
|
||||
extension_status: 0,
|
||||
@ -423,8 +492,7 @@
|
||||
if (item.url == '/pages/users/user_money/index') {
|
||||
// item.isShow = that.balance_func_status == 1
|
||||
item.isShow = true
|
||||
}
|
||||
else if (item.url == '/pages/users/user_spread_user/index') {
|
||||
} else if (item.url == '/pages/users/user_spread_user/index') {
|
||||
if (that.extension_status == 0) {
|
||||
item.isShow = false
|
||||
} else if (that.extension_status == 1) {
|
||||
|
@ -55,11 +55,21 @@
|
||||
立即导入</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>
|
||||
</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 |