yujialong 1 year ago
parent 0d1dd45c8b
commit bb753c0b02
  1. 4
      order/editCourse/editCourse.vue
  2. 4
      order/orderDetail/orderDetail.vue
  3. 21
      order/productDetail/productDetail.vue
  4. 54
      order/products/products.vue
  5. 18
      pages/index/index.vue

@ -240,9 +240,9 @@
}, },
// //
dealSettlePrice(row) { dealSettlePrice(row) {
// 0 // 0
console.log('dealSettlePrice=>', row, this.orderType) console.log('dealSettlePrice=>', row, this.orderType)
if (this.orderType == 2) { if (this.orderType != 1) {
row.settlementPrice = 0 row.settlementPrice = 0
row.serviceFee = 0 row.serviceFee = 0
} else { } else {

@ -478,8 +478,8 @@
// //
dealSettlePrice(row) { dealSettlePrice(row) {
console.log('row==>',row) console.log('row==>',row)
// 0 // 0
if (this.form.orderType == 2) { if (this.form.orderType != 1) {
row.settlementPrice = 0 row.settlementPrice = 0
row.serviceFee = 0 row.serviceFee = 0
} else { } else {

@ -48,9 +48,10 @@
</view> </view>
<view class="line"> <view class="line">
<text class="name">详情介绍</text> <text class="name">详情介绍</text>
<!-- <view class="val" v-html="form.mall.detailedIntroduction"></view> --> <!-- <view class="des-html" v-html="form.mall.detailedIntroduction"></view> -->
<!-- <mp-html class="val" :content="form.mall.detailedIntroduction"/> --> <mp-html class="des-html" :tag-style="mpStyle" :content="form.mall.detailedIntroduction"/>
<text class="val">{{ form.mall.detailedIntroduction }}</text> <!-- <rich-text class="des-html" :nodes="form.mall.detailedIntroduction"></rich-text> -->
<!-- <text class="val">{{ form.mall.detailedIntroduction }}</text> -->
</view> </view>
</view> </view>
</view> </view>
@ -138,6 +139,10 @@
color: '#fff', color: '#fff',
selectedBackgroundColor: 'rgba(83, 200, 249,0.9)', selectedBackgroundColor: 'rgba(83, 200, 249,0.9)',
selectedBorder: '1px rgba(83, 200, 249,0.9) solid' selectedBorder: '1px rgba(83, 200, 249,0.9) solid'
},
mpStyle: {
p: 'font-size: 26rpx !important;font-family: Microsoft Yahei !important;',
span: 'font-size: 26rpx !important;font-family: Microsoft Yahei !important;'
} }
} }
}, },
@ -164,7 +169,7 @@
detailsOfGoods(this.id).then(res => { detailsOfGoods(this.id).then(res => {
const e = res.orderDetails const e = res.orderDetails
e.mall.productIntroduction = this.$util.removeTag(e.mall.productIntroduction) e.mall.productIntroduction = this.$util.removeTag(e.mall.productIntroduction)
e.mall.detailedIntroduction = this.$util.removeTag(e.mall.detailedIntroduction) // e.mall.detailedIntroduction = this.$util.removeTag(e.mall.detailedIntroduction)
this.form = e this.form = e
const pics = this.form.mall.interfaceDiagram const pics = this.form.mall.interfaceDiagram
if (pics) { if (pics) {
@ -398,6 +403,14 @@
font-weight: 600; font-weight: 600;
white-space: nowrap; white-space: nowrap;
} }
.des-html {
width: 100%;;
font-size: 28rpx !important;
}
.rich-text-content span {
font-size: 28rpx;
color: #f00;
}
} }
.pic { .pic {
width: 100%; width: 100%;

@ -4,12 +4,17 @@
<uni-search-bar class="search" radius="30" placeholder="请输入产品名称" v-model="keyword" clearButton="auto" cancelButton="none" /> <uni-search-bar class="search" radius="30" placeholder="请输入产品名称" v-model="keyword" clearButton="auto" cancelButton="none" />
<uni-icons class="icon" custom-prefix="iconfont" type="icon-filter" size="22" color="#007eff" @click="popup = true"></uni-icons> <uni-icons class="icon" custom-prefix="iconfont" type="icon-filter" size="22" color="#007eff" @click="popup = true"></uni-icons>
</view> </view>
<ul class="tab">
<li v-for="(tab, i) in tabs" :class="{active: curTab === tab.id}" @click="tabChange(tab)"> <ul class="tab-wrap">
{{ tab.name }} <view class="tab">
<view v-if="i == 2" :class="['sort', {desc: sort == 2, asc: sort == 5}]"></view> <li :class="{active: curTab === ''}" @click="tabChange('')">全部</li>
</li> </view>
<scroll-view scroll-x :scroll-left="scrollLeft" class="tab tab-scroll">
<li v-for="(tab, i) in tabs" :key="i" :class="{active: curTab === tab.value}" @click="tabChange(tab.value)">{{ tab.title }}</li>
</scroll-view>
</ul> </ul>
<view class="tags"> <view class="tags">
<view v-if="categoryName" class="tag" @click="delCategory"> <view v-if="categoryName" class="tag" @click="delCategory">
{{ categoryName }} {{ categoryName }}
@ -119,21 +124,9 @@
tagId: '' tagId: ''
}, },
tagId: '', tagId: '',
curTab: 0, curTab: '',
tabs: [ tabs: [],
{ scrollLeft: 0,
name: '综合排序',
id: 0
},
{
name: '热销排行',
id: 1
},
{
name: '发布时间',
id: 2
}
],
reachBottom: 0, // 0->,1->,-1-> reachBottom: 0, // 0->,1->,-1->
status: 'more', // more|loading|noMore status: 'more', // more|loading|noMore
searchTimer: null, searchTimer: null,
@ -193,11 +186,12 @@
listOfGoods({ listOfGoods({
pageNum: this.page, pageNum: this.page,
pageSize: this.pageSize, pageSize: this.pageSize,
sort: this.curTab == 2 ? this.sort : this.curTab, sort: 0,
isShelves: 0, isShelves: 0,
hotTag: this.form.tagId ? 2 : 1, hotTag: this.form.tagId ? 2 : 1,
...this.form, ...this.form,
productName: this.keyword, productName: this.keyword,
productType: this.curTab
}).then(({ page }) => { }).then(({ page }) => {
// list // list
const list = page.records const list = page.records
@ -233,6 +227,7 @@
e.value = e.typeId e.value = e.typeId
e.title = e.typeName e.title = e.typeName
}) })
this.tabs = res.typeList
this.filters[0].data = res.typeList this.filters[0].data = res.typeList
}).catch(e => {}) }).catch(e => {})
@ -295,10 +290,7 @@
this.initList() this.initList()
}, },
// tab // tab
tabChange({ id }) { tabChange(id) {
this.sort = id == 2 ?
this.sort == 2 ? 5 : 2
: ''
this.curTab = id this.curTab = id
this.initList() this.initList()
}, },
@ -312,10 +304,14 @@
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.tab { .tab-wrap {
li { display: flex;
display: inline-flex; .tab-scroll {
align-items: center; width: calc(100% - 100rpx);
white-space: nowrap;
li {
display: inline-block;
}
} }
} }
.tags { .tags {

@ -5,7 +5,9 @@
<view class="page"> <view class="page">
<view class="search-wrap"> <view class="search-wrap">
<uni-search-bar class="search" radius="30" placeholder="请输入" v-model="keyword" clearButton="auto" cancelButton="none" @confirm="searchConfirm" /> <uni-search-bar class="search" radius="30" placeholder="请输入" v-model="keyword" clearButton="auto" cancelButton="none" @confirm="searchConfirm" />
<view class="all" @click="toProduct">全部产品</view> <view>
<button class="all" type="primary" @click.stop="toProduct">全部产品</button>
</view>
</view> </view>
<view class="block" style="margin-top: 0"> <view class="block" style="margin-top: 0">
@ -25,14 +27,16 @@
<view class="block"> <view class="block">
<view class="title-wrap"> <view class="title-wrap">
<view class="title">热销产品</view> <view class="title">热销产品</view>
<view class="all" @click="toProduct">全部产品</view> <view>
<button class="all" type="primary" @click.stop="toProduct">全部产品</button>
</view>
</view> </view>
<view class="list"> <view class="list">
<view v-for="(item, i) in hotProducts" :key="i" class="item" @click="toDetail(item)"> <view v-for="(item, i) in hotProducts" :key="i" class="item" @click="toDetail(item)">
<image class="pic" :src="$util.getIcon(item)"></image> <image class="pic" :src="$util.getIcon(item)"></image>
<view class="texts"> <view class="texts">
<view class="name ell">{{ item.productName }}</view> <view class="name ell">{{ item.productName }}</view>
<view class="des ell">{{ item.typeName }}</view> <view class="des ell">{{ item.tagsName }}</view>
<view class="meta">{{ item.marketUnitPrice }}/</view> <view class="meta">{{ item.marketUnitPrice }}/</view>
</view> </view>
</view> </view>
@ -43,14 +47,16 @@
<view class="block" style="margin-top: 40rpx"> <view class="block" style="margin-top: 40rpx">
<view class="title-wrap"> <view class="title-wrap">
<view class="title">官方推荐</view> <view class="title">官方推荐</view>
<view class="all" @click="toProduct">全部产品</view> <view>
<button class="all" type="primary" @click.stop="toProduct">全部产品</button>
</view>
</view> </view>
<view class="list"> <view class="list">
<view v-for="(item, i) in offcialProducts" :key="i" class="item" @click="toDetail(item)"> <view v-for="(item, i) in offcialProducts" :key="i" class="item" @click="toDetail(item)">
<image class="pic" :src="$util.getIcon(item)"></image> <image class="pic" :src="$util.getIcon(item)"></image>
<view class="texts"> <view class="texts">
<view class="name ell">{{ item.productName }}</view> <view class="name ell">{{ item.productName }}</view>
<view class="des ell">{{ item.typeName }}</view> <view class="des ell">{{ item.tagsName }}</view>
<view class="meta">{{ item.marketUnitPrice }}/</view> <view class="meta">{{ item.marketUnitPrice }}/</view>
</view> </view>
</view> </view>
@ -250,7 +256,7 @@
} }
.all { .all {
font-size: 24rpx; font-size: 24rpx;
color: #666; border-radius: 20px;
} }
.block { .block {
margin: 20rpx 0; margin: 20rpx 0;

Loading…
Cancel
Save