@@ -0,0 +1,3 @@ | |||
{ | |||
"bytedanceMiniappIDE.previewScene": "default" | |||
} |
@@ -0,0 +1,93 @@ | |||
const Http = require("./utils/HttpBasics.js") | |||
const config = require("./config/config.js"); | |||
App({ | |||
data:{}, | |||
globalData:{ | |||
token: null, | |||
imgHttps: 'https://formall.oss-accelerate.aliyuncs.com/douyin/drawable-xhdpi/', | |||
platform:null,//手机型号 | |||
systemInfo:"", | |||
curHtml:"", | |||
marketName:"", | |||
mouldType:1, | |||
appId:"ttef6599d8705b49b101", | |||
selected:0, | |||
}, | |||
onLaunch: function () { | |||
let that = this | |||
try { | |||
var res = tt.getSystemInfoSync(); | |||
that.statusBarHeight = res.statusBarHeight | |||
console.log(`手机型号为 ${res.platform}`); | |||
this.globalData.platform = res.platform | |||
} catch (error) { | |||
console.log(`获取系统信息失败`); | |||
} | |||
tt.getSystemInfo({ | |||
success(res) { | |||
that.globalData.systemInfo = res | |||
that.logn(); | |||
}, | |||
fail(res) { | |||
console.log(`getSystemInfo 调用失败`); | |||
}, | |||
}); | |||
}, | |||
statusBarHeight: 0, | |||
logn(){ | |||
let that = this; | |||
tt.login({ | |||
success:(res=>{ | |||
let {code} = res | |||
Http.post({ | |||
url:config.api.login, | |||
data:{ | |||
code:code, | |||
appId:'ttef6599d8705b49b101', | |||
systemInfo:JSON.stringify(this.globalData.systemInfo) | |||
} | |||
}).then(res=>{ | |||
// debugger | |||
if (res.data.mall){ | |||
that.globalData.marketName = res.data.mall.name ? res.data.mall.name : "" | |||
} | |||
that.globalData.mouldType = res.data.mouldType ? res.data.mouldType:0; | |||
if (res.data.subMalls) { | |||
const squareList = JSON.parse(res.data.subMalls) | |||
tt.setStorageSync("squareList", squareList) | |||
if (res.data.mall){ | |||
tt.setStorageSync("selectedMall", res.data.mall.tenantId) | |||
} | |||
} | |||
Http.setToken(res.data.token); | |||
that.globalData.token = res.data.token | |||
if (that.tokenCallback) { | |||
that.tokenCallback(res.data.token); | |||
} | |||
}).catch(err=>{ | |||
console.log(err); | |||
tt.showModal({ | |||
title: '提示', | |||
showCancel: false, | |||
content: '登录失败,请重新尝试', | |||
success: (res) => { | |||
if (res.cancel) { | |||
//点击取消,默认隐藏弹框 | |||
} else { | |||
//点击确定 | |||
tt.reLaunch({ | |||
url: '/pages/index/index', | |||
}) | |||
} | |||
} | |||
}); | |||
}) | |||
}), | |||
}); | |||
} | |||
}) |
@@ -0,0 +1,42 @@ | |||
{ | |||
"pages": [ | |||
"index/index", | |||
"index/searchbar", | |||
"pages/index/index", | |||
"index/user", | |||
"pages/mainOrder/mainOrder", | |||
"pages/detailOrder/detailOrder", | |||
"pages/ticket/ticket", | |||
"pages/ticketDetail/ticketDetail", | |||
"pages/coupon/detail/index", | |||
"pages/editUser/editUser", | |||
"pages/specialcourtesy/specialcourtesy", | |||
"pages/complaint/complaint", | |||
"pages/mallInfo/mallInfo", | |||
"pages/getuserinfo/getuserinfo", | |||
"pages/bannerdetail/bannerdetail", | |||
"pages/topicDetail/index", | |||
"pages/main/index", | |||
"pages/integralmall/index", | |||
"pages/integralmall/integraHistory/index", | |||
"pages/order/detail/index", | |||
"pages/order/index/index", | |||
"pages/orderquanma/index", | |||
"pages/edit/edit", | |||
"pages/questionnaire/questionnaire", | |||
"pages/questionnaire/questionnaireLsit/questionnaireLsit", | |||
"pages/searchbar/searchbar", | |||
"pages/index/searchbar/detail/index", | |||
"pages/integralmall/payIntegcoupondetail/index", | |||
"pages/integralmall/payIntegcouponStatus/index", | |||
"pages/getPhone/getPhone" | |||
], | |||
"window": { | |||
"backgroundTextStyle": "light", | |||
"navigationBarBackgroundColor": "#fff", | |||
"navigationBarTitleText": "Mini Program", | |||
"navigationBarTextStyle": "black", | |||
"navigationStyle": "custom" | |||
} | |||
} |
@@ -0,0 +1,141 @@ | |||
.BoxBg{ | |||
background-color: #f6f6f6; | |||
min-height: 100vh; | |||
} | |||
view, text { | |||
font-family: PingFangSC-Regular; | |||
} | |||
@font-face { | |||
font-family: "iconfont"; /* project id 777313 */ | |||
src: url("//at.alicdn.com/t/font_777313_jq7td4d3uab.eot"); | |||
src: url("//at.alicdn.com/t/font_777313_jq7td4d3uab.eot?#iefix") | |||
format("embedded-opentype"), | |||
url("//at.alicdn.com/t/font_777313_jq7td4d3uab.woff") format("woff"), | |||
url("//at.alicdn.com/t/font_777313_jq7td4d3uab.ttf") format("truetype"), | |||
url("//at.alicdn.com/t/font_777313_jq7td4d3uab.svg#iconfont") format("svg"); | |||
} | |||
.iconfont { | |||
font-family: "iconfont" !important; | |||
font-size: 36rpx; | |||
font-style: normal; | |||
-webkit-font-smoothing: antialiased; | |||
-webkit-text-stroke-width: 0.2rpx; | |||
-moz-osx-font-smoothing: grayscale; | |||
} | |||
.clearfix:after { | |||
content: "."; | |||
display: block; | |||
height: 0; | |||
clear: both; | |||
visibility: hidden; | |||
} | |||
/* 定位 */ | |||
.icon-dingweib:before { | |||
content: "\e652"; | |||
} | |||
/* 三角 */ | |||
.icon-choose:before { | |||
content: "\e601"; | |||
} | |||
/* 右箭头 */ | |||
.icon-right:before { | |||
content: "\e612"; | |||
} | |||
/* 边框 */ | |||
.app-border-top, | |||
.app-border-bottom { | |||
position: relative; | |||
width: 100%; | |||
} | |||
.app-border-top::after, | |||
.app-border-bottom::after { | |||
content: ""; | |||
position: absolute; | |||
background-color: #ddd; | |||
display: block !important; | |||
z-index: 1; | |||
top: auto; | |||
right: auto; | |||
width: 100%; | |||
height: 1rpx; | |||
transform-origin: 50% 100%; | |||
transform: scaleY(0.5); | |||
} | |||
.app-border-top:last-child:after, | |||
.app-border-bottom:last-child::after { | |||
display: none !important; | |||
} | |||
.app-border-top::after { | |||
top: 0; | |||
} | |||
.app-border-bottom::after { | |||
bottom: 0; | |||
} | |||
.app-border-left, | |||
.app-border-right { | |||
position: relative; | |||
height: 100%; | |||
} | |||
.app-border-left::before, | |||
.app-border-right::before { | |||
content: ""; | |||
position: absolute; | |||
background-color: #ddd; | |||
display: block; | |||
z-index: 1; | |||
top: 0; | |||
bottom: 0; | |||
height: 100%; | |||
width: 1rpx; | |||
transform-origin: 50% 100%; | |||
transform: scaleX(0.5); | |||
} | |||
.app-border-left::before { | |||
left: 0; | |||
} | |||
.app-border-right::before { | |||
right: 0; | |||
} | |||
view, | |||
text { | |||
font-family: PingFangSC-Regular; | |||
} | |||
page { | |||
width: 100%; | |||
min-height: 100vh; | |||
font-weight: 400; | |||
padding-bottom: 160rpx; | |||
background: #F4F5F9; | |||
} | |||
.fl{ | |||
float: left; | |||
} | |||
.fr{ | |||
float: right; | |||
} | |||
.canWrap{ | |||
position: fixed; | |||
bottom: -20000rpx; | |||
left: -2000rpx; | |||
width: 100%; | |||
height: 100%; | |||
overflow: visible; | |||
} | |||
.canWrap canvas{ | |||
width: 690rpx; | |||
height: 450rpx; | |||
} | |||
@@ -0,0 +1,38 @@ | |||
// components/advertisement.js | |||
const Http = require("../../utils/HttpBasics"); | |||
var config = require("../../config/config.js"); | |||
Component({ | |||
properties: { | |||
ggdata: { | |||
type: Object, | |||
value: {} | |||
} | |||
}, | |||
data: { | |||
flag: false, | |||
alphaData1: null, | |||
}, | |||
methods: { | |||
gotoGg: function (e) { | |||
console.log(this.data.ggdata) | |||
let that = this; | |||
tt.navigateTo({ | |||
url: `/${that.data.ggdata.pagePath}&g=1`, | |||
}) | |||
}, | |||
a: function () { | |||
this.setData({ flag: false }) | |||
}, | |||
closeGg: function () { | |||
let that = this; | |||
var animation = tt.createAnimation({}) | |||
// animation.opacity(0).step({ duration: 1000 }) | |||
setTimeout(function () { | |||
that.setData({ flag: true }) | |||
}, 500) | |||
animation.rotateZ(180).scale(0).opacity(0.5).step({ duration: 1000 }) | |||
that.setData({ alphaData1: animation.export() }); | |||
}, | |||
}, | |||
}); |
@@ -0,0 +1,4 @@ | |||
{ | |||
"component": true, | |||
"usingComponents": {} | |||
} |
@@ -0,0 +1,12 @@ | |||
<!--components/advertisement.wxml--> | |||
<view class="b1" hidden="{{flag}}"> | |||
<view class='b3'> | |||
<view class="t_w"> | |||
<view class="b2" animation="{{alphaData}}"> | |||
<icon type="cancel" size="30" color="#fff" class='cancel_icon' bindtap="closeGg"/> | |||
<!-- <view class='line'></view> --> | |||
<image class="t_image" data-data="{{ggdata}}" mode='widthFix' src="{{ggdata.coverImg}}" bindtap="gotoGg" data-couponChannelId="{{ggdata.produceId}}" /> | |||
</view> | |||
</view> | |||
</view> | |||
</view> |
@@ -0,0 +1,47 @@ | |||
/* components/advertisement.wxss */ | |||
.b1{ | |||
position:fixed; | |||
width:100%; | |||
height:100%; | |||
top:0px; | |||
background:rgba(0,0,0,0.8); | |||
overflow: hidden; | |||
z-index: 1000; | |||
} | |||
.b3{ | |||
/* margin:0 auto; */ | |||
width:100%; | |||
height:100%; | |||
position:relative; | |||
} | |||
.t_w{ | |||
width: 100%; | |||
position: absolute; | |||
top: 50%; | |||
left: 50%; | |||
margin-top: -50%; | |||
margin-left: -50%; | |||
} | |||
.b2{ | |||
overflow: hidden; | |||
border-radius: 10rpx; | |||
} | |||
.t_image{ | |||
width: 70%; | |||
border-radius: 16rpx; | |||
display: block; | |||
margin: 0 auto; | |||
} | |||
.cancel_icon{ | |||
position: absolute; | |||
right: 65rpx; | |||
top: -40rpx; | |||
} | |||
.line{ | |||
width:2rpx; | |||
height: 75rpx; | |||
background: #fff; | |||
position: absolute; | |||
right: 370rpx; | |||
bottom: -125rpx; | |||
} |
@@ -0,0 +1,91 @@ | |||
// pages/index/sw/index.js | |||
const imgurl = require("../../utils/imgurl"); | |||
const app = getApp() | |||
Component({ | |||
/** | |||
* 组件的属性列表 | |||
*/ | |||
properties: { | |||
list: { | |||
value: [], | |||
type: Array | |||
} | |||
}, | |||
/** | |||
* 组件的初始数据 | |||
*/ | |||
data: { | |||
bannerUrl: imgurl.banner.url, | |||
currentIndex: 0, | |||
mouldType:0, | |||
}, | |||
/** | |||
* 组件的方法列表 | |||
*/ | |||
methods: { | |||
gotobannerdetail: function(e) { | |||
console.log(this.data.list) | |||
if (e.currentTarget.dataset.data.type == 3) { | |||
// 小程序路径 | |||
let indexOf = (e.currentTarget.dataset.data.pagePath).indexOf("="); | |||
console.log(indexOf, "123") | |||
let id = (e.currentTarget.dataset.data.pagePath).substring(indexOf); | |||
let type = (e.currentTarget.dataset.data.pagePath).substr(indexOf + 1, 2)// 2020/7/22 变量获取pagePath中的type | |||
console.log(indexOf, id, type); | |||
console.log(e.currentTarget.dataset.data.pagePath) | |||
if(type == 'cd' || type == 'sd'){ | |||
tt.navigateTo({ | |||
url: `/${e.currentTarget.dataset.data.pagePath}`, | |||
}) | |||
}else if(type == "wj"){ | |||
tt.navigateTo({ | |||
url: `/pages/questionnaire/questionnaire?id=${id}`, | |||
}) | |||
}else if (type == 'ra'){ | |||
tt.navigateTo({ | |||
url: `/pages/radetail/index?id=${id}`, | |||
}) | |||
} | |||
}else if(e.currentTarget.dataset.data.type==2){ | |||
// 自由图文 | |||
tt.navigateTo({ | |||
url: `/pages/freeBannerDetail/index?id=${e.currentTarget.dataset.id}` | |||
}); | |||
}else if(e.currentTarget.dataset.data.type==4){ | |||
tt.navigateToMiniProgram({ | |||
appId: e.currentTarget.dataset.data.goAppid, | |||
// path: 'page/index/index?id=123', | |||
// extraData: { | |||
// foo: 'bar' | |||
// }, | |||
// envVersion: 'develop', | |||
success(res) { | |||
// 打开成功 | |||
} | |||
}) | |||
} | |||
else{ | |||
// 固定格式 | |||
tt.navigateTo({ | |||
url: `/pages/bannerdetail/bannerdetail?id=${e.currentTarget.dataset.id}` | |||
}); | |||
} | |||
}, | |||
handleChange: function (e) { | |||
this.setData({ | |||
currentIndex: e.detail.current | |||
}) | |||
}, | |||
}, | |||
attached: function () { | |||
// 在组件实例进入页面节点树时执行 | |||
if (app.globalData.mouldType){ | |||
this.setData({ | |||
mouldType: app.globalData.mouldType | |||
}) | |||
} | |||
}, | |||
}); |
@@ -0,0 +1,4 @@ | |||
{ | |||
"component": true, | |||
"usingComponents": {} | |||
} |
@@ -0,0 +1,19 @@ | |||
<view tt:if="{{list.length>0&&mouldType==0}}" class="index-slide-view"> | |||
<swiper class="imageContainer" bindchange="handleChange" previous-margin="39rpx" next-margin="40rpx" circular autoplay> | |||
<block tt:for="{{list}}" tt:key="{{index}}"> | |||
<swiper-item class="item"> | |||
<image data-id="{{item.id}}" data-data="{{item}}" bindtap='gotobannerdetail' class="itemImg {{currentIndex == index ? 'active': ''}}" src="{{item.coverImg}}"></image> | |||
</swiper-item> | |||
</block> | |||
</swiper> | |||
</view> | |||
<view tt:if="{{list.length>0&&mouldType==1}}" class="index-slide-view"> | |||
<swiper class="imageContainer1" bindchange="handleChange" indicator-color indicator-active-color="#fff" indicator-dots previous-margin="40rpx" next-margin="40rpx" circular autoplay> | |||
<block tt:for="{{list}}" tt:key="{{index}}"> | |||
<swiper-item class="item1"> | |||
<image data-id="{{item.id}}" data-data="{{item}}" bindtap='gotobannerdetail' class="itemImg1 {{currentIndex == index ? 'active1_a': 'active1'}}" src="{{item.coverImg}}"></image> | |||
</swiper-item> | |||
</block> | |||
</swiper> | |||
</view> |
@@ -0,0 +1,81 @@ | |||
.imageContainer { | |||
width: 100%; | |||
height: 304rpx; | |||
} | |||
.itemImg { | |||
position: absolute; | |||
width: 640rpx; | |||
height: 227rpx; | |||
border-radius: 15rpx; | |||
overflow: hidden; | |||
z-index: 5; | |||
opacity: 0.7; | |||
top: 20%; | |||
margin: 0 20rpx; | |||
} | |||
.active { | |||
opacity: 1; | |||
z-index: 10; | |||
width: 640rpx; | |||
height: 270rpx; | |||
top: 11%; | |||
transition: all 0.2s ease-in 0s; | |||
} | |||
.item { | |||
width: 100%; | |||
height: 304rpx; | |||
overflow: hidden; | |||
border-radius: 16rpx; | |||
} | |||
.index-slide-view { | |||
margin-top: -30rpx; | |||
} | |||
.index-slide-view1 { | |||
margin-top: -40rpx; | |||
} | |||
.imageContainer1 { | |||
width: 100%; | |||
height: 400rpx; | |||
} | |||
.itemImg1 { | |||
position: absolute; | |||
width: 640rpx; | |||
height: 360rpx; | |||
border-radius: 15rpx; | |||
overflow: hidden; | |||
z-index: 5; | |||
opacity: 0.7; | |||
top: 12%; | |||
margin: 0 20rpx; | |||
} | |||
.active1_a { | |||
opacity: 1; | |||
z-index: 10; | |||
width: 640rpx; | |||
top: 11%; | |||
transition: all 0.2s ease-in 0s; | |||
} | |||
.active1 { | |||
opacity: 1; | |||
z-index: 10; | |||
width: 640rpx; | |||
height: 310rpx; | |||
top: 17%; | |||
transition: all 0.2s ease-in 0s; | |||
} | |||
.item1 { | |||
width: 100%; | |||
height: 360rpx; | |||
overflow: hidden; | |||
border-radius: 16rpx; | |||
} | |||
@@ -0,0 +1,32 @@ | |||
Component({ | |||
data: { | |||
schedule:0 | |||
}, | |||
properties: { | |||
item:{ | |||
type:Object, | |||
value:{} | |||
} | |||
}, | |||
methods: { | |||
go(e){ | |||
let url = e.currentTarget.dataset.url | |||
tt.navigateTo({ | |||
url: url, // 指定页面的 url | |||
success: (res) => { | |||
}, | |||
fail: (res) => { | |||
}, | |||
}); | |||
} | |||
}, | |||
// created:function(){ | |||
// } | |||
}) |
@@ -0,0 +1,4 @@ | |||
{ | |||
"component": true, | |||
"usingComponents": {} | |||
} |
@@ -0,0 +1,27 @@ | |||
<view class="commodityBox" bindtap="go" data-url="/pages/coupon/detail/index?id={{item.id}}&navbarTitle={{item.title}}"> | |||
<view class="commodiImg"> | |||
<image src="{{item.coverImg}}" class="img"/> | |||
</view> | |||
<view class="textBox"> | |||
<view class="title">{{item.title}}</view> | |||
<view class="marketBox"> | |||
<view class="progress"> | |||
<view class="progress_a" style="{{item.schedule}}"></view> | |||
</view> | |||
<view class="progressText">{{item.remainInventoryText}}</view> | |||
</view> | |||
<view class="payBox"> | |||
<view class="payNumBox"> | |||
<view style="overflow:hidden"> | |||
<view class="payIcon">¥</view> | |||
<view class="price">{{item.salePriceStr}}</view> | |||
</view> | |||
<view class="original">¥{{item.priceStr}}</view> | |||
</view> | |||
<view tt:if="{{item.salePriceStr==0&&item.remainInventory!=0&&item.targetAd==101}}" class="payBtn">免费领取</view> | |||
<view tt:if="{{item.salePriceStr!=0&&item.remainInventory!=0&&item.targetAd==101}}" class="payBtn">立即购买</view> | |||
<view tt:if="{{item.salePriceStr!=0&&item.remainInventory==0&&item.targetAd==101}}" class="noBtn" class="payBtn">已售空</view> | |||
</view> | |||
</view> | |||
</view> |
@@ -0,0 +1,121 @@ | |||
.commodityBox{ | |||
width:96%; | |||
margin: 20rpx auto 0 auto; | |||
background-color: #ffffff; | |||
overflow: hidden; | |||
border-radius: 10rpx; | |||
} | |||
.commodiImg{ | |||
float: left; | |||
width: 300rpx; | |||
height: 176rpx; | |||
border-radius: 10rpx; | |||
/* background-color: aqua; */ | |||
margin: 20rpx; | |||
} | |||
.img{ | |||
width: 300rpx; | |||
height: 176rpx; | |||
border-radius: 10rpx; | |||
} | |||
.textBox{ | |||
width: 50%; | |||
float: left; | |||
margin-top: 20rpx; | |||
font-size: 28rpx; | |||
} | |||
.title{ | |||
height: 80rpx; | |||
overflow:hidden; | |||
text-overflow:ellipsis; | |||
display:-webkit-box; | |||
-webkit-box-orient:vertical; | |||
-webkit-line-clamp:2; | |||
font-size: 30rpx; | |||
font-weight: 500; | |||
} | |||
.marketBox{ | |||
overflow: hidden; | |||
height: 40rpx; | |||
} | |||
.progress{ | |||
height: 20rpx; | |||
width: 46%; | |||
border-radius: 10rpx; | |||
float: left; | |||
background-color: #e6e6e6; | |||
margin-top: 10rpx; | |||
position: relative; | |||
overflow: hidden; | |||
} | |||
.progress_a{ | |||
/* width: 20%; */ | |||
height: 20rpx; | |||
/* border-radius: 10rpx; */ | |||
background-color: #fb3e5c; | |||
position: absolute; | |||
top: 0; | |||
left: 0; | |||
} | |||
.progressText{ | |||
float: right; | |||
width: 50%; | |||
font-size: 26rpx; | |||
color: #707070; | |||
} | |||
.payBox{ | |||
overflow: hidden; | |||
} | |||
.payNumBox{ | |||
float: left; | |||
/* overflow: hidden; | |||
height: 40rpx; */ | |||
} | |||
.payIcon{ | |||
font-size: 24rpx; | |||
float: left; | |||
color: #fb3e5c; | |||
line-height: 40rpx; | |||
} | |||
.price{ | |||
height: 40rpx; | |||
line-height: 40rpx; | |||
float: left; | |||
font-size: 30rpx; | |||
color: #fb3e5c; | |||
} | |||
.original{ | |||
font-size: 26rpx; | |||
color: #707070; | |||
text-decoration: line-through; | |||
} | |||
.payBtn{ | |||
color: #fff; | |||
background:linear-gradient(to right,#fc3e5a,#f86883); | |||
float: right; | |||
margin-right: 10%; | |||
margin-top: 20rpx; | |||
height: 60rpx; | |||
line-height: 60rpx; | |||
width: 180rpx; | |||
text-align: center; | |||
border-radius: 60rpx; | |||
margin-bottom: 20rpx; | |||
} | |||
.noBtn{ | |||
color: #fff; | |||
background:#e6e6e6; | |||
float: right; | |||
margin-right: 10%; | |||
margin-top: 20rpx; | |||
height: 60rpx; | |||
line-height: 60rpx; | |||
width: 180rpx; | |||
text-align: center; | |||
border-radius: 60rpx; | |||
margin-bottom: 20rpx; | |||
} | |||
@@ -0,0 +1,133 @@ | |||
const util = require("../../utils/util"); | |||
Component({ | |||
/** | |||
* 组件的属性列表 util.toHHmmss(res.data.endTime,); | |||
*/ | |||
properties: { | |||
special:{ | |||
type: Boolean, | |||
value: false | |||
}, | |||
titleImgUrl:{ | |||
type:String, | |||
value:"", | |||
}, | |||
isShowCount:{ | |||
type: Boolean, | |||
value: false | |||
}, | |||
obj:{ | |||
type:Object, | |||
value:{} | |||
} | |||
}, | |||
/** | |||
* 组件的初始数据 | |||
*/ | |||
data: { | |||
setIntervalLsit:[] | |||
}, | |||
attached: function () { | |||
let this_ =this | |||
let arr = [] | |||
let tempLsit = [] | |||
// 处理首页定时 | |||
if (this_.properties.obj.couponList!=null&&this_.properties.obj.couponList.length>0){ | |||
//限时抢购 倒计时 | |||
this_.properties.obj.couponList.map((item,index)=>{//初次渲染 | |||
if (item.targetAd==2){ | |||
let tempObj = {} | |||
let beginTime = item.beginTime;//开始时间 | |||
let endTime = item.endTime;//结束时间 | |||
let present = new Date().getTime()//当前时间 | |||
let textTime = item.beginTime >= present?"距开始":"距结束" | |||
tempObj={ | |||
value: item.beginTime >= present ? beginTime - present : endTime - present, | |||
valueText: item.beginTime >= present ? util.toHHmmss(beginTime - present) : util.toHHmmss(endTime - present), | |||
// vaFlag: tempObj.value<=0?true:false,//活动是否结束 | |||
index:index, | |||
interval:"" , | |||
beginTime: beginTime,//开始时间 | |||
endTime: endTime,//开始时间 | |||
textTime: textTime | |||
} | |||
arr.push(tempObj) | |||
this_.setData({ | |||
setIntervalLsit: arr | |||
}) | |||
} | |||
}) | |||
} | |||
tempLsit =this_.data.setIntervalLsit | |||
tempLsit.map((item,index)=>{//再次渲染 | |||
item.interval = setInterval(function(){ | |||
let present = new Date().getTime()//当前时间 | |||
if(item.value<=1){ | |||
clearInterval(item.interval) | |||
item.vaFlag = true,//活动是否结束 | |||
console.log(item.value, "活动已经结束") | |||
}else{ | |||
let tempTime = item.beginTime >= present ? item.beginTime - present : item.endTime - present | |||
// console.log(tempTime, "presents") | |||
item.value = tempTime, | |||
item.valueText = util.toHHmmss(tempTime - 1000) | |||
item.textTime = item.beginTime >= present ? "距开始" : "距结束", | |||
item.vaFlag= item.value <= 0 ? true : false,//活动是否结束 | |||
this_.setData({ | |||
setIntervalLsit: tempLsit | |||
}) | |||
} | |||
},1000) | |||
}) | |||
// 处理首页定时 | |||
}, | |||
detached: function () { | |||
this.data.setIntervalLsit.map(item=>{ | |||
clearInterval(item.interval) | |||
}) | |||
console.log("88888") | |||
// 在组件实例被从页面节点树移除时执行 ; | |||
}, | |||
/** | |||
* 组件的方法列表 | |||
*/ | |||
methods: { | |||
lookAll(){ | |||
tt.navigateTo({ | |||
url: `/${this.properties.obj.weappPath}`, | |||
}) | |||
}, | |||
goDetail(e){ | |||
console.log(e.currentTarget.dataset) | |||
let couponChannelId = e.currentTarget.dataset.id | |||
let couponId = e.currentTarget.dataset.couponid | |||
let type = e.currentTarget.dataset.type | |||
if (type==9){ | |||
tt.navigateTo({ | |||
url: `/pages/spellGroup/mySpellGroup/index?couponChannelId=${couponChannelId}&couponId=${couponId}`, | |||
}) | |||
}else{ | |||
tt.navigateTo({ | |||
url: `/pages/coupon/detail/index?couponChannelId=${couponChannelId}&couponId=${couponId}`, | |||
}) | |||
} | |||
}, | |||
gotoTopic(e) { | |||
let id = e.currentTarget.dataset.id | |||
tt.navigateTo({ | |||
url: `/pages/topicDetail/index?id=${id}` | |||
}) | |||
}, | |||
} | |||
}) |
@@ -0,0 +1,4 @@ | |||
{ | |||
"component": true, | |||
"usingComponents": {} | |||
} |
@@ -0,0 +1,65 @@ | |||
<!-- <view class='product' tt:if="{{showTopic}}" bindtap='gotoTopic'> | |||
<image src='{{cover}}' mode='widthFix'></image> | |||
</view> --> | |||
<view tt:if="{{obj.couponList.length>0||obj.isOnlyAd==1}}"> | |||
<view class='product' bindtap='gotoTopic' data-id="{{obj.id}}" tt:if="{{obj.isOnlyAd==1}}"> | |||
<image src='{{obj.cover}}' mode='scaleToFill'></image> | |||
</view> | |||
<view class="commBox" tt:if="{{obj.topicType!=1||(obj.topicType==1&&obj.isOnlyAd==0)}}"> | |||
<view class="titleBox"> | |||
<image class="titleImg" src="{{titleImgUrl}}" tt:if="{{!special}}"></image> | |||
<view class="specialTitle" tt:if="{{special}}">{{obj.name}}</view> | |||
<view class="more" bindtap="lookAll">查看更多优惠活动 | |||
<image class="rup" src="https://formall.oss-accelerate.aliyuncs.com/cimg/v20211214/home_icon_jt.png"></image> | |||
</view> | |||
</view> | |||
<view class="contBox"> | |||
<view class="topImg" tt:if="{{obj.cover}}" bindtap="lookAll"> | |||
<image src="{{obj.cover}}" mode='scaleToFill'></image> | |||
</view> | |||
<div class="itemBox" tt:if="{{obj.couponList&&obj.couponList.length>0}}"> | |||
<view class="item" tt:for="{{obj.couponList}}" tt:key="index" bindtap="goDetail" data-type="{{item.type}}" data-id="{{item.id}}" data-couponid="{{item.couponId}}"> | |||
<view class="itemImg"> | |||
<image src="{{item.coverImg}}" mode='scaleToFill'></image> | |||
<view class="sellout" tt:if="{{item.remainInventory==0}}"> | |||
<image class="selloutImg" src="https://formall.oss-accelerate.aliyuncs.com/cimg/v20211214/home_img_ysx.png"></image> | |||
</view> | |||
</view> | |||
<view class="titleNameBox"> | |||
<view class="titleName">{{item.title}}</view> | |||
</view> | |||
<view class="priceBox"> | |||
<view class="sellingBox f"> | |||
<view class="fuhao">¥</view> | |||
<view class="int" tt:if="{{item.type!=50}}">{{item.salePriceStrQ?item.salePriceStrQ:item.salePriceStr}}</view> | |||
<view class="fuhao" tt:if="{{item.type!=50}}">{{item.salePriceStrH?'.'+item.salePriceStrH:''}}</view> | |||
<view class="int" tt:if="{{item.type==50}}">{{item.creditPrice}}</view> | |||
<view class="fuhao" tt:if="{{item.type==50}}"> 积分</view> | |||
</view> | |||
<view class="originalBox r"> | |||
<view class="origina">¥{{item.priceStr}}</view> | |||
</view> | |||
</view> | |||
<view class="countBox" tt:if="{{isShowCount}}"> | |||
<view class="countText f">{{setIntervalLsit[index].textTime}}</view> | |||
<view class="countDate r">{{setIntervalLsit[index].vaFlag?'活动已结束':setIntervalLsit[index].valueText}}</view> | |||
</view> | |||
</view> | |||
<view class="item moreItem" bindtap="lookAll"> | |||
<view class="noDataImg"> | |||
<image src="https://formall.oss-accelerate.aliyuncs.com/cimg/v20211214/home_img_zwlp.png"></image> | |||
</view> | |||
<view class="noDataText">查看更多优惠活动</view> | |||
</view> | |||
</div> | |||
</view> | |||
</view> | |||
</view> |
@@ -0,0 +1,259 @@ | |||
.commBox { | |||
width: 96%; | |||
margin: 27rpx auto; | |||
background-color: #fff; | |||
border-radius: 20rpx; | |||
overflow: hidden; | |||
} | |||
.titleBox { | |||
width: 100%; | |||
overflow: hidden; | |||
height: 140rpx; | |||
background-image: url("https://formall.oss-accelerate.aliyuncs.com/cimg/v20211214/home_icon_d9qt.png"); | |||
background-size: 100% 100%; | |||
background-repeat: no-repeat; | |||
} | |||
.titleImg { | |||
width: 180rpx; | |||
height: 40rpx; | |||
float: left; | |||
margin: 20rpx; | |||
display: block; | |||
} | |||
.specialTitle { | |||
float: left; | |||
margin: 10rpx 20rpx; | |||
font-size: 38rpx; | |||
font-family: YouSheBiaoTiHei; | |||
font-weight: 600; | |||
color: #37332d; | |||
} | |||
.more { | |||
float: right; | |||
font-size: 24rpx; | |||
font-family: OPPOSans; | |||
font-weight: 500; | |||
color: #866741; | |||
margin: 16rpx 20rpx; | |||
} | |||
.rup { | |||
width: 13rpx; | |||
height: 20rpx; | |||
margin: 2rpx 0 0 6rpx; | |||
} | |||
.contBox { | |||
overflow: hidden; | |||
/* width: 96%; */ | |||
margin: -50rpx auto 0 auto; | |||
} | |||
.topImg { | |||
width: 100%; | |||
height: 140rpx; | |||
border-radius: 16rpx; | |||
margin-bottom: 40rpx; | |||
/* background-color: chartreuse; */ | |||
} | |||
.topImg image { | |||
border-radius: 16rpx; | |||
width: 100%; | |||
height: 100%; | |||
} | |||
.itemBox { | |||
overflow: hidden; | |||
display: -webkit-box; | |||
overflow-x: scroll; | |||
-webkit-overflow-scrolling: touch; | |||
margin: 20rpx auto; | |||
width: 96%; | |||
} | |||
.itemBox::-webkit-scrollbar { | |||
display: none; | |||
} | |||
.item { | |||
width: 240rpx; | |||
/* background-color: antiquewhite; */ | |||
margin-right: 20rpx; | |||
} | |||
.itemImg { | |||
position: relative; | |||
width: 240rpx; | |||
height: 240rpx; | |||
border-radius: 16rpx; | |||
/* background-color: aquamarine; */ | |||
} | |||
.itemImg image { | |||
width: 100%; | |||
height: 100%; | |||
border-radius: 16rpx; | |||
} | |||
.sellout { | |||
position: absolute; | |||
top: 0; | |||
left: 0; | |||
background-color: rgba(0, 0, 0, 0.5); | |||
width: 240rpx; | |||
height: 240rpx; | |||
border-radius: 20rpx; | |||
} | |||
.selloutImg { | |||
width: 195rpx !important; | |||
height: 154rpx !important; | |||
margin: 18% auto; | |||
display: block; | |||
} | |||
.titleNameBox { | |||
/* font-size: 18px; */ | |||
height: 80rpx; | |||
line-height: 40rpx; | |||
display: flex; | |||
align-items: center; | |||
justify-content: center; | |||
} | |||
.titleName { | |||
width: 100%; | |||
font-size: 28rpx; | |||
font-family: OPPOSans; | |||
font-weight: 500; | |||
color: #333; | |||
margin-top: 10rpx; | |||
display: -webkit-box; | |||
-webkit-line-clamp: 2; | |||
-webkit-box-orient: vertical; | |||
overflow: hidden; | |||
text-overflow: ellipsis; | |||
} | |||
.priceBox { | |||
overflow: hidden; | |||
margin: 10rpx 0; | |||
} | |||
.f { | |||
float: left; | |||
} | |||
.r { | |||
float: right; | |||
} | |||
.sellingBox { | |||
overflow: hidden; | |||
} | |||
.fuhao { | |||
color: #df2d2d; | |||
font-size: 24rpx; | |||
float: left; | |||
font-family: OPPOSans; | |||
/* font-weight: bold; */ | |||
margin-top: 10rpx; | |||
} | |||
.int { | |||
float: left; | |||
font-size: 36rpx; | |||
font-family: OPPOSans; | |||
font-weight: bold; | |||
color: #df2d2d; | |||
} | |||
.originalBox { | |||
overflow: hidden; | |||
} | |||
.origina { | |||
text-align: right; | |||
font-size: 24rpx; | |||
font-family: OPPOSans; | |||
font-weight: 400; | |||
text-decoration: line-through; | |||
color: #999; | |||
margin-top: 10rpx; | |||
margin-right: 10rpx; | |||
} | |||
.countBox { | |||
width: 100%; | |||
height: 46rpx; | |||
background-image: url("https://formall.oss-accelerate.aliyuncs.com/cimg/v20211214/home_icon_bq.png"); | |||
background-size: 100% 100%; | |||
background-repeat: no-repeat; | |||
margin-bottom: 20rpx; | |||
line-height: 46rpx; | |||
overflow: hidden; | |||
} | |||
.countText { | |||
font-size: 22rpx; | |||
font-family: OPPOSans; | |||
font-weight: 400; | |||
color: #999; | |||
background: linear-gradient(180deg, #dcb07d 0%, #f5e0bf 100%); | |||
-webkit-background-clip: text; | |||
-webkit-text-fill-color: transparent; | |||
margin-left: 8rpx; | |||
} | |||
.countDate { | |||
font-size: 24rpx; | |||
font-family: OPPOSans; | |||
font-weight: bold; | |||
color: #4c3820; | |||
margin-right: 8rpx; | |||
} | |||
.moreItem { | |||
background: #f7f7f7; | |||
border-radius: 8px; | |||
} | |||
.noDataImg { | |||
width: 160rpx; | |||
height: 160rpx; | |||
margin: 25% auto 5% auto; | |||
} | |||
.noDataImg image { | |||
width: 100%; | |||
height: 100%; | |||
} | |||
.noDataText { | |||
text-align: center; | |||
font-size: 22rpx; | |||
font-family: OPPOSans; | |||
font-weight: 500; | |||
color: #999; | |||
} | |||
.product { | |||
width: 96%; | |||
height: 140rpx; | |||
margin: 30rpx auto 10rpx; | |||
border-radius: 16rpx; | |||
overflow: hidden; | |||
} | |||
.product image { | |||
height: 100%; | |||
display: block; | |||
width: 100%; | |||
} | |||
@@ -0,0 +1,46 @@ | |||
const app = getApp() | |||
Component({ | |||
/** | |||
* 组件的属性列表 | |||
*/ | |||
properties: { | |||
paramAtoB: String, | |||
from: String, | |||
data: { | |||
value: {}, | |||
type: Object | |||
}, | |||
}, | |||
/** | |||
* 组件的初始数据 | |||
*/ | |||
data: { | |||
mouldType: 0, | |||
}, | |||
attached: function () { | |||
// 在组件实例进入页面节点树时执行 | |||
if (app.globalData.mouldType) { | |||
this.setData({ | |||
mouldType: app.globalData.mouldType | |||
}) | |||
} | |||
}, | |||
methods: { | |||
gotoDetail(e) { | |||
let couponId = e.currentTarget.dataset.couponid; | |||
let title = e.currentTarget.dataset.title; | |||
let id = e.currentTarget.dataset.id; | |||
let targetAd = e.currentTarget.dataset.targetad; | |||
if (id && targetAd != 7) { | |||
tt.navigateTo({ | |||
url: `/pages/coupon/detail/index?couponChannelId=${id}&couponId=${couponId}&title=${title}`, | |||
}) | |||
} else if (targetAd == 7) { | |||
tt.navigateTo({ | |||
url: `/pages/spellGroup/mySpellGroup/index?couponChannelId=${id}&couponId=${couponId}&title=${title}`, | |||
}) | |||
} | |||
} | |||
} | |||
}); |
@@ -0,0 +1,6 @@ | |||
{ | |||
"component": true, | |||
"usingComponents": { | |||
"i-button": "../../dist/button/index" | |||
} | |||
} |
@@ -0,0 +1,75 @@ | |||
<view class='navigator' bindtap='gotoDetail' data-id='{{data.id}}' data-targetAd='{{data.targetAd}}' hover-class='hover' | |||
data-couponId='{{data.couponId}}' data-title='{{data.title}}'> | |||
<view class="presell" tt:if="{{data.type==10}}" style="{{mouldType==1?'top: 280rpx;':''}}">预售 </view> | |||
<!-- 首页优惠券列表页面 --> | |||
<view class="coupons"> | |||
<!-- fromMerchant 根据这个字段判断 --> | |||
<view class="superscript" tt:if="{{from == 'fromMerchant'}}"> | |||
<!-- 角标的三种实现 --> | |||
<view class="rect" style='background: #31b968;' tt:if="{{data.targetAd == 2}}"></view> | |||
<view class="rect" style='background: orange;' tt:if="{{data.targetAd == 6}}"></view> | |||
<view class="rect" style='background: #d900ae;' tt:if="{{data.targetAd == 7}}"></view> | |||
<view class="rect" style='background: #5dae01;' tt:if="{{data.targetAd == 5}}"></view> | |||
<view class="desc" tt:if="{{data.targetAd == 2}}">限时券</view> | |||
<view class="desc" tt:if="{{data.targetAd == 6}}">砍价券</view> | |||
<view class="desc" tt:if="{{data.targetAd == 7}}">拼团券</view> | |||
<view class="desc" tt:if="{{data.targetAd == 5}}">消费卡</view> | |||
</view> | |||
<view class="coupons-img"> | |||
<image src="{{data.coverImg}}" style="{{mouldType==1?'height: 300rpx;':''}}" mode='aspectFill' lazy-load="true"> | |||
</image> | |||
</view> | |||
<view class="coupons-info"> | |||
<view class="coupons-info-name tit">{{data.title}}</view> | |||
<view class="coupons-info-name subtitle">{{data.subTitle}}</view> | |||
<view class="coupons-info-price-p"> | |||
<view class='price' tt:if="{{data.type!=10}}"> | |||
<text tt:if="{{data.targetAd == 101||data.targetAd == 5}}"><text class='rmb'>¥</text> | |||
<text class='num'>{{data.salePriceStr}}</text> | |||
<text tt:if="{{!(data.type==5&&data.unit==1)}}" class='view02'>¥{{data.priceStr}}</text> | |||
</text> | |||
<text tt:if="{{data.targetAd == 2}}"><text class='saleprice'>抢购价</text> | |||
<text class='rmb'>¥</text>{{data.salePriceStr}} | |||
</text> | |||
<text tt:if="{{data.targetAd == 6}}"><text class='saleprice'>可砍至</text> | |||
<text class='rmb'>¥</text>{{data.salePriceStr}} | |||
</text> | |||
<text tt:if="{{data.targetAd == 7}}"><text class='saleprice'>拼团价</text> | |||
<text class='rmb'>¥</text>{{data.salePriceStr}} | |||
</text> | |||
<view class="coupons-info-manjian" style="margin-top:10rpx;" tt:if="{{data.type == 1}}"> | |||
<!-- <view class='view01' tt:if="{{data.unit==0}}">¥{{data.priceStr}}</view> --> | |||
<view tt:if="{{data.unit==1}}">{{data.priceStr}}小时</view> | |||
</view> | |||
<view class="coupons-info-manjian" tt:elif="{{data.type == 3||data.type==4||data.type==5}}"> | |||
<!-- <text class='view01' tt:if="{{data.unit==0}}">¥{{data.priceStr}}</text> --> | |||
<text tt:if="{{data.unit==1}}">{{data.priceStr}}小时</text> | |||
</view> | |||
</view> | |||
<view class="earnest" tt:if="{{data.type==10}}"> | |||
预售定金:¥{{data.salePriceStr}} | |||
</view> | |||
</view> | |||
</view> | |||
<view class="coupons-btn"> | |||
<!-- 优惠券价格 --> | |||
<i-button i-class="coupons-btn-gm" tt:if="{{data.salePriceStr==0&&data.remainInventory!=0&&data.targetAd == 101}}" | |||
data-date='{{data}}'>免费领</i-button> | |||
<i-button i-class="coupons-btn-gm" | |||
tt:if="{{data.salePriceStr!=0&&data.remainInventory!=0&&data.targetAd == 101||data.salePriceStr!=0&&data.remainInventory!=0&&data.targetAd == 5}}" | |||
data-date='{{data}}'>购买</i-button> | |||
<i-button i-class="coupons-btn-gm" tt:if="{{data.remainInventory!=0&&data.targetAd == 2}}" data-date='{{data}}'> | |||
去抢购</i-button> | |||
<i-button i-class="coupons-btn-gm" tt:if="{{data.remainInventory!=0&&data.targetAd == 6}}" data-date='{{data}}'> | |||
去砍价</i-button> | |||
<i-button i-class="coupons-btn-gm" tt:if="{{data.remainInventory!=0&&data.targetAd == 7}}" data-date='{{data}}'> | |||
去拼团</i-button> | |||
<i-button i-class="coupons-btn-gms" tt:if="{{data.remainInventory==0}}" data-date='{{data}}'>已售罄</i-button> | |||
<i-button i-class="coupons-btn-gms" tt:if="{{data.status==1}}" data-date='{{data}}'>已下架</i-button> | |||
</view> | |||
</view> | |||
</view> |
@@ -0,0 +1,372 @@ | |||
@import "../../app.ttss"; | |||
.coupons { | |||
position: relative; | |||
width: 340rpx; | |||
display: inline-block; | |||
overflow: hidden; | |||
border-radius: 12rpx; | |||
} | |||
.earnest{ | |||
color: red; | |||
font-size: 24rpx; | |||
padding-left: 10rpx; | |||
} | |||
.coupons-border { | |||
height: 1rpx; | |||
left: 30rpx; | |||
right: 30rpx; | |||
background: #f5f5f5; | |||
position: absolute; | |||
bottom: 0; | |||
} | |||
.coupons-img image { | |||
display: block; | |||
width: 300rpx; | |||
height: 176rpx; | |||
margin: 20rpx auto 0; | |||
/* border-top-left-radius: 10rpx; | |||
border-top-right-radius: 10rpx; */ | |||
} | |||
.coupons-info { | |||
width: 90%; | |||
height: 152rpx; | |||
border-radius: 0rpx 0rpx 10rpx 10rpx; | |||
background: #fff; | |||
margin: 0 auto; | |||
} | |||
.coupons-info-name { | |||
font-size: 30rpx; | |||
color: #3c3c3c; | |||
letter-spacing: 0; | |||
line-height: 38rpx; | |||
} | |||
.coupons-info-price { | |||
padding: 16rpx 0 0; | |||
} | |||
.i { | |||
font-size: 24rpx; | |||
font-style: normal; | |||
} | |||
.coupons-info-price-p { | |||
display: inline-block; | |||
font-size: 50rpx; | |||
margin-bottom: 26rpx; | |||
width: 100%; | |||
} | |||
.price { | |||
font-size: 36rpx; | |||
font-family: PingFang-SC-Bold; | |||
font-weight: bold; | |||
line-height: 44rpx; | |||
margin-left: 16rpx; | |||
padding-top: 16rpx; | |||
color: #fd832d; | |||
width: 60%; | |||
overflow: hidden; | |||
white-space: nowrap; | |||
text-overflow: ellipsis; | |||
} | |||
.rmb { | |||
font-size: 24rpx !important; | |||
margin-right: 4rpx !important; | |||
color: #FD782D!; | |||
} | |||
.num { | |||
color: #fd782d; | |||
} | |||
.tit { | |||
overflow: hidden; | |||
white-space: nowrap; | |||
text-overflow: ellipsis; | |||
font-size: 28rpx; | |||
line-height: 32rpx; | |||
padding-top: 20rpx; | |||
padding-left: 10rpx; | |||
color: #333; | |||
letter-spacing: 0; | |||
} | |||
.coupons-info-price-o { | |||
display: block; | |||
text-align: center; | |||
font-size: 26rpx; | |||
color: #b4b4b4; | |||
letter-spacing: 0.96rpx; | |||
text-decoration: line-through; | |||
line-height: 24rpx; | |||
} | |||
.coupons-info-distance { | |||
font-size: 22rpx; | |||
color: #c0c0c0; | |||
letter-spacing: 0; | |||
padding-bottom: 10rpx; | |||
line-height: 30rpx; | |||
} | |||
.coupons-info-address { | |||
font-size: 22rpx; | |||
color: #585858; | |||
letter-spacing: 0; | |||
line-height: 30rpx; | |||
} | |||
.coupons-btn { | |||
position: absolute; | |||
bottom: 14rpx; | |||
right: 24rpx; | |||
} | |||
.coupons-btn-gm { | |||
border-radius: 10px !important; | |||
margin: 0 !important; | |||
padding: 0 !important; | |||
font-size: 26rpx; | |||
color: #fff !important; | |||
letter-spacing: 0; | |||
height: 51rpx !important; | |||
width: 100rpx !important; | |||
line-height: 51rpx !important; | |||
background: linear-gradient(127deg, rgba(252, 177, 74, 1) 0%, rgba(254, 70, 20, 1) 100%) !important; | |||
} | |||
.coupons-btn-gms { | |||
background: #b9b9b9 !important; | |||
border-radius: 10px !important; | |||
opacity: 0.6; | |||
margin: 0 !important; | |||
padding: 0 !important; | |||
font-family: PingFangSC-Semibold; | |||
font-size: 26rpx; | |||
font-weight: 400; | |||
color: #fff !important; | |||
letter-spacing: 0; | |||
height: 51rpx !important; | |||
width: 100rpx !important; | |||
line-height: 51rpx !important; | |||
} | |||
.subtitle { | |||
font-size: 24rpx; | |||
color: #999; | |||
overflow: hidden; | |||
height: 24rpx; | |||
width: 65%; | |||
padding-left: 10rpx; | |||
line-height: 24rpx; | |||
white-space: nowrap; | |||
text-overflow: ellipsis; | |||
margin-top: 12rpx; | |||
} | |||
.coupons-info-manjian { | |||
font-weight: normal; | |||
font-size: 20rpx; | |||
line-height: 34rpx; | |||
display: inline-block; | |||
color: #ff4949; | |||
letter-spacing: 0; | |||
} | |||
.coupons-info-manjian1 { | |||
font-weight: normal; | |||
font-size: 20rpx; | |||
line-height: 22rpx; | |||
color: #919191; | |||
letter-spacing: 0; | |||
overflow: hidden; | |||
white-space: nowrap; | |||
text-overflow: ellipsis; | |||
width: 300rpx; | |||
margin-top: 16rpx; | |||
} | |||
.coupons-info-manjian text { | |||
display: block; | |||
line-height: 20rpx; | |||
} | |||
.coupons-info-manjian > text:nth-of-type(1) { | |||
display: block; | |||
/* color: #FF4949; */ | |||
opacity: 0.6; | |||
} | |||
.view02 { | |||
font-size: 20rpx; | |||
line-height: 34rpx; | |||
text-decoration: line-through; | |||
color: #999 !important; | |||
font-weight: normal; | |||
letter-spacing: 0; | |||
margin-left: 10rpx; | |||
} | |||
.view01 { | |||
text-decoration: line-through; | |||
color: #999 !important; | |||
} | |||
.txt2 { | |||
display: block; | |||
color: #ccc; | |||
} | |||
/**上拉加载更多**/ | |||
.userinfo { | |||
display: flex; | |||
flex-direction: column; | |||
align-items: center; | |||
} | |||
.userinfo-avatar { | |||
width: 128rpx; | |||
height: 128rpx; | |||
margin: 20rpx; | |||
border-radius: 50%; | |||
} | |||
.userinfo-nickname { | |||
color: #aaa; | |||
} | |||
.sy { | |||
display: block; | |||
text-align: right; | |||
width: 181rpx; | |||
font-size: 24rpx; | |||
color: #999; | |||
height: 40rpx; | |||
margin-top: 106rpx; | |||
} | |||
.usermotto { | |||
margin-top: 200px; | |||
} | |||
scroll-view { | |||
width: 100%; | |||
} | |||
.item { | |||
width: 90%; | |||
height: 300rpx; | |||
margin: 20rpx auto; | |||
background: brown; | |||
overflow: hidden; | |||
} | |||
.item .img { | |||
width: 430rpx; | |||
margin-right: 20rpx; | |||
float: left; | |||
} | |||
.title { | |||
font-size: 30rpx; | |||
display: block; | |||
margin: 30rpx auto; | |||
} | |||
.description { | |||
font-size: 26rpx; | |||
line-height: 15rpx; | |||
} | |||
.navigator-hover { | |||
opacity: 1 !important; | |||
background: #fff; | |||
} | |||
.hover { | |||
opacity: 0.6; | |||
} | |||
.navigator { | |||
display: inline-block; | |||
background: #fff; | |||
border-radius: 12rpx; | |||
position: relative; | |||
} | |||
.presell { | |||
position: absolute; | |||
width: 300rpx; | |||
height: 40rpx; | |||
background-color: rgba(247, 21, 21, 0.6); | |||
z-index: 100; | |||
top: 158rpx; | |||
line-height: 20px; | |||
text-align: center; | |||
color: #fff; | |||
margin-left: 20rpx; | |||
font-size: 26rpx; | |||
} | |||
.navigator:nth-of-type(2n+1) { | |||
/* margin-right: 10rpx; */ | |||
} | |||
.superscript { | |||
position: absolute; | |||
top: -10rpx; | |||
left: -12rpx; | |||
width: 86rpx; | |||
height: 86rpx; | |||
overflow: hidden; | |||
} | |||
/* 使用背景色渐变 */ | |||
.superscript .gradual { | |||
width: 100%; | |||
height: 100%; | |||
background: linear-gradient(135deg, #31b968 50%, transparent 50%); | |||
} | |||
/* 使用三角形 */ | |||
.superscript .triangle { | |||
width: 0; | |||
height: 0; | |||
border-top: 130rpx solid #31b968; | |||
border-right: 130rpx solid transparent; | |||
} | |||
/* 使用矩形旋转, 和父节点的 overflow:hidden 配合 */ | |||
.superscript .rect { | |||
width: 176rpx; | |||
height: 183rpx; | |||
margin: -91rpx 0 0 -91rpx; | |||
transform: rotateZ(45deg); | |||
} | |||
.superscript .desc { | |||
position: absolute; | |||
top: 29%; | |||
left: 16%; | |||
z-index: 1; | |||
color: #fff; | |||
font-size: 23rpx; | |||
transform: rotate(-45deg); | |||
} | |||
.saleprice { | |||
font-size: 24rpx; | |||
display: inline-block; | |||
margin-right: 10rpx; | |||
font-weight: 400; | |||
} |
@@ -0,0 +1,120 @@ | |||
const config = require("../../config/config"); | |||
const Http = require("../../utils/HttpBasics"); | |||
// d:\fumaolianke\ttFmC\tt富茂C\components\getPhoen\getPhoen.js | |||
Component({ | |||
data: { | |||
phone: "", | |||
auth: "", | |||
time: "获取验证码", | |||
verFlag: true, | |||
currentTime: 61, | |||
setInter: '' | |||
}, | |||
properties: { | |||
type: Boolean, | |||
showBox: false | |||
}, | |||
methods: { | |||
getCode() { | |||
var that = this; | |||
var currentTime = that.data.currentTime | |||
that.data.setInter = setInterval(function () { | |||
currentTime--; | |||
that.setData({ | |||
time: currentTime + '秒' | |||
}) | |||
if (currentTime <= 0) { | |||
clearInterval(that.data.setInter) | |||
that.setData({ | |||
time: '获取验证码', | |||
currentTime: 61, | |||
verFlag: true | |||
}) | |||
} | |||
}, 1000) | |||
}, | |||
setPhone(e) { | |||
this.setData({ | |||
phone: e.detail.value | |||
}) | |||
}, | |||
setAuth(e) { | |||
this.setData({ | |||
auth: e.detail.value | |||
}) | |||
}, | |||
verify() { | |||
let phoneReg = /(^1[3|4|5|7|8]\d{9}$)|(^09\d{8}$)/; | |||
if (!this.data.verFlag) { | |||
return | |||
} | |||
if (phoneReg.test(this.data.phone)) { | |||
Http.get({ | |||
url: config.api.sendValidationCode, | |||
data: { | |||
phone: this.data.phone, | |||
type:6 | |||
} | |||
}).then(res => { | |||
console.log(res, "res"); | |||
this.setData({ | |||
verFlag: false | |||
}) | |||
this.getCode() | |||
}).catch(err => { | |||
tt.showToast({ | |||
title: err.message ? err.message : err.data, // 内容 | |||
icon: "none" | |||
}); | |||
}) | |||
} else { | |||
tt.showToast({ | |||
title: '手机号有误', | |||
icon: "none", | |||
}) | |||
} | |||
}, | |||
hieBox(){ | |||
this.triggerEvent("heiBox" ,false) | |||
}, | |||
hiePhoen(){ | |||
this.triggerEvent("hiePhoen" ,false) | |||
}, | |||
send() { | |||
let phoneReg = /(^1[3|4|5|7|8]\d{9}$)|(^09\d{8}$)/; | |||
if (phoneReg.test(this.data.phone)) { | |||
if(this.data.auth!=""){ | |||
Http.get({ | |||
url: config.api.validationCode, | |||
data: { | |||
phone: this.data.phone, | |||
code: this.data.auth, | |||
type:6 | |||
} | |||
}).then(res => { | |||
this.hiePhoen() | |||
}).catch(err => { | |||
tt.showToast({ | |||
title: err.message ? err.message : err.data, // 内容 | |||
icon: "none" | |||
}); | |||
}) | |||
}else{ | |||
tt.showToast({ | |||
title: '请输入验证码', | |||
icon: "none", | |||
}) | |||
} | |||
} else { | |||
tt.showToast({ | |||
title: '手机号有误', | |||
icon: "none", | |||
}) | |||
} | |||
} | |||
} | |||
}) |
@@ -0,0 +1,4 @@ | |||
{ | |||
"component": true, | |||
"usingComponents": {} | |||
} |
@@ -0,0 +1,29 @@ | |||
<view class="box" tt:if="{{showBox}}"> | |||
<view class="phoneBox"> | |||
<view class="hiePhone"> | |||
<view class="f">授权手机号</view> | |||
<view class="r" bindtap="hieBox" > | |||
<image src="../../assets/itemImg/phDel.png" style="width: 100%;height: 100%;"/> | |||
</view> | |||
</view> | |||
<view class="userPhone"> | |||
<input | |||
type="number" | |||
placeholder="请输入手机号码" | |||
bindinput="setPhone" | |||
value = "{{phone}}" | |||
class="inputPhone" | |||
/> | |||
<view class="btn" bindtap="verify">{{time}}</view> | |||
</view> | |||
<input | |||
type="number" | |||
placeholder="请输入验证码" | |||
bindinput="setAuth" | |||
value="{{auth}}" | |||
class="auth" | |||
/> | |||
<view class="send" bindtap="send">授权手机号</view> | |||
</view> | |||
</view> |
@@ -0,0 +1,95 @@ | |||
.box{ | |||
width: 100%; | |||
height: 100vh; | |||
position: fixed; | |||
top: 0; | |||
left: 0; | |||
background: rgba(0, 0, 0, 0.3); | |||
z-index: 100000; | |||
} | |||
.phoneBox{ | |||
position: absolute; | |||
width: 80%; | |||
/* height: 200rpx; */ | |||
border-radius: 12rpx; | |||
background-color: #f6f6f6; | |||
transform: translate(-50%, -50%); | |||
top: 50%; | |||
left: 50%; | |||
overflow: hidden; | |||
} | |||
.userPhone{ | |||
overflow: hidden; | |||
margin: 20rpx ; | |||
} | |||
.inputPhone{ | |||
float: left; | |||
text-indent: 40rpx; | |||
font-size: 28rpx; | |||
color: #000; | |||
letter-spacing: 0; | |||
margin-top: 28rpx; | |||
width: 50%; | |||
display: block; | |||
} | |||
.btn{ | |||
width: 210rpx !important; | |||
border-radius: 16rpx; | |||
margin-top: 12rpx; | |||
margin-right: 30rpx; | |||
font-size: 30rpx!important; | |||
letter-spacing: 0; | |||
padding: 0!important; | |||
float: right; | |||
height: 80rpx; | |||
line-height: 80rpx; | |||
background: #52a0fd; | |||
color: #fff; | |||
text-align: center; | |||
} | |||
.auth{ | |||
width: 50%; | |||
text-indent: 40rpx; | |||
font-size: 28rpx; | |||
color: #000; | |||
letter-spacing: 0; | |||
margin: 20rpx; | |||
} | |||
.send{ | |||
width: 80%; | |||
line-height: 80rpx; | |||
height: 80rpx; | |||
background: #52a0fd; | |||
color: #fff; | |||
font-size: 36rpx; | |||
text-align: center; | |||
margin: 40rpx auto 20rpx auto; | |||
border-radius: 12rpx; | |||
font-size: 30rpx; | |||
} | |||
.hiePhone{ | |||
width: 80%; | |||
margin: 10rpx auto; | |||
overflow: hidden; | |||
} | |||
.f{ | |||
float: left; | |||
font-size: 30rpx; | |||
height: 60rpx; | |||
line-height: 60rpx; | |||
margin-left: 30%; | |||
} | |||
.r{ | |||
width: 40rpx; | |||
height: 40rpx; | |||
/* line-height: 60rpx; */ | |||
text-align: center; | |||
float: right; | |||
margin-top: 10rpx; | |||
/* font-size: 30rpx; */ | |||
} | |||
input{ | |||
text-align: left; | |||
} |
@@ -0,0 +1,143 @@ | |||
// pages/index/sw/index.js | |||
let config = require("../../config/config.js"); | |||
let Http = require("../../utils/HttpBasics"); | |||
let app = getApp(); | |||
const imgurl = require("../../utils/imgurl"); | |||
const bgColor = require("../../utils/bgColor.js") | |||
Component({ | |||
/** | |||
* 组件的属性列表 | |||
*/ | |||
properties: {}, | |||
/** | |||
* 组件的初始数据 | |||
*/ | |||
data: { | |||
sql: bgColor.colorFirst.main.sql, | |||
txt: bgColor.colorFirst.main.txt, | |||
change: imgurl.change.url, | |||
None: imgurl.None.url, | |||
jianUrl: imgurl.jian.url, | |||
barginicon: imgurl.barginicon.url, | |||
wangmeimeibargin: imgurl.wangmeimeibargin.url, | |||
kData:[], | |||
kSize:'', | |||
pSize: '', | |||
pData:[], | |||
couponId:'', | |||
couponId1: '', | |||
}, | |||
/** | |||
* 组件的方法列表 | |||
*/ | |||
methods: { | |||
//获取砍价拼团数据 | |||
getList(val) { | |||
// debugger | |||
let that = this; | |||
let param = '' | |||
if(val=='1'){ | |||
param={ | |||
targetAd : 6, | |||
couponId: this.data.couponId | |||
} | |||
}else{ | |||
param = { | |||
targetAd : 7, | |||
couponId: this.data.couponId1 | |||
} | |||
} | |||
Http.get({ | |||
url: config.api.change, | |||
data:param, | |||
}).then(res => { | |||
if(res.data != undefined && res.data){ | |||
if(val=='1'){ | |||
that.setData({ | |||
kData: res.data.data, | |||
kSize: res.data.size, | |||
couponId: res.data.data.couponId, | |||
}); | |||
}else{ | |||
that.setData({ | |||
pData: res.data.data, | |||
pSize:res.data.size, | |||
couponId1: res.data.data.couponId | |||
}); | |||
} | |||
} else { | |||
if(val=='1'){ | |||
that.setData({ | |||
kData: '', | |||
kSize: '', | |||
couponId: '', | |||
}); | |||
}else{ | |||
that.setData({ | |||
pData: '', | |||
pSize:'', | |||
couponId1: '' | |||
}); | |||
} | |||
} | |||
}) | |||
.catch(err => { | |||
console.log(err) | |||
tt.showToast({ | |||
title: err.errMsg, | |||
icon: 'none', | |||
duration: 2000, | |||
mask: false | |||
}); | |||
}) | |||
}, | |||
// 换一换 | |||
getChange(){ | |||
let that = this | |||
if (that.kSize != 1 && that.kSize != 0){ | |||
that.getList(1) | |||
} | |||
if (that.pSize!=1 && that.pSize !=0) { | |||
that.getList(2) | |||
} | |||
}, | |||
//跳转砍价详情 | |||
gotokjdetail: function (e) { | |||
tt.navigateTo({ | |||
url: `/pages/coupon/detail/index?couponChannelId=${ | |||
e.currentTarget.dataset.couponchannelid | |||
}&couponId=${ | |||
e.currentTarget.dataset.couponid | |||
}&targetAd=${ | |||
e.currentTarget.dataset.targetad | |||
}` | |||
}); | |||
}, | |||
//跳转拼团详情 | |||
gotoptdetail: function (e) { | |||
tt.navigateTo({ | |||
url: `/pages/spellGroup/mySpellGroup/index?couponChannelId=${ | |||
e.currentTarget.dataset.couponchannelid | |||
}&couponId=${ | |||
e.currentTarget.dataset.couponid | |||
}&targetAd=${ | |||
e.currentTarget.dataset.targetad | |||
}` | |||
}); | |||
}, | |||
}, | |||
ready() { | |||
app.couponChannelListCallback = (token,val) => { | |||
Http.setToken(token); | |||
this.getList(1); | |||
this.getList(2); | |||
}; | |||
if (app.globalData.token && app.globalData.token != null) { | |||
app.couponChannelListCallback(app.globalData.token); | |||
} | |||
} | |||
}); |
@@ -0,0 +1,4 @@ | |||
{ | |||
"component": true, | |||
"usingComponents": {} | |||
} |
@@ -0,0 +1,59 @@ | |||
<view class='hotBox'> | |||
<view class='hotTitle'> | |||
<view class='titleL'> | |||
<view class='sql' style='background:{{sql}}'></view> | |||
<text>爆款专区</text> | |||
</view> | |||
<view class='titleR' bindtap='getChange'tt:if="{{pSize>=2||kSize>=2}}" > | |||
<text style='color:{{txt}}'>换一换</text> | |||
<view> | |||
<image src='{{change}}' bindtap='' mode='aspectFill'></image> | |||
</view> | |||
</view> | |||
</view> | |||
<view class='hotCon clearfix'> | |||
<view class='kanjia' tt:if="{{kSize}}" bindtap="gotokjdetail" data-couponId='{{kData.couponId}}' data-couponChannelId="{{kData.id}}" data-targetAd="{{kData.targetAd}}" > | |||
<view > | |||
<image mode='aspectFill' lazy-load='true' src="{{kData.coverImg}}" /> | |||
</view> | |||
<view class='kjText'> | |||
<text class='title'>{{kData.title}}</text> | |||
<text class='price'>¥{{kData.priceStr}}</text> | |||
<text class='sale'><text>¥</text>{{kData.salePriceStr}}</text> | |||
<view class=' btn btnk'>砍价</view> | |||
</view> | |||
</view> | |||
<view class='kanjia' tt:if="{{!kSize}}"> | |||
<view> | |||
<image src='{{None}}' bindtap='' mode='aspectFill'></image> | |||
</view> | |||
<view class='kjText'> | |||
<text class='title'>疯狂补货中…</text> | |||
<text class='expect'>敬请期待</text> | |||
<view class='btnk btnNone'>砍价</view> | |||
</view> | |||
</view> | |||
<view class='pintuan' tt:if="{{pSize}}" bindtap="gotoptdetail" data-couponId='{{pData.couponId}}' data-couponChannelId="{{pData.id}}" data-targetAd="{{pData.targetAd}}"> | |||
<view> | |||
<image mode='aspectFill' lazy-load='true' src="{{pData.coverImg}}" /> | |||
</view> | |||
<view class='ptText'> | |||
<text class='title'>{{pData.title}}</text> | |||
<text class='price'>¥{{pData.priceStr}}</text> | |||
<text class='sale'> <text>¥</text>{{pData.salePriceStr}}</text> | |||
<view class='btn btnp' >拼团</view> | |||
</view> | |||
</view> | |||
<view class='pintuan' tt:if="{{!pSize}}"> | |||
<view> | |||
<image src='{{None}}' bindtap='' mode='aspectFill'></image> | |||
</view> | |||
<view class='ptText'> | |||
<text class='title'>疯狂补货中...</text> | |||
<text class='expect'>敬请期待</text> | |||
<view class='btnp btnNone'>拼团</view> | |||
</view> | |||
</view> | |||
</view> | |||
</view> |
@@ -0,0 +1,133 @@ | |||
@import "../../app.ttss"; | |||
.hotBox{ | |||
width:710rpx; | |||
margin: 0 auto ; | |||
} | |||
.hotTitle{ | |||
width: 100%; | |||
height: 60rpx; | |||
line-height: 60rpx; | |||
font-size: 30rpx; | |||
display: flex; | |||
justify-content: space-between; | |||
font-family:PingFangSC-Medium; | |||
} | |||
.titleL .titleR{ | |||
width: 100rpx; | |||
} | |||
.titleR text{ | |||
float: left; | |||
margin-right: 10rpx; | |||
font-family:PingFangSC-Regular!important; | |||
} | |||
.titleR view{ | |||
height: 40rpx; | |||
width: 40rpx; | |||
/* margin-top: 10rpx; */ | |||
float: left; | |||
} | |||
.titleR image{ | |||
height: 28rpx; | |||
width: 28rpx; | |||
} | |||
.sql{ | |||
width:12rpx; | |||
height:24rpx; | |||
border-radius:8rpx; | |||
float: left; | |||
margin: 20rpx 10rpx 0 0; | |||
} | |||
.hotCon{ | |||
width: 100%; | |||
} | |||
.kanjia, .pintuan{ | |||
width: 346rpx; | |||
height: 156rpx; | |||
float: left; | |||
border-radius: 12rpx; | |||
display: flex; | |||
justify-content: space-between; | |||
position: relative; | |||
} | |||
.kanjia{ | |||
margin-right: 18rpx; | |||
background:linear-gradient(130deg,rgba(50,177,252,1) 0%,rgba(47,108,255,1) 100%); | |||
} | |||
.pintuan{ | |||
background:linear-gradient(127deg,rgba(252,177,74,1) 0%,rgba(254,70,20,1) 100%); | |||
} | |||
.hotCon image{ | |||
width: 86rpx; | |||
height: 86rpx; | |||
margin: 24rpx 0 46rpx 16rpx; | |||
} | |||
.hotCon .btn{ | |||
width:80rpx; | |||
height:44rpx; | |||
line-height: 44rpx; | |||
background:rgba(255,255,255,1); | |||
border-radius:18rpx; | |||
font-size: 24rpx; | |||
position: absolute; | |||
right: 20rpx; | |||
bottom: 20rpx; | |||
text-align: center; | |||
} | |||
.btnk{ | |||
color: #2C8DFF; | |||
} | |||
.btnp{ | |||
color: #FD782D; | |||
} | |||
.btnNone{ | |||
width:80rpx; | |||
height:44rpx; | |||
line-height: 44rpx; | |||
border-radius:18rpx; | |||
font-size: 24rpx; | |||
position: absolute; | |||
right: 20rpx; | |||
bottom: 20rpx; | |||
text-align: center; | |||
background:rgba(255,255,255,0.5) | |||
} | |||
.kjText,.ptText{ | |||
color: #FFFFFF; | |||
margin: 14rpx 10rpx 20rpx 10rpx; | |||
} | |||
.title{ | |||
width: 210rpx; | |||
font-size: 30rpx; | |||
overflow: hidden; | |||
text-overflow:ellipsis; | |||
white-space:nowrap; | |||
float: left; | |||
} | |||
.price{ | |||
width: 128rpx; | |||
overflow: hidden; | |||
text-overflow:ellipsis; | |||
white-space:nowrap; | |||
font-size: 22rpx; | |||
text-decoration:line-through; | |||
float: left; | |||
} | |||
.expect{ | |||
width: 210rpx; | |||
font-size: 22rpx; | |||
float: left; | |||
} | |||
.sale{ | |||
width: 140rpx; | |||
font-size: 32rpx; | |||
float: left; | |||
margin-top: -8rpx; | |||
white-space: nowrap; | |||
text-overflow: ellipsis; | |||
overflow: hidden; | |||
} | |||
.sale text{ | |||
font-size: 20rpx!important; | |||
} |
@@ -0,0 +1 @@ | |||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg class="icon" width="128px" height="128.00px" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path fill="#202020" d="M711.1 928.3c-13.2 0-26.3-5-36.4-15.2L297.8 532.9c-20.1-20.2-20.1-53.1 0-73.3L674.7 79.2c20.1-20.3 52.6-20.3 72.7 0 20.1 20.2 20.1 53.1 0 73.3L406.9 496.2l340.5 343.6c20.1 20.3 20.1 53.1 0 73.3-10 10.1-23.2 15.2-36.3 15.2z" /></svg> |
@@ -0,0 +1 @@ | |||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg class="icon" width="128px" height="128.00px" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path fill="#202020" d="M962.986667 480.426667l-422.4-379.733334a42.666667 42.666667 0 0 0-57.173334 0l-422.4 379.733334a42.666667 42.666667 0 0 0 57.173334 63.146666l9.813333-8.533333V896a42.666667 42.666667 0 0 0 42.666667 42.666667h682.666666a42.666667 42.666667 0 0 0 42.666667-42.666667v-360.96l9.813333 8.533333a42.666667 42.666667 0 0 0 28.586667 11.093334 42.666667 42.666667 0 0 0 31.573333-14.08 42.666667 42.666667 0 0 0-2.986666-60.16zM469.333333 853.333333v-170.666666h85.333334v170.666666z m341.333334-384v384h-170.666667v-213.333333a42.666667 42.666667 0 0 0-42.666667-42.666667h-170.666666a42.666667 42.666667 0 0 0-42.666667 42.666667v213.333333H213.333333v-384a61.013333 61.013333 0 0 0 0-9.386666l298.666667-270.08 298.666667 270.08a61.013333 61.013333 0 0 0 0 9.386666z" /></svg> |
@@ -0,0 +1,83 @@ | |||
const app = getApp() | |||
Component({ | |||
properties: { | |||
background: { | |||
type: String, | |||
value: '#F4F5F9' | |||
}, | |||
color: { | |||
type: String, | |||
value: '#000' | |||
}, | |||
text: { | |||
type: String, | |||
value: 'Wechat' | |||
}, | |||
showLocationIf: { | |||
type: Boolean, | |||
value: false | |||
}, | |||
back: { | |||
type: Boolean, | |||
value: false | |||
}, | |||
home: { | |||
type: Boolean, | |||
value: false | |||
} | |||
}, | |||
data: { | |||
array: ['A广场', 'B广场-北京西单'], | |||
index: 1, | |||
statusBarHeight: app.statusBarHeight + 'px', | |||
navigationBarHeight: (app.statusBarHeight + 44) + 'px', | |||
indexFlaig:null, | |||
}, | |||
methods: { | |||
backHome: function () { | |||
app.globalData.selected = 0 | |||
let tempUrl = '/index/index' | |||
tt.reLaunch({ | |||
url: tempUrl, | |||
success(res) { | |||
console.log(`${res}`); | |||
}, | |||
fail(err) { | |||
console.log(`navigateTo调用失败`,err,tempUrl); | |||
}, | |||
}); | |||
}, | |||
bindPickerChange: function (e) { | |||
console.log('picker发送选择改变,携带值为', e.detail.value) | |||
this.setData({ | |||
index: e.detail.value | |||
}) | |||
}, | |||
back:function() { | |||
tt.navigateBack({ | |||
delta: 1, | |||
success(res) { | |||
console.log(`${res}`); | |||
}, | |||
fail(err) { | |||
console.log(`navigateTo调用失败`,err); | |||
}, | |||
}) | |||
} | |||
}, | |||
attached: function(){ | |||
this.setData({ | |||
indexFlaig:app.globalData.selected | |||
}) | |||
let pages = getCurrentPages(); | |||
console.log(pages.length); | |||
if (pages.length <= 1) { | |||
this.setData({ | |||
back: false | |||
}) | |||
} | |||
} | |||
}) |
@@ -0,0 +1,3 @@ | |||
{ | |||
"component": true | |||
} |
@@ -0,0 +1,20 @@ | |||
<view class="navbar" style="background:{{background}}!important;"> | |||
<view style="{{'height: ' + statusBarHeight}}"></view> | |||
<view class='title-container'> | |||
<view class='capsule' tt:if="{{ back || home}}"> | |||
<view bindtap='back' tt:if="{{indexFlaig!=2 && back}}" > | |||
<image style="left:36%;" src='img/back.svg'></image> | |||
</view> | |||
<view bindtap='backHome' tt:if="{{home}}"> | |||
<image src='img/home.svg' style="width:90%;"></image> | |||
</view> | |||
</view> | |||
<view class='title' style="color:{{color}}!important">{{text}}</view> | |||
<picker bindchange="bindPickerChange" tt:if="{{showLocationIf}}" class="pick-box" value="{{index}}" range="{{array}}"> | |||
<icon class='iconfont icon-daohangdizhiweizhi'></icon> | |||
<view class="picker locations"> | |||
{{array[index]}} | |||
</view> | |||
</picker> | |||
</view> | |||
</view> |
@@ -0,0 +1,92 @@ | |||
.navbar { | |||
width: 100vw; | |||
background-color: #F4F5F9; | |||
position: fixed; | |||
left: 0; | |||
top: 0; | |||
/* height:150rpx; */ | |||
overflow: hidden; | |||
z-index: 400000000; | |||
} | |||
.title-container { | |||
height: 44px; | |||
display: flex; | |||
align-items: center; | |||
position: relative; | |||
} | |||
.capsule { | |||
margin-left: 10px; | |||
height: 32px; | |||
border: 1px solid #e1e1e3; | |||
border-radius: 60px; | |||
display: flex; | |||
align-items: center; | |||
padding: 0 20rpx; | |||
background: #fff!important; | |||
} | |||
.capsule > view { | |||
width: 35px; | |||
height: 60%; | |||
position: relative; | |||
} | |||
.capsule > view:nth-child(2) { | |||
border-left: 1px solid #777; | |||
} | |||
.capsule image { | |||
width: 70%; | |||
height: 100%; | |||
position: absolute; | |||
left: 50%; | |||
top: 50%; | |||
transform: translate(-50%,-50%); | |||
} | |||
.title { | |||
color: #000; | |||
position: absolute; | |||
left: 104px; | |||
right: 104px; | |||
font-weight: 600; | |||
font-size: 32rpx; | |||
text-align: center; | |||
overflow: hidden; | |||
text-overflow: ellipsis; | |||
white-space: nowrap; | |||
} | |||
@font-face { | |||
font-family: 'iconfont'; /* project id 1353695 */ | |||
src: url('//at.alicdn.com/t/font_1353695_nyv2ld9xqk8.eot'); | |||
src: url('//at.alicdn.com/t/font_1353695_nyv2ld9xqk8.eot?#iefix') format('embedded-opentype'), | |||
url('//at.alicdn.com/t/font_1353695_nyv2ld9xqk8.woff2') format('woff2'), | |||
url('//at.alicdn.com/t/font_1353695_nyv2ld9xqk8.woff') format('woff'), | |||
url('//at.alicdn.com/t/font_1353695_nyv2ld9xqk8.ttf') format('truetype'), | |||
url('//at.alicdn.com/t/font_1353695_nyv2ld9xqk8.svg#iconfont') format('svg'); | |||
} | |||
.iconfont { | |||
font-family: "iconfont" !important; | |||
font-size: 16px; | |||
font-style: normal; | |||
-webkit-font-smoothing: antialiased; | |||
-moz-osx-font-smoothing: grayscale; | |||
} | |||
.icon-daohangdizhiweizhi:before { | |||
content: "\e787"; | |||
} | |||
.locations{ | |||
font-size: 28rpx; | |||
display: inline-block; | |||
width: 200rpx; | |||
overflow: hidden; | |||
text-overflow:ellipsis; | |||
white-space: nowrap; | |||
} | |||
.pick-box{ | |||
width: 260rpx; | |||
padding-left: 20rpx; | |||
} |
@@ -0,0 +1,45 @@ | |||
// components/optimization/optimization.js | |||
Component({ | |||
/** | |||
* 组件的属性列表 | |||
*/ | |||
properties: { | |||
businessList:{ | |||
type:Array, | |||
value:[] | |||
}, | |||
businessData: { | |||
type: Array, | |||
value: [] | |||
}, | |||
}, | |||
/** | |||
* 组件的初始数据 | |||
*/ | |||
data: { | |||
classIndex:0 | |||
}, | |||
/** | |||
* 组件的方法列表 | |||
*/ | |||
methods: { | |||
goDetail(e){ | |||
let couponChannelId = e.currentTarget.dataset.id | |||
let couponId = e.currentTarget.dataset.couponid | |||
tt.navigateTo({ | |||
url: `/pages/coupon/detail/index?couponChannelId=${couponChannelId}&couponId=${couponId}`, | |||
}) | |||
}, | |||
setIndex(e){ | |||
let index = e.currentTarget.dataset.index | |||
let id = e.currentTarget.dataset.id | |||
this.triggerEvent('businessid',id) | |||
this.setData({ | |||
classIndex:index | |||
}) | |||
} | |||
} | |||
}) |
@@ -0,0 +1,4 @@ | |||
{ | |||
"component": true, | |||
"usingComponents": {} | |||
} |
@@ -0,0 +1,40 @@ | |||
<view class="optimizationBox"> | |||
<view class="titleImg"> | |||
<view class="textl f">优选好物</view> | |||
<view class="textr r">Preferred Good</view> | |||
</view> | |||
<view class="classifyBox"> | |||
<view class="itemBox" tt:for="{{businessList}}" tt:key="{{index}}" bindtap="setIndex" data-index="{{index}}" data-id="{{item.id}}"> | |||
<view class="{{classIndex==index?'className_a':'className'}}">{{item.title}}</view> | |||
<view class="xian" tt:if="{{classIndex==index}}"></view> | |||
</view> | |||
</view> | |||
<view class="contBox"> | |||
<view class="contLsitBox"> | |||
<view class="item" tt:for="{{businessData}}" tt:key="{{index}}" bindtap="goDetail" data-couponid="{{item.couponId}}" data-id="{{item.id}}"> | |||
<view class="itemImg"> | |||
<image src="{{item.coverImg}}" mode='scaleToFill'></image> | |||
</view> | |||
<view class="titleName">{{item.title}}</view> | |||
<view class="priceBox"> | |||
<view class="sellingBox f"> | |||
<view class="fuhao">¥</view> | |||
<view class="int">{{item.salePriceStrQ?item.salePriceStrQ:item.salePriceStr}}</view> | |||
<view class="fuhao">{{item.salePriceStrH?'.'+item.salePriceStrH:''}}</view> | |||
</view> | |||
<view class="priceNum r">已售 {{item.sale}}</view> | |||
<view class="originalBox r"> | |||
<view class="origina">¥{{item.priceStr}}</view> | |||
</view> | |||
</view> | |||
<view class="sellout" tt:if="{{item.remainInventory==0}}"> | |||
<image class="selloutImg" src="https://formall.oss-accelerate.aliyuncs.com/cimg/v20211214/home_img_ysx.png"></image> | |||
</view> | |||
</view> | |||
</view> | |||
</view> | |||
</view> |
@@ -0,0 +1,202 @@ | |||
.optimizationBox { | |||
/* overflow: hidden; */ | |||
margin-top: 20rpx; | |||
} | |||
.titleImg { | |||
width: 96%; | |||
height: 80rpx; | |||
margin: 0rpx auto; | |||
background-image: url("https://formall.oss-accelerate.aliyuncs.com/cimg/v20211214/home_ggw_yxhw.png"); | |||
background-size: 100% 100%; | |||
background-repeat: no-repeat; | |||
} | |||
.textl { | |||
font-size: 34rpx; | |||
font-family: OPPOSans; | |||
font-weight: bold; | |||
color: #dfbe99; | |||
margin: 20rpx; | |||
} | |||
.textr { | |||
font-size: 30rpx; | |||
font-family: OPPOSans; | |||
font-weight: 300; | |||
color: #91897e; | |||
margin: 20rpx; | |||
} | |||
.f { | |||
float: left; | |||
} | |||
.r { | |||
float: right; | |||
} | |||
.classifyBox { | |||
width: 100%; | |||
border-radius: 20rpx 20rpx 0 0; | |||
background-color: #fff; | |||
overflow: hidden; | |||
display: -webkit-box; | |||
overflow-x: scroll; | |||
-webkit-overflow-scrolling: touch; | |||
/* margin: 10rpx 0; *//* background: linear-gradient(0deg, #F5F5F5, #fff); */ | |||
} | |||
.classifyBox::-webkit-scrollbar { | |||
display: none; | |||
} | |||
.itemBox { | |||
width: 100rpx; | |||
height: 100rpx; | |||
margin: 0 20rpx; | |||
} | |||
.className { | |||
font-size: 28rpx; | |||
font-family: OPPOSans; | |||
font-weight: 500; | |||
color: #454340; | |||
text-align: center; | |||
margin: 20rpx auto 10rpx auto; | |||
} | |||
.className_a { | |||
font-size: 30rpx; | |||
font-family: OPPOSans; | |||
font-weight: 800; | |||
color: #c99f67; | |||
text-align: center; | |||
background: linear-gradient(180deg, #cc9a60 0%, #dfbf8e 100%); | |||
-webkit-background-clip: text; | |||
-webkit-text-fill-color: transparent; | |||
margin: 20rpx auto 10rpx auto; | |||
} | |||
.xian{ | |||
width: 22rpx; | |||
height: 5rpx; | |||
background: linear-gradient(180deg, #D5A56E, #E9D0AA); | |||
border-radius: 3px; | |||
margin: 0 auto; | |||
} | |||
.contBox{ | |||
background: linear-gradient(0deg, #F5F5F5, rgba(255, 255, 255, 0.5)); | |||
/* height: 350rpx; */ | |||
} | |||
.contLsitBox{ | |||
width: 96%; | |||
margin: 0 auto; | |||
display: flex; | |||
overflow: hidden; | |||
justify-content: space-between; | |||
flex-wrap: wrap; | |||
} | |||
.item{ | |||
width: 49%; | |||
background-color: #fff; | |||
border-radius: 20rpx; | |||
margin: 12rpx 0; | |||
position: relative; | |||
} | |||
.itemImg{ | |||
width: 100%; | |||
height: 350rpx; | |||
border-radius: 20rpx; | |||
/* background-color: aquamarine; */ | |||
} | |||
.itemImg image{ | |||
width: 100%; | |||
height: 100%; | |||
border-radius: 20rpx 20rpx 0 0; | |||
} | |||
.titleName{ | |||
width:90%; | |||
height: 80rpx; | |||
font-size: 28rpx; | |||
font-family: OPPOSans; | |||
font-weight: 500; | |||
color: #333333; | |||
margin: 10rpx auto 0 auto; | |||
overflow: hidden; | |||
text-overflow: ellipsis; | |||
display: -webkit-box; | |||
-webkit-line-clamp: 2; | |||
-webkit-box-orient: vertical; | |||
white-space:normal; | |||
} | |||
.priceBox{ | |||
width: 90%; | |||
overflow: hidden; | |||
margin: 10rpx auto; | |||
} | |||
.f{ | |||
float: left; | |||
} | |||
.r{ | |||
float:right; | |||
} | |||
.sellingBox{ | |||
overflow: hidden | |||
} | |||
.fuhao{ | |||
color: #DF2D2D; | |||
font-size: 24rpx; | |||
float: left; | |||
font-family: OPPOSans; | |||
/* font-weight: bold; */ | |||
margin-top: 10rpx | |||
} | |||
.int{ | |||
float: left; | |||
font-size: 36rpx; | |||
font-family: OPPOSans; | |||
font-weight: bold; | |||
color: #DF2D2D; | |||
} | |||
.originalBox{ | |||
overflow: hidden | |||
} | |||
.origina{ | |||
text-align: right; | |||
font-size: 24rpx; | |||
font-family: OPPOSans; | |||
font-weight: 400; | |||
text-decoration: line-through; | |||
color: #999999; | |||
margin-top: 10rpx; | |||
margin-right: 10rpx; | |||
} | |||
.priceNum{ | |||
text-align: right; | |||
font-size: 24rpx; | |||
font-family: OPPOSans; | |||
font-weight: 400; | |||
color: #999999; | |||
margin-top: 10rpx; | |||
/* margin-right: 10rpx; */ | |||
} | |||
.sellout{ | |||
position: absolute; | |||
top: 0; | |||
left: 0; | |||
background-color: rgba(0, 0, 0, 0.5); | |||
width: 100%; | |||
height: 100%; | |||
border-radius: 20rpx; | |||
} | |||
.selloutImg{ | |||
width: 195rpx !important; | |||
height: 154rpx !important; | |||
margin: 50% auto; | |||
display: block | |||
} |
@@ -0,0 +1,79 @@ | |||
const imgurl = require("../../utils/imgurl"); | |||
Component({ | |||
/** | |||
* 组件的属性列表 | |||
*/ | |||
properties: { | |||
merchantVoList: { | |||
value: [], | |||
type: Array | |||
} | |||
}, | |||
/** | |||
* 组件的初始数据 | |||
*/ | |||
data: { | |||
teljpgUrl: imgurl.teljpg.url, | |||
showMore:false, | |||
more: "点击查看更多", | |||
hidden:"hidden", | |||
height: "" | |||
}, | |||
/** | |||
* 组件的方法列表 | |||
*/ | |||
methods: { | |||
/** | |||
* 跳转到门店列表的详情页面 | |||
*/ | |||
gotoDetail(e) { | |||
tt.navigateTo({ | |||
url: `/pages/index/searchbar/detail/index?id=${e.currentTarget.dataset.id}` | |||
}) | |||
}, | |||
// 点击查看更多 | |||
more: function () { | |||
console.log(this.properties.merchantVoList,"merchantVoList"); | |||
let that = this; | |||
if (that.data.more == '点击查看更多') { | |||
this.setData({ | |||
hidden: "", | |||
height: 'auto!important', | |||
more: "点击收起", | |||
showMore: true | |||
}) | |||
} else { | |||
that.setData({ | |||
hidden: "hidden", | |||
height: 4 * 140 + 'rpx', | |||
more: "点击查看更多", | |||
showMore: true | |||
}) | |||
} | |||
}, | |||
phone: function (e) { | |||
let that = this; | |||
tt.makePhoneCall({ | |||
phoneNumber: e.target.dataset.merchantlinkphone | |||
}); | |||
} | |||
}, | |||
ready: function () { | |||
let merchantVoList = this.properties.merchantVoList; | |||
if (merchantVoList.length>0){ | |||
if (merchantVoList.length <= 4) { | |||
this.setData({ | |||
height: merchantVoList.length * 140 + 'rpx', | |||
showMore: false, | |||
hidden:"hidden" | |||
}) | |||
} else if (merchantVoList && merchantVoList.length > 4) { | |||
this.setData({ | |||
height: 4 * 140 + 'rpx' | |||
}) | |||
} | |||
} | |||
} | |||
}); |
@@ -0,0 +1,3 @@ | |||
{ | |||
"component": true | |||
} |
@@ -0,0 +1,19 @@ | |||
<view class='applyshop'>适用门店</view> | |||
<view class='posi' style='overflow:{{hidden}};height:{{height}}'> | |||
<view class='posi_logo' tt:for="{{merchantVoList}}" tt:key="index"> | |||
<view bindtap='gotoDetail' data-id='{{item.id}}'> | |||
<image src='{{item.merchantImgUrl}}'></image> | |||
</view> | |||
<view bindtap='gotoDetail' data-id='{{item.id}}'> | |||
<view class='name'>{{item.merchantName}}</view> | |||
<view class='shopVoList'> | |||
<view tt:for="{{item.shopVoList}}" tt:key="{{index}}" tt:for-item="itemName"> | |||
<text>{{itemName.buildingName}}{{itemName.floorName}}--{{itemName.shopNumber}}</text> | |||
<text class='douhao' tt:if="{{item.shopVoList.length>1}}">,</text> | |||
</view> | |||
</view> | |||
</view> | |||
<image tt:if="{{item.linkLinePhone}}" bindtap='phone' data-merchantLinkPhone='{{item.linkLinePhone}}' class="tel" src="{{teljpgUrl}}" mode="widthFix" /> | |||
</view> | |||
</view> | |||
<view class='bottom' bindtap='more' tt:if="{{showMore}}">{{more}}</view> |
@@ -0,0 +1,76 @@ | |||
.applyshop { | |||
font-size: 30rpx; | |||
height: 70rpx; | |||
line-height: 70rpx; | |||
text-indent: 1em; | |||
color: #333; | |||
background: #fff; | |||
} | |||
.posi { | |||
position: relative; | |||
width: 100%; | |||
background: #FFF; | |||
} | |||
.posi_logo { | |||
position: relative; | |||
width: 92%; | |||
display: flex; | |||
padding: 20rpx 0; | |||
background: #fff; | |||
margin: 0 auto; | |||
} | |||
.posi_logo view:nth-child(1) { | |||
border-radius: 16rpx; | |||
} | |||
.posi_logo view:nth-child(1) image { | |||
display: block; | |||
width: 100rpx; | |||
height: 100rpx; | |||
border-radius: 16rpx; | |||
margin-right: 16rpx; | |||
border: 1px solid #e5e5e5; | |||
} | |||
.name{ | |||
font-size: 32rpx; | |||
color: #333; | |||
letter-spacing: 0; | |||
width: 500rpx; | |||
white-space: nowrap; | |||
text-overflow: ellipsis; | |||
overflow: hidden; | |||
} | |||
.posi_logo view:nth-child(2) view { | |||
font-size: 32rpx; | |||
color: #333; | |||
letter-spacing: 0; | |||
} | |||
.shopVoList { | |||
display: flex !important; | |||
padding-left: 0 !important; | |||
flex-direction: row !important; | |||
} | |||
.shopVoList text { | |||
font-size: 20rpx !important; | |||
color: #b8b8b8 !important; | |||
} | |||
.bottom{ | |||
background: #fff; | |||
color: #666; | |||
text-align: center; | |||
padding: 20rpx 0; | |||
font-size: 32rpx; | |||
} | |||
.tel { | |||
position: absolute; | |||
right: 0; | |||
top: 0; | |||
bottom: 0; | |||
margin: auto; | |||
width: 50rpx; | |||
height: 50rpx; | |||
} |
@@ -0,0 +1,72 @@ | |||
const Http = require("../../utils/HttpBasics"); | |||
var config = require("../../config/config.js"); | |||
let app = getApp(); | |||
Component({ | |||
data: { | |||
selected: null, | |||
"color": "#abb1be", | |||
"selectedColor": "#fc3e5a", | |||
list: [ | |||
{ | |||
"pagePath": "/index/index", | |||
"text": "首页", | |||
"iconPath": "../../assets/images/home.png", | |||
"selectedIconPath": "../../assets/images/home_a.png" | |||
}, | |||
{ | |||
"pagePath": "/index/searchbar", | |||
"text": "门店", | |||
"iconPath": "../../assets/images/portal.png", | |||
"selectedIconPath": "../../assets/images/portal_a.png" | |||
}, | |||
{ | |||
"pagePath": "/pages/order/index/index", | |||
"text": "订单", | |||
"iconPath": "../../assets/images/dindan.png", | |||
"selectedIconPath": "../../assets/images/dindan_a.png" | |||
}, | |||
{ | |||
"pagePath": "/index/user", | |||
"text": "我的", | |||
"iconPath": "../../assets/images/user.png", | |||
"selectedIconPath": "../../assets/images/user_a.png" | |||
} | |||
] | |||
}, | |||
properties: { | |||
}, | |||
lifetimes: { | |||
attached: function () { | |||
// 在组件实例进入页面节点树时执行 | |||
console.log(app.globalData.selected,'selected'); | |||
this.setData({ | |||
selected:app.globalData.selected | |||
}) | |||
}, | |||
detached: function () { | |||
// 在组件实例被从页面节点树移除时执行 | |||
}, | |||
}, | |||
methods: { | |||
navigateTo(e) { | |||
// this.setData({ | |||
// list: this.data.home_a_img | |||
// }) | |||
// console.log(this.data.home_a_img) | |||
const data = e.currentTarget.dataset; | |||
// this.setData({ | |||
// selected: data.index | |||
// }) | |||
app.globalData.selected = data.index | |||
console.log(app.globalData.selected); | |||
const url = data.path; | |||
tt.reLaunch({ | |||
url | |||
}); | |||
}, | |||
} | |||
}) |
@@ -0,0 +1,4 @@ | |||
{ | |||
"component": true, | |||
"usingComponents": {} | |||
} |
@@ -0,0 +1,8 @@ | |||
<view class="tab-bar" tt:if="{{list.length!=0}}"> | |||
<view class="tab-bar-border"></view> | |||
<view tt:for="{{list}}" tt:key="index" class="tab-bar-item" data-path="{{item.pagePath}}" data-index="{{index}}" bindtap="navigateTo"> | |||
<image src="{{selected === index ? item.selectedIconPath : item.iconPath}}"></image> | |||
<view style="color: {{selected === index ? selectedColor : color}}">{{item.text}}</view> | |||
</view> | |||
</view> | |||
@@ -0,0 +1,41 @@ | |||
.tab-bar { | |||
position: fixed; | |||
bottom: 0; | |||
left: 0; | |||
right: 0; | |||
height: 70rpx; | |||
padding: 10rpx; | |||
background: white; | |||
display: flex; | |||
padding-bottom: env(safe-area-inset-bottom); | |||
overflow: hidden; | |||
} | |||
.tab-bar-border { | |||
background-color: rgba(0, 0, 0, 0.33); | |||
position: absolute; | |||
left: 0; | |||
top: 0; | |||
width: 100%; | |||
height: 1px; | |||
transform: scaleY(0.5); | |||
} | |||
.tab-bar-item { | |||
flex: 1; | |||
text-align: center; | |||
display: flex; | |||
justify-content: center; | |||
align-items: center; | |||
flex-direction: column; | |||
} | |||
.tab-bar-item image { | |||
width: 46rpx; | |||
height: 46rpx; | |||
} | |||
.tab-bar-item view { | |||
font-size: 20rpx; | |||
} | |||
@@ -0,0 +1,398 @@ | |||
var config = { | |||
api: { | |||
/* | |||
*欢乐城首页专题 | |||
*/ | |||
showList:"/topic/showList", | |||
/* | |||
*记录微信订阅 | |||
*/ | |||
activityDey:"/wxActivity/listStatus",//活动日历日期 | |||
activityCalendar:'/wxActivity/list',//活动日历列表 | |||
signDey:"/userSign/listStatus",//签到日期列表 | |||
continuousDye:"/userSign/signInStatus",//连续签到天数 | |||
userSign:"/userSign/signIn",//签到 | |||
signRule:"/credit/credit_rules",//签到规则 | |||
wxMsg: '/user/updateMsg', | |||
/** | |||
* 获取首页按钮 | |||
*/ | |||
wxCustomizeModule:"/wxCustomizeModule/list", | |||
/** | |||
* 微信消息推送获取模板id | |||
*/ | |||
templateId: "/wxMsg/templateList", | |||
//问卷列表 | |||
questionnaire :"/wxQuestionOneself/list", | |||
//问卷详情 | |||
questionnaireDetail:"/wxQuestionOneself/detailsById", | |||
//提交问卷 | |||
submitQuestin:"/wxQuestionOneself/userAdd", | |||
//投诉建议add | |||
suggest:"/wxOpinion/add", | |||
/** | |||
* 接口用途:login | |||
*/ | |||
login: "/user/login", | |||
/** | |||
* 授权后获取用户的昵称,unionId等信息 | |||
*/ | |||
getUserInfo: "/user/getUserInfo", | |||
//图片上传 | |||
imgUpload: '/upload/awsFileUpload', | |||
/** | |||
* 接口用途:授权后获取用户的手机号 | |||
*/ | |||
getUserPhone: "/user/getUserPhone", | |||
/** | |||
* 检查用户授权状态 | |||
*/ | |||
checkUserStatus: "/user/checkUserStatus", | |||
/** | |||
* 检查用户手机授权状态 | |||
*/ | |||
checkPhoneStatus: "/user/checkPhoneStatus", | |||
/** | |||
* 商户优惠信息 | |||
*/ | |||
listByMerchant: "/wxCouponChannel/listByMerchant", | |||
/** | |||
* 优惠券详情 | |||
*/ | |||
couponDetail: "/wxCoupon/detail", | |||
/** | |||
* 购物车订单详情 | |||
*/ | |||
goodsDetail:"/order/goodsDetail", | |||
/** | |||
* 优惠券图文混排详情 | |||
*/ | |||
couponHtmlDetail: "/wxCoupon/html", | |||
couponHtmlDetailForPkg: "/couponOrder/html", | |||
/** | |||
* 获取样式 | |||
*/ | |||
setType: '/wxMiniappTheme/getOne', | |||
/** | |||
* 业态查询 | |||
* filter | |||
* 2 券 | |||
* 1 商户 | |||
*/ | |||
businessList: "/wxBusiness/listAll", | |||
/** | |||
* 频道查询 | |||
*/ | |||
couponChannelList: "/wxCouponChannel/list", | |||
/** | |||
* 换一换change | |||
*/ | |||
change: "/wxCouponChannel/change", | |||
/** | |||
* 下订单 | |||
*/ | |||
orderSave: "/order/save", | |||
/** | |||
* 多少量下单 | |||
*/ | |||
goodsShopCartSave:"/order/goodsShopCartSave", | |||
/** | |||
* 支付订单 | |||
*/ | |||
payOrderCreate: "/pay/create", | |||
/** | |||
* 订单状态更新 | |||
*/ | |||
payOrderUpdate: "/pay/updatePayOrder", | |||
/** | |||
* 订单列表 /order/list | |||
*/ | |||
orderList: "/order/listGoods_v1", | |||
getWeRunData: '/user/getWeRunData', | |||
/** | |||
* 订单详情 | |||
*/ | |||
orderDetail: "/order/detail_v1", | |||
// 券包详情 | |||
// orderDetailAll: "/order/detail_v1", | |||
/** | |||
* 券包 | |||
*/ | |||
couponOrderList: "/couponOrder/list", | |||
/** | |||
* 券包详情 | |||
*/ | |||
couponOrderDetail: "/couponOrder/detail", /// TODO | |||
/** | |||
* 验证码发送 | |||
*/ | |||
sendValidationCode: "/wxMsgValidationcode/sendvalidationcode", | |||
/** | |||
* 验证码确认 | |||
*/ | |||
validationCode: "/wxMsgValidationcode/hasvalidationcode", | |||
/** | |||
* 车场信息获取 | |||
*/ | |||
scoreLevelInfo: '/mall/scoreLevelInfo', | |||
getParkInfo: "/wxPark/info", | |||
/** | |||
* 用户所绑车牌获取 | |||
*/ | |||
userCarCount: "/user/carCount", | |||
/** | |||
* 用户所绑车牌获取 | |||
*/ | |||
getUserCarList: "/user/carList", | |||
/** | |||
* 联合登录 | |||
*/ | |||
carInit: "/car/init", | |||
/** | |||
* 绑车牌 | |||
*/ | |||
bindCar: "/car/bindCar", | |||
/** | |||
* 解绑车牌 | |||
*/ | |||
unbindCar: "/car/unbindCar", | |||
/** | |||
* 停车费 | |||
*/ | |||
getCarStopFee: "/car/getCarStopFee", | |||
/** | |||
* 停车费抵扣 (TJD) | |||
*/ | |||
deductionFee: "/car/deductionFee", | |||
/** | |||
* 优免券领取 | |||
*/ | |||
getCarCoupon: "/car/getCoupon", | |||
/** | |||
* 停车券包 | |||
*/ | |||
couponOrderCarList: "/car/couponOrderList", | |||
/** | |||
* banner | |||
*/ | |||
bannerlist: "/wxCampaign/list", | |||
/** | |||
* banner详情页面 | |||
*/ | |||
bannerDetail: "/wxCampaign/findById", | |||
/** | |||
* 授权个人信息 | |||
* 和授权手机号 | |||
* 和login页面 | |||
* 页面的图标 | |||
*/ | |||
marketicon: '/mall/getAppIcon', | |||
/** | |||
* 获取停车场状态 | |||
*/ | |||
getParkStatus: '/car/getParkStatus', | |||
/** | |||
* 检查核销的状态 | |||
*/ | |||
getStatus: "/couponOrder/getStatus", | |||
/** | |||
* 获得成长值 | |||
*/ | |||
getScore: '/user/userinfo', | |||
/** | |||
* 小程序分享 | |||
* title | |||
* 描述 | |||
*/ | |||
getWeapNote: '/mall/getWeapNote', | |||
/** | |||
* 商场信息(小程序分享) | |||
*/ | |||
getMallInfo: '/mall/mallInfo', | |||
/** | |||
* 小程序获取游戏路径 | |||
*/ | |||
getGame: '/game/getOne', | |||
/** | |||
* 小程序获取广告路径 | |||
*/ | |||
getGg: '/floatingLayer/getFloatingLayer', | |||
/** | |||
* 小程序某一个游戏信息 | |||
*/ | |||
getOneGame: '/game/getOneGame', | |||
/** | |||
* 用户更新信息 | |||
*/ | |||
updateInfo: "/user/updateUserInfo", | |||
/** | |||
* 查询问卷 | |||
*/ | |||
getQuestion: "/wxQuestion/getQuestion", | |||
/** | |||
* 提交问卷 | |||
*/ | |||
answerQuestion: "/wxQuestion/answerQuestion", | |||
/** | |||
* | |||
获取打折商户列表 | |||
*/ | |||
discountMerchantList: "/mall/discountMerchantList", | |||
/** | |||
* 卡包分页列表接口 | |||
*/ | |||
cardorderList: "/couponOrder/cardList", | |||
/** | |||
* 卡券详情接口 | |||
*/ | |||
cardDetail: "/couponOrder/cardDetail", | |||
/** | |||
* C端扫B端储值卡支付订单 | |||
*/ | |||
cardPayOrder: "/cardPay/order_create", | |||
/** | |||
* 兑换历史列表 | |||
*/ | |||
scoreHistory: "/scoreHistory/list", | |||
/** | |||
* 获取用户折扣率 | |||
*/ | |||
getDiscountInfo: "/user/getDiscountInfo", | |||
/** | |||
* C端扫B端储值卡交易流水列表接口 | |||
*/ | |||
cardpayList: "/cardPay/list", | |||
/** | |||
* 根据code查询接口 | |||
*/ | |||
findByCode: "/merchant/findByCode", | |||
/** | |||
* 参与砍价 | |||
*/ | |||
pressOrderJoin: "/press/pressOrderJoin", | |||
/** | |||
* 我的砍价列表 | |||
*/ | |||
pressOrderList: "/order/pressOrderList", | |||
/** | |||
* 砍价订单详情 | |||
*/ | |||
pressOrderDetail: "/order/pressOrderDetail", | |||
/** | |||
* | |||
*/ | |||
getPressOrderStatus: "/press/getPressOrderStatus", | |||
/** | |||
* 查询转赠卡状态 | |||
*/ | |||
queryCardStatus: "/couponOrder/queryCardStatus", | |||
/** | |||
* 领取转赠卡 | |||
*/ | |||
cardAccept: '/couponOrder/cardAccept', | |||
/** | |||
* 获取我的拼团列表 | |||
*/ | |||
getMySepllList: '/orderGroup/queryOrderGroup', | |||
/** | |||
*查询差1个的团购信息 | |||
*/ | |||
queryRemainOne: '/orderGroup/queryRemainOne', | |||
/** | |||
* *分页列表接口 | |||
*/ | |||
merchantList: "/merchant/list", | |||
/* | |||
* 查询拼团状态 | |||
*/ | |||
queryOrderGroupStatus: '/orderGroup/queryOrderGroupStatus', | |||
/** | |||
* 去拼团 | |||
*/ | |||
toOrderGroup: '/orderGroup/toOrderGroup', | |||
/** | |||
* 查询是否已参团 | |||
*/ | |||
queryAttendStatus: '/orderGroup/queryAttendStatus', | |||
/** | |||
* 专题 | |||
*/ | |||
topicShow: "/topic/show", | |||
/** | |||
* 专题详情 | |||
*/ | |||
topicFindById: "/topic/findById", | |||
/** | |||
* 积分券详情 | |||
*/ | |||
integralDetail: '/wxCoupon/findById', | |||
/** | |||
* 会员积分记录 | |||
*/ | |||
integralList: '/credit/list', | |||
/** | |||
* 用户更新位置信息 | |||
*/ | |||
updateLBS: "/user/updateLBS", | |||
/** | |||
* 用户更新信息 | |||
*/ | |||
updateUserInfo: "/user/updateUserInfo", | |||
/** | |||
* 用户更新scene | |||
*/ | |||
updateScene: "/user/updateScene", | |||
/** | |||
* 富文本详情 | |||
*/ | |||
printHtmlById: "/wxCampaign/printHtmlById", | |||
acfindById: "/wxActivity/findById", | |||
acPrintHtmlById: "/wxActivity/printHtmlById", | |||
//参与活动 | |||
activityJoin: "/wxActivityJoin/join", | |||
//签到 | |||
activitySign: "/wxActivityJoin/sign", | |||
activityList: "/wxActivityJoin/list", | |||
//获取未支付的订单 | |||
getUnPaidOrder: "/order/getUnPaidOrder", | |||
getCouponOrderByPassword: '/couponPassword/getCouponOrderByPassword', | |||
getbuildingfloorlist: '/wxMallBuilding/getbuildingfloorlist', | |||
//商场信息接口 | |||
getMallInfo: "/mall/mallInfo", | |||
// 获取楼层楼座数据 | |||
getbuildingfloorlist: "/wxMallBuilding/getbuildingfloorlist", | |||
// 获取所有直播间和商品信息 | |||
getReplayList: "/live/replayList", | |||
// 获取直播房间回放数据和商品信息 | |||
getRoomList: "/live/roomList", | |||
//商城地图 | |||
getStoreMap:"/wxMallBuilding/getbuildingfloorlist", | |||
//判断有没有蜂鸟地图 | |||
ifFengMap:'/fengniaomap/getConfig', | |||
//分享小程序二维码 | |||
getQrcodeFx:"/user/userinfoQrCode", | |||
//添加收货地址 | |||
collectSite:"/userBasicInfoAddress/saveOrUpdate", | |||
//收货地址列表 | |||
siteList: "/userBasicInfoAddress/list", | |||
//查询收货地址 | |||
siteCheck: "/userBasicInfoAddress/findById", | |||
//删除收获地址 | |||
siteDel: "/userBasicInfoAddress/del", | |||
//确认收货 | |||
verify:"/couponOrder/verify", | |||
//全包下订单 | |||
couponPackageSave :"/order/couponPackageSave", | |||
//获取动态核销码 | |||
dynamicId:"/couponOrder/dynamicId" | |||
}, | |||
}; | |||
/* | |||
for (var key in config.api) { | |||
config.api[key] = apiPrefix + config.api[key]; | |||
} | |||
*/ | |||
module.exports = config; |
@@ -0,0 +1,29 @@ | |||
Component({ | |||
externalClasses: ['i-class', 'i-class-alone'], | |||
properties: { | |||
count: { | |||
type: Number, | |||
value: 0, | |||
observer: 'finalCount' | |||
}, | |||
overflowCount: { | |||
type: Number, | |||
value: 99 | |||
}, | |||
dot: { | |||
type: Boolean, | |||
value: false | |||
}, | |||
}, | |||
data: { | |||
finalCount: 0 | |||
}, | |||
methods: { | |||
finalCount() { | |||
this.setData({ | |||
finalCount: parseInt(this.data.count) >= parseInt(this.data.overflowCount) ? `${this.data.overflowCount}+` : this.data.count | |||
}); | |||
}, | |||
} | |||
}); |
@@ -0,0 +1,3 @@ | |||
{ | |||
"component": true | |||
} |
@@ -0,0 +1,5 @@ | |||
<view class="i-class i-badge"> | |||
<slot></slot> | |||
<view class="i-badge-dot" tt:if="{{ dot }}"></view> | |||
<view class="i-badge-count i-class-alone" tt:elif="{{ count !== 0 }}">{{ finalCount }}</view> | |||
</view> |
@@ -0,0 +1 @@ | |||
.i-badge{position:relative;display:inline-block;line-height:1;vertical-align:middle}.i-badge-count{position:absolute;transform:translateX(50%);top:-6px;right:0;height:18px;border-radius:9px;min-width:18px;background:#ed3f14;border:1px solid transparent;color:#fff;line-height:18px;text-align:center;padding:0 5px;font-size:12px;white-space:nowrap;transform-origin:-10% center;z-index:10;box-shadow:0 0 0 1px #fff;box-sizing:border-box;text-rendering:optimizeLegibility}.i-badge-count-alone{top:auto;display:block;position:relative;transform:translateX(0)}.i-badge-dot{position:absolute;transform:translateX(-50%);transform-origin:0 center;top:-4px;right:-8px;height:8px;width:8px;border-radius:100%;background:#ed3f14;z-index:10;box-shadow:0 0 0 1px #fff} |
@@ -0,0 +1,80 @@ | |||
Component({ | |||
externalClasses: ['i-class'], | |||
properties: { | |||
// default, primary, ghost, info, success, warning, error | |||
type: { | |||
type: String, | |||
value: '', | |||
}, | |||
inline: { | |||
type: Boolean, | |||
value: false | |||
}, | |||
// default, large, small | |||
size: { | |||
type: String, | |||
value: '', | |||
}, | |||
// circle, square | |||
shape: { | |||
type: String, | |||
value: 'square' | |||
}, | |||
disabled: { | |||
type: Boolean, | |||
value: false, | |||
}, | |||
loading: { | |||
type: Boolean, | |||
value: false, | |||
}, | |||
long: { | |||
type: Boolean, | |||
value: false | |||
}, | |||
openType: String, | |||
appParameter: String, | |||
hoverStopPropagation: Boolean, | |||
hoverStartTime: { | |||
type: Number, | |||
value: 20 | |||
}, | |||
hoverStayTime: { | |||
type: Number, | |||
value: 70 | |||
}, | |||
lang: { | |||
type: String, | |||
value: 'en' | |||
}, | |||
sessionFrom: { | |||
type: String, | |||
value: '' | |||
}, | |||
sendMessageTitle: String, | |||
sendMessagePath: String, | |||
sendMessageImg: String, | |||
showMessageCard: Boolean | |||
}, | |||
methods: { | |||
handleTap () { | |||
if (this.data.disabled) return false; | |||
this.triggerEvent('click'); | |||
}, | |||
bindgetuserinfo({ detail = {} } = {}) { | |||
this.triggerEvent('getuserinfo', detail); | |||
}, | |||
bindcontact({ detail = {} } = {}) { | |||
this.triggerEvent('contact', detail); | |||
}, | |||
bindgetphonenumber({ detail = {} } = {}) { | |||
this.triggerEvent('getphonenumber', detail); | |||
}, | |||
binderror({ detail = {} } = {}) { | |||
this.triggerEvent('error', detail); | |||
} | |||
} | |||
}); |
@@ -0,0 +1,3 @@ | |||
{ | |||
"component": true | |||
} |
@@ -0,0 +1,20 @@ | |||
<button | |||
class="i-class i-btn {{ long ? 'i-btn-long' : '' }} {{ 'i-btn-' + size }} {{ 'i-btn-' + type }} {{ 'i-btn-' + shape }} {{ loading ? 'i-btn-loading' : '' }} {{ disabled ? 'i-btn-disabled' : ''}} {{ inline ? 'i-btn-inline' : '' }}" | |||
hover-class="i-btn-hover" | |||
bindtap="handleTap" | |||
open-type="{{ openType }}" | |||
app-parameter="{{ appParameter }}" | |||
hover-stop-propagation="{{ hoverStopPropagation }}" | |||
hover-start-time="{{ hoverStartTime }}" | |||
hover-stay-time="{{ hoverStayTime }}" | |||
session-from="{{ sessionFrom }}" | |||
send-message-title="{{ sendMessageTitle }}" | |||
send-message-path="{{ sendMessagePath }}" | |||
send-message-img="{{ sendMessageImg }}" | |||
show-message-card="{{ showMessageCard }}" | |||
bindcontact="bindcontact" | |||
bindgetuserinfo="bindgetuserinfo" | |||
bindgetphonenumber="bindgetphonenumber" | |||
binderror="binderror" | |||
plain="true" | |||
><view class="i-btn-loading-inner" tt:if="{{loading}}"></view><slot></slot></button> |
@@ -0,0 +1,39 @@ | |||
.i-btn{ | |||
text-align:center; | |||
vertical-align:middle; | |||
touch-action:manipulation; | |||
cursor:pointer; | |||
background-image:none; | |||
white-space:nowrap; | |||
user-select:none; | |||
font-size:14px; | |||
border-radius:2px; | |||
border:0!important; | |||
position:relative; | |||
text-decoration:none; | |||
height:44px; | |||
line-height:44px; | |||
box-shadow:inset 0 0 0 1px rgba(0,0,0,.1); | |||
color:#fff!important; | |||
background:#f7f7f7; | |||
color:#495060; | |||
margin:10px | |||
} | |||
.i-btn-hover{opacity:.9} | |||
.i-btn-long{border-radius:0;margin:0;box-shadow:none} | |||
.i-btn-large{height:48px;line-height:48px} | |||
.i-btn-small{height:40px;line-height:40px} | |||
.i-btn-primary{color:#fff!important;background:#2d8cf0!important} | |||
.i-btn-ghost{color:#fff!important;background:#fff!important;color:#495060!important} | |||
.i-btn-success{color:#fff!important;background:#19be6b!important} | |||
.i-btn-warning{color:#fff!important;background:#f90!important} | |||
.i-btn-error{color:#fff!important;background:#ed3f14!important} | |||
.i-btn-info{color:#fff!important;background:#2db7f5!important} | |||
.i-btn-circle{border-radius:44px} | |||
.i-btn-large.i-btn-circle{border-radius:48px} | |||
.i-btn-small.i-btn-circle{border-radius:40px} | |||
.i-btn-loading{opacity:.6} | |||
.i-btn-loading-inner{display:inline-block;margin-right:12px;vertical-align:middle;width:14px;height:14px;background:0 0;border-radius:50%;border:2px solid #fff;border-color:#fff #fff #fff transparent;animation:btn-spin .6s linear;animation-iteration-count:infinite} | |||
.i-btn-disabled{color:#bbbec4!important;background:#f7f7f7!important} | |||
.i-btn-inline{display:inline-block}@keyframes btn-spin{0%{transform:rotate(0)}100%{transform:rotate(360deg)}} | |||
button::after{ border: none; } |
@@ -0,0 +1,40 @@ | |||
Component({ | |||
externalClasses: ['i-class'], | |||
options: { | |||
multipleSlots: true | |||
}, | |||
relations : { | |||
'../sticky/index' : { | |||
type : 'parent' | |||
} | |||
}, | |||
data : { | |||
top : 0, | |||
height : 0, | |||
isFixed : false, | |||
index : -1, | |||
}, | |||
methods: { | |||
updateScrollTopChange(scrollTop){ | |||
const data = this.data; | |||
const top = data.top; | |||
const height = data.height; | |||
this.setData({ | |||
isFixed : ( scrollTop >= top && scrollTop < top + height ) ? true : false | |||
}) | |||
}, | |||
updateDataChange(index) { | |||
const className = '.i-sticky-item'; | |||
const query = tt.createSelectorQuery().in(this); | |||
query.select( className ).boundingClientRect((res)=>{ | |||
if( res ){ | |||
this.setData({ | |||
top : res.top, | |||
height : res.height, | |||
index : index | |||
}) | |||
} | |||
}).exec() | |||
} | |||
} | |||
}) |
@@ -0,0 +1,3 @@ | |||
{ | |||
"component": true | |||
} |
@@ -0,0 +1,10 @@ | |||
<view class="i-sticky-item"> | |||
<view class="i-sticky-item-header i-class {{ isFixed === true ? 'i-sticky-fixed' : '' }}"> | |||
<view class="i-sticky-title"> | |||
<slot name="title"></slot> | |||
</view> | |||
</view> | |||
<view class="i-index-item-content"> | |||
<slot name="content"></slot> | |||
</view> | |||
</view> |
@@ -0,0 +1 @@ | |||
.i-sticky-item-header{background:#eee;font-size:14px;width:100%;height:32px;line-height:32px}.i-sticky-item-content{font-size:14px}.i-sticky-title{width:100%;padding:0 15px;box-sizing:border-box;background:#eee}.i-sticky-fixed .i-sticky-title{position:fixed;top:0} |
@@ -0,0 +1,64 @@ | |||
Component({ | |||
externalClasses: ['i-class'], | |||
properties : { | |||
scrollTop : { | |||
type : Number, | |||
observer(val){ | |||
this._updateScrollTopChange(); | |||
} | |||
} | |||
}, | |||
relations : { | |||
'../sticky-item/index' : { | |||
type : 'child', | |||
linked(){ | |||
this._updateDataChange(); | |||
}, | |||
linkChanged () { | |||
this._updateDataChange(); | |||
}, | |||
unlinked () { | |||
this._updateDataChange(); | |||
} | |||
} | |||
}, | |||
data : { | |||
timer : null, | |||
itemLength : 0, | |||
}, | |||
methods : { | |||
_updateScrollTopChange(){ | |||
const stickies = this.getRelationNodes('../sticky-item/index'); | |||
console.log(stickies,"stickies"); | |||
if(stickies && stickies.length > 0 ){ | |||
stickies.forEach((item) => { | |||
if( item ){ | |||
item.updateScrollTopChange( this.data.scrollTop ); | |||
} | |||
}) | |||
} | |||
}, | |||
_updateDataChange( ){ | |||
const stickies = this.getRelationNodes('../sticky-item/index'); | |||
if(stickies && stickies.length > 0 ){ | |||
if( this.data.timer ){ | |||
clearTimeout( this.data.timer ) | |||
this.setData({ | |||
timer : null | |||
}) | |||
} | |||
this.data.timer = setTimeout(()=>{ | |||
stickies.forEach((item,index) => { | |||
if( item ){ | |||
item.updateDataChange(index); | |||
} | |||
}) | |||
},0) | |||
this.setData({ | |||
timer : this.data.timer | |||
}) | |||
} | |||
} | |||
} | |||
}) |
@@ -0,0 +1,3 @@ | |||
{ | |||
"component": true | |||
} |
@@ -0,0 +1,3 @@ | |||
<view class="i-sticky i-class"> | |||
<slot></slot> | |||
</view> |
@@ -0,0 +1,50 @@ | |||
Component({ | |||
externalClasses: ["i-class"], | |||
relations: { | |||
"../tabs/index": { | |||
type: "parent" | |||
} | |||
}, | |||
properties: { | |||
key: { | |||
type: String, | |||
value: "" | |||
}, | |||
title: { | |||
type: String, | |||
value: "" | |||
}, | |||
dot: { | |||
type: Boolean, | |||
value: false | |||
}, | |||
count: { | |||
type: Number, | |||
value: 0 | |||
} | |||
}, | |||
data: { | |||
current: false, | |||
currentColor: "", | |||
scroll: false | |||
}, | |||
methods: { | |||
changeCurrent(current) { | |||
this.setData({ current }); | |||
}, | |||
changeCurrentColor(currentColor) { | |||
this.setData({ currentColor }); | |||
}, | |||
changeScroll(scroll) { | |||
this.setData({ scroll }); | |||
}, | |||
handleClickItem() { | |||
const parent = this.getRelationNodes("../tabs/index")[0]; | |||
parent.emitEvent(this.data.key); | |||
} | |||
} | |||
}); |