Skip to content

Commit

Permalink
chore: upgrade tdesign-miniprogram version to 1.0.0 (Tencent#74)
Browse files Browse the repository at this point in the history
* chore: upgrade tdesign-miniprogram version to 1.0.0

* fix: fix cr
  • Loading branch information
anlyyao authored Mar 3, 2023
1 parent d877845 commit e58e060
Show file tree
Hide file tree
Showing 31 changed files with 365 additions and 408 deletions.
3 changes: 2 additions & 1 deletion app.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
}
]
},
"requiredPrivateInfos": ["chooseAddress"],
"lazyCodeLoading": "requiredComponents",
"usingComponents": {},
"window": {
Expand All @@ -69,4 +70,4 @@
"desc": "你的位置信息将用于小程序位置接口的效果展示"
}
}
}
}
47 changes: 24 additions & 23 deletions components/load-more/index.wxml
Original file line number Diff line number Diff line change
@@ -1,30 +1,31 @@
<view class="load-more wr-class" style="{{listIsEmpty && (status === 0 || status === 2) ? 'display: none' : '' }}" bindtap="tapHandle">
<!-- 加载中 -->
<view
class="load-more wr-class"
style="{{listIsEmpty && (status === 0 || status === 2) ? 'display: none' : '' }}"
bindtap="tapHandle"
>
<!-- 加载中 -->

<t-loading
t-class="t-class-loading"
t-class-text="t-class-loading-text"
t-class-indicator="t-class-indicator"
loading="{{status === 1}}"
text="加载中..."
theme="circular"
size="40rpx"
/>
<t-loading
t-class="t-class-loading"
t-class-text="t-class-loading-text"
t-class-indicator="t-class-indicator"
loading="{{status === 1}}"
text="加载中..."
theme="circular"
size="40rpx"
/>

<!-- 已全部加载 -->
<t-divider wx:if="{{status === 2}}" t-class="t-class-divider" t-class-content="t-class-divider-content">
<text slot="content">{{noMoreText}}</text>
</t-divider>
<!-- 已全部加载 -->
<t-divider wx:if="{{status === 2}}" t-class="t-class-divider" t-class-content="t-class-divider-content">
<text slot="content">{{noMoreText}}</text>
</t-divider>

<!-- 加载失败 -->
<t-loading
t-class="t-class-loading"
theme="error"
loading="{{status===3}}"
bind:reload="tapHandle"
/>
<!-- 加载失败 -->
<view class="load-more__error" wx:if="{{status===3}}">
加载失败
<text class="load-more__refresh-btn" bind:tap="tapHandle">刷新</text>
</view>
</view>

<!-- 支持通过slot传入页面/列表的空态,load-more来控制空态的显示状态 -->
<slot wx:if="{{listIsEmpty && (status === 0 || status === 2)}}" name="empty" />

9 changes: 9 additions & 0 deletions components/load-more/index.wxss
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,12 @@
.load-more .t-class-indicator {
color: #b9b9b9 !important;
}

.load-more__error {
margin: auto;
}

