chenkainan 5 months ago
parent
commit
3b89827c23
  1. 6
      components/cartData.vue
  2. 14
      pages/index/index.vue
  3. 25
      subPackages/letter/detail.vue
  4. 32
      subPackages/letter/index.vue
  5. 7
      subPackages/techan/detail.vue
  6. 27
      subPackages/techan/index.vue
  7. 4
      subPackages/techan/order.vue

6
components/cartData.vue

@ -8,12 +8,12 @@
<view class="select-area flex flex-items-center" @click.stop="selectAllGoods">
<view class="select-cycle" v-show="!selectAll"></view>
<view class="select-cycle selected" v-show="selectAll">
<image :src="showImg('/uploads/20241104/3d903e0c2788104b57b4ce5e07ea1de1.png')">
<image :src="showImg('/uploads/20250513/515c0699b759568421d6419fbb9befb7.png')">
</view>
<view style="padding-left: 26rpx;" >全选</view>
</view>
<view class="delete-area flex flex-items-center" @click.stop="clearAllGoods">
<image :src="showImg('/uploads/20241104/50900c9a5fa5fbdbdee526abc9af4a40.png')"></image>
<image :src="showImg('/uploads/20250513/a98a9f06410e6a8d3c9d398cd4b7e9f0.png')"></image>
<view style="padding-left: 8rpx;" >清空</view>
</view>
</view>
@ -23,7 +23,7 @@
<view class="flex flex-items-center" @tap.stop="setItemSelect(item)">
<view class="select-cycle" v-show="!item.isSelected"></view>
<view class="select-cycle selected" v-show="item.isSelected">
<image :src="showImg('/uploads/20241104/3d903e0c2788104b57b4ce5e07ea1de1.png')">
<image :src="showImg('/uploads/20250513/515c0699b759568421d6419fbb9befb7.png')">
</view>
<view style="padding-left: 26rpx;flex:1">
<view class="commodity box" >

14
pages/index/index.vue

@ -20,7 +20,7 @@
<!-- 金刚区 -->
<view class="menu-box flex-between">
<view class="menu-left flex-around">
<view class="" v-for="(item,index) in menuList" :key="index">
<view class="" v-for="(item,index) in menuList" :key="index" @click="gotoPath(item.path)">
<image :src="`https://static.ticket.sz-trip.com/cgc/images/index/${index + 1}.png`" class="topImg" mode="heightFix"></image>
<image :src="`https://static.ticket.sz-trip.com/cgc/images/index/${index + 1}s.png`" class="titleImg" mode="heightFix"></image>
</view>
@ -88,22 +88,22 @@
smallBanner: [],
menuList: [
{
path: ''
path: '/subPackages/techan/index?idIndex=0'
},
{
path: ''
path: '/subPackages/techan/index?idIndex=1'
},
{
path: ''
path: '/subPackages/techan/index?idIndex=2'
},
{
path: ''
path: '/subPackages/techan/index?idIndex=3'
},
{
path: ''
path: '/subPackages/techan/index?idIndex=4'
},
{
path: ''
path: '/subPackages/techan/index?idIndex=5'
}
],
handwrittenList: [],

25
subPackages/letter/detail.vue

@ -14,14 +14,15 @@
<view class="title text-overflowRows">{{detail.title}}</view>
<view class="flex-between">
<view class="name">
<image src="https://static.ticket.sz-trip.com/tongli/images/index/noveltyUser.png" mode=""></image>
<image src="https://static.ticket.sz-trip.com/tongli/images/index/user.png" mode=""></image>
{{detail.author}}
</view>
<view class="other-info">
<image src="https://static.ticket.sz-trip.com/tongli/images/index/eye.png" mode=""></image>
<text style="padding-right: 36rpx;">{{detail.view}}</text>
<image src="https://static.ticket.sz-trip.com/tongli/images/index/eye.png" mode=""></image>
{{detail.view}}
<image @click="likeAricle(detail)" v-if="detail.is_like" :src="showImg('/uploads/20250513/00b5680ca4b62479a59b40786979e3e2.png')" mode=""></image>
<image @click="likeAricle(detail)" v-else :src="showImg('/uploads/20250513/99e8d59b9692ae73b3204a6cec79611b.png')" mode=""></image>
<text style="padding-right: 36rpx;">{{handleNum(detail.star)}}</text>
<image :src="showImg('/uploads/20250513/71acef9a784095e9ba17c88580506705.png')" mode=""></image>
{{handleNum(detail.view)}}
</view>
</view>
@ -46,7 +47,19 @@
}
this.detail = res.data;
});
},
methods: {
likeAricle (item) {
},
handleNum (num) {
if (num<=0) { return 0 }
if (num>=1000) {
return (num/1000).toFixed(1)+'k'
}
return num
},
},
}
</script>
@ -97,7 +110,7 @@
image {
width: 48rpx;
height: 48rpx;
border-radius: 50%;
// border-radius: 50%;
margin-right: 12rpx;
}
}

