This commit is contained in:
梁朝伟 2022-07-07 14:42:55 +08:00
parent c4fdabca61
commit 2949b75bcd
21 changed files with 129 additions and 241 deletions

View File

@ -1,16 +0,0 @@
{
"navigationBarTitleText": "人员管理",
"usingComponents": {
"l-button": "../../lin-ui/button/index",
"l-card": "../../lin-ui/card/index",
"l-tag": "../../lin-ui/tag/index",
"l-icon": "../../lin-ui/icon/index",
"l-status-show": "../../lin-ui/status-show/index",
"l-search-bar": "../../lin-ui/search-bar/index",
"l-price": "../../lin-ui/price/index",
"divider": "../../components/divider/index",
"fab": "../../components/fab/index",
"l-checkbox": "../../lin-ui/checkbox/index",
"l-message": "../../lin-ui/message/index"
}
}

View File

@ -1,68 +0,0 @@
/** index.wxss **/
@import "../../config/styles/_base.less";
@import "../../config/styles/_mixins.less";
page {
height: 100%;
background-color: @background-color-base;
}
.container {
height: 100%;
display: flex;
flex: 1;
flex-direction: column;
box-sizing: border-box;
align-items: stretch;
padding: 0;
.safe-area-inset-bottom();
}
.search-bar {
background-color: #fff;
padding-top: 10rpx;
padding-bottom: 10rpx;
z-index: 1;
}
.card-view {
margin-top: @size-spacing-small !important;
}
.content {
display: flex;
flex: 1;
flex-direction: column;
font-size: 28rpx;
color: @text-color;
}
.col {
display: flex;
flex-direction: column;
}
.row {
display: flex;
align-items: center;
}
.name {
font-size: @size-font-large;
color: @title-color;
}
.mobile {
font-size: @size-font-base;
color: @text-color;
}
.img {
width: 140rpx;
height: 140rpx;
margin-right: @size-spacing-small;
border-radius: 50%;
background-color: @background-color-base;
}
.card-view {
margin: @size-spacing-small;
padding: @size-spacing-small;
margin-bottom: 0;
background-color: #fff;
}

View File

@ -1,30 +0,0 @@
<!-- index.wxml -->
<view class="container">
<view class="search-bar">
<l-search-bar placeholder="输入手机号" shape="circle" value="{{searchValue}}" bind:lincancel="searchCancel" bind:linclear="searchCancel" bind:linchange="searchChange" bind:linconfirm="searchConfirm" />
</view>
<block wx:if="{{ users && users.length > 0 }}">
<block wx:for="{{users}}" wx:key="index" wx:for-item="item">
<view class="card-view">
<view class="row">
<l-checkbox key="{{item.id || '1'}}" checked="{{false}}"></l-checkbox>
<image mode="aspectFill" class="img" src="{{item.avatar}}" lazy-load></image>
<view class="col">
<text class="name">{{item.name}}</text>
<text class="mobile">{{item.nickname}}</text>
<text class="mobile">{{item.mobile}}</text>
</view>
</view>
</view>
</block>
<block wx:if="{{isRoot}}">
<fab bind:click="goUpsertUser">
<l-icon name="add" type="material" color="#fff" size="48" />
</fab>
</block>
</block>
<block wx:elif="{{isRoot}}">
<l-status-show show="{{true}}" type="data" button-text="添加人员" bind:lintap="goUpsertUser"></l-status-show>
</block>
<l-message type="{{msgType}}" show="{{showMsg}}" content="{{content}}" />
</view>

View File

@ -1,7 +1,7 @@
{
"navigationBarTitleText": "地址列表",
"usingComponents": {
"g-btn": "../../../components/UI/g-btn/index",
"g-panel": "../../../components/UI/g-panel/index"
"l-icon": "../../../lin-ui/icon/index",
"l-button": "../../../lin-ui/button/index"
}
}

View File

