Browse Source

1

dev_delivery
jiazhipeng 1 month ago
parent
commit
85922a1097
  1. 3
      .gitignore
  2. 7
      pages.json
  3. 262
      pages/user/user.vue
  4. 295
      subPackages/pointsMall/index.vue
  5. 5
      subPackages/techan/cartOrder1.vue
  6. 10
      subPackages/techan/index.vue
  7. 4
      subPackages/user/travelerList.vue

3
.gitignore

@ -1,3 +1,4 @@
/.hbuilderx/
/unpackage/
/node_modules/
/node_modules/
/pages/

7
pages.json

@ -373,7 +373,14 @@
"style": {
"navigationBarTitleText" : "绿色有机标准认证"
}
},
{
"path": "pointsMall/index",
"style": {
"navigationBarTitleText" : "积分商城"
}
}
]
}],
"tabBar": {

262
pages/user/user.vue

@ -1,54 +1,63 @@
<template>
<view class="bg bg-padding">
<view class="topBox flex-between" @click="gotoProfile">
<image src="https://static.ticket.sz-trip.com/shiweisuzhou/images/user/topIcon.png" class="topIcon"></image>
<view class="flex-center" style="position: relative;">
<view class="avatar-box">
<image :src="showImg(userInfo.avatar)" mode="aspectFill" class="headImg" v-if="userInfo.avatar"></image>
<image src="https://static.ticket.sz-trip.com/yandu/images/user/grxx.png" mode="aspectFill"
class="headImg" v-else></image>
<view class="topBox" >
<!-- <image src="https://static.ticket.sz-trip.com/shiweisuzhou/images/user/topIcon.png" class="topIcon"></image> -->
<view class="flex-between w-full" style="padding-right: 13rpx;" @click="gotoProfile">
<view class="flex-center" style="position: relative;">
<view class="avatar-box">
<image :src="showImg(userInfo.avatar)" mode="aspectFill" class="headImg" v-if="userInfo.avatar"></image>
<image src="https://static.ticket.sz-trip.com/yandu/images/user/grxx.png" mode="aspectFill"
class="headImg" v-else></image>
</view>
<view class="username" v-if="userInfo.nickname">{{userInfo.nickname}}</view>
<view class="username" v-else>请登录/注册 ></view>
</view>
<view class="username" v-if="userInfo.nickname">{{userInfo.nickname}}</view>
<view class="username" v-else>请登录/注册 ></view>
</view>
<view class="top-right" v-if="userInfo.nickname">
个人信息 <image src="https://static.ticket.sz-trip.com/tongli/images/user/rightIcon1.png" mode=""></image>
</view>
</view>
<view class="orderBox">
<navigator :url="'/subPackages/order/trades'" class="moreBox flex-between">
我的订单
<span class="flex-between">
全部订单
<image src="https://static.ticket.sz-trip.com/tongli/images/user/rightIcon1.png" mode=""></image>
</span>
</navigator>
<view class="flex-around" style="margin-top: 20rpx;flex-wrap: wrap;justify-content: flex-start;">
<view class="orderItem" v-for="(item,index) in orderList" :key="index" @click="goTrades(item)">
<img :src="item.src" alt="">
<view>{{item.title}}</view>
<view class="top-right" v-if="userInfo.nickname">
个人信息 <image src="https://static.ticket.sz-trip.com/tongli/images/user/rightIcon1.png" mode=""></image>
</view>
</view>
<!-- 待付款轮播 -->
<!-- <swiper class="my-swipe" :autoplay="3000" indicator-color="white" v-if="dfkList && dfkList.length>0" circular>
<swiper-item v-for="(item,index) in dfkList" :key="item.id">
<div class="dfkBox" @click="goToOrderDetail(item)">
<image :src="showImg(item.order_child[0].specifications_image)" mode="aspectFill"></image>
<div class="contentBox">
<div style="width:300rpx;">
<div style="font-size: 27rpx;margin-bottom: 10rpx;">等待付款 </div>
<div style="display: flex;color: #8A8A8A;font-size: 27rpx;">剩余时间<uni-countdown class="countdown" @timeup="timeup(index)" :show-day="false" :hour="differTimeList[index].slice(0,2)" :minute="differTimeList[index].slice(3,5)" :second="differTimeList[index].slice(6,8)"/></div>
<view class="orderBox">
<view class="points-box">
<image src="https://static.ticket.sz-trip.com/uploads/20250917/e0bd2f24b25ad41d78524d567797408f.png"></image>
<view class="flex-1 w-1rpx">可用积分<text class="points-num">300</text></view>
<view class="points-btn" @click="gotoPath('/subPackages/pointsMall/index')">兑换商品</view>
</view>
<view class="my-order">
<navigator :url="'/subPackages/order/trades'" class="moreBox flex-between">
我的订单
<span class="flex-between">
全部订单
<image src="https://static.ticket.sz-trip.com/tongli/images/user/rightIcon1.png" mode=""></image>
</span>
</navigator>
<view class="flex-around" style="margin-top: 20rpx;flex-wrap: wrap;justify-content: flex-start;">
<view class="orderItem" v-for="(item,index) in orderList" :key="index" @click="goTrades(item)">
<img :src="item.src" alt="">
<view>{{item.title}}</view>
</view>
</view>
<!-- 待付款轮播 -->
<!-- <swiper class="my-swipe" :autoplay="3000" indicator-color="white" v-if="dfkList && dfkList.length>0" circular>
<swiper-item v-for="(item,index) in dfkList" :key="item.id">
<div class="dfkBox" @click="goToOrderDetail(item)">
<image :src="showImg(item.order_child[0].specifications_image)" mode="aspectFill"></image>
<div class="contentBox">
<div style="width:300rpx;">
<div style="font-size: 27rpx;margin-bottom: 10rpx;">等待付款 </div>
<div style="display: flex;color: #8A8A8A;font-size: 27rpx;">剩余时间<uni-countdown class="countdown" @timeup="timeup(index)" :show-day="false" :hour="differTimeList[index].slice(0,2)" :minute="differTimeList[index].slice(3,5)" :second="differTimeList[index].slice(6,8)"/></div>
</div>
<div class="orderBtn" @click.stop="setOrderId(item.order_id)">去支付</div>
</div>
<div class="orderBtn" @click.stop="setOrderId(item.order_id)">去支付</div>
</div>
</div>
</swiper-item>
</swiper> -->
</swiper-item>
</swiper> -->
</view>
</view>
</view>
<view class="cygj">
<view v-for="(item,index) in cyList" :key="index"
@click="gotoUrl(item,index)" v-if="item.isShow">
@ -69,6 +78,20 @@
</view>
</view>
<!-- 用户推荐 -->
<view class="recommend-box">
<image src="https://static.ticket.sz-trip.com/uploads/20250917/83982f331fb3ee8b084c313645dcabe1.png" mode="aspectFill" class="rmtj-img" ></image>
<view class="new-hot-box hot-box" >
<view v-for="(item,index) in hotList" :key="index" class="hot-item" @click="gotoDetailByType(item)">
<image :src="item.headimg" mode="aspectFill"></image>
<view class="hot-content">
<view class="title text-overflowRows">{{item.title}}</view>
<view class="price">{{item.price / 100}}</view>
</view>
</view>
</view>
</view>
<!-- 旅游咨询弹框 -->
<uni-popup ref="popup" type="center">
<view class="consult-popup">
@ -208,8 +231,13 @@
isShow: true
}
],
hotList: [],
}
},
onReady () {
this.getHotList()
},
onShow() {
// token
// this.Post({
@ -385,6 +413,18 @@
// }
// });
},
getHotList() {
this.Post({
// tag_id: 648,
offset: this.hotList.length,
limit: 4,
order: "sales_number"
},'/api/product/get_product_by_type').then(res => {
this.hotList = res.data.list
})
},
}
}
</script>
@ -401,17 +441,16 @@
.bg {
min-height: 100vh;
overflow-x: hidden;
background-color: rgba(237, 245, 220, 1);
background-color: #EDF5DC;
}
.topBox {
width: 750rpx;
height: 538rpx;
height: fit-content;
box-sizing: border-box;
display: flex;
background-image: url('https://static.ticket.sz-trip.com/shiweisuzhou/images/user/topBg.png');
background-image: url('https://static.ticket.sz-trip.com/uploads/20250917/ac38f61a85632aa2d946c08a9e76e109.png');
background-size: 100% 100%;
padding: 0rpx 40rpx 65rpx 28rpx;
padding: 210rpx 26.5rpx 0rpx 26.5rpx;
position: relative;
.topIcon {
@ -454,13 +493,60 @@
}
}
.orderBox {
width: 697rpx;
.points-box{
width: 100%;
height: 133rpx;
background: linear-gradient(90deg, #FCE2C1, #F0BD90);
border-radius: 20rpx;
padding: 18rpx 26rpx 72rpx;
font-weight: 500;
font-size: 25rpx;
color: #6E3D1D;
display: flex;
align-items: center;
image{
width: 24.67rpx;
height: 26.67rpx;
flex-shrink: 0;
}
.flex-1{
padding: 0 12rpx;
margin-top: -8rpx;
display: flex;
align-items: baseline;
}
.points-num{
font-weight: 500;
font-size: 32rpx;
color: #000000;
}
.points-btn{
width: 133rpx;
height: 43rpx;
background: #FCE2C1;
border-radius: 21rpx;
font-weight: 500;
font-size: 25rpx;
color: #6E3D1D;
text-align: center;
line-height: 43rpx;
}
}
.my-order{
width: 100%;
background: #FFFFFF;
box-shadow: 0rpx 0rpx 23rpx 0rpx rgba(80, 80, 80, 0.12);
border-radius: 20rpx;
margin-top: -53rpx;
height: 266rpx;
}
.orderBox {
width: 100%;
// background: #FFFFFF;
// box-shadow: 0rpx 0rpx 23rpx 0rpx rgba(80, 80, 80, 0.12);
border-radius: 13rpx;
margin: -185rpx auto 0;
padding-bottom: 30.6rpx;
margin: 30rpx auto 0;
position: relative;
.moreBox {
@ -802,6 +888,74 @@
text-align: left;
}
.recommend-box{
width: 100%;
padding: 66rpx 26.5rpx 0;
.rmtj-img{
width: 222rpx;
height: 31.33rpx;
display: block;
margin: 0 auto;
}
.hot-box {
margin-top: 40rpx;
display: flex;
justify-content: space-between;
&.new-hot-box{
flex-wrap: wrap;
.hot-adv{
width: 340rpx;
height: 490rpx;
border-radius: 20rpx;
overflow: hidden;
margin-bottom: 16rpx;
}
}
.hot-item {
width: 334rpx;
height: 497rpx;
background: #FFFFFF;
border-radius: 20rpx;
overflow: hidden;
margin-bottom: 26rpx;
image {
width: 334.67rpx;
height: 342rpx;
}
.hot-content {
height: 155rpx;
padding: 6rpx 12rpx 20rpx;
display: flex;
flex-direction: column;
justify-content: space-between;
.title {
font-weight: 500;
font-size: 29rpx;
color: #000000;
}
.price {
font-weight: 500;
font-size: 33rpx;
color: #C3282E;
margin-top: 15rpx;
&:before{
content:"¥";
font-size: 29rpx;
}
&:after{
content:"起";
font-size: 29rpx;
color: #999999;
}
}
}
}
}
}
</style>

295
subPackages/pointsMall/index.vue

@ -0,0 +1,295 @@
<template>
<view class="bg">
<view class="top-box">
<view>积分余额</view>
<view class="points-num" style="margin: 24rpx 0 30rpx;">
<text style="padding-right: 6rpx;">300</text>
<image class="point-image" src="https://static.ticket.sz-trip.com/uploads/20250917/9969ed1c37123ae8b29533a9981d2a6f.png"></image>
</view>
<view>
<view>已连签0天</view>
<view class="sub-text">连续签到可获得更多积分断签后重新累积</view>
</view>
<view class="day-sign-box">
<view class="day-sign-item" v-for="(item,i) in daySign" :key="i">
<view class="day-sign-points">+{{item.num}}</view>
<view :class="['line','line'+i,i==lastSign?'last-line':'',i<lastSign?'active':'']">
<view class="dot"></view>
<view class="last-sign" v-if="i==lastSign"></view>
</view>
</view>
</view>
<view class="rule-area">
<view class="rule-btn">积分规则</view>
<view class="rule-btn" style="margin-top: 26rpx;">积分明细</view>
</view>
<view :class="['sign-btn', !isSign?'active':'']">
点击签到
</view>
<view>
<image src="https://static.ticket.sz-trip.com/uploads/20250917/c7aa588b22b5710fcf61f5c109153157.png"></image>
</view>
</view>
<view class="product-box">
<view class="flex-between">
<view style="font-weight: bold;font-size: 35rpx;color: #000000;">每日精选</view>
<view style="font-weight: 500;font-size: 27rpx;color: #999999;">1300人已兑换</view>
</view>
<view class="jx-box no-scrollbar">
<view class="jx-item" v-for="(item,i) in JXList" :key="i">
<image class="jx-head-image" :src="showImg(item.headimg)" mode="aspectFill"></image>
<view class="jx-content" >
<view class="title text-overflowRows">{{item.title}}</view>
<view class="flex-between">
<view class="flex-between">
<text class="price" style="padding-right: 6rpx;">{{item.price}}</text>
<image class="point-image" src="https://static.ticket.sz-trip.com/uploads/20250917/9969ed1c37123ae8b29533a9981d2a6f.png"></image>
</view>
<view class="btn">兑换</view>
</view>
</view>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
isSign: false,
// 7 0-6
lastSign: 3,
daySign: [
{num:1, active:true},
{num:2, active:true},
{num:3, active:true},
{num:4, active:false},
{num:5, active:false},
{num:6, active:false},
{num:7, active:false},
],
JXList: [],
}
},
onReady () {
this.getJXList()
},
methods: {
getJXList(){
this.Post({
tag_id: 95,
offset: 0,
limit: 999,
},'/api/product/get_product_by_tag_subject').then(res => {
if (res.data.length < this.viewNum) {
this.viewNum = 999
}
this.JXList = res.data.list
})
},
},
}
</script>
<style lang="scss" scoped>
.bg{
width: 750rpx;
min-height: 100vh;
background: #FFFFFF;
}
.point-image{
width: 26rpx;
height: 26rpx;
}
.top-box{
width: 100%;
height: 600rpx;
padding: 26rpx;
background: linear-gradient(-26deg, #FCE2C1, #F0BD90);
font-weight: 500;
font-size: 27rpx;
color: #6E3D1D;
position: relative;
.points-num{
font-weight: 500;
font-size: 53rpx;
color: #000000;
display: flex;
align-items: center;
}
.sub-text{
font-weight: 500;
font-size: 24rpx;
color: rgba(110, 61, 29, 0.8);
}
.day-sign-box{
width: 100%;
margin: 21rpx 0 42rpx;
display: flex;
.day-sign-item{
flex: 1;
flex-shrink: 0;
display: flex;
flex-direction: column;
.line{
width: 100%;
height: 8rpx;
background: #FFF0B3;
margin-top: 40rpx;
display: flex;
align-items: center;
justify-content: center;
overflow: visible;
position: relative;
.dot{
width: 20rpx;
height: 20rpx;
background: #FFF0B3;
border-radius: 50%;
}
&.line0{
width: 55%;
margin-left: auto;
justify-content: flex-start;
}
&.line6{
width: 55%;
margin-right: auto;
justify-content: flex-end;
}
&.active{
background: #FB2A54;
.dot{
background: #FB2A54;
}
}
&.last-line{
.dot{
background: #FB2A54;
}
.last-sign{
width: 100%;
background: #FB2A54;
position: absolute;
top: 0;
left: 0;
bottom: 0;
right: 0;
height: 100%;
border-radius: 0 10rpx 10rpx 0;
}
}
}
}
.day-sign-points{
width: 93.33rpx;
height: 113.33rpx;
background-image: url("https://static.ticket.sz-trip.com/uploads/20250917/7f2c2ab38a4a6e97e876bc370786f6b7.png");
background-size: 100% 100%;
background-repeat: no-repeat;
font-weight: bold;
font-size: 24rpx;
color: #FB2A54;
text-align: center;
padding-top: 54rpx;
position: relative;
}
}
.rule-area{
position: absolute;
width: 134rpx;
top: 26rpx;
right: 0;
.rule-btn{
width: 134rpx;
height: 40rpx;
background: #F0BD90;
border-radius: 20rpx 0rpx 0rpx 20rpx;
text-align: center;
line-height: 40rpx;
}
}
.sign-btn{
width: 100%;
height: 67rpx;
background: #FFFFFF;
border-radius: 33rpx;
font-weight: bold;
font-size: 31rpx;
color: #FB2A54;
text-align: center;
line-height: 67rpx;
&.active{
color: #FFFFFF;
background: linear-gradient(-90deg, #FB2A54, #FF773D);
}
}
}
.product-box{
background: #FFFFFF;
border-radius: 20rpx 20rpx 0rpx 0rpx;
padding: 32rpx 26rpx;
margin-top: -20rpx;
position: relative;
}
.jx-box{
padding: 22rpx 0 80rpx;
display: flex;
flex-wrap: nowrap;
overflow-y: auto;
.jx-item{
width: 253rpx;
font-weight: bold;
font-size: 31rpx;
color: #000000;
margin-right: 25rpx;
flex-shrink: 0;
.jx-content{
width: 100%;
height: 150rpx;
display: flex;
flex-direction: column;
justify-content: space-between;
}
.jx-head-image{
width: 253rpx;
height: 253rpx;
border-radius: 13rpx;
}
.price{
font-weight: bold;
font-size: 32rpx;
color: #FB2A54;
}
.btn{
width: 93rpx;
height: 47rpx;
background: #FB2A54;
border-radius: 23rpx;
font-weight: bold;
font-size: 28rpx;
color: #FFFFFF;
text-align: center;
line-height: 47rpx;
}
}
}
</style>

5
subPackages/techan/cartOrder1.vue

@ -143,7 +143,7 @@
<script>
import agreeAdressVue from '../../components/agreeAdress.vue';
export default {
components: {addressAddVue,agreeAdressVue},
components: {agreeAdressVue},
data() {
return {
// isPost: "1", //0=1=2=3=/
@ -323,6 +323,9 @@ export default {
console.log(this.selectInfo, item)
// if (this.selectInfo.user_select_type==3) {
this.selectInfo.delivery = item
this.orderList.forEach(v=>{
v.delivery = JSON.parse(JSON.stringify(item))
})
// todo
this.getPost()
// }

10
subPackages/techan/index.vue

@ -52,11 +52,12 @@
<text :class="[search_type==0?'active-search-item':'']" @click="changeSearchParm(0)">综合</text>
</view>
<view class="common-view">
<text :class="[[1,2].includes(search_type)?'active-search-item':'']" @click="changeSearchParm(search_type==1?2:1)">销量</text>
<!-- <text :class="[[1,2].includes(search_type)?'active-search-item':'']" @click="changeSearchParm(search_type==1?2:1)">销量</text>
<view class="search-item">
<view :class="[search_type==1?'active-search-item':'','triangle-up']" @click="changeSearchParm(1)"></view>
<view :class="[search_type==2?'active-search-item':'']" @click="changeSearchParm(2)"></view>
</view>
</view> -->
<text :class="[[1,2].includes(search_type)?'active-search-item':'']" @click="changeSearchParm(2)">销量</text>
</view>
<view class="common-view">
<text :class="[[3,4].includes(search_type)?'active-search-item':'']" @click="changeSearchParm(search_type==3?4:3)">价格</text>
@ -275,7 +276,7 @@
<uni-popup ref="methodPopup" type="top" @change="changeMethodPopup" :animation="false">
<view class="typePopup-container">
<view class="place-area" :style="{'height': (height+120)+'px'}"></view>
<view class="place-area" :style="{'height': (height+128)+'px'}"></view>
<view class="method-container">
<view class="method-item flex-between" v-for="(item,i) in deliverData" :key="i"
@click="selectMethod(item)">
@ -1188,7 +1189,8 @@
.typePopup-container{
.place-area{
width: 100%;
opacity: 0;
opacity: 1;
background: white;
}
.type-container.typedata-container{
flex-wrap: wrap;background: #EDF5DC;padding: 30rpx 20rpx 0;

4
subPackages/user/travelerList.vue

@ -125,7 +125,7 @@
<view class="btn-box">
<view class="flex-between" v-if="showType==0" style="width: 660rpx;margin: 0 auto;">
<view class="flex-between" v-if="showType==1" style="width: 660rpx;margin: 0 auto;">
<navigator :url="'/subPackages/user/myAddressAdd'" class="btn" style="width: 300rpx;">添加收货地址</navigator>
<view class="btn" @click="getWXAddress()"
style="width: 300rpx;display: flex;align-items: center;justify-content: center;">
@ -134,7 +134,7 @@
</view>
</view>
<navigator v-if="showType==1" :url="'/subPackages/user/myContactsAdd'" class="btn">添加联系人</navigator>
<navigator v-if="showType==0" :url="'/subPackages/user/myContactsAdd'" class="btn">添加联系人</navigator>
<navigator v-if="showType==2" url="/subPackages/user/myDeliveryAdd" class="btn">添加配送地址</navigator>

Loading…
Cancel
Save