代码优化

This commit is contained in:
jia 2023-09-02 18:08:26 +08:00
parent ec4b8582da
commit 361c43e4ce
18 changed files with 630 additions and 667 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

@ -160,7 +160,7 @@ export default {
}, },
// item // item
itemTap(item) { itemTap(item) {
// this.$emit('itemTap', item) this.$emit('itemTap', item)
}, },
// item // item
goShop(item) { goShop(item) {

View File

@ -101,7 +101,7 @@ export default {
if(this.mark < this.allList.length){ if(this.mark < this.allList.length){
this.waterFall() this.waterFall()
} }
console.log(this.rightList,this.leftList)
} }
}, },
immediate: true, immediate: true,
@ -169,7 +169,7 @@ export default {
}, },
// item // item
itemTap(item) { itemTap(item) {
this.$emit('itemTap', item) // this.$emit('itemTap', item)
}, },
// item // item
goShop(item) { goShop(item) {

View File

@ -26,7 +26,9 @@
<script> <script>
import WaterfallsFlowItem from '../WaterfallsFlowItem/WaterfallsFlowItems.vue' import WaterfallsFlowItem from '../WaterfallsFlowItem/WaterfallsFlowItems.vue'
import {
getUserInfo
} from '@/api/user.js';
export default { export default {
components: { components: {
WaterfallsFlowItem WaterfallsFlowItem
@ -108,7 +110,8 @@ export default {
deep:true deep:true
}, },
mounted(){ mounted(){
console.log('1111111111')
this.getUserInfo()
}, },
// item // item
@ -119,7 +122,22 @@ export default {
} }
} }
}, },
mounted(){
this.getUserInfo()
},
methods: { methods: {
/**
* 获取个人用户信息
*/
getUserInfo: function() {
console.log('111111111')
let that = this;
getUserInfo().then(res => {
// that.userInfo = res.data;
console.log(res.data)
});
},
// //
waterFall() { waterFall() {
const i = this.mark; const i = this.mark;
@ -172,7 +190,7 @@ export default {
}, },
// item // item
goShop(item) { goShop(item) {
// this.$emit('goShop', item) this.$emit('goShop', item)
} }
} }
} }

View File