32
subPackages/letter/index.vue

@ -7,17 +7,18 @@
<image class="img" :src="showImg(item.image)" mode="aspectFill"></image>
<view class="content flex-column">
<view class="title text-overflowRows">{{item.title}}</view>
<view class="text-overflow" style="font-size: 24rpx;color: #848484;">{{item.title}}</view>
<view class="text-overflow" style="font-size: 24rpx;color: #848484;">{{item.subtitle}}</view>
<view class="subtitle flex-between">
<view style="color: #000000;">
<image src="https://static.ticket.sz-trip.com/tongli/images/index/user.png" mode=""></image>
<image style="width: 48rpx;height:48rpx" src="https://static.ticket.sz-trip.com/tongli/images/index/user.png" mode=""></image>
{{item.author}}
</view>
<view>
<image src="https://static.ticket.sz-trip.com/tongli/images/index/eye.png" mode=""></image>
<text style="padding-right: 36rpx;">{{item.view}}</text>
<image src="https://static.ticket.sz-trip.com/tongli/images/index/eye.png" mode=""></image>
{{item.view}}
<image @click="likeAricle(item)" v-if="item.is_like" :src="showImg('/uploads/20250513/00b5680ca4b62479a59b40786979e3e2.png')" mode=""></image>
<image @click="likeAricle(item)" v-else :src="showImg('/uploads/20250513/99e8d59b9692ae73b3204a6cec79611b.png')" mode=""></image>
<text style="padding-right: 36rpx;">{{handleNum(item.star)}}</text>
<image :src="showImg('/uploads/20250513/71acef9a784095e9ba17c88580506705.png')" mode=""></image>
{{handleNum(item.view)}}
</view>
</view>
</view>
@ -33,18 +34,18 @@
return {
list: [],
finished: false,
headImg: ''
headImg: 'https://cgc.js-dyyj.com/uploads/20250513/b9f5f5b2b90d8df29247c6aa4f452eaa.png'
}
},
onReady() {
this.getHeadImg('shuhui').then(res => {this.headImg = res})
// this.getHeadImg('shuhui').then(res => {this.headImg = res})
this.getArticleByType()
},
methods: {
//
getArticleByType() {
this.Post({
type_id: 46,
type_id: 1,
offset: this.list.length,
limit: 10
},'/api/Article/getArticleByType').then(res => {
@ -53,11 +54,16 @@
}
this.list = [...this.list, ...res.data]
})
},
likeAricle (item) {
},
handleNum (num) {
if (num<=0) { return 0 }
if (num>=1000) {
return (num/1000).toFixed(1)+'k'
}
return num
},
},
//
@ -83,7 +89,7 @@
}
.article-container{
margin-top: -15rpx;
margin-top: -22rpx;
width: 100%;
background: #FFFFFF;
border-radius: 24rpx ;
@ -123,10 +129,10 @@
color: #848484;
image {
width: 26rpx;
height: 26rpx;
width: 32rpx;
height: 32rpx;
margin-right: 6rpx;
vertical-align: text-bottom;
vertical-align: middle;
}
}
}

7
subPackages/techan/detail.vue

