fuwei 5 лет назад
Родитель
Сommit
217da0914d

+ 128 - 30
ghs/src/admin/home/me.vue

@@ -1,54 +1,102 @@
 <template>
     <view class="me-content_box app-content">
         <image :src="`${constant.imgUrl}/ghs/me/bg.png`" class="me-content_bg"></image>
-        <view class="me-user_box">
-            <view class="user-info_item">
-                <view>
-                    <view class="name">
-                        石少华
-                    </view>
-                    <view class="mobile">
-                        1734454545
+        <template v-if="!$util.isEmpty(infoData)">
+            <view class="me-user_box">
+                <view class="user-info_item">
+                    <view>
+                        <view class="name">
+                            {{infoData.adminName}}
+                        </view>
+                        <view class="mobile">
+                            {{infoData.adminMobile}}
+                        </view>
                     </view>
+                    <!-- <i class="iconfont iconxiangyou"></i> -->
                 </view>
-                <i class="iconfont iconxiangyou"></i>
             </view>
-        </view>
-        <view class="me-shop_box">
-            <view class="me-shop_content content_box">
-                <view class="me-shop_top">
-                    <view class="shop-top_left">
-                       <app-avatar-module src="https://imgm.gmw.cn/attachement/jpg/site215/20210129/3570070943574738873.jpg" :width="100"/> 
-                       <view class="top-info_box">
-                            <view >
-                                纯彩花艺
-                            </view>
-                            <view>
-                                集美店
-                            </view>
-                       </view>
+            <view class="me-shop_box">
+                <view class="me-shop_content content_box">
+                    <view class="me-shop_top">
+                        <view class="shop-top_left">
+                        <app-avatar-module src="https://imgm.gmw.cn/attachement/jpg/site215/20210129/3570070943574738873.jpg" :width="100"/> 
+                        <view class="top-info_box">
+                                <view >
+                                    {{infoData.sjName}}
+                                </view>
+                                <view>
+                                    {{infoData.shopName}}
+                                </view>
+                        </view>
+                        </view>
+                        <view class="chang-shop_btn">
+                            <i class="iconfont iconqiehuan1"></i>
+                            切换店铺
+                        </view>
+                    </view>
+                    <view class="image-box">
+                        <view class="dec">
+                            店铺服务期至: {{infoData.deadline}}
+                        </view>
+                        <image :src="`${constant.imgUrl}/ghs/me/upgrade.png`"></image>
+                    </view>
+                
+                </view>
+                <view class="account-info_box content_box">
+                    <view class="info-lf_box">
+                        <view>
+                            账户余额(元)
+                        </view>
+                        <view>
+                        <text>¥ </text> {{infoData.balance}}
+                        </view>
+                        <view>
+                            累计收益 ¥ {{infoData.totalIncome}}
+                        </view>
                     </view>
-                    <view class="chang-shop_btn">
-                        <i class="iconfont iconqiehuan1"></i>
-                        切换店铺
+                    <button class="admin-button-com default" >提现</button>
+                </view>
+                <view class="module-com content_box user-open_bx">
+                    <view class="input-line-wrap">
+                        <tui-list-cell @click="pageTo({url:'/pagesStore/me/withdraw'})" class="line-cell" :hover="false" :arrow="true">
+                            <div class="tui-title">提现记录</div>
+                        <!-- <input v-model="form.name" placeholder-class="phcolor" class="tui-input" name="name" placeholder="请输入" maxlength="50" type="text" /> -->
+                        </tui-list-cell>
+                        <tui-list-cell @click="pageTo({url:'/pagesStore/me/incomeExpenses'})" class="line-cell" :hover="false" :arrow="true">
+                            <div class="tui-title">收支明细</div>
+                        <!-- <input v-model="form.name" placeholder-class="phcolor" class="tui-input" name="name" placeholder="请输入" maxlength="50" type="text" /> -->
+                        </tui-list-cell>
                     </view>
                 </view>
-                <image :src="`${constant.imgUrl}/ghs/me/upgrade.png`"></image>
             </view>
-        </view>
+        </template>  
     </view>
 </template>
 
 <script>
     import AppAvatarModule from '@/components/module/app-avatar'
+    import TuiListCell from '@/components/plugin/list-cell'
+    import { mainMy } from '@/api/home'
     export default { // 我的
         name:"Me",
         components:{
-            AppAvatarModule
+            AppAvatarModule,
+            TuiListCell
         },
         data(){
             return {
                 constant: this.$constant,
+                infoData: {}
+            }
+        },
+        methods:{
+           async init(){
+                try {
+                    const { data } = await mainMy()
+                    this.infoData = data
+                } finally {
+
+                }
             }
         }
     }
@@ -140,11 +188,61 @@
                         }
                     }
                 }
-                & > image {
+                & > .image-box {
                     width: 100%;
                     height: 70upx;
+                    position: relative;
+                    & > .dec {
+                        color: #FFFFFF;
+                        font-size: 24upx;
+                        font-weight: 500;
+                        position: absolute;
+                        top: 50%;
+                        left: 20upx;
+                        transform: translate(0,-50%);
+                    }
+                    & > image {
+                        width: 100%;
+                        height: 100%;
+                    }
+                }
+            }
+        }
+        & .account-info_box {
+            margin-top: 20upx;
+            padding: 30upx 20upx;
+            display: flex;
+            & .info-lf_box {
+                flex: 1;
+                & > view:nth-child(1),& > view:nth-child(3) {
+                    font-weight: 400;
+                    font-size: 24upx;
                 }
+                 & > view:nth-child(1) {
+                     color: #999999;
+                 }
+                 & > view:nth-child(2) {
+                     color: #333333;
+                     font-size: 60upx;
+                     font-weight: bold;
+                     margin: 30upx 0;
+                     & > text {
+                         font-size: 24px;
+                     }
+                 }
+                 & > view:nth-child(3) {
+                     color: #666666;
+                 }
             }
+            & > .admin-button-com {
+                width: 120upx;
+                height: 50upx;
+                border-radius: 25upx;
+            }
+        }
+        & .user-open_bx {
+            margin-top: 20px;
+            border-radius: 10px;
         }
     }
 </style>

