Browse Source

文创提交

master
shaojing 2 years ago
parent
commit
36e7e324d3
  1. 2
      app.js
  2. 3
      app.json
  3. 5
      pages/component/SearchHeader.js
  4. 3
      pages/component/SearchHeader.wxml
  5. 11
      pages/index/index.wxml
  6. 11
      pages/info/postProductInfo/index.js
  7. 155
      subPackages/feiyiNew/index.js
  8. 65
      subPackages/feiyiNew/index.wxml
  9. 66
      subPackages/feiyiNew/index.wxss
  10. 582
      subPackages/postSearch/index.js
  11. 5
      subPackages/postSearch/index.json
  12. 135
      subPackages/postSearch/index.wxml
  13. 474
      subPackages/postSearch/index.wxss
  14. 173
      subPackages/techanNew/index.js
  15. 44
      subPackages/techanNew/index.wxml
  16. 57
      subPackages/techanNew/index.wxss

2
app.js

@ -21,7 +21,7 @@ App({
unique_key: "wechatxcx"
}).then(res => {
let data = JSON.parse(res.data);
data.isTest = data.isTest131? true : false;
data.isTest = data.isTest132? true : false;
this.globalData.configJson = data
}).then(() => {
// 获取ui配置文件

3
app.json

@ -192,7 +192,8 @@
"index/index",
"techanNew/index",
"techanCart/index",
"feiyiNew/index"
"feiyiNew/index",
"postSearch/index"
]
}],
"plugins": {

5
pages/component/SearchHeader.js

@ -79,6 +79,11 @@ Component({
// wx.uma.trackEvent(this.properties.focusclickid);
// }
},
// inputFocus1:function(){
// wx.navigateTo({
// url: '/subPackages/postSearch/index',
// })
// },
searchInput:function(e){
this.setData({
keywords:e.detail.value

3
pages/component/SearchHeader.wxml

@ -3,7 +3,8 @@
<icon bindtap="back" class="iconfont icon-fanhui1"></icon>
<view bindtap="indexFocus" class="search-box" style="margin-right:{{right + 5}}px;">
<icon class="iconfont icon-sousuo"></icon>
<input bindfocus="inputFocus" placeholder-class="{{transparent==1?'phcolor':''}}" bindinput="getVal" class="weui-input" placeholder="搜索" />
<input bindfocus="inputFocus1" placeholder-class="{{transparent==1?'phcolor':''}}" bindinput="inputFocus1" class="weui-input" placeholder="搜索" />
<!-- <input bindfocus="inputFocus" placeholder-class="{{transparent==1?'phcolor':''}}" bindinput="getVal" class="weui-input" placeholder="搜索" /> -->
<view wx:if="{{isScene!=1}}" style="display: flex;padding-right: 12rpx;">
<view style="color: #ccc;">|</view>
<view style="margin-left:22rpx;font-weight: 400;font-size: 29rpx;color: #0B898E;">搜索</view>

11
pages/index/index.wxml

@ -60,7 +60,7 @@
<!-- 非遗跳专题 -->
<!-- <view bindtap="goFeiyi" data-event="legacy" data-title="非遗专卖"
data-path="/pages/list/{{isTest?'scene':'feiyi'}}/index" class="top-icon-item"> -->
<view bindtap="gotoPath" data-event="legacy" data-title="非遗专卖" data-path="{{isTest?'/pages/list/scene/index':'/subPackages/feiyiNew/index'}}" class="top-icon-item">
<view bindtap="gotoPath" data-event="legacy" data-title="非遗专卖" data-path="/subPackages/feiyiNew/index" class="top-icon-item">
<image src="https://static.ticket.sz-trip.com/uploads/20240606/64bc601cd248586984c6ba7f7abf12cd.png" mode="widthFix"></image>
<view class="top-icon-text">非遗专卖</view>
</view>
@ -76,7 +76,7 @@
<view class="top-icon-text">剧场演出</view>
</view>
<!-- 2024年7月新版文创特产 -->
<view bindtap="gotoPath" data-event="specialty" data-title="文创特产" data-path="{{isTest?'/pages/list/road/index':'/subPackages/techanNew/index'}}" class="top-icon-item">
<view bindtap="gotoPath" data-event="specialty" data-title="文创特产" data-path="/subPackages/techanNew/index" class="top-icon-item">
<image src="https://static.ticket.sz-trip.com/uploads/20240606/bafa90e369f339347170f9c55a245d78.png" mode="widthFix"></image>
<view class="top-icon-text">文创特产</view>
</view>
@ -173,6 +173,7 @@
<!-- 2024年 夏季改UI新增景区舒适度和实时路况 -->
<view style="display: flex;">
<view bindtap="gotoUrl" data-event="comfort_click" data-title="景区舒适度" data-url="https://m.cloud.sz-trip.com/ScenicComfort" class="jqssd"></view>
<!-- <view bindtap="gotoUrl" data-event="xlqc" data-url="https://wlsjzx.wglj.suzhou.com.cn:8096/kt_h5/index.html#/home" class="sslk"></view> -->
<view bindtap="gotoUrl" data-event="xlqc" data-url="https://jiaotonghao2.amap.com/?channel=amap&unitId=257&src=app_share#/" class="sslk"></view>
</view>
<!-- 元旦修改 限时特惠--新版-->
@ -233,7 +234,7 @@
<view class="text">数字博物馆</view>
</view>
<view bindtap="gotoUrl" data-title="数字名人馆" data-url="https://www.szsmrg.com/home" class="pbservice-item">
<image src="https://static.ticket.sz-trip.com/uploads/20240606/27acb48002369a8203762acc783c7492.png" mode="widthFix"></image>
<image src="https://static.ticket.sz-trip.com/uploads/20240717/df0683bb40ec2615a932ef2379779374.png" mode="widthFix"></image>
<view class="text">数字名人馆</view>
</view>
<view bindtap="gotoUrl" data-event="cloud_click" data-title="云上观展" data-url="https://m.cloud.sz-trip.com/CloudPerform2022" class="pbservice-item">
@ -261,7 +262,7 @@
<view class="text">书仓</view>
</view>
<view bindtap="gotoPath" data-event="e_book" data-title="e读书" data-path="/pages/pbService/library/index" class="pbservice-item">
<image src="https://static.ticket.sz-trip.com/uploads/20240716/1b3895b680bc447b84829623d43cee02.png" mode="widthFix"></image>
<image src="https://static.ticket.sz-trip.com/uploads/20240717/1a5fc26d419e589c5649273f8105b723.png" mode="widthFix"></image>
<view class="text">e读书</view>
</view>
@ -280,7 +281,7 @@
<view class="text">书仓</view>
</view> -->
<view bindtap="gotoUrl" data-event="appreciate_click" data-title="云游苏州" data-url="https://speed.web.yunyouyizhan.com/downloadApp/index.html#/" class="pbservice-item">
<image src="https://static.ticket.sz-trip.com/uploads/20240606/61aac5403bb54bb4cea6a9587da6863b.png" mode="widthFix"></image>
<image src="https://static.ticket.sz-trip.com/uploads/20240717/fab990ef40d7424c9f4616a229b03777.png" mode="widthFix"></image>
<view class="text">云游苏州</view>
</view>
<view bindtap="gotoPath" data-event="appreciate_click" data-title="美图鉴赏" data-path="/pages/pbService/appreciate/index" class="pbservice-item">

11
pages/info/postProductInfo/index.js

@ -340,9 +340,18 @@ Page({
url: '/pages/order/postOrder/index',
})
} else {
let tag_id = this.data.info.tag_id,type = ''
if (tag_id.includes(20) || tag_id.includes(19)) { //文创
type = '1'
}else if (tag_id.includes(5)) { //非遗
type = '2'
}else {
type = ''
}
commonApi.user_post("cart/add_sku", {
sku_id: this.data.info.sku[this.data.skuIndex].id,
num: this.data.producNum
num: this.data.producNum,
type:type
}).then(res => {
if (res.code == 1) {
commonApi.user_post('cart/get_list', {}).then(res => {

155
subPackages/feiyiNew/index.js

@ -10,11 +10,25 @@ Page({
* 页面的初始数据
*/
data: {
height: 90,
padHeight:0,
right:0,
list:[], //获取的产品列表
total:1, //总数
keywords:"", //搜索关键字
navIndex:0, //一级分类选中下标
navList:['列表样式','宫格样式'],
navList:[
{
title:'列表样式',
icon:'https://static.ticket.sz-trip.com/uploads/20240715/1cb81757944dd8523f3786195969266c.png',
seldIcon:'https://static.ticket.sz-trip.com/uploads/20240710/62bb38d5f88754e57447a26b14176aa2.png'
},
{
title:'宫格样式',
icon:'https://static.ticket.sz-trip.com/uploads/20240717/eebe3e2345a8adb2668bc34cb28cee74.png',
seldIcon:'https://static.ticket.sz-trip.com/uploads/20240717/b3e9136ecb05bedcd9d3f59ee4399b62.png'
}
],
flag:true, //切换样式,true按分类,false按店铺展示
typeList:[], //左侧的二级分类
typeIndex:0, //二级分类选中下标
@ -29,13 +43,15 @@ Page({
allSelectedBtn:false, //全选按钮
seachFlag:false, //搜索模式
totalPrice:0, //获取购物车总价
name:'非遗专卖'
name:'非遗专卖',
nowAddListId:[]
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
app.globalData.nowAddListId = []
wx.showShareMenu({
withShareTicket: true,
menus: ['shareAppMessage', 'shareTimeline']
@ -59,7 +75,8 @@ Page({
icon: "success"
})
this.setData({
allSelectedBtn:false
allSelectedBtn:false,
totalPrice:0
})
this.getCount()
}
@ -124,6 +141,12 @@ Page({
type:"2"
}).then(res => {
if (res.code == 1) {
let sku_id = this.data.showPopup ? item.sku.id :this.data.info.sku[this.data.skuIndex].id
let _nowAddListId = this.data.nowAddListId
_nowAddListId.push(sku_id)
this.setData({
nowAddListId: _nowAddListId
})
commonApi.user_post('cart_within/get_list', {
type:'2'
}).then(res => {
@ -134,7 +157,7 @@ Page({
// debugger
if (!this.data.skuFlag && !this.data.showPopup) {
// debugger
if (val.sku.id == this.data.info.sku[this.data.skuIndex].id) {
if (this.data.nowAddListId.includes(val.sku.id)) {
val.selected = 1
}
}else {
@ -236,10 +259,10 @@ Page({
}
})
if (product.length == 0 && product1.length == 0) {
wx.showToast({
title: '请先选择产品',
icon: 'none'
})
// wx.showToast({
// title: '请先选择产品',
// icon: 'none'
// })
return;
}
if (product.length > 0 && product1.length > 0) {
@ -272,10 +295,12 @@ Page({
allSelected() {
let gwcList = this.data.gwcList
let totalPrice = 0
let nowAddListId = []
if (this.data.allSelectedBtn) {
gwcList.forEach(item=> {
item.selected =0
})
nowAddListId = []
} else {
gwcList.forEach(item=> {
item.selected =1
@ -283,16 +308,20 @@ Page({
gwcList.forEach(item=> {
totalPrice += Number(item.num*item.sku.price)
})
gwcList.forEach(item=> {
nowAddListId.push(item.sku_id)
})
}
this.setData({
gwcList,
allSelectedBtn:!this.data.allSelectedBtn,
totalPrice
totalPrice,
nowAddListId
})
},
// 单选一个
selectedIt(e) {
let item = e.currentTarget.dataset.item,gwcList= this.data.gwcList,totalPrice=0
let item = e.currentTarget.dataset.item,gwcList= this.data.gwcList,totalPrice=0,nowAddListId=[]
gwcList.forEach(el=> {
if (el.id == item.id) {
el.selected == 1 ? el.selected =0 : el.selected = 1
@ -303,18 +332,27 @@ Page({
totalPrice += Number(el.num*el.sku.price)
}
})
gwcList.forEach(item=> {
if (item.selected == 1) {
nowAddListId.push(item.sku_id)
}
})
let status = gwcList.every(el => el.selected === 1)
this.setData({
gwcList,
allSelectedBtn:status?true:false,
totalPrice
totalPrice,
nowAddListId
})
},
// 左侧购物车打开弹窗
openPopup() {
// this.getCount()
let gwcList = this.data.gwcList
let status = gwcList.every(el => el.selected === 1)
let status = false
if (gwcList.length>0) {
status = gwcList.every(el => el.selected === 1)
}
this.setData({
showPopup:!this.data.showPopup,
allSelectedBtn:status?true:false,
@ -328,14 +366,20 @@ Page({
tag_id:5, //标签的ID
offset:list.length, //起始查询
limit:10, //查询数量
title:this.data.keywords //搜索产品名称
title: this.data.seachFlag ? this.data.keywords : '' //搜索产品名称
}).then(res => {
let arr = []
if (this.data.seachFlag) {
res.data.list.map(obj => {
arr = [...arr, ...obj.product]
})
}
res.data.list.map(item=>{
item.display_tags = item.display_tags?item.display_tags.split(","):[];
item.display_tags = item.display_tags.splice(0,2);
})
this.setData({
list:list.concat(res.data.list),
list:this.data.seachFlag?arr:list.concat(res.data.list),
total:res.data.total
})
})
@ -356,20 +400,33 @@ Page({
commonApi.user_post('cart_within/get_list', {
type:'2'
}).then(res => {
let arr = res.data,cartCount=0
// let arr = res.data,totalPrice = 0,cartCount=0
let arr = res.data,totalPrice = 0,cartCount=0
if (arr.length>0) {
arr.forEach(item=> {
// totalPrice += item.num*item.sku.price
cartCount += item.num
})
}
// console.log(totalPrice);
if (app.globalData.nowAddListId.length>0) {
arr.map(item=> {
app.globalData.nowAddListId.forEach(val=> {
if (val == item.sku_id) {
item.selected = 1
}
})
})
// debugger
arr.forEach(item=> {
if(item.selected == 1) {
totalPrice += item.num*item.sku.price
}
})
}
this.setData({
cartCount: cartCount, //1
gwcList:res.data,
// totalPrice,
allSelectedBtn:false
allSelectedBtn:false,
totalPrice:app.globalData.nowAddListId.length>0?totalPrice:0
})
})
},
@ -384,6 +441,7 @@ Page({
seachFlag:false
})
this.getList()
this.getCount()
},
// 搜索
search:function(e){
@ -394,7 +452,7 @@ Page({
list:[],
total:1
})
this.onReload()
// this.onReload()
}else {
this.setData({
seachFlag:true,
@ -402,7 +460,12 @@ Page({
list:[],
total:1
})
this.getList();
// this.getList();
}
if (!this.data.navIndex == 0) {
this.getSupplierTag()
} else {
this.getList()
}
},
// 去产品详情页
@ -477,7 +540,7 @@ Page({
tag_id:this.data.seachFlag? '5':this.data.typeList[this.data.typeIndex].id, //标签的ID
offset:list.length, //起始查询
limit: 10, //查询数量
title:this.data.keywords, //搜索产品名称
title:this.data.seachFlag ? this.data.keywords : '', //搜索产品名称
}).then(res=>{
res.data.list.map(item=>{
item.display_tags = item.display_tags?item.display_tags.split(","):[];
@ -587,18 +650,64 @@ Page({
producNum: this.data.producNum + 1
})
},
getHeight() {
let systemInfo = wx.getSystemInfoSync(),rect = wx.getMenuButtonBoundingClientRect();
let height = (rect.top - systemInfo.statusBarHeight) * 2 + rect.height;
this.setData({
height:height,
padHeight:systemInfo.statusBarHeight,
right:(systemInfo.screenWidth - rect.right) + rect.width
})
console.log(systemInfo,rect)
},
back: function () {
if(this.properties.clickid){
wx.uma.trackEvent(this.properties.clickid);
}
const pages = getCurrentPages();
// wx.showTabBar({})
console.log(this.properties.isIndex)
if (pages.length<=1){
wx.switchTab({
url: app.globalData.menuRoute
})
}
else {
wx.navigateBack({
delta: 1
})
}
},
goNewSearch() {
wx.navigateTo({
// url: "/subPackages/postSearch/index?type_id=2",
url: '/subPackages/postSearch/index?type_id=2&ids='+this.data.nowAddListId,
})
},
// lower() {
// if (this.data.flag) {
// this.getList()
// } else {
// this.getSupplierTag()
// }
// },
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
this.getHeight()
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
if (app.globalData.nowAddListId.length>0) {
this.getCount()
}else {
this.onReload()
}
this.getHeight()
// this.setData({
// list:[],
// total:1,

65
subPackages/feiyiNew/index.wxml

@ -1,11 +1,25 @@
<!--pages/feiyi/list/index.wxml-->
<!-- 非遗专卖页面 -->
<view class="fiyi-main" >
<view class="fiyi-main">
<view style="{{seachFlag?'':'height: 500rpx;'}}">
<search bind:onload="search" name="{{name}}"></search>
<!-- <search bind:onload="search" name="{{name}}"></search> -->
<view class="title-box{{transparent==1?' bg-box':''}}" style="height:{{isScene==1?'0':(height+padHeight)}}px;">
<view class="title-header" style="padding-top:{{padHeight}}px;height:{{height}}px">
<icon bindtap="back" class="iconfont icon-fanhui1"></icon>
<view bindtap="goNewSearch" class="search-box" style="margin-right:{{right + 5}}px;">
<icon class="iconfont icon-sousuo"></icon>
<view class="weui-input" style="color: #999;font-weight: 400;font-size: 27rpx;">请输入商品名称</view>
<!-- <input placeholder-class="{{transparent==1?'phcolor':''}}" class="weui-input" placeholder="搜索" /> -->
<view wx:if="{{isScene!=1}}" style="display: flex;padding-right: 12rpx;">
<view style="color: #ccc;">|</view>
<view style="margin-left:22rpx;font-weight: 400;font-size: 29rpx;color: #0B898E;">搜索</view>
</view>
</view>
</view>
</view>
<image wx:if="{{!seachFlag}}" class="heaimg" src="https://static.ticket.sz-trip.com/uploads/20240715/590b8c17b06ccadd09f43ee9260d2a36.png" mode="widthFix"></image>
</view>
<view wx:if="{{!seachFlag}}" class="feiyi-centent">
</view>
<view wx:if="{{!seachFlag}}" class="feiyi-centent">
<!-- <view class="type-box">
<view style="display: flex;">
<view wx:for="{{flag?navList:navList2}}" wx:key="*this" bindtap="changeNav" data-index="{{index}}" class="{{index == navIndex ? 'seld-nav':'nav'}}">{{item.title}}</view>
@ -28,18 +42,19 @@
</scroll-view>
</view>
<!-- 右侧产品列表 -->
<view style="display:flex">
<view style="width: 550rpx;display: flex;justify-content: flex-end;margin: 21rpx 24rpx 20rpx 0;">
<view style="display:flex;height:100%;flex-direction: column; ">
<view style="width: 550rpx; display: flex;justify-content: flex-end;margin: 21rpx 24rpx 20rpx 0;">
<view class="nav-box">
<view class="{{navIndex == index ? 'styleBtn-seld' : 'styleBtn'}}" wx:for="{{navList}}" data-index="{{index}}" bindtap="changeNav">
<image wx:if="{{navIndex == index}}" class="style-icon" style="width:29rpx;height:29rpx;" src="https://static.ticket.sz-trip.com/uploads/20240715/1cb81757944dd8523f3786195969266c.png" mode="" />
<image wx:else class="style-icon" style="width:29rpx;height:29rpx;" src="https://static.ticket.sz-trip.com/uploads/20240710/62bb38d5f88754e57447a26b14176aa2.png" mode="" />
<text>{{item}}</text>
<image src="{{navIndex == index ?item.icon :item.seldIcon}}" mode="" class="style-icon" style="width:29rpx;height:29rpx;" />
<!-- <image wx:if="{{navIndex == index}}" class="style-icon" style="width:29rpx;height:29rpx;" src="https://static.ticket.sz-trip.com/uploads/20240715/1cb81757944dd8523f3786195969266c.png" mode="" /> -->
<!-- <image wx:else class="style-icon" style="width:29rpx;height:29rpx;" src="https://static.ticket.sz-trip.com/uploads/20240710/62bb38d5f88754e57447a26b14176aa2.png" mode="" /> -->
<text>{{item.title}}</text>
</view>
</view>
</view>
<view class="list" style="width: 100%;flex:1; overflow: hidden;">
<scroll-view scroll-y="true" style="height: 100%" bindscrolltoupper="upper" bindscrolltolower="lower" bindscroll="scroll">
<view class="list" style="width:550rpx; height:100%; flex:1; overflow: hidden;padding-bottom: 30rpx;">
<scroll-view scroll-y="true" style="height: 100%" bindscrolltoupper="upper" bindscrolltolower="getList" bindscroll="scroll">
<view class="item" wx:for="{{list}}" wx:key="*this" bindtap="goodsDetail" data-goods="{{item}}">
<image class="img" src="{{item.headimg}}" mode="" />
<view class="content">
@ -49,7 +64,7 @@
<view class="item-bottom">
<view class="price">
<text class="current-price">{{item.price/100}}</text>
<text class="original-price">¥{{item.market_price/100}}</text>
<text class="original-price" wx:if="{{item.market_price && item.market_price!=0 && item.market_price>item.price}}">¥{{item.market_price/100}}</text>
</view>
<view class="add" catchtap="addBuyCart" data-item="{{item}}">+</view>
</view>
@ -65,9 +80,10 @@
<view style="width: 700rpx;display: flex;justify-content: flex-end;margin: 21rpx 24rpx 20rpx 0;">
<view class="nav-box">
<view class="{{navIndex == index ? 'styleBtn-seld' : 'styleBtn'}}" wx:for="{{navList}}" data-index="{{index}}" bindtap="changeNav">
<image wx:if="{{navIndex == index}}" class="style-icon" style="width:29rpx;height:29rpx;" src="https://static.ticket.sz-trip.com/uploads/20240715/1cb81757944dd8523f3786195969266c.png" mode="" />
<image wx:else class="style-icon" style="width:29rpx;height:29rpx;" src="https://static.ticket.sz-trip.com/uploads/20240710/62bb38d5f88754e57447a26b14176aa2.png" mode="" />
<text>{{item}}</text>
<image src="{{navIndex == index ?item.icon :item.seldIcon}}" mode="" class="style-icon" style="width:29rpx;height:29rpx;" />
<!-- <image wx:if="{{navIndex == index}}" class="style-icon" style="width:29rpx;height:29rpx;" src="https://static.ticket.sz-trip.com/uploads/20240715/1cb81757944dd8523f3786195969266c.png" mode="" />
<image wx:else class="style-icon" style="width:29rpx;height:29rpx;" src="https://static.ticket.sz-trip.com/uploads/20240710/62bb38d5f88754e57447a26b14176aa2.png" mode="" /> -->
<text>{{item.title}}</text>
</view>
</view>
</view>
@ -103,10 +119,10 @@
</scroll-view>
</view>
</view>
</view>
</view>
</view>
<!-- 搜索到的产品列表 -->
<view wx:if="{{seachFlag}}" style="overflow-y: scroll;margin-top: -650rpx;padding-bottom: 50rpx;">
<view wx:if="{{seachFlag}}" style="overflow-y: scroll;margin-top: -700rpx;padding-bottom: 50rpx;">
<view class="hot-list" wx:if="{{list.length>0}}">
<view class="hot-list-item" wx:for="{{2}}" wx:for-index="number" wx:key="this">
<view class="hot-item" wx:for="{{list}}" wx:if="{{index%2==number}}" bindtap="goodsDetail" data-goods="{{item}}" wx:key="id">
@ -118,9 +134,9 @@
<view style="display: flex;justify-content: space-between;align-items: center; ">
<view>
<text class="hot-item-price">{{item.price/100}}</text>
<text class="hot-item-market_price">{{item.market_price/100}}</text>
<text class="hot-item-market_price" wx:if="{{item.market_price && item.market_price!=0 && item.market_price>item.price}}">{{item.market_price/100}}</text>
</view>
<image class="add" bindtap="addBuyCart" data-item="{{item}}" src="https://static.ticket.sz-trip.com/uploads/20240715/3ad59eac0088d47ff4bc2fec6ffd8f56.png" mode="" />
<image class="add" catchtap="addBuyCart" data-item="{{item}}" src="https://static.ticket.sz-trip.com/uploads/20240715/3ad59eac0088d47ff4bc2fec6ffd8f56.png" mode="" />
</view>
</view>
</view>
@ -147,14 +163,15 @@
<view style="font-weight: 500;font-size: 27rpx;color: #000000;">
总计:<text class="money">{{totalPrice/100}}</text>
</view>
<!-- <view style="margin-left: 16.67rpx;font-family: PingFang SC;font-weight: 500;font-size: 27rpx;color: #0B898E;" bindtap="openPopup">
<view wx:if="{{totalPrice>0}}" style="margin-left: 16.67rpx;font-family: PingFang SC;font-weight: 500;font-size: 27rpx;color: #0B898E;" bindtap="openPopup">
<text>明细</text>
<image wx:if="{{showPopup}}" style="width:17.33rpx;height:17.33rpx;margin-left: 10rpx;" src="https://static.ticket.sz-trip.com/uploads/20240715/524acef87f09269f6a4fa39d0fa38c18.png" mode="" />
<image wx:else style="width:17.33rpx;height:17.33rpx;margin-left: 10rpx;" src="https://static.ticket.sz-trip.com/uploads/20240715/080e94053d1444707d18860a73b17915.png" mode="" />
</view> -->
</view>
</view>
<!-- 去结算按钮 -->
<view class="{{cartCount == 0?'no-buy':'buy'}}" bindtap="order">去结算</view>
<view wx:if="{{totalPrice==0}}" class="no-buy">去结算</view>
<view wx:else class="buy" bindtap="order">去结算</view>
</view>
<!-- 规格弹窗 -->
<view class="mask" wx:if="{{skuFlag}}">
@ -214,8 +231,8 @@
<image style="width:179rpx;height: 179rpx;border-radius: 13rpx;flex-shrink: 0;margin-right: 26rpx;" src="{{item.sku.headimg}}" mode="" />
<view class="main">
<view>
<view class="title">{{item.product.title}}</view>
<view class="sku-title">{{item.sku.sku_name}}</view>
<view class="title textOver">{{item.product.title}}</view>
<view class="sku-title textOver">{{item.sku.sku_name}}</view>
</view>
<view class="main-bottom">
<view class="price">{{item.sku.price/100}}</view>

66
subPackages/feiyiNew/index.wxss

@ -64,6 +64,7 @@ page {
/* min-height: 100vh; */
/* min-height: 950rpx; */
background-color: #F3F3F3;
margin-top: 20rpx;
}
.type-two-box {
width: 200rpx;
@ -138,14 +139,14 @@ page {
text-decoration-line: line-through;
}
.add {
width: 40rpx;
height: 40rpx;
width: 43rpx;
height: 43rpx;
background: #0B898E;
border-radius: 50%;
text-align: center;
line-height: 40rpx;
font-weight: 500;
font-size: 31rpx;
font-size: 34rpx;
color: #FFFFFF;
}
.bottom {
@ -281,7 +282,7 @@ page {
.supplier-info {
display: flex;
flex-direction: column;
height: 136rpx;
/* height: 136rpx; */
justify-content:space-between;
flex: 1;
margin-right: 20.67rpx;
@ -719,3 +720,60 @@ page {
.hot-list-item {
width: 337rpx;
}
.title-box,.title-header{
background: #ffff;
}
.bg-box,.bg-box .title-header {
background: transparent;
color: #ccc;
}
.title-header {
position: fixed;
left: 0;
right: 0;
display: flex;
top: 0;
align-items: center;
justify-content: space-between;
font-size: 32rpx;
line-height: 90rpx;
z-index: 2;
}
.title-header .icon-fanhui1 {
padding: 0 20rpx;
font-size: 44rpx;
color: #333;
}
.right {
position: absolute;
right: 20rpx;
}
.search-box {
display: flex;
align-items: center;
margin-left: 60rpx;
width: 560rpx;
border-radius: 30rpx;
height: 60rpx;
padding: 0 20rpx;
font-size: 26rpx;
background: #F0F0F0;
}
.bg-box .search-box {
background: #F0F0F0;
}
.search-box .weui-input {
margin-left: 10rpx;
flex: 1;
width: 100%;
}
.bg-box.title-box .icon-fanhui1 {
color: white;
}
.phcolor {
color: #ccc;
}

582
subPackages/postSearch/index.js

@ -0,0 +1,582 @@
// subPackages/xx/index.js
import commonApi from "../../utils/https/common"
import util from "../../utils/util"
let app = getApp()
Page({
/**
* 页面的初始数据
*/
data: {
height: 90,
padHeight:0,
right:0,
type_id:'', //用来区别文创特产、非遗
tag_id:'',
list:[],
keywords:'',
skuFlag:null, //规格弹窗
info: null, //规格信息
skuIndex: 0, //默认选中第一个规格
producNum: 1,
cartCount:0,
showPopup:false, //购物车的弹窗
gwcList:[], //gwc里的产品数据
allSelectedBtn:false, //全选按钮
totalPrice:0, //获取购物车总价--打开购物车后勾选的产品价格
nowAddListId:[],
type:'', //购物车分类1文创,2非遗
show:false
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
console.log(options);
let id = '',type=''
if (options.type_id == '1') {
id = '20,19'
type='1'
} else {
id = '5'
type='2'
}
this.setData({
tag_id:id,
type,
nowAddListId:options.ids.split(',')
})
// this.getList()
this.getCount()
},
// 去产品详情页
goodsDetail(e){
wx.navigateTo({
url: '/pages/info/postProductInfo/index?id='+e.currentTarget.dataset.goods.id,
})
},
// 添加产品到购物车
addCart: function (e) {
let item = e.currentTarget.dataset.item
app.globalData.postProduct = []
app.globalData.list = []
commonApi.user_post("/product/checkStock", {
sku_id: this.data.showPopup ? item.sku.id : this.data.info.sku[this.data.skuIndex].id,
}).then(res => {
if (res && res.code != 1) {
return;
} else {
commonApi.user_post("cart_within/add_sku", {
sku_id: this.data.showPopup ? item.sku.id :this.data.info.sku[this.data.skuIndex].id,
num: this.data.producNum,
type:this.data.type
}).then(res => {
if (res.code == 1) {
let sku_id = this.data.showPopup ? item.sku.id :this.data.info.sku[this.data.skuIndex].id
let _nowAddListId = this.data.nowAddListId
// debugger
_nowAddListId.push(sku_id)
this.setData({
nowAddListId: _nowAddListId
})
commonApi.user_post('cart_within/get_list', {
type:this.data.type
}).then(res => {
// debugger
let cartCount = 0,totalPrice = 0,gwcList=this.data.gwcList
res.data.forEach(val=> {
cartCount+=val.num
console.log(this.data.skuFlag);
if (!this.data.skuFlag && !this.data.showPopup) {
console.log(this.data.nowAddListId)
if (this.data.nowAddListId.some(s => +s === +val.sku_id) ) {
val.selected = 1
}
}else {
gwcList.forEach(el=> {
if (el.id == val.id) {
val.selected = el.selected
}
})
}
})
res.data.forEach(element=> {
if (element.selected == 1) {
totalPrice += Number(element.num*element.sku.price)
}
})
console.log(res.data);
let status = res.data.every(el => el.selected === 1)
this.setData({
cartCount: cartCount,
totalPrice,
producNum:1,
gwcList:res.data,
allSelectedBtn:status?true:false,
})
})
// 加动效
this.setData({
skuFlag: null,
aniSkuIndex: this.data.skuIndex,
cartImgInfo: null
})
setTimeout(() => {
this.setData({
aniSkuIndex: -1
})
// wx.showModal({
// title: "提示",
// content: "去购物车结算?",
// success: function (res) {
// if (res.confirm) {
// wx.navigateTo({
// url: '/pages/user/cartlist/list',
// })
// }
// }
// })
}, 650)
}
})
}
})
},
// 去结算
order: function () {
commonApi.user_post('wx/get_user_keep', {
jumpurl: '/pages/user/cartlist/list',
title: '购物车',
type: 'mini'
}).then(res => {
if (res.data.subscribe == 0) {
this.setData({
wxqrcode: res.data.qrcode,
showQrCode: true
})
} else {
app.globalData.couponInfo = null;
util.pagePoint({
event: 'cart_order'
}, 1)
let list = this.data.gwcList,
price = 0,
product = [],
product1 = []
list.map(item => {
if (item.selected == 1) {
// item.product.type="post";
if (item.product.type == 'post') {
product.push({
product: item.product,
sku: item.sku,
productNum: item.num
})
} else {
product1.push(item)
app.globalData.list = product1
}
if (item.product.type.includes('post')) {
this.data.productType = 'post'
}
}
})
if (product.length == 0 && product1.length == 0) {
// wx.showToast({
// title: '请先选择产品',
// icon: 'none'
// })
return;
}
if (product.length > 0 && product1.length > 0) {
this.setData({
flag: 'mix',
isCar: 'multiple'
})
}
if (product1.length > 1) {
this.setData({
isCar: 'multiple'
})
} else {
this.setData({
isCar: 'single'
})
}
console.log(product1);
app.globalData.postProduct = product;
if (app.globalData.list) {
app.globalData.product = app.globalData.list[app.globalData.index]
}
wx.navigateTo({
url: '/pages/order/postOrder/index?from=cart&flag=' + this.data.flag,
})
}
})
},
// 单选一个
selectedIt(e) {
let item = e.currentTarget.dataset.item,gwcList= this.data.gwcList,totalPrice=0,nowAddListId=[]
gwcList.forEach(el=> {
if (el.id == item.id) {
el.selected == 1 ? el.selected =0 : el.selected = 1
}
})
gwcList.forEach(el=> {
if (el.selected == 1) {
totalPrice += Number(el.num*el.sku.price)
}
})
gwcList.forEach(item=> {
if (item.selected == 1) {
nowAddListId.push(item.sku_id)
}
})
let status = gwcList.every(el => el.selected === 1)
this.setData({
gwcList,
allSelectedBtn:status?true:false,
totalPrice,
nowAddListId
})
},
// 清空
delAll() {
let ids = []
this.data.gwcList.forEach(item => {
ids.push(item.sku_id)
})
commonApi.user_post("cart_within/del_sku", {
sku_id: ids+'',
type:this.data.type
}).then(res => {
if (res.code == 1) {
wx.showToast({
title: '清空成功',
icon: "success"
})
this.setData({
totalPrice:0
})
this.getCount()
}
})
},
// 减少一个
del(e) {
let item = e.currentTarget.dataset.item
let gwcList = this.data.gwcList
commonApi.user_post("cart_within/update_sku", {
num:item.num-1,
sku_id: item.sku_id,
type:this.data.type
}).then(res => {
if (res.code == 1) {
// this.getCount()
commonApi.user_post('cart_within/get_list', {
type:this.data.type
}).then(res => {
let arr = res.data,totalPrice = 0,cartCount=0
if (res.data.length>0) {
res.data.forEach(item=> {
// totalPrice += item.num*item.sku.price
cartCount += item.num
gwcList.forEach(el=> {
if (el.id == item.id) {
item.selected = el.selected
}
})
})
res.data.forEach(item=> {
if (item.selected ==1) {
totalPrice += item.num*item.sku.price
}
})
}
let status = res.data.every(el => el.selected === 1)
this.setData({
cartCount: cartCount, //1
gwcList:res.data,
allSelectedBtn:status?true:false,
totalPrice
})
})
}
})
},
// 全选
allSelected() {
let gwcList = this.data.gwcList
let totalPrice = 0
let nowAddListId = []
if (this.data.allSelectedBtn) {
gwcList.forEach(item=> {
item.selected =0
})
nowAddListId = []
} else {
gwcList.forEach(item=> {
item.selected =1
})
gwcList.forEach(item=> {
totalPrice += Number(item.num*item.sku.price)
})
gwcList.forEach(item=> {
nowAddListId.push(item.sku_id)
})
}
this.setData({
gwcList,
allSelectedBtn:!this.data.allSelectedBtn,
totalPrice,
nowAddListId
})
},
// 左侧购物车打开弹窗
openPopup() {
// this.getCount()
let gwcList = this.data.gwcList
let status = gwcList.every(el => el.selected === 1)
this.setData({
showPopup:!this.data.showPopup,
allSelectedBtn:status?true:false,
})
},
// 获取历史购物车详情
getCount() {
commonApi.user_post('cart_within/get_list', {
type:this.data.type
}).then(res => {
let arr = res.data,totalPrice = 0,cartCount=0
if (arr.length>0) {
arr.forEach(item=> {
// totalPrice += item.num*item.sku.price
cartCount += item.num
})
}
arr.forEach(item=> {
if (this.data.nowAddListId.some(s => +s === +item.sku_id) ) {
item.selected = 1
}
})
arr.forEach(item=> {
if (item.selected == 1) {
totalPrice += item.num*item.sku.price
}
})
// console.log(arr);
// debugger
this.setData({
cartCount: cartCount, //1
gwcList:arr,
allSelectedBtn:false,
totalPrice
})
})
},
search() {
this.setData({
list:[]
})
this.getList()
},
searchInput(e) {
this.setData({
keywords:e.detail.value
})
},
getList() {
this.setData({
show:false
})
let list= this.data.list;
if (this.data.keywords == '' || this.data.keywords.indexOf(' ')!==-1) {
return
}
if(list.length>=this.data.total) return;
commonApi._post("product/get_product_by_tag",{
tag_id:this.data.tag_id, //标签的ID
offset:this.data.list.length, //起始查询
limit: 10, //查询数量
title:this.data.keywords.length>0 ? this.data.keywords : '', //搜索产品名称
}).then(res=>{
res.data.list.map(item=>{
item.display_tags = item.display_tags?item.display_tags.split(","):[];
item.display_tags = item.display_tags.splice(0,2);
})
this.setData({
list:list.concat(res.data.list),
show:true
})
console.log(this.data.list);
})
},
getHeight() {
let systemInfo = wx.getSystemInfoSync(),rect = wx.getMenuButtonBoundingClientRect();
let height = (rect.top - systemInfo.statusBarHeight) * 2 + rect.height;
this.setData({
height:height,
padHeight:systemInfo.statusBarHeight,
right:(systemInfo.screenWidth - rect.right) + rect.width
})
console.log(systemInfo,rect)
},
back: function () {
if(this.properties.clickid){
wx.uma.trackEvent(this.properties.clickid);
}
const pages = getCurrentPages();
// wx.showTabBar({})
console.log(this.properties.isIndex)
if (pages.length<=1){
wx.switchTab({
url: app.globalData.menuRoute
})
}
else {
wx.navigateBack({
delta: 1
})
}
},
// 添加产品弹窗 1.首先获取到该产品下的规格
addBuyCart(e) {
let item = e.currentTarget.dataset.item
console.log(item);
commonApi._post("product/get_product_detail", {
id: item.id
}).then(res => {
if (item.skuid) {
let sku = res.data.sku.find(skuItem => item.id == skuItem.skuid);
res.data.sku = [sku];
}
res.data.flag = res.data.sku.find(item => item.flag == 'on') ? res.data.flag : 0
this.setData({
info: res.data,
// skuFlag: "cart"
})
this.showCart()
this.BroswerRecord()
})
},
// 添加产品弹窗 2.渲染规格,未登录去登录
showCart: function () {
commonApi.user_post('wx/get_user_keep', {
jumpurl: '/pages/info/postProductInfo/index?id=' + this.data.id,
title: this.data.info.title,
type: 'mini'
}).then(res => {
if (res.data.subscribe == 0) {
this.setData({
wxqrcode: res.data.qrcode,
showQrCode: true
})
} else {
if (this.data.info.sku.length == 0) {
wx.showToast({
title: '该产品未设置规格,不能加购',
icon: 'none'
})
return;
}
this.setData({
skuFlag: "cart"
})
let that = this
wx.createSelectorQuery().select('#skuImg').boundingClientRect(function (res) {
console.log(res)
that.setData({
cartImgInfo: 'top:' + res.top + 'px;left:' + res.left + 'px;'
})
}).exec()
}
this.getCount()
})
},
// 规格弹窗切换其他规格
selectSku: function (e) {
let index = e.currentTarget.dataset.index;
this.setData({
skuIndex: index
})
},
// 关闭弹窗
hideSku: function () {
this.setData({
skuFlag: null,
cartImgInfo: null
})
},
// 减少数量
minus: function () {
if (this.data.producNum == 1) return;
this.setData({
producNum: this.data.producNum - 1
})
},
// 加数量
add: function () {
this.setData({
producNum: this.data.producNum + 1
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
this.getHeight()
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
this.setData({
show:false
})
this.getHeight()
this.getCount()
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
let ids = this.data.nowAddListId
ids = ids.map(item => Number(item));
app.globalData.nowAddListId = ids
// debugger
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
this.getList()
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})

5
subPackages/postSearch/index.json

@ -0,0 +1,5 @@
{
"usingComponents": {
}
}

135
subPackages/postSearch/index.wxml

@ -0,0 +1,135 @@
<view class="title-box{{transparent==1?' bg-box':''}}" style="height:{{isScene==1?'0':(height+padHeight)}}px;">
<view class="title-header" style="padding-top:{{padHeight}}px;height:{{height}}px">
<icon bindtap="back" class="iconfont icon-fanhui1"></icon>
<view bindtap="indexFocus" class="search-box" style="margin-right:{{right + 5}}px;">
<icon class="iconfont icon-sousuo"></icon>
<input placeholder-class="{{transparent==1?'phcolor':''}}" bindinput="searchInput" class="weui-input" placeholder="请输入商品名称" />
<!-- <input bindfocus="inputFocus" placeholder-class="{{transparent==1?'phcolor':''}}" bindinput="getVal" class="weui-input" placeholder="搜索" /> -->
<view wx:if="{{isScene!=1}}" style="display: flex;padding-right: 12rpx;">
<view style="color: #ccc;">|</view>
<view style="margin-left:22rpx;font-weight: 400;font-size: 29rpx;color: #0B898E;" bindtap="getList">搜索</view>
</view>
</view>
</view>
</view>
<view wx:if="{{show}}">
<view class="hot-list" wx:if="{{list.length>0}}">
<view class="hot-list-item" wx:for="{{2}}" wx:for-index="number" wx:key="this">
<view class="hot-item" wx:if="{{index%2==number}}" wx:for="{{list}}" bindtap="goodsDetail" data-goods="{{item}}" wx:key="id">
<image class="hot-item-img" src="{{item.headimg}}" mode="" />
<view class="hot-item-main">
<view class="hot-item-title textOver2">
{{item.title}}
</view>
<view style="display: flex;justify-content: space-between;align-items: center; ">
<view>
<text class="hot-item-price">{{item.price/100}}</text>
<text class="hot-item-market_price" wx:if="{{item.market_price && item.market_price!=0 && item.market_price>item.price}}">{{item.market_price/100}}</text>
</view>
<image class="add" catchtap="addBuyCart" data-item="{{item}}" src="https://static.ticket.sz-trip.com/uploads/20240715/3ad59eac0088d47ff4bc2fec6ffd8f56.png" mode="" />
</view>
</view>
</view>
</view>
</view>
<view wx:else style="display: flex;flex-direction: column;align-items: center;">
<image style="width:328rpx;height:450.67rpx;margin-top: 286.67rpx;" src="https://static.ticket.sz-trip.com/uploads/20240715/3750a41a89b49e9f546a6ba85d71d66e.png" mode="" />
<view style="font-family: PingFang SC;font-weight: 500;font-size: 28rpx;color: #666666;margin-top: 67rpx;">
暂无搜索结果
</view>
</view>
</view>
<view class="bottom" wx:if="{{(skuFlag != 'cart') || showPopup}}">
<!-- 左边购物车图标及价格 -->
<view class="gwc-left">
<view class="gwc" bindtap="openPopup">
<image wx:if="{{cartCount == 0}}" style="width: 100%;height: 100%;" src="https://static.ticket.sz-trip.com/uploads/20240715/520600afc4bd32ed1f44bc5985fc2ba5.png" mode="" />
<image wx:else style="width: 100%;height: 100%;" src="https://static.ticket.sz-trip.com/uploads/20240711/f9c290c64c521feae643d28f1b8c9c60.png" mode="" />
<view class="cartCount">{{cartCount}}</view>
</view>
<view style="font-weight: 500;font-size: 27rpx;color: #000000;">
总计:<text class="money">{{totalPrice/100}}</text>
</view>
<view wx:if="{{totalPrice>0}}" bindtap="openPopup">
<text style="margin-left: 16.67rpx;font-weight: 500;font-size: 27rpx;color: #0B898E;">明细</text>
<image wx:if="{{showPopup}}" style="width:17.33rpx;height:17.33rpx;margin-left:10rpx;" src="https://static.ticket.sz-trip.com/uploads/20240715/524acef87f09269f6a4fa39d0fa38c18.png" mode=""/>
<image wx:else style="width:17.33rpx;height:17.33rpx;margin-left: 10rpx;" src="https://static.ticket.sz-trip.com/uploads/20240715/080e94053d1444707d18860a73b17915.png" mode=""/>
</view>
</view>
<!-- 去结算按钮 -->
<view class="{{totalPrice == 0?'no-buy':'buy'}}" bindtap="order">去结算</view>
</view>
<!-- 规格弹窗 -->
<view class="mask" wx:if="{{skuFlag}}">
<view class="mask-bg" bindtap="hideSku" style="z-index: 9999;"></view>
<view class="mask-content" style="z-index: 99999;">
<view class="iconfont icon-close" bindtap="hideSku"></view>
<view class="sku-info-box">
<image id="skuImg" src="{{info.sku[skuIndex].headimg}}" mode="aspectFill"></image>
<view class="sku-info">
<view class="sku-price">{{info.sku[skuIndex].price/100}}
<view class="allowance" wx:if="{{allowance_data}}">
补贴价:¥{{ (1 - allowance_data.discount_rate / 100) * info.sku[skuIndex].price / 100 }}</view>
</view>
<view class="sku-name">已选择:{{info.sku[skuIndex].sku_name}}</view>
</view>
</view>
<view class="sku-names">
<view bindtap="selectSku" data-index="{{index}}" class="sku-name-item textOver{{index==skuIndex?' active':''}}" wx:for="{{info.sku}}">{{item.sku_name}}</view>
</view>
<view class="number-box">
<text>数量</text>
<view class="iconfont icon-sami-select" bindtap="minus"></view>
<view class="number">{{producNum}}</view>
<view class="iconfont icon-add-select" bindtap="add"></view>
</view>
<view style="height:138rpx"></view>
<view class="btn-box">
<!-- <view class="mask-btn" bindtap="addCart" wx:if="{{info.sku[skuIndex].flag=='on'}}">{{skuFlag=='cart'?'加入购物车':'立即购买'}}
</view> -->
<view class="mask-btn" bindtap="addCart" wx:if="{{info.sku[skuIndex].flag=='on'}}">加入购物车</view>
<view class="mask-btn disable" wx:else>该商品已下架</view>
</view>
</view>
</view>
<!-- 购物车的弹窗 -->
<view class="mask" wx:if="{{showPopup}}">
<view bindtap="openPopup" class="mask-bg"></view>
<view class="mask-content" style="padding: 40rpx 0 180rpx;min-height: 600rpx;">
<view style="margin: 0 26.67rpx;">
<!-- 顶部操作按钮 -->
<view class="flex" style="margin-bottom: 56.67rpx;">
<view class="flex">
<image bindtap="allSelected" wx:if="{{allSelectedBtn}}" style="width: 40rpx;height: 40rpx;" src="https://static.ticket.sz-trip.com/uploads/20240715/a961604bc708670cbdc76d1580eb3f3c.png" mode="" />
<view bindtap="allSelected" wx:else style="width: 40rpx;height: 40rpx;border-radius: 50%;border: 1px solid #999999;"></view>
<text class="all">全选</text>
</view>
<view class="flex" bindtap="delAll">
<image style="width:26.67rpx;height:26.67rpx;" src="https://static.ticket.sz-trip.com/uploads/20240715/3320fbf5ccf471145c3c600582cd9b65.png" mode="" />
<text class="del-all">清空</text>
</view>
</view>
<view class="gwc-item" wx:for="{{gwcList}}" wx:key="*this" bindtap="selectedIt" data-item="{{item}}">
<view style="margin-right: 26.67rpx;">
<image wx:if="{{item.selected ==1}}" style="width: 43rpx;height: 43rpx;" src="https://static.ticket.sz-trip.com/uploads/20240715/a961604bc708670cbdc76d1580eb3f3c.png" mode="" />
<view wx:else style="width: 40rpx;height: 40rpx;border-radius: 50%;border: 1px solid #999999;"></view>
</view>
<image style="width:179rpx;height: 179rpx;border-radius: 13rpx;flex-shrink: 0;margin-right: 26rpx;" src="{{item.sku.headimg}}" mode="" />
<view class="main">
<view>
<view class="title textOver">{{item.product.title}}</view>
<view class="sku-title textOver">{{item.sku.sku_name}}</view>
</view>
<view class="main-bottom">
<view class="price">{{item.sku.price/100}}</view>
<view class="num-box">
<image class="reduce" catchtap="del" data-item="{{item}}" src="https://static.ticket.sz-trip.com/uploads/20240715/054627e5d3864a9a4a8b397cae47754e.png" mode="" />
<view style="margin: 0 25.33rpx;">{{item.num}}</view>
<image class="grow" catchtap="addCart" data-item="{{item}}" src="https://static.ticket.sz-trip.com/uploads/20240715/3ad59eac0088d47ff4bc2fec6ffd8f56.png" mode="" />
</view>
</view>
</view>
</view>
</view>
</view>
</view>

474
subPackages/postSearch/index.wxss

@ -0,0 +1,474 @@
.title-box,
.title-header {
background: #ffff;
}
.bg-box,
.bg-box .title-header {
background: transparent;
color: #ccc;
}
.title-header {
position: fixed;
left: 0;
right: 0;
display: flex;
top: 0;
align-items: center;
justify-content: space-between;
font-size: 32rpx;
line-height: 90rpx;
z-index: 2;
}
.title-header .icon-fanhui1 {
padding: 0 20rpx;
font-size: 44rpx;
color: #333;
}
.right {
position: absolute;
right: 20rpx;
}
.search-box {
display: flex;
align-items: center;
margin-left: 60rpx;
width: 560rpx;
border-radius: 30rpx;
height: 60rpx;
padding: 0 20rpx;
font-size: 26rpx;
background: #F0F0F0;
}
.bg-box .search-box {
background: #F0F0F0;
}
.search-box .weui-input {
margin-left: 10rpx;
flex: 1;
width: 100%;
}
.bg-box.title-box .icon-fanhui1 {
color: white;
}
.phcolor {
color: #ccc;
}
.hot-list {
padding: 26.67rpx;
display: flex;
flex-wrap: wrap;
justify-content: space-between;
padding-bottom: 170rpx;
}
.hot-item {
margin-bottom: 20rpx;
width: 337rpx;
height: 513rpx;
background: #FFFFFF;
box-shadow: 0rpx 0rpx 9rpx 0rpx rgba(153, 153, 153, 0.33);
border-radius: 13rpx;
}
.hot-item-img {
width: 337rpx;
height: 337rpx;
background: #0B898E;
border-radius: 13rpx;
}
.hot-item-title {
font-family: PingFang SC;
font-weight: 500;
font-size: 27rpx;
color: #000000;
/* margin-bottom: 25.33rpx; */
}
.hot-item-price {
font-family: Arial;
font-weight: bold;
font-size: 33rpx;
color: #D70000;
margin-right: 12.67rpx;
}
.hot-item-price::before {
content: "¥";
font-weight: 400;
font-size: 23rpx;
}
.hot-item-market_price {
font-family: Arial;
font-weight: 400;
font-size: 21rpx;
color: #999999;
text-decoration-line: line-through;
}
.hot-item-main {
padding: 20rpx 19rpx 26.67rpx 20rpx;
display: flex;
flex-direction: column;
min-height: 140rpx;
justify-content: space-between;
}
.hot-list-item:nth-child(2) .hot-item:first-child {
width: 337rpx;
height: 373rpx;
background: #FFFFFF;
box-shadow: 0rpx 0rpx 9rpx 0rpx rgba(153, 153, 153, 0.33);
border-radius: 13rpx;
padding-bottom: 20rpx;
}
.hot-list-item:nth-child(2) .hot-item:first-child .hot-item-img {
width: 337rpx;
height: 238rpx;
background: #71B580;
border-radius: 13rpx;
}
.hot-list-item:nth-child(2) .hot-item:first-child .main {
width: 337rpx;
height: 238rpx;
background: #71B580;
border-radius: 13rpx;
}
.hot-list-item:nth-child(2) .hot-item:first-child .hot-item-main {
padding: 5rpx 19rpx 26.67rpx 15rpx;
display: flex;
flex-direction: column;
min-height: 90rpx;
justify-content: space-between;
}
.hot-list-item:nth-child(2) .hot-item:first-child .hot-item-main .hot-item-title {
margin-bottom: 20rpx;
}
.hot-list-item {
width: 337rpx;
}
.add {
width: 40rpx;
height: 40rpx;
background: #0B898E;
border-radius: 50%;
text-align: center;
line-height: 40rpx;
font-weight: 500;
font-size: 31rpx;
color: #FFFFFF;
}
.bottom {
position: fixed;
bottom: 0;
left: 0;
right: 0;
height: 167rpx;
background: #FFFFFF;
box-shadow: 0rpx 2rpx 13rpx 0rpx rgba(136, 136, 136, 0.25);
padding: 0 27.33rpx 0 26.67rpx;
display: flex;
justify-content: space-between;
align-items: center;
z-index: 666;
}
.gwc {
margin-right: 14rpx;
width: 84rpx;
height: 84rpx;
position: relative;
}
.cartCount {
width: 40rpx;
height: 40rpx;
background: #D90F01;
border-radius: 50%;
border: 1rpx solid #FFFFFF;
font-family: PingFang SC;
font-weight: 500;
font-size: 27rpx;
color: #FFFFFF;
text-align: center;
line-height: 40rpx;
position: absolute;
right: -10rpx;
top: -10rpx;
}
.gwc-left {
display: flex;
align-items: center;
}
.money {
font-weight: bold;
font-size: 47rpx;
color: #D70000;
}
.money::before {
content: "¥";
font-size: 23rpx;
font-weight: 500;
}
.buy {
width: 240rpx;
height: 83rpx;
background: #D70000;
border-radius: 42rpx;
font-family: PingFang SC;
font-weight: bold;
font-size: 32rpx;
color: #FFFFFF;
text-align: center;
line-height: 83rpx;
}
.no-buy {
width: 240rpx;
height: 83rpx;
background: #BDBDBD;
border-radius: 42rpx;
font-family: PingFang SC;
font-weight: bold;
font-size: 32rpx;
color: #FFFFFF;
text-align: center;
line-height: 83rpx;
}
.mask-content {
position: absolute;
left: 0;
right: 0;
bottom: 0;
width: 100%;
}
.mask-content .icon-close {
position: absolute;
right: 40rpx;
top: 40rpx;
}
.sku-info-box {
margin: 50rpx 40rpx;
display: flex;
justify-content: space-between;
}
.sku-info-box image {
width: 218rpx;
height: 180rpx;
border-radius: 13rpx;
display: block;
margin-right: 40rpx;
flex-shrink: 0;
}
.sku-info {
flex: 1;
}
.sku-price {
font-size: 40rpx;
font-weight: 500;
color: #D62828;
margin: 20rpx 0;
display: flex;
justify-content: flex-start;
align-items: center;
}
.sku-price::before {
content: "¥";
font-weight: 400;
font-size: 27rpx;
vertical-align: baseline;
}
.sku-price view {
font-size: 24rpx;
color: #FFFFFF;
background-color: #D62828;
border-radius: 22rpx;
line-height: 44rpx;
margin-left: 7rpx;
padding: 0 20rpx;
}
.sku-name {
font-size: 27rpx;
color: #666666;
}
.sku-names {
display: flex;
font-size: 29rpx;
color: #333;
margin: 0 40rpx;
text-align: center;
flex-wrap: wrap;
margin-bottom: 20rpx;
}
.sku-name-item {
background: #EFEFEF;
border: 1rpx solid #EFEFEF;
width: 318rpx;
line-height: 77rpx;
border-radius: 14rpx;
margin-bottom: 25rpx;
margin-right: 30rpx;
}
.sku-name-item:nth-child(2n) {
margin-right: 0;
}
.sku-name-item.active {
color: #0B898E;
border-color: #0B898E;
background: rgba(11, 137, 142, 0.1);
}
.number-box {
display: flex;
align-items: center;
border-top: 1rpx solid #ccc;
justify-content: space-between;
margin: 0 40rpx;
padding: 40rpx 0;
}
.number-box text {
flex: 1;
font-size: 29rpx;
color: #333;
}
.number-box view {
border: 1rpx solid #666;
border-radius: 7rpx;
text-align: center;
width: 67rpx;
line-height: 67rpx;
font-size: 33rpx;
color: #000;
}
.number-box view.disable {
border-color: #ccc;
color: #999;
}
.number-box view.number {
width: 94rpx;
margin: 0 15rpx;
}
.btn-box {
height: 138rpx;
background: #FFFFFF;
box-shadow: 0px 0px 16rpx 0px rgba(6, 0, 1, 0.1);
display: flex;
align-items: center;
justify-content: center;
position: fixed;
left: 0;
right: 0;
bottom: 0;
}
.mask-btn {
width: 670rpx;
line-height: 78rpx;
background: #D62828;
border-radius: 39rpx;
color: #fff;
text-align: center;
font-size: 33rpx;
font-weight: 500;
}
.mask-btn.disable {
background: #ccc;
}
.flex {
display: flex;
justify-content: space-between;
align-items: center;
}
.all {
font-family: PingFang SC;
font-weight: bold;
font-size: 37rpx;
color: #000000;
margin-left: 26rpx;
}
.del-all {
font-family: PingFang SC;
font-weight: bold;
font-size: 27rpx;
color: #999999;
margin-left: 7.33rpx;
}
.gwc-item {
display: flex;
align-items: center;
margin-bottom: 48rpx;
}
.main {
height: 179rpx;
padding: 8.67rpx 0 6.67rpx;
width: 425rpx;
display: flex;
flex-direction: column;
justify-content: space-between;
}
.main .title {
font-family: PingFang SC;
font-weight: bold;
font-size: 31rpx;
color: #2C2C2C;
margin-bottom: 18rpx;
}
.main .sku-title {
font-family: PingFang SC;
font-weight: 500;
font-size: 27rpx;
color: #999999;
}
.main-bottom {
display: flex;
width: 100%;
justify-content: space-between;
}
.num-box {
display: flex;
}
.reduce, .grow {
width: 49rpx;
height: 49rpx;
}
.main-bottom .price {
font-family: PingFangSC;
font-size: 35rpx;
color: #F84A56;
}
.main-bottom .price::before {
content: "¥";
font-size: 24rpx;
font-weight: 500;
}

173
subPackages/techanNew/index.js

@ -10,6 +10,9 @@ Page({
* 页面的初始数据
*/
data: {
height: 90,
padHeight:0,
right:0,
list:[], //获取的产品列表
total:1, //总数
keywords:"", //搜索关键字
@ -48,13 +51,15 @@ Page({
allSelectedBtn:false, //全选按钮
seachFlag:false, //搜索模式
totalPrice:0, //获取购物车总价--打开购物车后勾选的产品价格
name:'文创特产'
name:'文创特产',
nowAddListId:[]
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
app.globalData.nowAddListId = []
wx.showShareMenu({
withShareTicket: true,
menus: ['shareAppMessage', 'shareTimeline']
@ -92,6 +97,9 @@ Page({
wx.showToast({
title: '清空成功',
icon: "success"
})
this.setData({
totalPrice:0
})
this.getCount()
}
@ -156,35 +164,32 @@ Page({
type:"1"
}).then(res => {
if (res.code == 1) {
let sku_id = this.data.showPopup ? item.sku.id :this.data.info.sku[this.data.skuIndex].id
let _nowAddListId = this.data.nowAddListId
_nowAddListId.push(sku_id)
this.setData({
nowAddListId: _nowAddListId
})
commonApi.user_post('cart_within/get_list', {
type:'1'
}).then(res => {
// debugger
let cartCount = 0,totalPrice = 0,gwcList=this.data.gwcList
res.data.forEach(val=> {
cartCount+=val.num
console.log(this.data.skuFlag);
// debugger
if (!this.data.skuFlag && !this.data.showPopup) {
// debugger
if (val.sku.id == this.data.info.sku[this.data.skuIndex].id) {
console.log(this.data.nowAddListId)
if (this.data.nowAddListId.includes(val.sku.id) ) {
val.selected = 1
}
}else {
// debugger
gwcList.forEach(el=> {
if (el.id == val.id) {
val.selected = el.selected
}
})
}
// if (this.data.showPopup) {
// totalPrice += Number(val.num*val.sku.price)
// gwcList.forEach(el=> {
// if (el.id == val.id) {
// val.selected = el.selected
// }
// })
// }
})
res.data.forEach(element=> {
if (element.selected == 1) {
@ -269,10 +274,10 @@ Page({
}
})
if (product.length == 0 && product1.length == 0) {
wx.showToast({
title: '请先选择产品',
icon: 'none'
})
// wx.showToast({
// title: '请先选择产品',
// icon: 'none'
// })
return;
}
if (product.length > 0 && product1.length > 0) {
@ -305,10 +310,12 @@ Page({
allSelected() {
let gwcList = this.data.gwcList
let totalPrice = 0
let nowAddListId = []
if (this.data.allSelectedBtn) {
gwcList.forEach(item=> {
item.selected =0
})
nowAddListId = []
} else {
gwcList.forEach(item=> {
item.selected =1
@ -316,16 +323,22 @@ Page({
gwcList.forEach(item=> {
totalPrice += Number(item.num*item.sku.price)
})
gwcList.forEach(item=> {
nowAddListId.push(item.sku_id)
})
}
console.log(nowAddListId);
// debugger
this.setData({
gwcList,
allSelectedBtn:!this.data.allSelectedBtn,
totalPrice
totalPrice,
nowAddListId
})
},
// 单选一个
selectedIt(e) {
let item = e.currentTarget.dataset.item,gwcList= this.data.gwcList,totalPrice=0
let item = e.currentTarget.dataset.item,gwcList= this.data.gwcList,totalPrice=0,nowAddListId=[]
gwcList.forEach(el=> {
if (el.id == item.id) {
el.selected == 1 ? el.selected =0 : el.selected = 1
@ -336,18 +349,27 @@ Page({
totalPrice += Number(el.num*el.sku.price)
}
})
gwcList.forEach(item=> {
if (item.selected == 1) {
nowAddListId.push(item.sku_id)
}
})
console.log(nowAddListId);
let status = gwcList.every(el => el.selected === 1)
this.setData({
gwcList,
allSelectedBtn:status?true:false,
totalPrice
totalPrice,
nowAddListId
})
},
// 左侧购物车打开弹窗
openPopup() {
// this.getCount()
let gwcList = this.data.gwcList
let status = gwcList.every(el => el.selected === 1)
let status = false
if (gwcList.length>0) {
status = gwcList.every(el => el.selected === 1)
}
this.setData({
showPopup:!this.data.showPopup,
allSelectedBtn:status?true:false,
@ -361,14 +383,20 @@ Page({
tag_id:this.data.navList2[this.data.navIndex].type, //标签的ID
offset:list.length, //起始查询
limit:10, //查询数量
title:this.data.keywords //搜索产品名称
title:this.data.seachFlag ? this.data.keywords : '' //搜索产品名称
}).then(res => {
let arr = []
if (this.data.seachFlag) {
res.data.list.map(obj => {
arr = [...arr, ...obj.product]
})
}
res.data.list.map(item=>{
item.display_tags = item.display_tags?item.display_tags.split(","):[];
item.display_tags = item.display_tags.splice(0,2);
})
this.setData({
list:list.concat(res.data.list),
list:this.data.seachFlag?arr:list.concat(res.data.list),
total:res.data.total
})
})
@ -386,6 +414,7 @@ Page({
},
// 获取历史购物车详情
getCount() {
// debugger
commonApi.user_post('cart_within/get_list', {
type:'1'
}).then(res => {
@ -396,10 +425,28 @@ Page({
cartCount += item.num
})
}
if (app.globalData.nowAddListId.length>0) {
arr.map(item=> {
app.globalData.nowAddListId.forEach(val=> {
if (val == item.sku_id) {
item.selected = 1
}
})
})
// debugger
arr.forEach(item=> {
if(item.selected == 1) {
totalPrice += item.num*item.sku.price
}
})
}
// console.log(arr);
// debugger
this.setData({
cartCount: cartCount, //1
gwcList:res.data,
allSelectedBtn:false
gwcList:arr,
allSelectedBtn:false,
totalPrice:app.globalData.nowAddListId.length>0?totalPrice:0
})
})
},
@ -408,11 +455,20 @@ Page({
this.setData({
list:[],
total:1,
navIndex:0,
typeIndex:0,
// navIndex:0,
// typeIndex:0,
flag:true
})
this.getList()
this.getCount()
},
goNewSearch() {
console.log(this.data.nowAddListId);
// debugger
wx.navigateTo({
// url: "/subPackages/postSearch/index?type_id=1",
url: "/subPackages/postSearch/index?type_id=1&ids="+this.data.nowAddListId,
})
},
// 搜索
search:function(e){
@ -423,7 +479,7 @@ Page({
list:[],
total:1
})
this.onReload()
// this.onReload()
}else {
this.setData({
seachFlag:true,
@ -431,7 +487,16 @@ Page({
list:[],
total:1
})
this.getList();
// if (!this.data.flag) {
// this.getSupplierTag()
// } else {
// this.getList()
// }
}
if (!this.data.flag) {
this.getSupplierTag()
} else {
this.getList()
}
},
// 去产品详情页
@ -509,7 +574,7 @@ Page({
tag_id:this.data.seachFlag? '20,19':this.data.typeList[this.data.typeIndex].id, //标签的ID
offset:list.length, //起始查询
limit: 10, //查询数量
title:this.data.keywords, //搜索产品名称
title:this.data.seachFlag ? this.data.keywords : '', //搜索产品名称
}).then(res=>{
res.data.list.map(item=>{
item.display_tags = item.display_tags?item.display_tags.split(","):[];
@ -619,18 +684,53 @@ Page({
producNum: this.data.producNum + 1
})
},
getHeight() {
let systemInfo = wx.getSystemInfoSync(),rect = wx.getMenuButtonBoundingClientRect();
let height = (rect.top - systemInfo.statusBarHeight) * 2 + rect.height;
this.setData({
height:height,
padHeight:systemInfo.statusBarHeight,
right:(systemInfo.screenWidth - rect.right) + rect.width
})
console.log(systemInfo,rect)
},
back: function () {
if(this.properties.clickid){
wx.uma.trackEvent(this.properties.clickid);
}
const pages = getCurrentPages();
// wx.showTabBar({})
console.log(this.properties.isIndex)
if (pages.length<=1){
wx.switchTab({
url: app.globalData.menuRoute
})
}
else {
wx.navigateBack({
delta: 1
})
}
},
// lower() {
// if (this.data.flag) {
// this.getList()
// } else {
// this.getSupplierTag()
// }
// },
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
this.getHeight()
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
// this.onReload()
this.onReload()
// this.setData({
// seachFlag:false
// // list:[],
@ -640,6 +740,13 @@ Page({
// // flag:true
// })
// this.getList()
this.getHeight()
console.log(app.globalData.nowAddListId );
if (app.globalData.nowAddListId.length>0) {
// debugger
this.getCount()
}
// debugger
},
/**

44
subPackages/techanNew/index.wxml

@ -3,7 +3,21 @@
<view class="techanMain">
<view style="{{seachFlag?'':'height: 500rpx;'}}">
<search bind:onload="search" name="{{name}}"></search>
<!-- <search name="{{name}}" bindtap="goNewSearch"></search> -->
<view class="title-box{{transparent==1?' bg-box':''}}" style="height:{{isScene==1?'0':(height+padHeight)}}px;">
<view class="title-header" style="padding-top:{{padHeight}}px;height:{{height}}px">
<icon bindtap="back" class="iconfont icon-fanhui1"></icon>
<view bindtap="goNewSearch" class="search-box" style="margin-right:{{right + 5}}px;">
<icon class="iconfont icon-sousuo"></icon>
<view class="weui-input" style="color: #999;font-weight: 400;font-size: 27rpx;">请输入商品名称</view>
<!-- <input placeholder-class="{{transparent==1?'phcolor':''}}" class="weui-input" placeholder="搜索" /> -->
<view wx:if="{{isScene!=1}}" style="display: flex;padding-right: 12rpx;">
<view style="color: #ccc;">|</view>
<view style="margin-left:22rpx;font-weight: 400;font-size: 29rpx;color: #0B898E;">搜索</view>
</view>
</view>
</view>
</view>
<image wx:if="{{!seachFlag}}" class="heaimg" src="https://static.ticket.sz-trip.com/uploads/20240710/a39dd5504c4baa66dd239153d2d20787.png" mode="widthFix"></image>
</view>
@ -14,7 +28,8 @@
<view wx:for="{{flag?navList:navList2}}" wx:key="*this" bindtap="changeNav" data-index="{{index}}" class="{{index == navIndex ? 'seld-nav':'nav'}}">{{item.title}}</view>
</view>
<!-- 店铺--产品 切换 -->
<image bindtap="changeStyle" class="changeStyle" src="https://static.ticket.sz-trip.com/uploads/20240710/62bb38d5f88754e57447a26b14176aa2.png" mode="" />
<image wx:if="{{flag}}" bindtap="changeStyle" class="changeStyle" src="https://static.ticket.sz-trip.com/uploads/20240710/62bb38d5f88754e57447a26b14176aa2.png" mode="" />
<image wx:else bindtap="changeStyle" class="changeStyle" src="https://static.ticket.sz-trip.com/uploads/20240717/a092bdcdbac0bb26573f8997f3d4ba38.png" mode="" />
</view>
<!-- 产品部分 -->
<view wx:if="{{flag}}" style="flex: 1; display: flex; overflow: hidden;">
@ -31,8 +46,8 @@
</scroll-view>
</view>
<!-- 右侧产品列表 -->
<view class="list" style="width: 100%;">
<scroll-view scroll-y="true" style="height: 100%" bindscrolltoupper="upper" bindscrolltolower="lower" bindscroll="scroll">
<view class="list" style="width: 100%;height:100%; overflow: hidden;padding-bottom: 30rpx;">
<scroll-view scroll-y="true" style="height: 100%" bindscrolltoupper="upper" bindscrolltolower="getList" bindscroll="scroll">
<view class="item" wx:for="{{list}}" wx:key="*this" bindtap="goodsDetail" data-goods="{{item}}">
<image class="img" src="{{item.headimg}}" mode="" />
<view class="content">
@ -42,7 +57,7 @@
<view class="item-bottom">
<view class="price">
<text class="current-price">{{item.price/100}}</text>
<text class="original-price">¥{{item.market_price/100}}</text>
<text class="original-price" wx:if="{{item.market_price && item.market_price!=0 && item.market_price>item.price}}">¥{{item.market_price/100}}</text>
</view>
<view class="add" catchtap="addBuyCart" data-item="{{item}}">+</view>
</view>
@ -98,7 +113,7 @@
<view style="display: flex;justify-content: space-between;align-items: center; ">
<view>
<text class="hot-item-price">{{item.price/100}}</text>
<text class="hot-item-market_price">{{item.market_price/100}}</text>
<text class="hot-item-market_price" wx:if="{{item.market_price && item.market_price!=0 && item.market_price>item.price}}">{{item.market_price/100}}</text>
</view>
<image class="add" catchtap="addBuyCart" data-item="{{item}}" src="https://static.ticket.sz-trip.com/uploads/20240715/3ad59eac0088d47ff4bc2fec6ffd8f56.png" mode="" />
</view>
@ -127,14 +142,15 @@
<view style="font-weight: 500;font-size: 27rpx;color: #000000;">
总计:<text class="money">{{totalPrice/100}}</text>
</view>
<!-- <view style="margin-left: 16.67rpx;font-family: PingFang SC;font-weight: 500;font-size: 27rpx;color: #0B898E;" bindtap="openPopup">
<text>明细</text>
<image wx:if="{{showPopup}}" style="width:17.33rpx;height:17.33rpx;margin-left: 10rpx;" src="https://static.ticket.sz-trip.com/uploads/20240715/524acef87f09269f6a4fa39d0fa38c18.png" mode="" />
<image wx:else style="width:17.33rpx;height:17.33rpx;margin-left: 10rpx;" src="https://static.ticket.sz-trip.com/uploads/20240715/080e94053d1444707d18860a73b17915.png" mode="" />
</view> -->
<view wx:if="{{totalPrice>0}}" bindtap="openPopup">
<text style="margin-left: 16.67rpx;font-weight: 500;font-size: 27rpx;color: #0B898E;">明细</text>
<image wx:if="{{showPopup}}" style="width:17.33rpx;height:17.33rpx;margin-left:10rpx;" src="https://static.ticket.sz-trip.com/uploads/20240715/524acef87f09269f6a4fa39d0fa38c18.png" mode=""/>
<image wx:else style="width:17.33rpx;height:17.33rpx;margin-left: 10rpx;" src="https://static.ticket.sz-trip.com/uploads/20240715/080e94053d1444707d18860a73b17915.png" mode=""/>
</view>
</view>
<!-- 去结算按钮 -->
<view class="{{cartCount == 0?'no-buy':'buy'}}" bindtap="order">去结算</view>
<view wx:if="{{totalPrice==0}}" class="no-buy">去结算</view>
<view wx:else class="buy" bindtap="order">去结算</view>
</view>
</view>
<!-- 规格弹窗 -->
@ -195,8 +211,8 @@
<image style="width:179rpx;height: 179rpx;border-radius: 13rpx;flex-shrink: 0;margin-right: 26rpx;" src="{{item.sku.headimg}}" mode="" />
<view class="main">
<view>
<view class="title">{{item.product.title}}</view>
<view class="sku-title">{{item.sku.sku_name}}</view>
<view class="title textOver">{{item.product.title}}</view>
<view class="sku-title textOver">{{item.sku.sku_name}}</view>
</view>
<view class="main-bottom">
<view class="price">{{item.sku.price/100}}</view>

57
subPackages/techanNew/index.wxss

@ -683,3 +683,60 @@ page {
.hot-list-item {
width: 337rpx;
}
.title-box,.title-header{
background: #ffff;
}
.bg-box,.bg-box .title-header {
background: transparent;
color: #ccc;
}
.title-header {
position: fixed;
left: 0;
right: 0;
display: flex;
top: 0;
align-items: center;
justify-content: space-between;
font-size: 32rpx;
line-height: 90rpx;
z-index: 2;
}
.title-header .icon-fanhui1 {
padding: 0 20rpx;
font-size: 44rpx;
color: #333;
}
.right {
position: absolute;
right: 20rpx;
}
.search-box {
display: flex;
align-items: center;
margin-left: 60rpx;
width: 560rpx;
border-radius: 30rpx;
height: 60rpx;
padding: 0 20rpx;
font-size: 26rpx;
background: #F0F0F0;
}
.bg-box .search-box {
background: #F0F0F0;
}
.search-box .weui-input {
margin-left: 10rpx;
flex: 1;
width: 100%;
}
.bg-box.title-box .icon-fanhui1 {
color: white;
}
.phcolor {
color: #ccc;
}

Loading…
Cancel
Save