Browse Source

绿色有机/9-11修改

master
jiazhipeng 1 month ago
parent
commit
c9c46f330e
  1. 2
      manifest.json
  2. 58
      subPackages/activity/greenOrganic.vue
  3. 46
      subPackages/techan/cartOrder.vue
  4. 46
      subPackages/techan/cartOrder1.vue
  5. 75
      subPackages/techan/detail.vue
  6. 49
      subPackages/techan/order.vue
  7. 53
      subPackages/user/travelerList.vue

2
manifest.json

@ -64,7 +64,7 @@
"desc" : "获取用户位置"
}
},
"requiredPrivateInfos" : [ "getLocation", "onLocationChange", "startLocationUpdate" ]
"requiredPrivateInfos" : [ "getLocation", "onLocationChange", "startLocationUpdate","chooseAddress" ]
},
"mp-alipay" : {
"usingComponents" : true

58
subPackages/activity/greenOrganic.vue

@ -2,22 +2,26 @@
<view class="bg">
<image v-if="headImg" :src="showImg(headImg)" class="topImg" mode="widthFix"></image>
<image class="what-img" @click="openPop()" mode="aspectFill" src="https://static.ticket.sz-trip.com/uploads/20250915/798f91cfde30414c091603666be573b7.png"></image>
<image class="what-img" @click="openPop()" mode="aspectFill" src="https://static.ticket.sz-trip.com/uploads/20250916/d5e91bdb2114c3e485349d8edae18173.png"></image>
<view class="main-container" style="margin-top: -2400rpx;position: relative;" >
<view class="type-container no-scrollbar">
<view :class="['type-item']" @click="typeIndex=i"
<view class="type-container no-scrollbar" style="padding: 0 20rpx;">
<view :class="['type-item']" @click="changeTypeIndex(i)"
v-for="(item,i) in typeList" :key="i">
<image v-show="typeIndex==i" mode="aspectFill" :src="item.imgs"></image>
<image v-show="typeIndex!=i" mode="aspectFill" :src="item.img"></image>
</view>
</view>
<uni-transition :mode-class="['slide-left','fade']" :show="show">
<view class="type-container">
<image :src="typeList[typeIndex].textImg" mode="widthFix" style="width: 100%;margin: 14rpx 0 30rpx;"></image>
<image :src="typeList[typeIndex].textImg" mode="widthFix" style="width: 100%;margin: 25rpx 0 30rpx;"></image>
</view>
</uni-transition>
<view class="flex-between" style="flex-wrap: wrap;padding: 0 26rpx;">
<view class="flex-between" style="flex-wrap: wrap;padding: 0 26rpx;box-sizing: border-box;">
<view class="column-product" @click="gotoDetailByType(item)" :key="index"
v-for="(item,index) in typeList[typeIndex].list.slice(0,typeList[typeIndex].viewNum)">
<image class="img" :src="showImg(item.headimg)" mode="aspectFill"></image>
@ -42,7 +46,7 @@
<view class="view-more" v-if="typeList[typeIndex].list.length>0&&typeList[typeIndex].viewNum<=6" @click="typeList[typeIndex].viewNum=999">
查看更多<image src="https://static.ticket.sz-trip.com/uploads/20250909/848e3a18b3ad3227fa4b2952890b91ef.png"></image>
</view>
<image class="bottom-img" src="https://static.ticket.sz-trip.com/uploads/20250909/55c100f9650df6cbd4a4e5a18c8201de.png"></image>
<image @click="returnTop" v-show="showGoTop" class="back-img" src="https://static.ticket.sz-trip.com/uploads/20250915/74031edf3be17888e522df104e790540.png"></image>
@ -72,30 +76,32 @@
typeList: [
{
id: 104,title: "绿色食品",viewNum:6, list: [],
img:"https://static.ticket.sz-trip.com/uploads/20250915/d0f14bd53f532c48a2d5bd22bca1158f.png",
imgs:"https://static.ticket.sz-trip.com/uploads/20250915/d0f14bd53f532c48a2d5bd22bca1158f.png",
textImg: "https://static.ticket.sz-trip.com/uploads/20250915/cd9a01bfa17006675d0294847f20caa8.png",
img:"https://static.ticket.sz-trip.com/uploads/20250916/70b50a9d3f0b70454763e7146ac0a4d1.png",
imgs:"https://static.ticket.sz-trip.com/uploads/20250916/3b251683c250cf6669378266ed786de4.png",
textImg: "https://static.ticket.sz-trip.com/uploads/20250916/e03b1f9e7a9880d2c7f67ee6b4a58643.png",
},
{
id: 105,title: "有机农产品",viewNum:6, list: [],
img:"https://static.ticket.sz-trip.com/uploads/20250915/cd09a87a9c154f07b7f470aa1e62049c.png",
imgs:"https://static.ticket.sz-trip.com/uploads/20250915/1eb123c06d0f0bd860e107cf4adf57a8.png",
textImg:"https://static.ticket.sz-trip.com/uploads/20250915/6f8105990a5d701d5b384ce22c05d28e.png",
img:"https://static.ticket.sz-trip.com/uploads/20250916/600b3f0ca1b6582da3dc128f98cc1ea9.png",
imgs:"https://static.ticket.sz-trip.com/uploads/20250916/9692497b22091c3e3d3d69bf9c4fd311.png",
textImg:"https://static.ticket.sz-trip.com/uploads/20250916/51606f5e0a94c364a8237777e5398aaa.png",
},
{
id: 106,title: "名特优新",viewNum:6, list: [],
img:"https://static.ticket.sz-trip.com/uploads/20250915/2148b40317d93d6ed2a710ff3488f3b7.png",
imgs:"https://static.ticket.sz-trip.com/uploads/20250915/c5140db3128bb15f4e34b68ddf31b644.png",
textImg:"https://static.ticket.sz-trip.com/uploads/20250915/bfa055d9cacd07e839c3219e0c198459.png",
img:"https://static.ticket.sz-trip.com/uploads/20250916/9810f9261e137b354132063fced2d43c.png",
imgs:"https://static.ticket.sz-trip.com/uploads/20250916/2b3cfb94571cd911af3cca2b4027438c.png",
textImg:"https://static.ticket.sz-trip.com/uploads/20250916/d99a160fb1caa3eb56697344fc08df46.png",
},
{
id: 107,title: "农产品地理标志",viewNum:6, list: [],
img:"https://static.ticket.sz-trip.com/uploads/20250915/cb572317ca0cdeba972d430c7fea2b5d.png",
imgs:"https://static.ticket.sz-trip.com/uploads/20250915/8fbde0a77dca289c96100581b550c511.png",
textImg:"https://static.ticket.sz-trip.com/uploads/20250915/697ecdc92a344884ddbb6982ca453031.png",
img:"https://static.ticket.sz-trip.com/uploads/20250916/6c8216888e1224e9534309bde2a87a14.png",
imgs:"https://static.ticket.sz-trip.com/uploads/20250916/37d84af1f692cce86158ff0784fefb73.png",
textImg:"https://static.ticket.sz-trip.com/uploads/20250916/898fda5fdc950817faa0bfd318f1fa95.png",
},
],
showGoTop: false,
show: true,
}
},
onLoad(option) {
@ -106,6 +112,16 @@
},
methods: {
changeTypeIndex (i) {
if (this.typeIndex==i) {
return
}
this.show = false
setTimeout(()=>{
this.typeIndex = i;
this.show = true;
},300)
},
getHeadImg (id) {
this.Post({id},'/api/multimedia/detail').then(res => {
this.headImg = res.data.head_img
@ -237,14 +253,13 @@
.type-container{
display: flex;
flex-wrap: nowrap;
margin: 0 0 32rpx;
width: 100%;
overflow-y: hidden;
overflow-x: auto;
padding:0 26rpx;
.type-item{
height: 88rpx;
margin-right: 13rpx;
margin-right: 10rpx;
flex-shrink: 0;
image{
width: 100%;
@ -261,7 +276,8 @@
width: 238.67rpx
}
.type-item:nth-of-type(4){
width: 307.33rpx
width: 307.33rpx;
margin-right: 0;
}
}

46
subPackages/techan/cartOrder.vue

@ -167,6 +167,12 @@
<view class="people-popup">
<view class="button" @click="changeAddressAddPopup('open','',{})">添加收货地址</view>
<!-- <view style="display: flex;justify-content: flex-end;padding-top: 20rpx;">
<view class="wx-address" @click="getWXAddress()">
<image class="wx-icon" src="https://static.ticket.sz-trip.com/uploads/20250916/3402d54588c3f0470bf05ac754f76cf0.png"></image>
<text style="padding-left: 8rpx;">获取微信地址</text>
</view>
</view> -->
<view class="popup-list" v-if="addressList.length > 0">
<view :class="['popup-item',selectInfo.contacts.id==item.id?'active':'']" v-for="(item, index) in addressList" :key="index" @click="seldThisAddress(item)">
<view class="item-top flex-between">
@ -261,6 +267,29 @@ export default {
onReady () {
},
methods: {
//
getWXAddress () {
let _this = this;
uni.chooseAddress({
success: (res) => {
_this.Post(res,'/api/uservice/user/addWxDefaultConsignee').then(()=>{
_this.getAddressList2()
})
}
})
},
getAddressList2 () {
this.Post({
contactType: "CONSIGNEE",
offset: '0',
limit: '100'
}, '/api/uservice/user/getContactOrConsignee').then(res => {
if (res) {
this.addressList = res.data || []
}
})
},
//
handleOrderGoods () {
let orderList = this.$store.state.user.techanOrderList;
@ -1221,4 +1250,21 @@ view {
font-weight: bold;
}
}
.wx-address{
width: 201rpx;
height: 53rpx;
background: #6A8A2D;
border-radius: 9rpx;
font-weight: 500;
font-size: 24rpx;
color: #FFFFFF;
display: flex;
align-items: center;
justify-content: center;
.wx-icon{
width: 26.67rpx;
height: 26.67rpx;
}
}
</style>

46
subPackages/techan/cartOrder1.vue

@ -167,6 +167,12 @@
<view class="people-popup">
<view class="button" @click="changeAddressAddPopup('open','',{})">添加收货地址</view>
<!-- <view style="display: flex;justify-content: flex-end;padding-top: 20rpx;">
<view class="wx-address" @click="getWXAddress()">
<image class="wx-icon" src="https://static.ticket.sz-trip.com/uploads/20250916/3402d54588c3f0470bf05ac754f76cf0.png"></image>
<text style="padding-left: 8rpx;">获取微信地址</text>
</view>
</view> -->
<view class="popup-list" v-if="addressList.length > 0">
<view :class="['popup-item',selectInfo.contacts.id==item.id?'active':'']" v-for="(item, index) in addressList" :key="index" @click="seldThisAddress(item)">
<view class="item-top flex-between">
@ -261,6 +267,29 @@ export default {
onReady () {
},
methods: {
//
getWXAddress () {
let _this = this;
uni.chooseAddress({
success: (res) => {
_this.Post(res,'/api/uservice/user/addWxDefaultConsignee').then(()=>{
_this.getAddressList2()
})
}
})
},
getAddressList2 () {
this.Post({
contactType: "CONSIGNEE",
offset: '0',
limit: '100'
}, '/api/uservice/user/getContactOrConsignee').then(res => {
if (res) {
this.addressList = res.data || []
}
})
},
// /
handleOrderGoods () {
let orderList = this.$store.state.user.techanOrderList;
@ -1215,4 +1244,21 @@ view {
font-weight: bold;
}
}
.wx-address{
width: 201rpx;
height: 53rpx;
background: #6A8A2D;
border-radius: 9rpx;
font-weight: 500;
font-size: 24rpx;
color: #FFFFFF;
display: flex;
align-items: center;
justify-content: center;
.wx-icon{
width: 26.67rpx;
height: 26.67rpx;
}
}
</style>

75
subPackages/techan/detail.vue

@ -41,6 +41,58 @@
{{ item }}
</view>
</view>
<view class="cert-box" style="padding-top: 1rpx;" v-if="false">
<view class="cert-item flex-between" @click="viewImage()">
<image src="https://static.ticket.sz-trip.com/uploads/20250916/927117700e11004a0c332b535bb249b6.png"></image>
<view class="cert-content flex-1 w-1rpx flex-between">
<view class="cert-text flex-1 w-1rpx" style="padding-left: 13rpx;">
<view>绿色食品</view>
<view style="padding-top: 10rpx;">LB-15-23120620620830</view>
</view>
<view class="view-icon flex-shrink-0">
查看<uni-icons type="right" color="#6A8A2D" size="12"></uni-icons>
</view>
</view>
</view>
<view class="cert-item flex-between" @click="viewImage()">
<image src="https://static.ticket.sz-trip.com/uploads/20250916/de42d3e5c17462615e6f22246c3ea24f.png"></image>
<view class="cert-content flex-1 w-1rpx flex-between">
<view class="cert-text flex-1 w-1rpx" style="padding-left: 13rpx;">
<view>中国有机产品</view>
<view style="padding-top: 10rpx;">LB-15-23120620620830</view>
</view>
<view class="view-icon flex-shrink-0">
查看<uni-icons type="right" color="#6A8A2D" size="12"></uni-icons>
</view>
</view>
</view>
<view class="cert-item flex-between" @click="viewImage()">
<image src="https://static.ticket.sz-trip.com/uploads/20250916/b63681844b2b85aec5e087cf89d5acf5.png"></image>
<view class="cert-content flex-1 w-1rpx flex-between">
<view class="cert-text flex-1 w-1rpx" style="padding-left: 13rpx;">
<view>江苏食用农产品合格证</view>
<view style="padding-top: 10rpx;">LB-15-23120620620830</view>
</view>
<view class="view-icon flex-shrink-0">
查看<uni-icons type="right" color="#6A8A2D" size="12"></uni-icons>
</view>
</view>
</view>
<view class="cert-item flex-between" @click="viewImage()">
<image src="https://static.ticket.sz-trip.com/uploads/20250916/001b09bc6e33251f1817c3af71e1e8ff.png"></image>
<view class="cert-content flex-1 w-1rpx flex-between">
<view class="cert-text flex-1 w-1rpx" style="padding-left: 13rpx;">
<view>农产品地理标志</view>
<view style="padding-top: 10rpx;">LB-15-23120620620830</view>
</view>
<view class="view-icon flex-shrink-0">
查看<uni-icons type="right" color="#6A8A2D" size="12"></uni-icons>
</view>
</view>
</view>
</view>
</view>
<view class="price-box supplier-box" style="margin-top: 20rpx;" v-if="supplierInfo">
@ -192,6 +244,12 @@
this.getCartList()
},
methods: {
viewImage () {
uni.previewImage({
urls: ["https://static.ticket.sz-trip.com/uploads/20250916/927117700e11004a0c332b535bb249b6.png"]
})
},
changPopShow (e) {
this.popShow = e.show
},
@ -968,4 +1026,21 @@
top: -10rpx;
right: -6rpx;
}
.cert-item{
width: 100%;
height: 93.33rpx;
padding: 3.33rpx 23rpx 3.33rpx 3.33rpx;
background: #EBF4D7;
font-weight: 500;
font-size: 24rpx;
color: #6A8A2D;
border-radius: 7rpx;
margin-top: 13rpx;
image{
height: 100%;
width: 86.67rpx;
flex-shrink: 0;
}
}
</style>

49
subPackages/techan/order.vue

@ -137,8 +137,14 @@
<!-- 选择收货地址弹窗 -->
<uni-popup ref="addressPopup" type="bottom" backgroundColor="#F4F4F4" @change="changPopShow">
<view class="people-popup">
<view class="button" @click="changeAddressAddPopup('open','',{})">添加收货地址</view>
<!-- <view style="display: flex;justify-content: flex-end;padding-top: 20rpx;">
<view class="wx-address" @click="getWXAddress()">
<image class="wx-icon" src="https://static.ticket.sz-trip.com/uploads/20250916/3402d54588c3f0470bf05ac754f76cf0.png"></image>
<text style="padding-left: 8rpx;">获取微信地址</text>
</view>
</view> -->
<view class="popup-list" v-if="addressList.length > 0">
<view :class="['popup-item',selectInfo.contacts.id==item.id?'active':'']" v-for="(item, index) in addressList" :key="index" @click="seldThisAddress(item)">
<view class="item-top flex-between">
@ -239,6 +245,29 @@ export default {
// })
},
methods: {
//
getWXAddress () {
let _this = this;
uni.chooseAddress({
success: (res) => {
_this.Post(res,'/api/uservice/user/addWxDefaultConsignee').then(()=>{
_this.getAddressList2()
})
}
})
},
getAddressList2 () {
this.Post({
contactType: "CONSIGNEE",
offset: '0',
limit: '100'
}, '/api/uservice/user/getContactOrConsignee').then(res => {
if (res) {
this.addressList = res.data || []
}
})
},
handleOrderGoods () {
let orderList = this.$store.state.user.techanOrderList;
if (!Array.isArray(orderList) || orderList.length<=0) {
@ -1182,4 +1211,22 @@ view {
font-weight: bold;
}
}
.wx-address{
width: 201rpx;
height: 53rpx;
background: #6A8A2D;
border-radius: 9rpx;
font-weight: 500;
font-size: 24rpx;
color: #FFFFFF;
display: flex;
align-items: center;
justify-content: center;
.wx-icon{
width: 26.67rpx;
height: 26.67rpx;
}
}
</style>

53
subPackages/user/travelerList.vue

@ -92,6 +92,18 @@
<navigator :url="showType ? '/subPackages/user/myAddressAdd' : '/subPackages/user/myContactsAdd'" class="btn">
{{showType ? '添加收货地址' : '添加联系人'}}
</navigator>
<!-- <view class="flex-between" v-if="showType>0" 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;">
<image class="wx-icon" src="https://static.ticket.sz-trip.com/uploads/20250916/3402d54588c3f0470bf05ac754f76cf0.png"></image>
<text style="padding-left: 8rpx;">获取微信地址</text>
</view>
</view>
<navigator v-else :url="'/subPackages/user/myContactsAdd'" class="btn">添加联系人</navigator>
-->
</view>
</view>
</template>
@ -107,7 +119,7 @@
};
},
onLoad(option) {
this.showType = option.showType
this.showType = option.showType || 0
console.log(this.showType)
},
onShow() {
@ -185,7 +197,20 @@
uni.navigateTo({
url: url
});
}
},
//
getWXAddress () {
let _this = this;
uni.chooseAddress({
success: (res) => {
_this.Post(res,'/api/uservice/user/addWxDefaultConsignee').then(()=>{
_this.init()
})
}
})
},
}
}
</script>
@ -337,21 +362,27 @@
bottom: 0;
left: 0;
width: 100%;
height: 200rpx;
height: 153rpx;
background-color: #fff;
box-shadow: 0rpx 0rpx 13rpx 0rpx rgba(82,82,82,0.25);
display: flex;
align-items: center;
justify-content: center;
.btn {
width: 697rpx;
line-height: 80rpx;
height: 73rpx;
line-height: 73rpx;
background: #6A8A2D;
border-radius: 37rpx;
font-weight: 500;
font-size: 36rpx;
color: #fff;
border-radius: 11rpx;
font-weight: bold;
font-size: 32rpx;
color: #FFFFFF;
text-align: center;
position: fixed;
bottom: 53rpx;
left: 26.67rpx;
}
}
.wx-icon{
width: 30rpx;
height: 30rpx;
}
</style>

Loading…
Cancel
Save