first commit

This commit is contained in:
编码猿
2024-09-27 01:32:49 +08:00
commit 28ebe05a64
7399 changed files with 1174529 additions and 0 deletions

View File

@@ -0,0 +1 @@
f5c9f161-c78b-40e4-8986-3fd4f283478e

View File

@@ -0,0 +1,101 @@
// pages/home/home.js
const app = getApp();
const regeneratorRuntime = app.loadAsync()
const http = app.loadHttp()
const model = app.loadModel("index")
const util = app.loadUtils("util")
Component({
/**
* 组件的属性列表
*/
properties: {
},
/**
* 组件的初始数据
*/
data: {
system: app.globalData.system, //设备相关信息
pageTitle: "我的", //头部标题
titleColor: { //头部背景和文字颜色
bColor: "#1dbf53",
tColor: "#ffffff"
},
userInfo: {},//用户信息
},
created() {
this.getUserInfo()
app.setWatching('userInfo', (v) => {
this.setData({
userInfo: v
});
});
},
/**
* 组件的方法列表
*/
methods: {
// 获取个人信息
async getUserInfo() {
let rel = await model.storage.getSetting("userInfo")
this.setData({
userInfo: rel
})
},
// 列表跳转
async jump(e) {
let url = e.currentTarget.dataset.url
let isLog = e.currentTarget.dataset.islog //控制跳转到登陆为1时不让他跳转到登陆
let type = e.currentTarget.dataset.type
let userInfo = this.data.userInfo
let getSetting = await model.getauth.getSetting() //获取已经授权的信息
if (isLog == '3' && !getSetting.authSetting['scope.userLocation']) {
// 用户取消授权的处理
wx.showModal({
title: '你拒绝了地理位置授权',
content: '请点击确定,到权限表设置',
success(res) {
if (res.confirm) {
wx.openSetting()
}
}
})
return
}
if (!isLog) {
let isLogin = await util.isLoginJump()
if (isLogin == 1) return;
}
if ((userInfo['telnum'] == "未授权手机号" || userInfo['telnum'] == '') && type == 5) {
wx.navigateTo({
url: '/pages/login/login'
})
return
}
if (type == 1 && userInfo.isLogistics == 2) {
wx.navigateTo({
url: '/view/logistics/appLogistics/appLogistics'
})
return
} else if (type == 1 && userInfo.isLogistics == 3) {
wx.showToast({
title: '你已申请成为小马哥,请耐心等待后台人员确认!',
icon: 'none',
duration: 2000
})
return
}
wx.navigateTo({
url: url
})
},
goTelnum(e){
if (e.currentTarget.dataset.telnum == '点击授权手机号'){
wx.navigateTo({
url:'/pages/login/login'
})
}
}
}
})

View File

@@ -0,0 +1,5 @@
{
"navigationBarTextStyle":"white",
"component": true,
"usingComponents": {}
}

View File

@@ -0,0 +1,183 @@
<!-- 头部导航 -->
<nav-bar pageTitle="{{pageTitle}}" system="{{system}}" titleColor="{{titleColor}}" />
<!-- pages/home/home.wxml -->
<view class="home">
<view class="userInfo" data-url="/user/setUp/setUp" catchtap="jump">
<view class="userImg">
<open-data type="userAvatarUrl" />
</view>
<view class="user-title">
<view>
<view class="name">
{{userInfo.nickname || '请登录'}}
<span wx:if="{{!!userInfo.nickname}}" data-url="/user/balance/balance" catchtap="jump">
会员卡
</span>
</view>
<view class="tel" data-telnum="{{userInfo.telnum}}" catchtap="goTelnum">{{ !!userInfo.nickname ? userInfo.telnum : '登录后享受完成功能'}}</view>
</view>
</view>
<view class="user-go">
<image src="/static/img/icon/DASD_03.png" />
</view>
</view>
<!-- 资产 -->
<view class="capital">
<view class="capital-row flex-con3 capital-row-c" data-url="/user/couponExchange/couponExchange" bind:tap="jump">
<view class="cap-cen">
<view class="cap-title verline">
{{userInfo.integral || 0}}
<span/>
</view>
<view class="cap-p">积分</view>
</view>
</view>
<view class="capital-row flex-con3 capital-row-c" data-url="/user/balance/balance" bind:tap="jump">
<view class="cap-cen">
<view class="cap-title verline">
{{userInfo.money || 0}}
<span wx:if="{{userInfo.money < 10000}}">元</span>
</view>
<view class="cap-p">余额</view>
</view>
</view>
<view class="capital-row flex-con3 capital-row-c" data-url="/user/balance/balance?index=2" bind:tap="jump">
<!-- <view > -->
<view class="cap-cen">
<view class="cap-title verline">
{{userInfo.group_money || 0}}
<span wx:if="{{userInfo.group_money < 10000}}">元</span>
</view>
<view class="cap-p">礼卡余额</view>
</view>
<!-- </view> -->
</view>
<view class="capital-row flex-con3 capital-row-c" data-url="/user/couponList/couponList" bind:tap="jump">
<!-- <view > -->
<view class="cap-cen">
<view class="cap-title verline">
{{userInfo.couponCount || 0}}
<span>张</span>
</view>
<view class="cap-p">优惠券</view>
</view>
<!-- </view> -->
</view>
</view>
<!-- 资产end -->
<!-- 订单 -->
<view class="order mt20">
<view class="tit">
<view class="titl">洗衣订单</view>
<view class="titr" />
</view>
<view class="capital">
<view class="capital-row flex-con3" data-url="/user/order/order?orderState=2" bind:tap="jump">
<view class="cap-cen">
<view class="cap-title">
<image src="/static/img/icon/order-1_03.png" />
</view>
<view class="cap-p">服务中</view>
</view>
</view>
<view class="capital-row flex-con3" data-url="/user/order/order?orderState=3" bind:tap="jump">
<view class="cap-cen">
<view class="cap-title">
<image src="/static/img/icon/order-2_03.png" />
</view>
<view class="cap-p">已完成</view>
</view>
</view>
<view class="capital-row flex-con3" data-url="/user/order/order?orderState=1" bind:tap="jump">
<view class="cap-cen">
<view class="cap-title">
<image src="/static/img/icon/order-3_03.png" />
</view>
<view class="cap-p">全部订单</view>
</view>
</view>
</view>
</view>
<!-- 订单end -->
<!-- 列表 -->
<view class="user-list mt20">
<view
class="tit"
data-type='5'
data-url="/user/recharge/recharge"
bind:tap="jump"
>
<view class="titl">充值</view>
<view class="titr">
<image src="/static/img/icon/right-r.png" />
</view>
</view>
<view class="tit" data-url="/mall/laundryList/laundryList" bind:tap="jump">
<view class="titl">商城订单</view>
<view class="titr">
<image src="/static/img/icon/right-r.png" />
</view>
</view>
<view class="tit" data-url="/user/sharingCourtesy/sharingCourtesy" bind:tap="jump">
<view class="titl">分享有礼</view>
<view class="titr">
<image src="/static/img/icon/right-r.png" />
</view>
</view>
<view class="tit" data-url="/user/parIncome/parIncome" bind:tap="jump">
<view class="titl">合伙人收益</view>
<view class="titr">
<image src="/static/img/icon/right-r.png" />
</view>
</view>
</view>
<view class="user-list mt20">
<view
class="tit"
data-type="1"
data-url="/view/logistics/logCentre/logCentre"
bind:tap="jump"
>
<view class="titl">小马哥</view>
<view class="titr">
<image src="/static/img/icon/right-r.png" />
</view>
</view>
<view
class="tit"
data-islog="1"
data-url="/pages/richText/richText?id=7&title=加盟我们"
bind:tap="jump"
>
<view class="titl">加盟我们</view>
<view class="titr">
<image src="/static/img/icon/right-r.png" />
</view>
</view>
<view
class="tit"
data-islog="1"
data-url="/pages/richText/richText?id=6&title=关于我们"
bind:tap="jump"
>
<view class="titl">关于我们</view>
<view class="titr">
<image src="/static/img/icon/right-r.png" />
</view>
</view>
<view
class="tit"
data-islog="3"
data-url="/pages/nearbyStore/nearbyStore"
bind:tap="jump"
>
<view class="titl">附近门店</view>
<view class="titr">
<image src="/static/img/icon/right-r.png" />
</view>
</view>
</view>
</view>
<!-- toasta提示 -->
<i-toast id="toast" />

View File

@@ -0,0 +1,180 @@
/* pages/home/home.wxss */
@import "../../css/_main.wxss";
.home {
padding-bottom: 20rpx;
}
.userInfo {
height: 180rpx;
width: 100%;
background: var(--greens);
padding: 0 38rpx;
}
.userImg {
height: 140rpx;
width: 140rpx;
border-radius: 50%;
overflow: hidden;
float: left;
}
.user-title {
margin-left: 35rpx;
height: 140rpx;
float: left;
font-family: PingFang-SC-Medium;
font-size: 32rpx;
font-weight: normal;
font-stretch: normal;
line-height: 29rpx;
letter-spacing: 0px;
color: #fff;
display: -webkit-flex;
display: flex;
-webkit-align-items: center;
align-items: center;
}
.name span {
padding: 3rpx 13rpx;
font-family: PingFang-SC-Regular;
font-size: 28rpx;
font-weight: 400;
color: #f4c8a7;
background-color: #151915;
border-radius: 30rpx;
}
.tel {
margin-top: 27rpx;
}
.user-go {
height: 140rpx;
line-height: 140rpx;
float: right;
}
.user-go image {
width: 15rpx;
height: 33rpx;
}
.capital {
width: 100%;
height: 150rpx;
background: #fff;
display: flex;
}
.capital-row {
flex: 3;
position: relative;
}
.capital-row-c::after {
position: absolute;
right: 0;
top: 49rpx;
content: "";
width: 2rpx;
height: 52rpx;
background-color: #eaeaea;
}
.capital-row-c:last-child::after {
width: 0;
}
.cap-cen {
text-align: center;
}
.cap-title {
font-family: PingFang-SC-Bold;
font-size: 32rpx;
font-weight: normal;
font-stretch: normal;
/* line-height: 29rpx; */
letter-spacing: 0px;
color: #333;
}
.cap-title span {
font-family: PingFang-SC-Medium;
font-size: 22rpx;
font-weight: normal;
font-stretch: normal;
line-height: 29rpx;
letter-spacing: 0px;
color: #999;
}
.cap-title image {
height: 41rpx;
width: 40rpx;
}
.cap-p {
margin-top: 10rpx;
font-family: PingFang-SC-Regular;
font-size: 28rpx;
font-weight: normal;
font-stretch: normal;
line-height: 29rpx;
letter-spacing: 0px;
color: #666;
}
/* */
.order {
padding: 0 38rpx;
background: #fff;
}
.tit {
height: 105rpx;
line-height: 105rpx;
border-bottom: 2rpx solid #ebebeb;
display: flex;
}
.tit:last-child {
border: 0;
}
.titl {
font-family: PingFang-SC-Regular;
font-size: 32rpx;
font-weight: normal;
font-stretch: normal;
letter-spacing: 0px;
color: #333;
flex: 2;
}
.titr {
flex: 2;
text-align: right;
display: -webkit-flex;
display: flex;
-webkit-flex-direction: row-reverse;
flex-direction: row-reverse;
-webkit-align-items: center;
align-items: center;
}
.titr image {
width: 15rpx;
height: 33rpx;
}
/* */
.user-list {
padding: 0 38rpx;
background: #fff;
}