@ -1,8 +1,8 @@
<template> <template>
<view class="wf-item-page"> <view class="wf-item-page" @click="gogogo(item)">
<image :src="item.image" mode="widthFix" class="item-img" />
<image :src="item.image[0]" mode="widthFix" class="item-img" />
<view class="title">{{item.title}}</view> <view class="title">{{item.title}}</view>
<view class="tag"> <view class="tag">
<view class="tag-one"> <view class="tag-one">
@ -13,22 +13,21 @@
<text class="tag-twoa"></text> <text class="tag-twoa"></text>
<text class="tag-twob">满20包邮</text> <text class="tag-twob">满20包邮</text>
</view> </view>
</view> </view>
<view class="relase"> <view class="relase">
<view class="relase-one"> <view class="relase-one">
3.0 {{item.rate}}
</view> </view>
<view class="relase-two"> <view class="relase-two">
3000+评论 {{item.reply_count}}评论
</view> </view>
</view> </view>
<view class="price"> <view class="price">
<span></span>10.<text>00</text> <span></span>{{item.price.split('.')[0]}}.<text>{{item.price.split('.')[1]}}</text>
</view> </view>
<view class="item-info"> <view class="item-info">
<view class="info-title"> <view class="info-title" style="margin-right: 10rpx;">
通滩镇综合供销中心... {{item.merchant.mer_name}}
</view> </view>
<view class="info-img"> <view class="info-img">
<image src="@/static/images/you.png" mode="aspectFill"></image> <image src="@/static/images/you.png" mode="aspectFill"></image>
@ -44,6 +43,17 @@
type: Object, type: Object,
require: true require: true
} }
},
methods: {
gogogo(item) {
uni.navigateTo({
url:'/pages/goods_details/index?id='+item.product_id
})
},
} }
} }
</script> </script>
@ -83,7 +93,7 @@
margin-left: 21rpx; margin-left: 21rpx;
.tag-one { .tag-one {
text-align: center; text-align: center;
padding: 2rpx 9rpx; padding: 2rpx 9rpx;
border-radius: 11rpx 11rpx 11rpx 11rpx; border-radius: 11rpx 11rpx 11rpx 11rpx;
@ -120,7 +130,8 @@
} }
} }
} }
.relase {
.relase {
display: flex; display: flex;
margin-left: 21rpx; margin-left: 21rpx;
@ -163,7 +174,7 @@
margin-left: 21rpx; margin-left: 21rpx;
margin-bottom: 25rpx; margin-bottom: 25rpx;
display: flex; display: flex;
justify-content: space-between;
width: 280rpx; width: 280rpx;
height: 39rpx; height: 39rpx;
line-height: 39rpx; line-height: 39rpx;

View File

@ -18,6 +18,9 @@
</template> </template>
<script> <script>
import {
getUserInfo
} from '@/api/user.js';
export default { export default {
props: { props: {
item: { item: {
@ -29,29 +32,35 @@
data() { data() {
return {} return {
user_id: ''
}
},
mounted() {
this.getUserInfo()
}, },
methods: { methods: {
/**
* 获取个人用户信息
*/
getUserInfo: function() {
let that = this;
getUserInfo().then(res => {
this.user_id = res.data.uid
});
},
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}&uid=${this.user_id}&user=1`
// #endif // #endif
// #ifdef APP // #ifdef APP
url: `/pages/short_video/appSwiper/index?id=${item.community_id}` url: `/pages/short_video/appSwiper/index?id=${item.community_id}&uid=${this.user_id}&user=1`
// #endif // #endif
}) })
} else { } else {

View File

@ -9,9 +9,10 @@
<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">
<view class="iconfont icon-xuanzhong1"></view> <view class="iconfont icon-xuanzhong1"></view>
</block> </block>
@ -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;
@ -168,9 +180,10 @@
background: var(--view-theme); background: var(--view-theme);
} }
} }
} }
} }
.animated { .animated {
animation-duration: .3s animation-duration: .3s
} }
</style> </style>

View File

@ -5,7 +5,8 @@
<img :src="bgColor" alt=""> <img :src="bgColor" alt="">
</view> </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>
@ -69,12 +70,17 @@
location_Arr: { location_Arr: {
type: Object, type: Object,
default: () => ({}) default: () => ({})
} },
show: {
type: Boolean,
default: false
},
}, },
data() { data() {
return { return {
defaInd: [0, 0], defaInd: [0, 0],
street: '', street: '',
streeta: '',
showPicker: false, showPicker: false,
styleConfig: [], styleConfig: [],
columnData: [], columnData: [],
@ -91,26 +97,37 @@
interval: 2000, // interval: 2000, //
duration: 400 // duration: 400 //
}, },
} }
}, },
watch: { watch: {
street: { street(newval, val) {
handler(newVal, oldVal) { // console.log(newval, val)
this.street = newVal this.street = newval
}, // console.log(newval, val)
} }
}, },
created() { created() {
this.getBanner() this.getBanner()
this.Area() this.Area()
}, },
mounted() { mounted() {
this.appLocation() uni.$on('init', function(data) {
console.log('init data ', data);
});
let arr = uni.getStorageSync('ADRESS_LOCATION')
if (arr.length > 0) {
this.street = arr.split(',')[0]
} else {
this.appLocation()
}
}, },
methods: { methods: {
@ -138,8 +155,12 @@
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)
}).catch(err => { }).catch(err => {
uni.showToast({ uni.showToast({
title: err, title: err,
@ -148,7 +169,6 @@
}) })
}, },
fail: (err) => { fail: (err) => {
uni.showToast({ uni.showToast({
title: "获取定位超时", title: "获取定位超时",
icon: 'none', icon: 'none',
@ -158,10 +178,17 @@
}); });
}, },
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
uni.setStorageSync('ADRESS_LOCATION',
e.value[1].name + ',' +
e.value[1].code
)
}, },
changeHandler(e) { changeHandler(e) {
const { const {
@ -282,6 +309,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

@ -9,8 +9,8 @@ let httpApiThree
// 网络接口修改此字符 小程序域名要求https // 网络接口修改此字符 小程序域名要求https
// let httpApi = 'http://192.168.31.110:8324' // 测试 // let httpApi = 'http://192.168.31.110:8324' // 测试
if (process.env.NODE_ENV === "development") { if (process.env.NODE_ENV === "development") {
httpApi = 'https://shop.lihaink.cn' // 生产 // httpApi = 'https://shop.lihaink.cn' // 生产
// httpApi = "https://crmeb-test.shop.lihaink.cn" httpApi = "https://crmeb-test.shop.lihaink.cn"
// httpApi = "http://192.168.0.222" // httpApi = "http://192.168.0.222"
// httpApi = "http://192.168.0.108:8325" // httpApi = "http://192.168.0.108:8325"
// httpApi = 'http://192.168.0.108:8325' // httpApi = 'http://192.168.0.108:8325'
@ -24,8 +24,8 @@ if (process.env.NODE_ENV === "development") {
// httpApiThree = 'baseUrlTest' // h5跨域配置 // httpApiThree = 'baseUrlTest' // h5跨域配置
// #endif // #endif
} else if (process.env.NODE_ENV === 'production') { } else if (process.env.NODE_ENV === 'production') {
httpApi = 'https://shop.lihaink.cn' // 生产 // httpApi = 'https://shop.lihaink.cn' // 生产
// httpApi = "https://crmeb-test.shop.lihaink.cn" httpApi = "https://crmeb-test.shop.lihaink.cn"
httpApiTwo = 'https://nk.lihaink.cn' // 生产 httpApiTwo = 'https://nk.lihaink.cn' // 生产
httpApiThree = 'http://ceshi-oa.lihaink.cn' //生产 httpApiThree = 'http://ceshi-oa.lihaink.cn' //生产
} }

View File

@ -14,7 +14,7 @@
</view> </view>
</view> --> </view> -->
<zbpSwiper :isSelectPlace="true" :location_Arr="locationArr" @kkchange='kkchange'></zbpSwiper> <zbpSwiper :isSelectPlace="true" :location_Arr="locationArr" @kkchange='kkchange'></zbpSwiper>
<u-empty :show="jurisdiction" marginTop="260" mode="permission" :text="emptyText" <u-empty :show="jurisdiction" marginTop="260" mode="permission" :text="emptyText"
icon="http://cdn.uviewui.com/uview/empty/permission.png"></u-empty> icon="http://cdn.uviewui.com/uview/empty/permission.png"></u-empty>
<block v-if="isShow"> <block v-if="isShow">
@ -339,20 +339,7 @@
this.getUserInfo() this.getUserInfo()
this.appLocation() this.appLocation()
}, },
watch: {
street: {
handler(newVal, oldVal) {
this.street = newVal
let arr = Cache.get('ADRESS_LOCATION')
console.log(arr,'2')
if (arr.length > 0) {
this.street=arr.split(',')[0]
}
},
}
},
onPullDownRefresh() { onPullDownRefresh() {
this.getUserInfo() this.getUserInfo()
uni.stopPullDownRefresh() uni.stopPullDownRefresh()
@ -416,7 +403,7 @@
}, },
confirm(e) { confirm(e) {
this.street = e.value[1].name this.street = e.value[1].name
Cache.set('ADRESS_LOCATION', uni.setStorageSync('ADRESS_LOCATION',
e.value[1].name + ',' + e.value[1].name + ',' + e.value[1].name + ',' + e.value[1].name + ',' +
e.value[1].code e.value[1].code
@ -437,8 +424,12 @@
lat: latitude, lat: latitude,
long: longitude long: longitude
}).then(res => { }).then(res => {
this.street = res.data.address_component.street this.town = res.data.address_reference.town.title
Cache.set('ADRESS_LOCATION', this.street) this.street_id = res.data.address_reference.town.id
this.street = res.data.address_component.street
uni.setStorageSync('ADRESS_LOCATION',
this.town + ',' + this.town + ',' +
this.street_id)
}).catch(err => { }).catch(err => {
uni.showToast({ uni.showToast({
title: err, title: err,
@ -465,7 +456,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;
@ -479,19 +470,19 @@
// //
if (scrollTop + windowHeight == scrollHeight) { if (scrollTop + windowHeight == scrollHeight) {
// //
console.log("header 你已经到底部了"); // console.log("header ");
} }
if (scrollStep < 0) { if (scrollStep < 0) {
this.isFshow = false this.isFshow = false
console.log("header 滚动条向上滚动了!"); // console.log("header ");
} else { } else {
this.isFshow = true this.isFshow = true
console.log("header 滚动条向下滚动了!"); // console.log("header ");
} }
// //
if (scrollTop <= 0) { if (scrollTop <= 0) {
this.isFshow = false this.isFshow = false
console.log("header 到了最顶部") // console.log("header ")
} }
}, },

View File

@ -1,18 +1,16 @@
<template> <template>
<view class="Circle_friends"> <view class="Circle_friends">
<view class="circle_friends_wrapper"> <view class="circle_friends_wrapper">
<view v-if='ishshow'> <view>
<view :class="['site-box ','flex_a_c_j_sb',isFshow?'sitbox':'']"> <view class="site-box flex_a_c_j_sb" :style="{'background-color':backColor}">
<view :class="['place_wrapper','flex_a_c',isFshow?'sitbox':'']" @click="selectLocation"
style="opacity: 0;"> <view :class="['place_wrapper','flex_a_c',isFshow?'sitebox':'']" @click="selectLocation">
<view class="iconfont icon-weizhi" style="margin-left: 20rpx;background-color: transparent;"> <view :class="['iconfont','icon-weizhi',isFshow?'sitebox':'']" 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">
style="opacity: 0; transition: opacity 1s ease-in;transition-delay: 1.5s;" <view :class="['iconfont','icon-xiaoxi',isFshow?'sitebox':'']" style="color:#fff;"></view>
:class="[isFshow?'sitbox':'']">
<view class="iconfont icon-xiaoxi" style="color:#fff;"></view>
</navigator> </navigator>
</view> </view>
<!-- <view class="site-box ','flex_a_c_j_sb'" v-if="ishshow"> <!-- <view class="site-box ','flex_a_c_j_sb'" v-if="ishshow">
@ -20,10 +18,13 @@
<img :src="bgColor" alt=""> <img :src="bgColor" alt="">
</view> </view>
</view> --> </view> -->
</view> </view>
<zbpSwiper :isSelectPlace="true" :location_Arr="locationArr" @kkchange='kkchange'></zbpSwiper> <zbpSwiper ref='list' :isSelectPlace="true" :show='show' :location_Arr="locationArr" @kkchange='kkchange' @change='dchange'>
</zbpSwiper>
@ -214,26 +215,13 @@
streeta_id: '', streeta_id: '',
street: '', street: '',
bgColor: '', bgColor: '',
ishshow: true, backColor: 'rgba(248, 66, 33, 0)',
isFshow: false, isFshow: false,
scrollTop: 0, scrollTop: 0,
show: true
} }
}, },
watch: {
street: {
handler(newVal, oldVal) {
this.street = newVal
let arr = Cache.get('ADRESS_LOCATION')
// console.log(arr, '1')
if (arr.length > 0) {
this.street = arr.split(',')[0]
}
},
},
},
onPullDownRefresh() { onPullDownRefresh() {
this.getCateList() this.getCateList()
this.cateGoods = [] this.cateGoods = []
@ -284,19 +272,24 @@
// #ifdef APP-PLUS // #ifdef APP-PLUS
onPageScroll(e) { onPageScroll(e) {
if (e.scrollTop > 0) { const scrollTop = e.scrollTop;
this.ishshow = true
this.isFshow = true
} else if (e.scrollTop == 0) { //
this.ishshow = false
this.isFshow = false if (scrollTop <= 20) {
} else { this.backColor = 'rgba(248, 66, 33, 0)'
this.ishshow = false
this.isFshow = false 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
@ -327,18 +320,21 @@
// //
// 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) {
@ -398,12 +394,13 @@
this.showPicker = true this.showPicker = true
}, },
confirm(e) { confirm(e) {
this.street = e.value[1].name this.street = e.value[1].name
Cache.set('ADRESS_LOCATION', uni.setStorageSync('ADRESS_LOCATION',
e.value[1].name + ',' + e.value[1].name + ',' + e.value[1].name + ',' +
e.value[1].code e.value[1].code
) )
uni.$emit('init', 1);
this.showPicker = false this.showPicker = false
}, },
changeHandler(e) { changeHandler(e) {
@ -437,6 +434,11 @@
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) {
@ -535,11 +537,7 @@
lat: latitude, lat: latitude,
long: longitude long: longitude
}).then(res => { }).then(res => {
uni.setStorageSync('adress_location', res.data.address)
// that.$store.dispatch('setLocation', res.data)
this.street = res.data.address_component.street this.street = res.data.address_component.street
Cache.set('ADRESS_LOCATION', this.street)
}).catch(err => { }).catch(err => {
uni.showToast({ uni.showToast({
title: err, title: err,
@ -588,15 +586,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);
} }
@ -628,7 +629,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);
@ -685,23 +687,6 @@
} }
.sistbox {
transition: fadenum 3s;
}
@keyframes fadenum {
0% {
opacity: 0;
}
50% {
opacity: 1;
}
100% {
opacity: 0;
}
}
// .bg-img { // .bg-img {
// position: absolute; // position: absolute;
@ -728,12 +713,21 @@
// } // }
// } // }
.sitbox {
opacity: 1 !important;
// background: #F84221 !important;
background: linear-gradient(to bottom, #F84221, #F84221);
background-color: #F84221;
.sitebox {
animation-name: fadeIn;
animation-duration: 3s;
animation-fill-mode: forwards;
}
@keyframes fadeIn {
from {
opacity: 0;
}
to {
opacity: 1;
}
} }
@ -757,12 +751,7 @@
padding-top: 25rpx; padding-top: 25rpx;
/* #endif */ /* #endif */
// background-color: #e5e5e5; // background-color: #e5e5e5;
// opacity: 0;
/* 初始时设置元素不透明 */
backdrop-filter: blur(5px) opacity(0);
transition: opacity 0.2s ease-in-out;
transition-delay: 1.5s;
transition: background 0.2s ease-in-out;
padding-right: 20rpx; padding-right: 20rpx;
// //
@ -770,9 +759,8 @@
color: #fff; color: #fff;
margin-right: 24.56rpx; margin-right: 24.56rpx;
font-size: 30rpx; font-size: 30rpx;
opacity: 0; opacity: 0;
transition: opacity 1s ease-in-out;
transition-delay: 1.5s;
.town_name { .town_name {
margin-left: 21rpx; margin-left: 21rpx;
@ -780,12 +768,14 @@
} }
.iconfont { .iconfont {
opacity: 0;
font-size: 30rpx; font-size: 30rpx;
font-size: 35.09rpx; font-size: 35.09rpx;
} }
} }
.circle_friends_wrapper { .circle_friends_wrapper {
position: relative; position: relative;

View File

@ -1,99 +1,27 @@
<template> <template>
<view style="background-color: #F0F2F5;min-height: 100vh"> <view>
<view style="height: var(--status-bar-height);"></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="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="">
供销综合云市场
</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" :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='showMaoLocation(latitude,longitude)'>
<u--image :showLoading="true" src="/static/images/GXSC/DW.png" width="50.82rpx"
height="50.82rpx"></u--image>
</view>
</view> </view>
</view>
<view class="content"> <view class='input acea-row row-between-wrapper'><text class='iconfont icon-sousuo'></text>
<view class="hot_serch"> <input placeholder='搜索店铺名称' placeholder-class='placeholder' confirm-type='search' name="search"
<text>热搜:</text> <text>热a搜商品</text> <text>热搜商品</text> :value='sotreParam.keyword' @confirm="searchSubmit"></input>
<text>热搜sasas商品</text>
</view> </view>
<!-- <view v-if="mer_location == 1" :class="'styleType'+store_street_theme" style="text-align: right;"
<view class="menu_cls"> class='iconfont search-right' @click='showMaoLocation(latitude,longitude)'>
<view class="iconfont icon-dingwei"></view>
<u-scroll-list> <view class="right-text" v-if="recommend_address">
<view class="menu_li" @click="navGo(item.merchant_category_id)" v-for="item,index in menuList" {{recommend_address}}
: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; width: 15vw;">{{item.category_name}}</text>
</view>
</u-scroll-list>
</view>
</u-scroll-list>
<view class="goods_list">
<view class="goods_card" @click="goStore(item.mer_id)" v-for="(item,index) in storeList"
:key="index">
<view class="left">
<u--image :showLoading="true" :src="item.mer_avatar" width="157.71rpx"
height="157.71rpx"></u--image>
</view>
<view class="right">
<view class="li head">
<text class="com_name">{{item.mer_name}}</text>
<text
style="font-weight: normal; font-size: 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: 20rpx;color: #FF6D20; ">5.0</text>
<text>月销2000+</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 class="iconfont icon-xiangyou" v-if="recommend_address"></view>
</view> </view>
--> </view>
<view class="nav-wrapper" :class="'styleType'+store_street_theme">
</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)'>
@ -103,14 +31,10 @@
<view class="line" :class="{'font-line':firstKey == item.key}"> <view class="line" :class="{'font-line':firstKey == item.key}">
</view> </view>
</view> </view>
</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">
@ -119,7 +43,7 @@
</view> </view>
<view class="zhezhao"> <view class="zhezhao">
</view> </view>
<view class="zhezhao1" @click="goStore(item.mer_id)"> <view class="zhezhao1" @click="goStore(item.mer_id)">
<view class="title"> <view class="title">
<view>{{item.mer_name}} <view>{{item.mer_name}}
</view> </view>
@ -246,12 +170,9 @@
<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;background-color: #F5F5F5;"> <view class='pictrue' style="margin: 0 auto;">
<image src='../../../static/images/noCart.png'></image> <image src='../../../static/images/noCart.png'></image>
<text>暂无店铺快去搜索其他店铺吧</text> <text>暂无店铺快去搜索其他店铺吧</text>
</view> </view>
@ -262,15 +183,14 @@
<image src="@/static/images/guanbi.png" class="guanbi" @click="close"></image> <image src="@/static/images/guanbi.png" class="guanbi" @click="close"></image>
</u-popup> </u-popup>
</view> </view>
</view> </view>
</template> </template>
<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';
@ -297,15 +217,6 @@
}, },
data() { data() {
return { return {
imgList: [
"/static/images/GXSC/BBY.png",
"/static/images/GXSC/JYPX.png",
"/static/images/GXSC/NFCP.png",
"/static/images/GXSC/SCFW.png",
"/static/images/GXSC/BBY.png",
],
price: 0, price: 0,
stock: 0, stock: 0,
nows: false, nows: false,
@ -322,7 +233,6 @@
brandList: [], brandList: [],
downKey: 0, downKey: 0,
downStatus: false, downStatus: false,
menuList: [],
// //
downMenu: [{ downMenu: [{
title: '默认', title: '默认',
@ -373,18 +283,18 @@
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.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() || ''
@ -395,9 +305,6 @@
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() {
@ -418,11 +325,6 @@
}, mapGetters(['viewColor'])), }, mapGetters(['viewColor'])),
}, },
methods: { methods: {
navGo(id) {
uni.navigateTo({
url: `/pages/nongKe/supply_chain/supplierA?type_id=10&merchant_category_id=${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({
@ -592,7 +494,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
@ -619,9 +521,9 @@
} }
} }
}, },
searchSubmit: function() { searchSubmit: function(e) {
let that = this; let that = this;
that.$set(that.sotreParam, 'keyword', this.sotreParam.keyword); that.$set(that.sotreParam, 'keyword', e.detail.value);
this.set_where(this.firstKey) this.set_where(this.firstKey)
}, },
// //
@ -709,113 +611,55 @@
this.storeMerchantList() this.storeMerchantList()
} }
} }
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
* { .productList .search {
margin: 0; width: 100%;
padding: 0; height: 146rpx;
} padding: 0 20rpx;
box-sizing: border-box;
.com_name { position: fixed;
font-size: 32rpx; left: 0;
// background-color: red; top: 0;
max-width: 40vw; z-index: 9;
white-space: nowrap; display: flex;
/* 防止文字换行 */ flex-wrap: nowrap;
overflow: hidden; background-color: #fff;
/* 超出部分隐藏 */ padding-top: 80rpx;
text-overflow: ellipsis; padding-bottom: 20rpx;
/* 使用省略号表示溢出的内容 */ &.styleType1 {
width: 200px; background-color: var(--view-theme);
/* 可根据实际情况调整容器宽度 */
}
.productList {
// padding-top: 50rpx;
// padding: 0 20rpx 0;
.top {
padding-top: 20rpx;
background-color: white;
position: fixed;
z-index: 999;
width: 100%;
top: 0;
} }
.content { .search-right {
padding: 20rpx; display: flex;
align-items: center;
justify-content: space-between;
max-width: max-content;
flex: 1;
padding-left: 20rpx;
} }
.menu_cls { .right-text {
background-color: white;
// height: 199.77rpx;
border-radius: 21.03rpx 21.03rpx 21.03rpx 21.03rpx;
padding: 20rpx;
.menu_li {
margin-right: 50rpx;
// background-color: red;
width: 50vw;
// width: 120rpx;
// display: inline-block;
}
}
.goods_list {
margin-top: 20rpx;
.goods_card {
margin-top: 20rpx;
height: auto;
background-color: white;
padding: 20rpx;
border-radius: 20rpx;
display: flex;
// align-items: center;
.left {
margin-right: 20rpx;
width: 158rpx;
height: 158rpx;
border-radius: 20rpx;
overflow: hidden;
}
.right {
.head {
font-weight: bold;
}
.li {
display: flex;
font-size: 22rpx;
margin-bottom: 10rpx;
align-items: center;
text {
margin: 0 20rpx 0 5rpx;
}
}
}
}
}
.address {
white-space: nowrap;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
width: 200px; white-space: nowrap;
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 {
color: #282828; color: #282828;
@ -843,20 +687,6 @@
} }
} }
.hot_serch {
color: #B3B3B3;
display: flex;
justify-content: space-around;
margin: 20rpx 0;
flex-wrap: wrap;
// margin-top: 50rpx;
padding-top: 50rpx;
text {
margin: 10rpx;
}
}
.productList .search .input { .productList .search .input {
flex: 1; flex: 1;
height: 60rpx; height: 60rpx;
@ -900,7 +730,7 @@
z-index: 9; z-index: 9;
position: fixed; position: fixed;
left: 0; left: 0;
top: 25px; top: 25px;
width: 100%; width: 100%;
margin-top: 86rpx; margin-top: 86rpx;
background-color: #fff; background-color: #fff;
@ -1279,7 +1109,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;
@ -1293,13 +1123,12 @@
} }
} }
} }
.guanbi { .guanbi {
width: 20px; width: 20px;
height: 20px; height: 20px;
margin: 30px auto; margin: 30px auto;
} }
.pop { .pop {
z-index: 1; z-index: 1;
} }

