修改商品图片格式,以及供应界面

This commit is contained in:
jia 2023-09-04 11:58:13 +08:00
parent 62cf986c9c
commit c16be21609
15 changed files with 64 additions and 186 deletions

View File

@ -1,6 +1,6 @@
<template>
<view class="gather">
<view @click="selectLocation">
<view @click="selectLocation" v-if="isFshow">
<view class="site-box flex_a_c_j_sb" :style="{'background-color':backColor}">
<view :class="['place_wrapper','flex_a_c',isFshow?'sitebox':'']">
@ -180,7 +180,6 @@
this.$bus.$on('value-updated', (newValue) => {
//
this.street = newValue.split(',')[0]
});
},
@ -358,7 +357,7 @@
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)
uni.$emit('add', this.street + ',' + street_id)
}).catch(err => {
uni.showToast({

View File

@ -11,13 +11,13 @@
<view class="goods">
<block v-for="(item,index) in cateGoods" :key="index">
<view class="goods_item" @click="gogogo(item)">
<image class="goods_img" :src="item.image[0]" mode="aspectFill"></image>
<image class="goods_img" :src="item.image[0]" mode="aspectFit"></image>
<view class="botm">
<view class="title">{{item.title}}</view>
<view class="goods_info flex_a_c">
<view class="l_info flex_a_c">
<image :src="(item.author && item.author.avatar) || '/static/images/f.png'"
mode="aspectFill" class="g_img"></image>
mode="aspectFit" class="g_img"></image>
<view class="g_name">{{item.author && item.author.nickname}}</view>
</view>
<view class="nice_box" @click.stop="giveStart(item)">

View File

@ -28,7 +28,7 @@
</view>
<view class="advertItem02 advertItem05 acea-row" v-if="style==4">
<view class="item" v-for="(item,index) in picList" :key="index" @click="goDetail(item)">
<image :src="item.image" mode="aspectFill" :style="'height:'+ imageH +'rpx;'"></image>
<image :src="item.image" mode="aspectFit" :style="'height:'+ imageH +'rpx;'"></image>
</view>
</view>
<view class="advertItem02 advertItem06 acea-row" v-if="style==5">

View File

@ -1,7 +1,7 @@
<template>
<view class="Circle_friends">
<view class="circle_friends_wrapper">
<view>
<view v-if="isFshow">
<view class="site-box flex_a_c_j_sb" :style="{'background-color':backColor}">
<view :class="['place_wrapper','flex_a_c',isFshow?'sitebox':'']" @click="selectLocation">
@ -19,7 +19,6 @@
</view>
</view> -->
</view>
@ -258,7 +257,7 @@
onReachBottom() {
if (this.status == 'nomore') return;
this.status = 'loading';
this.where.limit = 2
this.where.page = ++this.where.page;
this.getGoods()
},
@ -547,7 +546,6 @@
this.street = res.data.address_component.street
// console.log(this.street)
uni.$emit('add',town+','+street_id)
}).catch(err => {
uni.showToast({

View File

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

View File

@ -11,7 +11,7 @@
</view>
<block v-for="(item,i) in goodsList" :key="i">
<view class="list_item flex_a_c">
<image class="goods_img" :src="item.image" mode="aspectFill"></image>
<image class="goods_img" :src="item.image" mode="aspectFit"></image>
<view class="r_box flex_a_c_j_sb">
<view class="message">
<view class="goodstitle">{{item.store_name}}</view>

View File

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

View File

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

View File

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

View File

@ -177,7 +177,7 @@
<navigator v-if="userInfo.uid != item.author.uid" hover-class="none"
:url="'/pages/plantGrass/plant_user/index?id='+item.uid" class="pictrue">
<image class="userAvatar" :src="item.author.avatar || '/static/images/f.png'"
mode="aspectFill">
mode="aspectFit">
</image>
<view v-if="!item.is_fans || userInfo.uid == 0" class="guanzhu"
@click.stop="followAuthor(item)"><text
@ -248,7 +248,7 @@
<!-- 3.阿里云视频截帧地址https://help.aliyun.com/document_detail/64555.html -->
<image v-if="item.isShowimage == true"
:src="item.src+'?x-oss-process=video/snapshot,t_'+ currenttimes +'000,f_jpg'"
mode="aspectFill"
mode="aspectFit"
:style="'width: 120upx; height: 160upx; border-radius: 10upx; position: absolute; bottom: '+ (ProgressBarBottom + 160) +'upx; left: '+ (currentPositions - 15) +'px;'">
</image>
</view>
@ -262,13 +262,13 @@
:style="'width: '+ windowWidth +'px; height: '+ boxStyle.height +'px;'">
<cell class="goods_item" style="margin-bottom: 10px;" v-for="(item,index) in cateGoods" :key="item.uid"
@click="gogogo(item)">
<image class="goods_img" :src="item.image[0]" mode="aspectFill"></image>
<image class="goods_img" :src="item.image[0]" mode="aspectFit"></image>
<view class="botm">
<text class="title">{{item.title}}</text>
<view class="goods_info">
<view class="l_info">
<image :src="(item.author && item.author.avatar) || '/static/images/f.png'"
mode="aspectFill" class="g_img"></image>
mode="aspectFit" class="g_img"></image>
<text class="g_name">{{item.author && item.author.nickname}}</text>
</view>
<view class="nice_box flex_a_c" @click.stop="giveStart(item)">
@ -314,7 +314,7 @@
<mentioned ref="mentioned" @close="closePopup" :list="moreList" :uid="authorUid"></mentioned>
</view>
</uni-popup>
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize>
<!-- <authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize> -->
<view class="fixed-head">
<view class="sys-head" :style="{height:statusBarHeight}"></view>
<view class="tool-bar" @click='goBack()'>
@ -501,7 +501,7 @@
this.wHeight = uni.getSystemInfoSync().screenHeight; //获取屏幕高度
this.boxStyle.height = this.wHeight; //改变视频高度
this.get() //这一步,加载视频数据
if (this.isLogin) this.getUserInfo()
// if (this.isLogin) this.getUserInfo()
},
onReady() {},
methods: {
@ -656,14 +656,14 @@
});
},
// // 授权回调
onLoadFun() {
this.isShowAuth = false
this.getUserInfo()
},
// onLoadFun() {
// this.isShowAuth = false
// this.getUserInfo()
// },
// 授权关闭
authColse: function(e) {
this.isShowAuth = e
},
// authColse: function(e) {
// this.isShowAuth = e
// },
moreTap(item) {
item.isMore = !item.isMore;
},

View File

@ -162,7 +162,7 @@
<navigator v-if="list.author && userInfo.uid != list.author.uid" hover-class="none"
:url="'/pages/plantGrass/plant_user/index?id='+list.uid" class="pictrue">
<image class="userAvatar"
:src="list.author&&list.author.avatar || '/static/images/f.png'" mode="aspectFill">
:src="list.author&&list.author.avatar || '/static/images/f.png'" mode="aspectFit">
</image>
<view v-if="!list.is_fans || !userInfo.uid" class="guanzhu"
@click.stop="followAuthor(list)"><text
@ -227,13 +227,13 @@
@scrolltolower="getGoods()">
<block v-for="(item,index) in cateGoods" :key="index">
<view class="goods_item" @click="gogogo(item)">
<image class="goods_img" :src="item.image[0]" mode="aspectFill"></image>
<image class="goods_img" :src="item.image[0]" mode="aspectFit"></image>
<view class="botm">
<view class="title">{{item.title}}</view>
<view class="goods_info flex_a_c">
<view class="l_info flex_a_c">
<image :src="(item.author && item.author.avatar) || '/static/images/f.png'"
mode="aspectFill" class="g_img"></image>
mode="aspectFit" class="g_img"></image>
<view class="g_name">{{item.author && item.author.nickname}}</view>
</view>
<view class="nice_box flex_a_c" @click.stop="giveStart(item)">

View File

@ -3,7 +3,7 @@
<view class="circle_friends_wrapper">
<view @click="selectLocation">
<view @click="selectLocation" v-if="isFshow">
<view class="site-box flex_a_c_j_sb" :style="{'background-color':backColor}">
<view :class="['place_wrapper','flex_a_c',isFshow?'sitebox':'']" >
@ -33,10 +33,10 @@
<navigator hover-class="none"
:url="`/pages/nongKe/supply_chain/supplier?type_id=10&street_id=${street_id}`">
<view class="list-m">
<image src="@/static/images/f6.png" mode="aspectFill"></image>
<image src="@/static/images/f6.png" mode="aspectFit"></image>
<view class="list-title">
<view class="list-titlea">
<image src="@/static/images/p9.png" mode="aspectFill"></image>
<image src="@/static/images/p9.png" mode="aspectFit"></image>
<view class="titlea-con">
<view class="titlea">september</view>
<view class="titleb">
@ -60,7 +60,7 @@
</view>
<view class="title-infoimg">
<image src="@/static/images/pj.png" mode=""></image>
<image src="@/static/images/pj.png" mode="aspectFit"></image>
</view>
</view>
</view>
@ -69,10 +69,10 @@
</navigator>
<view class="list-m" @click="go_shop">
<image src="@/static/images/f1.png" mode=""></image>
<image src="@/static/images/f1.png" mode="aspectFit"></image>
<view class="list-title">
<view class="list-titlea">
<image src="@/static/images/p8.png" mode="aspectFill"></image>
<image src="@/static/images/p8.png" mode="aspectFit"></image>
</view>
<view class="list-titleb">
<view class="titlea">
@ -88,7 +88,7 @@
点击查看
</view>
<view class="title-infoimg">
<image src="@/static/images/pj1.png" mode=""></image>
<image src="@/static/images/pj1.png" mode="aspectFit"></image>
</view>
</view>
</view>
@ -104,7 +104,7 @@
精选当地特色特产
</view>
</view>
<image src="@/static/images/f5.png" mode=""></image>
<image src="@/static/images/f5.png" mode="aspectFit"></image>
</view>
<view class="list-con-right">
<view class="con-right" style="margin-bottom: 20rpx;">
@ -116,7 +116,7 @@
美食线上一条街
</view>
</view>
<image src="@/static/images/f7.png" mode=""></image>
<image src="@/static/images/f7.png" mode="aspectFit"></image>
</view>
<view class="con-right">
<view class="list-con-title">
@ -127,13 +127,13 @@
热门景区当地文化
</view>
</view>
<image src="@/static/images/f2.png" mode=""></image>
<image src="@/static/images/f2.png" mode="aspectFit"></image>
</view>
</view>
</view>
<view class="list-bon">
<image src="@/static/images/f4.png" mode=""></image>
<image src="@/static/images/f4.png" mode="aspectFit"></image>
</view>
<view class="goodslist">
<WaterfallsFlow :wfList='cateGoods' />
@ -176,8 +176,7 @@
import {
getIndexData,
getDiy,
getArticleList,
getArticleCategoryLists
} from '@/api/api.js'
import {
@ -252,16 +251,16 @@
onPullDownRefresh() {
this.cateGoods = []
this.list()
// this.list()
this.Area()
uni.stopPullDownRefresh()
},
onLoad() {
this.getArticle()
this.Area()
this.setPermissions()
// this.openTongZhi()
uni.$on('connectstatusChange', (connectstatus) => {
@ -280,9 +279,9 @@
onReachBottom() {
if (this.status == 'nomore') return;
this.status = 'loading';
this.where.limit = 2
t
this.where.page = ++this.where.page;
this.list()
// this.list()
},
mounted() {
@ -291,15 +290,13 @@
window.addEventListener("scroll", this.scrolling);
// #endif
//
this.$nextTick(()=>{
this.$bus.$on('value-updated', (newValue) => {
//
this.street = newValue.split(',')[0]
this.town=newValue.split(',')[0]
this.street_id=newValue.split(',')[1]
});
})
if(this.street.length<=0){
@ -379,40 +376,7 @@
async getArticle() {
let list = []
const {
data
} = await getArticleCategoryLists()
data.map((item, index) => {
if (item.title !== '首页推荐') {
list.push(item)
} else {
getArticleList(item.article_category_id).then(res => {
this.recoList = res.data.list
})
}
})
this.tabsData1.list = list
this.getArticleList(list[0].article_category_id)
},
async getArticleList(id) {
let obj = {
is_home: 1
}
const {
data
} = await getArticleList(id)
this.articleList = data.list
},
article(item) {
uni.navigateTo({
url: '/pages/news_details/index?id=' + item.article_id
})
},
getCloudShopMerId(id) {
get_cloud_shop(id).then(res => {
res.data.length > 0 ? this.isYunCang = 1 : this.isYunCang = 0
@ -538,7 +502,7 @@
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.$emit('add',this.town+','+this.street_id)
uni.$emit('add',this.street+','+this.street_id)
// uni.setStorageSync('ADRESS_LOCATION',
// this.town + ',' + this.street_id)
// this.list()
@ -560,91 +524,8 @@
});
},
/**
* 设置手机通知权限
*/
setPermissions() {
// #ifdef APP-PLUS
if (plus.os.name == 'Android') { // Android
var main = plus.android.runtimeMainActivity();
var pkName = main.getPackageName();
var uid = main.getApplicationInfo().plusGetAttribute("uid");
var NotificationManagerCompat = plus.android.importClass(
"android.support.v4.app.NotificationManagerCompat");
//android.support.v4androidx
if (NotificationManagerCompat == null) {
NotificationManagerCompat = plus.android.importClass(
"androidx.core.app.NotificationManagerCompat");
}
var areNotificationsEnabled = NotificationManagerCompat.from(main).areNotificationsEnabled();
//
if (!areNotificationsEnabled) {
uni.showModal({
title: '通知权限开启提醒',
content: '您还没有开启通知权限,无法接受到消息通知,请前往设置!',
showCancel: false,
confirmText: '去设置',
success: function(res) {
if (res.confirm) {
var Intent = plus.android.importClass('android.content.Intent');
var Build = plus.android.importClass("android.os.Build");
//android 8.0
if (Build.VERSION.SDK_INT >= 26) {
var intent = new Intent(
'android.settings.APP_NOTIFICATION_SETTINGS');
intent.putExtra('android.provider.extra.APP_PACKAGE', pkName);
} else if (Build.VERSION.SDK_INT >= 21) { //android 5.0-7.0
var intent = new Intent(
'android.settings.APP_NOTIFICATION_SETTINGS');
intent.putExtra("app_package", pkName);
intent.putExtra("app_uid", uid);
} else { //(<21)--
intent.setAction(Settings.ACTION_APPLICATION_DETAILS_SETTINGS);
var uri = Uri.fromParts("package", mainActivity
.getPackageName(),
null);
intent.setData(uri);
}
//
main.startActivity(intent);
}
}
});
}
} else if (plus.os.name == 'iOS') { // ISO
var isOn = undefined;
var types = 0;
var app = plus.ios.invoke('UIApplication', 'sharedApplication');
var settings = plus.ios.invoke(app, 'currentUserNotificationSettings');
if (settings) {
types = settings.plusGetAttribute('types');
plus.ios.deleteObject(settings);
} else {
types = plus.ios.invoke(app, 'enabledRemoteNotificationTypes');
}
plus.ios.deleteObject(app);
isOn = (0 != types);
if (isOn == false) {
uni.showModal({
title: '通知权限开启提醒',
content: '您还没有开启通知权限,无法接受到消息通知,请前往设置!',
showCancel: false,
confirmText: '去设置',
success: function(res) {
if (res.confirm) {
var app = plus.ios.invoke('UIApplication', 'sharedApplication');
var setting = plus.ios.invoke('NSURL', 'URLWithString:',
'app-settings:');
plus.ios.invoke(app, 'openURL:', setting);
plus.ios.deleteObject(setting);
plus.ios.deleteObject(app);
}
}
});
}
}
// #endif
}
}
}
</script>
@ -881,10 +762,10 @@
.list-title {
display: flex;
position: absolute;
top: 0;
top: 20rpx;
.list-titlea {
margin-top: 10rpx;
margin-left: 14rpx;
width: 96rpx;
height: 117rpx;
@ -897,14 +778,14 @@
color: #F4F7FE;
.titlea {
margin-top: 10rpx;
margin-left: 8rpx;
font-size: 12rpx;
margin-top: 12rpx;
margin-left: 12rpx;
font-size: 16rpx;
font-family: PingFang SC-Semibold, PingFang SC;
}
.titleb {
margin-top: 18rpx;
margin-top: 6rpx;
font-size: 37rpx;
font-family: PingFang SC-Semibold, PingFang SC;
font-weight: 600;
@ -933,7 +814,7 @@
}
.titleb {
margin-top: 5rpx;
font-size: 33rpx;
font-family: PingFang SC-Medium, PingFang SC;
font-weight: 500;

View File

@ -56,7 +56,7 @@
</view> -->
</view>
<view class="totalfooter">
<view class='bnt b-color' v-if="!item.orderProduct[indexs]"
<view class='bnt b-color'
@click="importshop(item.order_id,item.orderProduct[indexs].product_id,item.orderProduct[indexs].product_sku)">
立即导入</view>
</view>

View File

@ -8,7 +8,7 @@
<text class="iconfont icon-sousuo"></text>
<input v-model="where.keyword" confirm-type="search" placeholder="请输入关键字" class="input" />
<view class="search_btn">
<image src="@/static/images/serchbtn.png" mode="aspectFill" @click="handleSearch">
<image src="@/static/images/serchbtn.png" mode="aspectFit" @click="handleSearch">
</image>
</view>

View File

@ -10,10 +10,10 @@
<view class='money'>{{userInfo.now_money || 0}}</view>
</view>
<!-- #ifdef APP-PLUS || H5 -->
<navigator v-if="recharge_switch == 1" url="/pages/users/user_payment/index" hover-class="none" class='recharge t-color'>充值</navigator>
<navigator url="/pages/users/user_payment/index" hover-class="none" class='recharge t-color'>充值</navigator>
<!-- #endif -->
<!-- #ifdef MP -->
<view v-if="recharge_switch == 1" @click="openSubscribe('/pages/users/user_payment/index')" class='recharge t-color'>充值</view>
<view @click="openSubscribe('/pages/users/user_payment/index')" class='recharge t-color'>充值</view>
<!-- #endif -->
</view>
<view class='cumulative acea-row row-top'>
@ -52,7 +52,7 @@
</navigator>
</view>
</view>
<recommend v-if="recommend_switch == 1" :hostProduct="hostProduct" :isLogin="isLogin"></recommend>
<recommend :hostProduct="hostProduct" :isLogin="isLogin"></recommend>
</view>
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize>
</view>