@ -1,6 +1,6 @@
/** index.wxss **/
@import "../../../styles/base.less";
@import "../../../styles/mixins.less";
@import "../../../config/styles/_base.less";
@import "../../../config/styles/_mixins.less";
.page-body {
height: 100vh;
@ -16,11 +16,28 @@
display: flex;
flex-direction: column;
align-items: flex-start;
padding: 12rpx;
margin: @size-spacing-base;
padding: @size-spacing-base;
margin-bottom: 0rpx;
background-color: #fff;
}
.upper-container {
display: flex;
align-items: flex-end;
flex-direction: row;
.phone {
size: @size-font-base;
margin-left: @size-spacing-base;
}
.area {
margin-left: @size-spacing-base;
color: @text-color;
}
.row {
display: flex;
flex-wrap: wrap;
}
.btn-view {
display: flex;
justify-content: center;
align-items: center;
}

View File

@ -1,18 +1,19 @@
<!-- index.wxml -->
<view class="page-body">
<g-panel>
<block wx:for="{{addresses}}" wx:key="index">
<view class="item-container">
<view class="upper-container">
<text style="font-size:22px;font-weight:bold">{{item.name}}</text>
<text style="font-size:18px;margin-left: 18px;">{{item.phone}}</text>
</view>
<text style="font-size:14px; margin-top: 6px">{{item.areaText}}</text>
<block wx:for="{{addresses}}" wx:key="index">
<view class="item-container">
<view class="row" style="margin-bottom: 16rpx">
<text class="name">{{item.name}}</text>
<text class="phone">{{item.phone}}</text>
</view>
</block>
</g-panel>
<view class="row">
<l-icon name="address" />
<text class="area">{{item.areaText}}</text>
</view>
</view>
</block>
<view style="flex: 1" />
<g-btn type="primary" size="large" bind:click="goNewAddress">
新建
</g-btn>
<view class="btn-view">
<l-button type="default" size="large" bind:lintap="goNewAddress">新建</l-button>
</view>
</view>

View File

@ -2,9 +2,10 @@
"navigationBarTitleText": "修改地址",
"usingComponents": {
"area-upsert": "../../../components/area/upsert/index",
"g-btn": "../../../components/UI/g-btn/index",
"g-input": "../../../components/UI/g-input/index",
"g-icon": "../../../components/UI/g-icon/index",
"g-panel": "../../../components/UI/g-panel/index"
"l-input": "../../../lin-ui/input/index",
"l-label": "../../../lin-ui/label/index",
"l-textarea": "../../../lin-ui/textarea/index",
"l-list": "../../../lin-ui/list/index",
"l-button": "../../../lin-ui/button/index"
}
}

View File

