商户入驻以及 供应界面修改
This commit is contained in:
commit
caa3e35b3e
15
api/requesta.js
Normal file
15
api/requesta.js
Normal file
@ -0,0 +1,15 @@
|
||||
import request from "@/utils/requesta.js";
|
||||
|
||||
export function getCityCloundShop(data) {
|
||||
return request.get("city/get_cloud_shop", data);
|
||||
}
|
||||
export function cloudWarehouse(data) {
|
||||
return request.get("store/product/cloudWarehouse", data);
|
||||
}
|
||||
/**
|
||||
* 供销市场标签
|
||||
* @returns {*}
|
||||
*/
|
||||
export function supMenuApi(data) {
|
||||
return request.get('intention/v2/cate', data);
|
||||
}
|
@ -18,28 +18,33 @@
|
||||
<view class="price">¥<text>{{item.spu && item.spu.price}}</text></view>
|
||||
<view class="buy-btn">立即购买</view>
|
||||
</view>
|
||||
|
||||
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
</view>
|
||||
</scroll-view>
|
||||
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
<view class='mask' style="height: 100vh;" catchtouchmove="true" :hidden='popup.show==false' @tap="closePopup">
|
||||
</view>
|
||||
<view class='mask' catchtouchmove="true" :hidden='popup.show==false' @tap="closePopup"></view>
|
||||
</view>
|
||||
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { goShopDetail } from '@/libs/order.js'
|
||||
import { mapGetters } from "vuex";
|
||||
import {
|
||||
goShopDetail
|
||||
} from '@/libs/order.js'
|
||||
import {
|
||||
mapGetters
|
||||
} from "vuex";
|
||||
export default {
|
||||
computed:{
|
||||
computed: {
|
||||
...mapGetters(['viewColor']),
|
||||
},
|
||||
props:{
|
||||
props: {
|
||||
list: {
|
||||
type: Array,
|
||||
default: []
|
||||
@ -50,9 +55,9 @@
|
||||
isHome: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
data() {
|
||||
return {
|
||||
popup: {
|
||||
show: false
|
||||
@ -63,11 +68,12 @@
|
||||
// 点击关闭按钮
|
||||
closePopup() {
|
||||
this.$set(this.popup, 'show', false);
|
||||
this.$emit("closes")
|
||||
},
|
||||
showPopup() {
|
||||
this.$set(this.popup, 'show', true);
|
||||
},
|
||||
goDetail(item){
|
||||
goDetail(item) {
|
||||
if (item.product_type === 1) {
|
||||
uni.navigateTo({
|
||||
url: `/pages/activity/goods_seckill_details/index?id=${item.product_id}&time=${item.stop_time}&spid=${this.uid}`
|
||||
@ -79,130 +85,150 @@
|
||||
} else if (item.product_type === 0) {
|
||||
uni.navigateTo({
|
||||
url: `/pages/goods_details/index?id=${item.product_id}&spid=${this.uid}`
|
||||
})
|
||||
}else if (item.product_type === 4) {
|
||||
})
|
||||
} else if (item.product_type === 4) {
|
||||
uni.navigateTo({
|
||||
url: `/pages/activity/combination_details/index?id=${item.activity_id}&spid=${this.uid}`
|
||||
})
|
||||
}else if (item.product_type === 40) {
|
||||
} else if (item.product_type === 40) {
|
||||
uni.navigateTo({
|
||||
url: `/pages/activity/combination_status/index?id=${item.activity_id}&spid=${this.uid}`
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.container{
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
left: 0;
|
||||
background-color: #ffffff;
|
||||
z-index: 77;
|
||||
border-radius: 16rpx 16rpx 0 0;
|
||||
transform: translate3d(0, 100%, 0);
|
||||
transition: all .3s cubic-bezier(.25, .5, .5, .9);
|
||||
max-height: 1000rpx;
|
||||
&.on {
|
||||
transform: translate3d(0, 0, 0);
|
||||
}
|
||||
.header{
|
||||
position: relative;
|
||||
padding: 40rpx 30rpx;
|
||||
.title{
|
||||
color: #282828;
|
||||
font-size: 30rpx;
|
||||
.container {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
left: 0;
|
||||
background-color: #ffffff;
|
||||
z-index: 77;
|
||||
border-radius: 16rpx 16rpx 0 0;
|
||||
transform: translate3d(0, 100%, 0);
|
||||
transition: all .3s cubic-bezier(.25, .5, .5, .9);
|
||||
max-height: 1000rpx;
|
||||
|
||||
&.on {
|
||||
transform: translate3d(0, 0, 0);
|
||||
}
|
||||
.iconfont{
|
||||
color: #8A8A8A;
|
||||
font-size: 28rpx;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
}
|
||||
.icon-guanbi5 {
|
||||
right: 20rpx;
|
||||
color: #8a8a8a;
|
||||
font-size: 30rpx;
|
||||
line-height: 30rpx;
|
||||
top: 20rpx;
|
||||
background-color: transparent;
|
||||
font-weight: normal;
|
||||
}
|
||||
}
|
||||
scroll-view{
|
||||
max-height: 800rpx;
|
||||
}
|
||||
.main_count{
|
||||
padding: 0 30rpx 30rpx;
|
||||
max-height: 800rpx;
|
||||
overflow-y: scroll;
|
||||
/* #ifndef MP */
|
||||
&.mb90{
|
||||
margin-bottom: 90rpx;
|
||||
}
|
||||
/* #endif */
|
||||
.list{
|
||||
margin-bottom: 40rpx;
|
||||
height: auto;
|
||||
flex-direction: row;
|
||||
&:last-child{
|
||||
margin-bottom: 0;
|
||||
|
||||
.header {
|
||||
position: relative;
|
||||
padding: 40rpx 30rpx;
|
||||
|
||||
.title {
|
||||
color: #282828;
|
||||
font-size: 30rpx;
|
||||
}
|
||||
|
||||
.iconfont {
|
||||
color: #8A8A8A;
|
||||
font-size: 28rpx;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
}
|
||||
|
||||
.icon-guanbi5 {
|
||||
right: 20rpx;
|
||||
color: #8a8a8a;
|
||||
font-size: 30rpx;
|
||||
line-height: 30rpx;
|
||||
top: 20rpx;
|
||||
background-color: transparent;
|
||||
font-weight: normal;
|
||||
}
|
||||
}
|
||||
.pro_list{
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
.picture,.image,uni-image{
|
||||
width: 200rpx;
|
||||
height: 200rpx;
|
||||
border-radius: 16rpx;
|
||||
|
||||
scroll-view {
|
||||
max-height: 800rpx;
|
||||
}
|
||||
|
||||
.main_count {
|
||||
padding: 0 30rpx 30rpx;
|
||||
max-height: 800rpx;
|
||||
overflow-y: scroll;
|
||||
|
||||
/* #ifndef MP */
|
||||
&.mb90 {
|
||||
margin-bottom: 90rpx;
|
||||
}
|
||||
.info{
|
||||
margin-left: 30rpx;
|
||||
position: relative;
|
||||
.bottom{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
width: 460rpx;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
bottom: 10rpx;
|
||||
flex-direction: row;
|
||||
|
||||
/* #endif */
|
||||
.list {
|
||||
margin-bottom: 40rpx;
|
||||
height: auto;
|
||||
flex-direction: row;
|
||||
|
||||
&:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
.name{
|
||||
color: #282828;
|
||||
font-size: 30rpx;
|
||||
line-height: 45rpx;
|
||||
display: -webkit-box;
|
||||
width: 460rpx;
|
||||
}
|
||||
|
||||
.pro_list {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
|
||||
.picture,
|
||||
.image,
|
||||
uni-image {
|
||||
width: 200rpx;
|
||||
height: 200rpx;
|
||||
border-radius: 16rpx;
|
||||
}
|
||||
.price{
|
||||
color: var(--view-priceColor);
|
||||
font-size: 26rpx;
|
||||
font-weight: bold;
|
||||
flex-direction: row;
|
||||
align-items: flex-end;
|
||||
text{
|
||||
font-size: 34rpx;
|
||||
|
||||
.info {
|
||||
margin-left: 30rpx;
|
||||
position: relative;
|
||||
|
||||
.bottom {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
width: 460rpx;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
bottom: 10rpx;
|
||||
flex-direction: row;
|
||||
}
|
||||
|
||||
.name {
|
||||
color: #282828;
|
||||
font-size: 30rpx;
|
||||
line-height: 45rpx;
|
||||
display: -webkit-box;
|
||||
width: 460rpx;
|
||||
}
|
||||
|
||||
.price {
|
||||
color: var(--view-priceColor);
|
||||
font-size: 26rpx;
|
||||
font-weight: bold;
|
||||
flex-direction: row;
|
||||
align-items: flex-end;
|
||||
|
||||
text {
|
||||
font-size: 34rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.buy-btn {
|
||||
color: #fff;
|
||||
background: var(--view-theme);
|
||||
border-radius: 28.04rpx 28.04rpx 28.04rpx 28.04rpx;
|
||||
width: 154.21rpx;
|
||||
height: 57.83rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 22rpx;
|
||||
}
|
||||
}
|
||||
.buy-btn{
|
||||
color: #fff;
|
||||
background: var(--view-theme);
|
||||
border-radius: 26rpx;
|
||||
width: 140rpx;
|
||||
height: 48rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 22rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</style>
|
@ -1,8 +1,8 @@
|
||||
<template>
|
||||
<view class='product-bg'>
|
||||
<swiper :indicator-dots="indicatorDots" indicator-active-color="#e93323" :circular="circular"
|
||||
:interval="interval" :duration="duration">
|
||||
|
||||
:interval="interval" :duration="duration">
|
||||
|
||||
<block v-for="(item,index) in imgUrls" :key='index'>
|
||||
<swiper-item>
|
||||
<image :src="item" class="slide-image" mode="aspectFit" />
|
||||
@ -12,7 +12,7 @@
|
||||
</swiper-item>
|
||||
</block>
|
||||
</swiper>
|
||||
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@ -56,8 +56,7 @@
|
||||
videoContext: ''
|
||||
};
|
||||
},
|
||||
created() {
|
||||
},
|
||||
created() {},
|
||||
watch: {
|
||||
|
||||
},
|
||||
@ -83,7 +82,7 @@
|
||||
// #ifdef APP-PLUS
|
||||
this.isPlay = false
|
||||
this.videoContext = uni.createVideoContext('myVideo', this);
|
||||
this.$nextTick(()=>{
|
||||
this.$nextTick(() => {
|
||||
this.videoContext.play();
|
||||
})
|
||||
// #endif
|
||||
@ -102,13 +101,15 @@
|
||||
height: 710rpx;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.product-bg swiper {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.product-bg .slide-image {
|
||||
width: 100%;
|
||||
width: 100vw;
|
||||
height: 100%;
|
||||
border-radius: 16rpx;
|
||||
}
|
||||
@ -166,4 +167,4 @@
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
</style>
|
||||
</style>
|
@ -142,10 +142,12 @@
|
||||
this.$emit('change', e)
|
||||
this.street = e.value[1].name
|
||||
this.$nextTick(() => {
|
||||
this.$bus.$emit('value-updated',e.value[1].name + ',' +e.value[1].code);
|
||||
|
||||
this.$bus.$emit('value-updated', e.value[1].name + ',' + e.value[1].code);
|
||||
|
||||
})
|
||||
|
||||
|
||||
|
||||
|
||||
},
|
||||
changeHandler(e) {
|
||||
const {
|
||||
|
353
components/zbpSwiperb.vue
Normal file
353
components/zbpSwiperb.vue
Normal file
@ -0,0 +1,353 @@
|
||||
<template>
|
||||
<view class="zbp-head-wrapper">
|
||||
<view class="color-lump"></view>
|
||||
<view class="bg-img">
|
||||
<img :src="bgColor" alt="">
|
||||
</view>
|
||||
|
||||
<view class="site-box flex_a_c_j_sb" style="padding-top: var(--status-bar-height)">
|
||||
|
||||
<view class="place_wrapper flex_a_c" @click="selectLocation">
|
||||
<view class="iconfont icon-weizhi"></view>
|
||||
<view class="town_name">{{street}}</view>
|
||||
</view>
|
||||
<view class="" style="display: flex;">
|
||||
<navigator url="/pages/chat/customer_list/index?type=0" hover-class="none">
|
||||
<view class="iconfont icon-xiaoxi" style="color:#fff;margin-right: 20rpx;"></view>
|
||||
</navigator>
|
||||
<navigator url="/pages/columnGoods/goods_search/index" hover-class="none">
|
||||
<view class="iconfont icon-sousuo" style="font-size: 39rpx;color: white;"></view>
|
||||
</navigator>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<!-- 搜索栏 -->
|
||||
<!-- <navigator url="/pages/columnGoods/goods_search/index" hover-class="none" class="search_content flex_a_c_j_sb">
|
||||
<view class="flex_a_c">
|
||||
<view class="iconfont icon-sousuo" style="font-size: 39rpx;"></view>
|
||||
<input type="text" v-model="keyword" placeholder="搜索产品或店铺" placeholder-style="font-size: 30rpx;"
|
||||
disabled>
|
||||
</view>
|
||||
<button class="search_btn">搜索</button>
|
||||
</navigator> -->
|
||||
<!-- 轮播图 -->
|
||||
<view class="supply_chains-head">
|
||||
<swiper class="swiper " @change="swiperChange" :indicator-dots="swiper.indicatorDots"
|
||||
:autoplay="swiper.autoplay" :interval="swiper.interval" :duration="swiper.duration"
|
||||
indicator-active-color="#fff">
|
||||
<block v-for="(item,index) in swiper['url']" :key="index">
|
||||
<swiper-item class="swi_item" @click="swiperClick(item)">
|
||||
<!-- <u--image :showLoading="true" :src="item.img" width="750rpx" height="259rpx" mode="aspectFit">
|
||||
</u--image> -->
|
||||
<u--image :showLoading="true" :src="item.img" width="750rpx" height="600rpx">
|
||||
</u--image>
|
||||
</swiper-item>
|
||||
</block>
|
||||
</swiper>
|
||||
</view>
|
||||
<u-picker :defaultIndex="defaInd" :show="showPicker" ref="uPicker" :columns="columnData" @confirm="confirm"
|
||||
@cancel="showPicker = false" @change="changeHandler" keyName="name"></u-picker>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
getArea,
|
||||
getStreet
|
||||
} from '@/api/article.js';
|
||||
import {
|
||||
getIndexData,
|
||||
getDiy
|
||||
} from '@/api/api.js'
|
||||
import {
|
||||
getGeocoder
|
||||
} from '@/api/store.js';
|
||||
import {
|
||||
mapGetters
|
||||
} from 'vuex'
|
||||
import {
|
||||
Toast
|
||||
} from '../libs/uniApi';
|
||||
import Cache from '@/utils/cache';
|
||||
export default {
|
||||
props: {
|
||||
isSelectPlace: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
location_Arr: {
|
||||
type: Object,
|
||||
default: () => ({})
|
||||
},
|
||||
town: {
|
||||
type: String,
|
||||
default: false
|
||||
},
|
||||
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
defaInd: [0, 0],
|
||||
street: '',
|
||||
|
||||
showPicker: false,
|
||||
styleConfig: [],
|
||||
columnData: [],
|
||||
homeCombData: [],
|
||||
keyword: '',
|
||||
bgColor: '',
|
||||
swiper: {
|
||||
url: [{
|
||||
img: ''
|
||||
}],
|
||||
indicatorDots: true, // 显示面板指示点
|
||||
vertical: false, // 滑动方向是否为纵向
|
||||
autoplay: true, // 是否自动切换
|
||||
interval: 2000, // 自动切换时间间隔
|
||||
duration: 400 // 滑动动画时长
|
||||
},
|
||||
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
street(nval, val) {
|
||||
this.street = nval
|
||||
}
|
||||
},
|
||||
|
||||
created() {
|
||||
|
||||
this.getBanner()
|
||||
this.Area()
|
||||
|
||||
},
|
||||
|
||||
mounted() {
|
||||
this.$bus.$on('value-updated', (newValue) => {
|
||||
// 更新组件的值
|
||||
this.street = newValue.split(',')[0]
|
||||
});
|
||||
},
|
||||
|
||||
methods: {
|
||||
swiperClick(item) {
|
||||
const url = item.info[1].value
|
||||
uni.navigateTo({
|
||||
url: url
|
||||
})
|
||||
},
|
||||
selectLocation() {
|
||||
this.isSelectPlace ? this.showPicker = true : ''
|
||||
|
||||
},
|
||||
|
||||
confirm(e) {
|
||||
|
||||
this.showPicker = false
|
||||
this.$emit('selectPlce', e)
|
||||
this.$emit('change', e)
|
||||
this.street = e.value[1].name
|
||||
this.$nextTick(() => {
|
||||
this.$bus.$emit('value-updated', e.value[1].name + ',' + e.value[1].code);
|
||||
|
||||
})
|
||||
|
||||
|
||||
|
||||
},
|
||||
changeHandler(e) {
|
||||
const {
|
||||
columnIndex,
|
||||
value,
|
||||
values,
|
||||
index,
|
||||
picker = this.$refs.uPicker
|
||||
} = e;
|
||||
if (columnIndex === 0) {
|
||||
getStreet({
|
||||
area_code: value[0]['code']
|
||||
}).then(res => {
|
||||
picker.setColumnValues(1, res.data);
|
||||
});
|
||||
}
|
||||
},
|
||||
Area() {
|
||||
getArea({
|
||||
city_code: 510500
|
||||
}).then(res => {
|
||||
this.$refs.uPicker.setColumnValues(0, res.data);
|
||||
this.Street(res.data[0]['code']);
|
||||
});
|
||||
},
|
||||
Street(code) {
|
||||
getStreet({
|
||||
area_code: code
|
||||
}).then(res => {
|
||||
this.$refs.uPicker.setColumnValues(1, res.data);
|
||||
});
|
||||
},
|
||||
|
||||
swiperChange(e) {
|
||||
let {
|
||||
current,
|
||||
source
|
||||
} = e.detail;
|
||||
if (source === 'autoplay' || source === 'touch') {
|
||||
this.bgColor = this.swiper.url[e.detail.current]['img']
|
||||
this.$emit('kkchange', this.bgColor)
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
// 对象转数组
|
||||
objToArr(data) {
|
||||
let obj = Object.keys(data).sort();
|
||||
let m = obj.map(key => data[key]);
|
||||
return m;
|
||||
},
|
||||
async getBanner(id) {
|
||||
let that = this;
|
||||
const {
|
||||
data
|
||||
} = await getDiy({
|
||||
id: 0
|
||||
})
|
||||
that.styleConfig = that.objToArr(data.value);
|
||||
/* 循环数组得到数据*/
|
||||
that.styleConfig.forEach((item, index, arr) => {
|
||||
if (item.name == 'headerSerch' || item.name == 'homeComb') {
|
||||
if (item.name == 'homeComb') {
|
||||
that.swiper.url = item.swiperConfig.list
|
||||
}
|
||||
}
|
||||
})
|
||||
this.bgColor = this.swiper.url[0].img
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.zbp-head-wrapper {
|
||||
position: relative;
|
||||
// padding-top: 78.95rpx;
|
||||
overflow: hidden;
|
||||
// background-color: green;
|
||||
height: 600rpx;
|
||||
|
||||
// .color-lump {
|
||||
// z-index: 1;
|
||||
// position: absolute;
|
||||
// bottom: -86px;
|
||||
// left: 50%;
|
||||
// transform: translate(-50%, 0);
|
||||
// width: 102%;
|
||||
// height: 133px;
|
||||
// border-radius: 30px 30px 0 0;
|
||||
// background-color: #fff;
|
||||
// }
|
||||
|
||||
.bg-img {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
top: 0;
|
||||
/* #ifdef MP || APP-PLUS */
|
||||
z-index: -1;
|
||||
/* #endif */
|
||||
/* #ifdef H5 */
|
||||
z-index: 0;
|
||||
/* #endif */
|
||||
z-index: 0;
|
||||
filter: blur(0);
|
||||
overflow: hidden;
|
||||
|
||||
img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
filter: blur(30rpx);
|
||||
transform: scale(1.5);
|
||||
}
|
||||
}
|
||||
|
||||
.site-box {
|
||||
margin: 0 auto;
|
||||
width: 750rpx;
|
||||
height: 66.67rpx;
|
||||
margin-top: 30rpx;
|
||||
// margin-bottom: 26.32rpx;
|
||||
position: absolute;
|
||||
z-index: 9999;
|
||||
padding-right: 20rpx;
|
||||
|
||||
|
||||
// 位置
|
||||
.place_wrapper {
|
||||
margin-left: 20rpx;
|
||||
color: #fff;
|
||||
margin-right: 24.56rpx;
|
||||
font-size: 30rpx;
|
||||
|
||||
.town_name {
|
||||
margin-left: 21rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.iconfont {
|
||||
font-size: 35.09rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.my-main {
|
||||
transition: background-color .5s ease;
|
||||
}
|
||||
|
||||
.search_content {
|
||||
margin: 0 auto;
|
||||
width: 724rpx;
|
||||
height: 74rpx;
|
||||
padding: 2px 2px 2px 21.05rpx;
|
||||
border-radius: 175rpx;
|
||||
background: #fff;
|
||||
margin-bottom: 21rpx;
|
||||
position: relative;
|
||||
box-sizing: border-box;
|
||||
|
||||
.icon-sousuo {
|
||||
font-size: 26.32rpx;
|
||||
font-weight: bold;
|
||||
color: #c8c7c6;
|
||||
margin-right: 17.54rpx;
|
||||
}
|
||||
|
||||
.search_btn {
|
||||
color: #fff;
|
||||
width: 105.26rpx;
|
||||
height: 52.63rpx;
|
||||
line-height: 52.63rpx;
|
||||
background: #f84221;
|
||||
border-radius: 100px;
|
||||
font-size: 28.07rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.supply_chains-head {
|
||||
// margin-bottom: 17.54rpx;
|
||||
position: relative;
|
||||
z-index: 2;
|
||||
|
||||
.swiper {
|
||||
width: 750rpx;
|
||||
height: 600rpx;
|
||||
margin: 0 auto;
|
||||
// border-radius: 20rpx 20rpx 20rpx 20rpx;
|
||||
overflow: hidden;
|
||||
|
||||
.swi_item {
|
||||
width: 750rpx;
|
||||
height: 600rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
@ -177,7 +177,6 @@
|
||||
height="400.09rpx"></u--image>
|
||||
<view class="" style="text-align: center;">
|
||||
暂无商品
|
||||
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@ -244,17 +243,19 @@
|
||||
</view>
|
||||
<view class="empty" style="" v-else>
|
||||
<view style="height: var(--status-bar-height);"></view>
|
||||
<view style="padding: 10rpx;">
|
||||
<u--image :showLoading="true" src="/static/images/LHYC/PFH.png" width="50.82rpx" height="50.82rpx"
|
||||
@click='goBack'></u--image>
|
||||
</view>
|
||||
<view class="info">
|
||||
|
||||
<u--image :showLoading="true" src="/static/images/noCart.png" width="400.09rpx"
|
||||
height="400.09rpx"></u--image>
|
||||
<view class="" style="text-align: center;">
|
||||
暂无商家
|
||||
|
||||
当前区域暂无云仓
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
|
||||
<view class="" :style="`height:${appInfo.bottom}px;background-color:white`">
|
||||
</view>
|
||||
</view>
|
||||
@ -266,7 +267,7 @@
|
||||
import {
|
||||
cloudWarehouse,
|
||||
getCityCloundShop
|
||||
} from '@/api/api.js'
|
||||
} from '@/api/requesta.js'
|
||||
import {
|
||||
Toast
|
||||
} from '@/libs/uniApi';
|
||||
@ -335,7 +336,7 @@
|
||||
}
|
||||
},
|
||||
onLoad(e) {
|
||||
this.cartFn()
|
||||
// this.cartFn()
|
||||
this.appInfo = this.$appInfo.safeAreaInsets
|
||||
this.winHeight = this.$appInfo.windowHeight
|
||||
this.street_code = e.street
|
||||
@ -344,7 +345,7 @@
|
||||
// console.log(this.appInfo, "手机信息")
|
||||
},
|
||||
onShow() {
|
||||
this.cartFn()
|
||||
// this.cartFn()
|
||||
},
|
||||
// 分页
|
||||
onReachBottom() {
|
||||
@ -364,6 +365,12 @@
|
||||
if (res.data.list[0].product_id == this.goodsList[0].product_id) {
|
||||
this.status = "nomore"
|
||||
this.flag = false
|
||||
} else {
|
||||
if (res.data.list.length == 0) {
|
||||
this.status = "nomore"
|
||||
return
|
||||
}
|
||||
this.goodsList = this.goodsList.concat(res.data.list)
|
||||
}
|
||||
})
|
||||
// this.getList().then(res => {
|
||||
|
@ -37,7 +37,7 @@
|
||||
</view>
|
||||
<view class="content">
|
||||
<view style="background-color: red;height: 10px">
|
||||
asdasd
|
||||
|
||||
</view>
|
||||
<view class="hot_serch">
|
||||
<text>热搜:</text> <text @click="hotSerchFn('小张副食')">小张副食</text> <text
|
||||
@ -283,8 +283,10 @@
|
||||
import {
|
||||
storeMerchantList,
|
||||
getGeocoder,
|
||||
supMenuApi
|
||||
} from '@/api/store.js';
|
||||
import {
|
||||
supMenuApi
|
||||
} from '@/api/requesta.js';
|
||||
import recommend from './component/recommend';
|
||||
import rightSlider from './component/rightSlider';
|
||||
import {
|
||||
|
@ -274,9 +274,12 @@
|
||||
import {
|
||||
storeMerchantList,
|
||||
getGeocoder,
|
||||
supMenuApi,
|
||||
|
||||
supAgoodsApi
|
||||
} from '@/api/store.js';
|
||||
import {
|
||||
supMenuApi,
|
||||
} from '@/api/requesta.js';
|
||||
import recommend from './component/recommend';
|
||||
import rightSlider from './component/rightSlider';
|
||||
import {
|
||||
|
@ -3,8 +3,8 @@
|
||||
|
||||
|
||||
|
||||
<view v-if="followDetail != null && followDetail" class="main" @click.stop="showManage = false"
|
||||
style="padding-top: var(--status-bar-height);;">
|
||||
<view v-if="followDetail != null && followDetail" class="main" :class="{off_scoll:flag}"
|
||||
@click.stop="showManage = false" style="padding-top: var(--status-bar-height);;">
|
||||
<view v-if="followDetail.status != 1" class="approval_status">
|
||||
<view class="status_count" :class="followDetail.status == 0 ? 'status1' : 'status0'">
|
||||
<view class="status_title">
|
||||
@ -202,7 +202,8 @@
|
||||
<text>暂无评论,快去抢沙发吧~</text>
|
||||
</view>
|
||||
|
||||
<view v-if="followDetail.status == 1 && followDetail.relevance.length<=0" class="release_bar acea-row">
|
||||
<view v-if="followDetail.status == 1 && followDetail.relevance.length<=0"
|
||||
class="release_bar acea-row">
|
||||
<view class="input_count" :class="{input_reply:content}">
|
||||
<form @submit="submitComment">
|
||||
<input type="text" :placeholder="placeholder"
|
||||
@ -220,21 +221,22 @@
|
||||
:class="followDetail.relevance_id ? 'icon-shoucang1' : 'icon-dianzan'"></text>
|
||||
<text>{{followDetail.count_start}}</text>
|
||||
</view>
|
||||
<view class="item acea-row" @click="FToggle">
|
||||
<view class="item acea-row" @click="FToggle">
|
||||
<text class="iconfont icon-pinglun"></text>
|
||||
<text>{{replyData.all}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view v-if="followDetail.status == 1&& followDetail.relevance.length>0" class="release_bar acea-row">
|
||||
<view v-if="followDetail.status == 1&& followDetail.relevance.length>0"
|
||||
class="release_bar acea-row">
|
||||
|
||||
<view class="shopp" @click="openMore(followDetail)" style="margin-top: 10rpx">
|
||||
<view class="shopp-img">
|
||||
<image src="@/static/images/shopp.png" mode=""></image>
|
||||
</view>
|
||||
<view class="shopp-txt">
|
||||
商品 (2)
|
||||
商品 ({{followDetail.relevance.length}})
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@ -265,8 +267,8 @@
|
||||
</view>
|
||||
</view>
|
||||
<!-- 他提到的宝贝弹窗 -->
|
||||
<mentioned ref="mentioned" v-if="followDetail" @close="close" :list="followDetail.relevance"
|
||||
:uid="followDetail.uid"></mentioned>
|
||||
<mentioned ref="mentioned" v-if="followDetail" @close="close" @closes="flag=false"
|
||||
:list="followDetail.relevance" :uid="followDetail.uid"></mentioned>
|
||||
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize>
|
||||
<!-- 绑定手机号 -->
|
||||
<uni-popup ref="bindmobile" type="bottom">
|
||||
@ -275,10 +277,15 @@
|
||||
|
||||
<uni-popup ref="bindmobile1" type="bottom">
|
||||
<view class="" style="background-color: #fff;height: 154rpx ;">
|
||||
<view class="input_count1" :class="{input_reply:content}" >
|
||||
<view class="input_count1" :class="{input_reply:content}">
|
||||
<form @submit="submitComment">
|
||||
<input type="text" class="count1" :placeholder="placeholder" placeholder-style="color: #999999; font-size: 26rpx;"
|
||||
v-model="content" :focus="focus" @confirm.stop="submitComment()" cursorSpacing={20}>
|
||||
<view class="" style="display: flex;padding: 0 20rpx;box-sizing: border-box;">
|
||||
<input type="text" class="count1" :placeholder="placeholder"
|
||||
placeholder-style="color: #999999; font-size: 26rpx;" v-model="content" :focus="focus"
|
||||
@confirm.stop="submitComment()" cursorSpacing={20}>
|
||||
<button class="send1" @click.stop="submitComment">发送</button>
|
||||
</view>
|
||||
|
||||
</form>
|
||||
</view>
|
||||
</view>
|
||||
@ -336,6 +343,7 @@
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
flag: false,
|
||||
open_grass: openPlantGrass,
|
||||
followDetail: null,
|
||||
commList: [], //评论列表
|
||||
@ -400,7 +408,7 @@
|
||||
},
|
||||
FToggle() {
|
||||
this.$refs.bindmobile1.open()
|
||||
|
||||
|
||||
},
|
||||
// 后退
|
||||
returns() {
|
||||
@ -712,10 +720,12 @@
|
||||
/*查看提到的宝贝*/
|
||||
openMore(item) {
|
||||
this.$refs.mentioned.showPopup()
|
||||
this.flag = true
|
||||
},
|
||||
close() {
|
||||
this.$refs.mentioned.closePopup()
|
||||
this.$refs.bindmobile.close()
|
||||
this.flag = false
|
||||
}
|
||||
},
|
||||
onReachBottom() {
|
||||
@ -1280,28 +1290,30 @@
|
||||
font-size: 32rpx;
|
||||
}
|
||||
}
|
||||
.input_count1{
|
||||
|
||||
height: 70rpx;
|
||||
padding-top: 15rpx;
|
||||
|
||||
|
||||
/deep/.count1{
|
||||
padding-left: 20rpx;
|
||||
width: 617rpx;
|
||||
|
||||
.input_count1 {
|
||||
|
||||
height: 70rpx;
|
||||
background: #F4F4F4;
|
||||
margin: 0 auto;
|
||||
|
||||
border-radius: 35px 35px 35px 35px;
|
||||
padding-top: 15rpx;
|
||||
|
||||
|
||||
/deep/.count1 {
|
||||
padding-left: 20rpx;
|
||||
width: 617rpx;
|
||||
height: 70rpx;
|
||||
background: #F4F4F4;
|
||||
margin: 0 auto;
|
||||
|
||||
border-radius: 35px 35px 35px 35px;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
.release_bar {
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
background: #ffffff;
|
||||
|
||||
|
||||
padding: 15rpx 20rpx;
|
||||
position: fixed;
|
||||
left: 0;
|
||||
@ -1403,4 +1415,24 @@
|
||||
font-size: 26rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.send1 {
|
||||
font-size: 26rpx;
|
||||
color: #ffffff;
|
||||
// padding: 12rpx 45rpx;
|
||||
background-image: linear-gradient(126deg, var(--view-bntColor21) 0%, var(--view-bntColor22) 100%);
|
||||
border-radius: 30rpx;
|
||||
text-align: center;
|
||||
width: 150rpx;
|
||||
line-height: 70rpx;
|
||||
margin-left: 20rpx;
|
||||
|
||||
// height: ;
|
||||
}
|
||||
|
||||
// 禁止滚动
|
||||
.off_scoll {
|
||||
height: 100vh;
|
||||
overflow: hidden;
|
||||
}
|
||||
</style>
|
76
utils/requesta.js
Normal file
76
utils/requesta.js
Normal file
@ -0,0 +1,76 @@
|
||||
// +----------------------------------------------------------------------
|
||||
// | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2016~2021 https://www.crmeb.com All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: CRMEB Team <admin@crmeb.com>
|
||||
// +----------------------------------------------------------------------
|
||||
import {
|
||||
HTTP_REQUEST_URL,
|
||||
HEADER,
|
||||
TOKENNAME
|
||||
} from '@/config/app';
|
||||
import {
|
||||
checkLogin
|
||||
} from '../libs/login';
|
||||
import store from '../store';
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 发送请求
|
||||
*/
|
||||
function baseRequest(url, method, data, {
|
||||
noAuth = false,
|
||||
noVerify = false
|
||||
}) {
|
||||
let Url = HTTP_REQUEST_URL,
|
||||
header = HEADER;
|
||||
|
||||
|
||||
|
||||
if (store.state.app.token) header[TOKENNAME] = 'Bearer ' + store.state.app.token;
|
||||
|
||||
return new Promise((reslove, reject) => {
|
||||
uni.request({
|
||||
url: Url + '/api/' + url,
|
||||
method: method || 'GET',
|
||||
header: header,
|
||||
data: data || {},
|
||||
success: (res) => {
|
||||
// #ifdef APP-PLUS
|
||||
// console.log('app', Url + '/api/' + url, res.data);
|
||||
// #endif
|
||||
if (noVerify)
|
||||
reslove(res.data, res);
|
||||
else if (res.data.status == 200)
|
||||
reslove(res.data, res);
|
||||
else if ([410000, 410001, 410002, 40000].indexOf(res.data.status) !== -1) {
|
||||
|
||||
reject(res.data);
|
||||
} else if (res.data.status == 501) {
|
||||
uni.reLaunch({
|
||||
url: '/pages/error/index'
|
||||
})
|
||||
reject(res.data);
|
||||
} else
|
||||
reject(res.data.message || '系统错误');
|
||||
},
|
||||
fail: (message) => {
|
||||
reject('请求失败');
|
||||
}
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
const request = {};
|
||||
|
||||
['options', 'get', 'post', 'put', 'head', 'delete', 'trace', 'connect'].forEach((method) => {
|
||||
request[method] = (api, data, opt) => baseRequest(api, method, data, opt || {})
|
||||
});
|
||||
|
||||
|
||||
|
||||
export default request;
|
Loading…
x
Reference in New Issue
Block a user