This commit is contained in:
weipengfei 2024-02-04 19:03:18 +08:00
parent afec5c706d
commit 3ca2637490
6 changed files with 141 additions and 73 deletions

View File

@ -12,8 +12,8 @@ let httpApiSix
let wsApi
// 在打包之前请检查当前环境是否正确
const env = 'dev'; // 开发
// const env = 'prod'; // 生产
// const env = 'dev'; // 开发
const env = 'prod'; // 生产
// const env = 'prew'; // 预上线
switch (env) {

View File

@ -2,8 +2,8 @@
"name" : "惠农生活",
"appid" : "__UNI__3A527D1",
"description" : "",
"versionName" : "1.8.6",
"versionCode" : 186,
"versionName" : "1.8.7",
"versionCode" : 187,
"transformPx" : false,
/* 5+App */
"app-plus" : {

View File

@ -1636,6 +1636,7 @@
"navigationBarTitleText": "预售列表"
// #ifdef MP || APP-PLUS
,
"navigationStyle": "custom",
"navigationBarBackgroundColor": "#F2F2F2"
// #endif
}

View File

@ -1,67 +1,58 @@
<template>
<view class="container" :style="viewColor">
<view class='flash-sale'>
<!-- #ifdef H5 -->
<view class="fixed-head">
<view class="sys-head" :style="{height:statusBarHeight}"></view>
<view class="tool-bar">
<view class='iconfont icon-xiangzuo' @tap='goBack'></view>
</view>
</view>
<!-- #endif -->
<view class='header'>
<image mode="widthFix" class="presellBg" :src="domain+'/static/diy/presell_title'+keyColor+'.png'" alt="">
<!-- <image mode="widthFix" class="presellBg" :src="domain+'/static/diy/presell_title'+keyColor+'.png'" alt=""> -->
<image mode="widthFix" class="presellBg" src="https://lihai001.oss-cn-chengdu.aliyuncs.com/public/uploads/home_img/nongzinongju_bg.webp" alt="">
</view>
<view class="main_count">
<view class="presellList acea-row row-between-wrapper">
<view class='timeList'>
<block v-for="(item,index) in timeList" :key='index'>
<view @tap='settimeList(item,index)' class='item' :class="active == index?'on':''">
<view class='time'><text>{{item}}</text></view>
</view>
</block>
</view>
</view>
<view class='list'>
<block v-for="(item,index) in presellList" :key='index'>
<view class='item acea-row row-between-wrapper' @tap='goDetails(item)'>
<view class='pictrue'>
<image :src='item.product.image'></image>
</view>
<view class='text acea-row row-column-around'>
<view class='text acea-row row-column-around' style="justify-content: space-between;display: flex;flex-direction: column;height: 100%;padding: 20rpx 0;">
<view class='name line1'>{{item.store_name}}</view>
<view class='booking'>
<text v-if="item.presell_type != 0 && active != 0" class="count" style="color: #BFBFBF;">已预定{{item.seles ? item.seles : 0}}{{item.product.unit_name}}</text>
<text v-else style="color: #999; font-size: 24rpx;">暂未开始</text>
</view>
<view v-if="item.coupon" class='coupon acea-row row-between-wrapper' style="margin-top: 14rpx;">
<view class='hide line1 acea-row'>
<view class='activity'>{{item.coupon.use_min_price}}{{item.coupon.coupon_price}}</view>
</view>
</view>
<view class="progress" :style="'background-image:url('+domain+'/static/diy/priceBg'+keyColor+'.png'">
<view class='presell_price'>
<text class="presell_text">预售价</text>
<text class="price">¥ <text>{{ item.price }}</text></text>
</view>
<view v-if="active != 0" class='order_btn'>{{ active === 1 ? '立即预定' : '已结束' }}</view>
<view v-else class="unStartBtn">
<text>开售时间</text>
<view>{{ new Date(item.start_time.replace(/-/g,"/")).getMonth()+1 }}
{{ new Date(item.start_time.replace(/-/g,"/")).getDate() }}
{{ new Date(item.start_time.replace(/-/g,"/")).getHours()<10?'0'+
new Date(item.start_time.replace(/-/g,"/")).getHours():new Date(item.start_time.replace(/-/g,"/")).getHours() || '00'}}:
{{ new Date(item.start_time.replace(/-/g,"/")).getMinutes()<10?"0" + new Date(item.start_time.replace(/-/g,"/")).getMinutes():
new Date(item.start_time.replace(/-/g,"/")).getMinutes() || '00'}}</view>
</view>
</view>
<view class="card_price">
<text class="card_small">¥</text>
<text>{{item.price}}</text>
</view>
<view class="card_bottom" >
<view class="card_left">
<view style="white-space: pre-wrap;" v-html="item.store_info"></view>
<!-- <view class="card_item">
<view>品牌:</view>
<view></view>
</view>
<view class="card_item">
<view>规格:</view>
<view>{{item.product.unit_name}}</view>
</view> -->
</view>
<view class="card_right" >立即采购</view>
</view>
</view>
</view>
</block>
</view>
</view>
</view>
<home></home>
<uni-popup ref="tipspopupRef">
<view class="popup_ref">
<image class="p_icon" src="https://lihai001.oss-cn-chengdu.aliyuncs.com/public/uploads/home_img/nongzinongju_expression.webp"></image>
<view class="p_item1">非常抱歉</view>
<view class="p_item2">供销农资春节期间暂停发货年后恢复购买~</view>
</view>
</uni-popup>
<!-- <home></home> -->
<!-- #ifndef H5 -->
<passwordPopup></passwordPopup>
<!-- #endif -->
@ -89,6 +80,7 @@
import { configMap } from "@/utils";
import { mapGetters } from "vuex";
import { HTTP_REQUEST_URL } from '@/config/app';
import { Toast } from '../../../libs/uniApi.js';
export default {
computed: configMap({statusBarHeight:0},mapGetters(['viewColor','keyColor'])),
components: {
@ -107,7 +99,7 @@
'正在进行',
'已结束'
],
active: 1,
active: 0,
type: 0,
scrollLeft: 0,
interval: 0,
@ -155,7 +147,7 @@
var data = {
page: that.page,
limit: that.limit,
type: that.active
// type: that.active
};
if (that.loadend) return;
if (that.pageloading) return;
@ -184,6 +176,7 @@
that.getPresellProductList();
},
goDetails(item) {
if(!item.type) return this.$refs.tipspopupRef.open(); // type
uni.navigateTo({
url: '/pages/activity/presell_details/index?id=' + item.product_presell_id
})
@ -201,7 +194,8 @@
<style lang="scss" scoped>
.container {
min-height: 100vh;
background-color: var(--view-theme);
// background-color: var(--view-theme);
background-color: #fd552a;
}
.noCommodity{
border-top: none;
@ -212,7 +206,8 @@
}
.flash-sale .main_count{
position: relative;
top: -150rpx;
// top: -150rpx;
top: -50rpx;
}
.flash-sale .header .presellBg {
width: 750rpx;
@ -311,7 +306,7 @@
margin-top: 24rpx;
}
.flash-sale .list .item {
height: 278rpx;
height: 238rpx;
position: relative;
width: 690rpx;
margin: 0 auto 20rpx auto;
@ -320,8 +315,8 @@
padding: 0 25rpx;
}
.flash-sale .list .item .pictrue {
width: 240rpx;
height: 240rpx;
width: 200rpx;
height: 200rpx;
border-radius: 10rpx;
}
.flash-sale .list .item .pictrue image {
@ -330,7 +325,7 @@
border-radius: 10rpx;
}
.flash-sale .list .item .text {
width: 380rpx;
width: 420rpx;
font-size: 30rpx;
color: #333;
}
@ -408,7 +403,7 @@
.fixed-head{
position: absolute;
left: 0;
top: 20px;
top: var(--status-bar-height);
width: 100%;
z-index: 10;
.icon-xiangzuo {
@ -418,4 +413,58 @@
color: #fff;
}
}
.card_price{
font-size: 32rpx;
color: #FF8056;
.card_small{
font-size: 26rpx;
}
}
.card_bottom{
display: flex;
justify-content: space-between;
.card_left{
font-size: 24rpx;
color: #616161;
// background-color: red;
width: 210rpx;
max-height: 140rpx;
}
.card_right{
background-color: #FF593C;
width: 160rpx;
height: 80rpx;
background: #FF593C;
box-shadow: 0rpx 4rpx 8rpx 0rpx #FF5435;
border-radius: 84rpx;
display: flex;
justify-content: center;
align-items: center;
color: #fff;
}
}
.popup_ref{
width: 583rpx;
height: 393rpx;
background: #f1f3f4;
border-radius: 30rpx 30rpx 30rpx 30rpx;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
color: #FF8056;
.p_icon{
width: 250rpx;
height: 140rpx;
}
.p_item1{
font-size: 30rpx;
padding: 30rpx 0;
}
.p_item2{
font-size: 28rpx;
width: 380rpx;
text-align: center;
}
}
</style>

View File

@ -49,13 +49,16 @@
@change="dchange">
</zbpSwiper> -->
<view class="home_list">
<view class="home_list" style="padding-bottom: 0;">
<image class="left" @click="go_shop" src="https://lihai001.oss-cn-chengdu.aliyuncs.com/public/uploads/home_img/home_yuncang.webp"></image>
<view class="right">
<image class="top" @click="navgo(`/pages/nongKe/supply_chain/supplierB?type_id=10,17&street_id=${street_id}&townName=${town}`)" src="https://lihai001.oss-cn-chengdu.aliyuncs.com/public/uploads/home_img/home_shichang.webp"></image>
<image class="bottom" @click="navgo('/pages/nongKe/specialty/index?type_code=PersonalStore&street_id='+street_id)" src="https://lihai001.oss-cn-chengdu.aliyuncs.com/public/uploads/home_img/home_my.webp"></image>
</view>
</view>
<view class="home_list">
<image class="bottom" style="width: 750rpx;" mode="widthFix" @click="navgo('/pages/activity/presell/index')" src="https://lihai001.oss-cn-chengdu.aliyuncs.com/public/uploads/home_img/nongzinongju_card.webp"></image>
</view>
<view class="home_recommend">
<image src="https://lihai001.oss-cn-chengdu.aliyuncs.com/public/uploads/home_img/home_tuijian.webp"></image>
</view>

View File

@ -113,6 +113,21 @@
</view>
</view>
</view>
<view class="item no-border">
<view class='acea-row row-middle'>
<text class="item-title" style="margin-right: 20rpx;">请上传营业执照</text>
<text class="item-desc">(图片格式支持JPGPNGJPEG)</text>
<view class="upload">
<view v-if="business_license" class='pictrue' @click='uploadpicText'>
<image :src='business_license'></image>
</view>
<view v-else class='pictrue acea-row row-center-wrapper row-column' @click='uploadpicText'>
<text class='iconfont icon-icon25201'></text>
<view>上传图片</view>
</view>
</view>
</view>
</view>
<!-- <view class="item no-border">
<checkbox-group @change='ChangeIsAgree'>
<checkbox class="checkbox" :checked="isAgree ? true : false" />已阅读并同意
@ -708,22 +723,22 @@ import { Toast } from '../../../libs/uniApi';
let that = this;
that.$util.uploadImageOne('upload/image', function(res) {
that.business_license = res.data.path;
uni.showLoading({
title: '识别中'
})
merchantLicenseIdentify({
image: res.data.path
}).then(res=>{
that.merchantData.address = res.data.address;
that.merchantData.user_name = res.data.legal_person;
that.merchantData.social_credit_code = res.data.register_number;
that.merchantData.company_name = res.data.name;
// that.$set('merchantData', that.merchantData);
uni.hideLoading();
}).catch((e)=>{
uni.hideLoading();
Toast(e)
})
// uni.showLoading({
// title: ''
// })
// merchantLicenseIdentify({
// image: res.data.path
// }).then(res=>{
// that.merchantData.address = res.data.address;
// that.merchantData.user_name = res.data.legal_person;
// that.merchantData.social_credit_code = res.data.register_number;
// that.merchantData.company_name = res.data.name;
// // that.$set('merchantData', that.merchantData);
// uni.hideLoading();
// }).catch((e)=>{
// uni.hideLoading();
// Toast(e)
// })
});
},
/**
@ -965,9 +980,9 @@ import { Toast } from '../../../libs/uniApi';
// if (that.isShowCode && !that.codeVal) return that.$util.Tips({
// title: ''
// });
// if (!that.business_license) return that.$util.Tips({
// title: ''
// });
if (!that.business_license) return that.$util.Tips({
title: '请上传营业执照'
});
// if (that.pics.length == 0) return that.$util.Tips({
// title: ''
// });