预留手机号新加解释,优惠券新增备注,修改部分样式,优化table组件可以传属性

This commit is contained in:
qiaomu 2025-01-21 14:32:41 +08:00
parent 24f2ec9ead
commit 103c10347c
13 changed files with 99 additions and 22 deletions

View File

@ -38,10 +38,27 @@ Component({
that.triggerEvent("change", { id, type: 2 })
})
},
showRemark() {
wx.showModal({
title: '备注',
content: this.data?.data?.remark,
showCancel: false,
complete: (res) => {
if (res.cancel) {
}
if (res.confirm) {
}
}
})
},
handleUseIt() {
alertInfo("敬请期待")
},
async handleUse(e) {
async handleUse() {
const { data } = this.data;
const that = this;
loadingFunc(async () => {

View File

@ -1,6 +1,7 @@
{
"component": true,
"usingComponents": {
"van-button": "@vant/weapp/button/index"
"van-button": "@vant/weapp/button/index",
"van-dialog": "@vant/weapp/dialog/index"
}
}

View File

@ -26,8 +26,8 @@
</view>
</view>
<view class="bottom">
<view class="left">
<view class="left" bind:tap="showRemark">
{{data.remark}}
</view>
<view class="right">
<van-button wx:if="{{type === 1}}" type="info" size="small" bind:tap="handleUse">去领取</van-button>
@ -35,4 +35,5 @@
<van-button wx:if="{{type === 3}}" type="info" size="small" bind:tap="handleUseIt">去使用</van-button>
</view>
</view>
</view>
</view>
<van-dialog id="van-dialog" />

View File

@ -10,7 +10,7 @@
display: flex;
justify-content: space-between;
border-bottom: 1rpx dashed #ccc;
padding-bottom: 20rpx;
padding-bottom: 30rpx;
}
.top .right {
@ -25,7 +25,7 @@
.typeText {
font-weight: 700;
font-size: 42rpx;
font-size: 36rpx;
margin-bottom: 20rpx;
}
@ -51,5 +51,10 @@
.bottom .left {
flex: 1;
font-size: 32rpx;
}
max-width: calc(100vw - 60rpx - 250rpx);
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
font-size: 30rpx;
color: rgba(0, 0, 0, 0.7)
}

View File

@ -27,6 +27,9 @@ Component({
type: String,
value: '#d6e8ff'
},
topColor: String,
topStyle: String,
bodyStyle: String,
maxLine: {
type: Number,
value: 2

View File

@ -8,12 +8,19 @@
</wxs>
<scroll-view hidden="{{!showList.length||!showHeader.length}}" scroll-x class="table1-view" style="--max_line:{{maxLine}};--width:{{getTableWidth(tableWidth)}}">
<view class="table1 d-table table-class">
<view class="d-table-row tr-class">
<view class="d-table-cell th-class" wx:for="{{showHeader}}" wx:key="index">{{item.title}}</view>
<view class="d-table-row tr-class" style="{{topColor ? 'background-color: rgb(242,248,246)' : ''}}">
<view class="d-table-cell th-class" style="{{topStyle}}" wx:for="{{showHeader}}" wx:key="index">{{item.title}}</view>
</view>
<view bindtap="onTap" data-index="{{index}}" bindlongpress="onLongPress" class="tr-class d-table-row {{currentIndex===index?'active':''}} {{index%2===0?'tr-class_even':'tr-class_odd'}}" wx:for="{{showList}}" wx:key="index">
<view class="d-table-cell td-class " wx:for="{{showHeader}}" wx:for-item="head" wx:for-index="hindex" wx:key="hindex" style="background-color: {{item[head.key].bg}};color:{{item[head.key].color}}">
<view class="text">
<view
class="d-table-cell td-class"
wx:for="{{showHeader}}"
wx:for-item="head"
wx:for-index="hindex"
wx:key="hindex"
style="background-color: {{item[head.key].bg}};color:{{item[head.key].color}}"
>
<view class="text" style="{{bodyStyle}}">
{{item[head.key].text}}
</view>
</view>

View File

@ -2,6 +2,7 @@
import { userValidate } from "../../service/user";
import { alertInfo, alertSuccess, loadingFunc, wxLogin } from "../../utils/index";
import request from "../../utils/request"
import Dialog from '@vant/weapp/dialog/dialog';
const { OK } = request;
Page({
@ -112,6 +113,14 @@ Page({
type: 'tenement'
})
},
showTooltip() {
Dialog.alert({
title: '提示',
message: '该手机号为开户时预留的手机号,一般为接收电费欠费短信的管理员手机号。',
}).then(() => {
// on close
});
},
scan() {
wx.scanCode({
scanType: "qrCode",

View File

@ -8,7 +8,8 @@
"van-icon": "@vant/weapp/icon/index",
"van-tab": "@vant/weapp/tab/index",
"van-tabs": "@vant/weapp/tabs/index",
"navigator": "/components/navigator/index"
"navigator": "/components/navigator/index",
"van-dialog": "@vant/weapp/dialog/index"
},
"navigationStyle": "custom"
}

View File

@ -46,11 +46,19 @@
<van-field
required
value="{{ phone }}"
label="预留手机号"
placeholder="请输入预留手机号"
border="{{ true }}"
bind:change="onChangePhone"
/>
>
<view slot="label">
手机号
<van-icon
name="question-o"
style="margin-left: 8rpx;font-size: 36rpx;"
bind:tap="showTooltip"
/>
</view>
</van-field>
<van-field
required
value="{{ name }}"
@ -73,7 +81,7 @@
</view>
</van-tab>
</van-tabs>
<van-dialog id="van-dialog" />
<search-select
show="{{show}}"
title="{{title}}"

View File

@ -1,4 +1,13 @@
<!--pages/meterList/index.wxml-->
<navigator title="电表列表" canBack="{{true}}" />
<view style="margin: 20rpx"> 当前时间:{{ time }} </view>
<table header="{{header}}" list="{{list}}" border="{{true}}" />
<view class="time">{{ time }} </view>
<view style="margin: 0 24rpx;">
<table
header="{{header}}"
list="{{list}}"
border="{{true}}"
topStyle="text-align: center"
bodyStyle="text-align: center"
topColor="rgb(242,248,246)"
/>
</view>

View File

@ -1 +1,10 @@
/* pages/meterList/index.wxss */
/* pages/meterList/index.wxss */
.time {
margin: 20rpx 24rpx;
font-size: 28rpx;
color: rgb(97, 93, 93);
}
page {
background-color: var(--transparent-green);
}

View File

@ -10,6 +10,13 @@
"condition": {
"miniprogram": {
"list": [
{
"name": "pages/discountCoupon/index",
"pathName": "pages/discountCoupon/index",
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "childPackage/pages/electricQuery/index",
"pathName": "childPackage/pages/electricQuery/index",

View File

@ -45,8 +45,8 @@ export function getConfigByEnv() {
switch (envVersion) {
// 开发版
case 'develop':
api = "http://localhost:8000"
// api = "https://zgd.hbhcbn.com/api3"
// api = "http://localhost:8000"
api = "https://zgd.hbhcbn.com/api3"
// api = "https://zgd.hbhcbn.com/api3"
// api = "https://zgd.hbhcbn.com/wxApi"
// api = "http://127.0.0.1:4523/m1/4143821-0-default"