Commit 0539e015 by 谢中龙

修改装修tab分类

parent 3e88a042
// component/tabSort/tabSort.js
var app = getApp()
const wxService = require('../../utils/wxService')
const utils = require('../../utils/util')
const utilLink = require('../../utils/currentLinkRouter')
const envInfo = require('../../config/index').envInfo
Component({
/**
* 组件的属性列表
*/
properties: {
currentHasUserInfo:{
type: Boolean,
type: false
},
categoryTab: {
type: Object,
value: null
},
currHomePageId: {
type: String,
value: ''
},
categoryTabFixed : {
type: Boolean,
type: false
}
},
observers:{
categoryTabFixed(val){},
},
attached() {
const { categoryTab } = this.data
let currentTab = categoryTab && categoryTab.categorys || []
currentTab.forEach(item => {
// 存在 row 处理数据 8 商品 9 分类
let newRow = null
if (item.link) {
if (item.link.type == 2) {
// 父组件 更新
const urls = getCurrentPages()
const currentPath = urls[0]
const pageId = item.link.url
item.link.newPath = `/${currentPath.route}`
}
return
} else if (item.row) {
newRow = JSON.parse(item.row)
if (newRow.type == 8) {
newRow.newPath = '/pages/productDetail/productDetail'
} else if (newRow.type == 9) {
newRow.newPath = '/subPackage/page/pages/categoryPro/categoryPro'
}
item.row = newRow
}
})
// 当前匹配路径是否需要授权 true 需要 false 不需要
currentTab.forEach(item => {
let checkUrl = ''
if (item.link) {
checkUrl = item.link.newPath ? item.link.newPath : item.link.url
} else if (item.row) {
checkUrl = item.row.newPath ? item.row.newPath : item.row.url
}
wxService.NoLoginPage(checkUrl).then(res => {
if(checkUrl) item.needAuth = res.needAuth
this.setData({ categoryList: currentTab })
})
})
},
/**
* 组件的初始数据
*/
data: {
// currentTab: 0,
currentTab: 99,
isAuthorization: false, // false 不显示 true 显示
categoryList: [],
proData : [{"productId":"713097736978829312","brandId":"1002","productName":"连体衣工装服九分裤套装阔腿两件套洋气男装一套搭配帅气痞帅春季","subtitle":"连体衣工装服九分裤套装阔腿两件套洋气男装一套搭配帅气痞帅春季","brandName":"舞象云","productCode":"N100000002","productStatus":2,"productStatusDesc":"上架","productSku":[{"skuId":"713097736987217920","brandId":"1002","productId":"713097736978829312","skuCode":"N100000002S","stock":3000,"salePrice":11800,"picUrl":"https://img3.bigaka.com/test/1002/202005/20200521/10020e85e297-8406-4cb3-9928-9026b5f708ce.jpg","specValue":"619553340640202752###713097322363621376"},{"skuId":"713097736987217921","brandId":"1002","productId":"713097736978829312","skuCode":"N100000002M","stock":3000,"salePrice":11800,"picUrl":"https://img3.bigaka.com/test/1002/202005/20200521/10022d68e624-3980-4e12-98e8-ed940dd574d3.jpg","specValue":"619553340640202752###713097343280484352"},{"skuId":"713097736987217922","brandId":"1002","productId":"713097736978829312","skuCode":"N100000002L","stock":0,"salePrice":11800,"picUrl":"https://img3.bigaka.com/test/1002/202005/20200521/1002c538ed30-0ab3-470f-8ea7-29dc34edb82b.jpg","specValue":"619553340640202752###713097370799443968","activityPrice":200,"activityId":"713766939025084416"},{"skuId":"713097736987217923","brandId":"1002","productId":"713097736978829312","skuCode":"N100000003S","stock":2,"salePrice":11800,"picUrl":"https://img3.bigaka.com/test/1002/202005/20200521/10021b4b197d-cb59-4bab-8874-d44ad0e17fd3.jpg","specValue":"621298810911592448###713097322363621376","activityPrice":250,"activityId":"713766939025084416"},{"skuId":"713097736987217924","brandId":"1002","productId":"713097736978829312","skuCode":"N100000003M","stock":2999,"salePrice":11800,"picUrl":"https://img3.bigaka.com/test/1002/202005/20200521/1002181efa14-d8aa-41dc-8ce8-3d6a35e1a9a8.jpg","specValue":"621298810911592448###713097343280484352"},{"skuId":"713097736987217925","brandId":"1002","productId":"713097736978829312","skuCode":"N100000003L","stock":3000,"salePrice":11800,"picUrl":"https://img3.bigaka.com/test/1002/202005/20200521/1002a1e19aad-41ff-4a0b-8863-5d2aa4e76243.jpg","specValue":"621298810911592448###713097370799443968"},{"skuId":"713097736987217926","brandId":"1002","productId":"713097736978829312","skuCode":"N100000004S","stock":3000,"salePrice":11800,"picUrl":"https://img3.bigaka.com/test/1002/202005/20200521/1002039ac693-ba64-4a96-a45b-eec8301529f2.jpg","specValue":"713097244907409408###713097322363621376"},{"skuId":"713097736987217927","brandId":"1002","productId":"713097736978829312","skuCode":"N100000004M","stock":3000,"salePrice":11800,"picUrl":"https://img3.bigaka.com/test/1002/202005/20200521/1002b506d83f-8886-412f-bf19-b4e957a874b5.jpg","specValue":"713097244907409408###713097343280484352"},{"skuId":"713097736987217928","brandId":"1002","productId":"713097736978829312","skuCode":"N100000004L","stock":3000,"salePrice":11800,"picUrl":"https://img3.bigaka.com/test/1002/202005/20200521/1002b506d83f-8886-412f-bf19-b4e957a874b5.jpg","specValue":"713097244907409408###713097370799443968"}],"minSalePrice":11800,"maxSalePrice":11800,"productType":1,"remark":"连体衣工装服九分裤套装阔腿两件套洋气男装一套搭配帅气痞帅春季","isLimit":0,"limitType":1,"indexUrl":"https://img3.bigaka.com/test/1002/202005/20200521/1002b506d83f-8886-412f-bf19-b4e957a874b5.jpg","descHtml":"<p><img src=\"https://img3.bigaka.com/test/1002/202005/20200521/10022db4c7ac-c9d7-43df-a201-0c3f22cf9d0f.jpg\"><img src=\"https://img3.bigaka.com/test/1002/202005/20200521/1002f5118ed5-9026-4c6e-9520-0a5c139d5859.jpg\"><img src=\"https://img3.bigaka.com/test/1002/202005/20200521/1002d707a521-ba22-4b93-b108-9018a6880882.jpg\"><img src=\"https://img3.bigaka.com/test/1002/202005/20200521/100218c3a1a7-f5a1-44c3-aa02-75a4eddb7708.jpg\"></p>","stock":21001,"sort":100,"saleNum":3,"isFlashSale":true,"minActivityPrice":200,"activityResidueStock":0,"createTime":"2020-05-21 18:35:49","updateTime":"2020-05-23 16:08:48"},{"productId":"713096039405588480","brandId":"1002","productName":"夏季薄款冰丝九分裤男潮牌束脚修身小脚裤网红抖音潮流宽松裤子男","subtitle":"夏季薄款冰丝九分裤男潮牌束脚修身小脚裤网红抖音潮流宽松裤子男","brandName":"舞象云","productCode":"N1000001","productStatus":2,"productStatusDesc":"上架","productSku":[{"skuId":"713096039418171392","brandId":"1002","productId":"713096039405588480","skuCode":"N1000000001","stock":2000,"salePrice":100,"picUrl":"https://img3.bigaka.com/test/1002/202005/20200521/1002a1d219a9-5570-40ad-a9f2-0d26bf5a6695.jpg","specValue":"619893244213596160###619553314006372352","activityPrice":100,"activityId":"714555275071328256"},{"skuId":"713096039418171393","brandId":"1002","productId":"713096039405588480","skuCode":"N1000000002","stock":2000,"salePrice":200,"picUrl":"https://img3.bigaka.com/test/1002/202005/20200521/100201859271-3a5e-457f-8650-0dd970b52898.jpg","specValue":"619893244213596160###681942404550496256","activityPrice":200,"activityId":"714555275071328256"},{"skuId":"713096039418171394","brandId":"1002","productId":"713096039405588480","skuCode":"N1000000003","stock":2000,"salePrice":300,"picUrl":"https://img3.bigaka.com/test/1002/202005/20200521/10023b2554b8-78f2-407d-b7f3-0290608f65d7.jpg","specValue":"713095793946529792###619553314006372352","activityPrice":300,"activityId":"714555275071328256"},{"skuId":"713096039418171395","brandId":"1002","productId":"713096039405588480","skuCode":"N1000000004","stock":2000,"salePrice":400,"picUrl":"https://img3.bigaka.com/test/1002/202005/20200521/10020ee17287-187f-4c62-b7ff-70319321df60.jpg","specValue":"713095793946529792###681942404550496256","activityPrice":400,"activityId":"714555275071328256"}],"minSalePrice":5990,"maxSalePrice":5990,"productType":1,"remark":"夏季薄款冰丝九分裤男潮牌束脚修身小脚裤网红抖音潮流宽松裤子男","isLimit":0,"limitType":1,"indexUrl":"https://img3.bigaka.com/test/1002/202005/20200521/10026663f868-1010-406d-b136-7b0971b80aef.jpg","descHtml":"<p><img src=\"https://img3.bigaka.com/test/1002/202005/20200521/1002970101f4-9fd9-42a3-9703-ad955288f0c4.jpg\"><img src=\"https://img3.bigaka.com/test/1002/202005/20200521/1002f18be110-a95f-4239-9b6d-4f6a745eab5d.jpg\"><img src=\"https://img3.bigaka.com/test/1002/202005/20200521/1002b4fbfab6-e2ce-48a2-a163-cf29e6f2213a.jpg\"></p>","stock":8000,"sort":0,"saleNum":0,"isFlashSale":true,"minActivityPrice":100,"activityResidueStock":0,"createTime":"2020-05-21 18:29:04","updateTime":"2020-05-21 18:29:04"},{"productId":"692321154874216448","brandId":"1002","productName":"燃油三轮车【高速低速切换】","subtitle":"燃油三轮车【高速低速切换】","brandName":"舞象云","productCode":"SLC20200325","productStatus":2,"productStatusDesc":"上架","productSku":[{"skuId":"692321154882605056","brandId":"1002","productId":"692321154874216448","skuCode":"SLCRED1001","stock":999,"salePrice":344900,"picUrl":"https://img3.bigaka.com/test/1002/202003/20200325/1002eba3a4f8-7ce3-402e-8678-f93e3cb2f697.jpg","specValue":"619553297388408832###692320753231859712"},{"skuId":"692321154882605057","brandId":"1002","productId":"692321154874216448","skuCode":"SLCRED1002","stock":998,"salePrice":529900,"picUrl":"https://img3.bigaka.com/test/1002/202003/20200325/1002eba3a4f8-7ce3-402e-8678-f93e3cb2f697.jpg","specValue":"619553297388408832###692320794210078720"},{"skuId":"692321154882605058","brandId":"1002","productId":"692321154874216448","skuCode":"SLCYEL1001","stock":993,"salePrice":344900,"picUrl":"https://img3.bigaka.com/test/1002/202003/20200325/1002eba3a4f8-7ce3-402e-8678-f93e3cb2f697.jpg","specValue":"621298810911592448###692320753231859712"},{"skuId":"692321154882605059","brandId":"1002","productId":"692321154874216448","skuCode":"SLCYEL1002","stock":999,"salePrice":529900,"picUrl":"https://img3.bigaka.com/test/1002/202003/20200325/1002eba3a4f8-7ce3-402e-8678-f93e3cb2f697.jpg","specValue":"621298810911592448###692320794210078720"},{"skuId":"692321154882605060","brandId":"1002","productId":"692321154874216448","skuCode":"SLCGRE1001","stock":1000,"salePrice":344900,"picUrl":"https://img3.bigaka.com/test/1002/202003/20200325/1002eba3a4f8-7ce3-402e-8678-f93e3cb2f697.jpg","specValue":"619553340640202752###692320753231859712"},{"skuId":"692321154882605061","brandId":"1002","productId":"692321154874216448","skuCode":"SLCGRE1002","stock":997,"salePrice":529900,"picUrl":"https://img3.bigaka.com/test/1002/202003/20200325/1002eba3a4f8-7ce3-402e-8678-f93e3cb2f697.jpg","specValue":"619553340640202752###692320794210078720"}],"minSalePrice":344900,"maxSalePrice":529900,"productType":1,"remark":"燃油三轮车【高速低速切换】燃油三轮车【高速低速切换】燃油三轮车【高速低速切换】","isLimit":0,"limitType":1,"indexUrl":"https://img3.bigaka.com/test/1002/202003/20200325/1002eba3a4f8-7ce3-402e-8678-f93e3cb2f697.jpg","descHtml":"<p><img src=\"https://img3.bigaka.com/test/1002/202003/20200325/1002dcdf0a46-ae3f-409f-8860-ce9a7ae429f2.jpg\"><img src=\"https://img3.bigaka.com/test/1002/202003/20200325/1002f338322d-fd7b-4917-854a-37c5aa6585c6.jpg\"></p>","stock":5986,"sort":0,"saleNum":0,"isFlashSale":false,"activityResidueStock":0,"createTime":"2020-03-25 10:37:06","updateTime":"2020-03-25 10:37:06","markTagInfo":{"tagPicUrl":"https://img3.bigaka.com/test/1002/202005/20200521/1002a564efe1-d21c-4d93-81ad-0f1953327b64.png","tagType":2,"assignPrice":99990,"tagName":"左下角显示当前金额"}},{"productId":"684048655845691392","brandId":"1002","productName":"男鞋潮时尚流行","subtitle":"男鞋潮时尚流行","brandName":"舞象云","productCode":"nan100020101","productStatus":2,"productStatusDesc":"上架","productSku":[{"skuId":"685426180995944448","brandId":"1002","productId":"684048655845691392","skuCode":"b5252525","stock":98,"salePrice":58,"picUrl":"https://img3.bigaka.com/test/1002/202003/20200302/10024c105cb4-d05a-4064-b291-9c8866c027cd.jpg","specValue":"619893244213596160###619553314006372352"},{"skuId":"685426180995944449","brandId":"1002","productId":"684048655845691392","skuCode":"h5252524","stock":78,"salePrice":58,"picUrl":"https://img3.bigaka.com/test/1002/202003/20200302/10024c105cb4-d05a-4064-b291-9c8866c027cd.jpg","specValue":"619893244213596160###619553297388408832"}],"minSalePrice":58,"maxSalePrice":58,"productType":1,"remark":"中大奖哇卡进到你加圣诞节卡萨丁按时打算打算","isLimit":0,"limitType":1,"indexUrl":"https://img3.bigaka.com/test/1002/202003/20200302/10024c105cb4-d05a-4064-b291-9c8866c027cd.jpg","descHtml":"<p><img src=\"https://img3.bigaka.com/test/1002/202003/20200302/1002b6479915-093d-4f49-8c37-18411eb6502f.jpg\"></p><p><img src=\"https://img3.bigaka.com/test/1002/202003/20200302/10028eaa8531-3bab-410e-9151-dcece3b4a390.jpg\"></p>","stock":176,"sort":0,"saleNum":8,"isFlashSale":false,"activityResidueStock":0,"createTime":"2020-03-02 14:45:09","updateTime":"2020-05-08 19:17:03","markTagInfo":{"tagPicUrl":"https://img3.bigaka.com/test/1002/202005/20200521/1002b092f1c2-3c92-4acd-9703-0cfa7f2792b2.png","tagType":1,"assignPrice":1880,"tagName":"固定样式营销标签"}},{"productId":"684047015461785600","brandId":"1002","productName":"测试商品鞋子","subtitle":"测试商品鞋子","brandName":"舞象云","productCode":"test100101012","productStatus":2,"productStatusDesc":"上架","productSku":[{"skuId":"688698094942162944","brandId":"1002","productId":"684047015461785600","skuCode":"b10010101","stock":9947,"salePrice":100,"picUrl":"https://img3.bigaka.com/test/1002/202003/20200302/1002c503d764-c600-4efb-a02b-339ed03b7e9b.jpg","specValue":"619893244213596160###621369403400916992"},{"skuId":"688698094942162945","brandId":"1002","productId":"684047015461785600","skuCode":"h10010101","stock":9985,"salePrice":10,"picUrl":"https://img3.bigaka.com/test/1002/202003/20200302/1002c503d764-c600-4efb-a02b-339ed03b7e9b.jpg","specValue":"619893244213596160###621369454760300544"}],"minSalePrice":10,"maxSalePrice":100,"productType":1,"remark":"这是上陡坡【发到你的空间的阿萨德阿萨德阿萨德按时大大是","isLimit":0,"limitType":1,"indexUrl":"https://img3.bigaka.com/test/1002/202003/20200302/1002c503d764-c600-4efb-a02b-339ed03b7e9b.jpg","descHtml":"<p><img src=\"https://img3.bigaka.com/test/1002/202003/20200302/1002bc90892a-6339-4554-ab19-9aad3a4f4526.jpg\"></p><video class=\"ql-video\" controls=\"controls\" type=\"video/mp4\" src=\"https://img3.bigaka.com/test/1002/202003/20200315/100265c9b883-58c5-42e4-b97e-6c58b3b89de9.mp4\"></video><p><br></p><p><img src=\"https://img3.bigaka.com/test/1002/202003/20200302/1002b1f2d13b-d149-4977-81dd-bd1e12af4718.jpg\"></p>","stock":19932,"sort":0,"saleNum":53,"isFlashSale":false,"activityResidueStock":0,"createTime":"2020-03-02 14:38:37","updateTime":"2020-05-09 14:18:09","markTagInfo":{"tagPicUrl":"https://img3.bigaka.com/test/1002/202005/20200521/1002b092f1c2-3c92-4acd-9703-0cfa7f2792b2.png","tagType":1,"assignPrice":1850,"tagName":"固定样式营销标签"}},{"productId":"647096699302580224","brandId":"1002","productName":"夫妻肺片","subtitle":"夫妻肺片","brandName":"舞象","productCode":"WXFQFP","productStatus":2,"productStatusDesc":"上架","productSku":[{"skuId":"684048047436599296","brandId":"1002","productId":"647096699302580224","skuCode":"w10000","stock":189,"salePrice":1,"picUrl":"https://img3.bigaka.com/test/1002/202005/20200521/10023c0bd56b-b440-4eb1-92a4-6cefacbbaf4a.jpg","specValue":"1556091435012008"}],"minSalePrice":1,"maxSalePrice":1,"productType":1,"remark":"这个是备注","isLimit":0,"limitType":1,"indexUrl":"https://img3.bigaka.com/test/1002/202005/20200521/10023c0bd56b-b440-4eb1-92a4-6cefacbbaf4a.jpg","descHtml":"<p>夫妻肺片&nbsp;<span style=\"background-color: rgb(255, 255, 255); color: rgb(102, 102, 102);\">编辑</span>&nbsp;<a href=\"https://baike.baidu.com/planet/talk?lemmaId=120778\" rel=\"noopener noreferrer\" target=\"_blank\" style=\"background-color: rgb(255, 255, 255); color: rgb(102, 102, 102);\">讨论</a></p><p><a href=\"https://baike.baidu.com/planet/talk?lemmaId=120778\" rel=\"noopener noreferrer\" target=\"_blank\" style=\"color: rgb(255, 255, 255); background-color: rgb(243, 79, 29);\">64</a></p><p>夫妻肺片<em>(Sliced beef and ox organs in chili sauce)</em><span style=\"color: rgb(51, 102, 204);\">&nbsp;[1]</span><span style=\"color: rgb(19, 110, 194);\">&nbsp;</span>&nbsp;<em>,</em>是一道四川<a href=\"https://baike.baidu.com/item/%E6%88%90%E9%83%BD/128473\" rel=\"noopener noreferrer\" target=\"_blank\" style=\"color: rgb(19, 110, 194);\">成都</a>名菜,由郭朝华、张田政夫妻创制而成。通常以牛头皮、<a href=\"https://baike.baidu.com/item/%E7%89%9B%E5%BF%83/7175624\" rel=\"noopener noreferrer\" target=\"_blank\" style=\"color: rgb(19, 110, 194);\">牛心</a>、<a href=\"https://baike.baidu.com/item/%E7%89%9B%E8%88%8C/9754964\" rel=\"noopener noreferrer\" target=\"_blank\" style=\"color: rgb(19, 110, 194);\">牛舌</a>、<a href=\"https://baike.baidu.com/item/%E7%89%9B%E8%82%9A/4101516\" rel=\"noopener noreferrer\" target=\"_blank\" style=\"color: rgb(19, 110, 194);\">牛肚</a>、<a href=\"https://baike.baidu.com/item/%E7%89%9B%E8%82%89/1008026\" rel=\"noopener noreferrer\" target=\"_blank\" style=\"color: rgb(19, 110, 194);\">牛肉</a>为主料,进行卤制,而后切片。再配以<a href=\"https://baike.baidu.com/item/%E8%BE%A3%E6%A4%92%E6%B2%B9/5328179\" rel=\"noopener noreferrer\" target=\"_blank\" style=\"color: rgb(19, 110, 194);\">辣椒油</a>、<a href=\"https://baike.baidu.com/item/%E8%8A%B1%E6%A4%92%E9%9D%A2/7241289\" rel=\"noopener noreferrer\" target=\"_blank\" style=\"color: rgb(19, 110, 194);\">花椒面</a>等辅料制成红油浇在上面。其制作精细,色泽美观,质嫩味鲜,麻辣浓香,非常适口。</p><p>2017年5月,美国《GQ》杂志发布了餐饮品赏大师BrettMartin最新出炉的“美国2017餐饮排行榜”,位于休斯敦的PepperTwins双椒川菜馆的招牌凉菜“夫妻肺片”荣登榜首,被评选为“年度开胃菜”(Appetizer of the Year)。这道菜的英文名被翻译成“史密斯夫妇”(Mr and Mrs Smith)。</p><p>2018年9月10日,“中国菜”正式发布,“夫妻肺片“被评为“中国菜”四川十大经典名菜。<span style=\"color: rgb(51, 102, 204);\">&nbsp;[2]</span></p><h2>菜品历史</h2><p><span style=\"background-color: rgb(255, 255, 255); color: rgb(136, 136, 136);\">编辑</span></p><p><a href=\"https://baike.baidu.com/pic/%E5%A4%AB%E5%A6%BB%E8%82%BA%E7%89%87/120778/0/4b90f603738da977e9ee9ac8be51f8198718e314?fr=lemma&amp;ct=single\" rel=\"noopener noreferrer\" target=\"_blank\" style=\"color: rgb(19, 110, 194);\"><img src=\"https://gss0.bdstatic.com/94o3dSag_xI4khGkpoWK1HF6hhy/baike/s%3D220/sign=cb2984bdd3c451daf2f60be986ff52a5/4b90f603738da977e9ee9ac8be51f8198718e314.jpg\" alt=\"夫妻肺片\"></a></p><p><span style=\"color: rgb(85, 85, 85);\">夫妻肺片</span></p><p><a href=\"https://baike.baidu.com/pic/%E5%A4%AB%E5%A6%BB%E8%82%BA%E7%89%87/120778/0/0823dd54564e925809ac77479482d158cdbf4efb?fr=lemma&amp;ct=single\" rel=\"noopener noreferrer\" target=\"_blank\" style=\"color: rgb(19, 110, 194);\"><img src=\"https://gss0.bdstatic.com/94o3dSag_xI4khGkpoWK1HF6hhy/baike/s%3D220/sign=e9080f767e094b36df921cef93cd7c00/0823dd54564e925809ac77479482d158cdbf4efb.jpg\"></a></p><p>相传,清朝末年,<a href=\"https://baike.baidu.com/item/%E6%88%90%E9%83%BD/128473\" rel=\"noopener noreferrer\" target=\"_blank\" style=\"color: rgb(19, 110, 194);\">成都</a>街头巷尾有许多挑担、提篮叫卖凉拌肺片的小贩。用成本低廉的牛杂碎边角料,经清洗、卤煮后切片,佐以酱油、红油、辣椒、花椒面、芝麻面等拌食,风味别致,价廉物美,特别受到拉黄包车、脚夫和穷苦学生们的喜食。</p><p><br></p><p><a href=\"https://baike.baidu.com/pic/%E5%A4%AB%E5%A6%BB%E8%82%BA%E7%89%87/120778/21865004/3ac79f3df8dcd100c760f129788b4710b9122f3d?fr=lemma&amp;ct=cover\" rel=\"noopener noreferrer\" target=\"_blank\" style=\"color: rgb(19, 110, 194);\"><img src=\"https://gss1.bdstatic.com/-vo3dSag_xI4khGkpoWK1HF6hhy/baike/s%3D220/sign=8e1f88b7865494ee8322081b1df4e0e1/3ac79f3df8dcd100c760f129788b4710b9122f3d.jpg\" alt=\"夫妻肺片\"></a></p><p><a href=\"https://baike.baidu.com/pic/%E5%A4%AB%E5%A6%BB%E8%82%BA%E7%89%87/120778/21865004/3ac79f3df8dcd100c760f129788b4710b9122f3d?fr=lemma&amp;ct=cover\" rel=\"noopener noreferrer\" target=\"_blank\" style=\"color: rgb(19, 110, 194);\">夫妻肺片</a><a href=\"https://baike.baidu.com/pic/%E5%A4%AB%E5%A6%BB%E8%82%BA%E7%89%87/120778/21865004/3ac79f3df8dcd100c760f129788b4710b9122f3d?fr=lemma&amp;ct=cover\" rel=\"noopener noreferrer\" target=\"_blank\" style=\"color: gray;\">(6张)</a></p><p><br></p><p>20世纪30年代,成都人郭朝华和妻子一道以制售<a href=\"https://baike.baidu.com/item/%E5%87%89%E6%8B%8C\" rel=\"noopener noreferrer\" target=\"_blank\" style=\"color: rgb(19, 110, 194);\">凉拌</a>肺片为业,他们夫妻俩亲自操作,走街串巷,提篮叫卖。由于选用牛肉铺的边角料做食材,价格便宜、味道好,颇受欢迎。人们就将这种凉拌牛杂称为“夫妻废片”。因为“废片”二字不好听,再加上食材中有牛肺片,便取‘废’的谐音‘肺’,改名为“夫妻肺片”。后来,他们发现<a href=\"https://baike.baidu.com/item/%E7%89%9B%E8%82%BA/10861040\" rel=\"noopener noreferrer\" target=\"_blank\" style=\"color: rgb(19, 110, 194);\">牛肺</a>的口感不好,便取消了牛肺。</p><p>1933年,郭氏夫妇在成都半边桥附近(今<a href=\"https://baike.baidu.com/item/%E4%BA%BA%E6%B0%91%E5%85%AC%E5%9B%AD/8819436\" rel=\"noopener noreferrer\" target=\"_blank\" style=\"color: rgb(19, 110, 194);\">人民公园</a>后门右侧)设店出售,店名正式取名为“夫妻肺片”,牌匾为金字黑底,由书法家<a href=\"https://baike.baidu.com/item/%E8%B5%B5%E8%95%B4%E7%8E%89\" rel=\"noopener noreferrer\" target=\"_blank\" style=\"color: rgb(19, 110, 194);\">赵蕴玉</a>亲题。后几经变迁,该店迁至闹市街的提督西街,扩大了经营规模,增添了牛肉面等品种,食客不光是可以品尝肺片,还有面食充饥。</p><p>中华人民共和国成立后,在<a href=\"https://baike.baidu.com/item/%E5%85%AC%E7%A7%81%E5%90%88%E8%90%A5\" rel=\"noopener noreferrer\" target=\"_blank\" style=\"color: rgb(19, 110, 194);\">公私合营</a>时期,郭氏夫妇的夫妻肺片店和其他传统的餐饮名店一样,并入国营单位。后经几代人努力,夫妻肺片已成为闻名中外的熟食外卖店品。</p><p><a href=\"https://baike.baidu.com/pic/%E5%A4%AB%E5%A6%BB%E8%82%BA%E7%89%87/120778/0/0dd7912397dda144a22209a8bfb7d0a20cf48684?fr=lemma&amp;ct=single\" rel=\"noopener noreferrer\" target=\"_blank\" style=\"color: rgb(19, 110, 194);\"><img src=\"https://gss3.bdstatic.com/7Po3dSag_xI4khGkpoWK1HF6hhy/baike/s%3D220/sign=2fb2160904f79052eb1f403c3cf3d738/0dd7912397dda144a22209a8bfb7d0a20cf48684.jpg\"></a></p>","stock":189,"sort":0,"saleNum":102,"isFlashSale":false,"activityResidueStock":0,"createTime":"2019-11-21 15:31:16","updateTime":"2020-05-21 18:23:30","markTagInfo":{"tagPicUrl":"https://img3.bigaka.com/test/1002/202005/20200521/1002b092f1c2-3c92-4acd-9703-0cfa7f2792b2.png","tagType":1,"assignPrice":5600,"tagName":"固定样式营销标签"}}]
},
/*组件所在页面的生命周期 */
pageLifetimes: {
show: function () {
// 页面被展示
this.setData({
currentTab: 99
})
},
hide: function () {
// 页面被隐藏
this.setData({
currentTab: 99
})
},
},
/**
* 组件的方法列表
*/
methods: {
_getUserInfo(res = {}) {
wxService.nextTick(() => {
this.triggerEvent('getAuth', res);
})
},
//获取标签下的商品列表
getTagProducts(e){
console.log(4564)
console.log(e)
},
}
})
{
"component": true,
"usingComponents": {
"product-list-style-one": "/component/productListStyleOne/productListStyleOne"
}
}
\ No newline at end of file
<!--component/tabSort/tabSort.wxml-->
<view class="category-tab-container clear-box">
<view class="category-tab {{categoryTabFixed ? 'fixed' : ''}}">
<view class="scroll-view_H">
<view class="category-tab-item active">鞋子</view>
<view class="category-tab-item">裤子</view>
<view class="category-tab-item">帽子</view>
<view class="category-tab-item">衣服</view>
<view class="category-tab-item">衣服</view>
<view class="category-tab-item">衣服</view>
<view class="category-tab-item">衣服</view>
<view class="category-tab-item">衣服</view>
</view>
</view>
<!-- 商品列表 -->
<view class="product-list" wx:if="{{proData.length}}">
<product-list-style-one image-data="{{proData}}" />
</view>
</view>
/* component/tabSort/tabSort.wxss */
.clear-box{
box-sizing: border-box;
}
.category-tab-container {
width: 100%;
height: auto;
background: #ffffff;
}
.category-tab-container .category-tab{
background: #ffffff;
height: 80rpx;
width: 100%;
border-bottom: solid 1rpx #dddddd;
position: sticky;
}
.category-tab-container .category-tab .scroll-view_H {
width: 100%;
height: 100%;
display: flex;
align-items: center;
overflow: hidden;
overflow-x: auto;
}
.category-tab-container .category-tab .scroll-view_H .category-tab-item{
flex: 1;
min-width: 20%;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
font-size: 28rpx;
}
.category-tab-container .category-tab .scroll-view_H .category-tab-item.active{
border-bottom: solid 4rpx var(--themecolor);
color: var(--themecolor);
}
.category-tab-container .category-tab.fixed{
/* position: fixed; */
z-index: 8;
/* left: 0; */
top: 0;
}
.category-tab-container .product-list{
background: #ffffff;
}
\ No newline at end of file
......@@ -42,6 +42,7 @@ wxService.page({
apiIsOk : true,
//显示广告
pageInfo : null,
categoryTabFixed : false,
},
/**
* 生命周期函数--监听页面加载
......@@ -89,7 +90,47 @@ wxService.page({
}
}
setTimeout(() => {
this.getElementTop();
// categoryTab
},300);
},
//页面滚动
onPageScroll(e){
let scrollTop = e.scrollTop;
this.throttle(scoTop => {
if(scoTop > this.scrollTop){
this.data.categoryTabFixed = true;
}
else{
this.data.categoryTabFixed = false;
}
this.setData({
categoryTabFixed : this.data.categoryTabFixed
});
},null,0,scrollTop);
},
//节流器
throttle(fn, context, delay, text){
clearTimeout(fn.timeoutId)
fn.timeoutId = setTimeout(function () {
fn.call(context, text)
}, delay)
},
//获取元素到顶部的里
getElementTop(){
wx.createSelectorQuery().select('.categoryTab').boundingClientRect(res => {
if(res){
this.scrollTop = res.top;
this.categoryTabComponent = this.selectComponent('#categoryTab');
console.log(this.categoryTabComponent)
}
}).exec();
},
////获取位置信息并获取附近门店信息
getMyLocationInfo() {
let _this = this;
......
......@@ -7,6 +7,7 @@
"pic-nav": "/component/picNav/picNav",
"bottom": "/component/bottom/bottom",
"tab-sort": "/component/tabSort/tabSort",
"category-tab": "/component/categoryTab/categoryTab",
"announcement": "/component/announcement/announcement",
"icon-swiper": "/component/iconSwiper/iconSwiper",
"bannerAd": "/component/bannerAd/bannerAd",
......
......@@ -38,6 +38,7 @@
<tab-sort currHomePageId="{{currHomePageId}}" category-type="{{pItem.categoryType}}"
bind:getAuth="_getUserInfo" currentHasUserInfo="{{currentHasUserInfo}}" bind:updatePage="updatePage"/>
</view>
<view class="" wx:if="{{pItem.type == 8}}">
<attention focus-wx="{{pItem.focusWx}}" />
</view>
......@@ -45,6 +46,13 @@
<plus sku-list="{{skuVOList}}" plus-bgi="{{pItem.plus}}"
currentHasUserInfo="{{currentHasUserInfo}}" bind:updatePage="updatePage"/>
</view>
<!-- 分类组件 -->
<view class="categoryTab" wx:if="{{pItem.type == 7}}">
<category-tab currHomePageId="{{currHomePageId}}" categoryTab="{{pItem.categoryType}}" categoryTabFixed="{{categoryTabFixed}}"
id="categoryTab"
bind:getAuth="_getUserInfo" currentHasUserInfo="{{currentHasUserInfo}}" bind:updatePage="updatePage"/>
</view>
</block>
</view>
<guide-page-modal show="{{guidePageModalShow}}" />
......
......@@ -26,7 +26,7 @@
"userConfirmedUseCompilerModuleSwitch": false
},
"compileType": "miniprogram",
"libVersion": "2.8.2",
"libVersion": "2.11.0",
"appid": "wxac09792264c49b5c",
"projectname": "%E5%BE%AE%E5%95%86%E5%9F%8E",
"debugOptions": {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment