@@ -10,8 +10,17 @@ App({ | |||||
curHtml:"", | curHtml:"", | ||||
marketName:"", | marketName:"", | ||||
mouldType:1, | mouldType:1, | ||||
appId:"ttef6599d8705b49b101", | |||||
appId:config.weapp.AppId, | |||||
selected:0, | selected:0, | ||||
goHomeUrl:"/index/index", | |||||
type:"",//存放跳转标记 | |||||
previewFlag: false, //解决图片预览调用noshow | |||||
skipUrl:"",//存放授权跳转地址 | |||||
skip:"", | |||||
avatarUrl:"",//用户头像 | |||||
nickName:"",//用户姓名 | |||||
templateId:[],//订阅消息模板id | |||||
ifshowtab:false, | |||||
}, | }, | ||||
onLaunch: function () { | onLaunch: function () { | ||||
let that = this | let that = this | ||||
@@ -19,7 +28,7 @@ App({ | |||||
try { | try { | ||||
var res = tt.getSystemInfoSync(); | var res = tt.getSystemInfoSync(); | ||||
that.statusBarHeight = res.statusBarHeight | that.statusBarHeight = res.statusBarHeight | ||||
console.log(`手机型号为 ${res.platform}`); | |||||
console.log(`手机型号为`,that.statusBarHeight); | |||||
this.globalData.platform = res.platform | this.globalData.platform = res.platform | ||||
} catch (error) { | } catch (error) { | ||||
console.log(`获取系统信息失败`); | console.log(`获取系统信息失败`); | ||||
@@ -35,7 +44,32 @@ App({ | |||||
}); | }); | ||||
}, | }, | ||||
statusBarHeight: 0, | statusBarHeight: 0, | ||||
getTemplateId(that) { | |||||
// console.log("隐藏") | |||||
// tt.hideTabBar() | |||||
Http.get({ | |||||
url: config.api.templateId, | |||||
data: { | |||||
pageNum: 1, | |||||
pageSize: 100 | |||||
} | |||||
}).then(res => { | |||||
const { | |||||
code, | |||||
data | |||||
} = res | |||||
if (code == 200) { | |||||
// this.setData({ | |||||
// templateId: data.list | |||||
// }) | |||||
that.globalData.templateId = data.list | |||||
} else { | |||||
return | |||||
} | |||||
}) | |||||
}, | |||||
logn(){ | logn(){ | ||||
let that = this; | let that = this; | ||||
tt.login({ | tt.login({ | ||||
@@ -45,11 +79,11 @@ App({ | |||||
url:config.api.login, | url:config.api.login, | ||||
data:{ | data:{ | ||||
code:code, | code:code, | ||||
appId:'ttef6599d8705b49b101', | |||||
appId:that.globalData.appId, | |||||
systemInfo:JSON.stringify(this.globalData.systemInfo) | systemInfo:JSON.stringify(this.globalData.systemInfo) | ||||
} | } | ||||
}).then(res=>{ | }).then(res=>{ | ||||
// debugger | |||||
tt.setStorageSync("openId", res.data.openId); | |||||
if (res.data.mall){ | if (res.data.mall){ | ||||
that.globalData.marketName = res.data.mall.name ? res.data.mall.name : "" | that.globalData.marketName = res.data.mall.name ? res.data.mall.name : "" | ||||
} | } | ||||
@@ -64,9 +98,11 @@ App({ | |||||
} | } | ||||
Http.setToken(res.data.token); | Http.setToken(res.data.token); | ||||
that.globalData.token = res.data.token | that.globalData.token = res.data.token | ||||
that.getTemplateId(that);//获取订阅消息模板id | |||||
if (that.tokenCallback) { | if (that.tokenCallback) { | ||||
that.tokenCallback(res.data.token); | that.tokenCallback(res.data.token); | ||||
} | } | ||||
}).catch(err=>{ | }).catch(err=>{ | ||||
console.log(err); | console.log(err); | ||||
tt.showModal({ | tt.showModal({ | ||||
@@ -6,8 +6,8 @@ | |||||
"index/user", | "index/user", | ||||
"pages/mainOrder/mainOrder", | "pages/mainOrder/mainOrder", | ||||
"pages/detailOrder/detailOrder", | "pages/detailOrder/detailOrder", | ||||
"pages/ticket/ticket", | |||||
"pages/ticketDetail/ticketDetail", | |||||
"pages/couponorder/index/index", | |||||
"pages/couponorder/detail/index", | |||||
"pages/coupon/detail/index", | "pages/coupon/detail/index", | ||||
"pages/editUser/editUser", | "pages/editUser/editUser", | ||||
"pages/specialcourtesy/specialcourtesy", | "pages/specialcourtesy/specialcourtesy", | ||||
@@ -29,7 +29,15 @@ | |||||
"pages/index/searchbar/detail/index", | "pages/index/searchbar/detail/index", | ||||
"pages/integralmall/payIntegcoupondetail/index", | "pages/integralmall/payIntegcoupondetail/index", | ||||
"pages/integralmall/payIntegcouponStatus/index", | "pages/integralmall/payIntegcouponStatus/index", | ||||
"pages/getPhone/getPhone" | |||||
"pages/getPhone/getPhone", | |||||
"pages/certification/certification", | |||||
"pages/shopCertification/shopCertification", | |||||
"pages/shopMap/shopMap", | |||||
"pages/fitShop/fitShop", | |||||
"pages/paySnapshoot/paySnapshoot", | |||||
"pages/refund/refund", | |||||
"pages/serviceWebView/serviceWebView", | |||||
"pages/liveLsit/liveLsit" | |||||
], | ], | ||||
"window": { | "window": { | ||||
"backgroundTextStyle": "light", | "backgroundTextStyle": "light", | ||||
@@ -6,6 +6,9 @@ view, text { | |||||
font-family: PingFangSC-Regular; | font-family: PingFangSC-Regular; | ||||
} | } | ||||
button::after{ | |||||
border:none | |||||
} | |||||
@font-face { | @font-face { | ||||
font-family: "iconfont"; /* project id 777313 */ | 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"); | ||||
@@ -27,12 +27,14 @@ Component({ | |||||
*/ | */ | ||||
methods: { | methods: { | ||||
gotobannerdetail: function(e) { | gotobannerdetail: function(e) { | ||||
console.log(this.data.list) | console.log(this.data.list) | ||||
if (e.currentTarget.dataset.data.type == 3) { | if (e.currentTarget.dataset.data.type == 3) { | ||||
// 小程序路径 | // 小程序路径 | ||||
let indexOf = (e.currentTarget.dataset.data.pagePath).indexOf("="); | let indexOf = (e.currentTarget.dataset.data.pagePath).indexOf("="); | ||||
console.log(indexOf, "123") | console.log(indexOf, "123") | ||||
let id = (e.currentTarget.dataset.data.pagePath).substring(indexOf); | |||||
let id = (e.currentTarget.dataset.data.pagePath).substr(indexOf); | |||||
console.log(id.split("="),123); | |||||
let type = (e.currentTarget.dataset.data.pagePath).substr(indexOf + 1, 2)// 2020/7/22 变量获取pagePath中的type | let type = (e.currentTarget.dataset.data.pagePath).substr(indexOf + 1, 2)// 2020/7/22 变量获取pagePath中的type | ||||
console.log(indexOf, id, type); | console.log(indexOf, id, type); | ||||
console.log(e.currentTarget.dataset.data.pagePath) | console.log(e.currentTarget.dataset.data.pagePath) | ||||
@@ -42,11 +44,11 @@ Component({ | |||||
}) | }) | ||||
}else if(type == "wj"){ | }else if(type == "wj"){ | ||||
tt.navigateTo({ | tt.navigateTo({ | ||||
url: `/pages/questionnaire/questionnaire?id=${id}`, | |||||
url: `/pages/questionnaire/questionnaire?id=`+id.split("=")[2], | |||||
}) | }) | ||||
}else if (type == 'ra'){ | }else if (type == 'ra'){ | ||||
tt.navigateTo({ | tt.navigateTo({ | ||||
url: `/pages/radetail/index?id=${id}`, | |||||
url: `/pages/radetail/index?id=`+id.split("=")[2], | |||||
}) | }) | ||||
} | } | ||||
}else if(e.currentTarget.dataset.data.type==2){ | }else if(e.currentTarget.dataset.data.type==2){ | ||||
@@ -8,8 +8,8 @@ | |||||
</swiper> | </swiper> | ||||
</view> | </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> | |||||
<view tt:if="{{list.length>0&&mouldType==1}}" class="index-slide-view1"> | |||||
<swiper class="imageContainer1" bindchange="handleChange" indicator-color indicator-active-color="#fff" indicator-dots circular autoplay> | |||||
<block tt:for="{{list}}" tt:key="{{index}}"> | <block tt:for="{{list}}" tt:key="{{index}}"> | ||||
<swiper-item class="item1"> | <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> | <image data-id="{{item.id}}" data-data="{{item}}" bindtap='gotobannerdetail' class="itemImg1 {{currentIndex == index ? 'active1_a': 'active1'}}" src="{{item.coverImg}}"></image> | ||||
@@ -35,47 +35,49 @@ | |||||
margin-top: -30rpx; | margin-top: -30rpx; | ||||
} | } | ||||
.index-slide-view1 { | .index-slide-view1 { | ||||
margin-top: -40rpx; | |||||
/* margin-top: -40rpx; */ | |||||
} | } | ||||
.imageContainer1 { | .imageContainer1 { | ||||
width: 100%; | width: 100%; | ||||
height: 400rpx; | |||||
height: 420rpx; | |||||
} | } | ||||
.itemImg1 { | .itemImg1 { | ||||
position: absolute; | |||||
width: 640rpx; | |||||
height: 360rpx; | |||||
border-radius: 15rpx; | |||||
/* position: absolute; */ | |||||
width: 100%; | |||||
height: 420rpx; | |||||
/* border-radius: 15rpx; */ | |||||
overflow: hidden; | overflow: hidden; | ||||
z-index: 5; | z-index: 5; | ||||
opacity: 0.7; | opacity: 0.7; | ||||
top: 12%; | |||||
margin: 0 20rpx; | |||||
/* top: 12%; */ | |||||
/* margin: 0 20rpx; */ | |||||
} | } | ||||
.active1_a { | .active1_a { | ||||
opacity: 1; | opacity: 1; | ||||
z-index: 10; | z-index: 10; | ||||
width: 640rpx; | |||||
top: 11%; | |||||
width: 100%; | |||||
height: 420rpx; | |||||
/* top: 11%; */ | |||||
transition: all 0.2s ease-in 0s; | transition: all 0.2s ease-in 0s; | ||||
} | } | ||||
.active1 { | .active1 { | ||||
opacity: 1; | opacity: 1; | ||||
z-index: 10; | z-index: 10; | ||||
width: 640rpx; | |||||
height: 310rpx; | |||||
top: 17%; | |||||
width: 100%; | |||||
height: 420rpx; | |||||
/* top: 17%; */ | |||||
transition: all 0.2s ease-in 0s; | transition: all 0.2s ease-in 0s; | ||||
} | } | ||||
.item1 { | .item1 { | ||||
width: 100%; | width: 100%; | ||||
height: 360rpx; | |||||
/* height: 360rpx; */ | |||||
height: 420rpx; | |||||
overflow: hidden; | overflow: hidden; | ||||
border-radius: 16rpx; | |||||
/* border-radius: 16rpx; */ | |||||
} | } | ||||
@@ -13,10 +13,10 @@ | |||||
<view class="payBox"> | <view class="payBox"> | ||||
<view class="payNumBox"> | <view class="payNumBox"> | ||||
<view style="overflow:hidden"> | <view style="overflow:hidden"> | ||||
<view class="payIcon">¥</view> | |||||
<view class="payIcon">¥</view> | |||||
<view class="price">{{item.salePriceStr}}</view> | <view class="price">{{item.salePriceStr}}</view> | ||||
</view> | </view> | ||||
<view class="original">¥{{item.priceStr}}</view> | |||||
<view class="original">¥{{item.priceStr}}</view> | |||||
</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="payBtn">立即购买</view> | <view tt:if="{{item.salePriceStr!=0&&item.remainInventory!=0&&item.targetAd==101}}" class="payBtn">立即购买</view> | ||||
@@ -2,7 +2,7 @@ | |||||
<image src='{{cover}}' mode='widthFix'></image> | <image src='{{cover}}' mode='widthFix'></image> | ||||
</view> --> | </view> --> | ||||
<view tt:if="{{obj.couponList.length>0||obj.isOnlyAd==1}}"> | |||||
<view tt:if="{{obj.couponList.length>0||obj.isOnlyAd==1}}" class="{{obj.isOnlyAd==1?'':'BoxX'}}"> | |||||
<view class='product' bindtap='gotoTopic' data-id="{{obj.id}}" tt:if="{{obj.isOnlyAd==1}}"> | <view class='product' bindtap='gotoTopic' data-id="{{obj.id}}" tt:if="{{obj.isOnlyAd==1}}"> | ||||
<image src='{{obj.cover}}' mode='scaleToFill'></image> | <image src='{{obj.cover}}' mode='scaleToFill'></image> | ||||
</view> | </view> | ||||
@@ -21,6 +21,7 @@ | |||||
<view class="topImg" tt:if="{{obj.cover}}" bindtap="lookAll"> | <view class="topImg" tt:if="{{obj.cover}}" bindtap="lookAll"> | ||||
<image src="{{obj.cover}}" mode='scaleToFill'></image> | <image src="{{obj.cover}}" mode='scaleToFill'></image> | ||||
</view> | </view> | ||||
<div class="itemBox" tt:if="{{obj.couponList&&obj.couponList.length>0}}"> | <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="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"> | <view class="itemImg"> | ||||
@@ -34,9 +35,9 @@ | |||||
<view class="titleName">{{item.title}}</view> | <view class="titleName">{{item.title}}</view> | ||||
</view> | </view> | ||||
<view class="priceBox"> | |||||
<!-- <view class="priceBox"> | |||||
<view class="sellingBox f"> | <view class="sellingBox f"> | ||||
<view class="fuhao">¥</view> | |||||
<view class="fuhao">¥</view> | |||||
<view class="int" tt:if="{{item.type!=50}}">{{item.salePriceStrQ?item.salePriceStrQ:item.salePriceStr}}</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="fuhao" tt:if="{{item.type!=50}}">{{item.salePriceStrH?'.'+item.salePriceStrH:''}}</view> | ||||
@@ -44,9 +45,29 @@ | |||||
<view class="fuhao" tt:if="{{item.type==50}}"> 积分</view> | <view class="fuhao" tt:if="{{item.type==50}}"> 积分</view> | ||||
</view> | </view> | ||||
<view class="originalBox r"> | <view class="originalBox r"> | ||||
<view class="origina">¥{{item.priceStr}}</view> | |||||
<view class="origina">¥{{item.priceStr}}</view> | |||||
</view> | |||||
</view> --> | |||||
<view class="priceBox"> | |||||
<view class="sellingBox f"> | |||||
<view class="fuhaoX" tt:if="{{item.type!=50}}" >¥{{item.salePriceStr?item.salePriceStr:""}}</view> | |||||
<view class="fuhaoX" tt:if="{{item.type==50}}"> {{item.creditPrice}}积分</view> | |||||
</view> | |||||
<view class="originalBox r" tt:if="{{item.type!=50}}"> | |||||
<view class="r btn" >马上抢</view> | |||||
</view> | </view> | ||||
<view class="originalBox f" tt:if="{{item.type==50}}"> | |||||
<view class="originaX">¥{{item.priceStr}}</view> | |||||
</view> | |||||
</view> | |||||
<view class="jifengBtn" tt:if="{{item.type==50}}"> | |||||
立即兑换 | |||||
</view> | </view> | ||||
<view class="countBox" tt:if="{{isShowCount}}"> | <view class="countBox" tt:if="{{isShowCount}}"> | ||||
<view class="countText f">{{setIntervalLsit[index].textTime}}</view> | <view class="countText f">{{setIntervalLsit[index].textTime}}</view> | ||||
<view class="countDate r">{{setIntervalLsit[index].vaFlag?'活动已结束':setIntervalLsit[index].valueText}}</view> | <view class="countDate r">{{setIntervalLsit[index].vaFlag?'活动已结束':setIntervalLsit[index].valueText}}</view> | ||||
@@ -1,3 +1,8 @@ | |||||
.BoxX{ | |||||
overflow: hidden; | |||||
background-image: url("https://formall.oss-accelerate.aliyuncs.com/douyin_ifomall/imgData/cmdBg.png"); | |||||
background-size: 100% auto;background-repeat: no-repeat; | |||||
} | |||||
.commBox { | .commBox { | ||||
width: 96%; | width: 96%; | ||||
margin: 27rpx auto; | margin: 27rpx auto; | ||||
@@ -118,21 +123,27 @@ | |||||
} | } | ||||
.titleNameBox { | .titleNameBox { | ||||
/* font-size: 18px; */ | |||||
height: 80rpx; | |||||
line-height: 40rpx; | |||||
margin-top: 16rpx; | |||||
height: 72rpx; | |||||
line-height: 36rpx; | |||||
display: flex; | display: flex; | ||||
align-items: center; | align-items: center; | ||||
justify-content: center; | justify-content: center; | ||||
} | } | ||||
.titleName { | .titleName { | ||||
color: #402e1e; | |||||
font-size: 30rpx; | |||||
font-family: "PingFangSC-Regular"; | |||||
font-weight: 400; | |||||
width: 100%; | width: 100%; | ||||
font-size: 28rpx; | font-size: 28rpx; | ||||
font-family: OPPOSans; | |||||
font-weight: 500; | |||||
color: #333; | |||||
margin-top: 10rpx; | |||||
/* font-family: OPPOSans; */ | |||||
/* font-weight: 500; */ | |||||
/* color: #333; */ | |||||
display: -webkit-box; | display: -webkit-box; | ||||
-webkit-line-clamp: 2; | -webkit-line-clamp: 2; | ||||
-webkit-box-orient: vertical; | -webkit-box-orient: vertical; | ||||
@@ -142,7 +153,8 @@ | |||||
.priceBox { | .priceBox { | ||||
overflow: hidden; | overflow: hidden; | ||||
margin: 10rpx 0; | |||||
margin: 0 0 10rpx 0; | |||||
height: 56rpx; | |||||
} | } | ||||
.f { | .f { | ||||
@@ -155,6 +167,8 @@ | |||||
.sellingBox { | .sellingBox { | ||||
overflow: hidden; | overflow: hidden; | ||||
height: 100%; | |||||
line-height: 56rpx; | |||||
} | } | ||||
.fuhao { | .fuhao { | ||||
@@ -165,7 +179,25 @@ | |||||
/* font-weight: bold; */ | /* font-weight: bold; */ | ||||
margin-top: 10rpx; | margin-top: 10rpx; | ||||
} | } | ||||
.fuhaoX{ | |||||
color: #d5af67; | |||||
font-family: "PingFangSC-Medium"; | |||||
font-size: 30rpx; | |||||
font-weight: 400; | |||||
float: left; | |||||
} | |||||
.btn{ | |||||
width: 116rpx; | |||||
height: 52rpx; | |||||
border-radius: 26rpx; | |||||
line-height: 52rpx; | |||||
background: linear-gradient(90deg, #E3BA79, #BC8D3E); | |||||
text-align: center; | |||||
color: #feffff; | |||||
font-family: "PingFangSC-Regular"; | |||||
font-size: 26rpx; | |||||
font-weight: 400; | |||||
} | |||||
.int { | .int { | ||||
float: left; | float: left; | ||||
font-size: 36rpx; | font-size: 36rpx; | ||||
@@ -176,6 +208,8 @@ | |||||
.originalBox { | .originalBox { | ||||
overflow: hidden; | overflow: hidden; | ||||
height: 100%; | |||||
line-height: 56rpx; | |||||
} | } | ||||
.origina { | .origina { | ||||
@@ -188,7 +222,27 @@ | |||||
margin-top: 10rpx; | margin-top: 10rpx; | ||||
margin-right: 10rpx; | margin-right: 10rpx; | ||||
} | } | ||||
.originaX{ | |||||
color: #a4a4a4; | |||||
font-family: "PingFangSC-Regular"; | |||||
font-size: 24rpx; | |||||
font-weight: 400; | |||||
line-height: 30rpx; | |||||
text-decoration: line-through; | |||||
/* margin-top: 10rpx; */ | |||||
line-height: 60rpx; | |||||
margin-left: 10rpx; | |||||
} | |||||
.jifengBtn{ | |||||
background: linear-gradient(90deg, #E3BA79, #BC8D3E); | |||||
color: #fff1d9; | |||||
font-family: "PingFangSC-Medium"; | |||||
font-size: 26rpx; | |||||
font-weight: 400; | |||||
line-height: 52rpx; | |||||
text-align: center; | |||||
border-radius: 2rpx; | |||||
} | |||||
.countBox { | .countBox { | ||||
width: 100%; | width: 100%; | ||||
height: 46rpx; | height: 46rpx; | ||||
@@ -23,7 +23,10 @@ | |||||
<view class="coupons-info-name tit">{{data.title}}</view> | <view class="coupons-info-name tit">{{data.title}}</view> | ||||
<view class="coupons-info-name subtitle">{{data.subTitle}}</view> | <view class="coupons-info-name subtitle">{{data.subTitle}}</view> | ||||
<view class="coupons-info-price-p"> | <view class="coupons-info-price-p"> | ||||
<view class='price' tt:if="{{data.type!=10}}"> | |||||
<view class='price' tt:if="{{data.type!=10&&mouldType==1}}"> | |||||
<view class="fuhaoX"> ¥{{data.salePriceStr}}</view> | |||||
</view> | |||||
<view class='price' tt:if="{{data.type!=10&&mouldType!=1}}"> | |||||
<text tt:if="{{data.targetAd == 101||data.targetAd == 5}}"><text class='rmb'>¥</text> | <text tt:if="{{data.targetAd == 101||data.targetAd == 5}}"><text class='rmb'>¥</text> | ||||
<text class='num'>{{data.salePriceStr}}</text> | <text class='num'>{{data.salePriceStr}}</text> | ||||
<text tt:if="{{!(data.type==5&&data.unit==1)}}" class='view02'>¥{{data.priceStr}}</text> | <text tt:if="{{!(data.type==5&&data.unit==1)}}" class='view02'>¥{{data.priceStr}}</text> | ||||
@@ -51,13 +54,14 @@ | |||||
</view> | </view> | ||||
</view> | </view> | ||||
<view class="earnest" tt:if="{{data.type==10}}"> | <view class="earnest" tt:if="{{data.type==10}}"> | ||||
预售定金:¥{{data.salePriceStr}} | |||||
预售定金:¥{{data.salePriceStr}} | |||||
</view> | </view> | ||||
</view> | </view> | ||||
</view> | </view> | ||||
<view class="coupons-btn"> | |||||
<view class="coupons-btn" tt:if="{{mouldType!=1}}"> | |||||
<!-- 优惠券价格 --> | <!-- 优惠券价格 --> | ||||
<i-button i-class="coupons-btn-gm" tt:if="{{data.salePriceStr==0&&data.remainInventory!=0&&data.targetAd == 101}}" | |||||
<i-button i-class=" coupons-btn-gm" tt:if="{{data.salePriceStr==0&&data.remainInventory!=0&&data.targetAd == 101}}" | |||||
data-date='{{data}}'>免费领</i-button> | data-date='{{data}}'>免费领</i-button> | ||||
<i-button i-class="coupons-btn-gm" | <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}}" | tt:if="{{data.salePriceStr!=0&&data.remainInventory!=0&&data.targetAd == 101||data.salePriceStr!=0&&data.remainInventory!=0&&data.targetAd == 5}}" | ||||
@@ -71,5 +75,23 @@ | |||||
<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.remainInventory==0}}" data-date='{{data}}'>已售罄</i-button> | ||||
<i-button i-class="coupons-btn-gms" tt:if="{{data.status==1}}" 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 class="coupons-btn" tt:if="{{mouldType==1}}"> | |||||
<!-- 优惠券价格 --> | |||||
<i-button i-class=" coupons-btn-gmX" tt:if="{{data.salePriceStr==0&&data.remainInventory!=0&&data.targetAd == 101}}" | |||||
data-date='{{data}}'>免费领</i-button> | |||||
<i-button i-class="coupons-btn-gmX" | |||||
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-gmX" tt:if="{{data.remainInventory!=0&&data.targetAd == 2}}" data-date='{{data}}'> | |||||
去抢购</i-button> | |||||
<i-button i-class="coupons-btn-gmX" tt:if="{{data.remainInventory!=0&&data.targetAd == 6}}" data-date='{{data}}'> | |||||
去砍价</i-button> | |||||
<i-button i-class="coupons-btn-gmX" 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> | ||||
</view> | </view> |
@@ -124,7 +124,7 @@ | |||||
.coupons-btn { | .coupons-btn { | ||||
position: absolute; | position: absolute; | ||||
bottom: 14rpx; | |||||
bottom: 0rpx; | |||||
right: 24rpx; | right: 24rpx; | ||||
} | } | ||||
@@ -140,6 +140,20 @@ | |||||
line-height: 51rpx !important; | line-height: 51rpx !important; | ||||
background: linear-gradient(127deg, rgba(252, 177, 74, 1) 0%, rgba(254, 70, 20, 1) 100%) !important; | background: linear-gradient(127deg, rgba(252, 177, 74, 1) 0%, rgba(254, 70, 20, 1) 100%) !important; | ||||
} | } | ||||
.coupons-btn-gmX{ | |||||
width: 116rpx !important; | |||||
height: 52rpx !important; | |||||
border-radius: 26rpx !important; | |||||
line-height: 52rpx !important; | |||||
background: linear-gradient(90deg, #E3BA79, #BC8D3E) !important; | |||||
text-align: center !important; | |||||
color: #feffff !important; | |||||
font-family: "PingFangSC-Regular"; | |||||
font-size: 26rpx !important; | |||||
font-weight: 400 !important; | |||||
margin: 0 !important; | |||||
padding: 0 !important; | |||||
} | |||||
.coupons-btn-gms { | .coupons-btn-gms { | ||||
background: #b9b9b9 !important; | background: #b9b9b9 !important; | ||||
@@ -237,6 +251,15 @@ | |||||
margin: 20rpx; | margin: 20rpx; | ||||
border-radius: 50%; | border-radius: 50%; | ||||
} | } | ||||
.fuhaoX{ | |||||
color: #d5af67; | |||||
font-family: "PingFangSC-Medium"; | |||||
font-size: 34rpx; | |||||
font-weight: 400; | |||||
float: left; | |||||
margin-top: 5rpx | |||||
} | |||||
.userinfo-nickname { | .userinfo-nickname { | ||||
color: #aaa; | color: #aaa; | ||||
@@ -315,9 +338,6 @@ scroll-view { | |||||
font-size: 26rpx; | font-size: 26rpx; | ||||
} | } | ||||
.navigator:nth-of-type(2n+1) { | |||||
/* margin-right: 10rpx; */ | |||||
} | |||||
.superscript { | .superscript { | ||||
position: absolute; | position: absolute; | ||||
@@ -85,6 +85,7 @@ Component({ | |||||
send() { | send() { | ||||
let phoneReg = /(^1[3|4|5|7|8]\d{9}$)|(^09\d{8}$)/; | let phoneReg = /(^1[3|4|5|7|8]\d{9}$)|(^09\d{8}$)/; | ||||
if (phoneReg.test(this.data.phone)) { | if (phoneReg.test(this.data.phone)) { | ||||
console.log(this.data.auth); | |||||
if(this.data.auth!=""){ | if(this.data.auth!=""){ | ||||
Http.get({ | Http.get({ | ||||
url: config.api.validationCode, | url: config.api.validationCode, | ||||
@@ -34,7 +34,6 @@ Component({ | |||||
methods: { | methods: { | ||||
//获取砍价拼团数据 | //获取砍价拼团数据 | ||||
getList(val) { | getList(val) { | ||||
// debugger | |||||
let that = this; | let that = this; | ||||
let param = '' | let param = '' | ||||
if(val=='1'){ | if(val=='1'){ | ||||
@@ -4,7 +4,7 @@ | |||||
<view class='sql' style='background:{{sql}}'></view> | <view class='sql' style='background:{{sql}}'></view> | ||||
<text>爆款专区</text> | <text>爆款专区</text> | ||||
</view> | </view> | ||||
<view class='titleR' bindtap='getChange'tt:if="{{pSize>=2||kSize>=2}}" > | |||||
<view class='titleR' bindtap='getChange' tt:if="{{pSize>=2||kSize>=2}}"> | |||||
<text style='color:{{txt}}'>换一换</text> | <text style='color:{{txt}}'>换一换</text> | ||||
<view> | <view> | ||||
<image src='{{change}}' bindtap='' mode='aspectFill'></image> | <image src='{{change}}' bindtap='' mode='aspectFill'></image> | ||||
@@ -12,14 +12,15 @@ | |||||
</view> | </view> | ||||
</view> | </view> | ||||
<view class='hotCon clearfix'> | <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 > | |||||
<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}}" /> | <image mode='aspectFill' lazy-load='true' src="{{kData.coverImg}}" /> | ||||
</view> | </view> | ||||
<view class='kjText'> | <view class='kjText'> | ||||
<text class='title'>{{kData.title}}</text> | <text class='title'>{{kData.title}}</text> | ||||
<text class='price'>¥{{kData.priceStr}}</text> | |||||
<text class='sale'><text>¥</text>{{kData.salePriceStr}}</text> | |||||
<text class='price'>¥{{kData.priceStr}}</text> | |||||
<text class='sale'><text>¥</text>{{kData.salePriceStr}}</text> | |||||
<view class=' btn btnk'>砍价</view> | <view class=' btn btnk'>砍价</view> | ||||
</view> | </view> | ||||
</view> | </view> | ||||
@@ -34,15 +35,16 @@ | |||||
</view> | </view> | ||||
</view> | </view> | ||||
<view class='pintuan' tt:if="{{pSize}}" bindtap="gotoptdetail" data-couponId='{{pData.couponId}}' data-couponChannelId="{{pData.id}}" data-targetAd="{{pData.targetAd}}"> | |||||
<view class='pintuan' tt:if="{{pSize}}" bindtap="gotoptdetail" data-couponId='{{pData.couponId}}' | |||||
data-couponChannelId="{{pData.id}}" data-targetAd="{{pData.targetAd}}"> | |||||
<view> | <view> | ||||
<image mode='aspectFill' lazy-load='true' src="{{pData.coverImg}}" /> | <image mode='aspectFill' lazy-load='true' src="{{pData.coverImg}}" /> | ||||
</view> | </view> | ||||
<view class='ptText'> | <view class='ptText'> | ||||
<text class='title'>{{pData.title}}</text> | <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> | |||||
<text class='price'>¥{{pData.priceStr}}</text> | |||||
<text class='sale'> <text>¥</text>{{pData.salePriceStr}}</text> | |||||
<view class='btn btnp'>拼团</view> | |||||
</view> | </view> | ||||
</view> | </view> | ||||
<view class='pintuan' tt:if="{{!pSize}}"> | <view class='pintuan' tt:if="{{!pSize}}"> | ||||
@@ -56,4 +58,4 @@ | |||||
</view> | </view> | ||||
</view> | </view> | ||||
</view> | </view> | ||||
</view> | |||||
</view> |
@@ -72,6 +72,7 @@ Component({ | |||||
this.setData({ | this.setData({ | ||||
indexFlaig:app.globalData.selected | indexFlaig:app.globalData.selected | ||||
}) | }) | ||||
console.log(this.properties); | |||||
let pages = getCurrentPages(); | let pages = getCurrentPages(); | ||||
console.log(pages.length); | console.log(pages.length); | ||||
if (pages.length <= 1) { | if (pages.length <= 1) { | ||||
@@ -2,7 +2,7 @@ | |||||
<view style="{{'height: ' + statusBarHeight}}"></view> | <view style="{{'height: ' + statusBarHeight}}"></view> | ||||
<view class='title-container'> | <view class='title-container'> | ||||
<view class='capsule' tt:if="{{ back || home}}"> | <view class='capsule' tt:if="{{ back || home}}"> | ||||
<view bindtap='back' tt:if="{{indexFlaig!=2 && back}}" > | |||||
<view bindtap='back' tt:if="{{ back}}" > | |||||
<image style="left:36%;" src='img/back.svg'></image> | <image style="left:36%;" src='img/back.svg'></image> | ||||
</view> | </view> | ||||
<view bindtap='backHome' tt:if="{{home}}"> | <view bindtap='backHome' tt:if="{{home}}"> | ||||
@@ -10,7 +10,7 @@ | |||||
} | } | ||||
.title-container { | .title-container { | ||||
height: 44px; | |||||
height: 50px; | |||||
display: flex; | display: flex; | ||||
align-items: center; | align-items: center; | ||||
position: relative; | position: relative; | ||||
@@ -39,6 +39,17 @@ Component({ | |||||
this.setData({ | this.setData({ | ||||
classIndex:index | classIndex:index | ||||
}) | }) | ||||
}, | |||||
goLsit(){ | |||||
tt.navigateTo({ | |||||
url: '/pages/liveLsit/liveLsit', | |||||
success: (res) => { | |||||
}, | |||||
fail: (res) => { | |||||
}, | |||||
}); | |||||
} | } | ||||
} | } | ||||
@@ -5,11 +5,16 @@ | |||||
</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 class="classifyBox-go-box"> | |||||
<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> | ||||
<!-- <view class="goLsit" bindtap="goLsit"> 直播商品 <image class="rup" src="https://formall.oss-accelerate.aliyuncs.com/cimg/v20211214/home_icon_jt.png"></image></view> --> | |||||
</view> | </view> | ||||
<view class="contBox"> | <view class="contBox"> | ||||
@@ -19,16 +24,26 @@ | |||||
<image src="{{item.coverImg}}" mode='scaleToFill'></image> | <image src="{{item.coverImg}}" mode='scaleToFill'></image> | ||||
</view> | </view> | ||||
<view class="titleName">{{item.title}}</view> | <view class="titleName">{{item.title}}</view> | ||||
<view class="priceBox"> | |||||
<!-- <view class="priceBox"> | |||||
<view class="sellingBox f"> | <view class="sellingBox f"> | ||||
<view class="fuhao">¥</view> | |||||
<view class="fuhao">¥</view> | |||||
<view class="int">{{item.salePriceStrQ?item.salePriceStrQ:item.salePriceStr}}</view> | <view class="int">{{item.salePriceStrQ?item.salePriceStrQ:item.salePriceStr}}</view> | ||||
<view class="fuhao">{{item.salePriceStrH?'.'+item.salePriceStrH:''}}</view> | <view class="fuhao">{{item.salePriceStrH?'.'+item.salePriceStrH:''}}</view> | ||||
</view> | </view> | ||||
<view class="priceNum r">已售 {{item.sale}}</view> | <view class="priceNum r">已售 {{item.sale}}</view> | ||||
<view class="originalBox r"> | <view class="originalBox r"> | ||||
<view class="origina">¥{{item.priceStr}}</view> | |||||
<view class="origina">¥{{item.priceStr}}</view> | |||||
</view> | |||||
</view> --> | |||||
<view class="priceBox"> | |||||
<view class="sellingBox f"> | |||||
<view class="fuhaoX">¥{{item.salePriceStr?item.salePriceStr:""}} </view> | |||||
</view> | </view> | ||||
<view class="r btn">马上抢</view> | |||||
</view> | </view> | ||||
<view class="sellout" tt:if="{{item.remainInventory==0}}"> | <view class="sellout" tt:if="{{item.remainInventory==0}}"> | ||||
@@ -1,6 +1,7 @@ | |||||
.optimizationBox { | .optimizationBox { | ||||
/* overflow: hidden; */ | /* overflow: hidden; */ | ||||
margin-top: 20rpx; | margin-top: 20rpx; | ||||
margin-bottom: 100rpx; | |||||
} | } | ||||
.titleImg { | .titleImg { | ||||
@@ -35,7 +36,11 @@ | |||||
.r { | .r { | ||||
float: right; | float: right; | ||||
} | } | ||||
.classifyBox-go-box{ | |||||
background-color: #fff; | |||||
} | |||||
.classifyBox { | .classifyBox { | ||||
width: 100%; | width: 100%; | ||||
border-radius: 20rpx 20rpx 0 0; | border-radius: 20rpx 20rpx 0 0; | ||||
@@ -45,12 +50,24 @@ | |||||
overflow-x: scroll; | overflow-x: scroll; | ||||
-webkit-overflow-scrolling: touch; | -webkit-overflow-scrolling: touch; | ||||
/* margin: 10rpx 0; *//* background: linear-gradient(0deg, #F5F5F5, #fff); */ | /* margin: 10rpx 0; *//* background: linear-gradient(0deg, #F5F5F5, #fff); */ | ||||
float: left; | |||||
} | |||||
.goLsit{ | |||||
width: 20%; | |||||
float: left; | |||||
font-size: 28rpx; | |||||
color: #454340; | |||||
margin: 20rpx 0 10rpx 0; | |||||
} | } | ||||
.classifyBox::-webkit-scrollbar { | .classifyBox::-webkit-scrollbar { | ||||
display: none; | display: none; | ||||
} | } | ||||
.rup{ | |||||
width: 13rpx; | |||||
height: 20rpx; | |||||
margin: 2rpx 0 0 6rpx; | |||||
} | |||||
.itemBox { | .itemBox { | ||||
width: 100rpx; | width: 100rpx; | ||||
height: 100rpx; | height: 100rpx; | ||||
@@ -116,12 +133,19 @@ | |||||
border-radius: 20rpx 20rpx 0 0; | border-radius: 20rpx 20rpx 0 0; | ||||
} | } | ||||
.titleName{ | .titleName{ | ||||
color: #402e1e; | |||||
font-size: 30rpx; | |||||
font-family: "PingFangSC-Regular"; | |||||
font-weight: 400; | |||||
width: 100%; | |||||
font-size: 28rpx; | |||||
width:90%; | width:90%; | ||||
height: 80rpx; | height: 80rpx; | ||||
font-size: 28rpx; | font-size: 28rpx; | ||||
font-family: OPPOSans; | |||||
font-weight: 500; | |||||
color: #333333; | |||||
/* font-family: OPPOSans; */ | |||||
/* font-weight: 500; */ | |||||
/* color: #333333; */ | |||||
margin: 10rpx auto 0 auto; | margin: 10rpx auto 0 auto; | ||||
overflow: hidden; | overflow: hidden; | ||||
@@ -154,6 +178,27 @@ | |||||
/* font-weight: bold; */ | /* font-weight: bold; */ | ||||
margin-top: 10rpx | margin-top: 10rpx | ||||
} | } | ||||
.fuhaoX{ | |||||
color: #d5af67; | |||||
font-family: "PingFangSC-Medium"; | |||||
font-size: 34rpx; | |||||
font-weight: 400; | |||||
float: left; | |||||
margin-top: 5rpx | |||||
} | |||||
.btn{ | |||||
width: 136rpx; | |||||
height: 52rpx; | |||||
border-radius: 26rpx; | |||||
line-height: 52rpx; | |||||
background: linear-gradient(90deg, #E3BA79, #BC8D3E); | |||||
text-align: center; | |||||
color: #feffff; | |||||
font-family: "PingFangSC-Regular"; | |||||
font-size: 28rpx; | |||||
font-weight: 400; | |||||
} | |||||
.int{ | .int{ | ||||
float: left; | float: left; | ||||
font-size: 36rpx; | font-size: 36rpx; | ||||
@@ -33,6 +33,39 @@ Component({ | |||||
url: `/pages/index/searchbar/detail/index?id=${e.currentTarget.dataset.id}` | url: `/pages/index/searchbar/detail/index?id=${e.currentTarget.dataset.id}` | ||||
}) | }) | ||||
}, | }, | ||||
goCertification(e){ | |||||
tt.navigateTo({ | |||||
url: `/pages/shopCertification/shopCertification?id=${e.currentTarget.dataset.id}` | |||||
}) | |||||
}, | |||||
goFitShop(){ | |||||
tt.navigateTo({ | |||||
url: `/pages/fitShop/fitShop?list=${JSON.stringify(this.data.merchantVoList)}`, | |||||
success: (res) => { | |||||
}, | |||||
fail: (res) => { | |||||
}, | |||||
}); | |||||
}, | |||||
goMap(e){ | |||||
let {latitude,longitude} = e.currentTarget.dataset.item | |||||
console.log(latitude,longitude); | |||||
tt.openLocation({ | |||||
latitude:Number(latitude), | |||||
longitude:Number(longitude), | |||||
scale: 18, | |||||
success() { | |||||
console.log("打开地图成功"); | |||||
}, | |||||
fail(err) { | |||||
console.log("打开地图失败:", err.errMsg); | |||||
}, | |||||
}); | |||||
}, | |||||
// 点击查看更多 | // 点击查看更多 | ||||
more: function () { | more: function () { | ||||
console.log(this.properties.merchantVoList,"merchantVoList"); | console.log(this.properties.merchantVoList,"merchantVoList"); | ||||
@@ -58,8 +91,10 @@ Component({ | |||||
tt.makePhoneCall({ | tt.makePhoneCall({ | ||||
phoneNumber: e.target.dataset.merchantlinkphone | phoneNumber: e.target.dataset.merchantlinkphone | ||||
}); | }); | ||||
} | |||||
}, | |||||
}, | }, | ||||
ready: function () { | ready: function () { | ||||
let merchantVoList = this.properties.merchantVoList; | let merchantVoList = this.properties.merchantVoList; | ||||
if (merchantVoList.length>0){ | if (merchantVoList.length>0){ | ||||
@@ -1,6 +1,43 @@ | |||||
<view class='applyshop'>适用门店</view> | |||||
<view class='posi' style='overflow:{{hidden}};height:{{height}}'> | |||||
<view class='posi_logo' tt:for="{{merchantVoList}}" tt:key="index"> | |||||
<view class="applyshopBox" bindtap="goFitShop"> | |||||
<view class='applyshop'>适用门店</view> | |||||
<image src="https://formall.oss-accelerate.aliyuncs.com/cimg/chevron.png" mode="widthFix" class="genduoImg"> | |||||
</image> | |||||
<view class="goShop">{{merchantVoList.length+'家店适用'}}</view> | |||||
</view> | |||||
<!-- style='overflow:{{hidden}};height:{{height}}' --> | |||||
<view class='posi'> | |||||
<view class='posi_logo'> | |||||
<view bindtap='gotoDetail' data-id='{{merchantVoList[0].id}}'> | |||||
<image src='{{merchantVoList[0].merchantImgUrl}}'></image> | |||||
</view> | |||||
<view bindtap='gotoDetail' data-id='{{merchantVoList[0].id}}'> | |||||
<view class='name'>{{merchantVoList[0].merchantName}}</view> | |||||
<view class='shopVoList'> | |||||
<view tt:for="{{merchantVoList[0].shopVoList}}" tt:key="{{index}}" tt:for-item="itemName" class="shopCh"> | |||||
<text>{{itemName.buildingName}}{{itemName.floorName}}--{{itemName.shopNumber}}</text> | |||||
<text class='douhao' tt:if="{{item.shopVoList.length>1}}">,</text> | |||||
</view> | |||||
</view> | |||||
</view> | |||||
<view class="telBox" tt:if="{{merchantVoList[0].linkLinePhone}}"> | |||||
<image bindtap='phone' data-merchantLinkPhone='{{merchantVoList[0].linkLinePhone}}' class="telImg" src="{{teljpgUrl}}" mode="widthFix" /> | |||||
<view class="telText">电话</view> | |||||
</view> | |||||
<view class="certificationBox" tt:if="{{merchantVoList[0].latitude&&merchantVoList[0].longitude}}" bindtap="goCertification" data-id="{{merchantVoList[0].id}}"> | |||||
<image class="certificationImg" src="../../assets/imgData/certification.png" mode="widthFix" /> | |||||
<view class="telText">资质</view> | |||||
</view> | |||||
</view> | |||||
<view class="siteBox" tt:if="{{merchantVoList[0].latitude&&merchantVoList[0].longitude}}" bindtap="goMap" data-item="{{merchantVoList[0]}}"> | |||||
<view class="siteText">{{merchantVoList[0].addr}}</view> | |||||
<image class="siteImg" src="../../assets/imgData/siteImg.png" mode="widthFix" /> | |||||
</view> | |||||
</view> | |||||
<!-- <view class='posi' tt:for="{{merchantVoList}}" tt:key="index"> | |||||
<view class='posi_logo'> | |||||
<view bindtap='gotoDetail' data-id='{{item.id}}'> | <view bindtap='gotoDetail' data-id='{{item.id}}'> | ||||
<image src='{{item.merchantImgUrl}}'></image> | <image src='{{item.merchantImgUrl}}'></image> | ||||
</view> | </view> | ||||
@@ -13,7 +50,19 @@ | |||||
</view> | </view> | ||||
</view> | </view> | ||||
</view> | </view> | ||||
<image tt:if="{{item.linkLinePhone}}" bindtap='phone' data-merchantLinkPhone='{{item.linkLinePhone}}' class="tel" src="{{teljpgUrl}}" mode="widthFix" /> | |||||
<view class="telBox" tt:if="{{item.linkLinePhone}}"> | |||||
<image bindtap='phone' data-merchantLinkPhone='{{item.linkLinePhone}}' class="telImg" src="{{teljpgUrl}}" mode="widthFix" /> | |||||
<view class="telText">电话</view> | |||||
</view> | |||||
<view class="certificationBox" tt:if="{{item.latitude&&item.longitude}}" bindtap="goCertification" data-id="{{item.id}}"> | |||||
<image class="certificationImg" src="../../assets/imgData/certification.png" mode="widthFix" /> | |||||
<view class="telText">资质</view> | |||||
</view> | |||||
</view> | </view> | ||||
</view> | |||||
<view class="siteBox" tt:if="{{item.latitude&&item.longitude}}" bindtap="goMap" data-item="{{item}}"> | |||||
<view class="siteText">{{item.addr}}</view> | |||||
<image class="siteImg" src="../../assets/imgData/siteImg.png" mode="widthFix" /> | |||||
</view> | |||||
</view> --> | |||||
<view class='bottom' bindtap='more' tt:if="{{showMore}}">{{more}}</view> | <view class='bottom' bindtap='more' tt:if="{{showMore}}">{{more}}</view> |
@@ -5,12 +5,31 @@ | |||||
text-indent: 1em; | text-indent: 1em; | ||||
color: #333; | color: #333; | ||||
background: #fff; | background: #fff; | ||||
font-weight: bold; | |||||
float: left; | |||||
} | |||||
.applyshopBox{ | |||||
overflow: hidden; | |||||
background: #fff; | |||||
margin-top: 20rpx; | |||||
} | |||||
.goShop{ | |||||
font-size: 22rpx; | |||||
height: 70rpx; | |||||
line-height: 70rpx; | |||||
text-indent: 1em; | |||||
color: #a6a6a6; | |||||
background: #fff; | |||||
font-weight: bold; | |||||
float: right; | |||||
/* margin-right: 20rpx; */ | |||||
} | } | ||||
.posi { | .posi { | ||||
position: relative; | |||||
/* position: relative; */ | |||||
width: 100%; | width: 100%; | ||||
background: #FFF; | background: #FFF; | ||||
margin-bottom: 20rpx; | |||||
} | } | ||||
.posi_logo { | .posi_logo { | ||||
position: relative; | position: relative; | ||||
@@ -21,10 +40,13 @@ | |||||
margin: 0 auto; | margin: 0 auto; | ||||
} | } | ||||
.posi_logo view:nth-child(1) { | |||||
/* .posi_logo view:nth-child(1) { | |||||
border-radius: 16rpx; | |||||
} */ | |||||
.shopCh{ | |||||
border-radius: 16rpx; | border-radius: 16rpx; | ||||
} | } | ||||
.posi_logo view:nth-child(1) image { | .posi_logo view:nth-child(1) image { | ||||
display: block; | display: block; | ||||
width: 100rpx; | width: 100rpx; | ||||
@@ -42,16 +64,20 @@ | |||||
text-overflow: ellipsis; | text-overflow: ellipsis; | ||||
overflow: hidden; | overflow: hidden; | ||||
} | } | ||||
.posi_logo view:nth-child(2) view { | |||||
/* .posi_logo view:nth-child(2) view { | |||||
font-size: 32rpx; | font-size: 32rpx; | ||||
color: #333; | color: #333; | ||||
letter-spacing: 0; | letter-spacing: 0; | ||||
} | |||||
} */ | |||||
.shopVoList { | .shopVoList { | ||||
display: flex !important; | |||||
padding-left: 0 !important; | |||||
flex-direction: row !important; | |||||
white-space: nowrap !important; | |||||
overflow-y: scroll; | |||||
height: 90rpx !important; | |||||
width: 360rpx; | |||||
font-size: 16px; | |||||
color: #333; | |||||
letter-spacing: 0; | |||||
} | } | ||||
.shopVoList text { | .shopVoList text { | ||||
@@ -65,12 +91,62 @@ | |||||
padding: 20rpx 0; | padding: 20rpx 0; | ||||
font-size: 32rpx; | font-size: 32rpx; | ||||
} | } | ||||
.tel { | |||||
.telBox { | |||||
position: absolute; | position: absolute; | ||||
right: 0; | right: 0; | ||||
top: 0; | top: 0; | ||||
bottom: 0; | bottom: 0; | ||||
margin: auto; | margin: auto; | ||||
} | |||||
.telText{ | |||||
text-align: center; | |||||
color: #b8b8b8 !important; | |||||
font-size: 20rpx; | |||||
} | |||||
.telImg{ | |||||
width: 50rpx; | |||||
height: 50rpx; | |||||
margin-top: 20rpx; | |||||
} | |||||
.certificationBox{ | |||||
position: absolute; | |||||
right: 80rpx; | |||||
top: 0; | |||||
bottom: 0; | |||||
margin: auto; | |||||
} | |||||
.certificationImg{ | |||||
width: 50rpx; | width: 50rpx; | ||||
height: 50rpx; | height: 50rpx; | ||||
} | |||||
margin-top: 20rpx; | |||||
} | |||||
.siteBox{ | |||||
overflow: hidden; | |||||
width: 92%; | |||||
margin: 0 auto 1rpx auto; | |||||
padding-bottom: 10rpx; | |||||
} | |||||
.siteText{ | |||||
width: 90%; | |||||
float: left; | |||||
font-size: 24rpx; | |||||
color: #333; | |||||
overflow: hidden; | |||||
white-space: nowrap; | |||||
text-overflow: ellipsis; | |||||
} | |||||
.siteImg{ | |||||
float: right; | |||||
width: 40rpx; | |||||
height: 40rpx; | |||||
} | |||||
.genduoImg{ | |||||
width: 14rpx; | |||||
display: block; | |||||
float: right; | |||||
margin: 24rpx 30rpx 0 10rpx; | |||||
} |
@@ -6,7 +6,7 @@ Component({ | |||||
data: { | data: { | ||||
selected: null, | selected: null, | ||||
"color": "#abb1be", | "color": "#abb1be", | ||||
"selectedColor": "#fc3e5a", | |||||
"selectedColor": "#6c5535", | |||||
list: [ | list: [ | ||||
{ | { | ||||
"pagePath": "/index/index", | "pagePath": "/index/index", | ||||
@@ -32,7 +32,8 @@ Component({ | |||||
"iconPath": "../../assets/images/user.png", | "iconPath": "../../assets/images/user.png", | ||||
"selectedIconPath": "../../assets/images/user_a.png" | "selectedIconPath": "../../assets/images/user_a.png" | ||||
} | } | ||||
] | |||||
], | |||||
}, | }, | ||||
properties: { | properties: { | ||||
@@ -40,9 +41,10 @@ Component({ | |||||
lifetimes: { | lifetimes: { | ||||
attached: function () { | attached: function () { | ||||
// 在组件实例进入页面节点树时执行 | // 在组件实例进入页面节点树时执行 | ||||
console.log(app.globalData.selected,'selected'); | |||||
console.log(app.globalData.selected, 'selected'); | |||||
this.setData({ | this.setData({ | ||||
selected:app.globalData.selected | |||||
selected: app.globalData.selected, | |||||
// templateId:app.globalData.templateId | |||||
}) | }) | ||||
}, | }, | ||||
detached: function () { | detached: function () { | ||||
@@ -51,22 +53,116 @@ Component({ | |||||
}, | }, | ||||
methods: { | methods: { | ||||
navigateTo(e) { | navigateTo(e) { | ||||
// this.setData({ | // this.setData({ | ||||
// list: this.data.home_a_img | // list: this.data.home_a_img | ||||
// }) | // }) | ||||
// console.log(this.data.home_a_img) | // console.log(this.data.home_a_img) | ||||
const data = e.currentTarget.dataset; | const data = e.currentTarget.dataset; | ||||
// this.setData({ | |||||
// selected: data.index | |||||
// }) | |||||
if(app.globalData.selected==data.index){ | |||||
return | |||||
} | |||||
// tt.hideLoading(); | |||||
tt.showLoading({ | |||||
title: "加载中" | |||||
}); | |||||
app.globalData.selected = data.index | app.globalData.selected = data.index | ||||
console.log(app.globalData.selected); | console.log(app.globalData.selected); | ||||
const url = data.path; | const url = data.path; | ||||
if (data.index == 0 || data.index == 3) { | |||||
this.setWxMessage() | |||||
} | |||||
if(data.index == 2){ | |||||
app.globalData.ifshowtab=true | |||||
}else{ | |||||
app.globalData.ifshowtab=false | |||||
} | |||||
// tt.reLaunch({ | |||||
// url | |||||
// }); | |||||
tt.reLaunch({ | tt.reLaunch({ | ||||
url | |||||
url: url, | |||||
success: (res) => { | |||||
tt.hideLoading(); | |||||
}, | |||||
fail: (res) => { | |||||
tt.hideLoading(); | |||||
}, | |||||
}); | }); | ||||
}, | }, | ||||
// getTemplateId() { | |||||
// // console.log("隐藏") | |||||
// // tt.hideTabBar() | |||||
// Http.get({ | |||||
// url: config.api.templateId, | |||||
// data: { | |||||
// pageNum: 1, | |||||
// pageSize: 100 | |||||
// } | |||||
// }).then(res => { | |||||
// const { | |||||
// code, | |||||
// data | |||||
// } = res | |||||
// if (code == 200) { | |||||
// this.setData({ | |||||
// templateId: data.list | |||||
// }) | |||||
// this.setWxMessage() | |||||
// } else { | |||||
// return | |||||
// } | |||||
// }) | |||||
// }, | |||||
setWxMessage() { | |||||
if(app.globalData.templateId.length<0)return | |||||
console.log(app.globalData.templateId); | |||||
let tmplIds = [] | |||||
app.globalData.templateId.map(res => { | |||||
tmplIds.push(res.templateId) | |||||
}) | |||||
tt.requestSubscribeMessage({ | |||||
tmplIds: tmplIds, | |||||
success(res) { | |||||
console.log("我重复订阅") | |||||
let _statue = null | |||||
tmplIds.map((item, index) => { //判读用户是否点击了确定 | |||||
if (res[item] == "accept") { | |||||
_statue = 'ok' | |||||
} | |||||
}) | |||||
if (_statue == 'ok') { | |||||
Http.post({ | |||||
url: config.api.wxMsg | |||||
}).then(res => { | |||||
tt.setStorageSync({ | |||||
key: 'ifShowTab', | |||||
data: true, | |||||
}) | |||||
console.log(res) | |||||
}) | |||||
return | |||||
} | |||||
}, | |||||
fail(error) { | |||||
//订阅失败 | |||||
console.log("订阅失败, 错误详情: ", error); | |||||
// tt.showToast({ | |||||
// title: "订阅失败", | |||||
// icon: "fail", | |||||
// }); | |||||
}, | |||||
complete() { | |||||
} | |||||
}) | |||||
}, | |||||
} | } | ||||
}) | }) |
@@ -1,5 +1,16 @@ | |||||
const extConfig = tt.getExtConfigSync ? tt.getExtConfigSync().extConfig : {} | |||||
let weappId = extConfig.weappId; | |||||
console.log(extConfig,"configUrls"); | |||||
let configUrls = extConfig.attr.configUrl; | |||||
var config = { | var config = { | ||||
url: configUrls, | |||||
api: { | api: { | ||||
/** | |||||
* 判断小程序是否能有插件 | |||||
*/ | |||||
getConfig:"/sysConfig/getByKey", | |||||
/* | /* | ||||
*欢乐城首页专题 | *欢乐城首页专题 | ||||
*/ | */ | ||||
@@ -14,14 +25,16 @@ var config = { | |||||
userSign:"/userSign/signIn",//签到 | userSign:"/userSign/signIn",//签到 | ||||
signRule:"/credit/credit_rules",//签到规则 | signRule:"/credit/credit_rules",//签到规则 | ||||
wxMsg: '/user/updateMsg', | wxMsg: '/user/updateMsg', | ||||
// 获取服务资质 | |||||
getAppIcp:"/mall/getAppIcp", | |||||
/** | /** | ||||
* 获取首页按钮 | * 获取首页按钮 | ||||
*/ | */ | ||||
wxCustomizeModule:"/wxCustomizeModule/list", | wxCustomizeModule:"/wxCustomizeModule/list", | ||||
/** | /** | ||||
* 微信消息推送获取模板id | |||||
* 抖音消息推送获取模板id | |||||
*/ | */ | ||||
templateId: "/wxMsg/templateList", | |||||
templateId: "/wxMsg/ttTemplateList", | |||||
//问卷列表 | //问卷列表 | ||||
questionnaire :"/wxQuestionOneself/list", | questionnaire :"/wxQuestionOneself/list", | ||||
//问卷详情 | //问卷详情 | ||||
@@ -56,14 +69,33 @@ var config = { | |||||
* 商户优惠信息 | * 商户优惠信息 | ||||
*/ | */ | ||||
listByMerchant: "/wxCouponChannel/listByMerchant", | listByMerchant: "/wxCouponChannel/listByMerchant", | ||||
/** | /** | ||||
* 获取券价格与库存 | |||||
*/ | |||||
couponPriceAndStock:"/wxCoupon/couponPriceAndStock", | |||||
/** | |||||
* 获取券适用门店List | |||||
*/ | |||||
couponMerchant:"/wxCoupon/couponMerchant", | |||||
/** | |||||
* 获取券详情 | |||||
*/ | |||||
newCouponDetail:'/wxCoupon/couponDetail', | |||||
/** | |||||
* 优惠券详情 | * 优惠券详情 | ||||
*/ | */ | ||||
couponDetail: "/wxCoupon/detail", | couponDetail: "/wxCoupon/detail", | ||||
/** | /** | ||||
* 购物车订单详情 | * 购物车订单详情 | ||||
*/ | */ | ||||
goodsDetail:"/order/goodsDetail", | goodsDetail:"/order/goodsDetail", | ||||
/** | |||||
* 获取直播商品列表的价格和库存 | |||||
*/ | |||||
batchCouponPriceAndStock:"/wxCoupon/batchCouponPriceAndStock", | |||||
/** | /** | ||||
* 优惠券图文混排详情 | * 优惠券图文混排详情 | ||||
*/ | */ | ||||
@@ -84,6 +116,11 @@ var config = { | |||||
* 频道查询 | * 频道查询 | ||||
*/ | */ | ||||
couponChannelList: "/wxCouponChannel/list", | couponChannelList: "/wxCouponChannel/list", | ||||
/** | |||||
* 直播商品列表 | |||||
*/ | |||||
couponChannelDouyinLiveList: "/wxCouponChannel/douyinLiveList", | |||||
/** | /** | ||||
* 换一换change | * 换一换change | ||||
*/ | */ | ||||
@@ -387,12 +424,43 @@ var config = { | |||||
//获取动态核销码 | //获取动态核销码 | ||||
dynamicId:"/couponOrder/dynamicId" | |||||
dynamicId:"/couponOrder/dynamicId", | |||||
/** | |||||
* 获取门店资质 | |||||
*/ | |||||
certification:"/merchant/findCorp", | |||||
/** | |||||
* 交易快照 | |||||
*/ | |||||
getSnapshot:"/order/getSnapshot", | |||||
/** | |||||
* 退款 | |||||
*/ | |||||
refund:"/order/refund", | |||||
/** | |||||
* 查询退款详情 | |||||
*/ | |||||
getRefund:"/order/getRefund", | |||||
/* | |||||
*查询Spuid | |||||
*/ | |||||
getSpuid:'/wxCouponChannel/getChannelPoi', | |||||
/** | |||||
* 获取支付订单 | |||||
*/ | |||||
getchanId:"/couponOrder/getChannelPoi", | |||||
/** | |||||
* 获取客服链接 | |||||
*/ | |||||
getServiceUrl:"/ttopen/merchantPoi/query_customer_service_url", | |||||
/** | |||||
* 取消订单 | |||||
*/ | |||||
orderCancel:"/order/cancel" | |||||
}, | |||||
weapp: { | |||||
AppId: weappId | |||||
}, | }, | ||||
}; | }; | ||||
/* | |||||
for (var key in config.api) { | |||||
config.api[key] = apiPrefix + config.api[key]; | |||||
} | |||||
*/ | |||||
module.exports = config; | module.exports = config; |
@@ -0,0 +1,23 @@ | |||||
{ | |||||
"extEnable": true, | |||||
"extAppid": "ttef6599d8705b49b101", | |||||
"window": { | |||||
"backgroundTextStyle": "light", | |||||
"navigationBarBackgroundColor": "#fff", | |||||
"navigationBarTitleText": "Mini Program", | |||||
"navigationBarTextStyle": "black", | |||||
"navigationStyle": "custom" | |||||
}, | |||||
"ext": { | |||||
"weappId": "ttef6599d8705b49b101", | |||||
"name": "富茂券模板", | |||||
"attr": { | |||||
"configUrl": "https://ctest.malls.iformall.com/C/api" | |||||
} | |||||
}, | |||||
"directCommit": false, | |||||
"networkTimeout": { | |||||
"request": 30000, | |||||
"downloadFile": 10000 | |||||
} | |||||
} |
@@ -2,7 +2,8 @@ | |||||
// let ifStoreApp = extConfig.attr.ifStoreApp; | // let ifStoreApp = extConfig.attr.ifStoreApp; | ||||
// let businessSwitch = extConfig.attr.businessSwitch | // let businessSwitch = extConfig.attr.businessSwitch | ||||
// let mch_id = extConfig.attr.mchId | // let mch_id = extConfig.attr.mchId | ||||
const navigationBarHeight = (getApp().statusBarHeight + 44) + "px" | |||||
const navigationBarHeight = (getApp().statusBarHeight + 60) + "px" | |||||
const navigationBarHeight1 = (getApp().statusBarHeight + 50) + "px" | |||||
const Http = require("../utils/HttpBasics"); | const Http = require("../utils/HttpBasics"); | ||||
const imgurl = require("../utils/imgurl"); | const imgurl = require("../utils/imgurl"); | ||||
const config = require("../config/config"); | const config = require("../config/config"); | ||||
@@ -14,7 +15,7 @@ Page({ | |||||
data: { | data: { | ||||
userAvatarUrl: '', | userAvatarUrl: '', | ||||
userName: '', | userName: '', | ||||
aa: (app.statusBarHeight + 34) + "rpx", | |||||
// aa: (app.statusBarHeight + 60) + "rpx", | |||||
noDataFlag: false, | noDataFlag: false, | ||||
busineKye: 0, | busineKye: 0, | ||||
businePageNum: 1, | businePageNum: 1, | ||||
@@ -28,8 +29,9 @@ Page({ | |||||
topicObj6: null, //欢乐城首页积分商城 | topicObj6: null, //欢乐城首页积分商城 | ||||
specialLsit: [], //欢乐城首页专题 | specialLsit: [], //欢乐城首页专题 | ||||
marketName: "", //商场名称 | marketName: "", //商场名称 | ||||
mouldType: 0, | |||||
navLineHeight: ((app.statusBarHeight + app.statusBarHeight) + 44) + "px", | |||||
mouldType: null, | |||||
navLineHeight: ((app.statusBarHeight + app.statusBarHeight) + 50) + "px", | |||||
navImgHeight:(((app.statusBarHeight + app.statusBarHeight) + 34)/2) + "px", | |||||
huanlechengImgurl: "https://formall.oss-accelerate.aliyuncs.com/cimg/v20211214/", | huanlechengImgurl: "https://formall.oss-accelerate.aliyuncs.com/cimg/v20211214/", | ||||
// mch_id: mch_id, | // mch_id: mch_id, | ||||
goUrl: "", //商圈跳转链接 | goUrl: "", //商圈跳转链接 | ||||
@@ -40,6 +42,7 @@ Page({ | |||||
// ifStoreApp: ifStoreApp, | // ifStoreApp: ifStoreApp, | ||||
navigationBarTitle: '首页', | navigationBarTitle: '首页', | ||||
navigationBarHeight, | navigationBarHeight, | ||||
navigationBarHeight1, | |||||
chengzhangBox: bgColor.colorFirst.main.chengzhangBox, | chengzhangBox: bgColor.colorFirst.main.chengzhangBox, | ||||
activeColor: bgColor.colorFirst.main.activeColor, | activeColor: bgColor.colorFirst.main.activeColor, | ||||
qg: bgColor.colorFirst.main.qg, | qg: bgColor.colorFirst.main.qg, | ||||
@@ -112,6 +115,20 @@ Page({ | |||||
isShowSqare: false, | isShowSqare: false, | ||||
moduleList: [], //按钮列表 | moduleList: [], //按钮列表 | ||||
}, | }, | ||||
getCongig(){//获取小程序是否开通授权手机号 | |||||
Http.get({ | |||||
url:config.api.getConfig, | |||||
data:{ | |||||
key:"douyinPhoneStatus" | |||||
} | |||||
}).then(res=>{ | |||||
app.globalData.ifCongPh = res.data?res.data:1 | |||||
}).catch(err=>{ | |||||
app.globalData.ifCongPh = 1 | |||||
}) | |||||
}, | |||||
getBusineData(e) { | getBusineData(e) { | ||||
this.setData({ | this.setData({ | ||||
businePageNum: 1, | businePageNum: 1, | ||||
@@ -646,6 +663,10 @@ Page({ | |||||
token: token | token: token | ||||
} | } | ||||
}).then(res => { | }).then(res => { | ||||
if(res.data.avatarUrl||res.data.nickName){ | |||||
app.globalData.avatarUrl = res.data.avatarUrl | |||||
app.globalData.nickName = res.data.nickName | |||||
} | |||||
that.setData({ | that.setData({ | ||||
levelName: res.data.levelName, | levelName: res.data.levelName, | ||||
upgradePercent: res.data.upgradePercent, | upgradePercent: res.data.upgradePercent, | ||||
@@ -719,15 +740,16 @@ Page({ | |||||
if (app.globalData.token) { | if (app.globalData.token) { | ||||
// 登录 | // 登录 | ||||
console.log(app.globalData.token) | console.log(app.globalData.token) | ||||
that.getCongig()//获取小程序是否开通授权手机号 | |||||
that.setData({ | that.setData({ | ||||
mouldType: app.globalData.mouldType, | mouldType: app.globalData.mouldType, | ||||
marketName: app.globalData.marketName, | marketName: app.globalData.marketName, | ||||
activeColor: app.globalData.mouldType == 1 ? "#E9D0AA" : bgColor.colorFirst.main.activeColor | activeColor: app.globalData.mouldType == 1 ? "#E9D0AA" : bgColor.colorFirst.main.activeColor | ||||
}) | }) | ||||
//获取首页按钮 | |||||
that.getModule() | |||||
//获取首页按钮 抖音暂时屏蔽 | |||||
// that.getModule() | |||||
that.getmemberId(app.globalData.token); | that.getmemberId(app.globalData.token); | ||||
that.getBannerlist(); | that.getBannerlist(); | ||||
if (that.data.mouldType == 0) { //富茂原版 | if (that.data.mouldType == 0) { //富茂原版 | ||||
@@ -794,13 +816,14 @@ Page({ | |||||
app.tokenCallback = token => { | app.tokenCallback = token => { | ||||
// 登录 | // 登录 | ||||
console.log(app.globalData.token) | console.log(app.globalData.token) | ||||
that.getCongig()//获取小程序是否开通授权手机号 | |||||
that.setData({ | that.setData({ | ||||
mouldType: app.globalData.mouldType, | mouldType: app.globalData.mouldType, | ||||
marketName: app.globalData.marketName, | marketName: app.globalData.marketName, | ||||
activeColor: app.globalData.mouldType == 1 ? "#E9D0AA" : bgColor.colorFirst.main.activeColor | activeColor: app.globalData.mouldType == 1 ? "#E9D0AA" : bgColor.colorFirst.main.activeColor | ||||
}) | }) | ||||
//获取首页按钮 | |||||
that.getModule() | |||||
//获取首页按钮 抖音暂时屏蔽 | |||||
// that.getModule() | |||||
that.getmemberId(app.globalData.token); | that.getmemberId(app.globalData.token); | ||||
that.getBannerlist(); | that.getBannerlist(); | ||||
if (that.data.mouldType == 0) { //富茂原版 | if (that.data.mouldType == 0) { //富茂原版 | ||||
@@ -1,147 +1,150 @@ | |||||
<!-- 初始模板 --> | <!-- 初始模板 --> | ||||
<view tt:if="{{mouldType==0}}"> | <view tt:if="{{mouldType==0}}"> | ||||
<navbar color="{{typeLsit.sy_top_f.styleClass}}" background="{{typeLsit.sy_top.styleClass}}" text="首页"></navbar> | |||||
<!-- style="padding-top:{{navigationBarHeight}}" --> | |||||
<view class="container"> | |||||
<view style="height:{{navigationBarHeight}} "></view> | |||||
<!-- 会员信息 --> | |||||
<view class="color_box" style="{{typeLsit.sy_bbg.styleClass}}"> | |||||
<!-- 所属集团 --> | |||||
<view class="underling" bindtap="goSquareList" tt:if="{{squareName}}"> | |||||
<image class="underlingImg" mode="widthFix" src="https://formall.oss-accelerate.aliyuncs.com/cimg/dingwei.png"> | |||||
</image> | |||||
<view class="underlingName">{{squareName}} ↓</view> | |||||
</view> | |||||
<view class='userinfo' tt:if="{{ifStoreApp!=1}}"> | |||||
<!-- 头像 --> | |||||
<view class='infoLeft' style="{{typeLsit.sy_xxb.styleClass}}"> | |||||
<view class="user-avatar"> | |||||
<open-data class="open" type="userAvatarUrl"></open-data> | |||||
</view> | |||||
<!-- 成长值 --> | |||||
<view class="user-data fl" bindtap='gotoChengzhangzhi' style="{{typeLsit.sy_xxb.styleClass}}"> | |||||
<view class='nameBox'> | |||||
<open-data type="userNickName" style="{{typeLsit.sy_xxb_nf.styleClass}}"></open-data> | |||||
<view class='chengzhangBox' style='background:{{chengzhangBox}}'> | |||||
<text class='chengzhang'>{{levelName}}</text> | |||||
</view> | |||||
<navbar color="{{typeLsit.sy_top_f.styleClass}}" background="{{typeLsit.sy_top.styleClass}}" text="首页"></navbar> | |||||
<!-- style="padding-top:{{navigationBarHeight}}" --> | |||||
<view class="container"> | |||||
<view style="height:{{navigationBarHeight1}} "></view> | |||||
<!-- 会员信息 --> | |||||
<view class="color_box" style="{{typeLsit.sy_bbg.styleClass}}"> | |||||
<!-- 所属集团 --> | |||||
<view class="underling" bindtap="goSquareList" tt:if="{{squareName}}"> | |||||
<image class="underlingImg" mode="widthFix" src="https://formall.oss-accelerate.aliyuncs.com/cimg/dingwei.png"> | |||||
</image> | |||||
<view class="underlingName">{{squareName}} ↓</view> | |||||
</view> | |||||
<view class='userinfo' tt:if="{{ifStoreApp!=1}}"> | |||||
<!-- 头像 --> | |||||
<view class='infoLeft' style="{{typeLsit.sy_xxb.styleClass}}"> | |||||
<view class="user-avatar"> | |||||
<open-data class="open" type="userAvatarUrl"></open-data> | |||||
</view> | |||||
<!-- 成长值 --> | |||||
<view class="user-data fl" bindtap='gotoChengzhangzhi' style="{{typeLsit.sy_xxb.styleClass}}"> | |||||
<view class='nameBox'> | |||||
<open-data type="userNickName" style="{{typeLsit.sy_xxb_nf.styleClass}}"></open-data> | |||||
<view class='chengzhangBox' style='background:{{chengzhangBox}}'> | |||||
<text class='chengzhang'>{{levelName}}</text> | |||||
</view> | </view> | ||||
<view class="view"> | |||||
<progress percent="{{upgradePercent}}" stroke-width="6" activeColor="{{activeColor}}" /> | |||||
<view class='remainchengzhangzhi' style="{{typeLsit.sy_xxb_cf.styleClass}}">还需{{upgradeScore}}成长值可升级 | |||||
</view> | |||||
</view> | |||||
<view class="view"> | |||||
<progress percent="{{upgradePercent}}" stroke-width="6" activeColor="{{activeColor}}" /> | |||||
<view class='remainchengzhangzhi' style="{{typeLsit.sy_xxb_cf.styleClass}}">还需{{upgradeScore}}成长值可升级 | |||||
</view> | </view> | ||||
</view> | </view> | ||||
</view> | </view> | ||||
<!-- 二维码 --> | |||||
<view class='qrcode fr' bindtap='qrcode' style="{{typeLsit.sy_qrc.styleClass}}"> | |||||
<image src="{{typeLsit.sy_qrc.icon}}" class='qrcodeimg' mode='widthFix'></image> | |||||
</view> | |||||
</view> | </view> | ||||
<!-- banner --> | |||||
<c-banner tt:key="unique" list="{{list}}" /> | |||||
<!-- 频道 --> | |||||
<view class="channelBox" tt:if="{{ifStoreApp!=1&&moduleList.length>0}}" style="{{typeLsit.sy_mbg.styleClass}}"> | |||||
<view class='kjBox' bindtap='goPage' data-obj="{{item}}" tt:for="{{moduleList}}" tt:key="{{index}}"> | |||||
<image src='{{item.icon}}' mode='aspectFill'></image> | |||||
<view class="text">{{item.name}}</view> | |||||
</view> | |||||
<!-- 二维码 --> | |||||
<view class='qrcode fr' bindtap='qrcode' style="{{typeLsit.sy_qrc.styleClass}}"> | |||||
<image src="{{typeLsit.sy_qrc.icon}}" class='qrcodeimg' mode='widthFix'></image> | |||||
</view> | </view> | ||||
<view class='channelBox' tt:if="{{ifStoreApp==1}}" style="width:525rpx;"> | |||||
<view class='kjBox' bindtap='gotoBargain'> | |||||
<image src='{{kanjia}}' mode='aspectFill'></image> | |||||
<text>砍价</text> | |||||
</view> | |||||
<view class='kjBox' bindtap='gotoSpellGroup'> | |||||
<image src='{{pintuan}}' mode='aspectFill'></image> | |||||
<text>拼团</text> | |||||
</view> | |||||
<view class='kjBox' bindtap='gotoRushBuy'> | |||||
<image src='{{xiaofeika}}' mode='aspectFill'></image> | |||||
<text>限时抢购</text> | |||||
</view> | |||||
</view> | |||||
<!-- banner --> | |||||
<c-banner tt:key="unique" list="{{list}}" /> | |||||
<!-- 频道 --> | |||||
<view class="channelBox" tt:if="{{ifStoreApp!=1&&moduleList.length>0}}" style="{{typeLsit.sy_mbg.styleClass}}"> | |||||
<view class='kjBox' bindtap='goPage' data-obj="{{item}}" tt:for="{{moduleList}}" tt:key="{{index}}"> | |||||
<image src='{{item.icon}}' mode='aspectFill'></image> | |||||
<view class="text">{{item.name}}</view> | |||||
</view> | </view> | ||||
</view> | </view> | ||||
<view class='toutiao1' tt:if="{{showQg&&ifStoreApp!=1}}"> | |||||
<view class='xianshi' bindtap='gotoRushBuy'> | |||||
<text>限时专区</text> | |||||
<text>限时惊爆价 轻松拎回家</text> | |||||
<view class='channelBox' tt:if="{{ifStoreApp==1}}" style="width:525rpx;"> | |||||
<view class='kjBox' bindtap='gotoBargain'> | |||||
<image src='{{kanjia}}' mode='aspectFill'></image> | |||||
<text>砍价</text> | |||||
</view> | </view> | ||||
<view class='xsCon'> | |||||
<view tt:for="{{xslist}}" tt:key="index"> | |||||
<view class='igBox' data-couponId="{{item.couponId}}" data-couponChannelId="{{item.id}}" | |||||
data-targetAd="{{item.targetAd}}" bindtap='gotodetail'> | |||||
<image src='{{xslist[index].coverImg}}' mode='widthFix' class='imageH'></image> | |||||
<view class='imTit'>{{xslist[index].title}}</view> | |||||
</view> | |||||
<view class='kjBox' bindtap='gotoSpellGroup'> | |||||
<image src='{{pintuan}}' mode='aspectFill'></image> | |||||
<text>拼团</text> | |||||
</view> | |||||
<view class='kjBox' bindtap='gotoRushBuy'> | |||||
<image src='{{xiaofeika}}' mode='aspectFill'></image> | |||||
<text>限时抢购</text> | |||||
</view> | |||||
</view> | |||||
</view> | |||||
<view class='toutiao1' tt:if="{{showQg&&ifStoreApp!=1}}"> | |||||
<view class='xianshi' bindtap='gotoRushBuy'> | |||||
<text>限时专区</text> | |||||
<text>限时惊爆价 轻松拎回家</text> | |||||
</view> | |||||
<view class='xsCon'> | |||||
<view tt:for="{{xslist}}" tt:key="index"> | |||||
<view class='igBox' data-couponId="{{item.couponId}}" data-couponChannelId="{{item.id}}" | |||||
data-targetAd="{{item.targetAd}}" bindtap='gotodetail'> | |||||
<image src='{{xslist[index].coverImg}}' mode='widthFix' class='imageH'></image> | |||||
<view class='imTit'>{{xslist[index].title}}</view> | |||||
</view> | </view> | ||||
<view> | |||||
<view class='igBox' bindtap='gotoRushBuy'> | |||||
<image src='{{more}}' mode='widthFix' class='more'></image> | |||||
<view class='imTit'>更多...</view> | |||||
</view> | |||||
</view> | |||||
<view> | |||||
<view class='igBox' bindtap='gotoRushBuy'> | |||||
<image src='{{more}}' mode='widthFix' class='more'></image> | |||||
<view class='imTit'>更多...</view> | |||||
</view> | </view> | ||||
</view> | </view> | ||||
</view> | </view> | ||||
<!-- 爆款专区 --> | |||||
<c-hot id="hot" /> | |||||
<view class='product' tt:if="{{showTopic}}" bindtap='gotoTopic'> | |||||
<image src='{{cover}}' mode='widthFix'></image> | |||||
</view> | |||||
<c-coupons id="lists" bind:myevent="onGetCode" class="business" loadingtext="{{loadingtext}}" | |||||
loading="{{loading}}" /> | |||||
<!-- 广告蒙层 --> | |||||
<c-advertisement id="advertisement" tt:if="{{showGg&&!played&&!havePlayEd1}}" ggdata="{{ggdata}}" /> | |||||
</view> | |||||
<!-- 顶部签到成长值 --> | |||||
<view class='signin' tt:if="{{fistLogin}}" animation="{{alphaData}}"> | |||||
<open-data class="open" type="userAvatarUrl"></open-data> | |||||
<text class='text'>您今日签到成功,获得{{fistLogin}}成长值</text> | |||||
</view> | </view> | ||||
<view class="integralBox" tt:if="{{businessSwitch}}"> | |||||
<!--是未授权微信且未授权手机号 --> | |||||
<navigator url="/pages/getuserinfo/index" open-type="navigate" tt:if="{{accreditFlag==1}}"> | |||||
<image src='https://formall.oss-accelerate.aliyuncs.com/cimg/self-help-integral.png' mode='widthFix' | |||||
style="width: 100%;height: 100%;"></image> | |||||
</navigator> | |||||
<!-- 授权了微信 没授权手机号 --> | |||||
<navigator url="/pages/getuserinfo/index" open-type="navigate" tt:if="{{accreditFlag==2}}"> | |||||
<image src='https://formall.oss-accelerate.aliyuncs.com/cimg/self-help-integral.png' mode='widthFix' | |||||
style="width: 100%;height: 100%;"></image> | |||||
</navigator> | |||||
<!-- 爆款专区 --> | |||||
<c-hot id="hot" /> | |||||
<view class='product' tt:if="{{showTopic}}" bindtap='gotoTopic'> | |||||
<image src='{{cover}}' mode='widthFix'></image> | |||||
</view> | </view> | ||||
<c-coupons id="lists" bind:myevent="onGetCode" class="business" loadingtext="{{loadingtext}}" | |||||
loading="{{loading}}" /> | |||||
<!-- 广告蒙层 --> | |||||
<c-advertisement id="advertisement" tt:if="{{showGg&&!played&&!havePlayEd1}}" ggdata="{{ggdata}}" /> | |||||
</view> | |||||
<!-- 顶部签到成长值 --> | |||||
<view class='signin' tt:if="{{fistLogin}}" animation="{{alphaData}}"> | |||||
<open-data class="open" type="userAvatarUrl"></open-data> | |||||
<text class='text'>您今日签到成功,获得{{fistLogin}}成长值</text> | |||||
</view> | </view> | ||||
<!-- 欢乐城模板 --> | |||||
<view tt:if="{{mouldType==1}}"> | |||||
<view class="container1"> | |||||
<!-- 会员信息 --> | |||||
<view class="color_box1"> | |||||
<view class="integralBox" tt:if="{{businessSwitch}}"> | |||||
<!--是未授权微信且未授权手机号 --> | |||||
<navigator url="/pages/getuserinfo/index" open-type="navigate" tt:if="{{accreditFlag==1}}"> | |||||
<image src='https://formall.oss-accelerate.aliyuncs.com/cimg/self-help-integral.png' mode='widthFix' | |||||
style="width: 100%;height: 100%;"></image> | |||||
</navigator> | |||||
<!-- 授权了微信 没授权手机号 --> | |||||
<navigator url="/pages/getuserinfo/index" open-type="navigate" tt:if="{{accreditFlag==2}}"> | |||||
<image src='https://formall.oss-accelerate.aliyuncs.com/cimg/self-help-integral.png' mode='widthFix' | |||||
style="width: 100%;height: 100%;"></image> | |||||
</navigator> | |||||
</view> | |||||
</view> | |||||
<!-- 欢乐城模板 --> | |||||
<view tt:if="{{mouldType==1}}"> | |||||
<view class="container1"> | |||||
<!-- 会员信息 --> | |||||
<view class="color_box1"> | |||||
<view> | |||||
<!-- navigationBarHeight --> | |||||
<view style="height:{{navigationBarHeight}};overflow: hidden;" class="goSqunar1" bindtap="goSquareList"> | <view style="height:{{navigationBarHeight}};overflow: hidden;" class="goSqunar1" bindtap="goSquareList"> | ||||
<image class="squareLogo" src="../assets/imgData/squareLogo.png" style="top: {{navImgHeight}};" ></image> | |||||
<view class="title1" style="line-height:{{navLineHeight}}">{{marketName}}</view> | <view class="title1" style="line-height:{{navLineHeight}}">{{marketName}}</view> | ||||
<view style="height:{{navLineHeight}};position:relative;margin-right: 80rpx"> | |||||
<image tt:if="{{isShowSqare}}" src="{{huanlechengImgurl}}home_ic_xialajt.png" mode='widthFix' class="xia"> | |||||
<view tt:if="{{isShowSqare}}" style="height:{{navLineHeight}};position:relative;margin-right: 80rpx"> | |||||
<image src="{{huanlechengImgurl}}home_ic_xialajt.png" class="xia"> | |||||
</image> | </image> | ||||
</view> | </view> | ||||
</view> | </view> | ||||
<view class='userinfo1' tt:if="{{ifStoreApp!=1}}"> | |||||
<!-- 头像 --> | |||||
<!-- <view class='userinfo1' tt:if="{{ifStoreApp!=1}}"> | |||||
<view class='infoLeft' style="{{typeLsit.sy_xxb.styleClass}}"> | <view class='infoLeft' style="{{typeLsit.sy_xxb.styleClass}}"> | ||||
<view class="user-avatar1"> | <view class="user-avatar1"> | ||||
<!-- <open-data class="open" type="userAvatarUrl"></open-data> --> | |||||
<image wx:if="{{userAvatarUrl!=''}}" class="userAvatarUrl" src="{{userAvatarUrl}}"></image> | |||||
<image tt:if="{{userAvatarUrl!=''}}" class="userAvatarUrl" src="{{userAvatarUrl}}"></image> | |||||
</view> | </view> | ||||
<!-- 成长值--> | |||||
<view class="user-data1 fl" style="{{typeLsit.sy_xxb.styleClass}}"> | <view class="user-data1 fl" style="{{typeLsit.sy_xxb.styleClass}}"> | ||||
<view class='nameBox' bindtap="goIntegralmall"> | <view class='nameBox' bindtap="goIntegralmall"> | ||||
<!-- <open-data type="userNickName" style="font-size: 26rpx;color:#292723;"></open-data> --> | |||||
<p style="font-size: 28rpx;color:#292723;float: left;">{{userName}}</p> | <p style="font-size: 28rpx;color:#292723;float: left;">{{userName}}</p> | ||||
<view class="vgrade">{{levelName}}</view> | <view class="vgrade">{{levelName}}</view> | ||||
@@ -149,109 +152,91 @@ | |||||
</view> | </view> | ||||
<view class="view" bindtap='gotoChengzhangzhi'> | <view class="view" bindtap='gotoChengzhangzhi'> | ||||
<progress percent="{{upgradePercent}}" stroke-width="6" activeColor="{{activeColor}}" /> | <progress percent="{{upgradePercent}}" stroke-width="6" activeColor="{{activeColor}}" /> | ||||
<!-- <view class='remainchengzhangzhi' style="{{typeLsit.sy_xxb_cf.styleClass}}">还需{{upgradeScore}}成长值可升级</view> --> | |||||
<view class='remainchengzhangzhi'>还需 | <view class='remainchengzhangzhi'>还需 | ||||
<span style="color:#4D4941">{{upgradeScore}}成长值</span> | <span style="color:#4D4941">{{upgradeScore}}成长值</span> | ||||
可升级</view> | |||||
可升级 | |||||
</view> | |||||
</view> | </view> | ||||
</view> | </view> | ||||
</view> | </view> | ||||
<!-- 二维码 style="{{typeLsit.sy_qrc.styleClass}}" --> | |||||
<view class='qrcode1 fr' bindtap='qrcode'> | <view class='qrcode1 fr' bindtap='qrcode'> | ||||
<!-- <image src="{{typeLsit.sy_qrc.icon}}" class='qrcodeimg' mode='widthFix'></image> --> | |||||
<image src="https://formall.oss-accelerate.aliyuncs.com/cimg/lqcbarcode.png" class='qrcodeimg' | <image src="https://formall.oss-accelerate.aliyuncs.com/cimg/lqcbarcode.png" class='qrcodeimg' | ||||
mode='widthFix'></image> | mode='widthFix'></image> | ||||
</view> | </view> | ||||
</view> --> | |||||
</view> | |||||
<!-- banner --> | |||||
<c-banner tt:key="unique" list="{{list}}" /> | |||||
<!-- 频道 --> | |||||
<view class="channelBox" tt:if="{{ifStoreApp!=1&&moduleList.length>0}}" style="{{typeLsit.sy_mbg.styleClass}}"> | |||||
<view class='kjBox1' bindtap='goPage' data-obj="{{item}}" tt:for="{{moduleList}}" tt:key="{{index}}"> | |||||
<image src='{{item.icon}}' mode='aspectFill'></image> | |||||
<view class="text">{{item.name}}</view> | |||||
</view> | </view> | ||||
<!-- banner --> | |||||
<c-banner tt:key="unique" list="{{list}}" /> | |||||
<!-- 频道 --> | |||||
<view class="channelBox" tt:if="{{ifStoreApp!=1&&moduleList.length>0}}" style="{{typeLsit.sy_mbg.styleClass}}"> | |||||
<view class='kjBox1' bindtap='goPage' data-obj="{{item}}" tt:for="{{moduleList}}" tt:key="{{index}}"> | |||||
<image src='{{item.icon}}' mode='aspectFill'></image> | |||||
<view class="text">{{item.name}}</view> | |||||
</view> | |||||
</view> | |||||
<!-- 频道 --> | |||||
<view class='channelBox' tt:if="{{ifStoreApp==1}}" style="width:525rpx;"> | |||||
<view class='kjBox' bindtap='gotoBargain'> | |||||
<image src='{{kanjia}}' mode='aspectFill'></image> | |||||
<text>砍价</text> | |||||
</view> | </view> | ||||
<!-- 频道 --> | |||||
<view class='channelBox' tt:if="{{ifStoreApp==1}}" style="width:525rpx;"> | |||||
<view class='kjBox' bindtap='gotoBargain'> | |||||
<image src='{{kanjia}}' mode='aspectFill'></image> | |||||
<text>砍价</text> | |||||
</view> | |||||
<view class='kjBox' bindtap='gotoSpellGroup'> | |||||
<image src='{{pintuan}}' mode='aspectFill'></image> | |||||
<text>拼团</text> | |||||
</view> | |||||
<view class='kjBox' bindtap='gotoRushBuy'> | |||||
<image src='{{xiaofeika}}' mode='aspectFill'></image> | |||||
<text>限时抢购</text> | |||||
</view> | |||||
<view class='kjBox' bindtap='gotoSpellGroup'> | |||||
<image src='{{pintuan}}' mode='aspectFill'></image> | |||||
<text>拼团</text> | |||||
</view> | </view> | ||||
</view> | |||||
<!-- <view class='toutiao1' tt:if="{{showQg&&ifStoreApp!=1}}"> | |||||
<view class='xianshi' bindtap='gotoRushBuy'> | |||||
<text>限时专区</text> | |||||
<text>限时惊爆价 轻松拎回家</text> | |||||
</view> | |||||
<view class='xsCon'> | |||||
<view tt:for="{{xslist}}" tt:key="index"> | |||||
<view class='igBox' data-couponId="{{item.couponId}}" data-couponChannelId="{{item.id}}" data-targetAd="{{item.targetAd}}" bindtap='gotodetail'> | |||||
<image src='{{xslist[index].coverImg}}' mode='widthFix' class='imageH'></image> | |||||
<view class='imTit'>{{xslist[index].title}}</view> | |||||
</view> | |||||
</view> | |||||
<view> | |||||
<view class='igBox' bindtap='gotoRushBuy'> | |||||
<image src='{{more}}' mode='widthFix' class='more'></image> | |||||
<view class='imTit'>更多...</view> | |||||
</view> | |||||
</view> | |||||
</view> | |||||
<view class='kjBox' bindtap='gotoRushBuy'> | |||||
<image src='{{xiaofeika}}' mode='aspectFill'></image> | |||||
<text>限时抢购</text> | |||||
</view> | </view> | ||||
--> | |||||
<!-- 限时抢购 --> | |||||
<c-mould tt:if="{{topicObj2}}" obj="{{topicObj2}}" isShowCount | |||||
titleImgUrl="https://formall.oss-accelerate.aliyuncs.com/cimg/v20211214/home_txt_xsqw.png" /> | |||||
<!-- 砍价 --> | |||||
<c-mould tt:if="{{topicObj3}}" obj="{{topicObj3}}" | |||||
titleImgUrl="https://formall.oss-accelerate.aliyuncs.com/cimg/v20211214/home_txt_kj.png" /> | |||||
<!-- 拼团 --> | |||||
<c-mould tt:if="{{topicObj4}}" obj="{{topicObj4}}" | |||||
titleImgUrl="https://formall.oss-accelerate.aliyuncs.com/cimg/v20211214/home_txt_pt.png" /> | |||||
<!-- 专题 --> | |||||
<c-mould tt:if="{{specialLsit.length>0}}" tt:for="{{specialLsit}}" tt:key="{{index}}" obj="{{item}}" special /> | |||||
<!-- 消费卡 --> | |||||
<c-mould tt:if="{{topicObj5}}" obj="{{topicObj5}}" | |||||
titleImgUrl="https://formall.oss-accelerate.aliyuncs.com/cimg/v20211214/home_txt_xfk.png" /> | |||||
<!-- 积分商城 --> | |||||
<c-mould tt:if="{{topicObj6}}" obj="{{topicObj6}}" | |||||
titleImgUrl="https://formall.oss-accelerate.aliyuncs.com/cimg/v20211214/home_txt_jfsc.png" /> | |||||
<optimization tt:if="{{businessList.length>0}}" businessList="{{businessList}}" businessData="{{businessData}}" | |||||
bind:businessid="getBusineData" /> | |||||
<!-- <c-coupons id="lists" bind:myevent="onGetCode" class="business" loadingtext="{{loadingtext}}" loading="{{loading}}" /> --> | |||||
<!-- 广告蒙层 --> | |||||
<c-advertisement id="advertisement" tt:if="{{showGg&&!played&&!havePlayEd1}}" ggdata="{{ggdata}}" /> | |||||
</view> | |||||
<!-- 顶部签到成长值 --> | |||||
<view class='signin' tt:if="{{fistLogin}}" animation="{{alphaData}}"> | |||||
<open-data class="open" type="userAvatarUrl"></open-data> | |||||
<text class='text'>您今日签到成功,获得{{fistLogin}}成长值</text> | |||||
</view> | |||||
<view class="integralBox1" tt:if="{{businessSwitch}}"> | |||||
<!--是未授权微信且未授权手机号 --> | |||||
<navigator url="/pages/getuserinfo/index" open-type="navigate" tt:if="{{accreditFlag==1}}"> | |||||
<image src='{{huanlechengImgurl}}home_icon_wgjf.png' mode='widthFix' style="width: 100%;height: 100%;"></image> | |||||
</navigator> | |||||
<!-- 授权了微信 没授权手机号 --> | |||||
<navigator url="/pages/getuserinfo/index" open-type="navigate" tt:if="{{accreditFlag==2}}"> | |||||
<image src='{{huanlechengImgurl}}home_icon_wgjf.png' mode='widthFix' style="width: 100%;height: 100%;"></image> | |||||
</navigator> | |||||
</view> | |||||
</view> | </view> | ||||
<!-- 限时抢购 --> | |||||
<c-mould tt:if="{{topicObj2}}" obj="{{topicObj2}}" isShowCount | |||||
titleImgUrl="https://formall.oss-accelerate.aliyuncs.com/cimg/v20211214/home_txt_xsqw.png" /> | |||||
<!-- 砍价 --> | |||||
<c-mould tt:if="{{topicObj3}}" obj="{{topicObj3}}" | |||||
titleImgUrl="https://formall.oss-accelerate.aliyuncs.com/cimg/v20211214/home_txt_kj.png" /> | |||||
<!-- 拼团 --> | |||||
<c-mould tt:if="{{topicObj4}}" obj="{{topicObj4}}" | |||||
titleImgUrl="https://formall.oss-accelerate.aliyuncs.com/cimg/v20211214/home_txt_pt.png" /> | |||||
<!-- 专题 --> | |||||
<c-mould tt:if="{{specialLsit.length>0}}" tt:for="{{specialLsit}}" tt:key="{{index}}" obj="{{item}}" special /> | |||||
<!-- 消费卡 --> | |||||
<c-mould tt:if="{{topicObj5}}" obj="{{topicObj5}}" | |||||
titleImgUrl="https://formall.oss-accelerate.aliyuncs.com/cimg/v20211214/home_txt_xfk.png" /> | |||||
<!-- 积分商城 --> | |||||
<c-mould tt:if="{{topicObj6}}" obj="{{topicObj6}}" | |||||
titleImgUrl="https://formall.oss-accelerate.aliyuncs.com/cimg/v20211214/home_txt_jfsc.png" /> | |||||
<optimization tt:if="{{businessList.length>0}}" businessList="{{businessList}}" businessData="{{businessData}}" | |||||
bind:businessid="getBusineData" /> | |||||
<!-- <c-coupons id="lists" bind:myevent="onGetCode" class="business" loadingtext="{{loadingtext}}" loading="{{loading}}" /> --> | |||||
<!-- 广告蒙层 --> | |||||
<c-advertisement id="advertisement" tt:if="{{showGg&&!played&&!havePlayEd1}}" ggdata="{{ggdata}}" /> | |||||
</view> | |||||
<!-- 顶部签到成长值 --> | |||||
<view class='signin' tt:if="{{fistLogin}}" animation="{{alphaData}}"> | |||||
<open-data class="open" type="userAvatarUrl"></open-data> | |||||
<text class='text'>您今日签到成功,获得{{fistLogin}}成长值</text> | |||||
</view> | |||||
<view class="integralBox1" tt:if="{{businessSwitch}}"> | |||||
<!--是未授权微信且未授权手机号 --> | |||||
<navigator url="/pages/getuserinfo/index" open-type="navigate" tt:if="{{accreditFlag==1}}"> | |||||
<image src='{{huanlechengImgurl}}home_icon_wgjf.png' mode='widthFix' style="width: 100%;height: 100%;"></image> | |||||
</navigator> | |||||
<!-- 授权了微信 没授权手机号 --> | |||||
<navigator url="/pages/getuserinfo/index" open-type="navigate" tt:if="{{accreditFlag==2}}"> | |||||
<image src='{{huanlechengImgurl}}home_icon_wgjf.png' mode='widthFix' style="width: 100%;height: 100%;"></image> | |||||
</navigator> | |||||
</view> | </view> | ||||
<tabbar/> | |||||
</view> | |||||
<tabbar /> |
@@ -28,8 +28,20 @@ page { | |||||
} | } | ||||
.goSqunar1 { | .goSqunar1 { | ||||
display: flex; | display: flex; | ||||
justify-content: center; | |||||
justify-content: center; | |||||
background-image: url('https://formall.oss-accelerate.aliyuncs.com/douyin_ifomall/imgData/topback_1.png'); | |||||
background-size: 100% 100%; | |||||
background-repeat: no-repeat; | |||||
position: relative; | |||||
height: 190rpx; | |||||
} | |||||
.squareLogo{ | |||||
width: 94rpx; | |||||
height: 40rpx; | |||||
position: absolute; | |||||
left: 30rpx; | |||||
/* top: 44%; */ | |||||
} | } | ||||
.title { | .title { | ||||
@@ -41,9 +53,10 @@ page { | |||||
.title1 { | .title1 { | ||||
max-width:320rpx; | max-width:320rpx; | ||||
font-size: 32rpx; | |||||
font-family: OPPOSans; | |||||
font-weight: bold; | |||||
color: #402e1e; | |||||
font-family: "PingFangSC-Medium"; | |||||
font-size: 28rpx; | |||||
font-weight: 400; | |||||
text-overflow: ellipsis; | text-overflow: ellipsis; | ||||
white-space: nowrap; | white-space: nowrap; | ||||
overflow: hidden; | overflow: hidden; | ||||
@@ -87,9 +100,9 @@ page { | |||||
.color_box1 { | .color_box1 { | ||||
background-color: #fff; | background-color: #fff; | ||||
background-image: url('https://formall.oss-accelerate.aliyuncs.com/cimg/v20211214/home_top_bnt.png'); | |||||
background-size: 100% 100%; | |||||
border-radius: 0 0 40rpx 40rpx; | |||||
/* background-image: url('https://formall.oss-accelerate.aliyuncs.com/cimg/v20211214/home_top_bnt.png'); */ | |||||
/* background-size: 100% 100%; */ | |||||
/* border-radius: 0 0 40rpx 40rpx; */ | |||||
overflow: hidden; | overflow: hidden; | ||||
background-repeat: no-repeat; | background-repeat: no-repeat; | ||||
} | } | ||||
@@ -1,4 +1,4 @@ | |||||
const navigationBarHeight = (getApp().statusBarHeight + 44) + "px" | |||||
const navigationBarHeight = (getApp().statusBarHeight + 50) + "px" | |||||
const Http = require("../utils/HttpBasics"); | const Http = require("../utils/HttpBasics"); | ||||
const imgurl = require("../utils/imgurl"); | const imgurl = require("../utils/imgurl"); | ||||
const config = require("../config/config"); | const config = require("../config/config"); | ||||
@@ -10,6 +10,8 @@ Page({ | |||||
*/ | */ | ||||
data: { | data: { | ||||
navigationBarHeight, | navigationBarHeight, | ||||
navLineHeight: ((app.statusBarHeight + app.statusBarHeight) + 50) + "px", | |||||
navImgHeight:(((app.statusBarHeight + app.statusBarHeight) + 34)/2) + "px", | |||||
lists: [], | lists: [], | ||||
merchantVoList: [], | merchantVoList: [], | ||||
indexId: 0, | indexId: 0, | ||||
@@ -21,6 +23,7 @@ Page({ | |||||
teljpgUrl: imgurl.teljpg.url, | teljpgUrl: imgurl.teljpg.url, | ||||
map: imgurl.map.url, //商场地图 | map: imgurl.map.url, //商场地图 | ||||
mapUrl: '/pages/marketAtlas/marketAtlas', //跳转地图的路径 | mapUrl: '/pages/marketAtlas/marketAtlas', //跳转地图的路径 | ||||
mouldType:0, | |||||
}, | }, | ||||
getFemgMap() { //判断时候对接封了地图 | getFemgMap() { //判断时候对接封了地图 | ||||
Http.get({ | Http.get({ | ||||
@@ -86,6 +89,9 @@ Page({ | |||||
* 生命周期函数--监听页面加载 | * 生命周期函数--监听页面加载 | ||||
*/ | */ | ||||
onLoad: function(options) { | onLoad: function(options) { | ||||
this.setData({ | |||||
mouldType: app.globalData.mouldType, | |||||
}) | |||||
let that = this; | let that = this; | ||||
that.getBussiness(); | that.getBussiness(); | ||||
that.getList(1, 0); | that.getList(1, 0); | ||||
@@ -94,6 +100,9 @@ Page({ | |||||
}) | }) | ||||
}, | }, | ||||
onShow() { | onShow() { | ||||
this.setData({ | |||||
mouldType: app.globalData.mouldType, | |||||
}) | |||||
this.getFemgMap() | this.getFemgMap() | ||||
let that = this; | let that = this; | ||||
if (typeof this.getTabBar === 'function' && | if (typeof this.getTabBar === 'function' && | ||||
@@ -1,10 +1,15 @@ | |||||
<navbar text="门店"></navbar> | |||||
<!-- <navbar text="门店"></navbar> --> | |||||
<view style="height:{{navigationBarHeight}};overflow: hidden;" class="goSqunar1" bindtap="goSquareList"> | |||||
<image class="squareLogo" src="../assets/imgData/squareLogo.png" style="top: {{navImgHeight}};" ></image> | |||||
<view class="title1" style="line-height:{{navLineHeight}}">门店</view> | |||||
</view> | |||||
<!-- 左侧滚动栏 --> | <!-- 左侧滚动栏 --> | ||||
<view style="height:{{navigationBarHeight}} "></view> | |||||
<view class="search" bindtap="goSearchBar"> | |||||
<span class="iconfont icon-sousuo searchicon"></span>搜索门店</view> | |||||
<view> | |||||
<view class='under_line'></view> | |||||
<!-- <view style="height:{{navigationBarHeight}} "></view> --> | |||||
<view class="bgBox"> | |||||
<view style="height: 20rpx;"></view> | |||||
<view class="search" bindtap="goSearchBar"> | |||||
<span class="iconfont icon-sousuo searchicon"></span>搜索门店</view> | |||||
<view style='float: left;' class='left'> | <view style='float: left;' class='left'> | ||||
<scroll-view scroll-y scroll-with-animation scroll-left="{{scrollLength}}" class='scrollY' style='height: {{windowHeight-160}}px;'> | <scroll-view scroll-y scroll-with-animation scroll-left="{{scrollLength}}" class='scrollY' style='height: {{windowHeight-160}}px;'> | ||||
<view class='all clear'> | <view class='all clear'> | ||||
@@ -12,7 +17,7 @@ | |||||
<view bindtap='jumpIndex' data-menuindex='{{item.id}}'> | <view bindtap='jumpIndex' data-menuindex='{{item.id}}'> | ||||
<view class="{{indexId==item.id?'text-style':'text-styleHover'}}"> | <view class="{{indexId==item.id?'text-style':'text-styleHover'}}"> | ||||
<text class="{{indexId==item.id?'active1':''}}">{{item.title}}</text> | <text class="{{indexId==item.id?'active1':''}}">{{item.title}}</text> | ||||
<text class="{{indexId==item.id?'active':''}}"></text> | |||||
<text class="{{indexId==item.id?'active':''}}" style="{{mouldType==1?'background:linear-gradient(127deg,#BC8D3E , 0%,#E3BA79 100%);':''}}"></text> | |||||
</view> | </view> | ||||
</view> | </view> | ||||
</block> | </block> | ||||
@@ -22,7 +27,8 @@ | |||||
<view class='lists'> | <view class='lists'> | ||||
<view class='posi' tt:if="{{merchantVoList.length>0}}"> | <view class='posi' tt:if="{{merchantVoList.length>0}}"> | ||||
<view class='posi_logo' tt:for="{{merchantVoList}}" tt:key="index"> | |||||
<view class='posi_logo' tt:for="{{merchantVoList}}" tt:key="index" > | |||||
<view class="floor" tt:if="{{mouldType==1}}">{{item.shopVoList[0].floorName}}</view> | |||||
<view class='merchants' bindtap='gotoDetail' data-id='{{item.id}}'> | <view class='merchants' bindtap='gotoDetail' data-id='{{item.id}}'> | ||||
<view style=' margin-left: 24rpx;margin-top: 24rpx;'> | <view style=' margin-left: 24rpx;margin-top: 24rpx;'> | ||||
<image src='{{item.merchantImgUrl}}'></image> | <image src='{{item.merchantImgUrl}}'></image> | ||||
@@ -44,7 +50,5 @@ | |||||
</view> | </view> | ||||
</view> | </view> | ||||
</view> | </view> | ||||
<!-- <image class="map" src="{{map}}" bindtap="goMap"> --> | |||||
</image> | |||||
<!-- <image class="map" src="{{map}}" bindtap="goMap"></image> --> | |||||
<tabbar/> | <tabbar/> |
@@ -10,7 +10,51 @@ | |||||
width: 100rpx; | width: 100rpx; | ||||
/* background-color: chartreuse; */ | /* background-color: chartreuse; */ | ||||
} | } | ||||
.search{ | |||||
.bgBox{ | |||||
background-image: linear-gradient(#ffffff, #F4F5F9); | |||||
height: 500rpx; | |||||
} | |||||
.goSqunar1 { | |||||
display: flex; | |||||
justify-content: center; | |||||
background-image: url('https://formall.oss-accelerate.aliyuncs.com/douyin_ifomall/imgData/topback_1.png'); | |||||
background-size: 100% 100%; | |||||
background-repeat: no-repeat; | |||||
position: relative; | |||||
height: 190rpx; | |||||
} | |||||
.squareLogo{ | |||||
width: 94rpx; | |||||
height: 40rpx; | |||||
position: absolute; | |||||
left: 30rpx; | |||||
/* top: 44%; */ | |||||
} | |||||
.title1 { | |||||
max-width:320rpx; | |||||
color: #402e1e; | |||||
font-family: "PingFangSC-Medium"; | |||||
font-size: 28rpx; | |||||
font-weight: 400; | |||||
text-overflow: ellipsis; | |||||
white-space: nowrap; | |||||
overflow: hidden; | |||||
} | |||||
.xia { | |||||
width: 24rpx; | |||||
height: 14rpx; | |||||
margin: auto 10rpx; | |||||
display: block; | |||||
position: absolute; | |||||
top: 0; | |||||
left: 0; | |||||
right: 0; | |||||
bottom: 0; | |||||
/* margin: auto; */ | |||||
} | |||||
.search{ | |||||
z-index:5000; | z-index:5000; | ||||
left:0; | left:0; | ||||
right: 0; | right: 0; | ||||
@@ -79,11 +123,16 @@ | |||||
border-radius:7rpx; | border-radius:7rpx; | ||||
} | } | ||||
.lists{ | |||||
overflow: scroll; | |||||
margin-bottom: 200rpx; | |||||
} | |||||
.posi { | .posi { | ||||
position: relative; | position: relative; | ||||
width: 616rpx; | width: 616rpx; | ||||
float: right; | float: right; | ||||
margin-top: 20rpx; | margin-top: 20rpx; | ||||
margin-bottom: 200rpx; | |||||
} | } | ||||
.posi>view:nth-child(2) { | .posi>view:nth-child(2) { | ||||
@@ -113,6 +162,20 @@ | |||||
margin: 20rpx; | margin: 20rpx; | ||||
overflow: hidden; | overflow: hidden; | ||||
} | } | ||||
.floor{ | |||||
width: 80rpx; | |||||
height: 40rpx; | |||||
line-height: 40rpx; | |||||
position: absolute; | |||||
top: 0; | |||||
right: 0; | |||||
border-radius:0 16rpx 0 0; | |||||
background-color: #d5af67; | |||||
color: #fff; | |||||
font-size: 22rpx; | |||||
text-align: center; | |||||
} | |||||
.tel { | .tel { | ||||
position: absolute; | position: absolute; | ||||
right: 3%; | right: 3%; | ||||
@@ -183,6 +246,9 @@ page { | |||||
white-space: nowrap; | white-space: nowrap; | ||||
text-overflow: ellipsis; | text-overflow: ellipsis; | ||||
overflow: hidden; | overflow: hidden; | ||||
white-space: nowrap; | |||||
height: 80rpx; | |||||
} | } | ||||
.shopVoList text{ | .shopVoList text{ | ||||
font-size: 20rpx!important; | font-size: 20rpx!important; | ||||
@@ -1,5 +1,5 @@ | |||||
const app = getApp() | const app = getApp() | ||||
const navigationBarHeight = (getApp().statusBarHeight + 44) + "px"; | |||||
const navigationBarHeight = (getApp().statusBarHeight + 50) + "px"; | |||||
const Http = require("../utils/HttpBasics"); | const Http = require("../utils/HttpBasics"); | ||||
const config = require("../config/config"); | const config = require("../config/config"); | ||||
const imgurl = require("../utils/imgurl"); | const imgurl = require("../utils/imgurl"); | ||||
@@ -7,57 +7,50 @@ Page({ | |||||
data: { | data: { | ||||
navigationBarHeight, | navigationBarHeight, | ||||
showPhoem: false, | showPhoem: false, | ||||
phoemFalg: true,//授权手机标记 | |||||
text: "授权手机号", | |||||
avatarUrl: "", | |||||
nickName: "", | |||||
mouldType:1, | |||||
}, | }, | ||||
showPhoemBtn() { | showPhoemBtn() { | ||||
this.setData({ | |||||
showPhoem: true | |||||
}) | |||||
tt.navigateTo({ | |||||
url: '/pages/getPhone/getPhone?mineFlag=mine', | |||||
}); | |||||
}, | }, | ||||
go(e) { | go(e) { | ||||
if (this.data.phoemFalg) { | |||||
tt.showToast({ | |||||
title: '请授权手机号', // 内容 | |||||
icon: 'none', // 图标 | |||||
let url = e.currentTarget.dataset.url | |||||
console.log(url); | |||||
if (url == '/pages/order/index/index?id=all') { | |||||
app.globalData.ifshowtab=false | |||||
tt.navigateTo({ | |||||
url: url, | |||||
success: (res) => { | success: (res) => { | ||||
}, | }, | ||||
fail: (res) => { | fail: (res) => { | ||||
}, | }, | ||||
}); | }); | ||||
} else { | } else { | ||||
let url = e.currentTarget.dataset.url | |||||
console.log(url); | |||||
if(url=='/pages/order/index/index?id=all'){ | |||||
tt.navigateTo({ | |||||
url: url, | |||||
success: (res) => { | |||||
}, | |||||
fail: (res) => { | |||||
}, | |||||
}); | |||||
}else{ | |||||
tt.navigateTo({ | |||||
url: url, // 指定页面的 url | |||||
success: (res) => { | |||||
}, | |||||
fail: (res) => { | |||||
}, | |||||
}); | |||||
} | |||||
tt.navigateTo({ | |||||
url: url, // 指定页面的 url | |||||
success: (res) => { | |||||
}, | |||||
fail: (res) => { | |||||
}, | |||||
}); | |||||
} | } | ||||
}, | }, | ||||
setPhone(paramData) {//子组件调用这个方法说明手机号已经授权成功 | setPhone(paramData) {//子组件调用这个方法说明手机号已经授权成功 | ||||
this.setData({ | this.setData({ | ||||
showPhoem: paramData.detail, | showPhoem: paramData.detail, | ||||
phoemFalg: false | |||||
}) | }) | ||||
tt.showToast({ | tt.showToast({ | ||||
title: '授权成功', // 内容 | title: '授权成功', // 内容 | ||||
@@ -70,63 +63,94 @@ Page({ | |||||
}, | }, | ||||
}); | }); | ||||
}, | }, | ||||
getmemberId: function (token) { | |||||
Http.get({ | |||||
url: config.api.getScore, | |||||
data: { | |||||
token: token | |||||
} | |||||
}).then(res => { | |||||
if (res.data.avatarUrl || res.data.nickName) { | |||||
this.setData({ | |||||
avatarUrl: res.data.avatarUrl, | |||||
nickName: res.data.nickName, | |||||
}) | |||||
} | |||||
}).catch(err => { | |||||
tt.showModal({ | |||||
title: '提示', | |||||
content: err.message, | |||||
showCancel: false | |||||
}) | |||||
}) | |||||
}, | |||||
setBox(paramData) { | setBox(paramData) { | ||||
this.setData({ | this.setData({ | ||||
showPhoem: paramData.detail | showPhoem: paramData.detail | ||||
}) | }) | ||||
tt.showToast({ | |||||
title: '取消授权', // 内容 | |||||
icon: 'none', // 图标 | |||||
success: (res) => { | |||||
}, | |||||
fail: (res) => { | |||||
}, | |||||
tt.reLaunch({ | |||||
url: "/index/index", | |||||
success(res) { | |||||
console.log(`${res}`); | |||||
app.globalData.selected = 0 | |||||
}, | |||||
fail(err) { | |||||
console.log(`navigateTo调用失败`,err); | |||||
}, | |||||
}); | }); | ||||
}, | |||||
onLoad: function (options) { | |||||
let _this = this | |||||
Http.get({//判断是否授权抖音 | |||||
url: config.api.checkPhoneStatus, | |||||
// tt.showToast({ | |||||
// title: '取消授权', // 内容 | |||||
// icon: 'none', // 图标 | |||||
// success: (res) => { | |||||
// }, | |||||
// fail: (res) => { | |||||
}).then(res => { | |||||
this.setData({ | |||||
phoemFalg: false | |||||
}) | |||||
}).catch(err => { | |||||
console.log(err, "我出错了") | |||||
// }, | |||||
// }); | |||||
}, | |||||
onShow: function (options) { | |||||
this.setData({ | |||||
mouldType:app.globalData.mouldType | |||||
}) | }) | ||||
this.getmemberId() | |||||
Http.get({ | |||||
url: config.api.checkUserStatus, | |||||
data: { | |||||
token: app.globalData.token | |||||
} | |||||
}).then(res => { | |||||
Http.get({ | |||||
url: config.api.checkPhoneStatus, | |||||
tt.getUserInfo({ | |||||
withCredentials: true, | |||||
success: function (res) { | |||||
_this.setData({ | |||||
userData: res.userInfo | |||||
}).then(res => { | |||||
this.setData({ | |||||
text:res.data.phone | |||||
}) | }) | ||||
Http.post({ | |||||
url: config.api.getUserInfo, | |||||
data: { | |||||
encryptedData: res.encryptedData, | |||||
iv: res.iv | |||||
} | |||||
}).then(res => { | |||||
}).catch(err => { | |||||
tt.showToast({ | |||||
title: err.message ? err.message : err.data, | |||||
icon: 'none', | |||||
duration: 2000, | |||||
mask: false | |||||
}).catch(err => { | |||||
if(app.globalData.ifCongPh==1){ | |||||
tt.navigateTo({ | |||||
url: '/pages/getPhone/getPhone?mineFlag=mine', | |||||
}); | }); | ||||
}) | |||||
}, | |||||
fail(res) { | |||||
}else{ | |||||
this.setData({ | |||||
showPhoem:true | |||||
}) | |||||
} | |||||
}) | |||||
}).catch(err => { | |||||
if (err.code == 11004) {//未授权抖音 | |||||
app.globalData.type = 'uc' | |||||
tt.navigateTo({ | tt.navigateTo({ | ||||
url: 'pages/index/index' // 指定页面的url | |||||
url: '/pages/getuserinfo/getuserinfo', | |||||
}); | }); | ||||
}, | |||||
} | |||||
}) | }) | ||||
} | } | ||||
}) | }) |
@@ -1,40 +1,38 @@ | |||||
<view class="BoxBg"> | <view class="BoxBg"> | ||||
<navbar text="我的" background='#FD832D' color="#fff"></navbar> | |||||
<image class="bgImgTop" src="https://formall.oss-accelerate.aliyuncs.com/douyin_ifomall/imgData/userBg.png"></image> | |||||
<navbar tt:if="{{mouldType==1}}" text="会员中心" background='#e6e6e6'></navbar> | |||||
<navbar tt:if="{{mouldType!=1}}" text="我的" background='#FD832D' color="#fff"></navbar> | |||||
<view style="height:{{navigationBarHeight}} "></view> | <view style="height:{{navigationBarHeight}} "></view> | ||||
<view class="userBg"> | |||||
<view class="userLogo"> | |||||
<image style="width: 100%;height:100%;border-radius: 50%;" src="{{userData.avatarUrl}}" /> | |||||
<view class="{{mouldType==1?'userBg1':'userBg'}}"> | |||||
<view class="userLogo" style="{{mouldType==1?'':'background: linear-gradient(180deg,rgba(253,131,45,1) 0%,rgba(254,74,22,1) 100%);'}}"> | |||||
<image style="width: 100%;height:100%;border-radius: 50%;" src="{{avatarUrl}}" /> | |||||
<!-- <open-data class="open" type="userAvatarUrl"></open-data> --> | <!-- <open-data class="open" type="userAvatarUrl"></open-data> --> | ||||
</view> | </view> | ||||
<view class="userData"> | |||||
<view class="noInfo">{{userData.nickName}}</view> | |||||
<view class="userData" style="{{mouldType==1?'#000':'#ffffff'}}"> | |||||
<view class="noInfo" >{{nickName}}</view> | |||||
<!-- <open-data class="noInfo" type="userNickName"></open-data> --> | <!-- <open-data class="noInfo" type="userNickName"></open-data> --> | ||||
<view class="info" tt:if="{{phoemFalg}}" bindtap="showPhoemBtn">授权手机号</view> | |||||
<view class="{{mouldType==1?'infoX':'info'}}" bindtap="showPhoemBtn">{{text}}</view> | |||||
</view> | </view> | ||||
<!-- <view class="userName">乐</view> --> | |||||
</view> | </view> | ||||
<view class="tempBpx"> | <view class="tempBpx"> | ||||
<view class="functionBox"> | <view class="functionBox"> | ||||
<!-- <view class="itemBox" bindtap="go" data-url="/pages/specialcourtesy/specialcourtesy"> | |||||
<view class="itemLogoBox"><image class="itemLogo" src="../assets/images/userInfo.png" /></view> | |||||
<view class="itemNAme">个人信息</view> | |||||
</view> --> | |||||
<view class="itemBox" bindtap="go" data-url="/pages/edit/edit"> | <view class="itemBox" bindtap="go" data-url="/pages/edit/edit"> | ||||
<view class="itemLogoBox"><image class="itemLogo" src="../assets/images/userInfo.png" /></view> | <view class="itemLogoBox"><image class="itemLogo" src="../assets/images/userInfo.png" /></view> | ||||
<view class="itemNAme">个人信息</view> | <view class="itemNAme">个人信息</view> | ||||
</view> | </view> | ||||
<view class="itemBox" bindtap="go" data-url="/pages/order/index/index?id=all"> | <view class="itemBox" bindtap="go" data-url="/pages/order/index/index?id=all"> | ||||
<view class="itemLogoBox"><image class="itemLogo" src="../assets/images/dindan_a.png" /></view> | |||||
<view class="itemLogoBox"><image class="itemLogo" src="../assets/images/userDd.png" /></view> | |||||
<view class="itemNAme">我的订单</view> | <view class="itemNAme">我的订单</view> | ||||
</view> | </view> | ||||
<view class="itemBox" bindtap="go" data-url="/pages/ticket/ticket"> | |||||
<view class="itemLogoBox"><image class="itemLogo" src="../assets/images/quan.png" /></view> | |||||
<view class="itemBox" bindtap="go" data-url="/pages/couponorder/index/index"> | |||||
<view class="itemLogoBox"><image class="itemLogo" src="../assets/images/userQuan.png" /></view> | |||||
<view class="itemNAme">我的券包</view> | <view class="itemNAme">我的券包</view> | ||||
</view> | </view> | ||||
<view class="itemBox" bindtap="go" data-url="/pages/integralmall/index"> | |||||
<!-- <view class="itemBox" bindtap="go" data-url="/pages/integralmall/index"> | |||||
<view class="itemLogoBox"><image class="itemLogo" src="../assets/images/store.png" /></view> | <view class="itemLogoBox"><image class="itemLogo" src="../assets/images/store.png" /></view> | ||||
<view class="itemNAme">积分商城</view> | <view class="itemNAme">积分商城</view> | ||||
</view> | |||||
</view> --> | |||||
</view> | </view> | ||||
</view> | </view> | ||||
@@ -50,27 +48,27 @@ | |||||
<navigator class="fuwuItem" url="/pages/questionnaire/questionnaireLsit/questionnaireLsit" hover-class="navigator-hover" open-type="navigate"> | <navigator class="fuwuItem" url="/pages/questionnaire/questionnaireLsit/questionnaireLsit" hover-class="navigator-hover" open-type="navigate"> | ||||
<view class="fuwuLogoBox f" > | <view class="fuwuLogoBox f" > | ||||
<image class="itemLogo" src="../assets/images/questionnaire.png" /> | |||||
<image class="itemLogo" src="../assets/images/wenquan.png" /> | |||||
</view> | </view> | ||||
<view class="fuwuName f">问卷调查</view> | <view class="fuwuName f">问卷调查</view> | ||||
</navigator> | </navigator> | ||||
<navigator class="fuwuItem" url="/pages/mallInfo/mallInfo" hover-class="navigator-hover" open-type="navigate"> | <navigator class="fuwuItem" url="/pages/mallInfo/mallInfo" hover-class="navigator-hover" open-type="navigate"> | ||||
<view class="fuwuLogoBox f" > | <view class="fuwuLogoBox f" > | ||||
<image class="itemLogo" src="../assets/images/main.png" /> | |||||
<image class="itemLogo" src="../assets/images/mian1.png" /> | |||||
</view> | </view> | ||||
<view class="fuwuName f">关于我们</view> | <view class="fuwuName f">关于我们</view> | ||||
</navigator> | </navigator> | ||||
<button class="fuwuItem" open-type="contact"> | <button class="fuwuItem" open-type="contact"> | ||||
<view class="fuwuLogoBox f" > | <view class="fuwuLogoBox f" > | ||||
<image class="itemLogo" src="../assets/images/service.png" /> | |||||
<image class="itemLogo" src="../assets/images/service1.png" /> | |||||
</view> | </view> | ||||
<view class="fuwuName f">在线客服</view> | <view class="fuwuName f">在线客服</view> | ||||
</button> | </button> | ||||
<navigator class="fuwuItem" url="/pages/mallInfo/mallInfo" hover-class="navigator-hover" open-type="navigate"> | |||||
<navigator class="fuwuItem" url="/pages/certification/certification" hover-class="navigator-hover" open-type="navigate"> | |||||
<view class="fuwuLogoBox f" > | <view class="fuwuLogoBox f" > | ||||
<image class="itemLogo" src="../assets/images/aptitude.png" /> | |||||
<image class="itemLogo" src="../assets/images/aptitude1.png" /> | |||||
</view> | </view> | ||||
<view class="fuwuName f">服务资质</view> | <view class="fuwuName f">服务资质</view> | ||||
</navigator> | </navigator> | ||||
@@ -1,10 +1,36 @@ | |||||
/* d:\fumaolianke\ttFmC\tt富茂C\pages\user\user.ttss */ | /* d:\fumaolianke\ttFmC\tt富茂C\pages\user\user.ttss */ | ||||
.BoxBg{ | |||||
/* background-image: url("https://formall.oss-accelerate.aliyuncs.com/douyin_ifomall/imgData/userBg.png"); */ | |||||
/* background-size: 100% auto; */ | |||||
/* background-repeat: no-repeat; */ | |||||
/* transform: rotate(16deg); */ | |||||
/* background: #F1F6F7 */ | |||||
position: relative; | |||||
background-color: #e6e6e6; | |||||
} | |||||
.bgImgTop{ | |||||
width: 100%; | |||||
height: 380rpx; | |||||
transform: rotate(16deg); | |||||
position: absolute; | |||||
top: 260rpx; | |||||
left: 0; | |||||
z-index: 1; | |||||
} | |||||
.userBg{ | .userBg{ | ||||
width: 100%; | width: 100%; | ||||
height: 200rpx; | height: 200rpx; | ||||
background:linear-gradient(180deg,rgba(253,131,45,1) 0%,rgba(254,74,22,1) 100%); | |||||
/* background:linear-gradient(180deg,rgba(253,131,45,1) 0%,rgba(254,74,22,1) 100%); */ | |||||
position: relative; | position: relative; | ||||
} | } | ||||
.userBg1{ | |||||
width: 100%; | |||||
height: 200rpx; | |||||
/* background-image: url("/assets/imgData/userBg.png"); */ | |||||
position: relative; | |||||
z-index: 1000; | |||||
} | |||||
button::after { | button::after { | ||||
border: none; | border: none; | ||||
} | } | ||||
@@ -25,6 +51,7 @@ button { | |||||
width: 100rpx; | width: 100rpx; | ||||
background-color: aliceblue; | background-color: aliceblue; | ||||
border-radius: 50%; | border-radius: 50%; | ||||
border: 2rpx solid #A2B9BE; | |||||
} | } | ||||
.userLogo open-data{ | .userLogo open-data{ | ||||
display: block; | display: block; | ||||
@@ -48,7 +75,8 @@ button { | |||||
top: 40rpx; | top: 40rpx; | ||||
left: 180rpx; | left: 180rpx; | ||||
font-size: 26rpx; | font-size: 26rpx; | ||||
color: #ffffff; | |||||
margin-top: 10rpx; | |||||
/* color: #ffffff; */ | |||||
} | } | ||||
.noInfo{ | .noInfo{ | ||||
@@ -61,6 +89,11 @@ button { | |||||
display:-webkit-box; | display:-webkit-box; | ||||
-webkit-box-orient:vertical; | -webkit-box-orient:vertical; | ||||
-webkit-line-clamp:1; | -webkit-line-clamp:1; | ||||
color: #02201c; | |||||
font-family: "PingFangSC-Medium"; | |||||
font-size: 36rpx; | |||||
font-weight: 400; | |||||
text-transform: uppercase; | |||||
} | } | ||||
.info{ | .info{ | ||||
border: 1rpx #ffffff solid; | border: 1rpx #ffffff solid; | ||||
@@ -68,7 +101,21 @@ button { | |||||
padding: 0 10rpx; | padding: 0 10rpx; | ||||
margin-top: 10rpx; | margin-top: 10rpx; | ||||
margin-left: 20rpx; | margin-left: 20rpx; | ||||
width: 130rpx; | |||||
text-align: center; | |||||
/* width: 130rpx; */ | |||||
} | |||||
.infoX{ | |||||
/* border: 1rpx #ffffff solid; */ | |||||
border-radius: 50rpx; | |||||
padding: 0 10rpx; | |||||
margin-top: 10rpx; | |||||
margin-left: 10rpx; | |||||
color: #02201c; | |||||
font-family: "PingFangSC-Regular"; | |||||
font-size: 26rpx; | |||||
font-weight: 400; | |||||
text-transform: uppercase; | |||||
/* text-align: center; */ | |||||
} | } | ||||
.userName{ | .userName{ | ||||
position: absolute; | position: absolute; | ||||
@@ -87,11 +134,14 @@ button { | |||||
width: 680rpx; | width: 680rpx; | ||||
height: 160rpx; | height: 160rpx; | ||||
left: 5%; | left: 5%; | ||||
top: -23%; | |||||
background-color: #ffffff; | |||||
/* top: -23%; */ | |||||
top: -14%; | |||||
/* background-color: #ffffff; */ | |||||
border-radius: 10rpx; | border-radius: 10rpx; | ||||
display: flex; | display: flex; | ||||
justify-content:space-around; | justify-content:space-around; | ||||
/* overflow: hidden; */ | |||||
z-index: 100; | |||||
} | } | ||||
.itemBox{ | .itemBox{ | ||||
width:30% ; | width:30% ; | ||||
@@ -120,8 +170,13 @@ button { | |||||
overflow: hidden; | overflow: hidden; | ||||
} | } | ||||
.fuwu{ | .fuwu{ | ||||
font-size: 28rpx; | |||||
margin: 20rpx; | |||||
/* font-size: 28rpx; */ | |||||
margin: 20rpx 0 20rpx 40rpx ; | |||||
color: #5d3a19; | |||||
font-family: "PingFangSC-Medium"; | |||||
font-size: 32rpx; | |||||
font-weight: 400; | |||||
} | } | ||||
.fuwuItemBox{ | .fuwuItemBox{ | ||||
/* display: flex; */ | /* display: flex; */ | ||||
@@ -1,5 +1,5 @@ | |||||
let config = require("../../config/config.js"); | let config = require("../../config/config.js"); | ||||
const navigationBarHeight = (getApp().statusBarHeight + 44) + 'px' | |||||
const navigationBarHeight = (getApp().statusBarHeight + 50) + 'px' | |||||
let app = getApp(); | let app = getApp(); | ||||
const Http = require("../../utils/HttpBasics"); | const Http = require("../../utils/HttpBasics"); | ||||
const util = require("../../utils/util"); | const util = require("../../utils/util"); | ||||
@@ -32,13 +32,27 @@ | |||||
<view class="coupons1-img" style="{{mouldType==1?'height: 344rpx;':''}}"> | <view class="coupons1-img" style="{{mouldType==1?'height: 344rpx;':''}}"> | ||||
<image src="{{item.coverImg}}"></image> | <image src="{{item.coverImg}}"></image> | ||||
</view> | </view> | ||||
<view class="coupons1-info"> | |||||
<view class="coupons1-info" tt:if="{{mouldType!=1}}"> | |||||
<view class="coupons1-info-name tit">{{item.title}}</view> | <view class="coupons1-info-name tit">{{item.title}}</view> | ||||
<view class="coupons1-info-name subtitle">{{item.subTitle}}</view> | <view class="coupons1-info-name subtitle">{{item.subTitle}}</view> | ||||
<view class="coupons1-info-price-p"> | <view class="coupons1-info-price-p"> | ||||
<text class="i">¥</text>{{item.salePriceStr}} | |||||
<text class="i">¥</text>{{item.salePriceStr}} | |||||
<view class="coupons-info-manjian" style="margin-top:10rpx;font-size:28rpx;" tt:if="{{item.type == 1}}"> | <view class="coupons-info-manjian" style="margin-top:10rpx;font-size:28rpx;" tt:if="{{item.type == 1}}"> | ||||
满¥{{item.usePriceStr}}可用 | |||||
满¥{{item.usePriceStr}}可用 | |||||
</view> | |||||
<view class="coupons-info-manjian" style="font-size:28rpx;" tt:if="{{item.type == 2||item.type == 3||item.type==4||item.type==5||item.type==6||item.type==7}}"> | |||||
仅限本店使用 | |||||
</view> | |||||
</view> | |||||
</view> | |||||
<view class="coupons1-info" tt:if="{{mouldType==1}}"> | |||||
<view class="coupons1-info-name tit">{{item.title}}</view> | |||||
<view class="coupons1-info-name subtitle">{{item.subTitle}}</view> | |||||
<view class="coupons1-info-price-pX"> | |||||
<text class="i">¥</text>{{item.salePriceStr}} | |||||
<view class="coupons-info-manjian" style="margin-top:10rpx;font-size:28rpx;" tt:if="{{item.type == 1}}"> | |||||
满¥{{item.usePriceStr}}可用 | |||||
</view> | </view> | ||||
<view class="coupons-info-manjian" style="font-size:28rpx;" tt:if="{{item.type == 2||item.type == 3||item.type==4||item.type==5||item.type==6||item.type==7}}"> | <view class="coupons-info-manjian" style="font-size:28rpx;" tt:if="{{item.type == 2||item.type == 3||item.type==4||item.type==5||item.type==6||item.type==7}}"> | ||||
仅限本店使用 | 仅限本店使用 | ||||
@@ -49,8 +63,10 @@ | |||||
<view class="coupons1-btn"> | <view class="coupons1-btn"> | ||||
<!-- 优惠券价格 --> | <!-- 优惠券价格 --> | ||||
<i-button class="buy" hover-class='active' tt:if="{{item.salePriceStr==0}}" data-date='{{data}}'>免费领</i-button> | |||||
<i-button class="buy" hover-class='active' tt:elif="{{item.salePriceStr!=0}}" data-date='{{data}}'>马上购</i-button> | |||||
<i-button class="{{mouldType!=1?'buy':'buyX'}}" hover-class='active' tt:if="{{item.salePriceStr==0}}" data-date='{{data}}'>免费领</i-button> | |||||
<i-button class="{{mouldType!=1?'buy':'buyX'}}" hover-class='active' tt:elif="{{item.salePriceStr!=0}}" data-date='{{data}}'>马上购</i-button> | |||||
</view> | </view> | ||||
<!-- <view class="coupons1-border"></view> --> | <!-- <view class="coupons1-border"></view> --> | ||||
</view> | </view> | ||||
@@ -330,6 +330,18 @@ navigator:nth-of-type(2n+1) { | |||||
line-height: 48rpx; | line-height: 48rpx; | ||||
text-align: center; | text-align: center; | ||||
} | } | ||||
.buyX{ | |||||
display: block; | |||||
background: linear-gradient(90deg, #E3BA79, #BC8D3E); | |||||
border-radius: 30rpx; | |||||
height: 48rpx; | |||||
width: 112rpx; | |||||
margin: 0 auto; | |||||
color: #fff; | |||||
font-size: 26rpx; | |||||
line-height: 48rpx; | |||||
text-align: center; | |||||
} | |||||
.coupons1-btn-gm { | .coupons1-btn-gm { | ||||
background: #00c0ff !important; | background: #00c0ff !important; | ||||
@@ -397,7 +409,13 @@ navigator:nth-of-type(2n+1) { | |||||
line-height: 50rpx; | line-height: 50rpx; | ||||
/* margin-top: 21rpx; */ | /* margin-top: 21rpx; */ | ||||
} | } | ||||
.coupons1-info-price-pX{ | |||||
display: inline-block; | |||||
font-size: 36rpx; | |||||
color: #D5AF67; | |||||
line-height: 50rpx; | |||||
margin-top: 21rpx; | |||||
} | |||||
.tit { | .tit { | ||||
font-size: 30rpx; | font-size: 30rpx; | ||||
color: #000; | color: #000; | ||||
@@ -0,0 +1,36 @@ | |||||
const app = getApp() | |||||
const navigationBarHeight = (getApp().statusBarHeight + 50) + "px"; | |||||
const config = require("../../config/config"); | |||||
const util = require("../../utils/util.js"); | |||||
const Http = require("../../utils/HttpBasics"); | |||||
Page({ | |||||
data: { | |||||
navigationBarHeight, | |||||
businessLicense: "", | |||||
icp: "", | |||||
}, | |||||
getCertification() { | |||||
Http.get({ | |||||
url: config.api.getAppIcp, | |||||
data: { | |||||
appId:app.globalData.appId | |||||
}, | |||||
}).then(res => { | |||||
console.log(res.data); | |||||
this.setData({ | |||||
businessLicense: res.data.businessLicense, | |||||
icp: res.data.icp, | |||||
}) | |||||
}).catch(err => { | |||||
tt.showToast({ | |||||
title: err.message, | |||||
icon: 'none', | |||||
duration: 2000, | |||||
mask: false | |||||
}) | |||||
}) | |||||
},//获取服务资质 | |||||
onLoad: function (options) { | |||||
this.getCertification() | |||||
} | |||||
}) |
@@ -1,5 +1,5 @@ | |||||
{ | { | ||||
"navigationBarTitleText": "我的券包", | |||||
"navigationBarTitleText": "服务资质", | |||||
"usingComponents": { | "usingComponents": { | ||||
"navbar": "../../components/navbar/navbar" | "navbar": "../../components/navbar/navbar" | ||||
} | } |
@@ -0,0 +1,8 @@ | |||||
<view class="BoxBg"> | |||||
<navbar back home text="服务资质" background='#fff' color="#000"></navbar> | |||||
<view style="height:{{navigationBarHeight}} "></view> | |||||
<image src="{{businessLicense}}" class="img1"> | |||||
</image> | |||||
<image src="{{icp}}" class="img1"> | |||||
</image> | |||||
</view> |
@@ -0,0 +1,6 @@ | |||||
/* d:\fumaolianke\ttFmC\TTC\pages\certification\certification.ttss */ | |||||
.img1{ | |||||
width: 96%; | |||||
display: block; | |||||
margin: 20rpx auto; | |||||
} |
@@ -1,4 +1,4 @@ | |||||
const navigationBarHeight = (getApp().statusBarHeight + 44) + "px" | |||||
const navigationBarHeight = (getApp().statusBarHeight + 50) + "px" | |||||
const Http = require("../../utils/HttpBasics"); | const Http = require("../../utils/HttpBasics"); | ||||
var config = require("../../config/config.js"); | var config = require("../../config/config.js"); | ||||
var app = getApp(); | var app = getApp(); | ||||
@@ -1,4 +1,4 @@ | |||||
const navigationBarHeight = (getApp().statusBarHeight + 44) + 'px' | |||||
const navigationBarHeight = (getApp().statusBarHeight + 50) + 'px' | |||||
var config = require("../../../config/config.js"); | var config = require("../../../config/config.js"); | ||||
var app = getApp(); | var app = getApp(); | ||||
const Http = require("../../../utils/HttpBasics"); | const Http = require("../../../utils/HttpBasics"); | ||||
@@ -6,6 +6,7 @@ const util = require("../../../utils/util"); | |||||
const imgurl = require("../../../utils/imgurl"); | const imgurl = require("../../../utils/imgurl"); | ||||
Page({ | Page({ | ||||
data: { | data: { | ||||
priceAndStockObj:{},//存放价格和库存 | |||||
isGetUser: true,//判断是否授权抖音 | isGetUser: true,//判断是否授权抖音 | ||||
mouldType: 0, | mouldType: 0, | ||||
navigationBarHeight, | navigationBarHeight, | ||||
@@ -45,7 +46,7 @@ Page({ | |||||
tempFilePaths: null, | tempFilePaths: null, | ||||
userInfo: {}, | userInfo: {}, | ||||
hasUserInfo: false, | hasUserInfo: false, | ||||
canIUse: tt.canIUse('button.open-type.getUserInfo'), | |||||
// canIUse: tt.canIUse('button.open-type.getUserInfo'), | |||||
id: null, | id: null, | ||||
result: [], | result: [], | ||||
end_time: null, | end_time: null, | ||||
@@ -94,7 +95,9 @@ Page({ | |||||
page: 1,//查询商户优惠券page | page: 1,//查询商户优惠券page | ||||
idList: [], | idList: [], | ||||
showBox: false,//手机号授权框 | showBox: false,//手机号授权框 | ||||
spuIdObj:{} | |||||
}, | }, | ||||
/** | /** | ||||
* 显示分享弹框 | * 显示分享弹框 | ||||
*/ | */ | ||||
@@ -103,7 +106,7 @@ Page({ | |||||
isshowposter: true, | isshowposter: true, | ||||
}) | }) | ||||
}, | }, | ||||
getCouponList: function (id) { | |||||
getCouponList: function (id) { //获取其他活动 | |||||
let that = this; | let that = this; | ||||
let data; | let data; | ||||
data = { | data = { | ||||
@@ -416,159 +419,17 @@ Page({ | |||||
let that = this; | let that = this; | ||||
app.globalData.previewFlag = true | app.globalData.previewFlag = true | ||||
/* 判断是否授权*/ | /* 判断是否授权*/ | ||||
if (!that.data.isGetUser) { | |||||
tt.getUserProfile({//授权抖音 | |||||
success(res) { | |||||
Http.post({ | |||||
url: config.api.getUserInfo, | |||||
data: { | |||||
encryptedData: res.encryptedData, | |||||
iv: res.iv | |||||
} | |||||
}).then(res => { | |||||
Http.get({ | |||||
url: config.api.checkPhoneStatus, | |||||
data: {} | |||||
}).then(res => { | |||||
tt.showLoading(); | |||||
if (e.currentTarget.dataset.type == 51 || e.currentTarget.dataset.type == 50) { | |||||
tt.navigateTo({ | |||||
url: '/pages/integralmall/payIntegcoupondetail/index?couponChannelId=' + that.data.couponChannelId + '&couponId=' + that.data.couponId, | |||||
}) | |||||
} else { | |||||
let formId = e.detail.formId ? e.detail.formId : ""; | |||||
var discount = e.currentTarget.dataset.discount; | |||||
that.setData({ | |||||
queueData: null, | |||||
showbutton: true, | |||||
formId: formId | |||||
}) | |||||
Http.get({ | |||||
url: config.api.getQuestion, | |||||
data: { | |||||
couponType: JSON.stringify(that.data.data.type) | |||||
} | |||||
}).then(res => { | |||||
tt.hideLoading(); | |||||
if (res.data == undefined) { | |||||
// 立即购买 | |||||
that.orderFunc(discount); | |||||
that.setData({ | |||||
flag: false | |||||
}) | |||||
} else if (res.data) { | |||||
var animation = tt.createAnimation({}); | |||||
animation.translate((that.data.widthScreen - that.data.widthScreen), 0).scale(1).opacity(1).step({ | |||||
duration: 500 | |||||
}) | |||||
that.setData({ | |||||
queueData: animation.export(), | |||||
zIndex: 9, | |||||
opacity: 1, | |||||
display: "block", | |||||
questionnaire: JSON.parse(res.data.content), | |||||
questionId: res.data.id | |||||
}); | |||||
} | |||||
}).catch(err => { | |||||
tt.hideLoading(); | |||||
tt.showToast({ | |||||
title: err.message, | |||||
icon: 'none', | |||||
duration: 2000, | |||||
mask: false | |||||
}); | |||||
}) | |||||
} | |||||
}).catch(err => { | |||||
that.setData({ | |||||
showBox: true | |||||
}) | |||||
// tt.navigateTo({ | |||||
// url: '/pages/getPhone/getPhone', | |||||
// }); | |||||
}) | |||||
}) | |||||
.catch(err => { | |||||
tt.showToast({ | |||||
title: err.message ? err.message : err.data, | |||||
icon: 'none', | |||||
duration: 2000, | |||||
mask: false | |||||
}); | |||||
}) | |||||
}, | |||||
fail(err) { | |||||
console.log(`getUserInfo 调用失败`, err); | |||||
Http.get({ | |||||
url: config.api.checkPhoneStatus, | |||||
data: {} | |||||
}).then(res => { | |||||
tt.showLoading(); | |||||
if (e.currentTarget.dataset.type == 51 || e.currentTarget.dataset.type == 50) { | |||||
tt.navigateTo({ | |||||
url: '/pages/integralmall/payIntegcoupondetail/index?couponChannelId=' + that.data.couponChannelId + '&couponId=' + that.data.couponId, | |||||
}) | |||||
} else { | |||||
let formId = e.detail.formId ? e.detail.formId : ""; | |||||
var discount = e.currentTarget.dataset.discount; | |||||
that.setData({ | |||||
queueData: null, | |||||
showbutton: true, | |||||
formId: formId | |||||
}) | |||||
Http.get({ | |||||
url: config.api.getQuestion, | |||||
data: { | |||||
couponType: JSON.stringify(that.data.data.type) | |||||
} | |||||
}).then(res => { | |||||
tt.hideLoading(); | |||||
if (res.data == undefined) { | |||||
// 立即购买 | |||||
that.orderFunc(discount); | |||||
that.setData({ | |||||
flag: false | |||||
}) | |||||
} else if (res.data) { | |||||
var animation = tt.createAnimation({}); | |||||
animation.translate((that.data.widthScreen - that.data.widthScreen), 0).scale(1).opacity(1).step({ | |||||
duration: 500 | |||||
}) | |||||
that.setData({ | |||||
queueData: animation.export(), | |||||
zIndex: 9, | |||||
opacity: 1, | |||||
display: "block", | |||||
questionnaire: JSON.parse(res.data.content), | |||||
questionId: res.data.id | |||||
}); | |||||
} | |||||
}) | |||||
.catch(err => { | |||||
tt.hideLoading(); | |||||
tt.showToast({ | |||||
title: err.message, | |||||
icon: 'none', | |||||
duration: 2000, | |||||
mask: false | |||||
}); | |||||
}) | |||||
} | |||||
}).catch(err => { | |||||
that.setData({ | |||||
showBox: true | |||||
}) | |||||
}) | |||||
}, | |||||
}); | |||||
} else { | |||||
Http.get({ | |||||
url: config.api.checkUserStatus, | |||||
data: { | |||||
token: app.globalData.token | |||||
} | |||||
}).then(res => { | |||||
Http.get({ | Http.get({ | ||||
url: config.api.checkPhoneStatus, | url: config.api.checkPhoneStatus, | ||||
data: {} | |||||
}).then(res => { | }).then(res => { | ||||
if (e.currentTarget.dataset.type == 51 || e.currentTarget.dataset.type == 50) { | |||||
tt.showLoading(); | |||||
if (e.currentTarget.dataset.type == 51 || e.currentTarget.dataset.type == 50) { | |||||
tt.navigateTo({ | tt.navigateTo({ | ||||
url: '/pages/integralmall/payIntegcoupondetail/index?couponChannelId=' + that.data.couponChannelId + '&couponId=' + that.data.couponId, | url: '/pages/integralmall/payIntegcoupondetail/index?couponChannelId=' + that.data.couponChannelId + '&couponId=' + that.data.couponId, | ||||
}) | }) | ||||
@@ -607,27 +468,43 @@ Page({ | |||||
questionId: res.data.id | questionId: res.data.id | ||||
}); | }); | ||||
} | } | ||||
}).catch(err => { | |||||
tt.hideLoading(); | |||||
tt.showToast({ | |||||
title: err.message, | |||||
icon: 'none', | |||||
duration: 2000, | |||||
mask: false | |||||
}); | |||||
}) | }) | ||||
.catch(err => { | |||||
tt.hideLoading(); | |||||
tt.showToast({ | |||||
title: err.message, | |||||
icon: 'none', | |||||
duration: 2000, | |||||
mask: false | |||||
}); | |||||
}) | |||||
} | } | ||||
}).catch(err => { | }).catch(err => { | ||||
that.setData({ | |||||
showBox: true | |||||
}) | |||||
// tt.navigateTo({ | |||||
// url: '/pages/getPhone/getPhone', | |||||
// }); | |||||
app.globalData.type = '' | |||||
app.globalData.skipUrl="" | |||||
app.globalData.skip = 'navigateBack' | |||||
if(app.globalData.ifCongPh==1){ | |||||
tt.navigateTo({ | |||||
url: '/pages/getPhone/getPhone?skipUrl=1', | |||||
}); | |||||
}else{ | |||||
this.setData({ | |||||
showBox: true | |||||
}) | |||||
} | |||||
}) | }) | ||||
} | |||||
}).catch(err => { | |||||
app.globalData.type = '' | |||||
if (err.code == 11004) {//未授权抖音 | |||||
tt.navigateTo({ | |||||
url: `/pages/getuserinfo/getuserinfo?fromflag=coupondetail&couponChannelIdflag=${this.data.couponChannelId}`, | |||||
}); | |||||
} | |||||
}) | |||||
}, | }, | ||||
setIntervalTime(end_time) { | setIntervalTime(end_time) { | ||||
@@ -713,6 +590,7 @@ Page({ | |||||
that.getDetail(options.couponIds, 'notendclock'); | that.getDetail(options.couponIds, 'notendclock'); | ||||
} else { | } else { | ||||
that.getDetail(options.couponChannelId, 'notendclock'); | that.getDetail(options.couponChannelId, 'notendclock'); | ||||
that.getSupId(options.couponChannelId) | |||||
} | } | ||||
@@ -754,32 +632,80 @@ Page({ | |||||
} | } | ||||
}) | }) | ||||
}, | }, | ||||
getSupId(id){ | |||||
Http.get({ | |||||
url:config.api.getSpuid, | |||||
data:{id:id} | |||||
}).then(res=>{ | |||||
if(res.data){ | |||||
this.setData({ | |||||
spuIdObj:res.data | |||||
}) | |||||
} | |||||
}).catch(err=>{ | |||||
// tt.showToast({ | |||||
// title: err.message, | |||||
// icon: 'none', | |||||
// duration: 2000, | |||||
// mask: false | |||||
// }); | |||||
}) | |||||
}, | |||||
getCouponPriceAndStock(couponChannelId){//获取券价格与库存 | |||||
Http.get({ | |||||
url:config.api.couponPriceAndStock, | |||||
data:{ | |||||
couponChannelId | |||||
} | |||||
}).then(res=>{ | |||||
let tempBoj = JSON.parse(res.data) | |||||
console.log(tempBoj,"$"); | |||||
this.setData({ | |||||
priceAndStockObj:tempBoj | |||||
}) | |||||
}) | |||||
}, | |||||
getCouponMerchant(couponChannelId){//获取适用门店 | |||||
Http.get({ | |||||
url:config.api.couponMerchant, | |||||
data:{ | |||||
couponChannelId:couponChannelId | |||||
} | |||||
}).then(res=>{ | |||||
if (res.data && res.data.length) { | |||||
let merchantVoList = res.data | |||||
let idList = [] | |||||
merchantVoList.map(item => { | |||||
idList.push(item.id) | |||||
}) | |||||
this.setData({ | |||||
idList: idList | |||||
}) | |||||
this.getCouponList(idList) //获取推荐列表 | |||||
} | |||||
this.setData({ | |||||
merchantVoList: res.data | |||||
}) | |||||
}) | |||||
}, | |||||
getDetail: function (couponChannelId, flag) { | getDetail: function (couponChannelId, flag) { | ||||
let that = this; | let that = this; | ||||
let data = {}; | let data = {}; | ||||
that.getCouponMerchant(couponChannelId);//获取适用门店 | |||||
that.getCouponPriceAndStock(couponChannelId);//获取券价格和库存 | |||||
if (that.data.couponIds) { | if (that.data.couponIds) { | ||||
data.couponId = couponChannelId | data.couponId = couponChannelId | ||||
} else { | } else { | ||||
data.couponChannelId = couponChannelId | data.couponChannelId = couponChannelId | ||||
} | } | ||||
var parmer = { | var parmer = { | ||||
url: config.api.couponDetail, | |||||
url: config.api.newCouponDetail, | |||||
data: data | data: data | ||||
}; | |||||
}; | |||||
Http.get(parmer) | Http.get(parmer) | ||||
.then(res => { | .then(res => { | ||||
if (res.data.merchantVoList && res.data.merchantVoList.length) { | |||||
let merchantVoList = res.data.merchantVoList | |||||
let idList = [] | |||||
merchantVoList.map(item => { | |||||
idList.push(item.id) | |||||
}) | |||||
that.setData({ | |||||
idList: idList | |||||
}) | |||||
that.getCouponList(idList) | |||||
} | |||||
//aaa | //aaa | ||||
if (res.data.contentType != undefined && res.data.contentType == 1) { | if (res.data.contentType != undefined && res.data.contentType == 1) { | ||||
//获取图文展示详情html | //获取图文展示详情html | ||||
@@ -841,16 +767,16 @@ Page({ | |||||
that.setData({ | that.setData({ | ||||
begin_time: res.data.beginTime, | begin_time: res.data.beginTime, | ||||
end_time: res.data.endTime, | end_time: res.data.endTime, | ||||
activityStatus: res.data.activityStatus ? res.data.activityStatus : '' | |||||
activityStatus: res.data.actStatus ? res.data.actStatus : '' | |||||
}) | }) | ||||
if (res.data.activityStatus == 0 && flag != 'endclock') { | |||||
if (res.data.actStatus == 0 && flag != 'endclock') { | |||||
that.countdown(res.data.beginTime); | that.countdown(res.data.beginTime); | ||||
} else if (res.data.activityStatus != 0 && flag != 'endclock') { | |||||
} else if (res.data.actStatus != 0 && flag != 'endclock') { | |||||
that.countdown(res.data.endTime); | that.countdown(res.data.endTime); | ||||
} else { | } else { | ||||
clearInterval(that.data.setInterval) | clearInterval(that.data.setInterval) | ||||
} | } | ||||
if (res.data.activityStatus == 0) { | |||||
if (res.data.actStatus == 0) { | |||||
var beginTime = util.formatTime(res.data.beginTime, "yyyy-MM-dd hh:mm:ss"); | var beginTime = util.formatTime(res.data.beginTime, "yyyy-MM-dd hh:mm:ss"); | ||||
if (util.timechuo(beginTime).indexOf('-') == 0) { | if (util.timechuo(beginTime).indexOf('-') == 0) { | ||||
that.setData({ | that.setData({ | ||||
@@ -877,7 +803,6 @@ Page({ | |||||
tt.hideLoading(); | tt.hideLoading(); | ||||
that.setData({ | that.setData({ | ||||
data: res.data, | data: res.data, | ||||
merchantVoList: res.data.merchantVoList | |||||
}); | }); | ||||
if (res.data.type == 10) { | if (res.data.type == 10) { | ||||
that.setData({ | that.setData({ | ||||
@@ -903,6 +828,16 @@ Page({ | |||||
}); | }); | ||||
} | } | ||||
} | } | ||||
if(res.data.itemGroup){ | |||||
let tempObj = this.data.data | |||||
tempObj.itemGroup = JSON.parse(tempObj.itemGroup) | |||||
this.setData({ | |||||
data:tempObj | |||||
}) | |||||
console.log(this.data.data,"data"); | |||||
} | |||||
}).catch(err => { | }).catch(err => { | ||||
tt.showToast({ | tt.showToast({ | ||||
title: err.message, | title: err.message, | ||||
@@ -996,7 +931,7 @@ Page({ | |||||
}); | }); | ||||
} | } | ||||
}) | }) | ||||
}, | |||||
}, | |||||
// 券包支付 | // 券包支付 | ||||
/** | /** | ||||
@@ -1013,8 +948,7 @@ Page({ | |||||
Http.get({ | Http.get({ | ||||
url: config.api.checkPhoneStatus, | url: config.api.checkPhoneStatus, | ||||
data: {} | data: {} | ||||
}) | |||||
.then(res => { | |||||
}).then(res => { | |||||
// 发起砍价 | // 发起砍价 | ||||
if (discount == 'discount') { | if (discount == 'discount') { | ||||
var data = { | var data = { | ||||
@@ -1174,101 +1108,101 @@ Page({ | |||||
composeOrderType: res.data.composeOrderType | composeOrderType: res.data.composeOrderType | ||||
} | } | ||||
}).then(res => { | }).then(res => { | ||||
var payOrderId = "" + res.data.outOrderNo; | |||||
tt.hideLoading(); | |||||
tt.pay({ | |||||
service: 5, | |||||
orderInfo: { | |||||
order_id: res.data.orderId, | |||||
order_token: res.data.token, | |||||
}, | |||||
success: res => { | |||||
tt.showLoading({ | |||||
title: '订单正在处理中...', | |||||
}) | |||||
if (res.code === 0) { | |||||
that.payOrderUpdate(that.data.orderId, payOrderId, 1, '', '', that, that.data.composeOrderType); | |||||
if (res.errMsg == "requestPayment:ok") { | |||||
/** | |||||
* 用户支付成功以后跳转到券包列表 | |||||
*/ | |||||
if (that.data.cardType == 100) { | |||||
tt.setStorage({ | |||||
key: 'couponNum2', | |||||
data: "couponNum2" | |||||
}) | |||||
} else if (that.data.data.type != 5 && that.data.cardType != 100) { | |||||
tt.setStorage({ | |||||
key: 'couponNum', | |||||
data: "couponNum" | |||||
}) | |||||
} | |||||
var payOrderId = "" + res.data.outOrderNo; | |||||
tt.hideLoading(); | |||||
tt.pay({ | |||||
service: 5, | |||||
orderInfo: { | |||||
order_id: res.data.orderId, | |||||
order_token: res.data.token, | |||||
}, | |||||
success: res => { | |||||
tt.showLoading({ | |||||
title: '订单正在处理中...', | |||||
}) | |||||
if (res.code === 0) { | |||||
that.payOrderUpdate(that.data.orderId, payOrderId, 1, '', '', that, that.data.composeOrderType); | |||||
if (res.errMsg == "requestPayment:ok") { | |||||
/** | |||||
* 用户支付成功以后跳转到券包列表 | |||||
*/ | |||||
if (that.data.cardType == 100) { | |||||
tt.setStorage({ | |||||
key: 'couponNum2', | |||||
data: "couponNum2" | |||||
}) | |||||
} else if (that.data.data.type != 5 && that.data.cardType != 100) { | |||||
tt.setStorage({ | |||||
key: 'couponNum', | |||||
data: "couponNum" | |||||
}) | |||||
} | } | ||||
} | } | ||||
else if (res.code === 1) { | |||||
that.setData({ | |||||
showbutton: false | |||||
}) | |||||
tt.hideLoading(); | |||||
tt.showToast({ | |||||
title: '支付超时', // 内容 | |||||
icon: "none" | |||||
}); | |||||
} else if (res.code === 2) { | |||||
that.setData({ | |||||
showbutton: false | |||||
}) | |||||
tt.hideLoading(); | |||||
tt.showToast({ | |||||
title: '支付失败', // 内容 | |||||
icon: "none" | |||||
}); | |||||
} else if (res.code === 3) { | |||||
that.setData({ | |||||
showbutton: false | |||||
}) | |||||
tt.hideLoading(); | |||||
tt.showToast({ | |||||
title: '支付关闭', // 内容 | |||||
icon: "none" | |||||
}); | |||||
} else if (res.code === 4) { | |||||
that.setData({ | |||||
showbutton: false | |||||
}) | |||||
tt.hideLoading(); | |||||
tt.showToast({ | |||||
title: '支付取消', // 内容 | |||||
icon: "none" | |||||
}); | |||||
} else if (res.code === 9) { | |||||
that.setData({ | |||||
showbutton: false | |||||
}) | |||||
tt.hideLoading(); | |||||
tt.showToast({ | |||||
title: '订单状态开发者自行获取', // 内容 | |||||
icon: "none" | |||||
}); | |||||
} | |||||
} | |||||
else if (res.code === 1) { | |||||
that.setData({ | |||||
showbutton: false | |||||
}) | |||||
tt.hideLoading(); | |||||
tt.showToast({ | |||||
title: '支付超时', // 内容 | |||||
icon: "none" | |||||
}); | |||||
}, | |||||
fail: res => { | |||||
} else if (res.code === 2) { | |||||
that.setData({ | |||||
showbutton: false | |||||
}) | |||||
tt.hideLoading(); | tt.hideLoading(); | ||||
/** | |||||
* 支付失败,需要更新订单的状态 | |||||
*/ | |||||
that.payOrderUpdate(that.data.orderId, payOrderId, 2, '', 'fail', that, that.data.composeOrderType); | |||||
tt.showToast({ | |||||
title: '支付失败', // 内容 | |||||
icon: "none" | |||||
}); | |||||
} else if (res.code === 3) { | |||||
that.setData({ | that.setData({ | ||||
showbutton: false | showbutton: false | ||||
}) | }) | ||||
return; | |||||
}, | |||||
complete: res => { } | |||||
}); | |||||
/// End payment -------- | |||||
}) | |||||
tt.hideLoading(); | |||||
tt.showToast({ | |||||
title: '支付关闭', // 内容 | |||||
icon: "none" | |||||
}); | |||||
} else if (res.code === 4) { | |||||
that.setData({ | |||||
showbutton: false | |||||
}) | |||||
tt.hideLoading(); | |||||
tt.showToast({ | |||||
title: '支付取消', // 内容 | |||||
icon: "none" | |||||
}); | |||||
} else if (res.code === 9) { | |||||
that.setData({ | |||||
showbutton: false | |||||
}) | |||||
tt.hideLoading(); | |||||
tt.showToast({ | |||||
title: '订单状态开发者自行获取', // 内容 | |||||
icon: "none" | |||||
}); | |||||
} | |||||
}, | |||||
fail: res => { | |||||
tt.hideLoading(); | |||||
/** | |||||
* 支付失败,需要更新订单的状态 | |||||
*/ | |||||
that.payOrderUpdate(that.data.orderId, payOrderId, 2, '', 'fail', that, that.data.composeOrderType); | |||||
that.setData({ | |||||
showbutton: false | |||||
}) | |||||
return; | |||||
}, | |||||
complete: res => { } | |||||
}); | |||||
/// End payment -------- | |||||
}) | |||||
.catch(err => { | .catch(err => { | ||||
tt.hideLoading(); | tt.hideLoading(); | ||||
tt.showToast({ | tt.showToast({ | ||||
@@ -1383,6 +1317,8 @@ Page({ | |||||
}) | }) | ||||
}) | }) | ||||
}, | }, | ||||
onShow() { | onShow() { | ||||
this.ifGetUser()//判断是否授权抖音 | this.ifGetUser()//判断是否授权抖音 | ||||
this.setData({ | this.setData({ | ||||
@@ -1419,34 +1355,53 @@ Page({ | |||||
} | } | ||||
}; | }; | ||||
// 来自页面内的按钮的转发 | // 来自页面内的按钮的转发 | ||||
if (options.from == 'button'&&options.channel != 'video') { | |||||
if (options.from == 'button' && options.channel != 'video') { | |||||
var eData = options.target.dataset.id; | var eData = options.target.dataset.id; | ||||
shareObj.path = `/pages/index/index?couponChannelId=${eData}&frommd=JC`; | shareObj.path = `/pages/index/index?couponChannelId=${eData}&frommd=JC`; | ||||
}else | |||||
if(options.channel == 'video'){ | |||||
} else | |||||
if (options.channel == 'video') { | |||||
// return { | // return { | ||||
// channel: 'video', // 必写 video | |||||
// templateId: '', // 分享的模版 id (如果未设置就是默认,下面会说如何设置) | |||||
// title: `${that.data.barTitle}`, // 分享的标题 | |||||
// desc: `${that.data.data.dyTitle}`, // 分享的内容介绍目前没有用 | |||||
// path: `/pages/index/index`, // 分享的路径 | |||||
// extra: { | |||||
// videoTopics: [ that.data.data.dyTitle] // 只有抖音才会有的属性 | |||||
// }, | |||||
// } | |||||
shareObj.channel = 'video'; | |||||
shareObj.title = `${that.data.barTitle}`; | |||||
shareObj.extra = { | |||||
videoTopics:["123"] | |||||
// channel: 'video', // 必写 video | |||||
// templateId: '', // 分享的模版 id (如果未设置就是默认,下面会说如何设置) | |||||
// title: `${that.data.barTitle}`, // 分享的标题 | |||||
// desc: `${that.data.data.dyTitle}`, // 分享的内容介绍目前没有用 | |||||
// path: `/pages/index/index`, // 分享的路径 | |||||
// extra: { | |||||
// videoTopics: [ that.data.data.dyTitle] // 只有抖音才会有的属性 | |||||
// }, | |||||
// } | |||||
shareObj.channel = 'video'; | |||||
shareObj.title = `${that.data.data.title}`; | |||||
shareObj.extra = { | |||||
spu_id: that.data.spuIdObj.spuId | |||||
} | |||||
} | } | ||||
} | |||||
console.log(shareObj) | console.log(shareObj) | ||||
// 返回shareObj | // 返回shareObj | ||||
return shareObj; | return shareObj; | ||||
}, | }, | ||||
// onShareAppMessage: function(e) { | |||||
// console.log("onShareAppMessage", e); | |||||
// return { | |||||
// channel: 'video', | |||||
// title: "测试小程序分享", | |||||
// desc: "这是默认的分享文案,用户可以直接发送,也可以在发布器内修改", | |||||
// extra: { | |||||
// spu_id:"7091460633887279111" //开发者在抖音开放平台设置的商品id | |||||
// }, | |||||
// success: function(e) { | |||||
// console.log("分享成功"); | |||||
// }, | |||||
// fail: function(e) { | |||||
// console.log(e,"分享成功失败") | |||||
// } | |||||
// }; | |||||
// }, | |||||
// 下拉刷新 | // 下拉刷新 | ||||
onPullDownRefresh: function () { | onPullDownRefresh: function () { | ||||
this.getDetail(this.data.couponChannelId); | this.getDetail(this.data.couponChannelId); | ||||
@@ -1,6 +1,6 @@ | |||||
<navbar back home text="{{barTitle}}" background='#fff'></navbar> | <navbar back home text="{{barTitle}}" background='#fff'></navbar> | ||||
<view tt:if="{{showPage}}"> | |||||
<view style="height:{{navigationBarHeight}} "></view> | |||||
<view tt:if="{{showPage}}" style="margin-top:{{navigationBarHeight}} "> | |||||
<!-- <view ></view> --> | |||||
<!-- 券的详情页面 --> | <!-- 券的详情页面 --> | ||||
<view class='coupons'> | <view class='coupons'> | ||||
<view class="coupons-body"> | <view class="coupons-body"> | ||||
@@ -48,17 +48,19 @@ | |||||
</view> | </view> | ||||
</view> | </view> | ||||
<text class='title'>{{data.title}}<text class="elecard" tt:if="{{data.type==100}}">电子卡</text></text> | <text class='title'>{{data.title}}<text class="elecard" tt:if="{{data.type==100}}">电子卡</text></text> | ||||
<text class="subTitle">{{data.subTitle}}</text> | |||||
<!-- 预购 --> | <!-- 预购 --> | ||||
<view class="moneyBox" tt:if="{{data.type==10}}"> | <view class="moneyBox" tt:if="{{data.type==10}}"> | ||||
<view class="earnest">定金:</view> | <view class="earnest">定金:</view> | ||||
<view class="earnestNum">¥ {{salePriceStr}}</view> | |||||
<view class="earnestNum">¥ {{salePriceStr}}</view> | |||||
<view class="final">尾款抵扣:</view> | <view class="final">尾款抵扣:</view> | ||||
<view class="earnestNum">¥ {{priceStr}}</view> | |||||
<view class="earnestNum">¥ {{priceStr}}</view> | |||||
</view> | </view> | ||||
<view class="pickFinal_Box" tt:if="{{data.type==10}}"> | <view class="pickFinal_Box" tt:if="{{data.type==10}}"> | ||||
<view class="earnest">提货尾款:</view> | <view class="earnest">提货尾款:</view> | ||||
<view class="earnestNum">¥ {{tailPriceStr}}</view> | |||||
<view class="earnestNum">¥ {{tailPriceStr}}</view> | |||||
<view class="original">{{origPriceStr}}</view> | <view class="original">{{origPriceStr}}</view> | ||||
</view> | </view> | ||||
<view class="earnestTime time" tt:if="{{data.type==10}}"> 预购时间:{{validStartDate}}至{{validEndDate}}</view> | <view class="earnestTime time" tt:if="{{data.type==10}}"> 预购时间:{{validStartDate}}至{{validEndDate}}</view> | ||||
@@ -67,33 +69,37 @@ | |||||
<!-- 预售 --> | <!-- 预售 --> | ||||
<view class='salePriceStr clearfix' tt:if="{{data.type!=10}}"> | <view class='salePriceStr clearfix' tt:if="{{data.type!=10}}"> | ||||
<text class='rmb'>¥</text> | |||||
<text class='rmb'>¥</text> | |||||
<view class="fl" tt:if="{{data.type!=8}}"> | <view class="fl" tt:if="{{data.type!=8}}"> | ||||
<text class="pri01" tt:if="{{data.type!=50&&data.type!=51}}">{{data.salePriceStr}}</text> | |||||
<view class="pri01" tt:if="{{data.type==50||data.type==51}}">{{data.creditPrice}} | |||||
<text class="pri01" tt:if="{{data.type!=50&&data.type!=51}}">{{priceAndStockObj.salePrice/100}}</text> | |||||
<view class="pri01" tt:if="{{data.type==50||data.type==51}}">{{priceAndStockObj.creditPrice}} | |||||
<text class='jifen'>积分</text> | <text class='jifen'>积分</text> | ||||
</view> | </view> | ||||
<!-- <text class="yuan" tt:if="{{data.type!=50&&data.type!=51}}">元</text> --> | |||||
<text class='throgh' tt:if="{{data.unit==0&&data.type!=50&&data.type!=51}}">{{data.priceStr}}元</text> | |||||
<text tt:if="{{data.unit==1&&data.type!=50&&data.type!=51}}">{{data.priceStr}}小时</text> | |||||
<text class='rest' tt:if="{{data.autoRefund == 1}}"> | |||||
<text class='throgh' tt:if="{{data.unit==0&&data.type!=50&&data.type!=51}}">{{priceAndStockObj.price/100}}元</text> | |||||
<text tt:if="{{data.unit==1&&data.type!=50&&data.type!=51}}">{{priceAndStockObj.price/100}}小时</text> | |||||
<!-- <text class='rest' tt:if="{{data.autoRefund == 1}}"> | |||||
<text class='time refound'><text class="use">过期不退款</text></text> | <text class='time refound'><text class="use">过期不退款</text></text> | ||||
</text> | |||||
</text> --> | |||||
</view> | </view> | ||||
<view class="fl" tt:if="{{data.type==8}}"> | <view class="fl" tt:if="{{data.type==8}}"> | ||||
<!-- <text class="pri01 pri01Hr">¥</text> --> | |||||
<text class="pri01">{{data.salePriceStr}}</text> | |||||
<text class="pri01">{{priceAndStockObj.salePrice/100}}</text> | |||||
<text class='presslimit' tt:if="{{data.type==8}}"><text>{{data.pressLimitNum+'人可砍至底价'}}</text></text> | <text class='presslimit' tt:if="{{data.type==8}}"><text>{{data.pressLimitNum+'人可砍至底价'}}</text></text> | ||||
<text class='throgh'>{{data.priceStr}}元</text> | |||||
<text class='rest' tt:if="{{data.autoRefund == 1}}"> | |||||
<text class='throgh'>{{priceAndStockObj.price/100}}元</text> | |||||
<!-- <text class='rest' tt:if="{{data.autoRefund == 1}}"> | |||||
<text class='time refound'><text class="use">过期不退款</text></text> | <text class='time refound'><text class="use">过期不退款</text></text> | ||||
</text> | |||||
</text> --> | |||||
</view> | </view> | ||||
</view> | </view> | ||||
<view class="subTitleBox"> | |||||
<text class="subTitle">{{data.subTitle}}</text> | |||||
<view class="sellBox"> {{'已售'+(priceAndStockObj.inventory-priceAndStockObj.remainInventory)+'|'+'库存'+priceAndStockObj.remainInventory}}</view> | |||||
</view> | |||||
<view class='rest' tt:if="{{data.validType==2}}">自领取之日起 | |||||
<!-- <view class='rest' tt:if="{{data.validType==2}}">自领取之日起 | |||||
<text class='time'>{{validDays}}</text>天内有效 | <text class='time'>{{validDays}}</text>天内有效 | ||||
<text class="use">(请在有效期内使用)</text> | <text class="use">(请在有效期内使用)</text> | ||||
</view> | </view> | ||||
@@ -102,14 +108,13 @@ | |||||
</view> | </view> | ||||
<view class='rest' tt:if="{{data.type==5}}"> | <view class='rest' tt:if="{{data.type==5}}"> | ||||
<text class='time'>当次有效</text> | <text class='time'>当次有效</text> | ||||
</view> | |||||
</view> --> | |||||
<view class='rest' tt:if="{{data.type==1}}"> | |||||
<!-- <view class='rest' tt:if="{{data.type==1}}"> | |||||
<text class='txt01'>使用条件:</text> | <text class='txt01'>使用条件:</text> | ||||
<text class='time'>满{{data.usePriceStr}}元可用</text> | <text class='time'>满{{data.usePriceStr}}元可用</text> | ||||
</view> | </view> | ||||
<view class='rest' tt:if="{{data.sendType!=3}}"> | |||||
<!-- <text class='txt01'>限购条件:</text> --> | |||||
<view class='rest' tt:if="{{data.sendType!=3&&mouldType!=1}}"> | |||||
<view class='quan'></view> | <view class='quan'></view> | ||||
<text class='time'>限购{{data.useLimitQuantity}}张</text> | <text class='time'>限购{{data.useLimitQuantity}}张</text> | ||||
<text class='timess' tt:if='{{limitCondition==1}}'>(仅限新用户活动)</text> | <text class='timess' tt:if='{{limitCondition==1}}'>(仅限新用户活动)</text> | ||||
@@ -117,11 +122,11 @@ | |||||
tt:if='{{limitCondition==2&&(minLimit||minLimit==0)&&maxLimit}}'>({{minLimit}}-{{maxLimit}}成长值)</text> | tt:if='{{limitCondition==2&&(minLimit||minLimit==0)&&maxLimit}}'>({{minLimit}}-{{maxLimit}}成长值)</text> | ||||
<text class='timess' tt:if='{{limitCondition==2&&minLimit&&!maxLimit}}'>(大于{{minLimit}}成长值)</text> | <text class='timess' tt:if='{{limitCondition==2&&minLimit&&!maxLimit}}'>(大于{{minLimit}}成长值)</text> | ||||
<text class="restNum fr">剩余<text>{{data.remainInventory}}张</text></text> | <text class="restNum fr">剩余<text>{{data.remainInventory}}张</text></text> | ||||
</view> | |||||
</view> --> | |||||
</view> | </view> | ||||
</view> | </view> | ||||
<!-- 适用门店 --> | <!-- 适用门店 --> | ||||
<store merchantVoList="{{merchantVoList}}" tt:if="{{data.type!=12}}"></store> | |||||
<!-- <store merchantVoList="{{merchantVoList}}" tt:if="{{data.type!=12}}"></store> --> | |||||
<!-- 券包子券样式 --> | <!-- 券包子券样式 --> | ||||
<!-- <view class="childText">购买须知</view> --> | <!-- <view class="childText">购买须知</view> --> | ||||
<view class="childBox"> | <view class="childBox"> | ||||
@@ -129,23 +134,45 @@ | |||||
tt:key="{{index}}"> | tt:key="{{index}}"> | ||||
<image class="childImg" mode='aspectFill' src="{{item.coverImg}}"></image> | <image class="childImg" mode='aspectFill' src="{{item.coverImg}}"></image> | ||||
<view class="childName">{{item.title}}</view> | <view class="childName">{{item.title}}</view> | ||||
<view class="childMoney">¥{{item.priceStr}}</view> | |||||
<view class="childMoney">¥{{item.priceStr}}</view> | |||||
</view> | </view> | ||||
</view> | </view> | ||||
<vieW class="groupTitleBox"> | |||||
<view class="groupTitle" tt:if="{{data.itemGroup.length>0}}">团购详情</view> | |||||
</vieW> | |||||
<view class="groupTextBox" tt:if="{{data.itemGroup.length>0}}" tt:for="{{data.itemGroup}}"> | |||||
<view class="groupTitleS">{{item.group_name}}</view> | |||||
<view class="groupDetailsBox" tt:for="{{item.item_list}}" tt:for-item="itemChi"> | |||||
<view class="groupTiemBox" > | |||||
<view class="yuandian"></view> | |||||
<view class="groupTiemName">{{itemChi.name}}({{itemChi.count}}份)</view> | |||||
<view class="groupTiemPay">¥{{itemChi.price/100}}</view> | |||||
</view> | |||||
</view> | |||||
</view> | |||||
<!-- 适用门店 --> | |||||
<store merchantVoList="{{merchantVoList}}" tt:if="{{data.type!=12}}"></store> | |||||
<view class='notes'> | <view class='notes'> | ||||
<view> | |||||
<text>购买须知</text> | |||||
</view> | |||||
<view tt:if="{{curHtml==''}}"> | |||||
<text><text class='spot'></text>{{data.remark}}</text> | |||||
</view> | |||||
<view class="notesH">购买须知</view> | |||||
<view class="timeText">有效期</view> | |||||
<view class="Hchild">{{validStartDate}}至{{validEndDate}}</view> | |||||
<view class="timeText">可用时间</view> | |||||
<view class="Hchild">•商家营业时间可用</view> | |||||
<view class="timeText">预约消费</view> | |||||
<view class="Hchild">• 不需预约,高峰时段可能需要排队</view> | |||||
<view class="Hchild">• 团购券不支持配送或外卖</view> | |||||
<view class="timeText">使用规则</view> | |||||
<text tt:if="{{curHtml==''}}" class="notesText">{{data.remark}}</text> | |||||
<view tt:if="{{curHtml!=''}}"> | <view tt:if="{{curHtml!=''}}"> | ||||
<rich-text nodes="{{curHtml}}"></rich-text> | <rich-text nodes="{{curHtml}}"></rich-text> | ||||
</view> | </view> | ||||
</view> | </view> | ||||
<view tt:if="{{couponList.length!=0}}" | <view tt:if="{{couponList.length!=0}}" | ||||
style="color: #333;letter-spacing: 0;font-size: 30rpx;height: 70rpx;line-height: 70rpx;margin-left: 35rpx;">其他活动 | |||||
style="color: #333;letter-spacing: 0;font-size: 30rpx;height: 70rpx;line-height: 70rpx;margin-left: 35rpx;font-weight: bold;">其他活动 | |||||
</view> | </view> | ||||
<view class='couponsL clearfix'> | <view class='couponsL clearfix'> | ||||
<c-coupons tt:if="{{couponList.length!=0}}" tt:for="{{couponList}}" from="fromMerchant" paramAtoB="{{loading}}" | <c-coupons tt:if="{{couponList.length!=0}}" tt:for="{{couponList}}" from="fromMerchant" paramAtoB="{{loading}}" | ||||
@@ -156,15 +183,15 @@ | |||||
</view> | </view> | ||||
</view> | </view> | ||||
<form data-type='{{data.type}}' report-submit='true'> | |||||
<form data-type='{{data.type}}' report-submit='true' tt:if="{{mouldType!=1}}"> | |||||
<view class="buy-view app-border-top" style="position:fixed;z-index:{{zIndex}};"> | <view class="buy-view app-border-top" style="position:fixed;z-index:{{zIndex}};"> | ||||
<button class='goback' bindtap='goback'> | <button class='goback' bindtap='goback'> | ||||
<image src='{{homeSelectedO}}' mode="widthFix"></image> | <image src='{{homeSelectedO}}' mode="widthFix"></image> | ||||
<text class='btnTxt'>首页</text> | <text class='btnTxt'>首页</text> | ||||
</button> | </button> | ||||
<button bindtap="gotopay" disabled='{{showbutton}}' hover-class='active' class='buy' | <button bindtap="gotopay" disabled='{{showbutton}}' hover-class='active' class='buy' | ||||
tt:if="{{data.type!=11&&data.type!=8&&data.type!=50&&data.type!=51&&data.salePriceStr!=0&&data.remainInventory!=0&&endtime!='活动已结束'&&data.activityStatus!=0}}"> | |||||
<text class='txt'>{{data.salePriceStr}}元</text>马上购买</button> | |||||
tt:if="{{data.type!=11&&data.type!=8&&data.type!=50&&data.type!=51&&priceAndStockObj.salePrice/100!=0&&data.remainInventory!=0&&endtime!='活动已结束'&&data.activityStatus!=0}}"> | |||||
<text class='txt'>{{priceAndStockObj.salePrice/100}}元</text>马上购买</button> | |||||
<button tt:if="{{data.type==11&&data.remainInventory!=0}}" bindtap="gohome" | <button tt:if="{{data.type==11&&data.remainInventory!=0}}" bindtap="gohome" | ||||
data-couponchannelid="{{couponChannelId}}" data-couponid="{{couponId}}" data-shippingtype="2" | data-couponchannelid="{{couponChannelId}}" data-couponid="{{couponId}}" data-shippingtype="2" | ||||
class="home">配送到家 | class="home">配送到家 | ||||
@@ -174,7 +201,7 @@ | |||||
class="arrive">到店自提 | class="arrive">到店自提 | ||||
</button> | </button> | ||||
<button bindtap="gotopay" disabled='{{showbutton}}' class='buy' | <button bindtap="gotopay" disabled='{{showbutton}}' class='buy' | ||||
tt:if="{{data.type!=8&&data.type!=50&&data.type!=51&&data.salePriceStr==0&&data.remainInventory!=0&&endtime!='活动已结束'&&data.activityStatus!=0}}">免费领取</button> | |||||
tt:if="{{data.type!=8&&data.type!=50&&data.type!=51&&priceAndStockObj.salePrice/100==0&&data.remainInventory!=0&&endtime!='活动已结束'&&data.activityStatus!=0}}">免费领取</button> | |||||
<button bindtap="gotopay" disabled='{{showbutton}}' class='buy' data-type='{{data.type}}' | <button bindtap="gotopay" disabled='{{showbutton}}' class='buy' data-type='{{data.type}}' | ||||
tt:if="{{data.type==51&&data.remainInventory!=0||data.type==50&&data.remainInventory!=0}}">马上兑换</button> | tt:if="{{data.type==51&&data.remainInventory!=0||data.type==50&&data.remainInventory!=0}}">马上兑换</button> | ||||
@@ -187,6 +214,40 @@ | |||||
<button id='noBuy' disabled='true' tt:if="{{data.activityStatus==0}}">活动未开始</button> | <button id='noBuy' disabled='true' tt:if="{{data.activityStatus==0}}">活动未开始</button> | ||||
</view> | </view> | ||||
</form> | </form> | ||||
<form data-type='{{data.type}}' report-submit='true' tt:if="{{mouldType==1}}"> | |||||
<view class="app-border-topX" style="position:fixed;z-index:{{zIndex}}; bottom: 0;"> | |||||
<view class="biaoz">{{data.type!=50?'¥':''}}</view> | |||||
<view class="selling">{{data.type==50?priceAndStockObj.creditPrice+'积分':priceAndStockObj.salePrice/100}} </view> | |||||
<view class="qsOriginal">¥{{priceAndStockObj.price/100}}</view> | |||||
<button bindtap="gotopay" disabled='{{showbutton}}' hover-class='active' class='buyX' | |||||
tt:if="{{data.type!=11&&data.type!=8&&data.type!=50&&data.type!=51&&priceAndStockObj.salePrice/100!=0&&data.remainInventory!=0&&endtime!='活动已结束'&&data.activityStatus!=0}}"> | |||||
马上购买</button> | |||||
<button tt:if="{{data.type==11&&data.remainInventory!=0}}" bindtap="gohome" | |||||
data-couponchannelid="{{couponChannelId}}" data-couponid="{{couponId}}" data-shippingtype="2" | |||||
class="home">配送到家 | |||||
</button> | |||||
<button tt:if="{{data.type==11&&data.remainInventory!=0}}" bindtap="gohome" | |||||
data-couponchannelid="{{couponChannelId}}" data-couponid="{{couponId}}" data-shippingtype="1" | |||||
class="arrive">到店自提 | |||||
</button> | |||||
<button bindtap="gotopay" disabled='{{showbutton}}' class='buyX' | |||||
tt:if="{{data.type!=8&&data.type!=50&&data.type!=51&&priceAndStockObj.salePrice/100==0&&data.remainInventory!=0&&endtime!='活动已结束'&&data.activityStatus!=0}}">免费领取</button> | |||||
<button bindtap="gotopay" disabled='{{showbutton}}' class='buyX' data-type='{{data.type}}' | |||||
tt:if="{{data.type==51&&data.remainInventory!=0||data.type==50&&data.remainInventory!=0}}">马上兑换</button> | |||||
<button class='buyX buyHr' disabled='true' | |||||
tt:if="{{data.sendType!=3&&(data.remainInventory==0&&endtime!='活动已结束'||data.remainInventory==0&&data.type==8)}}">已售罄</button> | |||||
<button class='buyX' disabled='true' | |||||
tt:if="{{data.remainInventory==0&&data.type==50||data.remainInventory==0&&data.type==51}}">已兑完</button> | |||||
<button class='buyX' disabled='true' tt:if="{{endtime=='活动已结束'&&data.activityStatus!=0}}">活动已结束</button> | |||||
<button class='buyX' disabled='true' tt:if="{{total_micro_second<=0&&data.activityStatus!=0}}">活动已结束</button> | |||||
<button id='buyX' disabled='true' tt:if="{{data.activityStatus==0}}">活动未开始</button> | |||||
<!-- <view class="sell">已售出<span class="sellP">{{data.inventory-data.remainInventory}}</span>件</view> --> | |||||
</view> | |||||
</form> | |||||
</view> | </view> | ||||
<view tt:if="{{data.remainInventory!=0&&data.type==8}}" class="btns clearfix" hover-class="none" | <view tt:if="{{data.remainInventory!=0&&data.type==8}}" class="btns clearfix" hover-class="none" | ||||
@@ -198,7 +259,7 @@ | |||||
<form report-submit='true' class="fl"> | <form report-submit='true' class="fl"> | ||||
<button bindtap="gotopay" style='background:transparent;color:#fff;' data-discount='discount1' | <button bindtap="gotopay" style='background:transparent;color:#fff;' data-discount='discount1' | ||||
disabled='{{showbutton}}'> | disabled='{{showbutton}}'> | ||||
<text>¥{{data.priceStr}}</text> | |||||
<text>¥{{priceAndStockObj.price/100}}</text> | |||||
<text>立即购买</text> | <text>立即购买</text> | ||||
</button> | </button> | ||||
</form> | </form> | ||||
@@ -230,7 +291,7 @@ | |||||
</label> | </label> | ||||
</radio-group> | </radio-group> | ||||
<!-- 多选 --> | <!-- 多选 --> | ||||
<checkbox-group bindchange="checkboxChange" tt:if="{{questionnaire.flag=='multi'}}" bindchange="checkboxChange"> | |||||
<checkbox-group bindchange="checkboxChange" tt:if="{{questionnaire.flag=='multi'}}" > | |||||
<label class="radio ques" tt:for="{{questionnaire.answers}}" tt:key="index"> | <label class="radio ques" tt:for="{{questionnaire.answers}}" tt:key="index"> | ||||
<checkbox value="{{item.id}}" />{{item.name}} | <checkbox value="{{item.id}}" />{{item.name}} | ||||
</label> | </label> | ||||
@@ -278,9 +339,11 @@ | |||||
</view> | </view> | ||||
</view> | </view> | ||||
</view> | </view> | ||||
<view class="shootBox" tt:if="{{spuIdObj.status==1}}"> | |||||
<button class="mount" open-type="share" data-channel="video"> | |||||
<image src="../../../assets/images/shoot.png" class="videoCla"/> | |||||
<view class="issue">发布视频</view> | |||||
</button> | |||||
</view> | |||||
<phoen showBox="{{showBox}}" bind:hiePhoen="setPhone" bind:heiBox="setBox" /> | <phoen showBox="{{showBox}}" bind:hiePhoen="setPhone" bind:heiBox="setBox" /> | ||||
</view> | </view> | ||||
<!-- <button class="mount" open-type="share" data-channel="video"> --> | |||||
</button> |
@@ -6,8 +6,10 @@ page { | |||||
button::after { | button::after { | ||||
border: none; | border: none; | ||||
} | } | ||||
.coupons { | .coupons { | ||||
width: 100%; | width: 100%; | ||||
position: relative; | position: relative; | ||||
@@ -166,6 +168,7 @@ button::after { | |||||
border-top-left-radius: 20rpx; | border-top-left-radius: 20rpx; | ||||
border-top-right-radius: 20rpx; | border-top-right-radius: 20rpx; | ||||
/* margin-top: -25rpx; */ | /* margin-top: -25rpx; */ | ||||
overflow: hidden; | |||||
} | } | ||||
.fenxiang { | .fenxiang { | ||||
@@ -214,10 +217,14 @@ button::after { | |||||
text-overflow: ellipsis; | text-overflow: ellipsis; | ||||
padding-top: 30rpx; | padding-top: 30rpx; | ||||
} | } | ||||
.subTitleBox{ | |||||
overflow: hidden; | |||||
width: 100%; | |||||
margin: 10rpx 0; | |||||
} | |||||
.subTitle { | .subTitle { | ||||
display: block; | display: block; | ||||
width: 588rpx; | |||||
width: 400rpx; | |||||
/* height: 37rpx; */ | /* height: 37rpx; */ | ||||
font-size: 26rpx; | font-size: 26rpx; | ||||
color: #a6a6a6; | color: #a6a6a6; | ||||
@@ -226,8 +233,19 @@ button::after { | |||||
white-space: nowrap; | white-space: nowrap; | ||||
text-overflow: ellipsis; | text-overflow: ellipsis; | ||||
padding: 6rpx 0; | padding: 6rpx 0; | ||||
float: left; | |||||
} | |||||
.sellBox{ | |||||
display: block; | |||||
font-size: 26rpx; | |||||
color: #a6a6a6; | |||||
letter-spacing: 1.16rpx; | |||||
padding: 6rpx 0; | |||||
float: right; | |||||
} | } | ||||
.rest { | .rest { | ||||
font-size: 24rpx; | font-size: 24rpx; | ||||
color: #919191; | color: #919191; | ||||
@@ -268,10 +286,11 @@ button::after { | |||||
font-size: 24rpx; | font-size: 24rpx; | ||||
color: #999; | color: #999; | ||||
letter-spacing: 0; | letter-spacing: 0; | ||||
margin: 10rpx 0; | |||||
} | } | ||||
.salePriceStr .rmb { | .salePriceStr .rmb { | ||||
color: #fd782d; | |||||
color: #d5af67; | |||||
font-size: 24rpx; | font-size: 24rpx; | ||||
line-height: 40rpx; | line-height: 40rpx; | ||||
float: left; | float: left; | ||||
@@ -279,7 +298,7 @@ button::after { | |||||
.salePriceStr .pri01 { | .salePriceStr .pri01 { | ||||
font-size: 40rpx; | font-size: 40rpx; | ||||
color: #fd782d; | |||||
color: #d5af67; | |||||
letter-spacing: 0; | letter-spacing: 0; | ||||
line-height: 40rpx; | line-height: 40rpx; | ||||
float: left; | float: left; | ||||
@@ -314,7 +333,36 @@ button::after { | |||||
height: 32rpx; | height: 32rpx; | ||||
line-height: 45rpx; | line-height: 45rpx; | ||||
} | } | ||||
.qsOriginal{ | |||||
text-decoration: line-through; | |||||
color: #999 !important; | |||||
margin-top: 58rpx; | |||||
margin-left: 14rpx; | |||||
font-family: "PingFangSC-Medium"; | |||||
font-size: 26rpx; | |||||
font-weight: 400; | |||||
float: left; | |||||
} | |||||
.serviceBox{ | |||||
float: left; | |||||
margin-top: 58rpx; | |||||
margin-left: 14rpx; | |||||
height: 40rpx; | |||||
width: 40rpx; | |||||
} | |||||
.serviceImg{ | |||||
height: 100%; | |||||
width: 100%; | |||||
} | |||||
.timeText{ | |||||
color: #333; | |||||
letter-spacing: 0; | |||||
font-size: 14px; | |||||
height: 25px; | |||||
line-height: 25px; | |||||
width: 92%; | |||||
margin: 10rpx auto; | |||||
} | |||||
.fl { | .fl { | ||||
float: left; | float: left; | ||||
} | } | ||||
@@ -322,25 +370,49 @@ button::after { | |||||
.fr { | .fr { | ||||
float: right; | float: right; | ||||
} | } | ||||
.notes { | |||||
width: 100%; | |||||
background: #fff; | |||||
padding-bottom: 30rpx; | |||||
} | |||||
.notes view:nth-child(1) { | |||||
.nodesD{ | |||||
height: 87rpx; | height: 87rpx; | ||||
line-height: 87rpx; | line-height: 87rpx; | ||||
background: #fff; | background: #fff; | ||||
border-top: 1px solid #f9f9f9; | border-top: 1px solid #f9f9f9; | ||||
font-weight: bold; | |||||
} | } | ||||
.notes { | |||||
width: 100%; | |||||
background: #fff; | |||||
padding-bottom: 30rpx; | |||||
.notesText{ | |||||
width: 92%; | |||||
margin: 0 auto; | |||||
color: #333; | |||||
letter-spacing: 0; | |||||
font-size: 24rpx; | |||||
letter-spacing: 0; | |||||
line-height: 42rpx; | |||||
display: block; | |||||
} | } | ||||
.active { | |||||
opacity: 0.6; | |||||
.notesH{ | |||||
width: 92%; | |||||
font-weight: bold; | |||||
font-size: 32rpx; | |||||
color: #3c3c3c; | |||||
margin: 10rpx auto; | |||||
padding-top: 10rpx; | |||||
} | } | ||||
.notes view:nth-child(1) text { | |||||
.Hchild{ | |||||
width: 92%; | |||||
margin: 0 auto; | |||||
color: #333; | |||||
letter-spacing: 0; | |||||
font-size: 12px; | |||||
letter-spacing: 0; | |||||
line-height: 21px; | |||||
display: block; | |||||
} | |||||
/* .notes view:nth-child(1) text { | |||||
color: #333; | color: #333; | ||||
letter-spacing: 0; | letter-spacing: 0; | ||||
font-size: 30rpx; | font-size: 30rpx; | ||||
@@ -365,8 +437,21 @@ button::after { | |||||
color: #919191; | color: #919191; | ||||
letter-spacing: 0; | letter-spacing: 0; | ||||
line-height: 42rpx; | line-height: 42rpx; | ||||
} */ | |||||
.active { | |||||
opacity: 0.6; | |||||
} | } | ||||
.app-border-topX{ | |||||
width: 100%; | |||||
background-color: #fff; | |||||
border-top: solid 1rpx rgb(204, 204, 204); | |||||
} | |||||
.buy-view { | .buy-view { | ||||
/* background: #fff; */ | /* background: #fff; */ | ||||
height: 92rpx; | height: 92rpx; | ||||
@@ -376,7 +461,49 @@ button::after { | |||||
padding-bottom: 22rpx; | padding-bottom: 22rpx; | ||||
padding-top: 22rpx; | padding-top: 22rpx; | ||||
} | } | ||||
.sell{ | |||||
font-size: 24rpx; | |||||
color: #a6a6a6;; | |||||
letter-spacing: 1px; | |||||
text-align: right; | |||||
float: right; | |||||
margin-top: 60rpx; | |||||
} | |||||
.sellP{ | |||||
color: #d5af67; | |||||
} | |||||
.biaoz{ | |||||
color: #d5af67; | |||||
font-family: "PingFangSC-Medium"; | |||||
font-size: 28rpx; | |||||
font-weight: 400; | |||||
float: left; | |||||
/* line-height: 22px; */ | |||||
margin-top: 55rpx; | |||||
margin-left: 40rpx; | |||||
} | |||||
.selling{ | |||||
color: #d5af67; | |||||
font-family: "PingFangSC-Medium"; | |||||
font-size: 36rpx; | |||||
font-weight: 400; | |||||
float: left; | |||||
margin-top: 50rpx; | |||||
/* line-height: 22px; */ | |||||
} | |||||
.buyX{ | |||||
/* position: relative; */ | |||||
float: right; | |||||
background: linear-gradient(270deg, #DDAB5A, #B8832D); | |||||
height: 90rpx; | |||||
width: 300rpx; | |||||
margin-left: 170rpx; | |||||
color: #fff; | |||||
font-size: 36rpx; | |||||
line-height: 90rpx; | |||||
border-radius: 61rpx; | |||||
margin: 30rpx 20rpx; | |||||
} | |||||
.buy { | .buy { | ||||
position: relative; | position: relative; | ||||
background: linear-gradient(127deg, rgba(252, 177, 74, 1) 0%, rgba(254, 70, 20, 1) 100%); | background: linear-gradient(127deg, rgba(252, 177, 74, 1) 0%, rgba(254, 70, 20, 1) 100%); | ||||
@@ -721,7 +848,7 @@ button::after { | |||||
.a-title { | .a-title { | ||||
text-align: center; | text-align: center; | ||||
margin-top: 76rpx; | margin-top: 76rpx; | ||||
font-size: 36rpx; | |||||
font-size: 38rpx; | |||||
font-family: PingFang-SC-Medium; | font-family: PingFang-SC-Medium; | ||||
font-weight: 500; | font-weight: 500; | ||||
color: rgba(51, 51, 51, 1); | color: rgba(51, 51, 51, 1); | ||||
@@ -980,13 +1107,87 @@ checkbox-group, radio-group { | |||||
text-decoration: line-through; | text-decoration: line-through; | ||||
} | } | ||||
.mount{ | |||||
width: 120rpx; | |||||
height: 120rpx; | |||||
background-color: aqua; | |||||
.groupTitleBox{ | |||||
background: #fff; | |||||
} | |||||
.groupTitle{ | |||||
color: #333; | |||||
letter-spacing: 0; | |||||
font-size: 30rpx; | |||||
height: 50rpx; | |||||
line-height: 50rpx; | |||||
width: 92%; | |||||
margin: 0 auto; | |||||
font-weight: bold; | |||||
} | |||||
.groupTitleS{ | |||||
color: #333; | |||||
letter-spacing: 0; | |||||
font-size: 28rpx; | |||||
height: 50rpx; | |||||
line-height: 50rpx; | |||||
width: 90%; | |||||
margin: 0 auto; | |||||
/* font-weight: bold; */ | |||||
} | |||||
.yuandian{ | |||||
background-color: #333333; | |||||
width: 4rpx; | |||||
height: 4rpx; | |||||
border-radius: 50%; | border-radius: 50%; | ||||
margin: 16rpx 8rpx 0 0; | |||||
float: left; | |||||
} | |||||
.groupDetailsBox{ | |||||
width: 90%; | |||||
margin: 0 auto; | |||||
} | |||||
.groupTiemBox{ | |||||
color: #333333; | |||||
overflow: hidden; | |||||
} | |||||
.groupTiemName{ | |||||
float: left; | |||||
font-size: 26rpx; | |||||
/* color: #a6a6a6; */ | |||||
} | |||||
.groupTiemPay{ | |||||
float: right; | |||||
font-size: 26rpx; | |||||
/* color: #a6a6a6; */ | |||||
} | |||||
.videoCla{ | |||||
margin-top: 10rpx; | |||||
width: 70rpx; | |||||
height: 60rpx; | |||||
} | |||||
.issue{ | |||||
font-size: 20rpx; | |||||
} | |||||
.groupTextBox{ | |||||
background: #fff; | |||||
overflow: hidden; | |||||
padding-bottom: 10rpx; | |||||
} | |||||
.shootBox{ | |||||
position: fixed; | position: fixed; | ||||
right: 40rpx; | |||||
bottom: 200rpx; | |||||
z-index: 100000; | |||||
top: 70%; | |||||
right: 0; | |||||
width: 120rpx; | |||||
height: 100rpx; | |||||
background-color: rgba(221,171,90, 0.5) !important; | |||||
border-radius: 12rpx 0 0 12rpx; | |||||
z-index: 1000000; | |||||
} | |||||
.mount{ | |||||
line-height: 20rpx !important; | |||||
height: 100%; | |||||
} | |||||
button{ | |||||
color: #fff; | |||||
background-color: rgba(221,171,90, 0.5); | |||||
padding:0; | |||||
} | } |
@@ -1,9 +1,9 @@ | |||||
const app = getApp(); | const app = getApp(); | ||||
const navigationBarHeight = (getApp().statusBarHeight + 44) + "px"; | |||||
const Http = require("../../utils/HttpBasics"); | |||||
const config = require("../../config/config"); | |||||
const util = require("../../utils/util"); | |||||
const QR = require("../../utils/memberqrcode.js"); | |||||
const navigationBarHeight = (getApp().statusBarHeight + 50) + "px"; | |||||
const Http = require("../../../utils/HttpBasics"); | |||||
const config = require("../../../config/config"); | |||||
const util = require("../../../utils/util"); | |||||
const QR = require("../../../utils/memberqrcode.js"); | |||||
Page({ | Page({ | ||||
data: { | data: { | ||||
navigationBarHeight, | navigationBarHeight, | ||||
@@ -207,11 +207,11 @@ Page({ | |||||
onUnload: function () { | onUnload: function () { | ||||
let that = this; | let that = this; | ||||
clearInterval(that.data.setInter); | clearInterval(that.data.setInter); | ||||
clearInterval(that.data.templTiem); | |||||
// clearInterval(that.data.templTiem); | |||||
}, | }, | ||||
onHide: function () { | onHide: function () { | ||||
let that = this; | let that = this; | ||||
clearInterval(that.data.setInter); | clearInterval(that.data.setInter); | ||||
clearInterval(that.data.templTiem); | |||||
// clearInterval(that.data.templTiem); | |||||
}, | }, | ||||
}) | }) |
@@ -0,0 +1,7 @@ | |||||
{ | |||||
"navigationBarTitleText": "使用优惠券", | |||||
"usingComponents": { | |||||
"navbar": "../../../components/navbar/navbar", | |||||
"store":"../../../components/store/index" | |||||
} | |||||
} |
@@ -11,26 +11,26 @@ | |||||
<view class="qianTitle">{{data.title}}</view> | <view class="qianTitle">{{data.title}}</view> | ||||
<view class="subhead">{{data.subTitle}}</view> | <view class="subhead">{{data.subTitle}}</view> | ||||
<view class="payBox"> | <view class="payBox"> | ||||
<view class="selling">¥{{data.couponPrice/100}}</view> | |||||
<view class="original">¥{{data.price/100}}</view> | |||||
<view class="selling">¥{{data.couponPrice/100}}</view> | |||||
<view class="original">¥{{data.price/100}}</view> | |||||
<view class="past" tt:if="{{data.autoRefund==1}}" >过期不退款</view> | <view class="past" tt:if="{{data.autoRefund==1}}" >过期不退款</view> | ||||
</view> | </view> | ||||
<view class="timevalidity">有效期至:{{expiredTime}}</view> | <view class="timevalidity">有效期至:{{expiredTime}}</view> | ||||
<view class="manjian" tt:if="{{data.usePrice}}">满{{data.usePrice/100}}元可用</view> | <view class="manjian" tt:if="{{data.usePrice}}">满{{data.usePrice/100}}元可用</view> | ||||
<view class="manjian" tt:if="{{!data.usePrice}}">仅限本店使用</view> | <view class="manjian" tt:if="{{!data.usePrice}}">仅限本店使用</view> | ||||
<image class="line" mode="widthFix" src="../../assets/itemImg/topLine.png" /> | |||||
<image class="line" mode="widthFix" src="../../../assets/itemImg/topLine.png" /> | |||||
<view class="zhuangtai"> | <view class="zhuangtai"> | ||||
<image tt:if="{{couponorderstatus==1}}" src="../../assets/itemImg/wm01.jpg" mode='widthFix'></image> | |||||
<image tt:if="{{couponorderstatus==2}}" src="../../assets/itemImg/wm02.jpg" mode='widthFix'></image> | |||||
<image tt:if="{{couponorderstatus==3}}" src="../../assets/itemImg/wm03.jpg" mode='widthFix'></image> | |||||
<image tt:if="{{couponorderstatus==0&&validStatus==0}}" src="../../assets/itemImg/wm04.jpg" mode='widthFix'></image> | |||||
<image tt:if="{{couponorderstatus==1}}" src="../../../assets/itemImg/wm01.jpg" mode='widthFix'></image> | |||||
<image tt:if="{{couponorderstatus==2}}" src="../../../assets/itemImg/wm02.jpg" mode='widthFix'></image> | |||||
<image tt:if="{{couponorderstatus==3}}" src="../../../assets/itemImg/wm03.jpg" mode='widthFix'></image> | |||||
<image tt:if="{{couponorderstatus==0&&validStatus==0}}" src="../../../assets/itemImg/wm04.jpg" mode='widthFix'></image> | |||||
<view class="panel" tt:if="{{couponorderstatus==0&&validStatus!=0}}"> | <view class="panel" tt:if="{{couponorderstatus==0&&validStatus!=0}}"> | ||||
<view class="rqImg"> | <view class="rqImg"> | ||||
<canvas canvas-id="qrcode" style="width: 420rpx;; height: 420rpx;margin: 28rpx auto;" /> | <canvas canvas-id="qrcode" style="width: 420rpx;; height: 420rpx;margin: 28rpx auto;" /> | ||||
</view> | </view> | ||||
<!-- --> | <!-- --> | ||||
<view class="closeRq" tt:if="{{showhieRq}}" bindtap="setRq"> | <view class="closeRq" tt:if="{{showhieRq}}" bindtap="setRq"> | ||||
<image class="updataRqCode" mode='widthFix' src="../../assets/itemImg/upDataRqF.png"></image> | |||||
<image class="updataRqCode" mode='widthFix' src="../../../assets/itemImg/upDataRqF.png"></image> | |||||
<view class="upDataRq">点一点刷新二维码</view> | <view class="upDataRq">点一点刷新二维码</view> | ||||
</view> | </view> | ||||
<view class="coedTiem" tt:if="{{!showhieRq&&expiredSeconds>1}}">二维码在 | <view class="coedTiem" tt:if="{{!showhieRq&&expiredSeconds>1}}">二维码在 | ||||
@@ -44,7 +44,7 @@ | |||||
<view class="shopData"> | <view class="shopData"> | ||||
<store merchantVoList="{{data.merchantVoList}}"></store> | <store merchantVoList="{{data.merchantVoList}}"></store> | ||||
</view> | </view> | ||||
<image class="line" mode="widthFix" src="../../assets/itemImg/topLine.png" /> | |||||
<image class="line" mode="widthFix" src="../../../assets/itemImg/topLine.png" /> | |||||
<view class="note"> | <view class="note"> | ||||
<view style='height:60rpx;line-height:60rpx;'> | <view style='height:60rpx;line-height:60rpx;'> | ||||
<text class="shiji">实付金额:</text> | <text class="shiji">实付金额:</text> |
@@ -218,7 +218,7 @@ | |||||
} | } | ||||
.introduce{ | .introduce{ | ||||
font-size: 28rpx; | |||||
font-size: 24rpx; | |||||
color: #333; | color: #333; | ||||
} | } | ||||
.closeRq{ | .closeRq{ |
@@ -1,8 +1,8 @@ | |||||
const app = getApp() | const app = getApp() | ||||
const navigationBarHeight = (getApp().statusBarHeight + 44) + "px" | |||||
const Http = require("../../utils/HttpBasics"); | |||||
const config = require("../../config/config"); | |||||
const util = require("../../utils/util"); | |||||
const navigationBarHeight = (getApp().statusBarHeight + 50) + "px" | |||||
const Http = require("../../../utils/HttpBasics"); | |||||
const config = require("../../../config/config"); | |||||
const util = require("../../../utils/util"); | |||||
Page({ | Page({ | ||||
data: { | data: { | ||||
navigationBarHeight, | navigationBarHeight, | ||||
@@ -29,7 +29,7 @@ Page({ | |||||
loading: false, //"上拉加载"的变量,默认false,隐藏 | loading: false, //"上拉加载"的变量,默认false,隐藏 | ||||
pageNum:1, | pageNum:1, | ||||
allow_load: true, | allow_load: true, | ||||
list:[] | |||||
list:[], | |||||
}, | }, | ||||
setBoatFlag(e){ | setBoatFlag(e){ | ||||
let index = e.currentTarget.dataset.index | let index = e.currentTarget.dataset.index | ||||
@@ -126,7 +126,10 @@ Page({ | |||||
this.getList() | this.getList() | ||||
}, | }, | ||||
onShow:function(){ | onShow:function(){ | ||||
this.getList() | |||||
} | |||||
debugger | |||||
this.getList() | |||||
} | |||||
}) | }) |
@@ -0,0 +1,7 @@ | |||||
{ | |||||
"navigationBarTitleText": "我的券包", | |||||
"usingComponents": { | |||||
"navbar": "../../../components/navbar/navbar" | |||||
} | |||||
} |
@@ -1,5 +1,5 @@ | |||||
<view class="BoxBg"> | <view class="BoxBg"> | ||||
<navbar back home text="我的券包" background='#fff' color="#000"></navbar> | |||||
<navbar back home text="我的券包" background='#fff' color="#000"></navbar> | |||||
<view style="height:{{navigationBarHeight}} "></view> | <view style="height:{{navigationBarHeight}} "></view> | ||||
<view class="boatBoxf" style="top:{{navigationBarHeight}}"> | <view class="boatBoxf" style="top:{{navigationBarHeight}}"> | ||||
@@ -22,17 +22,24 @@ | |||||
<view class="date">{{item.createDate}}</view> | <view class="date">{{item.createDate}}</view> | ||||
</view> | </view> | ||||
</view> | </view> | ||||
<navigator class="useBtn" tt:if="{{item.couponOrderStatus==0}}" url="/pages/ticketDetail/ticketDetail?quancode={{item.id}}&couponorderstatus={{boatFlag}}" hover-class="navigator-hover" open-type="navigate">去使用</navigator> | |||||
<navigator class="nouseBtn" tt:if="{{item.couponOrderStatus==1||item.couponOrderStatus==2||item.couponOrderStatus==3}}" url="/pages/ticketDetail/ticketDetail?quancode={{item.id}}&couponorderstatus={{boatFlag}}" hover-class="navigator-hover" open-type="navigate">查看</navigator> | |||||
<navigator class="useBtn" tt:if="{{item.couponOrderStatus==0}}" | |||||
url="/pages/couponorder/detail/index?quancode={{item.id}}&couponorderstatus={{boatFlag}}" | |||||
hover-class="navigator-hover" open-type="navigate">去使用</navigator> | |||||
<navigator class="nouseBtn" | |||||
tt:if="{{item.couponOrderStatus==1||item.couponOrderStatus==2||item.couponOrderStatus==3}}" | |||||
url="/pages/couponorder/detail/index?quancode={{item.id}}&couponorderstatus={{boatFlag}}" | |||||
hover-class="navigator-hover" open-type="navigate">查看</navigator> | |||||
</view> | </view> | ||||
<view class="dingdan" tt:if="{{list.length==0}}"> | <view class="dingdan" tt:if="{{list.length==0}}"> | ||||
<image src="../../assets/itemImg/noOrders.png" mode="widthFix"></image> | |||||
<image src="../../../assets/itemImg/noOrders.png" mode="widthFix"></image> | |||||
<text>您还没有相关订单</text> | <text>您还没有相关订单</text> | ||||
<text>再忙,也要记得买点什么犒赏自己~</text> | <text>再忙,也要记得买点什么犒赏自己~</text> | ||||
</view> | |||||
</view> | |||||
<view class="loading" tt:if="{{loading}}"> | <view class="loading" tt:if="{{loading}}"> | ||||
<image src="../../assets/itemImg/loading.gif" mode="widthFix"></image>{{content}} | |||||
<image src="../../../assets/itemImg/loading.gif" mode="widthFix"></image>{{content}} | |||||
</view> | </view> | ||||
</view> | |||||
</view> | |||||
<tabbar tt:if="{{ifshowtab}}"/> |
@@ -1,5 +1,5 @@ | |||||
const app = getApp() | const app = getApp() | ||||
const navigationBarHeight = (getApp().statusBarHeight + 44) + "px" | |||||
const navigationBarHeight = (getApp().statusBarHeight + 50) + "px" | |||||
const Http = require("../../utils/HttpBasics"); | const Http = require("../../utils/HttpBasics"); | ||||
let config = require("../../config/config.js"); | let config = require("../../config/config.js"); | ||||
const util = require("../../utils/util") | const util = require("../../utils/util") | ||||
@@ -37,7 +37,7 @@ | |||||
<view class="orderNum"> | <view class="orderNum"> | ||||
<view class="numText">实付金额:</view> | <view class="numText">实付金额:</view> | ||||
<view class="money">{{detailObj.payment/100}}元</view> | <view class="money">{{detailObj.payment/100}}元</view> | ||||
<view class="moneyiIcn">¥</view> | |||||
<view class="moneyiIcn">¥</view> | |||||
</view> | </view> | ||||
</view> | </view> | ||||
<!-- <view class="orderNumBox1"> | <!-- <view class="orderNumBox1"> | ||||
@@ -207,7 +207,7 @@ Page({ | |||||
url: config.api.getScore, | url: config.api.getScore, | ||||
data: {}, | data: {}, | ||||
}) | }) | ||||
.then(res => {res.data | |||||
.then(res => { | |||||
console.log(res); | console.log(res); | ||||
if(res.code == 200){ | if(res.code == 200){ | ||||
if (res.data.weight){ | if (res.data.weight){ | ||||
@@ -16,13 +16,13 @@ | |||||
</view> | </view> | ||||
<view class='section'> | <view class='section'> | ||||
<text>身高</text> | <text>身高</text> | ||||
<input tt:if="{{height}}" name="height" type="text" placeholder='请填写身高单位cm' placeholder='{{height}}'/> | |||||
<input tt:if="{{!height}}" name="height" type="text" placeholder='请填写体重单位kg' /> | |||||
<input tt:if="{{height}}" name="height" type="text" placeholder="请填写身高单位cm" placeholder='{{height}}'/> | |||||
<input tt:if="{{!height}}" name="height" type="text" placeholder="请填写身高单位cm" /> | |||||
</view> | </view> | ||||
<view class='section'> | <view class='section'> | ||||
<text>体重</text> | <text>体重</text> | ||||
<input tt:if="{{weight}}" name="weight" type="text" placeholder='请填写身高单位cm' placeholder='{{weight}}'/> | |||||
<input tt:if="{{!weight}}" name="weight" type="text" placeholder='请填写体重单位kg' /> | |||||
<input tt:if="{{weight}}" name="weight" type="text" placeholder="请填写体重单位kg" placeholder='{{weight}}'/> | |||||
<input tt:if="{{!weight}}" name="weight" type="text" placeholder="请填写体重单位kg" /> | |||||
</view> | </view> | ||||
<view class="section section_gap"> | <view class="section section_gap"> | ||||
<text>性别</text> | <text>性别</text> | ||||
@@ -75,6 +75,6 @@ | |||||
<view class="det_child_box" bindtap="childDel" data-index="{{index}}"> 删除</view> | <view class="det_child_box" bindtap="childDel" data-index="{{index}}"> 删除</view> | ||||
</view> | </view> | ||||
<button class='btn' tt:if="{{!username}}" formType="submit" hover-class='active' style='background:linear-gradient(127deg,rgba(252,177,74,1) 0%,rgba(254,70,20,1) 100%)'>完成</button> | |||||
<button class='btn' tt:if="{{username}}" formType="submit" hover-class='active' style='background:linear-gradient(127deg,rgba(252,177,74,1) 0%,rgba(254,70,20,1) 100%);'>完成</button> | |||||
<button class='btn' tt:if="{{!username}}" formType="submit" hover-class='active' style='background: linear-gradient(270deg, #DDAB5A, #B8832D)'>完成</button> | |||||
<button class='btn' tt:if="{{username}}" formType="submit" hover-class='active' style='background: linear-gradient(270deg, #DDAB5A, #B8832D);'>完成</button> | |||||
</form> | </form> |
@@ -110,6 +110,7 @@ | |||||
border-radius: 10rpx; | border-radius: 10rpx; | ||||
text-align: center; | text-align: center; | ||||
margin: 20rpx; | margin: 20rpx; | ||||
font-size: 32rpx; | |||||
background-color: #fff; | background-color: #fff; | ||||
} | } | ||||
@@ -1,5 +1,5 @@ | |||||
const app = getApp() | const app = getApp() | ||||
const navigationBarHeight = (getApp().statusBarHeight + 44) + "px" | |||||
const navigationBarHeight = (getApp().statusBarHeight + 50) + "px" | |||||
const util = require("../../utils/util.js"); | const util = require("../../utils/util.js"); | ||||
Page({ | Page({ | ||||
data: { | data: { | ||||
@@ -0,0 +1,55 @@ | |||||
const navigationBarHeight = (getApp().statusBarHeight + 50) + 'px' | |||||
const util = require("../../utils/util.js"); | |||||
const Http = require("../../utils/HttpBasics"); | |||||
const config = require("../../config/config"); | |||||
const imgurl = require("../../utils/imgurl"); | |||||
Page({ | |||||
data: { | |||||
navigationBarHeight, | |||||
list:[], | |||||
teljpgUrl: imgurl.teljpg.url, | |||||
}, | |||||
gotoDetail(e) { | |||||
tt.navigateTo({ | |||||
url: `/pages/index/searchbar/detail/index?id=${e.currentTarget.dataset.id}` | |||||
}) | |||||
}, | |||||
phone: function (e) { | |||||
let that = this; | |||||
tt.makePhoneCall({ | |||||
phoneNumber: e.target.dataset.merchantlinkphone | |||||
}); | |||||
}, | |||||
goCertification(e){ | |||||
tt.navigateTo({ | |||||
url: `/pages/shopCertification/shopCertification?id=${e.currentTarget.dataset.id}` | |||||
}) | |||||
}, | |||||
goMap(e){ | |||||
let {latitude,longitude} = e.currentTarget.dataset.item | |||||
console.log(latitude,longitude); | |||||
tt.openLocation({ | |||||
latitude:Number(latitude), | |||||
longitude:Number(longitude), | |||||
scale: 18, | |||||
success() { | |||||
console.log("打开地图成功"); | |||||
}, | |||||
fail(err) { | |||||
console.log("打开地图失败:", err.errMsg); | |||||
}, | |||||
}); | |||||
}, | |||||
onLoad: function (options) { | |||||
this.setData({ | |||||
list:JSON.parse(options.list) | |||||
}) | |||||
console.log(this.data.list); | |||||
}, | |||||
onReady(e) { | |||||
}, | |||||
}) |
@@ -0,0 +1,5 @@ | |||||
{ | |||||
"usingComponents": { | |||||
"navbar": "../../components/navbar/navbar" | |||||
} | |||||
} |
@@ -0,0 +1,31 @@ | |||||
<navbar back text="适用店铺"></navbar> | |||||
<view style="height:{{navigationBarHeight}} "></view> | |||||
<view style="height:20rpx"></view> | |||||
<view class='posi' tt:for="{{list}}" tt:key="index"> | |||||
<view class='posi_logo'> | |||||
<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> | |||||
<view class="telBox" tt:if="{{item.linkLinePhone}}"> | |||||
<image bindtap='phone' data-merchantLinkPhone='{{item.linkLinePhone}}' class="telImg" src="{{teljpgUrl}}" mode="widthFix" /> | |||||
<view class="telText">电话</view> | |||||
</view> | |||||
<view class="certificationBox" tt:if="{{item.latitude&&item.longitude}}" bindtap="goCertification" data-id="{{item.id}}"> | |||||
<image class="certificationImg" src="../../assets/imgData/certification.png" mode="widthFix" /> | |||||
<view class="telText">资质</view> | |||||
</view> | |||||
</view> | |||||
<view class="siteBox" tt:if="{{item.latitude&&item.longitude}}" bindtap="goMap" data-item="{{item}}"> | |||||
<view class="siteText">{{item.addr}}</view> | |||||
<image class="siteImg" src="../../assets/imgData/siteImg.png" mode="widthFix" /> | |||||
</view> | |||||
</view> |
@@ -0,0 +1,152 @@ | |||||
.applyshop { | |||||
font-size: 30rpx; | |||||
height: 70rpx; | |||||
line-height: 70rpx; | |||||
text-indent: 1em; | |||||
color: #333; | |||||
background: #fff; | |||||
font-weight: bold; | |||||
float: left; | |||||
} | |||||
.applyshopBox{ | |||||
overflow: hidden; | |||||
background: #fff; | |||||
margin-top: 20rpx; | |||||
} | |||||
.goShop{ | |||||
font-size: 22rpx; | |||||
height: 70rpx; | |||||
line-height: 70rpx; | |||||
text-indent: 1em; | |||||
color: #a6a6a6; | |||||
background: #fff; | |||||
font-weight: bold; | |||||
float: right; | |||||
/* margin-right: 20rpx; */ | |||||
} | |||||
.posi { | |||||
/* position: relative; */ | |||||
width: 100%; | |||||
background: #FFF; | |||||
margin-bottom: 20rpx; | |||||
} | |||||
.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; | |||||
} */ | |||||
.shopCh{ | |||||
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 { | |||||
white-space: nowrap !important; | |||||
overflow-y: scroll; | |||||
height: 90rpx !important; | |||||
width: 360rpx; | |||||
font-size: 16px; | |||||
color: #333; | |||||
letter-spacing: 0; | |||||
} | |||||
.shopVoList text { | |||||
font-size: 20rpx !important; | |||||
color: #b8b8b8 !important; | |||||
} | |||||
.bottom{ | |||||
background: #fff; | |||||
color: #666; | |||||
text-align: center; | |||||
padding: 20rpx 0; | |||||
font-size: 32rpx; | |||||
} | |||||
.telBox { | |||||
position: absolute; | |||||
right: 0; | |||||
top: 0; | |||||
bottom: 0; | |||||
margin: auto; | |||||
} | |||||
.telText{ | |||||
text-align: center; | |||||
color: #b8b8b8 !important; | |||||
font-size: 20rpx; | |||||
} | |||||
.telImg{ | |||||
width: 50rpx; | |||||
height: 50rpx; | |||||
margin-top: 20rpx; | |||||
} | |||||
.certificationBox{ | |||||
position: absolute; | |||||
right: 80rpx; | |||||
top: 0; | |||||
bottom: 0; | |||||
margin: auto; | |||||
} | |||||
.certificationImg{ | |||||
width: 50rpx; | |||||
height: 50rpx; | |||||
margin-top: 20rpx; | |||||
} | |||||
.siteBox{ | |||||
overflow: hidden; | |||||
width: 92%; | |||||
margin: 0 auto 1rpx auto; | |||||
padding-bottom: 10rpx; | |||||
} | |||||
.siteText{ | |||||
width: 90%; | |||||
float: left; | |||||
font-size: 24rpx; | |||||
color: #333; | |||||
overflow: hidden; | |||||
white-space: nowrap; | |||||
text-overflow: ellipsis; | |||||
} | |||||
.siteImg{ | |||||
float: right; | |||||
width: 40rpx; | |||||
height: 40rpx; | |||||
} | |||||
.genduoImg{ | |||||
width: 14rpx; | |||||
display: block; | |||||
float: right; | |||||
margin: 24rpx 30rpx 0 10rpx; | |||||
} |
@@ -1,26 +1,111 @@ | |||||
const app = getApp() | |||||
const navigationBarHeight = (getApp().statusBarHeight + 50) + 'px' | |||||
var config = require("../../config/config.js"); | |||||
const Http = require("../../utils/HttpBasics"); | const Http = require("../../utils/HttpBasics"); | ||||
const config = require("../../config/config"); | |||||
const navigationBarHeight = (getApp().statusBarHeight + 44) + "px" | |||||
var app = getApp(); | |||||
Page({ | Page({ | ||||
data: { | data: { | ||||
navigationBarHeight, | navigationBarHeight, | ||||
mallImgUrl:"", | |||||
canIUse: tt.canIUse("button.open-type.getPhoneNumber"), | |||||
couponChannelId: "", | |||||
path: null, | |||||
paramData: null, | |||||
signActivity: "", | |||||
mineFlag: null, | |||||
skipUrl: 0, | |||||
fillIndentId: "", | |||||
couponId: "", | |||||
// skip: app.globalData.skip | |||||
}, | }, | ||||
backHome(){ | |||||
tt.reLaunch({ | |||||
url: "/index/index", | |||||
success: (res) => { | |||||
app.globalData.selected = 0; | |||||
}, | |||||
fail: (res) => { | |||||
onLoad: function(options) { | |||||
var that = this; | |||||
console.log(options.skipUrl, "options.skipUrl") | |||||
if (options.skipUrl) { | |||||
that.setData({ | |||||
skipUrl: options.skipUrl | |||||
}) | |||||
} | |||||
that.setData({ | |||||
path: options.path | |||||
}) | |||||
that.setData({ | |||||
paramData: options | |||||
}) | |||||
if (options && options.fillIndentId && options.couponId) { | |||||
that.setData({ | |||||
fillIndentId: options.fillIndentId, | |||||
couponId: options.couponId | |||||
}) | |||||
} | |||||
if (options && options.couponChannelId) { | |||||
that.setData({ | |||||
couponChannelId: options.couponChannelId | |||||
}); | |||||
} | |||||
if (options && options.mineFlag) { | |||||
that.setData({ | |||||
mineFlag: options.mineFlag | |||||
}) | |||||
} | |||||
if (options && options.signActivity) { | |||||
that.setData({ | |||||
signActivity: options.signActivity | |||||
}); | |||||
} | |||||
Http.get({ | |||||
url: config.api.marketicon, | |||||
data: { | |||||
appId: app.globalData.appId | |||||
} | |||||
}).then(res => { | |||||
that.setData({ | |||||
mallImgUrl: res.data.mallImgUrl | |||||
}); | |||||
tt.setNavigationBarTitle({ | |||||
title: res.data.mallName | |||||
}) | |||||
}) | |||||
.catch(err => { | |||||
tt.showToast({ | |||||
title: err.errMsg, | |||||
icon: 'none', | |||||
duration: 2000, | |||||
mask: false | |||||
}); | |||||
}) | |||||
}, | |||||
onShow: function() { | |||||
tt.checkSession({ | |||||
success() { | |||||
//session_key 未过期,并且在本生命周期一直有效 | |||||
}, | }, | ||||
}); | |||||
fail() { | |||||
// session_key 已经失效,需要重新执行登录流程 | |||||
console.log("session_key 过期") | |||||
tt.login({ | |||||
success: (res) => { | |||||
if (res.code) { | |||||
let usrdata = { | |||||
appId: app.globalData.appId, | |||||
code: res.code, | |||||
} | |||||
Http.post({ | |||||
url: config.api.login, | |||||
data: usrdata | |||||
}).then(res => { | |||||
Http.setToken(res.data.token); | |||||
app.globalData.token = res.data.token; | |||||
}) | |||||
} | |||||
} | |||||
}) | |||||
} | |||||
}) | |||||
}, | }, | ||||
back: function() { | |||||
backHome(){ | |||||
tt.navigateBack({ | tt.navigateBack({ | ||||
delta: 1, | delta: 1, | ||||
success: (res) => { | success: (res) => { | ||||
@@ -30,48 +115,154 @@ Page({ | |||||
}, | }, | ||||
}); | }); | ||||
// tt.reLaunch({ | |||||
// url: "/pages/index/index", | |||||
// success: (res) => { | |||||
// }, | |||||
// fail: (res) => { | |||||
// }, | |||||
// }); | |||||
}, | }, | ||||
bindPhone(e){ | |||||
console.log(e); | |||||
getPhoneNumber: function(e) { | |||||
var that = this; | |||||
var iv = e.detail.iv; | |||||
var encryptedData = e.detail.encryptedData; | |||||
Http.post({ | Http.post({ | ||||
url:config.api.getUserPhone, | |||||
data: { | |||||
encryptedData: e.detail.encryptedData, | |||||
iv: e.detail.iv | |||||
} | |||||
}).then(res=>{ | |||||
this.back() | |||||
}).catch(err=>{ | |||||
tt.showToast({ | |||||
title: err.message?err.message:err.data, | |||||
icon: 'none', | |||||
duration: 2000, | |||||
mask: false | |||||
}); | |||||
}) | |||||
}, | |||||
onLoad: function (options) { | |||||
Http.get({ | |||||
url: config.api.marketicon, | |||||
url: config.api.getUserPhone, | |||||
data: { | data: { | ||||
appId: 'ttef6599d8705b49b101' | |||||
encryptedData: encryptedData, | |||||
iv: iv | |||||
} | } | ||||
}).then(res => { | }).then(res => { | ||||
this.setData({ | |||||
mallImgUrl: res.data.mallImgUrl | |||||
}); | |||||
tt.setNavigationBarTitle({ | |||||
title: res.data.mallName | |||||
}) | |||||
}) | |||||
.catch(err => { | |||||
app.globalData.phone = res.data.phone; | |||||
if (that.data.skipUrl == '1') { | |||||
console.log(app.globalData.skip, app.globalData.skipUrl, "跳转地址") | |||||
if (app.globalData.skip == 'redirectTo') { | |||||
tt.redirectTo({ | |||||
url: app.globalData.skipUrl, | |||||
}) | |||||
return; | |||||
} else if (app.globalData.skip == 'navigateTo') { | |||||
tt.navigateTo({ | |||||
url: app.globalData.skipUrl, | |||||
}) | |||||
return; | |||||
} else if (app.globalData.skip == 'reLaunch') { | |||||
tt.reLaunch({ | |||||
url: app.globalData.skipUrl, | |||||
}) | |||||
return; | |||||
} else if (app.globalData.skip == 'switchTab') { | |||||
tt.redirectTo({ | |||||
url: app.globalData.skipUrl, | |||||
}) | |||||
return; | |||||
}else if (app.globalData.skip == 'navigateBack') { | |||||
tt.navigateBack({ | |||||
delta: 1, | |||||
}) | |||||
return; | |||||
} | |||||
} | |||||
//线上配送 | |||||
if (that.data.path == "fi") { | |||||
tt.redirectTo({ | |||||
url: `/pages/fillIndent/fillIndent?id=${that.data.fillIndentId}&couponId=${that.data.couponId}` | |||||
}) | |||||
} | |||||
// 来着问卷 | |||||
if (that.data.path == "wj") { | |||||
tt.redirectTo({ | |||||
url: `/pages/questionnaire/questionnaire?id=${that.data.wjId}` | |||||
}) | |||||
return; | |||||
} | |||||
/**a | |||||
* 来自我的 | |||||
*/ | |||||
if (that.data.path == 'main') { | |||||
tt.redirectTo({ | |||||
url: `/index/user` | |||||
}) | |||||
return; | |||||
} | |||||
/** | |||||
* 来自积分兑换 | |||||
*/ | |||||
if (that.data.path == 'jifen') { | |||||
tt.redirectTo({ | |||||
url: `/pages/integralmall/payIntegcoupondetail/index?couponChannelId=${that.data.paramData.couponChannelId}&couponId=${that.data.paramData.couponId}` | |||||
}) | |||||
return; | |||||
} | |||||
/** | |||||
* 来自拼团详情 | |||||
*/ | |||||
if (that.data.path == 'spell') { | |||||
if (that.data.paramData.avatarUrl) { | |||||
tt.redirectTo({ | |||||
url: `/pages/joinFrDpell/index?couponId=${that.data.paramData.couponId}&orderGroupId=${that.data.paramData.orderGroupId}&couponChannelId=${that.data.paramData.couponChannelId}&orderId=${that.data.paramData.orderId}&avatarUrl=${that.data.paramData.avatarUrl}&nickName=${that.data.paramData.nickName}` | |||||
}) | |||||
} else { | |||||
tt.redirectTo({ | |||||
url: `/pages/spellGroup/mySpellGroup/index?couponId=${that.data.paramData.couponId}&couponChannelId=${that.data.paramData.couponChannelId}` | |||||
}) | |||||
} | |||||
return; | |||||
} | |||||
/** | |||||
* fromId若存在来自卡转赠 | |||||
*/ | |||||
if (that.data.path == 'index' && !that.data.paramData.cuserId) { | |||||
tt.redirectTo({ | |||||
url: "/pages/game/index?url=" + that.data.paramData.url + "&id=" + that.data.paramData.id + "&gameId=" + that.data.paramData.gameId, | |||||
}) | |||||
} else if (that.data.path == 'index' && that.data.paramData.cuserId) { | |||||
tt.redirectTo({ | |||||
url: "/pages/coupon/detail/index?cuserId=" + that.data.paramData.cuserId + '&couponChannelId=' + that.data.paramData.couponChannelId + '&coverImg=' + that.data.paramData.coverImg + '&avatarUrl=' + that.data.paramData.avatarUrl + '&userName=' + that.data.paramData.userName + '&couponOrderId=' + that.data.paramData.couponOrderId + "&updateDate=" + that.data.paramData.updateDate | |||||
}) | |||||
} | |||||
/** | |||||
* 活动报名 | |||||
*/ | |||||
else if (that.data.signActivity) { | |||||
tt.redirectTo({ | |||||
url: `/pages/radetail/joinActivity/edit?activityId=${that.data.signActivity}` | |||||
}) | |||||
} else if (that.data.mineFlag == 'mine') { | |||||
tt.redirectTo({ | |||||
url: '/index/user' | |||||
}); | |||||
} else if (that.data.mineFlag == 'index') { | |||||
tt.redirectTo({ | |||||
url: app.globalData.goHomeUrl | |||||
}); | |||||
} else { | |||||
tt.showToast({ | |||||
title: res.data.msg, | |||||
icon: "success", | |||||
success: function(res) { | |||||
if (that.data.couponChannelId) { | |||||
tt.redirectTo({ | |||||
url: "/pages/coupon/detail/index?couponChannelId=" + that.data.couponChannelId + "&flag=pay" | |||||
}) | |||||
} else { | |||||
tt.redirectTo({ | |||||
url: '/index/passCar', | |||||
}) | |||||
} | |||||
} | |||||
}); | |||||
} | |||||
}).catch(err => { | |||||
tt.showToast({ | tt.showToast({ | ||||
title: err.message?err.message:err.data, | |||||
title: err.message, | |||||
icon: 'none', | icon: 'none', | ||||
duration: 2000, | duration: 2000, | ||||
mask: false | mask: false | ||||
}); | }); | ||||
}) | }) | ||||
} | |||||
}) | |||||
}, | |||||
}); |
@@ -8,7 +8,7 @@ | |||||
<text>授权后,可以更好的体验我们哦~</text> | <text>授权后,可以更好的体验我们哦~</text> | ||||
</view> | </view> | ||||
<view class="login-btn"> | <view class="login-btn"> | ||||
<button open-type="getPhoneNumber" hover-class='active' class="login-btn-login" bindgetphonenumber="bindPhone">授权手机号</button> | |||||
<button open-type="getPhoneNumber" hover-class='active' class="login-btn-login" bindgetphonenumber="getPhoneNumber">授权手机号</button> | |||||
<button hover-class='active' class="login-btn-login backHome" bindtap="backHome">取消</button> | <button hover-class='active' class="login-btn-login backHome" bindtap="backHome">取消</button> | ||||
</view> | </view> |
@@ -1,75 +1,503 @@ | |||||
const app = getApp() | |||||
const navigationBarHeight = (getApp().statusBarHeight + 50) + 'px' | |||||
var config = require("../../config/config.js"); | |||||
var app = getApp(); | |||||
const Http = require("../../utils/HttpBasics"); | const Http = require("../../utils/HttpBasics"); | ||||
const config = require("../../config/config"); | |||||
const navigationBarHeight = (getApp().statusBarHeight + 44) + "px" | |||||
Page({ | Page({ | ||||
data: { | data: { | ||||
navigationBarHeight, | navigationBarHeight, | ||||
mallImgUrl:"", | |||||
path: null, | |||||
couponChannelId: null, | |||||
cuserId: null, | |||||
coverImg: null, | |||||
couponOrderId: null, | |||||
optionData: null, | |||||
fromflag: '', | |||||
couponChannelIdflag: '', | |||||
wjId: "", | |||||
composeOrderType: "", | |||||
fillIndentId: "", | |||||
url: null,//游戏路径 | |||||
id: null,//游戏id, | |||||
gameId: null,//游戏gameId | |||||
}, | }, | ||||
backHome: function() { | |||||
backHome() { | |||||
tt.navigateBack({ | tt.navigateBack({ | ||||
delta: 1, | delta: 1, | ||||
success: (res) => { | success: (res) => { | ||||
}, | }, | ||||
fail: (res) => { | fail: (res) => { | ||||
tt.reLaunch({ | |||||
url: "/index/index", | |||||
success: (res) => { | |||||
}, | |||||
fail: (res) => { | |||||
}, | |||||
}); | |||||
}, | }, | ||||
}); | }); | ||||
// tt.reLaunch({ | |||||
// url: "/pages/index/index", | |||||
// success: (res) => { | |||||
// }, | |||||
// fail: (res) => { | |||||
// }, | |||||
// }); | |||||
}, | }, | ||||
bindGetUserInfo(e){ | |||||
let that = this; | |||||
tt.getUserInfo({ | |||||
withCredentials:true, | |||||
success:function(res){ | |||||
console.log(res,"res"); | |||||
Http.post({ | |||||
url:config.api.getUserInfo, | |||||
data: { | |||||
encryptedData: res.encryptedData, | |||||
iv: res.iv | |||||
} | |||||
}).then(res=>{ | |||||
that.backHome() | |||||
}).catch(err=>{ | |||||
tt.showToast({ | |||||
title: err.message?err.message:err.data, | |||||
icon: 'none', | |||||
duration: 2000, | |||||
mask: false | |||||
}); | |||||
//是否授权手机号 | |||||
judgePhonelngo() { | |||||
Http.get({ | |||||
url: config.api.checkPhoneStatus, | |||||
data: {} | |||||
}).then(res => { | |||||
var tempSkip = app.globalData.skip | |||||
if (tempSkip == 'redirectTo') { | |||||
tt.redirectTo({ | |||||
url: app.globalData.skipUrl, | |||||
}) | }) | ||||
}, | |||||
fail(err) { | |||||
console.log(err,` 调用失败`); | |||||
}, | |||||
} else if (tempSkip == 'navigateTo') { | |||||
tt.navigateTo({ | |||||
url: app.globalData.skipUrl, | |||||
}) | |||||
} else if (tempSkip == 'reLaunch') { | |||||
tt.reLaunch({ | |||||
url: app.globalData.skipUrl, | |||||
}) | |||||
} else if (tempSkip == 'switchTab') { | |||||
tt.switchTab({ | |||||
url: app.globalData.skipUrl, | |||||
}) | |||||
} | |||||
}).catch(err => { | |||||
if(app.globalData.ifCongPh==1){ | |||||
tt.redirectTo({ | |||||
url: `/pages/getPhone/getPhone?skipUrl=1` | |||||
}); | |||||
}else{ | |||||
tt.navigateBack({ | |||||
delta: 1, | |||||
}) | |||||
} | |||||
}) | }) | ||||
}, | }, | ||||
onLoad: function (options) { | onLoad: function (options) { | ||||
console.log(app.globalData.skip, app.globalData.skipUrl, app.globalData.type, "跳转地址") | |||||
var that = this; | |||||
// options.fromflag == 'coupondetail'; | |||||
// 游戏页面 | |||||
if (options && options.url && options.id && options.gameId) { | |||||
that.setData({ | |||||
url: options.url,//游戏路径 | |||||
id: options.id,//游戏id, | |||||
gameId: options.gameId,//游戏gameId | |||||
}) | |||||
} | |||||
// 来自优惠券详情页面 | |||||
if (options && options.fromflag) { | |||||
that.setData({ | |||||
fromflag: options.fromflag | |||||
}) | |||||
} | |||||
if (options && options.composeOrderType) { | |||||
that.setData({ | |||||
composeOrderType: options.composeOrderType | |||||
}) | |||||
} | |||||
//线上配送 填写订单 | |||||
if (options && options.fillIndentId && couponId && options.couponId) { | |||||
that.setData({ | |||||
fillIndentId: options.fillIndentId, | |||||
couponId: options.couponId | |||||
}) | |||||
} | |||||
// 来自优惠券列表券详情页面的 couponChannelId | |||||
if (options && options.couponChannelIdflag) { | |||||
that.setData({ | |||||
couponChannelIdflag: options.couponChannelIdflag | |||||
}) | |||||
} | |||||
//调查问卷 | |||||
if (options && !options.wjId || options.wjId) { | |||||
this.setData({ | |||||
wjId: options.wjId | |||||
}) | |||||
} | |||||
if (options && options.spellGroup) { | |||||
that.setData({ | |||||
spellGroup: options.spellGroup | |||||
}) | |||||
} else { | |||||
that.setData({ | |||||
spellGroup: null | |||||
}) | |||||
} | |||||
if (options.couponChannelId && !options.cuserId || options.orderId) { | |||||
that.setData({ | |||||
couponChannelId: options.couponChannelId, | |||||
orderId: options.orderId | |||||
}) | |||||
} | |||||
if (options && options.frommd && options.id) { | |||||
that.setData({ | |||||
id: options.id, | |||||
frommd: options.frommd | |||||
}) | |||||
} | |||||
// that.setData({ | |||||
// optionData: null | |||||
// }) | |||||
console.log(tt.getStorageSync('options'), 6666) | |||||
that.setData({ | |||||
optionData: tt.getStorageSync('options') ? JSON.parse(tt.getStorageSync('options')) : null | |||||
}) | |||||
if (options && options.path == 'index') { | |||||
that.setData({ | |||||
path: options.path | |||||
}) | |||||
} | |||||
/** | |||||
* 来自转赠 | |||||
*/ | |||||
if (options.couponChannelId && options.cuserId) { | |||||
that.setData({ | |||||
couponChannelId: options.couponChannelId, | |||||
cuserId: options.cuserId, | |||||
updateDate: options.updateDate, | |||||
coverImg: options.coverImg, | |||||
userName: options.userName, | |||||
avatarUrl: options.avatarUrl, | |||||
couponOrderId: options.couponOrderId | |||||
}) | |||||
} | |||||
Http.get({ | Http.get({ | ||||
url: config.api.marketicon, | url: config.api.marketicon, | ||||
data: { | data: { | ||||
appId: 'ttef6599d8705b49b101' | |||||
appId: app.globalData.appId | |||||
} | } | ||||
}).then(res => { | }).then(res => { | ||||
this.setData({ | |||||
that.setData({ | |||||
mallImgUrl: res.data.mallImgUrl | mallImgUrl: res.data.mallImgUrl | ||||
}); | }); | ||||
tt.setNavigationBarTitle({ | tt.setNavigationBarTitle({ | ||||
title: res.data.mallName | title: res.data.mallName | ||||
}) | }) | ||||
}) | }) | ||||
.catch(err => { | |||||
tt.showToast({ | |||||
title: err.message?err.message:err.data, | |||||
icon: 'none', | |||||
duration: 2000, | |||||
mask: false | |||||
}); | |||||
.catch(err => { | |||||
tt.showToast({ | |||||
title: err.errMsg, | |||||
icon: 'none', | |||||
duration: 2000, | |||||
mask: false | |||||
}); | |||||
}) | |||||
}, | |||||
onShow: function () { | |||||
tt.checkSession({ | |||||
success() { | |||||
//session_key 未过期,并且在本生命周期一直有效 | |||||
}, | |||||
fail() { | |||||
console.log("session_key 过期") | |||||
// session_key 已经失效,需要重新执行登录流程 | |||||
tt.login({ | |||||
success: (res) => { | |||||
if (res.code) { | |||||
let usrdata = { | |||||
appId: app.globalData.appId, | |||||
code: res.code, | |||||
} | |||||
Http.post({ | |||||
url: config.api.login, | |||||
data: usrdata | |||||
}).then(res => { | |||||
Http.setToken(res.data.token); | |||||
app.globalData.token = res.data.token; | |||||
}) | |||||
} | |||||
} | |||||
}) | |||||
} | |||||
}) | }) | ||||
} | |||||
}) | |||||
}, | |||||
bindGetUserInfo(e) { | |||||
//session_key 未过期,并且在本生命周期一直有效 | |||||
tt.getUserProfile({ | |||||
title: '温馨提示', | |||||
desc: '用于完善会员资料', // 声明获取用户个人信息后的用途,后续会展示在弹窗中,请谨慎填写 | |||||
success: (res) => { | |||||
let that = this; | |||||
var iv = res.iv; | |||||
var encryptedData = res.encryptedData; | |||||
Http.post({ | |||||
url: config.api.getUserInfo, | |||||
data: { | |||||
encryptedData: encryptedData, | |||||
iv: iv | |||||
} | |||||
}).then(res => { | |||||
if (app.globalData.type == 'gm' && that.data.id && that.data.gameId && that.data.url) {//游戏页面 | |||||
app.globalData.skipUrl = '/pages/game/index?url=' + that.data.url + "&id=" + that.data.id + "&gameId=" + that.data.gameId, | |||||
app.globalData.skip = 'redirectTo' | |||||
that.judgePhonelngo() | |||||
return; | |||||
} | |||||
if (that.data.wjId) { | |||||
app.globalData.skipUrl = `/pages/questionnaire/questionnaire?id=${that.data.wjId}` | |||||
app.globalData.skip = 'redirectTo' | |||||
that.judgePhonelngo() | |||||
return; | |||||
} | |||||
if (that.data.fromflag == 'poster') { | |||||
app.globalData.skipUrl = `/pages/canvas/index?couponChannelId=${that.data.couponChannelId}` | |||||
app.globalData.skip = 'redirectTo' | |||||
that.judgePhonelngo() | |||||
return; | |||||
} | |||||
// | |||||
if (that.data.optionData != null && that.data.optionData.orderGroupId != null && that.data.optionData.orderGroupId != "") { | |||||
app.globalData.skipUrl = `/pages/joinFrDpell/index?couponId=${that.data.optionData.couponId}&orderGroupId=${that.data.optionData.orderGroupId}&couponChannelId=${that.data.optionData.couponChannelId}&orderId=${that.data.optionData.orderId}&avatarUrl=${that.data.optionData.avatarUrl}&nickName=${that.data.optionData.nickName}` | |||||
app.globalData.skip = 'reLaunch' | |||||
that.judgePhonelngo() | |||||
return; | |||||
} | |||||
if (that.data.path == 'index') { | |||||
app.globalData.skipUrl = "/pages/game/index" | |||||
app.globalData.skip = 'reLaunch' | |||||
that.judgePhonelngo() | |||||
} else { | |||||
//返回主页 | |||||
// if (that.data.couponChannelId && !that.data.cuserId && !that.data.spellGroup||that.data.couponChannelId && !that.data.cuserId&&app.globalData.type == 'cd') { | |||||
if (that.data.couponChannelId && !that.data.cuserId && !that.data.spellGroup && app.globalData.type == 'cd') { | |||||
// 跳转普通券/消费卡/限时秒杀/砍价详情 | |||||
app.globalData.skipUrl = `/pages/coupon/detail/index?couponChannelId=${that.data.couponChannelId}` | |||||
app.globalData.skip = 'navigateTo' | |||||
that.judgePhonelngo() | |||||
} else if (that.data.couponChannelId && that.data.cuserId && !that.data.spellGroup && app.globalData.type != 'sd') { | |||||
// 来自转赠 | |||||
app.globalData.skipUrl = `/pages/coupon/detail/index?couponChannelId=${that.data.couponChannelId}&cuserId=${that.data.cuserId}&coverImg=${that.data.coverImg}&userName=${that.data.userName}&avatarUrl=${that.data.avatarUrl}&couponOrderId=${that.data.couponOrderId}&updateDate=${that.data.updateDate}` | |||||
app.globalData.skip = 'reLaunch' | |||||
that.judgePhonelngo() | |||||
} else if (that.data.couponChannelId && app.globalData.type == 'sd' || that.data.couponChannelId && that.data.spellGroup) { | |||||
// 拼团详情页 | |||||
app.globalData.skipUrl = `/pages/spellGroup/mySpellGroup/index?couponChannelId=${that.data.couponChannelId}` | |||||
app.globalData.skip = 'redirectTo' | |||||
that.judgePhonelngo() | |||||
} else if (that.data.optionData != null && that.data.optionData.id && app.globalData.type == 'gm') { | |||||
// 游戏页面 | |||||
that.getGameOne(app.globalData.token, that.data.optionData.id) | |||||
} else if (that.data.optionData != null && that.data.optionData.id && app.globalData.type == 'td') { | |||||
app.globalData.skipUrl = `/pages/topicDetail/index?id=${that.data.optionData.id}` | |||||
app.globalData.skip = 'redirectTo' | |||||
that.judgePhonelngo() | |||||
} | |||||
// 报名活动 | |||||
else if (that.data.optionData != null && that.data.optionData.id && app.globalData.type == 'ra') { | |||||
app.globalData.skipUrl = `/pages/radetail/index?id=${that.data.optionData.id}`, | |||||
app.globalData.skip = 'redirectTo' | |||||
that.judgePhonelngo() | |||||
} | |||||
// 报名签到 | |||||
else if (that.data.optionData != null && that.data.optionData.id && app.globalData.type == 'si') { | |||||
app.globalData.skipUrl = `/pages/acSignIn/index?id=${that.data.optionData.id}`, | |||||
app.globalData.skip = 'redirectTo' | |||||
that.judgePhonelngo() | |||||
} | |||||
// 门店详情 | |||||
else if (that.data.optionData != null && that.data.optionData.id && app.globalData.type == 'md') { | |||||
app.globalData.skipUrl = `/pages/index/searchbar/detail/index?id=${that.data.optionData.id}`, | |||||
app.globalData.skip = 'redirectTo' | |||||
that.judgePhonelngo() | |||||
} | |||||
// 通过分享进入的门店详情页面 | |||||
else if (that.data.id && that.data.frommd == 'md') { | |||||
app.globalData.skipUrl = `/pages/index/searchbar/detail/index?id=${that.data.id}`, | |||||
app.globalData.skip = 'redirectTo' | |||||
that.judgePhonelngo() | |||||
} else if (that.data.optionData != null && that.data.optionData.bt && that.data.optionData.id && app.globalData.type == 'bd') { | |||||
// 宣传页详情 | |||||
if (that.data.optionData != null && that.data.optionData.bt == '2') { | |||||
// 自由图文 | |||||
app.globalData.skipUrl = `/pages/freeBannerDetail/index?id=${that.data.optionData.id}`, | |||||
app.globalData.skip = 'redirectTo' | |||||
that.judgePhonelngo() | |||||
} else { | |||||
// 标准格式 | |||||
app.globalData.skipUrl = `/pages/bannerdetail/index?id=${that.data.optionData.id}`, | |||||
app.globalData.skip = 'redirectTo' | |||||
that.judgePhonelngo() | |||||
} | |||||
} else if (that.data.orderId || that.data.orderId && app.globalData.type == 'bg') { | |||||
// 参与砍价 | |||||
app.globalData.skipUrl = `/pages/bargain/bargainDatail/bargainDatail?orderId=${that.data.orderId}&composeOrderType=${that.composeOrderType}`, | |||||
app.globalData.skip = 'navigateTo' | |||||
that.judgePhonelngo() | |||||
} else if (app.globalData.type == 'uc') { | |||||
// 我的 | |||||
app.globalData.skipUrl = '/index/user', | |||||
app.globalData.skip = 'redirectTo' | |||||
that.judgePhonelngo() | |||||
} else if (app.globalData.type == 'in') { | |||||
// 首页 | |||||
app.globalData.skipUrl = app.globalData.goHomeUrl, | |||||
app.globalData.skip = 'redirectTo' | |||||
that.judgePhonelngo() | |||||
} else if (app.globalData.type == "qd") { | |||||
//每日签到 | |||||
app.globalData.skipUrl = "/pages/activityCalendar/activityCalendar" | |||||
app.globalData.skip = 'reLaunch' | |||||
that.judgePhonelngo() | |||||
} else if (app.globalData.type == "hdrl") { | |||||
//活动日历 | |||||
app.globalData.skipUrl = `/pages/radetail/index?id=${app.globalData.activityId}` | |||||
app.globalData.skip = 'redirectTo' | |||||
that.judgePhonelngo() | |||||
} | |||||
// 积分 | |||||
else if (app.globalData.type == 'jf') { | |||||
app.globalData.skipUrl = '/pages/integralmall/index', | |||||
app.globalData.skip = 'redirectTo' | |||||
that.judgePhonelngo() | |||||
} else if (app.globalData.type == 'pc') { | |||||
// 停车 | |||||
app.globalData.skipUrl = '/index/passCar', | |||||
app.globalData.skip = 'redirectTo' | |||||
that.judgePhonelngo() | |||||
} else if (app.globalData.type == 'mc') { | |||||
// 我的券包 | |||||
app.globalData.skipUrl = '/pages/couponorder/index/index', | |||||
app.globalData.skip = 'redirectTo' | |||||
that.judgePhonelngo() | |||||
} else if (app.globalData.type == 'mo') { | |||||
// 我的订单 | |||||
app.globalData.skipUrl = '/pages/order/index/index?id=all', | |||||
app.globalData.skip = 'redirectTo' | |||||
that.judgePhonelngo() | |||||
} else if (app.globalData.type == 'ca') { | |||||
// 我的卡包 | |||||
app.globalData.skipUrl = '/pages/cardorder/index/index', | |||||
app.globalData.skip = 'redirectTo' | |||||
that.judgePhonelngo() | |||||
} else if (app.globalData.type == 'sc') { | |||||
// 特享礼遇 | |||||
app.globalData.skipUrl = '/pages/specialcourtesy/specialcourtesy', | |||||
app.globalData.skip = 'redirectTo' | |||||
that.judgePhonelngo() | |||||
} else if (app.globalData.type == 'rb') { | |||||
// 限时秒杀 | |||||
app.globalData.skipUrl = '/pages/rushToBuy/index', | |||||
app.globalData.skip = 'redirectTo' | |||||
that.judgePhonelngo() | |||||
} else if (app.globalData.type == 'bl') { | |||||
// 砍价专场 | |||||
app.globalData.skipUrl = '/pages/bargain/bargain', | |||||
app.globalData.skip = 'redirectTo' | |||||
that.judgePhonelngo() | |||||
} else if (app.globalData.type == 'mb') { | |||||
// 我的砍价 | |||||
app.globalData.skipUrl = '/pages/bargain/bargain?from=myhtml', | |||||
app.globalData.skip = 'redirectTo' | |||||
that.judgePhonelngo() | |||||
} else if (app.globalData.type == 'sl') { | |||||
// 拼团专场 | |||||
app.globalData.skipUrl = '/pages/spellGroup/spellGroup', | |||||
app.globalData.skip = 'redirectTo' | |||||
that.judgePhonelngo() | |||||
} else if (app.globalData.type == 'ms') { | |||||
// 我的拼团 | |||||
app.globalData.skipUrl = '/pages/spellGroup/spellGroup?from=myhtml', | |||||
app.globalData.skip = 'redirectTo' | |||||
that.judgePhonelngo() | |||||
} else if (app.globalData.type == 'dc') { | |||||
// 消费卡 | |||||
app.globalData.skipUrl = '/pages/discountCardList/discountCardList', | |||||
app.globalData.skip = 'redirectTo' | |||||
that.judgePhonelngo() | |||||
} else if (app.globalData.type == 'td') { | |||||
// 专题活动页 | |||||
app.globalData.skipUrl = '/pages/topicDetail/index', | |||||
app.globalData.skip = 'redirectTo' | |||||
that.judgePhonelngo() | |||||
} else if (app.globalData.type == 'ml') { | |||||
// 门店 | |||||
app.globalData.skipUrl = '/index/searchbar', | |||||
app.globalData.skip = 'redirectTo' | |||||
that.judgePhonelngo() | |||||
} else if (that.data.fromflag == 'coupondetail' && that.data.couponChannelIdflag) { | |||||
app.globalData.skipUrl = `/pages/coupon/detail/index?couponChannelId=${that.data.couponChannelIdflag}`, | |||||
app.globalData.skip = 'redirectTo' | |||||
that.judgePhonelngo() | |||||
} else if (that.data.fromflag == 'spellcoupondetail' && that.data.couponChannelIdflag) { | |||||
app.globalData.skipUrl = `/pages/spellGroup/mySpellGroup/index?couponChannelId=${that.data.couponChannelIdflag}`, | |||||
app.globalData.skip = 'redirectTo' | |||||
that.judgePhonelngo() | |||||
} else if (that.data.fromflag == 'fillIndent' && that.data.fillIndentId && that.data.couponId) { | |||||
//线上配送 填写订单 | |||||
app.globalData.skipUrl = `/pages/fillIndent/fillIndent?id=${that.data.fillIndentId}&couponId=${that.data.couponId}`, | |||||
app.globalData.skip = 'redirectTo' | |||||
that.judgePhonelngo() | |||||
} else { | |||||
app.globalData.skipUrl = app.globalData.goHomeUrl, | |||||
app.globalData.skip = 'redirectTo' | |||||
that.judgePhonelngo() | |||||
} | |||||
} | |||||
}) | |||||
.catch(err => { | |||||
tt.showToast({ | |||||
title: err.code, | |||||
icon: 'none', | |||||
duration: 2000, | |||||
mask: false | |||||
}); | |||||
}) | |||||
}, | |||||
fail: (err => { | |||||
console.log(err) | |||||
}) | |||||
}) | |||||
}, | |||||
getGameOne: function (token, id) { | |||||
let _this = this; | |||||
Http.get({ | |||||
url: config.api.getOneGame, | |||||
data: { | |||||
token: token, | |||||
id: id | |||||
} | |||||
}).then(res => { | |||||
tt.redirectTo({ | |||||
url: '/pages/game/index?url=' + res.data.url + "&id=" + res.data.id + "&gameId=" + res.data.gameId, | |||||
}) | |||||
}) | |||||
.catch(err => { | |||||
tt.showModal({ | |||||
title: '提示', | |||||
content: err.message, | |||||
showCancel: false, | |||||
success: function (res) { | |||||
// 如果游戏下架或者找不到,重启首页 | |||||
if (res.confirm) { | |||||
tt.reLaunch({ | |||||
url: '/pages/index/index', | |||||
}) | |||||
} | |||||
} | |||||
}) | |||||
this.alphaClick(); | |||||
}) | |||||
}, | |||||
}); |
@@ -12,7 +12,7 @@ Page({ | |||||
/** | /** | ||||
* 生命周期函数--监听页面加载 | * 生命周期函数--监听页面加载 | ||||
*/ | */ | ||||
onLoad: function(options) { | |||||
onLoad: function (options) { | |||||
console.log("我是中转页面") | console.log("我是中转页面") | ||||
let that = this; | let that = this; | ||||
console.log(options); | console.log(options); | ||||
@@ -21,7 +21,7 @@ Page({ | |||||
icon: "loading", | icon: "loading", | ||||
duration: 2000 | duration: 2000 | ||||
}) | }) | ||||
/** | /** | ||||
* 根据接收到的参数的值,判断跳转到哪个页面 | * 根据接收到的参数的值,判断跳转到哪个页面 | ||||
*/ | */ | ||||
@@ -81,25 +81,27 @@ Page({ | |||||
} | } | ||||
} | } | ||||
} | } | ||||
tt.setStorageSync('options', JSON.stringify(options)) | tt.setStorageSync('options', JSON.stringify(options)) | ||||
tt.setStorageSync('imgurl', imgurl); | tt.setStorageSync('imgurl', imgurl); | ||||
if (app.globalData.token) { | if (app.globalData.token) { | ||||
this.updateUserInfo(); | |||||
that.getCongig() | |||||
this.updateUserInfo(); | |||||
if (options.couponChannelId || options.orderId || options.id) { | if (options.couponChannelId || options.orderId || options.id) { | ||||
that.userStatus(options); | that.userStatus(options); | ||||
} else { | } else { | ||||
that.userStatus(); | |||||
that.userStatus(); | |||||
} | } | ||||
} else { | } else { | ||||
// 由于 token 是网络请求,可能会在 Page.onLoad 之后才返回 | // 由于 token 是网络请求,可能会在 Page.onLoad 之后才返回 | ||||
// 所以此处加入 callback 以防止这种情况 | // 所以此处加入 callback 以防止这种情况 | ||||
app.tokenCallback = token => { | app.tokenCallback = token => { | ||||
that.getCongig() | |||||
this.updateUserInfo(); | this.updateUserInfo(); | ||||
if (options.couponChannelId || options.orderId || options.id) { | if (options.couponChannelId || options.orderId || options.id) { | ||||
that.userStatus(options); | that.userStatus(options); | ||||
} else { | } else { | ||||
that.userStatus(); | that.userStatus(); | ||||
@@ -107,12 +109,24 @@ Page({ | |||||
} | } | ||||
} | } | ||||
}, | }, | ||||
getCongig() {//获取小程序是否开通授权手机号 | |||||
Http.get({ | |||||
url: config.api.getConfig, | |||||
data: { | |||||
key: "douyinPhoneStatus" | |||||
} | |||||
}).then(res => { | |||||
app.globalData.ifCongPh = res.data ? res.data : 1 | |||||
}).catch(err => { | |||||
app.globalData.ifCongPh = 1 | |||||
}) | |||||
}, | |||||
/** | /** | ||||
* 检查用户的状态 | * 检查用户的状态 | ||||
*/ | */ | ||||
userStatus: function(options) { | |||||
userStatus: function (options) { | |||||
var that = this; | var that = this; | ||||
if (options && (options.couponChannelId || options.orderId || options.id)) { | if (options && (options.couponChannelId || options.orderId || options.id)) { | ||||
that.checkuserstatus(options); | that.checkuserstatus(options); | ||||
@@ -139,309 +153,132 @@ Page({ | |||||
}, | }, | ||||
checkuserstatus(options) { | checkuserstatus(options) { | ||||
let that = this; | let that = this; | ||||
console.log("判断是否是商品详情"); | |||||
Http.get({ | |||||
url: config.api.checkUserStatus, | |||||
data: { | |||||
token: app.globalData.token | |||||
if ((options && options.couponChannelId && !options.spellGroup && app.globalData.type != 'sd')) { | |||||
if (options.cuserId) { | |||||
tt.redirectTo({ | |||||
url: `/pages/coupon/detail/index?couponChannelId=${options.couponChannelId}&cuserId=${options.cuserId}&coverImg=${options.coverImg}&userName=${options.userName}&avatarUrl=${options.avatarUrl}&couponOrderId=${options.couponOrderId}&updateDate=${options.updateDate}`, | |||||
}) | |||||
} else { | |||||
// 跳转普通券/消费卡/限时秒杀/砍价详情 | |||||
tt.redirectTo({ | |||||
url: `/pages/coupon/detail/index?couponChannelId=${options.couponChannelId}`, | |||||
}) | |||||
} | } | ||||
}) | |||||
.then(res => { | |||||
// res = JSON.parse('{"code":11004,"message":"用户昵称未授权,请跳转到用户昵称授权页!","data":{}}') | |||||
//参与拼团 | |||||
if (options && options.orderGroupId) { | |||||
tt.redirectTo({ | |||||
url: `/pages/joinFrDpell/index?couponId=${options.couponId}&orderGroupId=${options.orderGroupId}&couponChannelId=${options.couponChannelId}&orderId=${options.orderId}&avatarUrl=${options.avatarUrl}&nickName=${options.nickName}` | |||||
}) | |||||
} else { | |||||
Http.get({ | |||||
url: config.api.checkUserStatus, | |||||
data: { | |||||
token: app.globalData.token | |||||
} | } | ||||
//来自大屏的跳转拼团券详情 | |||||
else if (options && options.couponChannelId && options.path == 'daping') { | |||||
/** | |||||
* 主要是为了拿couponId | |||||
*/ | |||||
Http.get({ | |||||
url: config.api.couponDetail, | |||||
data: { | |||||
couponChannelId: options.couponChannelId | |||||
} | |||||
}).then(res => { | |||||
let data = res.data; | |||||
tt.redirectTo({ | |||||
url: `/pages/spellGroup/mySpellGroup/index?couponChannelId=${options.couponChannelId}&couponId=${data.couponId}` | |||||
}) | |||||
}) | |||||
} else if (options && options.couponChannelId && !options.spellGroup && app.globalData.type != 'sd') { | |||||
console.log(3333333333333333) | |||||
// 转赠判断 | |||||
if (options.cuserId) { | |||||
tt.redirectTo({ | |||||
url: `/pages/coupon/detail/index?couponChannelId=${options.couponChannelId}&cuserId=${options.cuserId}&coverImg=${options.coverImg}&userName=${options.userName}&avatarUrl=${options.avatarUrl}&couponOrderId=${options.couponOrderId}&updateDate=${options.updateDate}`, | |||||
}) | |||||
} else { | |||||
// 跳转普通券/消费卡/限时秒杀/砍价详情 | |||||
}) | |||||
.then(res => { | |||||
// res = JSON.parse('{"code":11004,"message":"用户昵称未授权,请跳转到用户昵称授权页!","data":{}}') | |||||
//参与拼团 | |||||
if (options && options.orderGroupId) { | |||||
tt.redirectTo({ | tt.redirectTo({ | ||||
url: `/pages/coupon/detail/index?couponChannelId=${options.couponChannelId}`, | |||||
url: `/pages/joinFrDpell/index?couponId=${options.couponId}&orderGroupId=${options.orderGroupId}&couponChannelId=${options.couponChannelId}&orderId=${options.orderId}&avatarUrl=${options.avatarUrl}&nickName=${options.nickName}` | |||||
}) | }) | ||||
} | } | ||||
} | |||||
// 拼团详情页(只有通过扫码进入才可能进入拼团详情页面,只有这一个入口) | |||||
else if ((options && options.couponChannelId && app.globalData.type == 'sd') || (options && options.couponChannelId && options.spellGroup)) { | |||||
tt.redirectTo({ | |||||
url: `/pages/spellGroup/mySpellGroup/index?couponChannelId=${options.couponChannelId}`, | |||||
}) | |||||
} | |||||
// 游戏页面 | |||||
else if (options && options.id && app.globalData.type == 'gm') { | |||||
that.getGameOne(app.globalData.token, options.id) | |||||
} | |||||
// 报名活动页面 | |||||
else if (options && options.id && app.globalData.type == 'ra') { | |||||
tt.redirectTo({ | |||||
url: `/pages/radetail/index?id=${options.id}`, | |||||
}) | |||||
} | |||||
//活动签到 | |||||
else if (options && options.id && app.globalData.type == 'si') { | |||||
tt.redirectTo({ | |||||
url: `/pages/acSignIn/index?id=${options.id}`, | |||||
}) | |||||
} | |||||
//答题问卷 | |||||
else if (options && options.id && app.globalData.type == 'wj') { | |||||
tt.redirectTo({ | |||||
url: `/pages/questionnaire/questionnaire?id=${options.id}`, | |||||
}) | |||||
} | |||||
//投诉建议 | |||||
else if (app.globalData.type == 'ts') { | |||||
tt.redirectTo({ | |||||
url: `/pages/complaint/complaint`, | |||||
}) | |||||
} | |||||
// 宣传页详情 | |||||
else if (options && options.bt && options.id && app.globalData.type == 'bd') { | |||||
if (options.bt == '2') { | |||||
// 自由图文 | |||||
tt.redirectTo({ | |||||
url: `/pages/freeBannerDetail/index?id=${options.id}`, | |||||
}) | |||||
} else { | |||||
// 标准格式 | |||||
tt.redirectTo({ | |||||
url: `/pages/bannerdetail/index?id=${options.id}`, | |||||
//来自大屏的跳转拼团券详情 | |||||
else if (options && options.couponChannelId && options.path == 'daping') { | |||||
/** | |||||
* 主要是为了拿couponId | |||||
*/ | |||||
Http.get({ | |||||
url: config.api.couponDetail, | |||||
data: { | |||||
couponChannelId: options.couponChannelId | |||||
} | |||||
}).then(res => { | |||||
let data = res.data; | |||||
tt.redirectTo({ | |||||
url: `/pages/spellGroup/mySpellGroup/index?couponChannelId=${options.couponChannelId}&couponId=${data.couponId}` | |||||
}) | |||||
}) | }) | ||||
} else if (options && options.couponChannelId && !options.spellGroup && app.globalData.type != 'sd') { | |||||
console.log(3333333333333333) | |||||
// 转赠判断 | |||||
if (options.cuserId) { | |||||
tt.redirectTo({ | |||||
url: `/pages/coupon/detail/index?couponChannelId=${options.couponChannelId}&cuserId=${options.cuserId}&coverImg=${options.coverImg}&userName=${options.userName}&avatarUrl=${options.avatarUrl}&couponOrderId=${options.couponOrderId}&updateDate=${options.updateDate}`, | |||||
}) | |||||
} else { | |||||
// 跳转普通券/消费卡/限时秒杀/砍价详情 | |||||
tt.redirectTo({ | |||||
url: `/pages/coupon/detail/index?couponChannelId=${options.couponChannelId}`, | |||||
}) | |||||
} | |||||
} | } | ||||
} | |||||
// 专题 | |||||
else if (options && options.id && app.globalData.type == 'td') { | |||||
tt.redirectTo({ | |||||
url: `/pages/topicDetail/index?id=${options.id}` | |||||
}); | |||||
} | |||||
// 门店详情 | |||||
else if (options && options.id && app.globalData.type == 'md') { | |||||
tt.redirectTo({ | |||||
url: `/pages/index/searchbar/detail/index?id=${options.id}` | |||||
}); | |||||
} | |||||
// 参与砍价 | |||||
else if (options && options.orderId) { | |||||
tt.redirectTo({ | |||||
url: `/pages/bargain/bargainDatail/bargainDatail?orderId=${options.orderId}&from=${"discount"}&composeOrderType=${options.composeOrderType}`, | |||||
}) | |||||
} | |||||
// 我的 | |||||
else if (app.globalData.type == 'uc') { | |||||
tt.navigateTo({ | |||||
url: '/index/user' | |||||
}); | |||||
} | |||||
// 积分 | |||||
else if (app.globalData.type == 'jf') { | |||||
tt.redirectTo({ | |||||
url: '/pages/integralmall/index' | |||||
}); | |||||
} | |||||
// 首页 | |||||
else if (app.globalData.type == 'in') { | |||||
tt.reLaunch({ | |||||
url: '/index/index' | |||||
}); | |||||
} | |||||
// 停车 | |||||
else if (app.globalData.type == 'pc') { | |||||
// 停车 | |||||
tt.navigateTo({ | |||||
url: '/index/passCar' | |||||
}); | |||||
} | |||||
// 我的券包 | |||||
else if (app.globalData.type == 'mc') { | |||||
// 我的券包 | |||||
tt.redirectTo({ | |||||
url: '/pages/couponorder/index/index' | |||||
}); | |||||
} | |||||
// 我的订单 | |||||
else if (app.globalData.type == 'mo') { | |||||
// 我的订单 | |||||
tt.redirectTo({ | |||||
url: '/pages/order/index/index?id=all' | |||||
}); | |||||
} | |||||
// 我的卡包 | |||||
else if (app.globalData.type == 'ca') { | |||||
// 我的卡包 | |||||
tt.redirectTo({ | |||||
url: '/pages/cardorder/index/index' | |||||
}); | |||||
} | |||||
// 特享礼遇 | |||||
else if (app.globalData.type == 'sc') { | |||||
// 特享礼遇 | |||||
tt.redirectTo({ | |||||
url: '/pages/specialcourtesy/specialcourtesy' | |||||
}); | |||||
} | |||||
// 限时秒杀 | |||||
else if (app.globalData.type == 'rb') { | |||||
// 限时秒杀 | |||||
tt.redirectTo({ | |||||
url: '/pages/rushToBuy/index' | |||||
}) | |||||
} | |||||
// 砍价专场 | |||||
else if (app.globalData.type == 'bl') { | |||||
// 砍价专场 | |||||
tt.redirectTo({ | |||||
url: '/pages/bargain/bargain' | |||||
}) | |||||
} | |||||
// 我的砍价 | |||||
else if (app.globalData.type == 'mb') { | |||||
// 我的砍价 | |||||
tt.redirectTo({ | |||||
url: '/pages/bargain/bargain?from=myhtml' | |||||
}) | |||||
} | |||||
// 拼团专场 | |||||
else if (app.globalData.type == 'sl') { | |||||
// 拼团专场 | |||||
tt.redirectTo({ | |||||
url: '/pages/spellGroup/spellGroup' | |||||
}) | |||||
} | |||||
// 我的拼团 | |||||
else if (app.globalData.type == 'ms') { | |||||
// 我的拼团 | |||||
tt.redirectTo({ | |||||
url: '/pages/spellGroup/spellGroup?from=myhtml' | |||||
}) | |||||
} | |||||
// 消费卡 | |||||
else if (app.globalData.type == 'dc') { | |||||
// 消费卡 | |||||
tt.redirectTo({ | |||||
url: '/pages/discountCardList/discountCardList' | |||||
}) | |||||
} | |||||
//直播 | |||||
else if (app.globalData.type == 'zb') { | |||||
tt.redirectTo({ | |||||
url: `/pages2/live/livelist/index` | |||||
}); | |||||
} | |||||
//活动日历 | |||||
else if (app.globalData.type == 'arl') { | |||||
tt.redirectTo({ | |||||
url: `/pages/dateLsit/dateLsit` | |||||
}); | |||||
} | |||||
//每日签到 | |||||
else if (app.globalData.type == 'qd') { | |||||
tt.redirectTo({ | |||||
url: `/pages/activityCalendar/activityCalendar` | |||||
}); | |||||
} | |||||
// 门店 | |||||
else if (app.globalData.type == 'ml') { | |||||
tt.navigateTo({ | |||||
url: '/index/searchbar' | |||||
}) | |||||
} | |||||
// 兑换 | |||||
else if (app.globalData.type == 'ec') { | |||||
tt.redirectTo({ | |||||
url: '/pages/exchange/exchange' | |||||
}) | |||||
} | |||||
// 通过分享进入的门店详情 | |||||
else if (options && options.id && options.frommd == 'md' && app.globalData.type == 'md') { | |||||
tt.redirectTo({ | |||||
url: `/pages/index/searchbar/detail/index?id=${options.id}` | |||||
}); | |||||
} else { | |||||
// 主页 | |||||
tt.reLaunch({ | |||||
url: '/index/index' | |||||
}) | |||||
} | |||||
}) | |||||
.catch(err => { | |||||
tt.showToast({ | |||||
title: err, | |||||
icon: "loading", | |||||
duration: 2000 | |||||
}) | |||||
if (err.code == 11004) { | |||||
// 用户昵称未授权 | |||||
if (options && options.orderGroupId) { | |||||
// 拼团详情页(只有通过扫码进入才可能进入拼团详情页面,只有这一个入口) | |||||
else if ((options && options.couponChannelId && app.globalData.type == 'sd') || (options && options.couponChannelId && options.spellGroup)) { | |||||
tt.redirectTo({ | tt.redirectTo({ | ||||
url: `/pages/getuserinfo/index?couponId=${options.couponId}&orderGroupId=${options.orderGroupId}&couponChannelId=${options.couponChannelId}&orderId=${options.orderId}&avatarUrl=${options.avatarUrl}&nickName=${options.nickName}` | |||||
url: `/pages/spellGroup/mySpellGroup/index?couponChannelId=${options.couponChannelId}`, | |||||
}) | }) | ||||
} | } | ||||
/** | |||||
* spellGroup | |||||
* 区分是通过拼团详情分享过来的还是从普通券分享过来的 | |||||
* 注意:拼团券和普通券是两个页面 | |||||
*/ | |||||
if (options && options.couponChannelId && !options.cuserId && !options.spellGroup) { | |||||
tt.redirectTo({ | |||||
url: `/pages/getuserinfo/index?couponChannelId=${options.couponChannelId}` | |||||
}) | |||||
} else if (options && options.couponChannelId && !options.cuserId && options.spellGroup) { | |||||
// 游戏页面 | |||||
else if (options && options.id && app.globalData.type == 'gm') { | |||||
that.getGameOne(app.globalData.token, options.id) | |||||
} | |||||
// 报名活动页面 | |||||
else if (options && options.id && app.globalData.type == 'ra') { | |||||
tt.redirectTo({ | tt.redirectTo({ | ||||
url: `/pages/getuserinfo/index?couponChannelId=${options.couponChannelId}&spellGroup=${options.spellGroup}` | |||||
url: `/pages/radetail/index?id=${options.id}`, | |||||
}) | }) | ||||
} else if (options && options.couponChannelId && options.cuserId) { | |||||
/** | |||||
* 转赠判断 | |||||
*/ | |||||
} | |||||
//活动签到 | |||||
else if (options && options.id && app.globalData.type == 'si') { | |||||
tt.redirectTo({ | tt.redirectTo({ | ||||
url: `/pages/getuserinfo/index?couponChannelId=${options.couponChannelId}&cuserId=${options.cuserId}&coverImg=${options.coverImg}&userName=${options.userName}&avatarUrl=${options.avatarUrl}&couponOrderId=${options.couponOrderId}&updateDate=${options.updateDate}` | |||||
url: `/pages/acSignIn/index?id=${options.id}`, | |||||
}) | }) | ||||
} else if (options && options.orderId) { | |||||
} | |||||
//答题问卷 | |||||
else if (options && options.id && app.globalData.type == 'wj') { | |||||
tt.redirectTo({ | tt.redirectTo({ | ||||
url: `/pages/getuserinfo/index?orderId=${options.orderId}&from='${"discount"}` | |||||
url: `/pages/questionnaire/questionnaire?id=${options.id}`, | |||||
}) | }) | ||||
} | } | ||||
// 报名活动页面 | |||||
else if (options && options.id && app.globalData.type == 'ra') { | |||||
//投诉建议 | |||||
else if (app.globalData.type == 'ts') { | |||||
tt.redirectTo({ | tt.redirectTo({ | ||||
url: `/pages/radetail/index?id=${options.id}`, | |||||
url: `/pages/complaint/complaint`, | |||||
}) | }) | ||||
} | } | ||||
// 通过分享进入的门店详情 | |||||
else if (options && options.id && options.frommd == 'md' && app.globalData.type == 'md') { | |||||
// 宣传页详情 | |||||
else if (options && options.bt && options.id && app.globalData.type == 'bd') { | |||||
if (options.bt == '2') { | |||||
// 自由图文 | |||||
tt.redirectTo({ | |||||
url: `/pages/freeBannerDetail/index?id=${options.id}`, | |||||
}) | |||||
} else { | |||||
// 标准格式 | |||||
tt.redirectTo({ | |||||
url: `/pages/bannerdetail/index?id=${options.id}`, | |||||
}) | |||||
} | |||||
} | |||||
// 专题 | |||||
else if (options && options.id && app.globalData.type == 'td') { | |||||
tt.redirectTo({ | tt.redirectTo({ | ||||
url: `/pages/getuserinfo/index?id=${options.id}&frommd=md` | |||||
url: `/pages/topicDetail/index?id=${options.id}` | |||||
}); | }); | ||||
}// 门店详情 | |||||
} | |||||
// 门店详情 | |||||
else if (options && options.id && app.globalData.type == 'md') { | else if (options && options.id && app.globalData.type == 'md') { | ||||
tt.redirectTo({ | tt.redirectTo({ | ||||
url: `/pages/index/searchbar/detail/index?id=${options.id}` | url: `/pages/index/searchbar/detail/index?id=${options.id}` | ||||
}); | }); | ||||
} else if (app.globalData.type == 'uc') { | |||||
} | |||||
// 参与砍价 | |||||
else if (options && options.orderId) { | |||||
tt.redirectTo({ | |||||
url: `/pages/bargain/bargainDatail/bargainDatail?orderId=${options.orderId}&from=${"discount"}&composeOrderType=${options.composeOrderType}`, | |||||
}) | |||||
} | |||||
// 我的 | |||||
else if (app.globalData.type == 'uc') { | |||||
tt.navigateTo({ | tt.navigateTo({ | ||||
url: '/index/user' | url: '/index/user' | ||||
}); | }); | ||||
@@ -523,6 +360,7 @@ Page({ | |||||
} | } | ||||
// 我的拼团 | // 我的拼团 | ||||
else if (app.globalData.type == 'ms') { | else if (app.globalData.type == 'ms') { | ||||
// 我的拼团 | |||||
tt.redirectTo({ | tt.redirectTo({ | ||||
url: '/pages/spellGroup/spellGroup?from=myhtml' | url: '/pages/spellGroup/spellGroup?from=myhtml' | ||||
}) | }) | ||||
@@ -534,45 +372,237 @@ Page({ | |||||
url: '/pages/discountCardList/discountCardList' | url: '/pages/discountCardList/discountCardList' | ||||
}) | }) | ||||
} | } | ||||
// 兑换 | |||||
else if (app.globalData.type == 'ec') { | |||||
//直播 | |||||
else if (app.globalData.type == 'zb') { | |||||
tt.redirectTo({ | tt.redirectTo({ | ||||
url: '/pages/exchange/exchange' | |||||
}) | |||||
url: `/pages2/live/livelist/index` | |||||
}); | |||||
} | |||||
//活动日历 | |||||
else if (app.globalData.type == 'arl') { | |||||
tt.redirectTo({ | |||||
url: `/pages/dateLsit/dateLsit` | |||||
}); | |||||
} | |||||
//每日签到 | |||||
else if (app.globalData.type == 'qd') { | |||||
tt.redirectTo({ | |||||
url: `/pages/activityCalendar/activityCalendar` | |||||
}); | |||||
} | } | ||||
// 门店 | // 门店 | ||||
else if (app.globalData.type == 'ml') { | else if (app.globalData.type == 'ml') { | ||||
tt.navigateTo({ | tt.navigateTo({ | ||||
url: '/index/searchbar' | url: '/index/searchbar' | ||||
}) | }) | ||||
} | |||||
// 兑换 | |||||
else if (app.globalData.type == 'ec') { | |||||
tt.redirectTo({ | |||||
url: '/pages/exchange/exchange' | |||||
}) | |||||
} | |||||
// 通过分享进入的门店详情 | |||||
else if (options && options.id && options.frommd == 'md' && app.globalData.type == 'md') { | |||||
tt.redirectTo({ | |||||
url: `/pages/index/searchbar/detail/index?id=${options.id}` | |||||
}); | |||||
} else { | } else { | ||||
// 主页 | |||||
tt.reLaunch({ | tt.reLaunch({ | ||||
url: '/index/index', | |||||
url: '/index/index' | |||||
}) | }) | ||||
} | } | ||||
} | |||||
}) | |||||
}) | |||||
.catch(err => { | |||||
tt.showToast({ | |||||
title: err, | |||||
icon: "loading", | |||||
duration: 2000 | |||||
}) | |||||
if (err.code == 11004) { | |||||
// 用户昵称未授权 | |||||
if (options && options.orderGroupId) { | |||||
tt.redirectTo({ | |||||
url: `/pages/getuserinfo/getuserinfo?couponId=${options.couponId}&orderGroupId=${options.orderGroupId}&couponChannelId=${options.couponChannelId}&orderId=${options.orderId}&avatarUrl=${options.avatarUrl}&nickName=${options.nickName}` | |||||
}) | |||||
} | |||||
/** | |||||
* spellGroup | |||||
* 区分是通过拼团详情分享过来的还是从普通券分享过来的 | |||||
* 注意:拼团券和普通券是两个页面 | |||||
*/ | |||||
if (options && options.couponChannelId && !options.cuserId && !options.spellGroup) { | |||||
tt.redirectTo({ | |||||
url: `/pages/getuserinfo/getuserinfo?couponChannelId=${options.couponChannelId}` | |||||
}) | |||||
} else if (options && options.couponChannelId && !options.cuserId && options.spellGroup) { | |||||
tt.redirectTo({ | |||||
url: `/pages/getuserinfo/getuserinfo?couponChannelId=${options.couponChannelId}&spellGroup=${options.spellGroup}` | |||||
}) | |||||
} else if (options && options.couponChannelId && options.cuserId) { | |||||
/** | |||||
* 转赠判断 | |||||
*/ | |||||
tt.redirectTo({ | |||||
url: `/pages/getuserinfo/getuserinfo?couponChannelId=${options.couponChannelId}&cuserId=${options.cuserId}&coverImg=${options.coverImg}&userName=${options.userName}&avatarUrl=${options.avatarUrl}&couponOrderId=${options.couponOrderId}&updateDate=${options.updateDate}` | |||||
}) | |||||
} else if (options && options.orderId) { | |||||
tt.redirectTo({ | |||||
url: `/pages/getuserinfo/getuserinfo?orderId=${options.orderId}&from='${"discount"}` | |||||
}) | |||||
} | |||||
// 报名活动页面 | |||||
else if (options && options.id && app.globalData.type == 'ra') { | |||||
tt.redirectTo({ | |||||
url: `/pages/radetail/index?id=${options.id}`, | |||||
}) | |||||
} | |||||
// 通过分享进入的门店详情 | |||||
else if (options && options.id && options.frommd == 'md' && app.globalData.type == 'md') { | |||||
tt.redirectTo({ | |||||
url: `/pages/getuserinfo/getuserinfo?id=${options.id}&frommd=md` | |||||
}); | |||||
}// 门店详情 | |||||
else if (options && options.id && app.globalData.type == 'md') { | |||||
tt.redirectTo({ | |||||
url: `/pages/index/searchbar/detail/index?id=${options.id}` | |||||
}); | |||||
} else if (app.globalData.type == 'uc') { | |||||
tt.navigateTo({ | |||||
url: '/index/user' | |||||
}); | |||||
} | |||||
// 积分 | |||||
else if (app.globalData.type == 'jf') { | |||||
tt.redirectTo({ | |||||
url: '/pages/integralmall/index' | |||||
}); | |||||
} | |||||
// 首页 | |||||
else if (app.globalData.type == 'in') { | |||||
tt.reLaunch({ | |||||
url: '/index/index' | |||||
}); | |||||
} | |||||
// 停车 | |||||
else if (app.globalData.type == 'pc') { | |||||
// 停车 | |||||
tt.navigateTo({ | |||||
url: '/index/passCar' | |||||
}); | |||||
} | |||||
// 我的券包 | |||||
else if (app.globalData.type == 'mc') { | |||||
// 我的券包 | |||||
tt.redirectTo({ | |||||
url: '/pages/couponorder/index/index' | |||||
}); | |||||
} | |||||
// 我的订单 | |||||
else if (app.globalData.type == 'mo') { | |||||
// 我的订单 | |||||
tt.redirectTo({ | |||||
url: '/pages/order/index/index?id=all' | |||||
}); | |||||
} | |||||
// 我的卡包 | |||||
else if (app.globalData.type == 'ca') { | |||||
// 我的卡包 | |||||
tt.redirectTo({ | |||||
url: '/pages/cardorder/index/index' | |||||
}); | |||||
} | |||||
// 特享礼遇 | |||||
else if (app.globalData.type == 'sc') { | |||||
// 特享礼遇 | |||||
tt.redirectTo({ | |||||
url: '/pages/specialcourtesy/specialcourtesy' | |||||
}); | |||||
} | |||||
// 限时秒杀 | |||||
else if (app.globalData.type == 'rb') { | |||||
// 限时秒杀 | |||||
tt.redirectTo({ | |||||
url: '/pages/rushToBuy/index' | |||||
}) | |||||
} | |||||
// 砍价专场 | |||||
else if (app.globalData.type == 'bl') { | |||||
// 砍价专场 | |||||
tt.redirectTo({ | |||||
url: '/pages/bargain/bargain' | |||||
}) | |||||
} | |||||
// 我的砍价 | |||||
else if (app.globalData.type == 'mb') { | |||||
// 我的砍价 | |||||
tt.redirectTo({ | |||||
url: '/pages/bargain/bargain?from=myhtml' | |||||
}) | |||||
} | |||||
// 拼团专场 | |||||
else if (app.globalData.type == 'sl') { | |||||
// 拼团专场 | |||||
tt.redirectTo({ | |||||
url: '/pages/spellGroup/spellGroup' | |||||
}) | |||||
} | |||||
// 我的拼团 | |||||
else if (app.globalData.type == 'ms') { | |||||
tt.redirectTo({ | |||||
url: '/pages/spellGroup/spellGroup?from=myhtml' | |||||
}) | |||||
} | |||||
// 消费卡 | |||||
else if (app.globalData.type == 'dc') { | |||||
// 消费卡 | |||||
tt.redirectTo({ | |||||
url: '/pages/discountCardList/discountCardList' | |||||
}) | |||||
} | |||||
// 兑换 | |||||
else if (app.globalData.type == 'ec') { | |||||
tt.redirectTo({ | |||||
url: '/pages/exchange/exchange' | |||||
}) | |||||
} | |||||
// 门店 | |||||
else if (app.globalData.type == 'ml') { | |||||
tt.navigateTo({ | |||||
url: '/index/searchbar' | |||||
}) | |||||
} else { | |||||
tt.reLaunch({ | |||||
url: '/index/index', | |||||
}) | |||||
} | |||||
} | |||||
}) | |||||
} | |||||
}, | }, | ||||
getGameOne: function(token, id) { | |||||
getGameOne: function (token, id) { | |||||
let _this = this; | let _this = this; | ||||
Http.get({ | Http.get({ | ||||
url: config.api.getOneGame, | |||||
data: { | |||||
token: token, | |||||
id: id | |||||
} | |||||
}).then(res => { | |||||
tt.redirectTo({ | |||||
url: '/pages/game/index?url=' + res.data.url + "&id=" + res.data.id + "&gameId=" + res.data.gameId, | |||||
}) | |||||
url: config.api.getOneGame, | |||||
data: { | |||||
token: token, | |||||
id: id | |||||
} | |||||
}).then(res => { | |||||
tt.redirectTo({ | |||||
url: '/pages/game/index?url=' + res.data.url + "&id=" + res.data.id + "&gameId=" + res.data.gameId, | |||||
}) | }) | ||||
}) | |||||
.catch(err => { | .catch(err => { | ||||
tt.showModal({ | tt.showModal({ | ||||
title: '提示', | title: '提示', | ||||
content: err.message, | content: err.message, | ||||
showCancel: false, | showCancel: false, | ||||
success: function(res) { | |||||
success: function (res) { | |||||
// 如果游戏下架或者找不到,重启首页 | // 如果游戏下架或者找不到,重启首页 | ||||
if (res.confirm) { | if (res.confirm) { | ||||
tt.reLaunch({ | tt.reLaunch({ | ||||
@@ -1,4 +1,4 @@ | |||||
const navigationBarHeight = (getApp().statusBarHeight + 44) + 'px' | |||||
const navigationBarHeight = (getApp().statusBarHeight + 50) + 'px' | |||||
const Http = require("../../../../utils/HttpBasics"); | const Http = require("../../../../utils/HttpBasics"); | ||||
const imgurl = require("../../../../utils/imgurl"); | const imgurl = require("../../../../utils/imgurl"); | ||||
const config = require("../../../../config/config"); | const config = require("../../../../config/config"); | ||||
@@ -1,10 +1,10 @@ | |||||
<navbar back home text="门店详情"></navbar> | <navbar back home text="门店详情"></navbar> | ||||
<view style="height:{{navigationBarHeight}} "></view> | <view style="height:{{navigationBarHeight}} "></view> | ||||
<view > | |||||
<view> | |||||
<swiper class="index-slide" circular="false"> | <swiper class="index-slide" circular="false"> | ||||
<block tt:for="{{imglist}}" tt:key="unique"> | <block tt:for="{{imglist}}" tt:key="unique"> | ||||
<swiper-item> | <swiper-item> | ||||
<image src="{{item}}" class="index-slide-image" /> | |||||
<image src="{{item}}" class="index-slide-image" /> | |||||
</swiper-item> | </swiper-item> | ||||
</block> | </block> | ||||
</swiper> | </swiper> | ||||
@@ -21,7 +21,7 @@ | |||||
</view> --> | </view> --> | ||||
<view> | <view> | ||||
<text>{{data.merchantName}}</text> | <text>{{data.merchantName}}</text> | ||||
<text class='title' tt:if="{{data.title!=''}}">{{data.title}}</text> | |||||
<text class='title' tt:if="{{data.title!=''}}">{{data.title}}</text> | |||||
</view> | </view> | ||||
<!-- <view class='fenxiang' tt:if="{{data.type!=50&&data.type!=51}}" bindtap='showshare'> | <!-- <view class='fenxiang' tt:if="{{data.type!=50&&data.type!=51}}" bindtap='showshare'> | ||||
<image src='{{fenxiang}}' mode="widthFix"></image> | <image src='{{fenxiang}}' mode="widthFix"></image> | ||||
@@ -36,20 +36,20 @@ | |||||
<text>商户位置:</text> | <text>商户位置:</text> | ||||
</view> | </view> | ||||
<view class='merchants'> | <view class='merchants'> | ||||
<text tt:for="{{shopVoList}}" tt:key="{{index}}" > | |||||
<text tt:for="{{shopVoList}}" tt:key="{{index}}"> | |||||
{{item.buildingName}}{{item.floorName}}--{{item.shopNumber}} | {{item.buildingName}}{{item.floorName}}--{{item.shopNumber}} | ||||
</text> | </text> | ||||
</view> | </view> | ||||
</view> | </view> | ||||
</view> | </view> | ||||
<!-- 联系方式 --> | <!-- 联系方式 --> | ||||
<view class='merchant-shop shopHr' tt:if="{{data.linkLinePhone}}"> | |||||
<view class='merchant-shop shopHr' tt:if="{{data.linkLinePhone}}"> | |||||
<view class='clearfix' style='width:100%;'> | <view class='clearfix' style='width:100%;'> | ||||
<view class='fl'> | <view class='fl'> | ||||
<text>客服电话:</text> | <text>客服电话:</text> | ||||
</view> | </view> | ||||
<view class='frHr'> | <view class='frHr'> | ||||
<view style='display:inline-block;text-align:left;margin-right:20rpx;'class='posi'> | |||||
<view style='display:inline-block;text-align:left;margin-right:20rpx;' class='posi'> | |||||
<text tt:if="{{data.linkLinePhone}}">{{data.linkLinePhone}}</text> | <text tt:if="{{data.linkLinePhone}}">{{data.linkLinePhone}}</text> | ||||
<text tt:else>{{data.merchantLinkPhone}}</text> | <text tt:else>{{data.merchantLinkPhone}}</text> | ||||
</view> | </view> | ||||
@@ -57,7 +57,7 @@ | |||||
</view> | </view> | ||||
</view> | </view> | ||||
<!-- 商户活动 --> | <!-- 商户活动 --> | ||||
<view class='merchant-shop shopHr' tt:if="{{data.actionDesc}}" > | |||||
<view class='merchant-shop shopHr' tt:if="{{data.actionDesc}}"> | |||||
<view class='notes'> | <view class='notes'> | ||||
<view> | <view> | ||||
<text>商户活动:</text> | <text>商户活动:</text> | ||||
@@ -70,7 +70,7 @@ | |||||
<!-- 商户简介 --> | <!-- 商户简介 --> | ||||
<view class='merchant-phones'> | <view class='merchant-phones'> | ||||
<view class="swiper-tab"> | <view class="swiper-tab"> | ||||
<view class="swiper-tab-item " data-current="0" bindtap="clickTab"> | |||||
<view class="swiper-tab-item " data-current="0" bindtap="clickTab"> | |||||
优惠信息 | 优惠信息 | ||||
<view class="{{currentTab==0?'active-tab':''}}"></view> | <view class="{{currentTab==0?'active-tab':''}}"></view> | ||||
</view> | </view> | ||||
@@ -83,7 +83,8 @@ | |||||
<!-- 商户对应的活动 --> | <!-- 商户对应的活动 --> | ||||
<view tt:if="{{currentTab==0}}"> | <view tt:if="{{currentTab==0}}"> | ||||
<view class='coupons clearfix'> | <view class='coupons clearfix'> | ||||
<c-coupons tt:if="{{couponList.length!=0}}" tt:for="{{couponList}}" from="fromMerchant" paramAtoB="{{loading}}" tt:key="unique" data="{{item}}" list="{{couponList}}" /> | |||||
<c-coupons tt:if="{{couponList.length!=0}}" tt:for="{{couponList}}" from="fromMerchant" | |||||
paramAtoB="{{loading}}" tt:key="unique" data="{{item}}" list="{{couponList}}" /> | |||||
</view> | </view> | ||||
<view class='dingdan' tt:if="{{couponList.length==0}}"> | <view class='dingdan' tt:if="{{couponList.length==0}}"> | ||||
<image src="{{noCoupon}}" mode="widthFix"></image> | <image src="{{noCoupon}}" mode="widthFix"></image> | ||||
@@ -97,7 +98,7 @@ | |||||
<view class='loadingtext' tt:if="{{loadingtext}}">{{loadingtext}}</view> | <view class='loadingtext' tt:if="{{loadingtext}}">{{loadingtext}}</view> | ||||
</view> | </view> | ||||
<!-- 商户简介 --> | <!-- 商户简介 --> | ||||
<view tt:elif="{{currentTab==1}}" class='dingdan' > | |||||
<view tt:elif="{{currentTab==1}}" class='dingdan'> | |||||
<image src="{{noMerchant}}" tt:if="{{!data.introduction}}" mode="widthFix"></image> | <image src="{{noMerchant}}" tt:if="{{!data.introduction}}" mode="widthFix"></image> | ||||
<text class='have' tt:if="{{data.introduction}}">{{data.introduction}}</text> | <text class='have' tt:if="{{data.introduction}}">{{data.introduction}}</text> | ||||
<text tt:if="{{!data.introduction}}">信息完善中,敬请期待~</text> | <text tt:if="{{!data.introduction}}">信息完善中,敬请期待~</text> | ||||
@@ -113,7 +114,8 @@ | |||||
<view class='modal' tt:if="{{isshare}}" bindtap='hidemodal'> | <view class='modal' tt:if="{{isshare}}" bindtap='hidemodal'> | ||||
<view class='modal-content'> | <view class='modal-content'> | ||||
<view> | <view> | ||||
<button class='share user-motto' data-id="{{data.id}}" data-title='{{data.title}}' id="shareBtn" open-type="share" hover-class="other-button-hover"></button> | |||||
<button class='share user-motto' data-id="{{data.id}}" data-title='{{data.title}}' id="shareBtn" | |||||
open-type="share" hover-class="other-button-hover"></button> | |||||
<image src='./../../../../assets/images/wechat.png' mode='aspectFit'></image> | <image src='./../../../../assets/images/wechat.png' mode='aspectFit'></image> | ||||
<text>微信好友</text> | <text>微信好友</text> | ||||
</view> | </view> | ||||
@@ -1,4 +1,4 @@ | |||||
const navigationBarHeight = (getApp().statusBarHeight + 44) + 'px' | |||||
const navigationBarHeight = (getApp().statusBarHeight + 50) + 'px' | |||||
var config = require("../../config/config.js"); | var config = require("../../config/config.js"); | ||||
const Http = require("../../utils/HttpBasics"); | const Http = require("../../utils/HttpBasics"); | ||||
const imgurl = require("../../utils/imgurl"); | const imgurl = require("../../utils/imgurl"); | ||||
@@ -23,7 +23,7 @@ | |||||
</view> | </view> | ||||
</view> | </view> | ||||
<view class='topbg-btom' mode='widthFix'> | <view class='topbg-btom' mode='widthFix'> | ||||
<view class='btoml'bindtap='gotojifen'> | |||||
<view class='btoml' bindtap='gotojifen'> | |||||
<view class='score'>{{creditAmount}}</view> | <view class='score'>{{creditAmount}}</view> | ||||
<view class='jifen'> | <view class='jifen'> | ||||
<text>积分详情</text> | <text>积分详情</text> | ||||
@@ -1,4 +1,4 @@ | |||||
const navigationBarHeight = (getApp().statusBarHeight + 44) + 'px' | |||||
const navigationBarHeight = (getApp().statusBarHeight + 50) + 'px' | |||||
var config = require("../../../config/config.js"); | var config = require("../../../config/config.js"); | ||||
var app = getApp(); | var app = getApp(); | ||||
const Http = require("../../../utils/HttpBasics"); | const Http = require("../../../utils/HttpBasics"); | ||||
@@ -1,6 +1,6 @@ | |||||
// pages/integralmall/payIntegcouponStatus/index.js | // pages/integralmall/payIntegcouponStatus/index.js | ||||
// pages/spellGroup/mySpellGroup/index.js | // pages/spellGroup/mySpellGroup/index.js | ||||
const navigationBarHeight = (getApp().statusBarHeight + 44) + 'px'; | |||||
const navigationBarHeight = (getApp().statusBarHeight + 50) + 'px'; | |||||
var config = require("../../../config/config.js"); | var config = require("../../../config/config.js"); | ||||
const Http = require("../../../utils/HttpBasics"); | const Http = require("../../../utils/HttpBasics"); | ||||
const imgurl = require("../../../utils/imgurl"); | const imgurl = require("../../../utils/imgurl"); | ||||
@@ -61,7 +61,7 @@ Page({ | |||||
gotoUse(){ | gotoUse(){ | ||||
if(this.data.formData.type=='50'){ | if(this.data.formData.type=='50'){ | ||||
tt.navigateTo({ | tt.navigateTo({ | ||||
url: '/pages/ticket/ticket', | |||||
url: '/pages/couponorder/index/index', | |||||
}) | }) | ||||
}else{ | }else{ | ||||
tt.navigateTo({ | tt.navigateTo({ | ||||
@@ -74,7 +74,7 @@ Page({ | |||||
*/ | */ | ||||
gotoIndex(){ | gotoIndex(){ | ||||
let this_ = this | let this_ = this | ||||
tt.navigateTo({ | |||||
tt.reLaunch({ | |||||
url: this_.data.goHomeUrl, | url: this_.data.goHomeUrl, | ||||
}) | }) | ||||
}, | }, | ||||