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 @@
0256aae0-171d-4435-b9d2-0cedd6e04daf

View File

@@ -0,0 +1,123 @@
// user/choice/choice.js
const app = getApp();
const regeneratorRuntime = app.loadAsync()
const model = app.loadModel("index")
const util = app.loadUtils("util")
const http = app.loadHttp()
const api = app.loadApi()
Component({
/**
* 组件的属性列表
*/
properties: {
},
/**
* 组件的初始数据
*/
data: {
system: app.globalData.system, //设备相关信息
pageTitle: "伊莎洗衣", //头部标题
isLocation: true, //是否显示定位
titleColor: { //头部背景和文字颜色
bColor: "#1dbf53",
tColor: "#ffffff"
},
cityInfo: {
city: "定位中",
location: ""
},//最新门店
imgObj: {},
isPopup: false, //弹出层显示
branchList: [],
branchIndex: -1,// 当前用户选择的支行下标
},
ready() {
this.add()
this.groupBranchList()
if(app.globalData.userInfo.group_branch == 0){
this.setData({
isPopup: true
})
}
},
/**
* 组件的方法列表
*/
methods: {
async tuanPic(group_type) {
let res = await http.http.request2({ url: http.api.tuanPic, method: 'POST', data: { group_type: group_type } })
this.setData({
imgObj: res.data.data
})
},
// 授权和获取用户当前经纬度,并展示最近门店
async add() {
// 判断本地是否有最近门店,只在第一次进小程序请求后端获取最近门店
let storageAdd = await model.storage.getSetting("nearestStore")
let cityInfo = {}
if (!!storageAdd) {
cityInfo = {
city: storageAdd.name.substring(0, 4),
location: "/pages/nearbyStore/nearbyStore"
}
this.setData({
cityInfo: cityInfo
})
return
}
let res = await model.getauth.userLocation()
cityInfo = {
city: res.name.substring(0, 4),
location: "/pages/nearbyStore/nearbyStore"
}
this.setData({
cityInfo: cityInfo
})
},
// 跳转
async goDiamondInfo(e) {
let url = e.currentTarget.dataset.url
let isLogin = await util.isLoginJump()
if (isLogin == 1) return;
// 洗衣价目表
wx.navigateTo({
url: url
})
},
// 获取支行列表
async groupBranchList() {
let res = await http.http.request2({ url: http.api.groupBranchList, method: 'POST' })
this.setData({
branchList: res.data.data
})
},
pickerChange(e) {
this.setData({
branchIndex: parseInt(e.detail.value)
})
},
async bindBranch() {
if(this.data.branchIndex == -1){
wx.showToast({
title: '请选择分行',
icon: 'none',
duration: 2000
})
return
}
let res = await http.http.request2({ url: http.api.bindBranch, method: 'POST', data:{branch_id:this.data.branchList[this.data.branchIndex].id} })
if(res.data.status == 1){
wx.showToast({
title: '绑定成功',
icon: 'none',
duration: 2000
})
this.setData({
isPopup: false
})
}
}
}
})

View File

@@ -0,0 +1,6 @@
{
"component": true,
"usingComponents": {
"wux-cell": "../../extend/wux/dist/cell/index"
}
}

View File

@@ -0,0 +1,70 @@
<!-- 头部导航 -->
<nav-bar
class="skeleton-rect"
isLocation="{{isLocation}}"
pageTitle="{{pageTitle}}"
system="{{system}}"
cityInfo="{{cityInfo}}"
titleColor="{{titleColor}}"
/>
<!--user/choice/choice.wxml-->
<view class="choice">
<view class="pd20">
<view class="row mt40">
<view bind:tap="goDiamondInfo" data-url="{{'/pages/serviceInfo/serviceInfo?group_type='+imgObj.id}}" class='flex-con3 service_c'>
<view class="dis-flex service_cen">
<view class='flex1'>
<view class='service_title'>服务说明</view>
<view class='flex-con2 service_text'>我们将尽心为您服务
<view class='service_see'>点击查看 ></view>
</view>
</view>
<view class='service_img'>
<image src="/static/img/love.png" />
</view>
</view>
</view>
</view>
<view class="row mt40">
<!-- <view class="title">工服清洗</view> -->
<view bind:tap="goDiamondInfo" data-url="{{'/pages/laundry/laundry?type=2&group_type='+imgObj.id}}" class="pos_cen">
<view class="cen_img">
<image src="{{imgObj.work_pic}}" />
</view>
<view class="cen_p flex-con2">
<view class="p_text">工装洗涤</view>
<image src="/static/img/icon/bac-right.png" />
</view>
</view>
</view>
<view class="row mt40">
<!-- <view class="title">家庭衣物洗涤</view> -->
<view bind:tap="goDiamondInfo" data-url="{{'/pages/laundry/laundry?type=1&group_type='+imgObj.id}}" class="pos_cen">
<view class="cen_img">
<image src="{{imgObj.ordinary_pic}}" />
</view>
<view class="cen_p flex-con2">
<view class="p_text">家庭衣物洗涤</view>
<image src="/static/img/icon/bac-right.png" />
</view>
</view>
</view>
</view>
<!-- 第一次广大用户进入此页面绑定支行 -->
<popup isPopup='{{isPopup}}'>
<view class='branch'>
<picker
value="{{index}}"
range="{{branchList}}"
range-key='unit_title'
bindchange='pickerChange'
>
<view class='bac_cell'>
<wux-cell right="text_right_cell2" title="{{ branchIndex == -1?'请选择您所在的分行':branchList[branchIndex].unit_title}}" rightUrl='/static/img/icon/asfa51f3a1f3a5f13a.png' />
</view>
</picker>
<view class='branch_sub' bind:tap='bindBranch'>确定</view>
</view>
</popup>
</view>

View File

@@ -0,0 +1,102 @@
/* user/choice/choice.wxss */
@import '../../css/_main.wxss';
.title{
font-size:36rpx;
font-weight:500;
color:#282A28;
}
.pos_cen{
position: relative;
height: 260rpx;
margin-top: 10rpx;
}
.cen_img{
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
z-index: 10;
}
.cen_img image{
height: 100%;
width: 100%;
}
.cen_p{
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
z-index: 12;
}
.cen_p .p_text{
font-size:50rpx;
font-weight:500;
color:#ffffff;
margin-left: 54rpx;
}
.cen_p image{
margin-left: 10rpx;
height: 50rpx;
width: 50rpx;
}
/* 热心服务 */
.service_c{
background-color: #ffffff;
height: 155rpx;
border-radius: 10rpx;
}
.service_cen{
width: 100%;
padding: 0 32rpx;
}
.service_title{
font-size:32rpx;
font-weight:500;
}
.service_see{
padding: 10rpx 20rpx;
background: linear-gradient(to right, #fe5928 , #fe0516);
border-radius: 100rpx;
font-size: 22rpx;
color: #ffffff;
margin-left: 10rpx;
}
.service_img{
height: 100rpx;
width: 100rpx;
}
.service_img image{
width: 100%;
height: 100%;
}
.service_text{
color: #999999;
font-size: 24rpx;
font-weight: 400;
}
/* 弹出层 */
.branch{
width: 80%;
background-color: #ffffff;
border-radius: 10rpx;
padding: 54rpx 50rpx;
}
.bac_cell{
background-color: rgba(245,245,245,1);
}
.wux-cell:after{
border-bottom: 0;
}
.branch_sub{
height: 80rpx;
line-height: 80rpx;
background:rgba(54,217,108,1);
border-radius: 40rpx;
text-align: center;
font-size: 32rpx;
color: #ffffff;
margin-top: 35rpx;
}