代码优化

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,7 +1,7 @@
<template> <template>
<view class="wf-item-page"> <view class="wf-item-page" @click="gogogo(item)">
<image :src="item.image[0]" mode="widthFix" class="item-img" /> <image :src="item.image" mode="widthFix" class="item-img" />
<view class="title">{{item.title}}</view> <view class="title">{{item.title}}</view>
<view class="tag"> <view class="tag">
@ -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>
@ -120,6 +130,7 @@
} }
} }
} }
.relase { .relase {
display: flex; display: flex;
@ -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,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,7 +40,9 @@
// +---------------------------------------------------------------------- // +----------------------------------------------------------------------
// | Author: CRMEB Team <admin@crmeb.com> // | Author: CRMEB Team <admin@crmeb.com>
// +---------------------------------------------------------------------- // +----------------------------------------------------------------------
import { mapGetters } from "vuex"; import {
mapGetters
} from "vuex";
export default { export default {
name: 'checkDelivery', name: 'checkDelivery',
props: { props: {
@ -59,8 +62,7 @@
}, },
radioList: { radioList: {
type: Array, type: Array,
default: [ default: [{
{
title: '快递配送', title: '快递配送',
check: true check: true
}, },
@ -109,6 +111,7 @@
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;
@ -119,6 +122,7 @@
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;
@ -126,18 +130,22 @@
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;
@ -145,18 +153,22 @@
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;
@ -170,6 +182,7 @@
} }
} }
} }
.animated { .animated {
animation-duration: .3s animation-duration: .3s
} }

View File

@ -6,6 +6,7 @@
</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() {
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() 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

@ -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.town = res.data.address_reference.town.title
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.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,20 +272,25 @@
// #ifdef APP-PLUS // #ifdef APP-PLUS
onPageScroll(e) { onPageScroll(e) {
if (e.scrollTop > 0) { const scrollTop = e.scrollTop;
this.ishshow = true
//
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.isFshow = true
this.show = false
} else if (e.scrollTop == 0) { } else if (scrollTop > 100) {
this.ishshow = false this.backColor = 'rgba(248, 66, 33, 1)'
this.isFshow = false this.isFshow = true
} else { this.show = false
this.ishshow = false
this.isFshow = 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
Cache.set('ADRESS_LOCATION',
e.value[1].name + ',' + e.value[1].name + ',' +
this.street = e.value[1].name
uni.setStorageSync('ADRESS_LOCATION',
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" style="color: #333333;"></view> <view class="iconfont icon-xiangzuo"></view>
</view> </view>
<view class="">
供销综合云市场 <view class='input acea-row row-between-wrapper'><text class='iconfont icon-sousuo'></text>
</view>
<view style="position: relative;width: 289.14rpx;">
<!-- <text class='iconfont icon-sousuo'></text>
<input placeholder='搜索店铺名称' placeholder-class='placeholder' confirm-type='search' name="search" <input placeholder='搜索店铺名称' placeholder-class='placeholder' confirm-type='search' name="search"
:value='sotreParam.keyword' @confirm="searchSubmit"></input> --> :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>
<view class='iconfont search-right' @click='showMaoLocation(latitude,longitude)'> <!-- <view v-if="mer_location == 1" :class="'styleType'+store_street_theme" style="text-align: right;"
<u--image :showLoading="true" src="/static/images/GXSC/DW.png" width="50.82rpx" class='iconfont search-right' @click='showMaoLocation(latitude,longitude)'>
height="50.82rpx"></u--image> <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> </view>
</view> --> </view>
<view class="content"> <view class="nav-wrapper" :class="'styleType'+store_street_theme">
<view class="hot_serch">
<text>热搜:</text> <text>热a搜商品</text> <text>热搜商品</text>
<text>热搜sasas商品</text>
</view>
<view class="menu_cls">
<u-scroll-list>
<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; 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>
<!-- 热搜 -->
<!-- <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)'>
@ -106,11 +34,7 @@
</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">
@ -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>
@ -269,8 +190,7 @@
<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: '默认',
@ -379,7 +289,7 @@
}; };
}, },
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
@ -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({
@ -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)
}, },
// //
@ -714,107 +616,49 @@
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
* { .productList .search {
margin: 0;
padding: 0;
}
.com_name {
font-size: 32rpx;
// background-color: red;
max-width: 40vw;
white-space: nowrap;
/* 防止文字换行 */
overflow: hidden;
/* 超出部分隐藏 */
text-overflow: ellipsis;
/* 使用省略号表示溢出的内容 */
width: 200px;
/* 可根据实际情况调整容器宽度 */
}
.productList {
// padding-top: 50rpx;
// padding: 0 20rpx 0;
.top {
padding-top: 20rpx;
background-color: white;
position: fixed;
z-index: 999;
width: 100%; width: 100%;
height: 146rpx;
padding: 0 20rpx;
box-sizing: border-box;
position: fixed;
left: 0;
top: 0; top: 0;
} z-index: 9;
.content {
padding: 20rpx;
}
.menu_cls {
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; display: flex;
// align-items: center; flex-wrap: nowrap;
background-color: #fff;
.left { padding-top: 80rpx;
margin-right: 20rpx; padding-bottom: 20rpx;
width: 158rpx; &.styleType1 {
height: 158rpx; background-color: var(--view-theme);
border-radius: 20rpx;
overflow: hidden;
} }
.right { .search-right {
.head {
font-weight: bold;
}
.li {
display: flex; display: flex;
font-size: 22rpx;
margin-bottom: 10rpx;
align-items: center; align-items: center;
justify-content: space-between;
text { max-width: max-content;
margin: 0 20rpx 0 5rpx; flex: 1;
} padding-left: 20rpx;
}
}
}
} }
.address { .right-text {
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 {
@ -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;
@ -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,7 +1123,6 @@
} }
} }
} }
.guanbi { .guanbi {
width: 20px; width: 20px;
height: 20px; height: 20px;

View File

@ -869,7 +869,7 @@
// 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,
@ -898,6 +898,28 @@
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() {

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: "",
@ -732,15 +734,10 @@
}, },
get() { get() {
let that = this let that = this
// 1.这里引入后端请求数据 that.loadVideo = true
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) { if (res.data.list.length < that.limit) {
this.loadMore = false; this.loadMore = false;
} }
@ -751,7 +748,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;

View File

@ -3,18 +3,16 @@
<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">
@ -25,9 +23,13 @@
</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">
<navigator hover-class="none"
:url="`/pages/nongKe/supply_chain/supplier?type_id=10&street_id=${street_id}`">
<view class="list-m"> <view class="list-m">
<image src="@/static/images/f6.png" mode="aspectFill"></image> <image src="@/static/images/f6.png" mode="aspectFill"></image>
<view class="list-title"> <view class="list-title">
@ -42,7 +44,7 @@
</view> </view>
<view class="list-titleb"> <view class="list-titleb">
<view class="titlea"> <view class="titlea">
通滩镇 {{town}}
</view> </view>
<view class="titleb"> <view class="titleb">
综合供销云市场 综合供销云市场
@ -54,10 +56,17 @@
<view class=""> <view class="">
点击查看 点击查看
</view> </view>
<text class="iconfont icon-xiangyou"></text>
<view class="title-infoimg">
<image src="@/static/images/pj.png" mode=""></image>
</view> </view>
</view> </view>
<view class="list-m"> </view>
</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>
@ -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) const scrollTop = e.scrollTop;
if (e.scrollTop > 0) { if (scrollTop <= 20) {
this.ishshow = true 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 this.isFshow = true
} else if (e.scrollTop == 0) {
this.ishshow = false
this.isFshow = false
} else {
this.ishshow = false
this.isFshow = false
}
}
}, },
// #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'
if (this.where.page == 1 && res.data.list.length <= 0) this.emptyShow = true
if (item) {
if (item.index == 1 && this.cateGoods[0]) {
uni.navigateTo({ uni.navigateTo({
// #ifdef MP || H5 url: `/pages/nongKe/cloud_entrepot/index?street=${this.street_id}&town=${this.town}`
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