This commit is contained in:
weipengfei 2023-09-04 18:54:18 +08:00
commit c13e0b1682
80 changed files with 9393 additions and 4744 deletions

View File

@ -82,11 +82,16 @@ export function videoList(data) {
}); });
} }
/**自己的视频列表*/ /**自己的视频列表*/
export function deoList(id) {
return request.get(`community/show/${id}`);
}
export function myVideoList(id,data) { export function myVideoList(id,data) {
return request.get(`community/user/community_video/${id}`, data, { return request.get(`community/user/community_video/${id}`, data, {
noAuth: true noAuth: true
}); });
} }
/**文章点赞*/ /**文章点赞*/
export function graphicStartApi(id, status) { export function graphicStartApi(id, status) {
return request.post(`community/start/${id}`, status); return request.post(`community/start/${id}`, status);

View File

@ -13,6 +13,13 @@ import request from "@/utils/request.js";
* 获取商品详情 * 获取商品详情
*/ */
export const getProductDetailsAPI = (data) => request.get('micro/product_details', data) export const getProductDetailsAPI = (data) => request.get('micro/product_details', data)
/**
*商品列表
*/
export const spuInfo = (id,data) => request.get('product/spu/street/'+id, data)
/** /**
* 线下导入 * 线下导入
*/ */

View File

@ -467,7 +467,9 @@ export function getGeocoder(data) {
* *
*/ */
export function getStoreTypeApi() { export function getStoreTypeApi() {
return request.get('intention/type', {sift_store:0}, { return request.get('intention/type', {
sift_store: 0
}, {
noAuth: true noAuth: true
}); });
} }
@ -544,3 +546,30 @@ export function priceRuleApi(id) {
noAuth: true 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`);
}

View 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: [], // 01
};
},
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>

View 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: [], // 01
};
},
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>

View 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>

View 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>

View File

@ -9,7 +9,8 @@
<view class="close" @click="closeShowBox"><text class="iconfont icon-guanbi"></text></view> <view class="close" @click="closeShowBox"><text class="iconfont icon-guanbi"></text></view>
</view> </view>
<view class="box"> <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>{{item.title}}</view>
<view class="radio" @click="bindCheck(item,index)"> <view class="radio" @click="bindCheck(item,index)">
<block v-if="index == newData.order.isTake"> <block v-if="index == newData.order.isTake">
@ -39,77 +40,79 @@
// +---------------------------------------------------------------------- // +----------------------------------------------------------------------
// | Author: CRMEB Team <admin@crmeb.com> // | Author: CRMEB Team <admin@crmeb.com>
// +---------------------------------------------------------------------- // +----------------------------------------------------------------------
import { mapGetters } from "vuex"; import {
export default{ mapGetters
name:'checkDelivery', } from "vuex";
props:{ export default {
isShowBox:{ name: 'checkDelivery',
type:Boolean, props: {
default:false isShowBox: {
type: Boolean,
default: false
}, },
activeObj:{ activeObj: {
type:Object, type: Object,
default:function(){ default: function() {
return {} return {}
} }
}, },
deliveryName:{ deliveryName: {
type:String, type: String,
default:'快递配送' default: '快递配送'
}, },
radioList:{ radioList: {
type:Array, type: Array,
default: [ default: [{
{ title: '快递配送',
title:'快递配送', check: true
check:true
}, },
{ {
title:'到店核销', title: '到店核销',
check:false check: false
} }
], ],
}, },
}, },
computed: mapGetters(['viewColor']), computed: mapGetters(['viewColor']),
data(){ data() {
return { return {
radioIndex:0, radioIndex: 0,
oldRadioIndex:'', // oldRadioIndex: '', //
newData:{} newData: {}
} }
}, },
created() { created() {
this.newData = JSON.parse(JSON.stringify(this.activeObj)) this.newData = JSON.parse(JSON.stringify(this.activeObj))
}, },
methods:{ methods: {
// //
closeShowBox(){ closeShowBox() {
this.$emit('close') this.$emit('close')
}, },
// //
bindCheck(item,index){ bindCheck(item, index) {
this.newData.order.isTake = index this.newData.order.isTake = index
}, },
confirmBtn(){ confirmBtn() {
this.$emit('confirmBtn',this.newData) this.$emit('confirmBtn', this.newData)
} }
} }
} }
</script> </script>
<style lang="scss"> <style lang="scss">
.mask-box{ .mask-box {
.bg{ .bg {
z-index: 30; z-index: 30;
position: fixed; position: fixed;
left: 0; left: 0;
bottom: 0; bottom: 0;
width: 100%; width: 100%;
height: 100%; height: 100%;
background: rgba(0,0,0,0.5); background: rgba(0, 0, 0, 0.5);
} }
.mask-content{
.mask-content {
z-index: 40; z-index: 40;
position: fixed; position: fixed;
left: 0; left: 0;
@ -119,45 +122,54 @@
border-radius: 16rpx 16rpx 0 0; border-radius: 16rpx 16rpx 0 0;
transform: translate3d(0, 100%, 0); transform: translate3d(0, 100%, 0);
transition: all .3s cubic-bezier(.25, .5, .5, .9); transition: all .3s cubic-bezier(.25, .5, .5, .9);
.title-bar{
.title-bar {
position: relative; position: relative;
text-align: center; text-align: center;
padding: 30rpx 0; padding: 30rpx 0;
margin-bottom: 20rpx; margin-bottom: 20rpx;
font-size: 32rpx; font-size: 32rpx;
color: #282828; color: #282828;
.close{
.close {
position: absolute; position: absolute;
right: 30rpx; right: 30rpx;
top: 50%; top: 50%;
transform: translateY(-50%); transform: translateY(-50%);
.iconfont{
.iconfont {
color: #8A8A8A; color: #8A8A8A;
} }
} }
} }
.box{
.box {
padding: 0 30rpx; padding: 0 30rpx;
.check-item{
.check-item {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
height: 40rpx; height: 40rpx;
margin-bottom: 50rpx; margin-bottom: 50rpx;
font-size: 28rpx; font-size: 28rpx;
.iconfont{
.iconfont {
font-size: 38rpx; font-size: 38rpx;
color: #CCCCCC; color: #CCCCCC;
&.icon-xuanzhong1{
&.icon-xuanzhong1 {
color: var(--view-theme); color: var(--view-theme);
} }
} }
} }
} }
.foot{
.foot {
padding: 15rpx 30rpx; padding: 15rpx 30rpx;
border-top: 1px solid #F5F5F5; border-top: 1px solid #F5F5F5;
.btn{
.btn {
width: 100%; width: 100%;
height: 70rpx; height: 70rpx;
line-height: 70rpx; line-height: 70rpx;
@ -170,6 +182,7 @@
} }
} }
} }
.animated { .animated {
animation-duration: .3s animation-duration: .3s
} }

View File

@ -45,6 +45,7 @@
{{item.product_num - item.refund_num}}</view> {{item.product_num - item.refund_num}}</view>
<view class='btn-item err' v-if="item.is_refund >1">已退款 x <view class='btn-item err' v-if="item.is_refund >1">已退款 x
{{item.product_num - item.refund_num}}</view> {{item.product_num - item.refund_num}}</view>
<view class='btn-item' v-if='item.is_reply==0 && evaluate==2 && item.is_refund==0' <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> @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 class='btn-item on' v-else-if="item.is_reply==1 && evaluate==2">已评价</view>
@ -114,9 +115,8 @@
<view class="btn-item" <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" 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> @click.stop="refund(item)">申请退款</view>
<view class='btn-item' <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> @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 class='btn-item on' v-else-if="item.is_reply==1 && evaluate==2">已评价</view>
</view> </view>

View File

@ -4,25 +4,23 @@
<view class="bg-img"> <view class="bg-img">
<img :src="bgColor" alt=""> <img :src="bgColor" alt="">
</view> </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="place_wrapper flex_a_c" @click="selectLocation">
<view class="iconfont icon-weizhi"></view> <view class="iconfont icon-weizhi"></view>
<view class="town_name">{{street}}</view> <view class="town_name">{{street}}</view>
</view> </view>
<navigator url="/pages/chat/customer_list/index?type=0" hover-class="none"> <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" style="color:#fff;"></view>
</navigator> </navigator>
</view>
</view> -->
<!-- 搜索栏 --> <!-- 搜索栏 -->
<navigator url="/pages/columnGoods/goods_search/index" hover-class="none" class="search_content flex_a_c_j_sb"> <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="flex_a_c">
<view class="iconfont icon-sousuo" style="font-size: 39rpx;"></view> <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> </view>
<button class="search_btn">搜索</button> <button class="search_btn">搜索</button>
</navigator> </navigator>
@ -33,8 +31,7 @@
indicator-active-color="#fff"> indicator-active-color="#fff">
<block v-for="(item,index) in swiper['url']" :key="index"> <block v-for="(item,index) in swiper['url']" :key="index">
<swiper-item class="swi_item" @click="swiperClick(item)"> <swiper-item class="swi_item" @click="swiperClick(item)">
<u--image :showLoading="true" :src="item.img" width="724rpx" height="259rpx" <u--image :showLoading="true" :src="item.img" width="724rpx" height="259rpx" mode="aspectFit">
mode="aspectFill">
</u--image> </u--image>
</swiper-item> </swiper-item>
</block> </block>
@ -73,12 +70,18 @@
location_Arr: { location_Arr: {
type: Object, type: Object,
default: () => ({}) default: () => ({})
} },
town: {
type: String,
default: false
},
}, },
data() { data() {
return { return {
defaInd: [0, 0], defaInd: [0, 0],
street: '', street: '',
showPicker: false, showPicker: false,
styleConfig: [], styleConfig: [],
columnData: [], columnData: [],
@ -95,26 +98,27 @@
interval: 2000, // interval: 2000, //
duration: 400 // duration: 400 //
}, },
} }
}, },
watch: { watch: {
street: { street(nval, val) {
handler(newVal, oldVal) { this.street = nval
this.street = newVal
},
} }
}, },
created() { created() {
this.getBanner() this.getBanner()
this.Area() this.Area()
}, },
mounted() { mounted() {
this.appLocation() this.$bus.$on('value-updated', (newValue) => {
//
this.street = newValue.split(',')[0]
});
}, },
methods: { methods: {
@ -128,44 +132,20 @@
this.isSelectPlace ? this.showPicker = true : '' 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) { confirm(e) {
this.street = e.value[1].name
this.showPicker = false this.showPicker = false
this.$emit('selectPlce', e) 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) { changeHandler(e) {
const { const {
@ -206,9 +186,11 @@
} = e.detail; } = e.detail;
if (source === 'autoplay' || source === 'touch') { if (source === 'autoplay' || source === 'touch') {
this.bgColor = this.swiper.url[e.detail.current]['img'] this.bgColor = this.swiper.url[e.detail.current]['img']
this.$emit('kkchange',this.bgColor) this.$emit('kkchange', this.bgColor)
} }
}, },
// //
objToArr(data) { objToArr(data) {
let obj = Object.keys(data).sort(); let obj = Object.keys(data).sort();
@ -237,7 +219,7 @@
} }
</script> </script>
<style lang="scss"> <style lang="scss" scoped>
.zbp-head-wrapper { .zbp-head-wrapper {
position: relative; position: relative;
padding-top: 78.95rpx; padding-top: 78.95rpx;
@ -284,6 +266,8 @@
height: 66.67rpx; height: 66.67rpx;
margin-bottom: 26.32rpx; margin-bottom: 26.32rpx;
position: relative; position: relative;
z-index: 9999;
// //
.place_wrapper { .place_wrapper {

View File

@ -23,7 +23,7 @@ Vue.prototype.$util = util;
Vue.prototype.$Cache = Cache; Vue.prototype.$Cache = Cache;
Vue.prototype.$eventHub = new Vue(); Vue.prototype.$eventHub = new Vue();
Vue.config.productionTip = false Vue.config.productionTip = false
Vue.prototype.$bus = new Vue();
// #ifdef H5 // #ifdef H5
import { parseQuery } from "./utils"; import { parseQuery } from "./utils";
import Auth from './libs/wechat'; import Auth from './libs/wechat';

View File

@ -30,7 +30,8 @@
"OAuth" : {}, "OAuth" : {},
"UniMP" : { "UniMP" : {
"description" : "uni小程序" "description" : "uni小程序"
} },
"Maps" : {}
}, },
"safearea" : { "safearea" : {
"bottom" : { "bottom" : {
@ -94,8 +95,8 @@
"sdkConfigs" : { "sdkConfigs" : {
"maps" : { "maps" : {
"amap" : { "amap" : {
"appkey_ios" : "", "appkey_ios" : "048d9f3f323eea894b49c3a7edbc8d87",
"appkey_android" : "" "appkey_android" : "048d9f3f323eea894b49c3a7edbc8d87"
} }
}, },
"payment" : { "payment" : {

View File

@ -95,9 +95,8 @@
} }
}, { }, {
"path" : "pages/moreProject/moreProject", "path": "pages/moreProject/moreProject",
"style" : "style": {
{
"navigationBarTitleText": "更多功能", "navigationBarTitleText": "更多功能",
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
@ -208,6 +207,33 @@
"navigationStyle": "custom" "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", "path": "supply_chain/merchant",
"style": { "style": {
@ -244,6 +270,14 @@
"navigationStyle": "custom" "navigationStyle": "custom"
} }
}, {
"path": "specialty/index",
"style": {
"navigationBarTitleText": "名优特产",
"enablePullDownRefresh": false,
"navigationStyle": "custom"
}
} }
] ]
}, },
@ -727,7 +761,8 @@
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
}] }
]
}, },
{ {
"root": "pages/commissionedSales", "root": "pages/commissionedSales",

View File

@ -77,6 +77,7 @@
<view v-else class='list'> <view v-else class='list'>
<WaterfallsFlow :wfList='productList' @itemTap="godDetail" :type="1" @goShop="goShop"/> <WaterfallsFlow :wfList='productList' @itemTap="godDetail" :type="1" @goShop="goShop"/>
</view> </view>
<view class='noCommodity' v-if="productList.length==0 && where.page > 1"> <view class='noCommodity' v-if="productList.length==0 && where.page > 1">
<view class='pictrue' style="margin: 60rpx auto;"> <view class='pictrue' style="margin: 60rpx auto;">
<image src='/static/images/noCart.png'></image> <image src='/static/images/noCart.png'></image>

View File

@ -559,9 +559,10 @@
limit: this.sotreParam.limit, limit: this.sotreParam.limit,
order: this.sotreParam.order, order: this.sotreParam.order,
category_id: this.sotreParam.category_id, category_id: this.sotreParam.category_id,
type_id: 10 type_id: this.sotreParam.type_id
} }
console.log(this.sotreParam.category_id)
if (this.latitude) { if (this.latitude) {
serachData.location = this.latitude + ',' + this.longitude serachData.location = this.latitude + ',' + this.longitude
} }
@ -576,7 +577,7 @@
this.storeList = this.storeList.concat(res.data.list) this.storeList = this.storeList.concat(res.data.list)
this.count = res.data.count this.count = res.data.count
this.loading = false this.loading = false
console.log(this.storeList);
}) })
}, },
// //
@ -682,6 +683,7 @@
}, },
// //
confirm2(data) { confirm2(data) {
let arr1 = [], let arr1 = [],
arr2 = [] arr2 = []
if (data.storeTypeArr.length == 0) { if (data.storeTypeArr.length == 0) {

View File

@ -1,103 +1,158 @@
<template> <template>
<view class="gather"> <view class="gather">
<view class="site-box flex_a_c_j_sb"> <view @click="selectLocation" v-if="isFshow">
<view class="place_wrapper flex_a_c" > <view
<view class="iconfont icon-weizhi" style="margin-left: 20rpx;"></view> class="site-box flex_a_c_j_sb"
<view class="town_name">{{street}}</view> :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> </view>
<view class="town_name">{{ street }}</view>
<navigator url="/pages/chat/customer_list/index?type=0" hover-class="none"> </view>
<view class="iconfont icon-xiaoxi" style="color:#fff;"></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> </navigator>
<view class="bg-img" v-if="isFshow">
<img :src="bgColor" alt="">
</view> </view>
</view> </view>
<zbpSwiper :isSelectPlace="true" :location_Arr="locationArr" @kkchange='kkchange'></zbpSwiper> <zbpSwiper
<u-empty :show="jurisdiction" marginTop="80" mode="permission" :text="emptyText" :isSelectPlace="true"
icon="http://cdn.uviewui.com/uview/empty/permission.png"></u-empty> :location_Arr="locationArr"
<block v-if="!jurisdiction"> :town="street"
<view class="business com special_work"> @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 class="title project">
<view>更多功能</view> <view>更多功能</view>
<view class="edit" @click="editFlag = !editFlag">{{editFlag?'完成':'编辑'}}</view> <view class="edit" @click="editFlag = !editFlag">{{
editFlag ? "完成" : "编辑"
}}</view>
</view> </view>
<view class="content"> <view class="content">
<block v-if="nowMenuList.length>0"> <block v-if="nowMenuList.length > 0">
<u-transition v-for="(item, index) in nowMenuList" :key="item.name" show> <u-transition
<view class="examine" @click="editFlag?removeMenu(item):clickMenu(item.type, item.data)"> v-for="(item, index) in nowMenuList"
<image class="icon_img" :src="`${prefix}${item.icon}`" mode="aspectFill"> :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> </image>
<u-icon v-if="editFlag" class="icon" name="minus-circle-fill" color="red"></u-icon> <u-icon
<text class="text">{{item.name}}</text> v-if="editFlag"
class="icon"
name="minus-circle-fill"
color="red"
></u-icon>
<text class="text">{{ item.name }}</text>
</view> </view>
</u-transition> </u-transition>
</block> </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> </view>
<view v-if="editFlag" class="business com special_work edit_card"> <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>编辑功能</view>
<view class="edit2" @click="editComfirm">完成</view> <view class="edit2" @click="editComfirm">完成</view>
</view> </view>
<view class="content"> <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)"> <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> </image>
<u-icon class="icon" name="plus-circle-fill"></u-icon> <u-icon class="icon" name="plus-circle-fill"></u-icon>
<text class="text">{{item.name}}</text> <text class="text">{{ item.name }}</text>
</view> </view>
</u-transition> </u-transition>
</view> </view>
</view> </view>
</block>
<view class="" v-if='jurisdiction==false&&isShow==false'> <view class="" v-if="jurisdiction == false && isShow == false">
<emptyPage title="暂无信息"></emptyPage> <emptyPage title="暂无信息"></emptyPage>
</view> </view>
</view> </view>
</template> </template>
<script> <script>
import mTabbar from '@/components/m-tabbar/m-tabbar.vue' import Cache from '@/utils/cache';
import emptyPage from '@/components/emptyPage.vue'; import mTabbar from '@/components/m-tabbar/m-tabbar.vue'
import zbpSwiper from '@/components/zbpSwiper' import emptyPage from '@/components/emptyPage.vue';
import { import zbpSwiper from '@/components/zbpSwiper'
import {
getArea,
getStreet
} from '@/api/article.js';
import {
mapState, mapState,
mapGetters mapGetters
} from 'vuex' } from 'vuex'
import { import {
getWorkArticleCount, getWorkArticleCount,
getSlideAPI getSlideAPI
} from '@/api/article.js' } from '@/api/article.js'
import { import {
getStoreList, getStoreList,
getUserInfo getUserInfo
} from '@/api/user.js' } from '@/api/user.js'
import { import {
getGeocoder, getGeocoder,
microSeachBarCode, microSeachBarCode,
microEadtProduct microEadtProduct
} from '@/api/store.js' } from '@/api/store.js'
import { import {
Toast Toast
} from '@/libs/uniApi'; } from '@/libs/uniApi';
import { import {
getDiy getDiy
} from '@/api/api.js'; } from '@/api/api.js';
import uniMP from '@/utils/uniMP.js'; import uniMP from '@/utils/uniMP.js';
export default { export default {
components: { components: {
mTabbar, mTabbar,
zbpSwiper, zbpSwiper,
emptyPage emptyPage
}, },
data() { data () {
return { return {
locationArr: ({}), locationArr: ({}),
emptyText: '暂无可用应用', emptyText: '暂无可用应用',
@ -112,12 +167,11 @@
isShow: false, isShow: false,
bgColor: '', bgColor: '',
isFshow: false, isFshow: false,
street:'', street: '',
// //
editFlag: false, editFlag: false,
// //
AllMenuList: [ AllMenuList: [{
{
name: '商户平台', name: '商户平台',
icon: 'spgl.png', icon: 'spgl.png',
data: '/pages/moreProject/moreProject', data: '/pages/moreProject/moreProject',
@ -130,17 +184,25 @@
type: 1, type: 1,
}, },
], ],
nowMenuList: [] nowMenuList: [],
street: '',
showPicker: false,
columnData: [],
bgColor: '',
isFshow: false,
backColor: 'rgba(248, 66, 33, 0)'
}; };
}, },
computed: { computed: {
...mapGetters(['userInfo', 'location', 'isLogin']) ...mapGetters(['userInfo', 'location', 'isLogin'])
}, },
created() {}, created () { },
onLoad() { onLoad () {
this.Area()
this.initMenu(); this.initMenu();
}, },
onShow() {
onShow () {
if (this.isLogin) { if (this.isLogin) {
this.emptyText = '暂无可用应用' this.emptyText = '暂无可用应用'
this.jurisdiction = false this.jurisdiction = false
@ -149,82 +211,190 @@
this.jurisdiction = true this.jurisdiction = true
} }
this.getUserInfo() this.getUserInfo()
this.appLocation()
}, },
onPullDownRefresh() {
onPullDownRefresh () {
this.getUserInfo() this.getUserInfo()
uni.stopPullDownRefresh() uni.stopPullDownRefresh()
}, },
mounted() { beforeDestroy () {
//
this.$bus.$off('value-updated')
},
mounted () {
if (this.street.length <= 0) {
this.appLocation() this.appLocation()
}
// #ifdef H5 // #ifdef H5
// //
window.addEventListener("scroll", this.scrolling); window.addEventListener("scroll", this.scrolling);
// #endif // #endif
this.$bus.$on('value-updated', (newValue) => {
//
this.street = newValue.split(',')[0]
});
}, },
// #ifdef APP-PLUS // #ifdef APP-PLUS
onPageScroll(e) { onPageScroll (e) {
// this.scrollTop = e.scrollTop; const scrollTop = e.scrollTop;
console.log(e.scrollTop) if (scrollTop <= 20) {
if (e.scrollTop > 0) { this.backColor = 'rgba(248, 66, 33, 0)'
this.isFshow = true
} else {
this.isFshow = false 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 // #endif
methods: { 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 all = uni.getStorageSync('gatherAllMenuList');
let now = uni.getStorageSync('gatherNowMenuList'); let now = uni.getStorageSync('gatherNowMenuList');
if(all){ if (all) {
this.AllMenuList = JSON.parse(all); this.AllMenuList = JSON.parse(all);
} }
if(now){ if (now) {
this.nowMenuList = JSON.parse(now); this.nowMenuList = JSON.parse(now);
} }
}, },
clickMenu(e, data){ clickMenu (e, data) {
switch(e){ switch (e) {
case 1: this.getUniMp(data);break; case 1:
case 2: this.navigator(data);break; this.getUniMp(data);
break;
case 2:
this.navigator(data);
break;
} }
}, },
// //
pushMenu(data){ pushMenu (data) {
this.nowMenuList.push(data); this.nowMenuList.push(data);
this.AllMenuList = this.AllMenuList.filter((item)=>{ this.AllMenuList = this.AllMenuList.filter((item) => {
return item.name!=data.name; return item.name != data.name;
}) })
}, },
// //
removeMenu(data){ removeMenu (data) {
this.AllMenuList.push(data); this.AllMenuList.push(data);
this.nowMenuList = this.nowMenuList.filter((item)=>{ this.nowMenuList = this.nowMenuList.filter((item) => {
return item.name!=data.name; return item.name != data.name;
}) })
}, },
// //
editComfirm(){ editComfirm () {
this.editFlag = false; this.editFlag = false;
uni.setStorageSync('gatherAllMenuList', JSON.stringify(this.AllMenuList)); uni.setStorageSync('gatherAllMenuList', JSON.stringify(this.AllMenuList));
uni.setStorageSync('gatherNowMenuList', JSON.stringify(this.nowMenuList)); uni.setStorageSync('gatherNowMenuList', JSON.stringify(this.nowMenuList));
}, },
getUniMp(appid){ getUniMp (appid) {
console.log('点击供销平台'); console.log('点击供销平台');
// #ifdef APP-PLUS // #ifdef APP-PLUS
uniMP.loadMP(appid); uniMP.loadMP(appid);
return ; return;
// #endif // #endif
uni.showToast({ uni.showToast({
icon: 'none', icon: 'none',
title: 'H5不支持打开小程序' 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({ uni.getLocation({
type: 'wgs84', type: 'wgs84',
timeout: '10', timeout: '10',
@ -238,8 +408,14 @@
lat: latitude, lat: latitude,
long: longitude long: longitude
}).then(res => { }).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 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 => { }).catch(err => {
uni.showToast({ uni.showToast({
title: err, 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 kkchange (e) {
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) {
this.bgColor = e this.bgColor = e
}, },
navigator(url, t) { navigator (url, t) {
// if (this.userInfoData.is_wsxx === 0 && t != '') return Toast(""); // if (this.userInfoData.is_wsxx === 0 && t != '') return Toast("");
uni.navigateTo({ uni.navigateTo({
url: url url: url
}) })
}, },
getUserInfo: function() { getUserInfo: function () {
let that = this; let that = this;
getUserInfo().then(res => { getUserInfo().then(res => {
that.userInfoData = res.data; that.userInfoData = res.data;
@ -326,47 +465,51 @@
}); });
} }
} }
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.gather { .gather {
padding-bottom: 164.91rpx; 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 { to {
position: absolute; opacity: 1;
}
}
.site-box {
width: 100%; width: 100%;
height: 100%;
top: 0;
/* #ifdef MP || APP-PLUS */ /* #ifdef MP || APP-PLUS */
z-index: -100; height: 160rpx;
/* #endif */ /* #endif */
/* #ifdef H5 */ /* #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; height: 120rpx;
/* #endif */
margin-bottom: 26.32rpx; margin-bottom: 26.32rpx;
position: absolute; position: absolute;
top: 0rpx; top: 0rpx;
position: fixed; position: fixed;
z-index: 999; z-index: 999;
padding-top: 30rpx; /* #ifdef MP || APP-PLUS */
padding-top: 75rpx;
/* #endif */
/* #ifdef H5 */
padding-top: 25rpx;
/* #endif */
padding-right: 20rpx; padding-right: 20rpx;
// //
@ -375,33 +518,36 @@
margin-right: 24.56rpx; margin-right: 24.56rpx;
font-size: 30rpx; font-size: 30rpx;
opacity: 0;
.town_name { .town_name {
margin-left: 21rpx; margin-left: 21rpx;
} }
} }
.iconfont { .iconfont {
opacity: 0;
font-size: 30rpx;
font-size: 35.09rpx; font-size: 35.09rpx;
} }
} }
.top_box {
.top_box {
// padding-top: 180rpx; // padding-top: 180rpx;
background: linear-gradient(#36A2FF, #fff); background: linear-gradient(#36a2ff, #fff);
} }
.com { .com {
margin-left: 50%; margin-left: 50%;
transform: translate(-50%); transform: translate(-50%);
} }
.business { .business {
width: 694.74rpx; width: 694.74rpx;
// margin-bottom: 175rpx; // margin-bottom: 175rpx;
} }
.special_work { .special_work {
// padding: 17.54rpx; // padding: 17.54rpx;
width: 694.74rpx; width: 694.74rpx;
margin-top: 52.63rpx; margin-top: 52.63rpx;
@ -414,19 +560,22 @@
margin-bottom: 38.6rpx; margin-bottom: 38.6rpx;
} }
.project{ .project {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: flex-end; align-items: flex-end;
.edit{
.edit {
font-size: 26rpx; font-size: 26rpx;
font-weight: 400; font-weight: 400;
&::after{
content: '>'; &::after {
content: ">";
margin-left: 10rpx; margin-left: 10rpx;
} }
} }
.edit2{
.edit2 {
font-size: 26rpx; font-size: 26rpx;
font-weight: 400; font-weight: 400;
} }
@ -453,7 +602,7 @@
height: 63.16rpx; height: 63.16rpx;
} }
.icon{ .icon {
position: absolute; position: absolute;
top: 0rpx; top: 0rpx;
right: 25rpx; right: 25rpx;
@ -488,10 +637,10 @@
} }
} }
} }
} }
.edit_card{ .edit_card {
background-color: #fff; background-color: #fff;
padding-top: 28rpx; padding-top: 28rpx;
} }
</style> </style>

View File

@ -11,17 +11,18 @@
<view class="goods"> <view class="goods">
<block v-for="(item,index) in cateGoods" :key="index"> <block v-for="(item,index) in cateGoods" :key="index">
<view class="goods_item" @click="gogogo(item)"> <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="botm">
<view class="title">{{item.title}}</view> <view class="title">{{item.title}}</view>
<view class="goods_info flex_a_c"> <view class="goods_info flex_a_c">
<view class="l_info flex_a_c"> <view class="l_info flex_a_c">
<image :src="(item.author && item.author.avatar) || '/static/images/f.png'" mode="aspectFill" <image :src="(item.author && item.author.avatar) || '/static/images/f.png'"
class="g_img"></image> mode="aspectFit" class="g_img"></image>
<view class="g_name">{{item.author && item.author.nickname}}</view> <view class="g_name">{{item.author && item.author.nickname}}</view>
</view> </view>
<view class="nice_box" @click.stop="giveStart(item)"> <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> <text class="collect">{{item.count_start}}</text>
</view> </view>
</view> </view>
@ -52,12 +53,29 @@
<script> <script>
import mTabbar from '@/components/m-tabbar/m-tabbar.vue' import mTabbar from '@/components/m-tabbar/m-tabbar.vue'
import zbpSwiper from '@/components/zbpSwiper' import zbpSwiper from '@/components/zbpSwiper'
import { getSlideAPI } from '@/api/lihai.js' import {
import { graphicLstApi, getTopicList, graphicStartApi } from '@/api/community.js' getSlideAPI
import { getIndexData, getDiy } from '@/api/api.js' } from '@/api/lihai.js'
import { getGeocoder, merClassifly } from '@/api/store.js'; import {
import { getArea, getStreet } from '@/api/article.js'; graphicLstApi,
import { Toast } from '@/libs/uniApi' 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 { export default {
components: { components: {
mTabbar, mTabbar,
@ -115,6 +133,7 @@
this.where.street_id = e.value[1].code this.where.street_id = e.value[1].code
this.showPicker = false this.showPicker = false
}, },
changeHandler(e) { changeHandler(e) {
const { const {
columnIndex, columnIndex,
@ -149,13 +168,9 @@
gogogo(item) { gogogo(item) {
if (this.tabsData.tabsActive == 1) { if (this.tabsData.tabsActive == 1) {
uni.navigateTo({ uni.navigateTo({
//#ifdef APP url: `/pages/short_video/appSwiper/index?id=${this.cateGoods[0].community_id}`
url: '/pages/short_video/appSwiper/index?id=' + item.community_id
//#endif
//#ifndef APP
url: '/pages/short_video/nvueSwiper/index?id=' + item.community_id
//#endif
}) })
} else { } else {
uni.navigateTo({ uni.navigateTo({
url: '/pages/plantGrass/plant_detail/index?id=' + item.community_id url: '/pages/plantGrass/plant_detail/index?id=' + item.community_id
@ -203,12 +218,7 @@
this.tabsData.tabsActive = item.index this.tabsData.tabsActive = item.index
if (item.index == 1) { if (item.index == 1) {
uni.navigateTo({ 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}` url: `/pages/short_video/appSwiper/index?id=${this.cateGoods[0].community_id}`
// #endif
}) })
} }
}, },
@ -219,7 +229,10 @@
let latitude, longitude; let latitude, longitude;
latitude = res.latitude.toString(); latitude = res.latitude.toString();
longitude = res.longitude.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.$store.commit('setLocation', res.data)
this.street = res.data.address_component.street this.street = res.data.address_component.street
}).catch(err => { }).catch(err => {

View File

@ -28,7 +28,7 @@
</view> </view>
<view class="advertItem02 advertItem05 acea-row" v-if="style==4"> <view class="advertItem02 advertItem05 acea-row" v-if="style==4">
<view class="item" v-for="(item,index) in picList" :key="index" @click="goDetail(item)"> <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> </view>
<view class="advertItem02 advertItem06 acea-row" v-if="style==5"> <view class="advertItem02 advertItem06 acea-row" v-if="style==5">

View File

@ -1,23 +1,30 @@
<template> <template>
<view class="Circle_friends"> <view class="Circle_friends">
<view class="circle_friends_wrapper"> <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',isFshow?'sitebox':'']" @click="selectLocation">
<view class="place_wrapper flex_a_c" > <view :class="['iconfont','icon-weizhi',isFshow?'sitebox':'']" style="margin-left: 20rpx;">
<view class="iconfont icon-weizhi" style="margin-left: 20rpx;"></view> </view>
<view class="town_name">{{street}}</view> <view class="town_name">{{street}}</view>
</view> </view>
<navigator url="/pages/chat/customer_list/index?type=0" hover-class="none"> <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> </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=""> <img :src="bgColor" alt="">
</view> </view>
</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>
<view class="goodslist"> <view class="goodslist">
<view class="goods"> <WaterfallsFlow :wfList='cateGoods' />
<view v-for="(item,index) in cateGoods" :key="index" v-if='index%2!=0'>
<!-- <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 class="goods_item" @click="gogogo(item)">
<view style="height: 251rpx;"> <view style="height: 251rpx;">
<u--image :src="item.image[0]" width="356rpx" height="251rpx" :showLoading="true" <u--image :src="item.image[0]" width="356rpx" height="251rpx" :showLoading="true"
@ -42,48 +85,14 @@
</view> </view>
<view class="goods_item_img" v-if="item.video_link.length>0"> <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>
<view class="botm"> <view class="botm">
<view class="title">{{item.title}}</view> <view class="title">{{item.title}}</view>
<view class="goods_info flex_a_c"> <view class="goods_info flex_a_c">
<view class="l_info flex_a_c"> <view class="l_info flex_a_c">
<image :src="(item.author && item.author.avatar) || '/static/images/f.png'" <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)">
<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>
<view class="g_name">{{item.author && item.author.nickname}}</view> <view class="g_name">{{item.author && item.author.nickname}}</view>
</view> </view>
<view class="nice_box" @click.stop="giveStart(item)"> <view class="nice_box" @click.stop="giveStart(item)">
@ -96,6 +105,7 @@
</view> </view>
</view> </view>
</view> </view>
-->
@ -132,6 +142,7 @@
import mTabbar from '@/components/m-tabbar/m-tabbar.vue' import mTabbar from '@/components/m-tabbar/m-tabbar.vue'
import zbpSwiper from '@/components/zbpSwiper' import zbpSwiper from '@/components/zbpSwiper'
import easyLoadimage from '@/components/easy-loadimage/easy-loadimage.vue'; import easyLoadimage from '@/components/easy-loadimage/easy-loadimage.vue';
import WaterfallsFlow from '@/components/WaterfallsFlow/WaterfallsFlows.vue'
import { import {
getSlideAPI getSlideAPI
@ -162,7 +173,8 @@
components: { components: {
mTabbar, mTabbar,
zbpSwiper, zbpSwiper,
easyLoadimage easyLoadimage,
WaterfallsFlow
}, },
data() { data() {
return { return {
@ -190,7 +202,7 @@
where: { where: {
category_id: 0, category_id: 0,
page: 1, page: 1,
limit: 15 limit: 6
}, },
currentItemId: 69, // 0 || 69 currentItemId: 69, // 0 || 69
keyword: '', keyword: '',
@ -203,23 +215,28 @@
streeta_id: '', streeta_id: '',
street: '', street: '',
bgColor: '', bgColor: '',
backColor: 'rgba(248, 66, 33, 0)',
isFshow: false, isFshow: false,
scrollTop: 0,
show: true
} }
}, },
onPullDownRefresh() { onPullDownRefresh() {
this.getCateList() this.getCateList()
this.cateGoods = [] this.cateGoods = []
this.getGoods() this.getGoods()
this.selfLocation()
this.Area() this.Area()
uni.stopPullDownRefresh() uni.stopPullDownRefresh()
}, },
onLoad() { onLoad() {
this.getCateList() this.getCateList()
this.getArticle() this.getArticle()
this.getGoods() this.getGoods()
this.selfLocation()
this.Area() this.Area()
this.setPermissions() this.setPermissions()
@ -236,31 +253,49 @@
}) })
}, },
onShow() {},
onReachBottom() { onReachBottom() {
if (this.status == 'nomore') return; if (this.status == 'nomore') return;
this.status = 'loading'; this.status = 'loading';
this.where.page = ++this.where.page; this.where.page = ++this.where.page;
this.getGoods() this.getGoods()
}, },
mounted() { mounted() {
this.selfLocation()
// #ifdef H5 // #ifdef H5
// #endif
// //
window.addEventListener("scroll", this.scrolling); window.addEventListener("scroll", this.scrolling);
// #endif
this.$bus.$on('value-updated', (newValue) => {
//
this.street = newValue.split(',')[0]
});
}, },
// #ifdef APP-PLUS // #ifdef APP-PLUS
onPageScroll(e) { onPageScroll(e) {
// this.scrollTop = e.scrollTop;
console.log(e.scrollTop) const scrollTop = e.scrollTop;
if(e.scrollTop>0){
this.isFshow=true //
}else{
this.isFshow=false 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 // #endif
@ -274,7 +309,7 @@
document.body.scrollTop; document.body.scrollTop;
// //
let scrollStep = scrollTop - this.oldScrollTop; let scrollStep = scrollTop - this.oldScrollTop;
console.log("header 滚动距离 ", scrollTop); // console.log("header ", scrollTop);
// //
this.oldScrollTop = scrollTop; this.oldScrollTop = scrollTop;
@ -288,20 +323,23 @@
// //
if (scrollTop + windowHeight == scrollHeight) { 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 this.isFshow = false
console.log("header 滚动条向上滚动了!"); } else if (20 < scrollTop && scrollTop <= 100) {
} else { this.backColor = 'rgba(248, 66, 33, .5)'
this.isFshow = true this.isFshow = true
console.log("header 滚动条向下滚动了!"); } else if (scrollTop > 100) {
} this.backColor = 'rgba(248, 66, 33, 1)'
// this.isFshow = true
if (scrollTop <= 0) {
this.isFshow = false
console.log("header 到了最顶部")
} }
}, },
kkchange(e) { kkchange(e) {
@ -357,8 +395,17 @@
res.data.length > 0 ? this.isYunCang = 1 : this.isYunCang = 0 res.data.length > 0 ? this.isYunCang = 1 : this.isYunCang = 0
}) })
}, },
selectLocation() {
this.showPicker = true
},
confirm(e) { 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 this.showPicker = false
}, },
changeHandler(e) { changeHandler(e) {
@ -392,9 +439,13 @@
this.$refs.uPicker.setColumnValues(1, res.data); 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) { gogogo(item) {
if (item.video_link.length > 0) { if (item.video_link.length > 0) {
uni.navigateTo({ uni.navigateTo({
// #ifdef MP || H5 // #ifdef MP || H5
url: `/pages/short_video/nvueSwiper/index?id=${item.community_id}` url: `/pages/short_video/nvueSwiper/index?id=${item.community_id}`
@ -458,10 +509,6 @@
this.tabsData.list = [{ this.tabsData.list = [{
cate_name: "推荐", cate_name: "推荐",
category_id: 0 category_id: 0
}, {
cate_name: "视频",
category_id: -1,
children: []
}, ...data] }, ...data]
}, },
tabsChange(item) { tabsChange(item) {
@ -485,7 +532,7 @@
type: 'wgs84', type: 'wgs84',
timeout: '10', timeout: '10',
success: (res) => { success: (res) => {
// console.log(res)
this.isshow = false this.isshow = false
let latitude, longitude; let latitude, longitude;
latitude = res.latitude.toString(); latitude = res.latitude.toString();
@ -494,11 +541,14 @@
lat: latitude, lat: latitude,
long: longitude long: longitude
}).then(res => { }).then(res => {
uni.setStorageSync('adress_location', res.data.address) let town = res.data.address_reference.town.title
// that.$store.dispatch('setLocation', res.data) let street_id = res.data.address_reference.town.id
this.street = res.data.address_component.street 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 => { }).catch(err => {
uni.showToast({ uni.showToast({
title: err, title: err,
@ -547,15 +597,18 @@
var Build = plus.android.importClass("android.os.Build"); var Build = plus.android.importClass("android.os.Build");
//android 8.0 //android 8.0
if (Build.VERSION.SDK_INT >= 26) { 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); intent.putExtra('android.provider.extra.APP_PACKAGE', pkName);
} else if (Build.VERSION.SDK_INT >= 21) { //android 5.0-7.0 } 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_package", pkName);
intent.putExtra("app_uid", uid); intent.putExtra("app_uid", uid);
} else { //(<21)-- } else { //(<21)--
intent.setAction(Settings.ACTION_APPLICATION_DETAILS_SETTINGS); intent.setAction(Settings.ACTION_APPLICATION_DETAILS_SETTINGS);
var uri = Uri.fromParts("package", mainActivity.getPackageName(), var uri = Uri.fromParts("package", mainActivity
.getPackageName(),
null); null);
intent.setData(uri); intent.setData(uri);
} }
@ -587,7 +640,8 @@
success: function(res) { success: function(res) {
if (res.confirm) { if (res.confirm) {
var app = plus.ios.invoke('UIApplication', 'sharedApplication'); 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.invoke(app, 'openURL:', setting);
plus.ios.deleteObject(setting); plus.ios.deleteObject(setting);
plus.ios.deleteObject(app); plus.ios.deleteObject(app);
@ -602,10 +656,10 @@
} }
</script> </script>
<style lang="scss"> <style lang="scss" scoped>
page { page {
background-color: #F4F7FE; background-color: #F4F7FE;
;
// background: linear-gradient(180deg, #FFFFFF 0%, #F6F6F6 100%); // background: linear-gradient(180deg, #FFFFFF 0%, #F6F6F6 100%);
} }
@ -643,39 +697,72 @@
background: linear-gradient(180deg, #FFFFFF 0%, #F6F6F6 100%); 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 { // .bg-img {
width: 100%; // position: absolute;
height: 100%; // width: 100%;
filter: blur(30rpx); // height: 100%;
transform: scale(1.5);
// 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 { .site-box {
width: 100%; width: 100%;
/* #ifdef MP || APP-PLUS */
height: 160rpx;
/* #endif */
/* #ifdef H5 */
height: 120rpx; height: 120rpx;
/* #endif */
margin-bottom: 26.32rpx; margin-bottom: 26.32rpx;
position: absolute; position: absolute;
top: 0rpx; top: 0rpx;
position: fixed; position: fixed;
z-index: 999; 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; padding-right: 20rpx;
// //
@ -684,16 +771,22 @@
margin-right: 24.56rpx; margin-right: 24.56rpx;
font-size: 30rpx; font-size: 30rpx;
opacity: 0;
.town_name { .town_name {
margin-left: 21rpx; margin-left: 21rpx;
} }
} }
.iconfont { .iconfont {
opacity: 0;
font-size: 30rpx;
font-size: 35.09rpx; font-size: 35.09rpx;
} }
} }
.circle_friends_wrapper { .circle_friends_wrapper {
position: relative; position: relative;
@ -804,7 +897,7 @@
} }
.goodslist { .goodslist {
display: flex; // display: flex;
margin: 0 auto; margin: 0 auto;
width: 725rpx; width: 725rpx;
} }
@ -813,9 +906,13 @@
margin: 0 auto; margin: 0 auto;
width: 725rpx; width: 725rpx;
display: flex;
flex-wrap: wrap;
justify-content: space-between;
.goods_item { .goods_item {
width: 356rpx; width: 356rpx;
height: 450rpx; border: 1px solid;
border-radius: 8px; border-radius: 8px;
overflow: hidden; overflow: hidden;
background-color: #fff; background-color: #fff;
@ -823,6 +920,12 @@
flex-direction: column; flex-direction: column;
margin-bottom: 10.53rpx; margin-bottom: 10.53rpx;
position: relative; position: relative;
margin-top: -40rpx;
.kk {
width: 365rpx;
height: 251rpx;
}
.goods_item_img { .goods_item_img {
position: absolute; position: absolute;
@ -919,7 +1022,7 @@
.goods_items { .goods_items {
width: 356rpx; width: 356rpx;
height: 536rpx;
border-radius: 8px; border-radius: 8px;
overflow: hidden; overflow: hidden;

View File

@ -1,7 +1,7 @@
<template> <template>
<view class="gather"> <view class="gather">
<block v-if="isShow"> <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="special_work com" v-if="true">
<view class="title">市级供应链</view> <view class="title">市级供应链</view>
<view class="content"> <view class="content">
@ -62,7 +62,7 @@
</view> </view>
</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="business com" v-if="true">
<view class="special_work com"> <view class="special_work com">
<view class="title">我的店铺</view> <view class="title">我的店铺</view>
@ -155,7 +155,7 @@
</view> </view>
</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="business com" v-if="true">
<view class="special_work com"> <view class="special_work com">
<view class="title">里海云仓</view> <view class="title">里海云仓</view>
@ -226,6 +226,51 @@
</view> </view>
</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> </block>
@ -292,7 +337,7 @@
isShow: false, isShow: false,
bgColor: '', bgColor: '',
isFshow: false, isFshow: false,
street:'' street: ''
}; };
}, },
computed: { computed: {
@ -317,25 +362,10 @@
}, },
mounted() { mounted() {
this.appLocation() 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: { methods: {

View 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>

View File

@ -11,7 +11,7 @@
<view class="store_site flex_a_c" v-if="store_item.street_name">{{ store_item.street_name }}</view> <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 class="name">{{ store_item.mer_name }}</view>
</view> </view>
<image class="high_img" :src="youZhiImg" mode="aspectFill"></image> <image class="high_img" :src="youZhiImg" mode="aspectFit"></image>
</view> </view>
<view class="mct_msg_detail flex_a_c"> <view class="mct_msg_detail flex_a_c">
<view class="product_score">{{ store_item.product_score }}</view> <view class="product_score">{{ store_item.product_score }}</view>
@ -32,7 +32,7 @@
<scroll-view scroll-x="true" class="goods_info"> <scroll-view scroll-x="true" class="goods_info">
<view v-for="(itemn,indexn) in store_item.recommend" :key="indexn" class="goods_info_item" <view v-for="(itemn,indexn) in store_item.recommend" :key="indexn" class="goods_info_item"
@click.stop="navTogoodsDetail(itemn.product_id)"> @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_name">{{itemn.store_name}}</view>
<view class="goods_info_price">{{itemn.price}}</view> <view class="goods_info_price">{{itemn.price}}</view>
</view> </view>

View File

@ -11,7 +11,7 @@
</view> </view>
<block v-for="(item,i) in goodsList" :key="i"> <block v-for="(item,i) in goodsList" :key="i">
<view class="list_item flex_a_c"> <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="r_box flex_a_c_j_sb">
<view class="message"> <view class="message">
<view class="goodstitle">{{item.store_name}}</view> <view class="goodstitle">{{item.store_name}}</view>
@ -53,7 +53,6 @@
</u-popup> </u-popup>
</view> </view>
</template> </template>
<script> <script>
import { import {
getStorage, getStorage,
@ -151,7 +150,7 @@
const res = await productUpdate(this.merId, this.product_id, this.particulars) const res = await productUpdate(this.merId, this.product_id, this.particulars)
// Toast(message) // Toast(message)
this.getGoodsList() this.getGoodsList()
this.goodsList=[] this.goodsList = []
this.popupShow = false this.popupShow = false
this.goodsPrive = '' this.goodsPrive = ''
this.goodsNum = '' this.goodsNum = ''

View 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>

View File

@ -20,7 +20,7 @@
<block v-for="(item,index) in list" :key="index"> <block v-for="(item,index) in list" :key="index">
<view class="item_list flex"> <view class="item_list flex">
<view> <view>
<image class="goods_image" :src="item.image" mode="aspectFill"></image> <image class="goods_image" :src="item.image" mode="aspectFit"></image>
</view> </view>
<view class="left_goods_msg"> <view class="left_goods_msg">
<view class="name">{{ item.store_name }}</view> <view class="name">{{ item.store_name }}</view>

View File

@ -33,7 +33,7 @@
<view class="right_storee"> <view class="right_storee">
<scroll-view scroll-y="true" style="height: 100%; overflow: hidden;" scroll-with-animation='true' <scroll-view scroll-y="true" style="height: 100%; overflow: hidden;" scroll-with-animation='true'
@scrolltolower="scrolltolower" class="my-scroll-view"> @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 style="background-color: #fff;width: 100%;">
<view class="tabs_box flex_a_c_j_sb"> <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':''"> <view v-for="(item,index) in tabsList" :key="index" class="flex_a_c" :class="active==index?'active':''">

View File

@ -1,27 +1,108 @@
<template> <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='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="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>
<view class='input acea-row row-between-wrapper'><text class='iconfont icon-sousuo'></text> <view class="menu_cls">
<input placeholder='搜索店铺名称' placeholder-class='placeholder' confirm-type='search' name="search" <u-scroll-list indicatorActiveColor='#FF6D20'>
:value='sotreParam.keyword' @confirm="searchSubmit"></input> <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>
<!-- <view v-if="mer_location == 1" :class="'styleType'+store_street_theme" style="text-align: right;" </u-scroll-list>
class='iconfont search-right' @click='showMaoLocation(latitude,longitude)'>
<view class="iconfont icon-dingwei"></view>
<view class="right-text" v-if="recommend_address">
{{recommend_address}}
</view> </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> <view class="right">
<view class="nav-wrapper" :class="'styleType'+store_street_theme"> <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 class='nav acea-row row-middle' :class="'styleType'+store_street_theme">
<view v-for="item in downMenus" :key="item.key" class='item' <view v-for="item in downMenus" :key="item.key" class='item'
:class="{'font-colors':firstKey == item.key}" @click='set_where(item.key)'> :class="{'font-colors':firstKey == item.key}" @click='set_where(item.key)'>
@ -34,7 +115,11 @@
</view> </view>
</view> </view>
-->
<!-- 店铺 --> <!-- 店铺 -->
<!--
<block> <block>
<view class="store-wrapper"> <view class="store-wrapper">
<view class="store-item" v-for="(item,index) in storeList" :key="index"> <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"> <view class='loadingicon acea-row row-center-wrapper' v-if="loading">
<text class='loading iconfont icon-jiazai' :hidden='loading==false'></text>{{loadTitle}} <text class='loading iconfont icon-jiazai' :hidden='loading==false'></text>{{loadTitle}}
</view> </view>
-->
</view> </view>
<view class='no-shop' v-if="!storeList.length && !loading && !loadingIcon" v-cloak> <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> <image src='../../../static/images/noCart.png'></image>
<text>暂无店铺快去搜索其他店铺吧</text> <text>暂无店铺快去搜索其他店铺吧</text>
</view> </view>
@ -190,7 +278,8 @@
<script> <script>
import { import {
storeMerchantList, storeMerchantList,
getGeocoder getGeocoder,
supMenuApi
} from '@/api/store.js'; } from '@/api/store.js';
import recommend from './component/recommend'; import recommend from './component/recommend';
import rightSlider from './component/rightSlider'; import rightSlider from './component/rightSlider';
@ -217,6 +306,25 @@
}, },
data() { data() {
return { 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, price: 0,
stock: 0, stock: 0,
nows: false, nows: false,
@ -233,6 +341,7 @@
brandList: [], brandList: [],
downKey: 0, downKey: 0,
downStatus: false, downStatus: false,
menuList: [],
// //
downMenu: [{ downMenu: [{
title: '默认', title: '默认',
@ -283,18 +392,19 @@
storeTypeArr: [], // storeTypeArr: [], //
merList: [], // merList: [], //
product_type: 0, product_type: 0,
show:false, show: false,
image: '' ,//, image: '', //,
credit_buy:'',// credit_buy: '', //
}; };
}, },
onLoad(options) { onLoad(options) {
console.log(options); // console.log(options);
this.street_id = options.street_id
this.product_type = options.product_type ?? 0 this.product_type = options.product_type ?? 0
if (options.street_id != undefined) { if (options.street_id != undefined) {
this.sotreParam.street_id = options.street_id 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
this.sotreParam.type_id = options.type_id && options.type_id.split(',').toString() || '' this.sotreParam.type_id = options.type_id && options.type_id.split(',').toString() || ''
this.sotreParam.category_id = options.cate_id && options.cate_id.split(',').toString() || '' this.sotreParam.category_id = options.cate_id && options.cate_id.split(',').toString() || ''
@ -305,6 +415,10 @@
this.storeMerchantList(); this.storeMerchantList();
this.getClassfication(); this.getClassfication();
this.getStoreType(); this.getStoreType();
supMenuApi().then(res => {
this.menuList = res.data
})
}, },
computed: { computed: {
downMenus: function() { downMenus: function() {
@ -325,6 +439,28 @@
}, mapGetters(['viewColor'])), }, mapGetters(['viewColor'])),
}, },
methods: { 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) { go_details: function(product_type, product_id) {
if (product_type == 98) { if (product_type == 98) {
uni.navigateTo({ uni.navigateTo({
@ -494,7 +630,7 @@
category_id: this.sotreParam.category_id, category_id: this.sotreParam.category_id,
type_id: this.sotreParam.type_id, type_id: this.sotreParam.type_id,
street_id: this.sotreParam.street_id, street_id: this.sotreParam.street_id,
credit_buy:this.credit_buy credit_buy: this.credit_buy
} }
if (this.latitude) { if (this.latitude) {
rqData.location = this.latitude + ',' + this.longitude rqData.location = this.latitude + ',' + this.longitude
@ -521,9 +657,9 @@
} }
} }
}, },
searchSubmit: function(e) { searchSubmit: function() {
let that = this; let that = this;
that.$set(that.sotreParam, 'keyword', e.detail.value); that.$set(that.sotreParam, 'keyword', this.sotreParam.keyword);
this.set_where(this.firstKey) this.set_where(this.firstKey)
}, },
// //
@ -616,49 +752,112 @@
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.productList .search { * {
width: 100%; margin: 0;
height: 146rpx; padding: 0;
padding: 0 20rpx; }
box-sizing: border-box;
.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; position: fixed;
left: 0; z-index: 999;
top: 0; width: 100%;
z-index: 9; // margin-top: 10px;
display: flex;
flex-wrap: nowrap;
background-color: #fff;
padding-top: 80rpx;
padding-bottom: 20rpx;
&.styleType1 {
background-color: var(--view-theme);
} }
.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; 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; align-items: center;
justify-content: space-between;
max-width: max-content; text {
flex: 1; margin: 0 20rpx 0 5rpx;
padding-left: 20rpx; }
}
}
}
} }
.right-text { .address {
white-space: nowrap;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; width: 200px;
font-size: 28rpx; }
width: max-content;
color: #fff;
padding: 0 10rpx;
} }
.icon-xiangyou,
.icon-dingwei {
font-size: 30rpx;
color: #fff;
}
}
.search-right.styleType2 .right-text, .search-right.styleType2 .right-text,
.search-right.styleType3 .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 { .productList .search .input {
flex: 1; flex: 1;
height: 60rpx; height: 60rpx;
@ -1109,7 +1329,7 @@
.no-shop { .no-shop {
background-color: #fff; background-color: #fff;
padding-bottom: calc(100% - 176rpx); // padding-bottom: calc(100% - 176rpx);
.pictrue { .pictrue {
display: flex; display: flex;
@ -1123,6 +1343,7 @@
} }
} }
} }
.guanbi { .guanbi {
width: 20px; width: 20px;
height: 20px; height: 20px;

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -8,7 +8,7 @@
<view class="text flex_a_c"><i class="iconfont icon-xinghao"></i>上传店铺背景图</view> <view class="text flex_a_c"><i class="iconfont icon-xinghao"></i>上传店铺背景图</view>
<block v-if="images[0].img"> <block v-if="images[0].img">
<u--image :showLoading="true" :src="images[0].img" width="388px" height="210.53rpx" radius="4px" <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> </block>
<view v-else class="upload" @click="seleckImage(0)"> <view v-else class="upload" @click="seleckImage(0)">
<view class="iconfont icon-tupian1"></view> <view class="iconfont icon-tupian1"></view>
@ -20,7 +20,7 @@
<view class="text flex_a_c"><i class="iconfont icon-xinghao"></i>上传店铺头像</view> <view class="text flex_a_c"><i class="iconfont icon-xinghao"></i>上传店铺头像</view>
<block v-if="images[1].img"> <block v-if="images[1].img">
<u--image :showLoading="true" :src="images[1].img" width="210.53rpx" height="210.53rpx" <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> </block>
<view v-else class="avatar_img" @click="seleckImage(1)"> <view v-else class="avatar_img" @click="seleckImage(1)">
<view class="iconfont icon-tupian1"></view> <view class="iconfont icon-tupian1"></view>

View File

@ -1,5 +1,6 @@
<template> <template>
<view class="container"> <view class="container">
<!-- <!--
注意:这是 App 所用页面,请勿引入微信小程序或浏览器运行,最好运行在真机 注意:这是 App 所用页面,请勿引入微信小程序或浏览器运行,最好运行在真机
@ -20,8 +21,8 @@
--> -->
<!-- 头部导航 --> <!-- 头部导航 -->
<view v-if="!isUser" class="header" :style="{backgroundColor:currentNav==1?'':'#fff'}" > <!-- <view v-if="!isUser" class="header" :style="{backgroundColor:currentNav==1?'':'#000'}" >
<!-- <view class="items" @click.stop="navTap(2)"> <view class="items" @click.stop="navTap(2)">
<text class="tName" :class="currentNav==2?'on':''">关注</text> <text class="tName" :class="currentNav==2?'on':''">关注</text>
</view> </view>
<view class="items" @click.stop="navTap(1)"> <view class="items" @click.stop="navTap(1)">
@ -29,14 +30,14 @@
</view> </view>
<view class="items" @click.stop="navTap(3)"> <view class="items" @click.stop="navTap(3)">
<text class="tName" :class="currentNav==3?'on':''">列表</text> <text class="tName" :class="currentNav==3?'on':''">列表</text>
</view> -->
</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> <view>
<image :src="imgHost+'/static/no-video.png'" class="pictrue"></image> <image :src="imgHost+'/static/no-video.png'" class="pictrue"></image>
<text class="tips">暂无短视频内容哦~</text> <text class="tips">暂无短视频内容哦~</text>
</view> </view>
</view> </view> -->
<view v-if="currentNav !== 3" :style="'width: '+ windowWidth +'px; height: '+ boxStyle.height +'px;'"> <view v-if="currentNav !== 3" :style="'width: '+ windowWidth +'px; height: '+ boxStyle.height +'px;'">
<!-- <!--
1.这里的 swiper 不是用来控制视频滑动的,而是用来控制左右滑动的,如果不需要的可以改成 view 1.这里的 swiper 不是用来控制视频滑动的,而是用来控制左右滑动的,如果不需要的可以改成 view
@ -47,9 +48,9 @@
1Mac按住 option 键,然后点击方法名,即可跳转到方法 1Mac按住 option 键,然后点击方法名,即可跳转到方法
2windows按住 Alt 键,然后鼠标左击,即可跳转到方法 2windows按住 Alt 键,然后鼠标左击,即可跳转到方法
--> -->
<list @loadmore="getData" @scroll="scrolls" :loadmoreoffset="wHeight*1" :show-scrollbar="false" ref="listBox" <list @loadmore="getData" @scroll="scrolls" :loadmoreoffset="wHeight*1" :show-scrollbar="false"
:pagingEnabled="true" :scrollable="true"> ref="listBox" :pagingEnabled="true" :scrollable="true">
<!-- 刷新模块 -->
<refresh class="refresh" @refresh="onrefresh" @pullingdown="onpullingdown" <refresh class="refresh" @refresh="onrefresh" @pullingdown="onpullingdown"
:display="refreshing ? 'show' : 'hide'"> :display="refreshing ? 'show' : 'hide'">
<loading style="background-color: #FFFFFF;"> <loading style="background-color: #FFFFFF;">
@ -63,7 +64,7 @@
<!-- 用div把视频模组套起来 --> <!-- 用div把视频模组套起来 -->
<div :style="'width: '+ windowWidth +'px; height: '+ boxStyle.height +'px;'"> <div :style="'width: '+ windowWidth +'px; height: '+ boxStyle.height +'px;'">
<!-- <view v-if="Math.abs(k-i)<=1"> --> <!-- <view v-if="Math.abs(k-i)<=1"> -->
<view v-if="max > i"> <view v-if="Math.abs(k-i)<=1">
<view class="root"> <view class="root">
<!-- <!--
具体视频参数可以参考官方文档 具体视频参数可以参考官方文档
@ -94,15 +95,17 @@
6在 timeupdate 方法里加入if(index == this.k){把里面的加一个总的判断} 6在 timeupdate 方法里加入if(index == this.k){把里面的加一个总的判断}
3.其他的下面有详解 3.其他的下面有详解
--> -->
<video :ref="'item'+i" :id="item.community_id" :loop="true" :autoplay="i == k" :src="item.video_link" <video :ref="'item'+i" :id="item.community_id" :loop="true" :autoplay="i == k"
:muted="item.isplay" :enable-progress-gesture="false" :page-gesture="false" :controls="false" :src="item.video_link" :muted="item.isplay" :enable-progress-gesture="false"
:show-loading="true" :show-fullscreen-btn="false" :show-center-play-btn="false" :style="boxStyle" :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> :object-fit="object_fit" @timeupdate="timeupdate($event,i)"></video>
</view> </view>
<!-- 直接用 view 就行了,一样是可以覆盖原生组件的 --> <!-- 直接用 view 就行了,一样是可以覆盖原生组件的 -->
<!-- 这个是暂停时出现的图标 --> <!-- 这个是暂停时出现的图标 -->
<view class="videoHover" @click="tapVideoHover(item.state,$event)" :style="boxStyle"> <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>
<!--审核状态--> <!--审核状态-->
<view v-if="item.status==-1 || item.status==0 || item.status==-2" class="video-status"> <view v-if="item.status==-1 || item.status==0 || item.status==-2" class="video-status">
@ -137,19 +140,23 @@
</view> </view>
</view> </view>
<view v-if="item.relevance.length > 0 && k==i" class="product"> <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-view class="scroll-view" scroll-x="true"
scroll-with-animation show-scrollbar="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 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"> <view class="picture">
<image class="image" :src="goods.spu.image"></image> <image class="image" :src="goods.spu.image"></image>
</view> </view>
<view class="product-text"> <view class="product-text">
<text class="name line1" <text class="name line1"
v-if="goods.spu && goods.spu.store_name.length>=12">{{goods.spu.store_name.slice(0,12)}}...</text> 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="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> </view>
<text class="buy-btn">购买</text> <text class="buy-btn">购买</text>
</view> </view>
@ -170,30 +177,36 @@
<!-- 1.头像 --> <!-- 1.头像 -->
<navigator v-if="userInfo.uid != item.author.uid" hover-class="none" <navigator v-if="userInfo.uid != item.author.uid" hover-class="none"
:url="'/pages/plantGrass/plant_user/index?id='+item.uid" class="pictrue"> :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> </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> class="iconfont icon-shangpinshuliang-jia">+</text></view>
<view v-else class="yiguanzhu"><text class="iconfont"></text></view> <view v-else class="yiguanzhu"><text class="iconfont"></text></view>
</navigator> </navigator>
<!-- 2.点赞 --> <!-- 2.点赞 -->
<view @click="cLike(item);" style="margin-top: 5px;" :class="{'likeNumActive':item.relevance_id}"> <view @click="cLike(item);" style="margin-top: 5px;"
<image v-if="item.relevance_id" src="../static/img/index/xin.png" style="width: 32px; height: 32px;"> :class="{'likeNumActive':item.relevance_id}">
<image v-if="item.relevance_id" src="../static/img/index/xin.png"
style="width: 32px; height: 32px;">
</image> </image>
<image v-if="!item.relevance_id" src="../static/img/index/xin-2.png" <image v-if="!item.relevance_id" src="../static/img/index/xin-2.png"
style="width: 32px; height: 32px;"></image> style="width: 32px; height: 32px;"></image>
<text class="info-text">{{item.count_start > 0 ? item.count_start : '点赞'}}</text> <text class="info-text">{{item.count_start > 0 ? item.count_start : '点赞'}}</text>
</view> </view>
<!-- 3.评论 --> <!-- 3.评论 -->
<view v-if="community_reply_status == 1 && item.status == 1" class="comment" @click="toComment(item,i)" <view v-if="community_reply_status == 1 && item.status == 1" class="comment"
style="margin-top: 18px;"> @click="toComment(item,i)" style="margin-top: 18px;">
<image src="../static/img/index/evaluate.png" style="width: 54rpx; height: 50rpx;"></image> <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> <text class="info-text">{{item.count_reply>0 ? item.count_reply : '评论'}}</text>
</view> </view>
<!-- 4.分享 --> <!-- 4.分享 -->
<view v-if="item.status == 1" @click="appShare('WXSceneSession',item.community_id)" <view v-if="item.status == 1" @click="appShare('WXSceneSession',item.community_id)"
style="margin-top: 17px;"> 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> <text class="info-text">分享</text>
</view> </view>
<!-- 5.自己的视频 --> <!-- 5.自己的视频 -->
@ -216,12 +229,15 @@
<view v-if="showManage" class="manage"> <view v-if="showManage" class="manage">
<view class="manage-gou"></view> <view class="manage-gou"></view>
<navigator hover-class="none" <navigator hover-class="none"
:url="'/pages/plantGrass/plant_release/index?id='+item.community_id+'&type=2'" class="items"> :url="'/pages/plantGrass/plant_release/index?id='+item.community_id+'&type=2'"
<image src="../static/img/index/video-edit.png" style="width: 16px; height: 16px;"></image> class="items">
<image src="../static/img/index/video-edit.png" style="width: 16px; height: 16px;">
</image>
<text class="text">编辑</text> <text class="text">编辑</text>
</navigator> </navigator>
<view class="items" @click.stop="deleteTopic(item)"> <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> <text class="text">删除</text>
</view> </view>
</view> </view>
@ -232,7 +248,8 @@
--> -->
<!-- 3.阿里云视频截帧地址https://help.aliyun.com/document_detail/64555.html --> <!-- 3.阿里云视频截帧地址https://help.aliyun.com/document_detail/64555.html -->
<image v-if="item.isShowimage == true" <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;'"> :style="'width: 120upx; height: 160upx; border-radius: 10upx; position: absolute; bottom: '+ (ProgressBarBottom + 160) +'upx; left: '+ (currentPositions - 15) +'px;'">
</image> </image>
</view> </view>
@ -241,21 +258,23 @@
</list> </list>
</view> </view>
<waterfall class="video-list" v-if="currentNav === 3" column-gap="6" column-count="2" :show-scrollbar="false" @loadmore="getGoods()" <waterfall class="video-list" v-if="currentNav === 3" column-gap="6" column-count="2" :show-scrollbar="false"
column-width="195px" :style="'width: '+ windowWidth +'px; height: '+ boxStyle.height +'px;'" > @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" <cell class="goods_item" style="margin-bottom: 10px;" v-for="(item,index) in cateGoods" :key="item.uid"
@click="gogogo(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="botm">
<text class="title">{{item.title}}</text> <text class="title">{{item.title}}</text>
<view class="goods_info"> <view class="goods_info">
<view class="l_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> class="g_img"></image>
<text class="g_name">{{item.author && item.author.nickname}}</text> <text class="g_name">{{item.author && item.author.nickname}}</text>
</view> </view>
<view class="nice_box flex_a_c" @click.stop="giveStart(item)"> <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> <text class="collect">{{item.count_start}}</text>
</view> </view>
@ -296,10 +315,11 @@
<mentioned ref="mentioned" @close="closePopup" :list="moreList" :uid="authorUid"></mentioned> <mentioned ref="mentioned" @close="closePopup" :list="moreList" :uid="authorUid"></mentioned>
</view> </view>
</uni-popup> </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="fixed-head">
<view class="sys-head" :style="{height:statusBarHeight}"></view> <view class="sys-head" :style="{height:statusBarHeight}"></view>
<view class="tool-bar" @click='goBack()'> <view class="tool-bar" @click='goBack()'>
<image class="icon-xiangzuo" src="../static/img/index/icon-back.png"></image> <image class="icon-xiangzuo" src="../static/img/index/icon-back.png"></image>
</view> </view>
</view> </view>
@ -308,9 +328,15 @@
<script> <script>
const app = getApp(); const app = getApp();
let sysHeight = uni.getSystemInfoSync().statusBarHeight let sysHeight = uni.getSystemInfoSync().statusBarHeight
import { toLogin } from '@/libs/login.js'; import {
import { mapGetters } from 'vuex'; toLogin
import { configMap } from '@/utils'; } from '@/libs/login.js';
import {
mapGetters
} from 'vuex';
import {
configMap
} from '@/utils';
/* /*
引入评论组件 引入评论组件
*/ */
@ -318,6 +344,7 @@
import mentioned from '../components/mentioned/mentioned.vue' import mentioned from '../components/mentioned/mentioned.vue'
import authorize from '@/components/Authorize'; import authorize from '@/components/Authorize';
import { import {
deoList,
videoList, videoList,
myVideoList, myVideoList,
graphicStartApi, graphicStartApi,
@ -326,10 +353,17 @@
focusArticleLst, focusArticleLst,
graphicLstApi graphicLstApi
} from '@/api/community.js'; } from '@/api/community.js';
import { HTTP_REQUEST_URL } from '@/config/app.js'; import {
import { getUserInfo } from '@/api/user.js'; HTTP_REQUEST_URL
} from '@/config/app.js';
import {
getUserInfo
} from '@/api/user.js';
export default { 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() { data() {
return { return {
imgHost: HTTP_REQUEST_URL, imgHost: HTTP_REQUEST_URL,
@ -368,7 +402,7 @@
newTime: 0, //跟手滑动后的最新时间💗 newTime: 0, //跟手滑动后的最新时间💗
timeNumber: 0, //🌟💗 timeNumber: 0, //🌟💗
ProgressBarBottom: 20, //进度条离底部的距离💗 ProgressBarBottom: 20, //进度条离底部的距离💗
object_fit: 'contain', //视频样式默认包含🌟💗 object_fit: 'cover', //视频样式默认包含🌟💗
mode: 'aspectFit', //图片封面样式🌟💗 mode: 'aspectFit', //图片封面样式🌟💗
timeout: "", //🌟用来阻止 setTimeout()方法 timeout: "", //🌟用来阻止 setTimeout()方法
voice: "", //🌟用来阻止 setTimeout()方法 voice: "", //🌟用来阻止 setTimeout()方法
@ -388,7 +422,9 @@
currentNav: 1, currentNav: 1,
limit: 6, limit: 6,
page: 1, page: 1,
userInfo: { uid: 0 }, userInfo: {
uid: 0
},
moreList: [], moreList: [],
isShowAuth: false, //是否隐藏授权 isShowAuth: false, //是否隐藏授权
isAuto: false, //没有授权的不会自动授权 isAuto: false, //没有授权的不会自动授权
@ -453,12 +489,12 @@
// console.log('到后台'); // console.log('到后台');
}, },
onLoad(options) { onLoad(options) {
console.log(options);
this.videoID = options.id || 0; this.videoID = options.id || 0;
this.isUser = options.user == 1 ? true : false; this.isUser = options.user == 1 ? true : false;
this.userUid = options.uid ? options.uid : 0; this.userUid = options.uid ? options.uid : 0;
this.isSatrt = options.tab == 1 ? 1 : 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('到后台'); // console.log('到后台');
this.platform = uni.getSystemInfoSync().platform this.platform = uni.getSystemInfoSync().platform
this.windowWidth = uni.getSystemInfoSync().screenWidth //获取屏幕宽度 this.windowWidth = uni.getSystemInfoSync().screenWidth //获取屏幕宽度
@ -466,7 +502,7 @@
this.wHeight = uni.getSystemInfoSync().screenHeight; //获取屏幕高度 this.wHeight = uni.getSystemInfoSync().screenHeight; //获取屏幕高度
this.boxStyle.height = this.wHeight; //改变视频高度 this.boxStyle.height = this.wHeight; //改变视频高度
this.get() //这一步,加载视频数据 this.get() //这一步,加载视频数据
if (this.isLogin) this.getUserInfo() // if (this.isLogin) this.getUserInfo()
}, },
onReady() {}, onReady() {},
methods: { methods: {
@ -559,6 +595,7 @@
} }
}); });
}, },
// #endif // #endif
/** /**
* 获取个人用户信息 * 获取个人用户信息
@ -576,7 +613,9 @@
this.isShowAuth = true this.isShowAuth = true
} else { } else {
let status = 1 let status = 1
followAuthorApi(item.uid, { status: status }).then(res => { followAuthorApi(item.uid, {
status: status
}).then(res => {
if (res.status === 200) { if (res.status === 200) {
item.is_fans = true item.is_fans = true
} }
@ -606,7 +645,8 @@
}); });
setTimeout(function() { setTimeout(function() {
uni.redirectTo({ uni.redirectTo({
url: '/pages/plantGrass/plant_user/index?id=' + item.uid url: '/pages/plantGrass/plant_user/index?id=' +
item.uid
}) })
}, 1000); }, 1000);
} }
@ -617,15 +657,15 @@
} }
}); });
}, },
// 授权回调 // // 授权回调
onLoadFun() { // onLoadFun() {
this.isShowAuth = false // this.isShowAuth = false
this.getUserInfo() // this.getUserInfo()
}, // },
// 授权关闭 // 授权关闭
authColse: function(e) { // authColse: function(e) {
this.isShowAuth = e // this.isShowAuth = e
}, // },
moreTap(item) { moreTap(item) {
item.isMore = !item.isMore; item.isMore = !item.isMore;
}, },
@ -652,28 +692,10 @@
let that = this; let that = this;
if (!that.loadVideo) return if (!that.loadVideo) return
that.loadVideo = true that.loadVideo = true
that.isUser ?
myVideoList(that.userUid, { deoList(that.videoID).then(res => {
page: that.page,
limit: that.limit,
is_star: that.isSatrt,
community_id: that.videoID
}).then(res => {
that.loadVideo = false that.loadVideo = false
that.getVideoData(res.data.list); that.getVideoData([res.data]);
}).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 => { }).catch(err => {
return uni.showToast({ return uni.showToast({
title: err, title: err,
@ -681,6 +703,35 @@
duration: 2000 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() { getFocusList() {
let that = this; let that = this;
@ -699,16 +750,19 @@
}) })
}, },
getVideoData(list) { getVideoData(list) {
console.log(list,'111111')
if (list.length == 0) return if (list.length == 0) return
let that = this; let that = this;
that.loadVideo = list.length == that.limit that.loadVideo = list.length == that.limit
that.page = that.page + 1; // that.page = that.page + 1;
that.page = 1
var msg = list var msg = list
for (let i = 0; i < msg.length; i++) { for (let i = 0; i < msg.length; i++) {
msg[i]['isMore'] = false msg[i]['isMore'] = false
msg[i]['community_id'] = msg[i]['community_id'].toString() msg[i]['community_id'] = msg[i]['community_id'].toString()
that.dataList.push(msg[i]) that.dataList.push(msg[i])
} }
console.log(that.dataList)
if (that.dataList.length !== 0) { if (that.dataList.length !== 0) {
that.dataList[that.k].state = 'play'; that.dataList[that.k].state = 'play';
setTimeout(function() { setTimeout(function() {
@ -831,17 +885,12 @@
get() { get() {
// if(!this.loadVideo) return // if(!this.loadVideo) return
this.loadVideo = true this.loadVideo = true
// 这个方法主要就是用来第一次进入视频播放时用来处理的 // 这个方法主要就是用来第一次进入视频播放时用来处理
this.isUser ? deoList(this.videoID).then(async (res) => {
myVideoList(this.userUid, {
page: this.page,
limit: this.limit,
is_star: this.isSatrt,
community_id: this.videoID
}).then(async (res) => {
this.loadVideo = false this.loadVideo = false
this.page = this.page + 1; this.page = 1;
var msg = res.data.list; var msg = [res.data];
console.log(res.data)
for (let i = 0; i < msg.length; i++) { for (let i = 0; i < msg.length; i++) {
msg[i]['isMore'] = false msg[i]['isMore'] = false
msg[i]['playIng'] = false msg[i]['playIng'] = false
@ -851,6 +900,7 @@
msg[i]['community_id'] = msg[i]['community_id'].toString() msg[i]['community_id'] = msg[i]['community_id'].toString()
} }
this.dataList = msg; this.dataList = msg;
console.log(this.dataList)
if (this.dataList.length !== 0) { if (this.dataList.length !== 0) {
this.dataList[this.k].state = 'play'; this.dataList[this.k].state = 'play';
uni.createVideoContext(this.dataList[this.k].community_id, this).play() uni.createVideoContext(this.dataList[this.k].community_id, this).play()
@ -861,29 +911,62 @@
icon: 'none', icon: 'none',
duration: 2000 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() { onpullingdown() {
this.refreshing = true this.refreshing = true
@ -940,7 +1023,9 @@
this.isShowAuth = true this.isShowAuth = true
} else { } else {
let status = item.relevance_id ? 0 : 1 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) { if (item.relevance_id) {
item.count_start--; item.count_start--;
item.count_start = item.count_start == 0 ? 0 : item.count_start item.count_start = item.count_start == 0 ? 0 : item.count_start
@ -1250,7 +1335,7 @@
.userInfo { .userInfo {
position: absolute; position: absolute;
bottom: 30px; bottom: 120px;
right: 10px; right: 10px;
display: flex; display: flex;
align-items: center; align-items: center;
@ -1633,6 +1718,6 @@
.root { .root {
background-color: #000000; background-color: #000000;
} }
</style> </style>

View File

@ -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="tool-bar">
<view class='iconfont icon-xiangzuo' @tap='goBack'></view> <view class='iconfont icon-xiangzuo' @tap='goBack'></view>
@ -29,7 +29,7 @@
<view class="items" @click.stop="navTap(3)"> <view class="items" @click.stop="navTap(3)">
<text class="tName" :class="currentNav==3?'on':''">列表</text> <text class="tName" :class="currentNav==3?'on':''">列表</text>
</view> </view>
</view> </view> -->
<swiper v-show="currentNav !== 3" :style="'width: '+ windowWidth +'px; height: '+ windowHeight +'px;'" <swiper v-show="currentNav !== 3" :style="'width: '+ windowWidth +'px; height: '+ windowHeight +'px;'"
:vertical="true" @animationfinish="animationfinish" @change="change" :current="k" :indicator-dots="false"> :vertical="true" @animationfinish="animationfinish" @change="change" :current="k" :indicator-dots="false">
<swiper-item v-for="(list,index) in dataList"> <swiper-item v-for="(list,index) in dataList">
@ -54,6 +54,7 @@
5.show-loading这里默认去掉播放转圈的标志 5.show-loading这里默认去掉播放转圈的标志
v-if="Math.abs(k-index)<=1" v-if="Math.abs(k-index)<=1"
--> -->
<video :id="list.community_id+''+index" :loop="true" :muted="list.isplay" <video :id="list.community_id+''+index" :loop="true" :muted="list.isplay"
:autoplay="index == k && isRoutine" :controls="false" :http-cache="true" :autoplay="index == k && isRoutine" :controls="false" :http-cache="true"
:page-gesture="false" :show-fullscreen-btn="false" :show-loading="false" :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" <navigator v-if="list.author && userInfo.uid != list.author.uid" hover-class="none"
:url="'/pages/plantGrass/plant_user/index?id='+list.uid" class="pictrue"> :url="'/pages/plantGrass/plant_user/index?id='+list.uid" class="pictrue">
<image class="userAvatar" <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> </image>
<view v-if="!list.is_fans || !userInfo.uid" class="guanzhu" <view v-if="!list.is_fans || !userInfo.uid" class="guanzhu"
@click.stop="followAuthor(list)"><text @click.stop="followAuthor(list)"><text
@ -226,13 +227,13 @@
@scrolltolower="getGoods()"> @scrolltolower="getGoods()">
<block v-for="(item,index) in cateGoods" :key="index"> <block v-for="(item,index) in cateGoods" :key="index">
<view class="goods_item" @click="gogogo(item)"> <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="botm">
<view class="title">{{item.title}}</view> <view class="title">{{item.title}}</view>
<view class="goods_info flex_a_c"> <view class="goods_info flex_a_c">
<view class="l_info flex_a_c"> <view class="l_info flex_a_c">
<image :src="(item.author && item.author.avatar) || '/static/images/f.png'" <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 class="g_name">{{item.author && item.author.nickname}}</view>
</view> </view>
<view class="nice_box flex_a_c" @click.stop="giveStart(item)"> <view class="nice_box flex_a_c" @click.stop="giveStart(item)">
@ -293,7 +294,7 @@
<!-- #endif --> <!-- #endif -->
</view> </view>
<canvas class="canvas" canvas-id='myCanvas' v-if="canvasStatus"></canvas> <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> </view>
</template> </template>
@ -314,6 +315,7 @@
HTTP_REQUEST_URL HTTP_REQUEST_URL
} from '@/config/app'; } from '@/config/app';
import { import {
deoList,
videoList, videoList,
myVideoList, myVideoList,
graphicStartApi, graphicStartApi,
@ -350,7 +352,7 @@
deleteHeight: 0, deleteHeight: 0,
dataList: [], dataList: [],
k: 0, k: 0,
max: 2, max: 1,
oldVideo: "", oldVideo: "",
voice: "", voice: "",
timeout: "", timeout: "",
@ -418,6 +420,7 @@
watch: { watch: {
k(new_k, old_k) { k(new_k, old_k) {
const max = new_k + 2; const max = new_k + 2;
if (this.max < max) { if (this.max < max) {
this.max = max; this.max = max;
} }
@ -425,6 +428,7 @@
this.oldCurrent = this.currentNav this.oldCurrent = this.currentNav
return false return false
} }
this.dataList[old_k].playIng = false //如果视频暂停,就加载封面 this.dataList[old_k].playIng = false //如果视频暂停,就加载封面
this.dataList[old_k].isplay = true this.dataList[old_k].isplay = true
this.dataList[old_k].state = 'pause' this.dataList[old_k].state = 'pause'
@ -447,6 +451,7 @@
} }
}, },
onLoad(options) { onLoad(options) {
console.log(options)
this.getOptions(options); this.getOptions(options);
this.videoID = options.id; this.videoID = options.id;
this.isUser = options.user == 1 ? true : false; this.isUser = options.user == 1 ? true : false;
@ -731,31 +736,10 @@
}, },
get() { get() {
let that = this let that = this
// 1.这里引入后端请求数据 that.loadVideo = true
that.isUser ? deoList(that.videoID).then(res => {
myVideoList(that.userUid, { // console.log(res.data)
page: that.page, that.videoData([res.data])
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) { if (res.data.list.length < that.limit) {
this.loadMore = false; this.loadMore = false;
} }
@ -766,7 +750,42 @@
duration: 2000 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() { getFocusList() {
let that = this; let that = this;
@ -802,16 +821,21 @@
msg[i]['isplay'] = true msg[i]['isplay'] = true
msg[i]['loading'] = false msg[i]['loading'] = false
that.dataList.push(msg[i]) that.dataList.push(msg[i])
{console.log(i,that.k)}
//#ifndef H5 //#ifndef H5
if (i == 0 && that.k == 0) { if (i == 0 && that.k == 0) {
this.dataList[0].isplay = false this.dataList[0].isplay = false
this.dataList[0].playIng = true this.dataList[0].playIng = true
this.dataList[0].state = 'play' this.dataList[0].state = 'play'
this.dataList[0].loading = false this.dataList[0].loading = false
console.log('32')
uni.createVideoContext(that.dataList[0].community_id + '' + 0, that).play() uni.createVideoContext(that.dataList[0].community_id + '' + 0, that).play()
} }
//#endif //#endif
} }
//#ifdef MP //#ifdef MP
if (this.k == 0) { if (this.k == 0) {
this.videoShare(this.dataList[0]); this.videoShare(this.dataList[0]);
@ -1371,7 +1395,7 @@
.userInfo { .userInfo {
position: absolute; position: absolute;
bottom: 60rpx; bottom: 120px;
right: 20rpx; right: 20rpx;
flex-direction: column; flex-direction: column;
text-align: center; text-align: center;

View File

@ -1198,7 +1198,7 @@
this.isTriggered = true; this.isTriggered = true;
const newList = this.goods.reverse(); const newList = this.goods.reverse();
this.goods = newList; this.goods = newList;
this.getProductSpu() // this.getProductSpu()
setTimeout(() => { setTimeout(() => {
this.isTriggered = false; this.isTriggered = false;
}, 500) }, 500)
@ -1210,7 +1210,7 @@
// //
if (this.tabActive == 0) { if (this.tabActive == 0) {
setTimeout(() => { setTimeout(() => {
this.goods.push(...this.goods); // this.goods.push(...this.goods);
}, 500) }, 500)
} }
}, },
@ -1220,7 +1220,8 @@
setTimeout(() => { setTimeout(() => {
const newList = this.goods.reverse(); const newList = this.goods.reverse();
this.goods = newList; this.goods = newList;
this.getProductSpu() // this.getGoods()
// this.getProductSpu()
// uni.startPullDownRefresh(); // uni.startPullDownRefresh();
// uni.stopPullDownRefresh(); // uni.stopPullDownRefresh();
}, 500) }, 500)

File diff suppressed because it is too large Load Diff

View File

@ -21,8 +21,9 @@
<view class="bg"></view> <view class="bg"></view>
<view class="user-info"> <view class="user-info">
<view class="avatar-box" :class="{on:userInfo.is_svip > 0 && svip_switch_status == 1}"> <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'" <image class="avatar skeleton-radius"
@click="goEdit"></image> :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"> <view class="headwear" v-if="userInfo.is_svip > 0 && svip_switch_status == 1">
<image src="/static/images/headwear.png"></image> <image src="/static/images/headwear.png"></image>
</view> </view>
@ -81,7 +82,8 @@
</view> </view>
<navigator hover-class="none" <navigator hover-class="none"
:url="userInfo.is_svip > 0 ? '/pages/annex/vip_center/index' : '/pages/annex/vip_paid/index'" :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> <image class="svip_user" src="/static/images/svip_user.png"></image>
<view class="left-box"> <view class="left-box">
<view v-if="userInfo.is_svip > 0" class="small">累计为您节省{{userInfo.svip_save_money}}</view> <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-wrapper">
<view class="order-hd flex skeleton-rect"> <view class="order-hd flex skeleton-rect">
<view class="left">我的订单</view> <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"> open-type="navigate">
全部订单 全部订单
<text class="iconfont icon-xiangyou"></text> <text class="iconfont icon-xiangyou"></text>
@ -233,19 +236,33 @@
<script> <script>
let sysHeight = uni.getSystemInfoSync().statusBarHeight + 'px'; let sysHeight = uni.getSystemInfoSync().statusBarHeight + 'px';
import mTabbar from '@/components/m-tabbar/m-tabbar.vue' import mTabbar from '@/components/m-tabbar/m-tabbar.vue'
import { getMenuList, getUserInfo, setVisit } from '@/api/user.js'; import {
import { getVersion } from "@/api/public"; getMenuList,
import { orderData } from '@/api/order.js' getUserInfo,
import { mapGetters } from "vuex"; 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 authorize from '@/components/Authorize';
import dayjs from '@/plugin/dayjs/dayjs.min.js'; import dayjs from '@/plugin/dayjs/dayjs.min.js';
import Cache from '@/utils/cache'; import Cache from '@/utils/cache';
// #ifndef H5 // #ifndef H5
import passwordPopup from '@/components/passwordPopup'; import passwordPopup from '@/components/passwordPopup';
// #endif // #endif
import { configMap } from '@/utils'; import {
configMap
} from '@/utils';
import Auth from '../../libs/wechat'; import Auth from '../../libs/wechat';
import { HTTP_REQUEST_URL } from '@/config/app'; import {
HTTP_REQUEST_URL
} from '@/config/app';
const app = getApp(); const app = getApp();
export default { export default {
components: { components: {
@ -309,22 +326,72 @@
num: 0 num: 0
}, },
], ],
imgUrls: [{ url: '', pic: '' }], imgUrls: [{
url: '',
pic: ''
}],
userMenu: [], userMenu: [],
skeletonMenu: [], skeletonMenu: [],
personalMenu: [ personalMenu: [{
{ pic: '', name: '', isShow: true }, pic: '',
{ pic: '', name: '', isShow: true }, name: '',
{ pic: '', name: '', isShow: true }, isShow: true
{ pic: '', name: '', isShow: true }, },
{ pic: '', name: '', isShow: true }, {
{ pic: '', name: '', isShow: true }, pic: '',
{ pic: '', name: '', isShow: true }, name: '',
{ pic: '', name: '', isShow: true }, isShow: true
{ pic: '', name: '', isShow: true }, },
{ pic: '', name: '', isShow: true }, {
{ pic: '', name: '', isShow: true }, pic: '',
{ pic: '', name: '', isShow: true } 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, autoplay: true,
circular: true, circular: true,
@ -333,7 +400,9 @@
isAuto: false, // isAuto: false, //
isShowAuth: false, // isShowAuth: false, //
orderStatusNum: {}, orderStatusNum: {},
userInfo: { aratar: '/static/f.png' }, userInfo: {
aratar: '/static/f.png'
},
MyMenus: [], MyMenus: [],
is_promoter: 0, //广 1 is_promoter: 0, //广 1
extension_status: 0, extension_status: 0,
@ -423,8 +492,7 @@
if (item.url == '/pages/users/user_money/index') { if (item.url == '/pages/users/user_money/index') {
// item.isShow = that.balance_func_status == 1 // item.isShow = that.balance_func_status == 1
item.isShow = true 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) { if (that.extension_status == 0) {
item.isShow = false item.isShow = false
} else if (that.extension_status == 1) { } else if (that.extension_status == 1) {

View File

@ -55,11 +55,21 @@
立即导入</view> 立即导入</view>
</view> --> </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)"> @click="importshop(item.order_id,item.orderProduct[indexs].product_id,item.orderProduct[indexs].product_sku)">
立即导入</view> 立即导入</view>
</view> </view>
<!-- <view class="totalfooter">
<view class='bnt b-color'
@click="importshop(item.order_id,item.orderProduct[indexs].product_id,item.orderProduct[indexs].product_sku)">
立即导入</view>
</view> -->
</view> </view>
</block> </block>
</view> </view>

View File

@ -8,7 +8,7 @@
<text class="iconfont icon-sousuo"></text> <text class="iconfont icon-sousuo"></text>
<input v-model="where.keyword" confirm-type="search" placeholder="请输入关键字" class="input" /> <input v-model="where.keyword" confirm-type="search" placeholder="请输入关键字" class="input" />
<view class="search_btn"> <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> </image>
</view> </view>

View File

@ -10,10 +10,10 @@
<view class='money'>{{userInfo.now_money || 0}}</view> <view class='money'>{{userInfo.now_money || 0}}</view>
</view> </view>
<!-- #ifdef APP-PLUS || H5 --> <!-- #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 --> <!-- #endif -->
<!-- #ifdef MP --> <!-- #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 --> <!-- #endif -->
</view> </view>
<view class='cumulative acea-row row-top'> <view class='cumulative acea-row row-top'>
@ -52,7 +52,7 @@
</navigator> </navigator>
</view> </view>
</view> </view>
<recommend v-if="recommend_switch == 1" :hostProduct="hostProduct" :isLogin="isLogin"></recommend> <recommend :hostProduct="hostProduct" :isLogin="isLogin"></recommend>
</view> </view>
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize> <authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize>
</view> </view>

BIN
static/images/GXSC/BBY.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

BIN
static/images/GXSC/DH.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

BIN
static/images/GXSC/DW.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

BIN
static/images/GXSC/GXZH.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

BIN
static/images/GXSC/JDMS.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

BIN
static/images/GXSC/JJRB.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

BIN
static/images/GXSC/JYPX.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

BIN
static/images/GXSC/MSGY.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

BIN
static/images/GXSC/NFCP.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

BIN
static/images/GXSC/NMJD.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

BIN
static/images/GXSC/NYSC.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

BIN
static/images/GXSC/PF.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 779 B

BIN
static/images/GXSC/SCFW.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

BIN
static/images/GXSC/SHFW.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

BIN
static/images/GXSC/SJ.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

BIN
static/images/GXSC/SS.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

BIN
static/images/GXSC/WLSY.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

BIN
static/images/GXSC/WYLY.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

BIN
static/images/GXSC/YLBJ.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

BIN
static/images/GXSC/ZXJZ.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

BIN
static/images/MYTC/BG.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 408 KiB

BIN
static/images/MYTC/PF.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 779 B

BIN
static/images/MYTC/SCFW.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

BIN
static/images/MYTC/SHFW.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

BIN
static/images/MYTC/SJ.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

BIN
static/images/MYTC/SS.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

BIN
static/images/f1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 154 KiB

BIN
static/images/f2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 184 KiB

BIN
static/images/f3.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 184 KiB

BIN
static/images/f4.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 113 KiB

BIN
static/images/f5.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 337 KiB

BIN
static/images/f6.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 177 KiB

BIN
static/images/f7.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 190 KiB

BIN
static/images/p8.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

BIN
static/images/p9.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

BIN
static/images/pj.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 388 B

BIN
static/images/pj1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 340 B

BIN
static/images/you.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 813 B