样式优化
Showing
11 changed files
with
59 additions
and
22 deletions
| ... | @@ -27,6 +27,7 @@ page { | ... | @@ -27,6 +27,7 @@ page { |
| 27 | .mt10{margin-top: 10rpx !important;} | 27 | .mt10{margin-top: 10rpx !important;} |
| 28 | .ml10{margin-left: 10rpx !important;} | 28 | .ml10{margin-left: 10rpx !important;} |
| 29 | .mt20{margin-top: 20px !important;} | 29 | .mt20{margin-top: 20px !important;} |
| 30 | .p020{padding: 0 20rpx !important;} | ||
| 30 | .must{color: #AD181F;font-size: 24rpx;} | 31 | .must{color: #AD181F;font-size: 24rpx;} |
| 31 | .vipData .w50{width: 45%;} | 32 | .vipData .w50{width: 45%;} |
| 32 | .esp{text-overflow: ellipsis;overflow: hidden;white-space: nowrap;margin-top: 16rpx;} | 33 | .esp{text-overflow: ellipsis;overflow: hidden;white-space: nowrap;margin-top: 16rpx;} | ... | ... |
| ... | @@ -42,7 +42,7 @@ | ... | @@ -42,7 +42,7 @@ |
| 42 | <view> | 42 | <view> |
| 43 | 政策优惠 | 43 | 政策优惠 |
| 44 | <view> | 44 | <view> |
| 45 | <text class="text-danger"> {{ item.discount ? item.discount : '--' }}</text> | 45 | <text class="text-danger"> {{ item.discount ? '¥' + (Number(item.discount) || 0).toFixed(2) : '--' }}</text> |
| 46 | </view> | 46 | </view> |
| 47 | </view> | 47 | </view> |
| 48 | <view> | 48 | <view> | ... | ... |
| ... | @@ -21,7 +21,7 @@ | ... | @@ -21,7 +21,7 @@ |
| 21 | </view> | 21 | </view> |
| 22 | <view class="w50"> | 22 | <view class="w50"> |
| 23 | 政策优惠: | 23 | 政策优惠: |
| 24 | <text>{{ form?.discount }}元</text> | 24 | <text>{{ form?.discount ? '¥' + (Number(form?.discount) || 0).toFixed(2) : '--' }}元</text> |
| 25 | </view> | 25 | </view> |
| 26 | <view class="w50"> | 26 | <view class="w50"> |
| 27 | 付款费用: | 27 | 付款费用: | ... | ... |
| ... | @@ -77,7 +77,7 @@ | ... | @@ -77,7 +77,7 @@ |
| 77 | <view class="price-section"> | 77 | <view class="price-section"> |
| 78 | <view class="price-row"> | 78 | <view class="price-row"> |
| 79 | <text class="price-label">政策优惠</text> | 79 | <text class="price-label">政策优惠</text> |
| 80 | <text class="price-value">{{ item.discount || '--' }}</text> | 80 | <text class="price-value">{{ item.discount ? '¥' + (Number(item.discount) || 0).toFixed(2) : '--' }}</text> |
| 81 | </view> | 81 | </view> |
| 82 | <view class="price-row"> | 82 | <view class="price-row"> |
| 83 | <text class="price-label">付款费用</text> | 83 | <text class="price-label">付款费用</text> | ... | ... |
| ... | @@ -33,7 +33,7 @@ | ... | @@ -33,7 +33,7 @@ |
| 33 | <view class="fee-row"> | 33 | <view class="fee-row"> |
| 34 | <view class="fee-item"> | 34 | <view class="fee-item"> |
| 35 | <text class="fee-label">政策优惠:</text> | 35 | <text class="fee-label">政策优惠:</text> |
| 36 | <text class="fee-value text-red">¥{{ (Number(orderInfo.discount) || 0).toFixed(2) }}</text> | 36 | <text class="fee-value text-red">{{ orderInfo.discount ? '¥' + (Number(orderInfo.discount) || 0).toFixed(2) : '--' }}</text> |
| 37 | </view> | 37 | </view> |
| 38 | <view class="fee-item"> | 38 | <view class="fee-item"> |
| 39 | <text class="fee-label">付款费用:</text> | 39 | <text class="fee-label">付款费用:</text> | ... | ... |
| ... | @@ -44,7 +44,7 @@ | ... | @@ -44,7 +44,7 @@ |
| 44 | <view> | 44 | <view> |
| 45 | 政策优惠 | 45 | 政策优惠 |
| 46 | <view> | 46 | <view> |
| 47 | <text class="text-danger"> {{ item.discount ? item.discount : '--' }}</text> | 47 | <text class="text-danger"> {{ item.discount ? '¥' + (Number(item.discount) || 0).toFixed(2) : '--' }}</text> |
| 48 | </view> | 48 | </view> |
| 49 | </view> | 49 | </view> |
| 50 | <view> | 50 | <view> | ... | ... |
| ... | @@ -27,22 +27,22 @@ | ... | @@ -27,22 +27,22 @@ |
| 27 | <view class="bank-row"> | 27 | <view class="bank-row"> |
| 28 | <text class="bank-label">收款人姓名</text> | 28 | <text class="bank-label">收款人姓名</text> |
| 29 | <text class="bank-value">秦琦五洋赫公司</text> | 29 | <text class="bank-value">秦琦五洋赫公司</text> |
| 30 | <text class="copy-btn" @click="handelCoPy('秦琦五洋赫公司')">复制</text> | 30 | <!-- <view class="copy-btn" @tap.stop="handleCopy('秦琦五洋赫公司')">复制</view> --> |
| 31 | </view> | 31 | </view> |
| 32 | <view class="bank-row"> | 32 | <view class="bank-row"> |
| 33 | <text class="bank-label">收款银行</text> | 33 | <text class="bank-label">收款银行</text> |
| 34 | <text class="bank-value">中国民生银行</text> | 34 | <text class="bank-value">中国民生银行</text> |
| 35 | <text class="copy-btn" @click="handelCoPy('中国民生银行')">复制</text> | 35 | <!-- <view class="copy-btn" @tap.stop="handleCopy('中国民生银行')">复制</view> --> |
| 36 | </view> | 36 | </view> |
| 37 | <view class="bank-row"> | 37 | <view class="bank-row"> |
| 38 | <text class="bank-label">收款卡号</text> | 38 | <text class="bank-label">收款卡号</text> |
| 39 | <text class="bank-value card-number">{{ form.ziZhangBu || '-' }}</text> | 39 | <text class="bank-value card-number">{{ form.ziZhangBu || '-' }}</text> |
| 40 | <text class="copy-btn" @click="handelCoPy(form.ziZhangBu)">复制</text> | 40 | <!-- <view class="copy-btn" @tap.stop="handleCopy(form.ziZhangBu)">复制</view> --> |
| 41 | </view> | 41 | </view> |
| 42 | <view class="bank-row"> | 42 | <view class="bank-row"> |
| 43 | <text class="bank-label">收款金额</text> | 43 | <text class="bank-label">收款金额</text> |
| 44 | <text class="bank-value highlight">¥{{ form.price || '0.00' }}</text> | 44 | <text class="bank-value highlight">¥{{ form.price || '0.00' }}</text> |
| 45 | <text class="copy-btn" @click="handelCoPy(form.price)">复制</text> | 45 | <!-- <view class="copy-btn" @tap.stop="handleCopy(form.price)">复制</view> --> |
| 46 | </view> | 46 | </view> |
| 47 | </view> | 47 | </view> |
| 48 | 48 | ||
| ... | @@ -105,20 +105,55 @@ async function getOrderDetail() { | ... | @@ -105,20 +105,55 @@ async function getOrderDetail() { |
| 105 | } | 105 | } |
| 106 | } | 106 | } |
| 107 | 107 | ||
| 108 | function handelCoPy(text) { | 108 | function requestPrivacyAuthorize() { |
| 109 | if (!text || text === '-') { | 109 | return new Promise((resolve, reject) => { |
| 110 | uni.showToast({ title: '暂无内容可复制', icon: 'none' }) | 110 | // #ifdef MP-WEIXIN |
| 111 | if (typeof wx !== 'undefined' && typeof wx.requirePrivacyAuthorize === 'function') { | ||
| 112 | wx.requirePrivacyAuthorize({ | ||
| 113 | success: () => resolve(), | ||
| 114 | fail: (err) => reject(err) | ||
| 115 | }) | ||
| 111 | return | 116 | return |
| 112 | } | 117 | } |
| 118 | // #endif | ||
| 119 | resolve() | ||
| 120 | }) | ||
| 121 | } | ||
| 122 | |||
| 123 | function doCopy(value) { | ||
| 124 | return new Promise((resolve, reject) => { | ||
| 113 | uni.setClipboardData({ | 125 | uni.setClipboardData({ |
| 114 | data: String(text), | 126 | data: String(value), |
| 115 | success: () => { | 127 | success: () => { |
| 116 | uni.showToast({ title: '复制成功', icon: 'success' }) | 128 | uni.showToast({ title: '复制成功', icon: 'success' }) |
| 129 | resolve() | ||
| 117 | }, | 130 | }, |
| 118 | fail: () => { | 131 | fail: (err) => reject(err) |
| 119 | uni.showToast({ title: '复制失败', icon: 'none' }) | 132 | }) |
| 133 | }) | ||
| 134 | } | ||
| 135 | |||
| 136 | async function handleCopy(text) { | ||
| 137 | const value = text === 0 ? '0' : (text ?? '') | ||
| 138 | if (value === '' || value === '-') { | ||
| 139 | uni.showToast({ title: '暂无内容可复制', icon: 'none' }) | ||
| 140 | return | ||
| 120 | } | 141 | } |
| 142 | try { | ||
| 143 | await requestPrivacyAuthorize() | ||
| 144 | await doCopy(value) | ||
| 145 | } catch (err) { | ||
| 146 | console.error('复制失败', err) | ||
| 147 | if (err && err.errno === 112) { | ||
| 148 | uni.showModal({ | ||
| 149 | title: '复制失败', | ||
| 150 | content: '当前小程序未完成“剪贴板”隐私声明,请在微信公众平台更新用户隐私保护指引后重试。', | ||
| 151 | showCancel: false | ||
| 121 | }) | 152 | }) |
| 153 | return | ||
| 154 | } | ||
| 155 | uni.showToast({ title: '复制失败', icon: 'none' }) | ||
| 156 | } | ||
| 122 | } | 157 | } |
| 123 | 158 | ||
| 124 | function handelClose() { | 159 | function handelClose() { | ... | ... |
| ... | @@ -29,7 +29,7 @@ | ... | @@ -29,7 +29,7 @@ |
| 29 | { | 29 | { |
| 30 | "path": "pages/index/msgList", | 30 | "path": "pages/index/msgList", |
| 31 | "style": { | 31 | "style": { |
| 32 | "navigationBarTitleText": "待办列表", | 32 | "navigationBarTitleText": "通知公告", |
| 33 | "enablePullDownRefresh": false | 33 | "enablePullDownRefresh": false |
| 34 | } | 34 | } |
| 35 | }, | 35 | }, | ... | ... |
| ... | @@ -37,7 +37,7 @@ | ... | @@ -37,7 +37,7 @@ |
| 37 | <image :src="config.loginImage_api + '/fs/static/dg/icon05@3x.png'" class="btn-icon"></image> | 37 | <image :src="config.loginImage_api + '/fs/static/dg/icon05@3x.png'" class="btn-icon"></image> |
| 38 | <text>考点申请</text> | 38 | <text>考点申请</text> |
| 39 | </view> | 39 | </view> |
| 40 | <view class="unit-btn" @click="goPath(`/myCenter/examPointApplyList?status=1}`)"> | 40 | <view class="unit-btn" @click="goPath('/myCenter/examPointApplyList?status=1')"> |
| 41 | <image :src="config.loginImage_api + '/fs/static/dg/icon06@3x.png'" class="btn-icon"></image> | 41 | <image :src="config.loginImage_api + '/fs/static/dg/icon06@3x.png'" class="btn-icon"></image> |
| 42 | <text>考点详情</text> | 42 | <text>考点详情</text> |
| 43 | </view> | 43 | </view> | ... | ... |
| ... | @@ -3,15 +3,15 @@ | ... | @@ -3,15 +3,15 @@ |
| 3 | <z-paging ref="paging" v-model="dataList" @query="queryList" emptyViewImg="/static/nodata.png"> | 3 | <z-paging ref="paging" v-model="dataList" @query="queryList" emptyViewImg="/static/nodata.png"> |
| 4 | <!-- z-paging默认铺满全屏,此时页面所有view都应放在z-paging标签内,否则会被盖住 --> | 4 | <!-- z-paging默认铺满全屏,此时页面所有view都应放在z-paging标签内,否则会被盖住 --> |
| 5 | <!-- 需要固定在页面顶部的view请通过slot="top"插入,包括自定义的导航栏 --> | 5 | <!-- 需要固定在页面顶部的view请通过slot="top"插入,包括自定义的导航栏 --> |
| 6 | <uni-section title="通知公告" padding> | 6 | <!-- <uni-section title="通知公告" padding> --> |
| 7 | <view class="msglist"> | 7 | <view class="msglist mt20 p020"> |
| 8 | <view class="msgitem" v-for="n in dataList" :key="n.id" @click="goDetail(n)"> | 8 | <view class="msgitem" v-for="n in dataList" :key="n.id" @click="goDetail(n)"> |
| 9 | <!-- <text class="dot" :class="{'done':n.readFlag=='1'}"></text> --> | 9 | <!-- <text class="dot" :class="{'done':n.readFlag=='1'}"></text> --> |
| 10 | <view class="tt esp">{{n.name}}</view> | 10 | <view class="tt esp">{{n.name}}</view> |
| 11 | <view class="date">{{ n.belongTime }}</view> | 11 | <view class="date">{{ n.belongTime }}</view> |
| 12 | </view> | 12 | </view> |
| 13 | </view> | 13 | </view> |
| 14 | </uni-section> | 14 | <!-- </uni-section> --> |
| 15 | </z-paging> | 15 | </z-paging> |
| 16 | </view> | 16 | </view> |
| 17 | </template> | 17 | </template> | ... | ... |
| ... | @@ -25,17 +25,18 @@ | ... | @@ -25,17 +25,18 @@ |
| 25 | 25 | ||
| 26 | <view class="wBox"> | 26 | <view class="wBox"> |
| 27 | <!-- <view class="tt">{{ // form.paymentName }}</view>--> | 27 | <!-- <view class="tt">{{ // form.paymentName }}</view>--> |
| 28 | <view class="info"> | 28 | <!-- <view class="info"> |
| 29 | <view>共 | 29 | <view>共 |
| 30 | <text>{{ list.length }}</text> | 30 | <text>{{ list.length }}</text> |
| 31 | 人 | 31 | 人 |
| 32 | </view> | 32 | </view> |
| 33 | </view> | 33 | </view> --> |
| 34 | <view class="userlist"> | 34 | <view class="userlist"> |
| 35 | <view v-for="(n,index) in list" :key="index" class="item"> | 35 | <view v-for="(n,index) in list" :key="index" class="item"> |
| 36 | <view> | 36 | <view> |
| 37 | <view class="name">{{ n.perName }} | 37 | <view class="name">{{ n.perName }} |
| 38 | <text v-if="n.memberInfoName">({{ n.memberInfoName || '' }})</text> | 38 | <text v-if="n.memberInfoName">({{ n.memberInfoName || '' }})</text> |
| 39 | <text v-if="n.perIdcCode">{{ n.perIdcCode || '' }}</text> | ||
| 39 | </view> | 40 | </view> |
| 40 | <view class="date">原有效期至 {{ n.originValidityDate ? n.originValidityDate.slice(0, 10) : '--' }}</view> | 41 | <view class="date">原有效期至 {{ n.originValidityDate ? n.originValidityDate.slice(0, 10) : '--' }}</view> |
| 41 | </view> | 42 | </view> | ... | ... |
-
Please register or sign in to post a comment