@ -1,21 +1,20 @@
/** index.wxss **/
@import "../../../styles/base.less";
@import "../../../styles/mixins.less";
@import "../../../config/styles/_base.less";
@import "../../../config/styles/_mixins.less";
.page-body {
height: 100vh;
display: flex;
flex: 1;
flex-direction: column;
background-color: @background-color-base;
background-color: #fff;
box-sizing: border-box;
.safe-area-inset-bottom();
}
.g-cell-hover:extend(.g-cell) {
background-color: gainsboro;
}
.focused {
background-color: pink;
.row {
display: flex;
align-items: center;
margin: 0rpx @size-spacing-small;
justify-content: space-between;
}

View File

@ -1,25 +1,15 @@
<!-- index.wxml -->
<view class="page-body">
<g-panel>
<g-input error="{{!!oakFocused.name}}" oak:value="name" title="收货人" placeholder="姓名" confirm-type="done" bind:change="setValue" />
<g-input error="{{!!oakFocused.phone}}" oak:value="phone" title="手机号" placeholder="11位手机号码" confirm-type="done" bind:change="setValue" />
<view class="g-cell {{oakFocused.areaId}}" hover-class="g-cell-hover" bindtap="callAreaPicker">
<view class="g-input-title">所在地区</view>
<view class="g-input-input" style="display: flex; flex: 1; align-items: center; justify-content:space-between">
<text>{{areaText || '请选择'}}</text>
<g-icon name="chevron_right" />
</view>
</view>
<g-input error="{{!!oakFocused.detail}}" oak:value="detail" title="详细地址" placeholder="精确到门牌号码" confirm-type="done" bind:change="setValue" />
</g-panel>
<l-list title="购物车" />
<l-input required="{{true}}" label="收货人" placeholder="姓名" oak:value="name" confirm-type="done" bind:lininput="setValue" />
<l-input required="{{true}}" label="手机号" placeholder="11位手机号码" oak:value="phone" confirm-type="done" bind:lininput="setValue" />
<l-label required="{{true}}" label="所在地区" placeholder="请选择" oak:value="areaText" bind:lintap="callAreaPicker" confirm-type="done" />
<l-textarea placeholder="详细地址" confirm-type="done" bind:lininput="setValue" oak:value="detail" />
<view style="flex: 1" />
<view style="display:flex;flex-direction:row;align-items:center">
<g-btn type="primary" style="flex: 2" class="{{ oakExecuting ? 'g-btn-loading' : ''}} {{ !oakDirty ? 'g-btn-disabled' : ''}}" disabled="{{oakExecuting || !oakDirty}}" bind:click="confirm">
<view class="g-btn-loading-inner" wx:if="{{oakExecuting}}"></view>
<view class="row">
<l-button width="500" type="default" loading="{{oakExecuting}}" disabled="{{oakExecuting || !oakDirty}}" bind:lintap="confirm">
确定
</g-btn>
<g-btn type="warning" style="flex: 1" disabled="{{!oakDirty}}" bind:click="reset">
重置
</g-btn>
</l-button>
<l-button type="error" disabled="{{!oakDirty}}" bind:lintap="reset">重置</l-button>
</view>
</view>

View File

@ -1,5 +1,6 @@
{
"navigationBarTitleText": "手机号",
"usingComponents": {
"l-button": "../../../lin-ui/button/index"
}
}

View File

@ -1,33 +1,31 @@
/** index.wxss **/
@import "../../../styles/base.less";
@import "../../../config/styles/_base.less";
@import "../../../config/styles/_mixins.less";
.page-body {
height: 100vh;
display: flex;
flex: 1;
flex-direction: column;
box-sizing: border-box;
background-color: @background-color-base;
.safe-area-inset-bottom();
}
.userInfo {
padding: 20rpx;
.container {
display: flex;
flex-direction: column;
flex: 1;
}
.card {
display: flex;
background-color: #fff;
padding: @size-spacing-base;
margin: @size-spacing-base;
margin-bottom: 0;
}
.btn-box {
display: flex;
align-items: center;
background-color: @background-color-base;
}
.avatar {
font-size: 188rpx;
color: @text-color;
height: 200rpx;
width: 200rpx;
border-radius: 20rpx;
}
.nickname {
font-size: @size-font-large;
color: @text-color;
padding-top: @size-spacing-small;
padding-bottom: @size-spacing-base;
justify-content: center;
}

View File

@ -1,24 +1,17 @@
<!-- index.wxml -->
<view class="page-body">
<block wx:if="{{mobiles && mobiles.length > 0}}">
<view class="g-form" style="flex: 1">
<view wx:for="{{mobiles}}" wx:key="index">
<view class="g-form-item">
<view class="g-form-item-label">
{{mobile.mobile}}
</view>
</view>
</view>
<view wx:for="{{mobiles}}" wx:key="index" class="card">
<text>{{item.mobile}}</text>
</view>
</block>
<block wx:else>
<view style="flex:1; display:flex; align-items:center;justify-content:center">
尚未授权手机号
</view>
<view style="flex:1; display:flex; align-items:center;justify-content:center">尚未授权手机号</view>
</block>
<view style="display: flex; flex: 1"></view>
<view class="btn-box">
<button open-type="getPhoneNumber" class="g-btn g-btn-primary g-btn-fullWidth" type="primary" bindgetphonenumber="onRefreshMobile">
<l-button open-type="getPhoneNumber" type="default" size="large" bindgetphonenumber="onRefreshMobile">
授权手机号
</button>
</l-button>
</view>
</view>

View File

@ -1,9 +1,15 @@
/** index.wxss **/
@import "../../../styles/base.less";
@import "../../../config/styles/_base.less";
@import "../../../config/styles/_mixins.less";
.page-body {
display: flex;
flex-direction: column;
align-items: stretch;
background-color: slategrey;
background-color: #fff;
}
.item {
padding: @size-spacing-base;
border-bottom: 1px solid #e0e0e0;
}

View File

@ -1,8 +1,8 @@
<!-- index.wxml -->
<view class="page-body">
<view class="g-panel" style="flex: 1" wx:for="{{arealist}}" wx:key="index">
<view class="g-cell" data-id="{{item.id}}" bindtap="onItemClicked">
<text class="g-cell-label">{{item.name}}</text>
<view wx:for="{{arealist}}" wx:key="index">
<view class="item" data-id="{{item.id}}" bindtap="onItemClicked">
<text>{{item.name}}</text>
</view>
</view>
</view>

View File

@ -1,5 +1,6 @@
/** index.wxss **/
@import "../../../styles/base.less";
@import "../../../config/styles/_base.less";
@import "../../../config/styles/_mixins.less";
page {
height: 100%;

View File

@ -1,10 +1,9 @@
{
"navigationBarTitleText": "个人信息",
"usingComponents": {
"g-btn": "../../../components/UI/g-btn/index",
"component-menu": "@project/components/token/menu/index",
"g-cell": "../../../components/UI/g-cell/index",
"g-panel": "../../../components/UI/g-panel/index",
"g-icon": "../../../components/UI/g-icon/index"
"l-list": "../../../lin-ui/list/index",
"l-icon": "../../../lin-ui/icon/index",
"l-button": "../../../lin-ui/button/index"
}
}

View File

@ -1,6 +1,6 @@
/** index.wxss **/
@import "../../../styles/base.less";
@import "../../../styles/mixins.less";
@import "../../../config/styles/_base.less";
@import "../../../config/styles/_mixins.less";
.page-body {
height: 100vh;

View File

@ -5,36 +5,29 @@
<image class="avatar" src="{{avatar}}" mode="aspectFit" />
</block>
<block wx:else>
<g-icon name="person_outline" size="120"></g-icon>
<l-icon name="person_outline" size="120" />
</block>
<span class="nickname">{{ nickname || '未设置'}}</span>
<block wx:if="{{isLoggedIn && !isPlayingAnother}}">
<g-btn type="primary" size="large" bind:tap="onRefresh" disabled="{{refreshing}}">
<l-button type="default" size="large" bind:lintap="onRefresh" disabled="{{refreshing}}">
更新
</g-btn>
</l-button>
</block>
<block wx:elif="{{!isLoggedIn}}">
<g-btn type="success" size="large" bind:tap="doLogin" disabled="{{refreshing}}">
<l-button type="success" size="large" bind:lintap="doLogin" disabled="{{refreshing}}">
登录
</button>
</l-button>
</block>
</view>
<g-panel g-class="panel">
<g-cell label="手机号" bind:tap="goMyMobile">
<view wx:if="{{mobileCount > 1}}">{{mobileCount}}条手机号</view>
<view wx:elif="{{mobileCount === 1}}">{{mobile}}</view>
<view wx:else>未设置</view>
</g-cell>
<component-menu
g-cell="g-cell"
g-cell-content-right="g-cell-content-right"
g-cell-label="g-cell-label"
g-cell-content="g-cell-content"
material-symbols-rounded="material-symbols-rounded"
/>
<view style="flex:1" />
<block wx:if="{{isRoot}}">
<g-cell label="用户管理" bind:tap="goUserManage"></g-cell>
</block>
</g-panel>
<view class="cell">
<l-list title="手机号" is-link="true">
<view slot="right-section">
<view wx:if="{{mobileCount > 1}}">{{mobileCount}}条手机号</view>
<view wx:elif="{{mobileCount === 1}}">{{mobile}}</view>
<view wx:else>未设置</view>
</view>
</l-list>
<component-menu />
<l-list title="用户管理" bind:lintap="goUserManage" />
</view>
</view>

View File

@ -1,5 +1,6 @@
/** index.wxss **/
@import "../../../../styles/base.less";
@import "../../../../config/styles/_base.less";
@import "../../../../config/styles/_mixins.less";
.page-body {
height: 100vh;
@ -11,7 +12,7 @@
.user-state {
padding: 10rpx;
font-size: @size-font-small;
font-size: @size-font-mini;
color: white;
align-self: flex-start;
background-color: @error-color;
@ -28,7 +29,7 @@
.id-state {
padding: 10rpx;
font-size: @size-font-small;
font-size: @size-font-mini;
color: white;
align-self: flex-start;
background-color: @error-color;

View File

@ -1,5 +1,6 @@
/** index.wxss **/
@import "../../../styles/base.less";
@import "../../../config/styles/_base.less";
@import "../../../config/styles/_mixins.less";
.page-body {
height: 100vh;
@ -25,7 +26,7 @@
.user-state {
margin-right: 20rpx;
padding: 10rpx;
font-size: @size-font-small;
font-size: @size-font-mini;
color: white;
align-self: flex-start;
&-shadow:extend(.user-state) {

View File

@ -1,5 +1,6 @@
/** index.wxss **/
@import "../../../../styles/base.less";
@import "../../../../config/styles/_base.less";
@import "../../../../config/styles/_mixins.less";
.page-body {
height: 100vh;