+ 4 - 0
ghs/src/api/home/index.js

@@ -6,3 +6,7 @@ import https from '@/plugins/luch-request_0.0.7/request'
 export const getMainIndex = data => {
 	return https.get('/main/index', data)
 }
+// 我的
+export const mainMy = async (data) => {
+	return https.get("/main/my", data);
+};

+ 4 - 0
ghs/src/api/store/index.js

@@ -0,0 +1,4 @@
+import https from '@/plugins/luch-request_0.0.7/request'
+// export const mainMy = async (data) => {
+// 	return https.get("/main/my", data);
+// };

+ 17 - 0
ghs/src/pages.json

@@ -145,6 +145,23 @@
 				}
 			]
 		},
+		{
+			"root": "pagesStore",
+			"pages": [
+				{
+					"path": "me/withdraw",
+					"style": {
+						"navigationBarTitleText": "提现记录"
+					}	
+				},
+				{
+					"path": "me/incomeExpenses",
+					"style": {
+						"navigationBarTitleText": "收支记录"
+					}	
+				}
+			]
+		},
 		{
 			"root": "admin/order",
 			"pages": [

+ 135 - 0
ghs/src/pagesStore/components/table.vue

@@ -0,0 +1,135 @@
+<template>
+	<view class="table-view">
+		<view
+			class="table-header"
+			:style="{ backgroundColor: headerBackgroundColor }"
+		>
+			<view
+				class="table-th"
+				v-for="(item, index) in columns"
+				:key="index"
+				:style="{
+					flex: item.width ? `0 0 ${item.width}rpx` : '1',
+					textAlign: item.align || 'left',
+					fontSzie: `${headerFontSize}rpx`,
+					margin: `0 ${gutter}rpx`
+				}"
+			>
+				<!-- <slot :name="item.dataIndex" > -->
+				{{ item.name || "" }}
+				<!-- </slot> -->
+			</view>
+		</view>
+		<view class="table-tr" v-for="(item, index) in dataList" :key="index">
+			<view
+				class="table-td"
+				v-for="(column, columnIndex) in columns"
+				:key="columnIndex"
+				:style="{
+					flex: column.width ? `0 0 ${column.width}rpx` : '1',
+					textAlign: column.align || 'left',
+					fontSzie: `${fontSize}rpx`,
+					margin: `0 ${gutter}rpx`
+				}"
+			>
+				<!-- {{ item[column.dataIndex] || "" }} -->
+
+				<slot
+					v-if="column.custom"
+					:row="item"
+					:column="column"
+					:index="index"
+					:parentData="parentData"
+				>
+					{{ item[column.dataIndex] || "" }}
+				</slot>
+				<text v-else :class="[column.color || '']">
+					{{ (column.dataIndex && item[column.dataIndex]) || "" }}
+				</text>
+			</view>
+		</view>
+	</view>
+</template>
+<script>
+export default {
+	props: {
+		parentData: {},
+		columns: {
+			type: Array,
+			default: []
+		},
+		dataList: {
+			type: Array,
+			default: []
+		},
+		headerBackgroundColor: {
+			type: String,
+			default: "#ffffff"
+		},
+		fontSize: {
+			type: Number,
+			default: 24
+		},
+		headerFontSize: {
+			type: Number,
+			default: 24
+		},
+		gutter: {
+			type: Number,
+			default: 10
+		}
+	},
+	mounted() {
+		for (let index = 0; index < this.$children.length; index++) {
+			const element = this.$children[index];
+			console.log(33333, element, element.$attrs);
+		}
+	},
+	methods: {
+		childrenItem(name) {
+			let item = null;
+			for (let index = 0; index < this.$children.length; index++) {
+				const element = this.$children[index];
+				if (element.$options.name == "table-item") {
+				}
+			}
+			return;
+		}
+	}
+};
+</script>
+<style lang="scss" scoped>
+.table-view {
+	.table-header {
+		display: flex;
+		padding: 20upx 30upx;
+
+		box-shadow: 0px 1px 0px 0px #eeeeee;
+		color: #999999;
+		.table-th {
+			white-space: nowrap;
+		}
+	}
+	.table-tr {
+		display: flex;
+		align-items: center;
+		padding: 20upx 30upx;
+		border-bottom: 1px solid #eeeeee;
+		color: #999999;
+		.table-td {
+			.warn {
+				color: #ffaf1d;
+			}
+			.fail {
+				color: #f51608;
+			}
+			.success {
+				color: #09bb07;
+			}
+			.info {
+				color: #333;
+			}
+		}
+	}
+}
+</style>

+ 15 - 0
ghs/src/pagesStore/me/incomeExpenses.vue

@@ -0,0 +1,15 @@
+<template>
+    <div>
+        收支
+    </div>
+</template>
+
+<script>
+    export default {
+        name:'IncomeExpenses' // 收支
+    }
+</script>
+
+<style lang="scss" scoped>
+
+</style>

+ 15 - 0
ghs/src/pagesStore/me/withdraw.vue

@@ -0,0 +1,15 @@
+<template>
+    <div>
+        明细
+    </div>
+</template>
+
+<script>
+    export default {
+        name:'withDraw' //提现记录
+    }
+</script>
+
+<style lang="scss" scoped>
+
+</style>