View File

@ -866,39 +866,61 @@
} }
}, },
get() { get() {
// if(!this.loadVideo) return // if(!this.loadVideo) return
this.loadVideo = true this.loadVideo = true
// 这个方法主要就是用来第一次进入视频播放时用来处理的 // 这个方法主要就是用来第一次进入视频播放时用来处理的
this.isUser ?
myVideoList(this.userUid, { myVideoList(this.userUid, {
page: this.page, page: this.page,
limit: this.limit, limit: this.limit,
is_star: this.isSatrt, is_star: this.isSatrt,
community_id: this.videoID community_id: this.videoID
}).then(async (res) => { }).then(async (res) => {
this.loadVideo = false this.loadVideo = false
this.page = this.page + 1; this.page = this.page + 1;
var msg = res.data.list; var msg = res.data.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]['playIng'] = false msg[i]['playIng'] = false
msg[i]['state'] = false msg[i]['state'] = false
msg[i]['isplay'] = false msg[i]['isplay'] = false
msg[i]['loading'] = false msg[i]['loading'] = false
msg[i]['community_id'] = msg[i]['community_id'].toString() msg[i]['community_id'] = msg[i]['community_id'].toString()
} }
this.dataList = msg; this.dataList = msg;
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()
} }
}).catch(err => { }).catch(err => {
return uni.showToast({ return uni.showToast({
title: err, title: err,
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
});
})
}, },
onpullingdown() { onpullingdown() {
this.refreshing = true this.refreshing = true

View File

@ -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"
@ -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: "",
@ -447,7 +449,7 @@
} }
}, },
onLoad(options) { onLoad(options) {
console.log( 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;
@ -732,26 +734,56 @@
}, },
get() { get() {
let that = this let that = this
// 1.这里引入后端请求数据 that.loadVideo = true
deoList(that.videoID).then(res => {
// console.log(res.data)
that.videoData([res.data])
if (res.data.list.length < that.limit) {
this.loadMore = false;
}
}).catch(err => {
return uni.showToast({
title: err,
icon: 'none',
duration: 2000
});
})
// myVideoList(that.userUid, {
// page: that.page,
// limit: that.limit,
// is_star: that.isSatrt,
// community_id: that.videoID
// }).then(res => {
// that.videoData(res.data.list)
// if (res.data.list.length < that.limit) {
// this.loadMore = false;
// }
// }).catch(err => {
// return uni.showToast({
// title: err,
// icon: 'none',
// duration: 2000
// });
// })
// :
// graphicLstApi({
// page: that.page,
// limit: that.limit,
// category_id: -1
// }).then(res => {
// that.videoData(res.data.list)
// if (res.data.list.length < that.limit) {
// this.loadMore = false;
// }
// }).catch(err => {
// return uni.showToast({
// title: err,
// icon: 'none',
// duration: 2000
// });
// })
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
});
})
that.loadVideo = true
}, },
getFocusList() { getFocusList() {
let that = this; let that = this;
@ -1243,8 +1275,8 @@
z-index: 9; z-index: 9;
width: 750rpx; width: 750rpx;
height: 120rpx; height: 120rpx;
flex-direction: row; flex-direction: row;
justify-content: center; justify-content: center;
align-items: center; align-items: center;

View File

@ -3,61 +3,70 @@
<view class="circle_friends_wrapper"> <view class="circle_friends_wrapper">
<view v-if='ishshow'> <view>
<view :class="['site-box ','flex_a_c_j_sb',isFshow?'sitbox':'']"> <view class="site-box flex_a_c_j_sb" :style="{'background-color':backColor}">
<view :class="['place_wrapper','flex_a_c',isFshow?'sitbox':'']" @click="selectLocation"
style="opacity: 0;"> <view :class="['place_wrapper','flex_a_c',isFshow?'sitebox':'']" @click="selectLocation">
<view class="iconfont icon-weizhi" style="margin-left: 20rpx;background-color: transparent;"> <view :class="['iconfont','icon-weizhi',isFshow?'sitebox':'']" 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">
style="opacity: 0; transition: opacity 1s ease-in;transition-delay: 1.5s;" <view :class="['iconfont','icon-xiaoxi',isFshow?'sitebox':'']" style="color:#fff;"></view>
:class="[isFshow?'sitbox':'']">
<view class="iconfont icon-xiaoxi" style="color:#fff;"></view>
</navigator> </navigator>
</view> </view>
<!-- <view class="site-box ','flex_a_c_j_sb'" v-if="ishshow"> <!-- <view class="site-box ','flex_a_c_j_sb'" v-if="ishshow">
<view class="bg-img"> <view class="bg-img">
<img :src="bgColor" alt=""> <img :src="bgColor" alt="">
</view> </view>
</view> --> </view> -->
</view> </view>
<zbpSwiper :isSelectPlace="true" :location_Arr="locationArr" @kkchange='kkchange'></zbpSwiper>
<zbpSwiper :isSelectPlace="true" :location_Arr="locationArr" @kkchange='kkchange' @change='dchange'>
</zbpSwiper>
<view class="list"> <view class="list">
<view class="list-m"> <navigator hover-class="none"
<image src="@/static/images/f6.png" mode="aspectFill"></image> :url="`/pages/nongKe/supply_chain/supplier?type_id=10&street_id=${street_id}`">
<view class="list-title"> <view class="list-m">
<view class="list-titlea"> <image src="@/static/images/f6.png" mode="aspectFill"></image>
<image src="@/static/images/p9.png" mode="aspectFill"></image> <view class="list-title">
<view class="titlea-con"> <view class="list-titlea">
<view class="titlea">september</view> <image src="@/static/images/p9.png" mode="aspectFill"></image>
<view class="titleb"> <view class="titlea-con">
9 <view class="titlea">september</view>
<view class="titleb">
9
</view>
</view> </view>
</view> </view>
</view> <view class="list-titleb">
<view class="list-titleb"> <view class="titlea">
<view class="titlea"> {{town}}
通滩镇 </view>
<view class="titleb">
综合供销云市场
</view>
</view> </view>
<view class="titleb">
综合供销云市场
</view>
</view>
</view>
<view class="list-title-info" style="color:#3A7331 ;">
<view class="">
点击查看
</view> </view>
<text class="iconfont icon-xiangyou"></text> <view class="list-title-info" style="color:#3A7331 ;">
<view class="">
点击查看
</view>
<view class="title-infoimg">
<image src="@/static/images/pj.png" mode=""></image>
</view>
</view>
</view> </view>
</view>
<view class="list-m">
</navigator>
<view class="list-m" @click="go_shop">
<image src="@/static/images/f1.png" mode=""></image> <image src="@/static/images/f1.png" mode=""></image>
<view class="list-title"> <view class="list-title">
<view class="list-titlea"> <view class="list-titlea">
@ -72,11 +81,13 @@
</view> </view>
</view> </view>
</view> </view>
<view class="list-title-info" style="color:#3A7331 ;"> <view class="list-title-info" style="color:#FF6B00 ;">
<view class=""> <view class="">
点击查看 点击查看
</view> </view>
<text class="iconfont icon-xiangyou"></text> <view class="title-infoimg">
<image src="@/static/images/pj1.png" mode=""></image>
</view>
</view> </view>
</view> </view>
</view> </view>
@ -123,7 +134,7 @@
<image src="@/static/images/f4.png" mode=""></image> <image src="@/static/images/f4.png" mode=""></image>
</view> </view>
<view class="goodslist"> <view class="goodslist">
<WaterfallsFlow :wfList='cateGoods' /> <WaterfallsFlow :wfList='cateGoods' />
</view> </view>
<view class="empty_wrapper" v-if="emptyShow"> <view class="empty_wrapper" v-if="emptyShow">
@ -166,6 +177,10 @@
getArticleList, getArticleList,
getArticleCategoryLists getArticleCategoryLists
} from '@/api/api.js' } from '@/api/api.js'
import {
spuInfo
} from '@/api/product.js';
import { import {
getGeocoder, getGeocoder,
merClassifly merClassifly
@ -212,39 +227,31 @@
page: 1, page: 1,
limit: 6 limit: 6
}, },
where1: {
page: 1,
limit: 6
},
currentItemId: 69, // 0 || 69 currentItemId: 69, // 0 || 69
keyword: '', keyword: '',
location: '', location: '',
emptyShow: false, emptyShow: false,
street: '', town: '',
cateGoods: [], cateGoods: [],
recoList: [], recoList: [],
articleList: [], articleList: [],
streeta_id: '', street_id: '',
street: '', street: '',
bgColor: '', bgColor: '',
ishshow: true,
isFshow: false, isFshow: false,
backColor: 'rgba(248, 66, 33, 0)'
} }
}, },
watch: {
street: {
handler(newVal, oldVal) {
this.street = newVal
let arr = Cache.get('ADRESS_LOCATION')
console.log(arr, '1')
if (arr.length > 0) {
this.street = arr.split(',')[0]
}
},
}
},
onPullDownRefresh() { onPullDownRefresh() {
this.getCateList()
this.cateGoods = [] this.cateGoods = []
this.getGoods() this.list()
this.Area() this.Area()
uni.stopPullDownRefresh() uni.stopPullDownRefresh()
@ -252,9 +259,9 @@
onLoad() { onLoad() {
this.getCateList()
this.getArticle() this.getArticle()
this.getGoods()
this.selfLocation() this.selfLocation()
this.Area() this.Area()
this.setPermissions() this.setPermissions()
@ -278,7 +285,7 @@
this.status = 'loading'; this.status = 'loading';
this.where.limit = 2 this.where.limit = 2
this.where.page = ++this.where.page; this.where.page = ++this.where.page;
this.getGoods() this.list()
}, },
mounted() { mounted() {
// #ifdef H5 // #ifdef H5
@ -290,25 +297,31 @@
}, },
// #ifdef APP-PLUS // #ifdef APP-PLUS
onPageScroll(e) { onPageScroll(e) {
// this.scrollTop = e.scrollTop;
// console.log(e.scrollTop)
if (e.scrollTop > 0) {
this.ishshow = true
this.isFshow = true
} else if (e.scrollTop == 0) {
this.ishshow = false
this.isFshow = false
} else {
this.ishshow = false
this.isFshow = false
}
const scrollTop = e.scrollTop;
if (scrollTop <= 20) {
this.backColor = 'rgba(248, 66, 33, 0)'
this.isFshow = false
} else if (20 < scrollTop && scrollTop <= 100) {
this.backColor = 'rgba(248, 66, 33, .5)'
this.isFshow = true
} else if (scrollTop > 100) {
this.backColor = 'rgba(248, 66, 33, 1)'
this.isFshow = true
}
}, },
// #endif // #endif
methods: { methods: {
list() {
spuInfo('510502106', this.where1).then(res => {
// console.log(res)
this.cateGoods = res.data.list
})
},
scrolling() { scrolling() {
// //
let scrollTop = let scrollTop =
@ -333,18 +346,22 @@
// //
// 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) {
@ -352,11 +369,7 @@
}, },
tabsChange1(item) {
this.getArticleList(item.article_category_id)
this.streeta_id = item.id
this.tabsData1.tabsActive = item.index
},
async getArticle() { async getArticle() {
let list = [] let list = []
@ -390,22 +403,23 @@
url: '/pages/news_details/index?id=' + item.article_id url: '/pages/news_details/index?id=' + item.article_id
}) })
}, },
selectPlce(e) {
this.street_id = e.value[1].code
this.town = e.value[1].name
this.getCloudShopMerId(e.value[1].code)
},
getCloudShopMerId(id) { getCloudShopMerId(id) {
get_cloud_shop(id).then(res => { get_cloud_shop(id).then(res => {
res.data.length > 0 ? this.isYunCang = 1 : this.isYunCang = 0 res.data.length > 0 ? this.isYunCang = 1 : this.isYunCang = 0
}) })
}, },
selectLocation() { selectLocation() {
this.showPicker = true this.showPicker = true
}, },
confirm(e) { confirm(e) {
this.street = e.value[1].name this.street = e.value[1].name
Cache.set('ADRESS_LOCATION', this.street_id = e.value[1].code
this.town = e.value[1].name
uni.setStorageSync('ADRESS_LOCATION',
e.value[1].name + ',' + e.value[1].name + ',' + e.value[1].name + ',' + e.value[1].name + ',' +
e.value[1].code e.value[1].code
@ -477,49 +491,21 @@
} }
}) })
}, },
getGoods: function(item) { go_shop() {
if (this.isYunCang == 0) {
graphicLstApi(this.where).then(res => { return Toast('当前区域没有云仓库')
this.cateGoods.push(...res.data.list) }
if (res.data.list.length < this.where.limit) this.status = 'nomore' uni.navigateTo({
url: `/pages/nongKe/cloud_entrepot/index?street=${this.street_id}&town=${this.town}`
if (this.where.page == 1 && res.data.list.length <= 0) this.emptyShow = true
if (item) {
if (item.index == 1 && this.cateGoods[0]) {
uni.navigateTo({
// #ifdef MP || H5
url: `/pages/short_video/nvueSwiper/index?id=${this.cateGoods[0].community_id}`
// #endif
// #ifdef APP
url: `/pages/short_video/appSwiper/index?id=${this.cateGoods[0].community_id}`
// #endif
})
}
}
}) })
// uni.navigateTo({
// url: '/pages/store/home/index?id=' + this.mer_id + '&LihaiYun=Lihai'
// })
}, },
/*获取分类列表*/ dchange(e) {
async getCateList() { this.street = e.value[1].name
const { this.street_id = e.value[1].code
data this.town = e.value[1].name
} = await getTopicList()
this.tabsData.list = [{
cate_name: "推荐",
category_id: 0
}, ...data]
},
tabsChange(item) {
this.cateGoods = []
this.where.category_id = item.category_id
this.emptyShow = false
this.where.page = 1
this.getGoods(item)
this.street_id = item.id
this.tabsData.tabsActive = item.index
}, },
selfLocation() { selfLocation() {
if (uni.getStorageSync('loction') == true) { if (uni.getStorageSync('loction') == true) {
@ -532,7 +518,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();
@ -541,11 +527,12 @@
lat: latitude, lat: latitude,
long: longitude long: longitude
}).then(res => { }).then(res => {
uni.setStorageSync('adress_location', res.data.address) this.town = res.data.address_reference.town.title
// that.$store.dispatch('setLocation', res.data) this.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) uni.setStorageSync('ADRESS_LOCATION',
this.town + ',' +this.street_id)
this.list()
}).catch(err => { }).catch(err => {
uni.showToast({ uni.showToast({
title: err, title: err,
@ -555,11 +542,11 @@
}, },
fail: (err) => { fail: (err) => {
this.isshow = false this.isshow = false
uni.showToast({ // uni.showToast({
title: "获取定位超时", // title: "",
icon: 'none', // icon: 'none',
duration: 2000 // duration: 2000
}); // });
} }
}); });
}, },
@ -594,15 +581,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);
} }
@ -634,7 +624,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);
@ -691,16 +682,24 @@
position: relative; position: relative;
padding: 0 0 87.72rpx 0; padding: 0 0 87.72rpx 0;
background: linear-gradient(180deg, #FFFFFF 0%, #F6F6F6 100%);
} }
.sitbox {
opacity: 1 !important;
// background: #F84221 !important;
background: linear-gradient(to bottom, #F84221, #F84221);
background-color: #F84221;
.sitebox {
animation-name: fadeIn;
animation-duration: 3s;
animation-fill-mode: forwards;
}
@keyframes fadeIn {
from {
opacity: 0;
}
to {
opacity: 1;
}
} }
@ -724,12 +723,8 @@
padding-top: 25rpx; padding-top: 25rpx;
/* #endif */ /* #endif */
// background-color: #e5e5e5; // background-color: #e5e5e5;
// opacity: 0;
/* 初始时设置元素不透明 */
backdrop-filter: blur(5px) opacity(0);
transition: opacity 0.2s ease-in-out;
transition-delay: 1.5s;
transition: background 0.2s ease-in-out;
padding-right: 20rpx; padding-right: 20rpx;
// //
@ -737,9 +732,8 @@
color: #fff; color: #fff;
margin-right: 24.56rpx; margin-right: 24.56rpx;
font-size: 30rpx; font-size: 30rpx;
opacity: 0; opacity: 0;
transition: opacity 1s ease-in-out;
transition-delay: 1.5s;
.town_name { .town_name {
margin-left: 21rpx; margin-left: 21rpx;
@ -747,12 +741,14 @@
} }
.iconfont { .iconfont {
opacity: 0;
font-size: 30rpx; font-size: 30rpx;
font-size: 35.09rpx; font-size: 35.09rpx;
} }
} }
.circle_friends_wrapper { .circle_friends_wrapper {
position: relative; position: relative;
@ -893,7 +889,7 @@
.titlea { .titlea {
margin-top: 10rpx; margin-top: 10rpx;
margin-left: 15rpx; margin-left: 8rpx;
font-size: 12rpx; font-size: 12rpx;
font-family: PingFang SC-Semibold, PingFang SC; font-family: PingFang SC-Semibold, PingFang SC;
} }
@ -904,7 +900,7 @@
font-family: PingFang SC-Semibold, PingFang SC; font-family: PingFang SC-Semibold, PingFang SC;
font-weight: 600; font-weight: 600;
color: #FFFFFF; color: #FFFFFF;
margin-left: 15rpx; margin-left: 20rpx;
} }
} }
@ -949,6 +945,17 @@
bottom: 14rpx; bottom: 14rpx;
left: 100rpx; left: 100rpx;
padding-left: 15rpx; padding-left: 15rpx;
.title-infoimg {
width: 18rpx;
height: 18rpx;
margin: auto 0;
image {
width: 100%;
height: 100%;
}
}
} }
image { image {

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