@ -64,13 +64,11 @@
<view class="img-box" slot="content">
<uni-badge class="uni-badge-left-margin" :text="paramData.num" absolute="rightTop" :offset="[5, 5]" size="small"
:custom-style="{background:'#D90F01',color:'#ffffff',border:'1px solid #ffffff'}">
<image @click.stop="showCartClick" :src="showImg('/uploads/20241104/88b88bf627a63dd000afe769d1392fb4.png')" mode="aspectFill"
<image @click.stop="showCartClick" :src="showImg('/uploads/20250513/29fd015f8c779f08e53d1016d3643c58.png')" mode="aspectFill"
style="width: 60rpx;height: 50rpx;"></image>
</uni-badge>
<text class="text">购物车</text>
</view>
</view>
<view class="btn-post">
<view class="left-btn-buy" @click="openPop(true)">加入购物车</view>
@ -83,8 +81,7 @@
<view class="left-box">
<view class="img-box" slot="content">
<uni-badge class="uni-badge-left-margin" :text="paramData.num" absolute="rightTop" :offset="[5, 5]" size="small"
:custom-style="{background:'#D90F01',color:'#ffffff',border:'1px solid #ffffff'}">
<image @click.stop="showCartClick" :src="showImg('/uploads/20241104/88b88bf627a63dd000afe769d1392fb4.png')" mode="aspectFill"
:custom-style="{background:'#D90F01',color:'#ffffff',border:'1px solid #ffffff'}"29fd015f8c779f08e53d1016d3643c58wCartClick" :src="showImg('/uploads/20250513/cc33cde475ce45c274cb304e20805aa1.png')" mode="aspectFill"
style="width: 60rpx;height: 50rpx;"></image>
</uni-badge>
<text class="text">购物车</text>

27
subPackages/techan/index.vue

@ -18,7 +18,7 @@
<scroll-view class="left-container no-scrollbar" :scroll-y="true">
<view :class="['type-item',typeIndex==i?'active':'']"
v-for="(item,i) in typeParam" :key="i" @click="changeType(item,i)">
| WEI
{{item.title}}
<view class="active-type-bar" v-if="typeIndex==i"></view>
</view>
<view style="height: 148rpx;width: 1rpx;"></view>
@ -101,7 +101,7 @@
<uni-badge class="uni-badge-left-margin" :text="paramData.num" absolute="rightTop" :offset="[5, 5]" size="small"
:custom-style="{background:'#D90F01',color:'#ffffff',border:'1px solid #ffffff'}">
<view class="img-box" @click.stop="showCartClick">
<image :src="showImg('/uploads/20241104/88b88bf627a63dd000afe769d1392fb4.png')" mode="aspectFill"></image>
<image :src="showImg('/uploads/20250513/cc33cde475ce45c274cb304e20805aa1.png')" mode="aspectFill"></image>
</view>
</uni-badge>
<view class="bottom-price">
@ -184,14 +184,16 @@
//
height: 0,
statusBarHeight: 0,
headImg: null,
headImg: "https://cgc.js-dyyj.com/uploads/20250513/f8b255f965efcd71b6843e4b72c3f1f3.png",
typeParam: [
{id: 60, title: ''},{id: 59, title: ''},{id: 60, title: ''},
{id: 1, title: ''},{id: 1, title: ''},{id: 1, title: ''},
{id: 1, title: ''},{id: 1, title: ''},{id: 1, title: ''},
{id: 1, title: ''},{id: 1, title: ''},{id: 1, title: ''},
{id: 1, title: ''},{id: 1, title: ''},{id: 1, title: ''},
{id: 45, title: '味 | WEI'},
{id: 46, title: '服 | FU'},
{id: 47, title: '器 | QI'},
{id: 48, title: '香 | XIANG'},
{id: 49, title: '饰 | SHI'},
{id: 50, title: '艺 | YI'},
],
typeIndex: 0,
list:[],
@ -211,7 +213,14 @@
}
},
onLoad(options) {
this.getHeadImg("techan").then(res => {this.headImg = res})
// this.getHeadImg("techan").then(res => {this.headImg = res})
if (options.idIndex) {
try {
this.typeIndex = Number(options.idIndex)
} catch(e) {
this.typeIndex = 0
}
}
},
onReady() {

4
subPackages/techan/order.vue

@ -461,15 +461,15 @@ export default {
let postPrice = 0
let allPrice = 0
if (this.info && Array.isArray(this.info.goods)) {
this.info.goods.forEach(v=>{
allPrice += v.skuInfo.money*v.skuInfo.buyNum
if (this.info.is_post == 1) {
postPrice+=v.post
postPrice+=(v.post || 0)
}
})
}
console.log(postPrice)
this.allprice = allPrice + postPrice
if (this.coupon) {
if (this.coupon.percent == 0) {

Loading…
Cancel
Save