Просмотр исходного кода

[增加门店列表]

tags/富茂链客4.1.0
meo 6 лет назад
Родитель
Сommit
c8711b0d80
6 измененных файлов: 61 добавлений и 15 удалений
  1. +1
    -1
      ext.json
  2. +0
    -2
      pages/ConsumeDetail/ConsumeDetail.wxml
  3. +36
    -0
      pages/coupon/detail/index.js
  4. +3
    -2
      pages/coupon/detail/index.wxml
  5. +18
    -6
      pages/coupon/detail/index.wxss
  6. +3
    -4
      pages/main/index.wxml

+ 1
- 1
ext.json Просмотреть файл

@@ -4,7 +4,7 @@
"ext": { "ext": {
"weappId": "wxea71200db93d756b", "weappId": "wxea71200db93d756b",
"name": "富茂客官开发", "name": "富茂客官开发",
"appVersion": "C.3.4.1",
"appVersion": "C.3.4.2",
"attr": { "attr": {
"ifHaveCarModular": "1", "ifHaveCarModular": "1",
"etcpversion": "release", "etcpversion": "release",


+ 0
- 2
pages/ConsumeDetail/ConsumeDetail.wxml Просмотреть файл

@@ -40,6 +40,4 @@
<button class='goback' wx:if="{{supportTransfer==1}}" bindtap='gotoIndex'><image src='./../../../assets/images/home.png' mode="widthFix"></image></button> <button class='goback' wx:if="{{supportTransfer==1}}" bindtap='gotoIndex'><image src='./../../../assets/images/home.png' mode="widthFix"></image></button>
<button type="primary" open-type="share" wx:if="{{supportTransfer==1}}" class='support-tansfer'><image src="{{weixinTitle}}" class='share' mode="widthFix"></image>转赠给微信好友</button> <button type="primary" open-type="share" wx:if="{{supportTransfer==1}}" class='support-tansfer'><image src="{{weixinTitle}}" class='share' mode="widthFix"></image>转赠给微信好友</button>
</view> </view>
<!-- <button type="primary" class='support-tansfer' bindtap='gotoIndex'>返回首页</button> -->
<!-- <button type="primary" wx:if="{{showIndexReuturn}}" class='support-tansfer' bindtap='gotoIndex'>返回首页</button> -->
</view> </view>

+ 36
- 0
pages/coupon/detail/index.js Просмотреть файл

@@ -13,6 +13,10 @@ Page({
headbgUrl: imgurl.headbg.url, headbgUrl: imgurl.headbg.url,
quesBgUrl: imgurl.ques_bg.url, quesBgUrl: imgurl.ques_bg.url,
close02: imgurl.close02.url, close02: imgurl.close02.url,
hidden: "hidden",
height: "",
more: "点击查看更多",
showMore: true,
data: { data: {
title: null title: null
}, },
@@ -60,6 +64,26 @@ Page({
phoneNumber: e.target.dataset.merchantlinkphone phoneNumber: e.target.dataset.merchantlinkphone
}); });
}, },
// 点击查看更多
more: function () {
let that = this;
if (that.data.more == '点击查看更多') {
this.setData({
hidden: "",
height: that.data.data.merchantVoList.length * 140 + 'rpx',
more: "点击收起",
showMore: true
})
}
else {
this.setData({
hidden: "hidden",
height: 4 * 140 + 'rpx',
more: "点击查看更多",
showMore: true
})
}
},
//获取当前登录用户信息 //获取当前登录用户信息
getUserInfo: function () { getUserInfo: function () {
let that = this; let that = this;
@@ -375,6 +399,17 @@ Page({
that.setData({ that.setData({
data: res.data data: res.data
}); });
if (that.data.data.merchantVoList && that.data.data.merchantVoList.length <= 4) {
that.setData({
height: that.data.data.merchantVoList.length * 140 + 'rpx',
showMore: false
})
} else if (that.data.data.merchantVoList && that.data.data.merchantVoList.length > 4) {
that.setData({
height: 4 * 140 + 'rpx'
})
}
console.log(that.data.height)
if (res.data.validType == 1) { if (res.data.validType == 1) {
that.setData({ that.setData({
validStartDate: util.formatTime(res.data.validStartDate, "yyyy-MM-dd"), validStartDate: util.formatTime(res.data.validStartDate, "yyyy-MM-dd"),
@@ -720,6 +755,7 @@ Page({
this.setData({ this.setData({
showbutton: false showbutton: false
}) })
console.log(this.data.showMore)
}, },
onShareAppMessage: function (options) { onShareAppMessage: function (options) {
var that = this; var that = this;


+ 3
- 2
pages/coupon/detail/index.wxml Просмотреть файл

@@ -60,8 +60,8 @@
</view> </view>
</view> </view>
</view> </view>
<view class='posi'>
<view class='applyshop'>适用门店</view>
<view class='applyshop'>适用门店</view>
<view class='posi' style='overflow:{{hidden}};height:{{height}}'>
<view class='posi_logo' wx:for="{{data.merchantVoList}}" wx:key="index"> <view class='posi_logo' wx:for="{{data.merchantVoList}}" wx:key="index">
<view> <view>
<image src='{{item.merchantImgUrl}}'></image> <image src='{{item.merchantImgUrl}}'></image>
@@ -73,6 +73,7 @@
<image bindtap='phone' data-merchantLinkPhone='{{item.merchantLinkPhone}}' class="tel" src="{{teljpgUrl}}" mode="widthFix" /> <image bindtap='phone' data-merchantLinkPhone='{{item.merchantLinkPhone}}' class="tel" src="{{teljpgUrl}}" mode="widthFix" />
</view> </view>
</view> </view>
<view class='bottom' bindtap='more' wx:if="{{showMore}}">{{more}}</view>
<view class='notes'> <view class='notes'>
<view> <view>
<text>购买须知</text> <text>购买须知</text>


+ 18
- 6
pages/coupon/detail/index.wxss Просмотреть файл

@@ -167,10 +167,8 @@ button::after{ border: none; }


.posi>view:nth-child(2) { .posi>view:nth-child(2) {
width: 100%; width: 100%;
height: 87rpx;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
line-height: 87rpx;
} }


.posi>view:nth-child(2) text:nth-child(1) { .posi>view:nth-child(2) text:nth-child(1) {
@@ -188,14 +186,12 @@ button::after{ border: none; }
display: flex; display: flex;
padding: 20rpx 0; padding: 20rpx 0;
background: #fff; background: #fff;
height: 100rpx;
margin-bottom: 20rpx;
} }


.posi_logo view:nth-child(1) { .posi_logo view:nth-child(1) {
width: 100rpx; width: 100rpx;
height: 100rpx;
border-radius: 16rpx; border-radius: 16rpx;
height: 100rpx;
} }


.posi_logo view:nth-child(1) image { .posi_logo view:nth-child(1) image {
@@ -217,6 +213,11 @@ button::after{ border: none; }
font-size: 32rpx; font-size: 32rpx;
color: #333; color: #333;
letter-spacing: 0; letter-spacing: 0;
height:55rpx;
line-height:64rpx;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
} }


.posi_logo view:nth-child(2) text:nth-child(2) { .posi_logo view:nth-child(2) text:nth-child(2) {
@@ -224,7 +225,10 @@ button::after{ border: none; }
color: #b8b8b8; color: #b8b8b8;
padding-top: 3rpx; padding-top: 3rpx;
width: 450rpx; width: 450rpx;
height: 36rpx;
height:41rpx;
line-height:40rpx;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden; overflow: hidden;
} }


@@ -489,6 +493,7 @@ button::after{ border: none; }
height: 70rpx; height: 70rpx;
line-height: 70rpx; line-height: 70rpx;
color: #333; color: #333;
text-indent:1em;
} }
.btns{ .btns{
padding: 0 33rpx; padding: 0 33rpx;
@@ -621,4 +626,11 @@ button::after{ border: none; }
.a-img image{ .a-img image{
width: 100%; width: 100%;
height: 100%; height: 100%;
}
.bottom{
text-align: center;
height: 70rpx;
line-height: 70rpx;
color: #999;
font-size: 32rpx;
} }

+ 3
- 4
pages/main/index.wxml Просмотреть файл

@@ -1,9 +1,8 @@

<view class="container">
<view class="container">
<!-- 门店列表展示 --> <!-- 门店列表展示 -->
<view class='search'> <view class='search'>
<view class='searchbar' bindtap='searchbar'> <view class='searchbar' bindtap='searchbar'>
<text>请输入要搜索门店</text>
<text>搜索门店</text>
<image src='./../../assets/images/search.png' mode='widthFix'></image> <image src='./../../assets/images/search.png' mode='widthFix'></image>
</view> </view>
</view> </view>
@@ -46,4 +45,4 @@
<canvas hidden="{{canvasHidden}}" style="width:500rpx;height:460rpx;background:0 0 0 .6;margin:-10rpx auto;overflow:hidden" canvas-id="mycanvas2" /> <canvas hidden="{{canvasHidden}}" style="width:500rpx;height:460rpx;background:0 0 0 .6;margin:-10rpx auto;overflow:hidden" canvas-id="mycanvas2" />
<button class='button' bindtap='mySpecial'>特享礼遇</button> <button class='button' bindtap='mySpecial'>特享礼遇</button>
</view> </view>
</view>
</view>

Загрузка…
Отмена
Сохранить