tianyi 4 weeks ago
parent
commit
b136b0b2bf
  1. 6
      pages/index/index.vue
  2. 50
      pages/shop/goodsList.vue
  3. 35
      pages/shop/shopEvaluate.vue

6
pages/index/index.vue

@ -125,14 +125,14 @@
商品管理
</view>
</view>
<view class="menu22" @tap="goDetail('dp')">
<!-- <view class="menu22" @tap="goDetail('dp')">
<view class="menu33">
<image src="../../static/image/dingdan/dd1.png" alt="" />
</view>
<view class="menu44">
店铺管理
</view>
</view>
</view> -->
<view class="menu22" @tap="changeIndex(1)">
<view class="menu33">
<image src="../../static/image/dingdan/dd2.png" alt="" />
@ -187,7 +187,7 @@
<uni-popup ref="areaPopup" background-color="#fff">
<view class="popup-area-content">
<view class="popup-area-title">
<text>请选择所属区域</text>
<text>请选择店铺</text>
</view>
<view class="popup-area-container" v-for="(item,index) in areaList" :key="index" @tap="onClickArea(item)">
<text style="display: inline-block">{{item.shop.shopName}}</text>

50
pages/shop/goodsList.vue

@ -6,7 +6,7 @@
<view class="back-btn" @tap="back">
<uni-icons type="left" size="28"></uni-icons>
</view>
<view class="title-search" @tap="goDetail('search')">
<view class="title-search">
<uni-icons type="search" size="18" style="margin: 9rpx;"></uni-icons>
<input type="text" placeholder="搜索" @input="search" />
</view>
@ -135,9 +135,23 @@
</view>
<view class="bottom-box">
<view class="bottom-btn" @tap="goDetail('goods')" style="background: rgba(0, 35, 28, 1);color: rgba(166, 255, 234, 1);">新增商品</view>
<view class="bottom-btn" @tap="goDetail('type')">新增分类</view>
<view class="bottom-btn" @tap="$refs.payDialog.open()">更多</view>
</view>
<u-loadmore :status="status" />
<!-- 弹出输入框 -->
<uni-popup ref="payDialog" background-color="#fff">
<view class="popup-pay-content">
<view class="popup-pay-title">
<text>请选择</text>
</view>
<view class="popup-pay-container" @tap="goDetail('type')">
<text style="display: inline-block">分类管理</text>
</view>
<view class="popup-pay-container" @tap="goDetail('attribute')">
<text style="display: inline-block">属性管理</text>
</view>
</view>
</uni-popup>
</view>
</template>
@ -313,8 +327,12 @@
let url=""
if(type == 'goods'){
url = '/pages/shop/addGoods?dataList='+ JSON.stringify(item)
}else{
}else if(type == 'type'){
url = '/pages/shop/addType'
}else if(type == 'attribute'){
url = '/pages/shop/attributeList'
}else{
}
uni.navigateTo({
url:url
@ -578,4 +596,30 @@
flex: 1;
padding-top: 14rpx;
}
.popup-pay-content {
align-items: center;
justify-content: center;
padding: 15px;
width: 500rpx;
height: auto;
background-color: #fff;
}
.popup-pay-title {
font-size: 36rpx;
font-weight: bold;
text-align: center;
position: relative;
}
.popup-pay-container {
margin-top: 20rpx;
height: 100rpx;
border-radius: 10px;
background: #088FEB;
line-height: 100rpx;
text-align: center;
border-bottom: 1px solid #eee;
border-top: 1px solid #eee;
color: #fff;
}
</style>

35
pages/shop/shopEvaluate.vue

@ -34,7 +34,8 @@
</view>
</view>
</view>
<view class="evaluate-list" v-for="(item,index) in shopComments" :key="index">
<scroll-view scroll-y @scrolltolower="onReachPage" style="width:100%;height: 600px;overflow: scroll;">
<view v-for="(item,index) in shopComments" :key="index">
<view class="eval-title">
<view class="eval-icon">
<img :src="item.createByIcon"
@ -53,7 +54,7 @@
<view style="display: flex;height: 50rpx;line-height: 50rpx;font-size: 24rpx;">
商品
<view style="padding: 12rpx 0 0 10rpx;">
<uni-rate v-model="item.score" size="12" />
<uni-rate :disabled="true" disabledColor="rgba(255, 184, 84, 1)" :value="item.score" size="12" />
</view>
</view>
<view class="eval-text">
@ -111,6 +112,9 @@
</view>
</view>
</view>
<view style="width: 100%;height: 100rpx;"></view>
</scroll-view>
</view>
<!-- 查看大图弹出层 -->
<uni-popup ref="imgPopup" background-color="#fff">
@ -132,7 +136,6 @@
isPintuan: true,
bigImg: '',
shopItem:{},
pageNum:1,
searchAll:true,
total:0,
shopComments:[],
@ -207,27 +210,37 @@
this.searchForm.shopId = id
that.NB.sendRequest("/app/comment/getCommentList", this.searchForm, false, 'post', 'application/json').then((res) => {
if (res.code == 200) {
if (that.pageNum == 1) {
if (that.searchForm.pageNum == 1) {
that.shopComments = res.result.records
} else {
that.shopComments = [...that.shopComments, ...res.result.records]
}
for(let i=0;i<that.shopComments.length;i++){
that.shopComments[i].isReply=false
if(that.shopComments[i].comments.length > 0){
for(let m=0;m<that.shopComments[i].comments.length;m++){
that.shopComments[i].comments[m].isOpen = false
}
}
}
that.total = res.result.pages; // pages =
that.$forceUpdate()
if(this.searchAll){
that.menuList[0].num = res.result.total
}
} else {
uni.showToast({
title: res.message,
icon:'none'
});
that.tui.toast(res.message,1000)
return
}
uni.hideLoading()
}).catch((res) => {})
},
onReachPage(){
console.log("11111")
if (this.searchForm.pageNum >= this.total) return;
this.searchForm.pageNum++;
this.getshopComments(this.shopItem.id);
},
submit(v){
let that = this;
let data = [{ //
@ -287,6 +300,8 @@
this.searchForm.picture = 0
this.searchForm.score = 1
}
this.searchForm.pageNum = 1
this.shopComments = []
this.getshopComments(this.shopItem.id)
},
pictureAdd() {
@ -463,10 +478,6 @@
flex: 1;
}
.evaluate-list {
margin-top: 40rpx;
}
.eval-title {
width: 100%;
height: 80rpx;

Loading…
Cancel
Save