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 @@
2cd65b7a-b197-4cb8-8f11-3be92500772e

View File

@@ -0,0 +1 @@
e04d1590-4b50-4a36-b5e7-274a3239ed96

View File

@@ -0,0 +1,78 @@
// mall/paid/paid.js
const app = getApp();
Page({
/**
* 页面的初始数据
*/
data: {
system: app.globalData.system, //设备相关信息
pageTitle: "付款成功", //头部标题
isBack: false,//显示返回
name: '支付成功',
},
// 跳转
goUrl(e) {
let url = e.currentTarget.dataset.url
wx.redirectTo({
url: url
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
this.setData({
name: options.name
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})

View File

@@ -0,0 +1,3 @@
{
"usingComponents": {}
}

View File

@@ -0,0 +1,14 @@
<!-- 头部 -->
<nav-bar isBack="{{isBack}}" pageTitle="{{pageTitle}}" system="{{system}}"></nav-bar>
<!--user/wardrobe/wardrobeInfo/wardrobeInfo.wxml-->
<view class="wardrobeInfo">
<view class="wardrobeInfo_suo">
<image src="/static/img/success-icon.png" />
</view>
<view class="wardrobeInfo_tit">{{name}}</view>
<view class="wardrobeInfo_sub flex-con1">
<view class="wardrobeInfo_sub_l" data-url="/pages/auth/auth?index=1" bind:tap="goUrl">返回首页</view>
</view>
</view>
<!-- toasta提示 -->
<i-toast id="toast" />

View File

@@ -0,0 +1,49 @@
/* mall/paid/paid.wxss *//* user/wardrobe/wardrobeInfo/wardrobeInfo.wxss */
page{
background-color: #ffffff !important;
height: 100%;
}
.wardrobeInfo{
width: 660rpx;
margin: 130rpx auto 0;
}
.wardrobeInfo_suo{
display: block;
text-align: center;
}
.wardrobeInfo_suo image{
width: 231rpx;
height: 231rpx;
}
.wardrobeInfo_tit{
margin-top: 70rpx;
font-family: PingFang-SC-Medium;
font-size: 45rpx;
color: #333333;
font-weight: 400;
text-align: center;
}
.wardrobeInfo_tit1{
margin-top: 40rpx;
font-family: PingFang-SC-Regular;
font-size: 32rpx;
text-align: center;
color: #666666;
}
.wardrobeInfo_sub_l,.wardrobeInfo_sub_r{
width: 310rpx;
height: 90rpx;
line-height: 90rpx;
text-align: center;
border-radius: 45rpx;
border: solid 2rpx #1dbf53;
font-size: 32rpx;
margin: 100rpx auto;
}
.wardrobeInfo_sub_l{
color: #1dbf53;
}
.wardrobeInfo_sub_r{
background-color: #1dbf53;
color: #ffffff;
}

View File

@@ -0,0 +1,139 @@
// user/upgradeCart/upgradeCart.js
const app = getApp();
const regeneratorRuntime = app.loadAsync()
const model = app.loadModel("index")
const http = app.loadHttp()
Page({
/**
* 页面的初始数据
*/
data: {
system: app.globalData.system, //设备相关信息
pageTitle: "办卡/升级卡", //头部标题
isBack: true,//显示返回
isLoading: true,//加载显示关闭
cardCur: 0,//轮播当前下表
swiperList: [],
cardType: 0,// 购买或需要升级的卡类型
openType: 0,//0升级 1购买
is_upgrade: 0,
card_upgrade: null,
card_id: 0
},
// cardSwiper
cardSwiper(e) {
this.setData({
cardCur: e.detail.current
})
},
// tab切换Swiper
tabSwiper(e) {
let index = e.currentTarget.dataset.index
this.setData({
cardCur: index
})
},
//获取用户可升级的会员卡和可购买的卡
async getUpgradeCard() {
let res = await http.http.request2({ url: `${http.api.getUpgradeCard}`, method: 'POST', data: { type: this.data.cardType, card_id: this.data.card_id } })
this.setData({
swiperList: res.data.data,
isLoading: false
})
},
// 用户会员卡购买/升级
async cardUpgrade() {
let userInfo = app.globalData.userInfo
if (typeof userInfo['telnum'] == 'string' && (userInfo['telnum'] == "未授权手机号" || userInfo['telnum'] == '')) {
wx.showModal({
title: '未授权手机号不能办卡哦!!!',
content: '点击确定前往授权手机号',
success(res) {
if (res.confirm) {
wx.navigateTo({
url: '/pages/login/login'
})
}
}
})
return
}
let swiperList = this.data.swiperList[this.data.cardCur]
let data = {
type: this.data.cardType,
card_id: swiperList.id,
total_money: swiperList.recharge_money,
card_upgrade: this.data.card_upgrade,
is_upgrade: this.data.is_upgrade
}
let res = await model.payment.pay(http.api.cardUpgrade, data)
if (res == 1) {
wx.navigateTo({
url: "/user/upgradeCart/paid/paid?name=支付成功"
})
}
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
this.setData({
cardType: options.type,
openType: options.openType,
is_upgrade: options.is_upgrade,
card_upgrade: options.card_upgrade,
card_id: options.card_id,
pageTitle: options.openType == 1 ? '办卡' : '升级'
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
this.getUpgradeCard()
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})

View File

@@ -0,0 +1,6 @@
{
"usingComponents": {
"i-tabs": "../../extend/iview/dist/tabs/index",
"i-tab": "../../extend/iview/dist/tab/index"
}
}

View File

@@ -0,0 +1,98 @@
<!-- 头部 -->
<nav-bar isBack="{{isBack}}" pageTitle="{{pageTitle}}" system="{{system}}"></nav-bar>
<!-- user/upgradeCart/upgradeCart.wxml -->
<view class="upgradeCart">
<view class="upgradeCart-cen mt20">
<view class="cart-list">
<swiper class="card-swiper square-dot" duration="500" bindchange="cardSwiper" current="{{cardCur}}">
<swiper-item wx:for="{{swiperList}}" wx:key class="{{cardCur==index?'cur':''}}">
<view class="swiper-item dis-flex">
<view class="swiper-bac flex1">
<image src="{{item.src_buy}}" />
</view>
<view class="swiper-cart-bac flex1 flex-con3">
<view class="swiper-cart-all">
<view class="dis-flex">
<view class="flex1 logo flex-con2">
<image mode="widthFix" src="/static/img/logo-fff.png" />
</view>
<view class="cart-name">
{{item.title}}
<span wx:if="{{cardType == 1}}">
({{item.discount/10}}折)
</span>
</view>
</view>
<view wx:if="{{openType == 0 && cardType == 1}}">
<view class="cart-discount mt50">
<span class="cart-discount-i">¥</span>
<span class="cart-discount-mon">{{item.money}}</span>
</view>
<view class="cart-tips">
仅充值{{item.recharge_money}}元,即可升级成为{{item.title}}会员
</view>
</view>
<view wx:if="{{openType == 1 && cardType == 1 }}">
<view class="cart-discount mt50">
<span class="cart-discount-i">¥</span>
<span class="cart-discount-mon">{{item.money}}</span>
</view>
<view class="cart-tips">
{{item.info}}
</view>
</view>
<view wx:if="{{openType == 1 && cardType == 2 }}">
<view class="cart-discount mt50">
<span class="cart-discount-i">面值( 元 )</span>
<span class="cart-discount-mon">
{{item.money+item.give_money}}
</span>
</view>
<view class="cart-tips">{{item.info}}</view>
</view>
</view>
</view>
</view>
</swiper-item>
</swiper>
<!-- 重置小圆点的样式 -->
<view class="dots">
<scroll-view scroll-x class="scroll-dots" scroll-left="{{cardCur*40}}">
<view wx:for="{{swiperList}}" wx:key="{{index}}" class="scroll-dots-d" data-index="{{index}}" catchtap="tabSwiper">
<view class="dot {{index == cardCur ? ' active' : ''}}">
{{item.title}}
</view>
</view>
</scroll-view>
</view>
<view class="clear"></view>
</view>
<view class="exprecharge pd30">
<view class="flex-con2">
<image class="ts-green" src="/static/img/icon/ts-green.png" />
<view class="ts-p ml10">充值说明</view>
</view>
<view class="mt30">
<view class="ts-p1">1.伊莎洗衣会员卡是你尊贵身份的象征</view>
<view class="ts-p1">2.伊莎洗衣会员可享受更多的增值服务</view>
<view wx:if="{{cardType == 1}}" class="ts-p1">
3.首次充值即可长期享受{{swiperList[cardCur].discount/10}}折优惠
</view>
</view>
</view>
<button wx:if="{{openType == 0}}" class="cart-btn dis-flex" type="primary" hover-class="none" bind:tap="cardUpgrade">
<view class="flex1 cart-btn-p">
¥{{swiperList[cardCur].recharge_money}}元
<span>¥{{swiperList[cardCur].money}}</span>
</view>
<view class="cart-btn-p1">现在升级</view>
</button>
<button wx:if="{{openType == 1}}" class="cart-btn dis-flex" type="primary" hover-class="none" bind:tap="cardUpgrade">
<view class="cart-btn-p1 flex1">仅需支付 {{swiperList[cardCur].money}} 元</view>
</button>
</view>
</view>
<!-- 加载动画 -->
<loading-prog isLoading="{{isLoading}}"></loading-prog>
<!-- toasta提示 -->
<i-toast id="toast" />

View File

@@ -0,0 +1,204 @@
/* user/upgradeCart/upgradeCart.wxss */
.tabs {
border-top: 2rpx solid #ebebeb;
background-color: #fff;
}
.upgradeCart-cen {
background-color: #fff;
padding: 20rpx 0rpx 80rpx 0;
}
.swiper-item{
position: relative;
}
.swiper-bac{
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
z-index: 1;
}
.swiper-bac image{
height: 100%;
width: 100%;
}
.swiper-cart-bac{
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
z-index: 2;
height: 100%;
width: 100%;
padding: 0 30rpx;
}
.swiper-cart-all{
width: 100%;
}
.cart-name{
font-family: PingFang-SC-Medium;
font-size: 30rpx;
font-weight: 400;
color: #ffffff;
}
.logo image{
width: 60%;
}
.cart-discount-mon{
vertical-align:top;
font-family: PingFang-SC-Bold;
font-size: 75rpx;
font-weight: 500;
color: #ffffff;
}
.cart-discount .cart-discount-i{
margin-top: 20rpx;
font-family: PingFang-SC-Medium;
font-size: 26rpx;
letter-spacing: -1px;
font-weight: 400;
color: #ffffff;
height: 100%;
vertical-align:top;
display: inline-block;
}
.cart-tips{
font-family: PingFang-SC-Medium;
font-size: 24rpx;
font-weight: 400;
color: #ffffff;
}
.exprecharge{
padding-top: 50rpx;
}
.ts-green{
width: 32rpx;
height: 32rpx;
}
.ts-p{
font-family: PingFang-SC-Medium;
font-size: 32rpx;
font-weight: 400;
color: #333333;
}
.ts-p1{
font-family: PingFang-SC-Medium;
font-size: 26rpx;
font-weight: 400;
color: #999999;
margin: 4rpx 0;
}
/*用来包裹所有的小圆点 */
.cart-list {
position: relative;
margin-bottom: 50rpx;
}
.dots {
width: 100%;
flex-direction: row;
position: absolute;
bottom: -40rpx;
display: -webkit-flex;
display: flex;
-webkit-align-items: center;
align-items: center;
-webkit-justify-content: center;
justify-content: center;
}
.scroll-dots{
width: 100%;
white-space: nowrap;
display: flex;
text-align: center;
}
.scroll-dots-d{
display: inline-block;
height: 60rpx;
}
/*未选中时的小圆点样式 */
.dot {
margin: 0 30rpx;
font-family: PingFang-SC-Medium;
font-size: 26rpx;
font-weight: 400;
color: #999;
padding: 0 10rpx;
}
/*选中以后的小圆点样式 */
.active {
font-family: PingFang-SC-Medium;
font-size: 32rpx;
font-weight: 400;
color: #333;
position: relative;
}
.active::after{
content: "";
position: absolute;
left: 50%;
margin-left: -30rpx;
bottom: -20rpx;
width: 60rpx;
height: 6rpx;
background-color: #1dbf53;
border-radius: 3px;
}
/* 点击升级 */
.cart-btn{
margin-top: 100rpx;
width: 690rpx;
height: 100rpx;
line-height: 100rpx;
background-image: linear-gradient(
#1dbf53,
#1dbf53),
linear-gradient(
#2fd152,
#2fd152);
background-blend-mode: normal,
normal;
border-radius: 50rpx;
}
.cart-btn-p{
font-family: PingFang-SC-Bold;
font-size: 38rpx;
font-weight: 500;
color: #ffffff;
text-align: left;
}
.cart-btn-p span{
margin-left: 20rpx;
text-decoration:line-through;
font-family: PingFang-SC-Medium;
font-size: 28rpx;
font-weight: 400;
color: #ffffff;
}
.cart-btn-p1{
font-weight: 500;
display: block;
text-align: center;
}