.load-more__refresh-btn {
margin-left: 16rpx;
color: #fa4126;
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
},
"dependencies": {
"dayjs": "^1.9.3",
"tdesign-miniprogram": "^1.0.0-rc.1",
"tdesign-miniprogram": "^1.0.0",
"tslib": "^1.11.1"
},
"devDependencies": {
Expand Down
88 changes: 37 additions & 51 deletions pages/coupon/coupon-activity-goods/index.wxml
Original file line number Diff line number Diff line change
@@ -1,54 +1,40 @@
<view class="coupon-page-container">
<view class="notice-bar-content">
<view class="notice-bar-text">
以下商品可使用
<text class="height-light">{{couponTypeDesc}}</text>
优惠券
</view>
<t-icon
t-class="notice-bar-icon"
name="help-circle"
size="32rpx"
color="#AAAAAA"
bind:tap="openStoreList"
/>
</view>
<view class="goods-list-container">
<goods-list
wr-class="goods-list-wrap"
goodsList="{{goods}}"
bind:click="goodClickHandle"
bind:addcart="cartClickHandle"
/>
</view>
<floating-button count="{{cartNum}}" />
<t-popup visible="{{showStoreInfoList}}" placement="bottom" bind:visible-change="closeStoreList">
<t-icon
slot="closeBtn"
name="close"
size="40rpx"
bind:tap="closeStoreList"
/>
<view class="popup-content-wrap">
<view class="popup-content-title">
规则详情
</view>
<view class="desc-group-wrap">
<view wx:if="{{detail && detail.timeLimit}}" class="item-wrap">
<view class="item-title">优惠券有效时间</view>
<view class="item-label">{{detail.timeLimit}}</view>
</view>
<view wx:if="{{detail && detail.desc}}" class="item-wrap">
<view class="item-title">优惠券说明</view>
<view class="item-label">{{detail.desc}}</view>
</view>
<view wx:if="{{detail && detail.useNotes}}" class="item-wrap">
<view class="item-title">使用须知</view>
<view class="item-label">{{detail.useNotes}}</view>
</view>
</view>
</view>
</t-popup>
<view class="notice-bar-content">
<view class="notice-bar-text">
以下商品可使用
<text class="height-light">{{couponTypeDesc}}</text>
优惠券
</view>
<t-icon name="help-circle" size="32rpx" color="#AAAAAA" bind:tap="openStoreList" />
</view>
<view class="goods-list-container">
<goods-list
wr-class="goods-list-wrap"
goodsList="{{goods}}"
bind:click="goodClickHandle"
bind:addcart="cartClickHandle"
/>
</view>
<floating-button count="{{cartNum}}" />
<t-popup visible="{{showStoreInfoList}}" placement="bottom" bind:visible-change="closeStoreList">
<t-icon slot="closeBtn" name="close" size="40rpx" bind:tap="closeStoreList" />
<view class="popup-content-wrap">
<view class="popup-content-title"> 规则详情 </view>
<view class="desc-group-wrap">
<view wx:if="{{detail && detail.timeLimit}}" class="item-wrap">
<view class="item-title">优惠券有效时间</view>
<view class="item-label">{{detail.timeLimit}}</view>
</view>
<view wx:if="{{detail && detail.desc}}" class="item-wrap">
<view class="item-title">优惠券说明</view>
<view class="item-label">{{detail.desc}}</view>
</view>
<view wx:if="{{detail && detail.useNotes}}" class="item-wrap">
<view class="item-title">使用须知</view>
<view class="item-label">{{detail.useNotes}}</view>
</view>
</view>
</view>
</t-popup>
</view>
<t-toast id="t-toast" />

7 changes: 1 addition & 6 deletions pages/coupon/coupon-activity-goods/index.wxss
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,13 @@ page {
font-weight: 400;
color: #666666;
margin-left: 24rpx;
margin-right: 12rpx;
}

.coupon-page-container .notice-bar-text .height-light {
color: #fa550f;
}

.coupon-page-container .notice-bar-icon {
margin-left: 12rpx;
height: 68rpx;
line-height: 68rpx !important;
}

.coupon-page-container .popup-content-wrap {
background-color: #fff;
border-top-left-radius: 20rpx;
Expand Down
2 changes: 1 addition & 1 deletion pages/goods/comments/components/comments-card/index.wxml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
</view>
<view class="comments-info">
<view class="rate">
<t-rate value="{{commentScore}}" size="14" gap="2" variant="filled" color="{{['#ffc51c', '#ddd']}}" />
<t-rate value="{{commentScore}}" size="14" gap="2" color="{{['#ffc51c', '#ddd']}}" />
</view>
<view class="goods-info-text" wx:if="{{goodsDetailInfo}}">{{goodsDetailInfo}}</view>
</view>
Expand Down
10 changes: 2 additions & 8 deletions pages/goods/comments/create/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,15 +66,9 @@ Page({
},

updateButtonStatus() {
const {
serviceRateValue,
goodRateValue,
conveyRateValue,
isAllowedSubmit,
} = this.data;
const { serviceRateValue, goodRateValue, conveyRateValue, isAllowedSubmit } = this.data;
const { textAreaValue } = this;
const temp =
serviceRateValue && goodRateValue && conveyRateValue && textAreaValue;
const temp = serviceRateValue && goodRateValue && conveyRateValue && textAreaValue;
if (temp !== isAllowedSubmit) this.setData({ isAllowedSubmit: temp });
},

Expand Down
2 changes: 0 additions & 2 deletions pages/goods/comments/create/index.wxml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
<t-rate
value="{{goodRateValue}}"
bind:change="onRateChange"
variant="filled"
size="26"
gap="6"
color="{{['#ffc51c', '#ddd']}}"
Expand Down Expand Up @@ -71,7 +70,6 @@
<t-rate
value="{{serviceRateValue}}"
bind:change="onRateChange"
variant="filled"
size="26"
gap="6"
color="{{['#ffc51c', '#ddd']}}"
Expand Down
12 changes: 1 addition & 11 deletions pages/goods/details/index.wxml
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,7 @@
interval="{{interval}}"
navigation="{{navigation}}"
list="{{details.images}}"
>
<!-- <t-swiper-item
wx:for="{{details.images}}"
wx:for-item="item"
wx:for-index="index"
wx:key="index"
>
<t-image src="{{item}}" t-class="swipe-img" />
</t-swiper-item> -->
</t-swiper>
></t-swiper>
<view class="goods-info">
<view class="goods-number">
<view class="goods-price">
Expand Down Expand Up @@ -85,7 +76,6 @@
<t-rate
value="{{ commentItem.commentScore }}"
count="{{5}}"
variant="filled"
size="12"
gap="2"
color="{{['#ffc51c', '#ddd']}}"
Expand Down
28 changes: 6 additions & 22 deletions pages/goods/details/index.wxss
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,7 @@ page {
display: flex;
}

.goods-detail-page
.goods-info
.goods-activity
.tags-container
.goods-activity-tag {
.goods-detail-page .goods-info .goods-activity .tags-container .goods-activity-tag {
background: #ffece9;
color: #fa4126;
font-size: 24rpx;
Expand Down Expand Up @@ -240,20 +236,14 @@ page {
margin-top: 48rpx;
}

.popup-sku-header
.popup-sku-header__goods-info
.popup-sku__price
.popup-sku__price-num {
.popup-sku-header .popup-sku-header__goods-info .popup-sku__price .popup-sku__price-num {
font-size: 64rpx;
color: #fa4126;
font-weight: bold;
font-family: DIN Alternate;
}

.popup-sku-header
.popup-sku-header__goods-info
.popup-sku__price
.popup-sku__price-del {
.popup-sku-header .popup-sku-header__goods-info .popup-sku__price .popup-sku__price-del {
position: relative;
font-weight: normal;
left: 12rpx;
Expand All @@ -262,22 +252,16 @@ page {
font-size: 32rpx;
}

.popup-sku-header
.popup-sku-header__goods-info
.popup-sku__price
.popup-sku__price-symbol {
.popup-sku-header .popup-sku-header__goods-info .popup-sku__price .popup-sku__price-symbol {
font-size: 36rpx;
color: #fa4126;
}

.popup-sku-header
.popup-sku-header__goods-info
.popup-sku__price
.popup-sku__price-max-num {
.popup-sku-header .popup-sku-header__goods-info .popup-sku__price .popup-sku__price-max-num {
font-size: 48rpx;
}

.goods-detail-page .goods-head .goods-detail-page {
.goods-detail-page .goods-head {
--td-swiper-radius: 0;
}

Expand Down
Loading

0 comments on commit e58e060

Please sign in to comment.