代码更新

This commit is contained in:
jia 2023-09-02 21:05:37 +08:00
parent df8132a504
commit 4cedd8415d
9 changed files with 383 additions and 355 deletions

15
App.vue
View File

@ -10,6 +10,7 @@
// +----------------------------------------------------------------------
// #ifdef APP-PLUS
let jpushModule = uni.requireNativePlugin("JG-JPush");
const mp = uni.requireNativePlugin('uniMP');
// #endif
import {
checkLogin
@ -74,7 +75,18 @@
},
onLaunch: function(option) {
this.globalData.statusBarHeight = uni.getSystemInfoSync().statusBarHeight + 'px';
this.globalData.uid = this.$store.state.app.uid
this.globalData.uid = this.$store.state.app.uid;
//uni
mp.onUniMPEventReceive(ret=>{
console.log('小程序事件: ', ret);
if(ret.event=='closeApp'){
mp.closeUniMP(ret.fromAppid, (ret)=>{
console.log('closeUniMP: '+JSON.stringify(ret));
});
}
});
let that = this;
// #ifdef MP
if (HTTP_REQUEST_URL == '') {
@ -188,7 +200,6 @@
},
onShow() {
let that = this

View File

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

View File

@ -71,16 +71,17 @@
type: Object,
default: () => ({})
},
show: {
type: Boolean,
town: {
type:String,
default: false
},
},
data() {
return {
defaInd: [0, 0],
street: '',
streeta: '',
showPicker: false,
styleConfig: [],
columnData: [],
@ -100,15 +101,12 @@
}
},
watch: {
street(newval, val) {
// console.log(newval, val)
this.street = newval
// console.log(newval, val)
}
},
watch:{
street(nval,val) {
this.street=nval
}
},
created() {
this.getBanner()
@ -117,17 +115,13 @@
},
mounted() {
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()
}
uni.$on('add', (res)=> {
this.street=res.split(',')[0]
})
this.$bus.$on('value-updated', (newValue) => {
//
this.street = newValue.split(',')[0]
});
},
methods: {
@ -141,54 +135,19 @@
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 => {
let town = res.data.address_reference.town.title
let street_id = res.data.address_reference.town.id
this.street = res.data.address_component.street
}).catch(err => {
uni.showToast({
title: err,
icon: 'none'
})
})
},
fail: (err) => {
uni.showToast({
title: "获取定位超时",
icon: 'none',
duration: 2000
});
}
});
},
confirm(e) {
this.showPicker = false
this.$emit('selectPlce', e)
this.$emit('change', e)
this.street = e.value[1].name
uni.setStorageSync('ADRESS_LOCATION',
uni.$emit('add',e.value[1].name+','+e.value[1].code)
this.$bus.$emit('value-updated',
e.value[1].name + ',' +
e.value[1].code);
e.value[1].code
)
},
changeHandler(e) {
const {

View File

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

View File

@ -1,6 +1,6 @@
<template>
<view class="gather">
<!-- <view class="site-box flex_a_c_j_sb">
<!-- <view class="site-box flex_a_c_j_sb">
<view class="place_wrapper flex_a_c" @click="selectLocation">
<view class="iconfont icon-weizhi" style="margin-left: 20rpx;"></view>
<view class="town_name">{{street}}</view>
@ -14,45 +14,46 @@
</view>
</view> -->
<zbpSwiper :isSelectPlace="true" :location_Arr="locationArr" @kkchange='kkchange'></zbpSwiper>
<zbpSwiper :isSelectPlace="true" :location_Arr="locationArr" :town='street' @kkchange='kkchange'></zbpSwiper>
<u-empty :show="jurisdiction" marginTop="260" mode="permission" :text="emptyText"
icon="http://cdn.uviewui.com/uview/empty/permission.png"></u-empty>
<view class="business com special_work">
<view class="title project">
<view>更多功能</view>
<view class="edit" @click="editFlag = !editFlag">{{editFlag?'完成':'编辑'}}</view>
</view>
<view class="content">
<block v-if="nowMenuList.length>0">
<u-transition v-for="(item, index) in nowMenuList" :key="item.name" show>
<view class="examine" @click="editFlag?removeMenu(item):clickMenu(item.type, item.data)">
<image class="icon_img" :src="`${prefix}${item.icon}`" mode="aspectFill">
</image>
<u-icon v-if="editFlag" class="icon" name="minus-circle-fill" color="red"></u-icon>
<text class="text">{{item.name}}</text>
</view>
</u-transition>
</block>
<view v-else-if="!editFlag" @click="editFlag = true" style="text-align: center;width: 100%;color: #aaa;">还没有应用,点我添加应用</view>
</view>
</view>
<view v-if="editFlag" class="business com special_work edit_card">
<view class="title project" style="padding: 0 28rpx;">
<view>编辑功能</view>
<view class="edit2" @click="editComfirm">完成</view>
</view>
<view class="content">
<u-transition v-for="(item, index) in AllMenuList" :key="item.name" show>
<view class="examine" @click="pushMenu(item)">
<image class="icon_img" :src="`${prefix}${item.icon}`" mode="aspectFill">
</image>
<u-icon class="icon" name="plus-circle-fill"></u-icon>
<text class="text">{{item.name}}</text>
</view>
</u-transition>
</view>
</view>
<view class="business com special_work">
<view class="title project">
<view>更多功能</view>
<view class="edit" @click="editFlag = !editFlag">{{editFlag?'完成':'编辑'}}</view>
</view>
<view class="content">
<block v-if="nowMenuList.length>0">
<u-transition v-for="(item, index) in nowMenuList" :key="item.name" show>
<view class="examine" @click="editFlag?removeMenu(item):clickMenu(item.type, item.data)">
<image class="icon_img" :src="`${prefix}${item.icon}`" mode="aspectFill">
</image>
<u-icon v-if="editFlag" class="icon" name="minus-circle-fill" color="red"></u-icon>
<text class="text">{{item.name}}</text>
</view>
</u-transition>
</block>
<view v-else-if="!editFlag" @click="editFlag = true"
style="text-align: center;width: 100%;color: #aaa;">还没有应用,点我添加应用</view>
</view>
</view>
<view v-if="editFlag" class="business com special_work edit_card">
<view class="title project" style="padding: 0 28rpx;">
<view>编辑功能</view>
<view class="edit2" @click="editComfirm">完成</view>
</view>
<view class="content">
<u-transition v-for="(item, index) in AllMenuList" :key="item.name" show>
<view class="examine" @click="pushMenu(item)">
<image class="icon_img" :src="`${prefix}${item.icon}`" mode="aspectFill">
</image>
<u-icon class="icon" name="plus-circle-fill"></u-icon>
<text class="text">{{item.name}}</text>
</view>
</u-transition>
</view>
</view>
<view class="" v-if='jurisdiction==false&&isShow==false'>
<emptyPage title="暂无信息"></emptyPage>
</view>
@ -92,8 +93,8 @@
import {
getDiy
} from '@/api/api.js';
import uniMP from '@/utils/uniMP.js';
import uniMP from '@/utils/uniMP.js';
export default {
components: {
mTabbar,
@ -115,25 +116,24 @@
isShow: false,
bgColor: '',
isFshow: false,
street:'',
//
editFlag: false,
//
AllMenuList: [
{
name: '商户平台',
icon: 'spgl.png',
data: '/pages/moreProject/moreProject',
type: 2,
},
{
name: '供销平台',
icon: 'shsz.png',
data: '__UNI__B5B1EDD',
type: 1,
},
],
nowMenuList: []
street: '',
//
editFlag: false,
//
AllMenuList: [{
name: '商户平台',
icon: 'spgl.png',
data: '/pages/moreProject/moreProject',
type: 2,
},
{
name: '供销平台',
icon: 'shsz.png',
data: '__UNI__B5B1EDD',
type: 1,
},
],
nowMenuList: [],
street: '',
showPicker: false,
columnData: []
@ -147,7 +147,7 @@
this.Area()
this.initMenu();
},
onShow() {
if (this.isLogin) {
this.emptyText = '暂无可用应用'
@ -157,20 +157,27 @@
this.jurisdiction = true
}
this.getUserInfo()
this.appLocation()
},
},
onPullDownRefresh() {
this.getUserInfo()
uni.stopPullDownRefresh()
},
mounted() {
this.appLocation()
if(this.street.length<=0){
this.selfLocation()
}
// #ifdef H5
//
window.addEventListener("scroll", this.scrolling);
// #endif
this.$bus.$on('value-updated', (newValue) => {
//
this.street = newValue.split(',')[0]
});
},
// #ifdef APP-PLUS
@ -187,55 +194,58 @@
// #endif
methods: {
//
initMenu(){
let all = uni.getStorageSync('gatherAllMenuList');
let now = uni.getStorageSync('gatherNowMenuList');
if(all){
this.AllMenuList = JSON.parse(all);
}
if(now){
this.nowMenuList = JSON.parse(now);
}
},
clickMenu(e, data){
switch(e){
case 1: this.getUniMp(data);break;
case 2: this.navigator(data);break;
}
},
//
pushMenu(data){
this.nowMenuList.push(data);
this.AllMenuList = this.AllMenuList.filter((item)=>{
return item.name!=data.name;
})
},
//
removeMenu(data){
this.AllMenuList.push(data);
this.nowMenuList = this.nowMenuList.filter((item)=>{
return item.name!=data.name;
})
},
//
editComfirm(){
this.editFlag = false;
uni.setStorageSync('gatherAllMenuList', JSON.stringify(this.AllMenuList));
uni.setStorageSync('gatherNowMenuList', JSON.stringify(this.nowMenuList));
},
getUniMp(appid){
console.log('点击供销平台');
// #ifdef APP-PLUS
uniMP.loadMP(appid);
return ;
// #endif
uni.showToast({
icon: 'none',
title: 'H5不支持打开小程序'
})
},
appLocation() {
//
initMenu() {
let all = uni.getStorageSync('gatherAllMenuList');
let now = uni.getStorageSync('gatherNowMenuList');
if (all) {
this.AllMenuList = JSON.parse(all);
}
if (now) {
this.nowMenuList = JSON.parse(now);
}
},
clickMenu(e, data) {
switch (e) {
case 1:
this.getUniMp(data);
break;
case 2:
this.navigator(data);
break;
}
},
//
pushMenu(data) {
this.nowMenuList.push(data);
this.AllMenuList = this.AllMenuList.filter((item) => {
return item.name != data.name;
})
},
//
removeMenu(data) {
this.AllMenuList.push(data);
this.nowMenuList = this.nowMenuList.filter((item) => {
return item.name != data.name;
})
},
//
editComfirm() {
this.editFlag = false;
uni.setStorageSync('gatherAllMenuList', JSON.stringify(this.AllMenuList));
uni.setStorageSync('gatherNowMenuList', JSON.stringify(this.nowMenuList));
},
getUniMp(appid) {
console.log('点击供销平台');
// #ifdef APP-PLUS
uniMP.loadMP(appid);
return;
// #endif
uni.showToast({
icon: 'none',
title: 'H5不支持打开小程序'
})
},
changeHandler(e) {
const {
columnIndex,
@ -251,8 +261,8 @@
this.$refs.uPicker.setColumnValues(1, res.data);
});
}
}
},
},
Area() {
getArea({
city_code: 510500
@ -294,12 +304,11 @@
lat: latitude,
long: longitude
}).then(res => {
this.town = res.data.address_reference.town.title
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)
let town = res.data.address_reference.town.title
let street_id = res.data.address_reference.town.id
this.street = res.data.address_component.street
uni.$emit('add',town+','+street_id)
}).catch(err => {
uni.showToast({
title: err,
@ -420,11 +429,11 @@
.site-box {
width: 100%;
/* #ifdef MP || APP-PLUS */
height: 170rpx;
/* #endif */
/* #ifdef H5 */
height: 120rpx;
/* #ifdef MP || APP-PLUS */
height: 170rpx;
/* #endif */
/* #ifdef H5 */
height: 120rpx;
/* #endif */
margin-bottom: 26.32rpx;
position: absolute;
@ -478,24 +487,27 @@
font-weight: 700;
margin-bottom: 38.6rpx;
}
.project{
display: flex;
justify-content: space-between;
align-items: flex-end;
.edit{
font-size: 26rpx;
font-weight: 400;
&::after{
content: '>';
margin-left: 10rpx;
}
}
.edit2{
font-size: 26rpx;
font-weight: 400;
}
}
.project {
display: flex;
justify-content: space-between;
align-items: flex-end;
.edit {
font-size: 26rpx;
font-weight: 400;
&::after {
content: '>';
margin-left: 10rpx;
}
}
.edit2 {
font-size: 26rpx;
font-weight: 400;
}
}
.content {
display: flex;
@ -510,19 +522,19 @@
flex-direction: column;
justify-content: center;
align-items: center;
position: relative;
position: relative;
// margin: 0 0 33.33rpx 33.33rpx !important;
.icon_img {
width: 63.16rpx;
height: 63.16rpx;
}
.icon{
position: absolute;
top: 0rpx;
right: 25rpx;
}
.icon {
position: absolute;
top: 0rpx;
right: 25rpx;
}
.text {
font-size: 26.32rpx;
@ -554,9 +566,9 @@
}
}
}
.edit_card{
background-color: #fff;
padding-top: 28rpx;
}
.edit_card {
background-color: #fff;
padding-top: 28rpx;
}
</style>

View File

@ -18,12 +18,13 @@
<img :src="bgColor" alt="">
</view>
</view> -->
</view>
<zbpSwiper ref='list' :isSelectPlace="true" :show='show' :location_Arr="locationArr" @kkchange='kkchange' @change='dchange'>
<zbpSwiper ref='list' :isSelectPlace="true" :town='street' :show='show' :location_Arr="locationArr" @kkchange='kkchange'
@change='dchange'>
</zbpSwiper>
@ -143,7 +144,7 @@
import zbpSwiper from '@/components/zbpSwiper'
import easyLoadimage from '@/components/easy-loadimage/easy-loadimage.vue';
import WaterfallsFlow from '@/components/WaterfallsFlow/WaterfallsFlows.vue'
import Cache from '@/utils/cache';
import {
getSlideAPI
} from '@/api/lihai.js'
@ -236,7 +237,7 @@
this.getCateList()
this.getArticle()
this.getGoods()
this.selfLocation()
this.Area()
this.setPermissions()
@ -262,12 +263,17 @@
this.getGoods()
},
mounted() {
this.selfLocation()
// #ifdef H5
//
window.addEventListener("scroll", this.scrolling);
// #endif
this.$bus.$on('value-updated', (newValue) => {
//
this.street = newValue.split(',')[0]
});
},
// #ifdef APP-PLUS
onPageScroll(e) {
@ -394,7 +400,7 @@
this.showPicker = true
},
confirm(e) {
this.street = e.value[1].name
uni.setStorageSync('ADRESS_LOCATION',
e.value[1].name + ',' +
@ -435,13 +441,12 @@
});
},
dchange(e) {
this.$refs.list.street= e.value[1].name
this.$refs.list.street = e.value[1].name
this.street = e.value[1].name
},
gogogo(item) {
if (item.video_link.length > 0) {
uni.navigateTo({
// #ifdef MP || H5
url: `/pages/short_video/nvueSwiper/index?id=${item.community_id}`
@ -528,7 +533,7 @@
type: 'wgs84',
timeout: '10',
success: (res) => {
// console.log(res)
this.isshow = false
let latitude, longitude;
latitude = res.latitude.toString();
@ -537,7 +542,13 @@
lat: latitude,
long: longitude
}).then(res => {
let town = res.data.address_reference.town.title
let street_id = res.data.address_reference.town.id
this.street = res.data.address_component.street
// console.log(this.street)
uni.$emit('add',town+','+street_id)
}).catch(err => {
uni.showToast({
title: err,

View File

@ -343,6 +343,7 @@
import mentioned from '../components/mentioned/mentioned.vue'
import authorize from '@/components/Authorize';
import {
deoList,
videoList,
myVideoList,
graphicStartApi,
@ -689,35 +690,46 @@
let that = this;
if (!that.loadVideo) return
that.loadVideo = true
that.isUser ?
myVideoList(that.userUid, {
page: that.page,
limit: that.limit,
is_star: that.isSatrt,
community_id: that.videoID
}).then(res => {
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
});
})
deoList(that.videoID).then(res => {
that.loadVideo = false
that.getVideoData([res.data]);
}).catch(err => {
return uni.showToast({
title: err,
icon: 'none',
duration: 2000
});
})
// that.isUser ?
// myVideoList(that.userUid, {
// page: that.page,
// limit: that.limit,
// is_star: that.isSatrt,
// community_id: that.videoID
// }).then(res => {
// that.loadVideo = false
// that.getVideoData(res.data.list);
// }).catch(err => {
// return uni.showToast({
// title: err,
// icon: 'none',
// duration: 2000
// });
// }) :
// graphicLstApi({
// page: that.page,
// limit: that.limit,
// category_id: -1
// }).then(res => {
// that.getVideoData(res.data.list);
// }).catch(err => {
// return uni.showToast({
// title: err,
// icon: 'none',
// duration: 2000
// });
// })
},
getFocusList() {
let that = this;
@ -866,61 +878,90 @@
}
},
get() {
// if(!this.loadVideo) return
this.loadVideo = true
// 这个方法主要就是用来第一次进入视频播放时用来处理的
this.isUser ?
myVideoList(this.userUid, {
page: this.page,
limit: this.limit,
is_star: this.isSatrt,
community_id: this.videoID
}).then(async (res) => {
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
});
})
// if(!this.loadVideo) return
this.loadVideo = true
// 这个方法主要就是用来第一次进入视频播放时用来处理的
deoList(this.videoID).then(async (res) => {
this.loadVideo = false
this.page = 1;
var msg = [res.data];
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
});
})
// this.isUser ?
// myVideoList(this.userUid, {
// page: this.page,
// limit: this.limit,
// is_star: this.isSatrt,
// community_id: this.videoID
// }).then(async (res) => {
// this.loadVideo = false
// this.page = this.page + 1;
// var msg = res.data.list;
// for (let i = 0; i < msg.length; i++) {
// msg[i]['isMore'] = false
// msg[i]['playIng'] = false
// msg[i]['state'] = false
// msg[i]['isplay'] = false
// msg[i]['loading'] = false
// msg[i]['community_id'] = msg[i]['community_id'].toString()
// }
// this.dataList = msg;
// if (this.dataList.length !== 0) {
// this.dataList[this.k].state = 'play';
// uni.createVideoContext(this.dataList[this.k].community_id, this).play()
// }
// }).catch(err => {
// return uni.showToast({
// title: err,
// icon: 'none',
// duration: 2000
// });
// }) :
// graphicLstApi({
// page: this.page,
// limit: this.limit,
// category_id: -1
// }).then(async (res) => {
// this.page = this.page + 1;
// var msg = res.data.list;
// for (let i = 0; i < msg.length; i++) {
// msg[i]['isMore'] = false
// msg[i]['playIng'] = false
// msg[i]['state'] = false
// msg[i]['isplay'] = false
// msg[i]['community_id'] = msg[i]['community_id'].toString()
// }
// this.dataList = msg;
// }).catch(err => {
// return uni.showToast({
// title: err,
// icon: 'none',
// duration: 2000
// });
// })
},
onpullingdown() {
this.refreshing = true

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='iconfont icon-xiangzuo' @tap='goBack'></view>
@ -29,7 +29,7 @@
<view class="items" @click.stop="navTap(3)">
<text class="tName" :class="currentNav==3?'on':''">列表</text>
</view>
</view>
</view> -->
<swiper v-show="currentNav !== 3" :style="'width: '+ windowWidth +'px; height: '+ windowHeight +'px;'"
:vertical="true" @animationfinish="animationfinish" @change="change" :current="k" :indicator-dots="false">
<swiper-item v-for="(list,index) in dataList">
@ -420,6 +420,7 @@
watch: {
k(new_k, old_k) {
const max = new_k + 2;
if (this.max < max) {
this.max = max;
}
@ -427,6 +428,7 @@
this.oldCurrent = this.currentNav
return false
}
this.dataList[old_k].playIng = false //如果视频暂停,就加载封面
this.dataList[old_k].isplay = true
this.dataList[old_k].state = 'pause'
@ -819,16 +821,21 @@
msg[i]['isplay'] = true
msg[i]['loading'] = false
that.dataList.push(msg[i])
{console.log(i,that.k)}
//#ifndef H5
if (i == 0 && that.k == 0) {
this.dataList[0].isplay = false
this.dataList[0].playIng = true
this.dataList[0].state = 'play'
this.dataList[0].loading = false
console.log('32')
uni.createVideoContext(that.dataList[0].community_id + '' + 0, that).play()
}
//#endif
}
//#ifdef MP
if (this.k == 0) {
this.videoShare(this.dataList[0]);

View File

@ -3,10 +3,10 @@
<view class="circle_friends_wrapper">
<view>
<view @click="selectLocation">
<view class="site-box flex_a_c_j_sb" :style="{'background-color':backColor}">
<view :class="['place_wrapper','flex_a_c',isFshow?'sitebox':'']" @click="selectLocation">
<view :class="['place_wrapper','flex_a_c',isFshow?'sitebox':'']" >
<view :class="['iconfont','icon-weizhi',isFshow?'sitebox':'']" style="margin-left: 20rpx;">
</view>
<view class="town_name">{{street}}</view>
@ -24,8 +24,10 @@
<zbpSwiper :isSelectPlace="true" :location_Arr="locationArr" @kkchange='kkchange' @change='dchange'>
</zbpSwiper>
<zbpSwiper :isSelectPlace="true" :town='street' :streetname='street' :location_Arr="locationArr"
@change='dchange'>
</zbpSwiper>
<view class="list">
<navigator hover-class="none"
@ -249,20 +251,15 @@
},
onPullDownRefresh() {
this.cateGoods = []
this.list()
this.Area()
uni.stopPullDownRefresh()
},
onLoad() {
this.getArticle()
this.selfLocation()
this.Area()
this.setPermissions()
@ -288,11 +285,19 @@
this.list()
},
mounted() {
// #ifdef H5
//
window.addEventListener("scroll", this.scrolling);
// #endif
this.$bus.$on('value-updated', (newValue) => {
//
this.street = newValue.split(',')[0]
});
if(this.street.length<=0){
this.selfLocation()
}
},
// #ifdef APP-PLUS
@ -315,7 +320,6 @@
// #endif
methods: {
list() {
spuInfo('510502106', this.where1).then(res => {
// console.log(res)
@ -364,9 +368,7 @@
},
kkchange(e) {
this.bgColor = e
},
@ -415,7 +417,6 @@
},
confirm(e) {
this.street = e.value[1].name
this.street_id = e.value[1].code
this.town = e.value[1].name
@ -530,9 +531,10 @@
this.town = res.data.address_reference.town.title
this.street_id = res.data.address_reference.town.id
this.street = res.data.address_component.street
uni.setStorageSync('ADRESS_LOCATION',
this.town + ',' +this.street_id)
this.list()
uni.$emit('add',this.town+','+this.street_id)
// uni.setStorageSync('ADRESS_LOCATION',
// this.town + ',' + this.street_id)
// this.list()
}).catch(err => {
uni.showToast({
title: err,