文章详情代码更新 、首页、商品

This commit is contained in:
jia 2023-09-12 21:50:32 +08:00
parent 448fa85d2b
commit c0157be09f
8 changed files with 309 additions and 79 deletions

View File

@ -9,7 +9,7 @@ let httpApiThree
// 网络接口修改此字符 小程序域名要求https
// let httpApi = 'http://192.168.31.110:8324' // 测试
if (process.env.NODE_ENV === "development") {
httpApi = 'https://shop.lihaink.cn' // 生产
httpApi = 'https://shop.lihaink.cn' // 生产
// httpApi = "https://crmeb-test.shop.lihaink.cn"
// httpApi = "http://192.168.0.222"
// httpApi = "http://192.168.0.108:8325"
@ -24,8 +24,8 @@ if (process.env.NODE_ENV === "development") {
// httpApiThree = 'baseUrlTest' // h5跨域配置
// #endif
} else if (process.env.NODE_ENV === 'production') {
// httpApi = 'https://shop.lihaink.cn' // 生产
httpApi = "https://crmeb-test.shop.lihaink.cn"
httpApi = 'https://shop.lihaink.cn' // 生产
// httpApi = "https://crmeb-test.shop.lihaink.cn"
httpApiTwo = 'https://nk.lihaink.cn' // 生产
httpApiThree = 'http://ceshi-oa.lihaink.cn' //生产
}

View File

@ -1223,7 +1223,9 @@
"pages": [{
"path": "plant_detail/index",
"style": {
"navigationBarTitleText": "内容详情"
"navigationBarTitleText": "内容详情",
"navigationStyle": "custom",
"enablePullDownRefresh": false
}
},
{

View File

@ -4,7 +4,7 @@
<view class="search">
<view class="search-content acea-row row-middle">
<text class="iconfont icon-sousuo"></text>
<input v-model="where.store_name" confirm-type="search" placeholder="请输收货人手机号或退款订单号搜索" class="input"
<input v-model="where.search_info" confirm-type="search" placeholder="请输收货人手机号或订单号搜索" class="input"
@confirm="handleSearch" />
</view>
</view>
@ -261,7 +261,7 @@
page: 1,
limit: 10,
status: 1,
store_name: '',
search_info: '',
product_type: ''
},
list: [],
@ -284,9 +284,7 @@
that.init();
}
},
types: function() {
this.getIndex();
}
},
onLoad(option) {
this.where.product_type = uni.getStorageSync("PRODUCT_TYPE") ?? ""
@ -324,12 +322,13 @@
},
handleSearch() {
this.loaded = false;
this.where.page = 3;
this.list = [];
this.where.page = 1;
this.list = [];
this.getIndex();
},
//
getIndex() {
let that = this;
if (that.loading || that.loaded) return;
that.loading = true;
@ -355,7 +354,7 @@
that.loaded = res.data.list.length < that.where.limit;
that.list.push.apply(that.list, res.data.list);
that.where.page = that.where.page + 1;
console.log(that.list)
// console.log(that.list)
// console.log(that.list);
},
@ -381,10 +380,12 @@
if (val != 'verify') {
if (this.where.status != val) {
this.where.status = val;
this.where.search_info=''
delete this.where.is_verify;
this.init();
}
} else {
this.where.search_info=''
this.where.is_verify = 1;
delete this.where.status;
this.init();

View File

@ -1,11 +1,10 @@
<template>
<view :style="viewColor">
<!-- #ifdef H5 -->
<view class="head-menu">
<view class='iconfont icon-xiangzuo' @click="returns"></view>
</view>
<!-- #endif -->
<view v-if="followDetail != null && followDetail" class="main" @click.stop="showManage = false">
<view v-if="followDetail != null && followDetail" class="main" @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">
@ -24,22 +23,28 @@
</view>
</view>
<view class="tab-cont">
<view class="follow_count">
<view class="list_count">
<view v-if="followDetail.author" class="title">
<view class="head-menu">
<image src="@/static/images/right.png" mode="aspectFill" @click="returns"></image>
</view>
<view class="author">
<navigator hover-class="none"
:url="'/pages/plantGrass/plant_user/index?id='+followDetail.uid">
<image class="picture" :src="followDetail.author.avatar || '/static/images/f.png'"
mode="aspectFit"></image>
</navigator>
<view class="name acea-row">
<view class="name acea-row" style="width: 300rpx;">
<text>{{followDetail.author.nickname}}</text>
<image v-if="followDetail.author.member" class="level_icon"
:src="followDetail.author.member.brokerage_icon" alt="">
</view>
</view>
<view class="author">
<view class="author" style="margin-left: 50rpx;">
<view class="manageCount" v-if="followDetail.is_author">
<view class="follow_btn" @click.stop="showManage=!showManage">管理</view>
<view class="manage" v-show="showManage">
@ -59,23 +64,32 @@
<view v-if="!followDetail.is_fans" class="follow_btn focus"><text
class="iconfont icon-jiahao2"></text>关注</view>
<view v-else class="follow_btn focused">已关注</view>
</view>
<!-- #ifdef MP -->
<button v-if="followDetail.status == 1" class="time iconfont icon-fenxiang2"
open-type="share" hover-class='none'></button>
<!-- #endif -->
<!-- #ifdef APP-PLUS -->
<button v-if="followDetail.status == 1"
<view class="fenxa" v-if="followDetail.status == 1"
@click="appShare('WXSceneSession',followDetail.community_id)">
<image src="@/static/images/fx.png" mode=""></image>
</view>
<!-- <button v-if="followDetail.status == 1"
@click="appShare('WXSceneSession',followDetail.community_id)"
class="time iconfont icon-fenxiang2" hover-class='none'></button>
class="time iconfont icon-fenxiang2" hover-class='none'></button> -->
<!-- #endif -->
</view>
</view>
<view class="product">
<productConSwiper :imgUrls="followDetail.image"></productConSwiper>
</view>
<view class="pro_describle">
<view class="mentioned" v-if="followDetail.relevance.length"
<!--<view class="mentioned" v-if="followDetail.relevance.length"
@click="openMore(followDetail)">
<text class="title">查看TA提到的宝贝({{followDetail.relevance.length}})</text>
<view class="product_more">
@ -86,21 +100,20 @@
</view>
<text class="iconfont icon-gengduo3"></text>
</view>
</view>
<!-- <view class="product">
</view> -->
<view class="product">
<scroll-view class="scroll-view" scroll-x="true"
style="white-space: nowrap; display: flex;" scroll-with-animation
show-scrollbar="true">
<view class="product-item" v-for="(goods,idx) in in followDetail.relevance" :key="idx">
<view v-if="goods.spu" class="item-count acea-row"
@click="goDetail(goods.spu)">
<view class="product-item" v-for="(goods,idx) in followDetail.relevance" :key="idx"
@click="shopdetail(goods)">
<view v-if="goods.spu" class="item-count acea-row">
<view class="picture">
<image class="image" :src="goods.spu.image"></image>
</view>
<view class="product-text" >
<view class="product-text">
<text class="name line1"
v-if="goods.spu && goods.spu.store_name.length>=12">{{goods.spu.store_name.slice(0,12)}}...</text>
<text class="name line1"
@ -109,13 +122,13 @@
<view class="price"><text class="sm">¥</text><text
class="money">{{goods.spu.price}}</text>
</view>
<text class="buy-btn">购买</text>
<!-- <text class="buy-btn">购买</text> -->
</view>
</view>
</view>
</view>
</scroll-view>
</view> -->
</view>
<view class="product_info">
<text class="text">
{{followDetail.content}}
@ -188,7 +201,8 @@
<image src="/static/images/no_commen.png"></image>
<text>暂无评论快去抢沙发吧~</text>
</view>
<view v-if="followDetail.status == 1" 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"
@ -196,6 +210,7 @@
:focus="focus" @confirm.stop="submitComment()" cursorSpacing={20}>
</form>
</view>
<view v-if="content">
<button class="send" @click.stop="submitComment">发送</button>
</view>
@ -205,15 +220,42 @@
:class="followDetail.relevance_id ? 'icon-shoucang1' : 'icon-dianzan'"></text>
<text>{{followDetail.count_start}}</text>
</view>
<view class="item acea-row">
<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 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)
</view>
</view>
<view class="input_bar acea-row">
<view class="item acea-row">
<text class="iconfont"
:class="followDetail.relevance_id ? 'icon-shoucang1' : 'icon-dianzan'"></text>
<text>{{followDetail.count_start}}</text>
</view>
<view class="item acea-row" @click="FToggle">
<text class="iconfont icon-pinglun"></text>
<text>{{replyData.all}}</text>
</view>
</view>
</view>
</view>
</view>
</view>
<view v-if="(!followDetail || followDetail == null) && !loadData" class="no_content">
<view class="count">
<image src="../static/images/no_content.png"></image>
@ -230,6 +272,17 @@
<uni-popup ref="bindmobile" type="bottom">
<bindmobile @close="close"></bindmobile>
</uni-popup>
<uni-popup ref="bindmobile1" type="bottom">
<view class="" style="background-color: #fff;height: 154rpx ;">
<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}>
</form>
</view>
</view>
</uni-popup>
</view>
</template>
@ -309,7 +362,8 @@
currSpid: '',
focus: false,
actionSheetHidden: true,
type: 0
type: 0,
isshow: false
}
},
created() {},
@ -337,6 +391,17 @@
},
mounted: function() {},
methods: {
shopdetail(item) {
// console.log(item)
uni.navigateTo({
url: '/pages/goods_details/index?id=' + item.spu.product_id
})
},
FToggle() {
this.$refs.bindmobile1.open()
},
// 退
returns() {
uni.navigateBack()
@ -449,6 +514,7 @@
that.followDetail.relevance = that.followDetail.relevance.filter(item => {
return item.spu
})
uni.hideLoading()
// #ifdef MP
that.plantShare();
@ -665,10 +731,16 @@
}
.head-menu {
height: 50rpx;
padding-left: 20rpx;
line-height: 50rpx;
font-weight: bold;
width: 51rpx;
height: 51rpx;
margin-right: 20rpx;
margin-top: 20rpx;
image {
width: 100%;
height: 100%;
}
}
.tab-cont {
@ -725,20 +797,128 @@
}
}
.product {
flex-direction: row;
margin-top: 27rpx;
.scroll-view {
flex-direction: row;
}
.product-item {
display: inline-block;
width: 444rpx;
height: 136rpx;
// background: rgba(0, 0, 0, .55);
background-color: #F4F4F4;
border-radius: 12rpx;
padding: 16rpx 15rpx;
margin-right: 30rpx;
}
.swiper {
width: 500rpx !important;
height: 136rpx !important;
.swiper-count {
width: 444rpx !important;
height: 136rpx !important;
background: rgba(0, 0, 0, .55);
border-radius: 12rpx;
padding: 16rpx 15rpx;
}
.swiper-item {
flex-direction: row;
}
}
.item-count {
flex-direction: row;
justify-content: space-between;
.picture {
width: 104rpx;
height: 104rpx;
border-radius: 10rpx;
.image {
width: 104rpx;
height: 104rpx;
border-radius: 10rpx;
}
}
.product-text {
width: 286rpx;
justify-content: space-between;
.name {
font-size: 24rpx;
width: 286rpx;
// color: #fff;
color: #000;
}
.product-price {
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
.price {
display: flex;
flex-direction: row;
.sm,
.money {
// color: #ffffff;
color: #000;
font-size: 24rpx;
}
}
.buy-btn {
padding: 6rpx 20rpx;
display: flex;
align-items: center;
justify-content: center;
color: #fff;
border-radius: 26rpx;
background: #E93323;
font-size: 20rpx;
}
}
}
}
}
.follow_count {
padding: 20rpx;
border-bottom: 1px solid #F5F5F5;
.title {
display: flex;
align-items: center;
justify-content: space-between;
}
.author {
display: flex;
align-items: center;
.fenxa {
width: 51rpx;
height: 51rpx;
image {
width: 100%;
height: 100%;
}
}
.picture,
uni-image {
width: 78rpx;
@ -958,6 +1138,7 @@
position: relative;
padding-bottom: 120rpx;
.commen_count {
font-size: 26rpx;
color: #282828;
@ -1099,11 +1280,28 @@
font-size: 32rpx;
}
}
.input_count1{
height: 70rpx;
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;
@ -1111,6 +1309,7 @@
z-index: 10;
border-top: 1px solid #F5F5F5;
justify-content: space-between;
padding-bottom: var(--status-bar-height);
.input_count {
width: 530rpx;
@ -1146,6 +1345,37 @@
}
}
.shopp {
width: 209rpx;
height: 70rpx;
line-height: 70rpx;
background: linear-gradient(90deg, #F84221 0%, #FF6D20 100%);
border-radius: 33px 33px 33px 33px;
opacity: 1;
display: flex;
.shopp-img {
width: 46rpx;
height: 46rpx;
margin-top: 12rpx;
margin-left: 25rpx;
margin-right: 11rpx;
image {
width: 100%;
height: 100%;
}
}
.shopp-txt {
font-size: 26rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
color: #FFFFFF;
}
}
.send {
font-size: 26rpx;
color: #ffffff;

View File

@ -162,7 +162,7 @@
<checkbox-group class="select_group flex_start" @change="deliveryWayChange">
<label class="radio_select" v-for="(val, i) in deliveryFreeList" :key="val.value">
<view>
<checkbox :value="val.value" disabled :checked="setFormData.delivery_way.includes(val.value)" />
<checkbox :value="val.value" disabled :checked="val.value" />
</view>
<view>{{ val.name }}</view>
</label>
@ -407,7 +407,7 @@
this.bar_code_dis = true
}
this.initData();
this.getDeliveryType();
// this.getDeliveryType();
if (this.product_id) {
this.initDataEditData();
}

View File

@ -284,7 +284,7 @@
merchantInfoAPI({
id
}).then(res => {
console.log(res);
this.mer_name= res.data.mer_name
this.images[0].img = res.data.mer_banner
this.images[1].img = res.data.mer_avatar
this.images[2].img = res.data.mini_banner
@ -305,7 +305,7 @@
this.mer_take_time = res.data.mer_take_time
this.intro = res.data.mer_info
this.cruxText = res.data.mer_keyword
this.mer_name= res.data.mer_name
this.servicePhone = res.data.service_phone
this.mer_address = res.data.mer_address
this.merState = res.data.mer_state === 1 ? true : false

View File

@ -73,9 +73,9 @@
</div>
</view>
<view class="wrapper">
<view class='product_list acea-row row-between-wrapper' >
<block v-for="(item,index) in productList" :key="index" >
<view class='item'>
<view class='product_list' >
<view v-for="(item,index) in productList" :key="index" style="position: relative;width: 100%;" >
<view class='item' @click="yinc">
<view class='image'>
<image :src='item.image'></image>
<text v-if="item.spec_type == 1" class="spec">多规格</text>
@ -95,34 +95,36 @@
<text class='ot_price'>{{item.ot_price}}</text>
</view>
</view>
<view style="position: absolute; top: 10px; right: 10px;">
<!-- 插件无需手动引入直接使用即可 -->
<!-- 里面···可以改为任意东西图片也可以 -->
<!-- 参数$event不可修改否则取不到点击事件详情 -->
<!-- <rudon-rowMenuDotDotDot :localdata="options"
@change="menuAction($event, item.attrValue,item)">
. . .
</rudon-rowMenuDotDotDot> -->
<view class="" style='font-size: 30rpx;text-align: right;position: absolute; top: 0px; right: 10px;'
@click="menuActiona(item,index)">
...
</view>
<view class="muau-header" v-if='index==num' style="position: absolute; top: 40rpx; right: 0px;">
<view class="muau" v-for='(kk,i) in options'
@click='menuAction(kk, item.attrValue,item,index)'>
<view class="">
{{kk.text}}
</view>
</view>
<view style="position: absolute; top: 10px; right: 10px;">
<!-- 插件无需手动引入直接使用即可 -->
<!-- 里面···可以改为任意东西图片也可以 -->
<!-- 参数$event不可修改否则取不到点击事件详情 -->
<!-- <rudon-rowMenuDotDotDot :localdata="options"
@change="menuAction($event, item.attrValue,item)">
. . .
</rudon-rowMenuDotDotDot> -->
<view class="" style='font-size: 30rpx;text-align: right;position: absolute; top: 0px; right: 10px;z-index: 999;"'
@click="menuActiona(item,index)">
<image src="@/static/images/dian.png" mode="aspectFill" style="width: 30rpx;height: 30rpx;
margin-top: 40rpx;"></image>
</view>
<view class="muau-header" v-if='index==num' style="position: absolute; top: 40rpx; right: 0px;">
<view class="muau" v-for='(kk,i) in options'
@click='menuAction(kk, item.attrValue,item,index)'>
<view class="">
{{kk.text}}
</view>
</view>
</view>
</view>
<view class="operation acea-row row-between-wrapper">
<view class="acea-row row-middle">
<view class="" class="bnt" @click="Fonline(item)" style="width:150rpx">
<!-- <view class="" class="bnt" @click="Fonline(item)" style="width:150rpx">
线上入库
</view>
</view> -->
<view class="" class="bnt" @click="Fline(item)" style="width:150rpx">
线下入库
</view>
@ -142,7 +144,7 @@
</view>
</view>
</block>
</view>
</view>
</view>
<Loading :loaded="loaded" :loading="loading"></Loading>
@ -309,15 +311,10 @@
},
yinc() {
console.log('1111111')
this.$set(this, 'num', -1);
},
menuAction(action, rowId, item, index) {
// console.log(action, rowId, item,'1111111')
if (action.value == 2) {
uni.navigateTo({
url: `/pages/admin/goods_details/index?product_id=${item.product_id}&product_type=0`

View File

@ -1767,7 +1767,7 @@
margin-top: 27rpx;
.product-item {
display: inline-block;
display: inline-block;
width: 444rpx;
height: 136rpx;
background: rgba(0, 0, 0, .55);