0d5a6da8 by lttnew

样式优化

1 parent 4dd6e009
...@@ -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,8 +44,8 @@ ...@@ -44,8 +44,8 @@
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>
51 付款费用 51 付款费用
......
...@@ -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 // #ifdef MP-WEIXIN
111 if (typeof wx !== 'undefined' && typeof wx.requirePrivacyAuthorize === 'function') {
112 wx.requirePrivacyAuthorize({
113 success: () => resolve(),
114 fail: (err) => reject(err)
115 })
116 return
117 }
118 // #endif
119 resolve()
120 })
121 }
122
123 function doCopy(value) {
124 return new Promise((resolve, reject) => {
125 uni.setClipboardData({
126 data: String(value),
127 success: () => {
128 uni.showToast({ title: '复制成功', icon: 'success' })
129 resolve()
130 },
131 fail: (err) => reject(err)
132 })
133 })
134 }
135
136 async function handleCopy(text) {
137 const value = text === 0 ? '0' : (text ?? '')
138 if (value === '' || value === '-') {
110 uni.showToast({ title: '暂无内容可复制', icon: 'none' }) 139 uni.showToast({ title: '暂无内容可复制', icon: 'none' })
111 return 140 return
112 } 141 }
113 uni.setClipboardData({ 142 try {
114 data: String(text), 143 await requestPrivacyAuthorize()
115 success: () => { 144 await doCopy(value)
116 uni.showToast({ title: '复制成功', icon: 'success' }) 145 } catch (err) {
117 }, 146 console.error('复制失败', err)
118 fail: () => { 147 if (err && err.errno === 112) {
119 uni.showToast({ title: '复制失败', icon: 'none' }) 148 uni.showModal({
149 title: '复制失败',
150 content: '当前小程序未完成“剪贴板”隐私声明,请在微信公众平台更新用户隐私保护指引后重试。',
151 showCancel: false
152 })
153 return
120 } 154 }
121 }) 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>
...@@ -20,9 +20,9 @@ ...@@ -20,9 +20,9 @@
20 import { 20 import {
21 ref 21 ref
22 } from 'vue' 22 } from 'vue'
23 import * as api from '@/common/api.js'; 23 import * as api from '@/common/api.js';
24 import { 24 import {
25 onLoad 25 onLoad
26 } from '@dcloudio/uni-app'; 26 } from '@dcloudio/uni-app';
27 const dataList = ref([]) 27 const dataList = ref([])
28 const paging = ref(null) 28 const paging = ref(null)
...@@ -37,10 +37,10 @@ ...@@ -37,10 +37,10 @@
37 }) 37 })
38 38
39 } 39 }
40 function goDetail(n){ 40 function goDetail(n){
41 uni.navigateTo({ 41 uni.navigateTo({
42 url: `/pages/index/newsDetail?noteId=${n.noteId}` 42 url: `/pages/index/newsDetail?noteId=${n.noteId}`
43 }); 43 });
44 } 44 }
45 function readMessage(item) { 45 function readMessage(item) {
46 uni.navigateTo({ 46 uni.navigateTo({
......
...@@ -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>
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!