当前位置:网站首页>The latest version of blind box mall thinkphp+uniapp
The latest version of blind box mall thinkphp+uniapp
2022-07-03 12:36:00 【Programmer - Nan】
Recently, he came out of the popular blind box mall
Backstage use thinkphp+mysql
The front end uses uniapp Development
Perfect connection with wechat official account
Fit to learn 、 Second opening
The function point :
With the function of promoting QR code 、 Including recharge 3 Level distribution function 、 The blind box is recycled into surplus / Forehead function 、 Slide Show 、 Connect with wechat Alipay 、 SMS is very versatile
All open source to everyone
If you don't say much, look at the renderings :







backstage :


<template>
<view class="register">
<view class="register_head">
<text>{
{
isPassword ? ' Password to login ' : ' Mobile quick login ' }}</text>
<text>{
{
isPassword ? ' If you forget your password, you can log in with your registered mobile phone ' : ' Unregistered mobile numbers will automatically create accounts ' }}</text>
</view>
<view class="register_ul">
<view class="register_li flex">
<view class="register_ipt">
<input type="number" maxlength="11" v-model="from.mobile" placeholder=" Please enter your mobile number "
placeholder-style="color:#999999" />
</view>
</view>
<view class="register_li flex">
<view class="register_ipt">
<input type="password" maxlength="12" v-model="from.password" placeholder=" Please input a password " v-if="isPassword"
placeholder-style="color:#999999" />
<input type="number" maxlength="6" v-model="from.captcha" placeholder=" Please enter the verification code " v-else
placeholder-style="color:#999999" />
</view>
<view class="code center" v-if="!isPassword" @click="getCode">{
{
codeTxt }}</view>
</view>
</view>
<view class="register_code" @click="isPassword = !isPassword" v-if="isPassword"> Verification code login </view>
<button class="register_btn" hover-class="hover-view" @click="submit"> Sign in </button>
<view class="register_footer center">
<text @click="goPassword">{
{
isPassword ? ' Forget the password ' : ' Password to login ' }}</text>
<text></text>
<text @click="goRegister"> Registered account </text>
</view>
<view class="register_fast center" @click="wxLogin">
<text> Quick login </text>
<image src="/static/image/publice/[email protected]" mode=""></image>
</view>
<view class="register_consent center">
<image
:src="isConsent ? '/static/image/publice/[email protected]' : '/static/image/publice/[email protected]'"
mode="" @click="isConsent = !isConsent"></image>
<text> By logging in, you agree </text>
<text class="blue" @click="goUser">《 User agreement 》</text>
<text> and </text>
<text class="blue" @click="goPrivacy">《 Privacy policy 》</text>
</view>
</view>
</template>
<script>
import $DB from '../../http/debounce.js'
export default {
data() {
return {
isPassword: false, // Whether to login with password
isConsent: false, // Do you agree with
flag: true,
codeTxt: ' Get verification code ',
sending: true,
second: 60,
disabled: false,
from: {
mobile: '', //
captcha: '', //
sharecode: '',
is_channel: ""
}
};
},
methods: {
// Wechat login
wxLogin() {
this.$api.getWechatLoginUrl({
redirect: '/h5/#/pages/login/login?sharecode=' + uni.getStorageSync('sharecode') +
'&is_channel=' + uni.getStorageSync('is_channel')
}).then(res => {
if (res.code === 1) {
location.href = res.data.url
}
})
},
// De privacy agreement
goPrivacy() {
uni.navigateTo({
url: '/pagesA/pages/privacy'
})
},
// Go to user agreement
goUser() {
uni.navigateTo({
url: '/pagesA/pages/user'
})
},
// Sign in
submit: $DB(function() {
if (!this.from.mobile.match(/^(0|86|17951)?1[3456789]\d{
9}$/)) {
uni.showToast({
title: ' Please input the correct mobile number ',
icon: 'none'
});
return
}
if (!this.isPassword) {
if (!this.from.captcha) return uni.showToast({
title: ' Please enter the verification code ',
icon: 'none'
})
}
if (!this.isConsent) return uni.showToast({
title: ' Please read and agree to the user and privacy agreement ',
icon: 'none'
})
if (!this.flag) return
this.flag = false
this.from.is_channel = uni.getStorageSync('is_channel');
if (!this.isPassword) {
this.$api.mobilelogin({
...this.from,
msg: ' Logon '
}).then(res => {
if (res.code === 1) {
uni.setStorageSync('token', res.data.token)
uni.setStorageSync('is_notice', res.data.is_notice)
uni.removeStorageSync('is_channel')
uni.switchTab({
url: '/pages/tabbar/index'
})
} else {
this.flag = true
}
}).then(res => {
console.log(res);
})
} else {
this.$api.login({
...this.from,
msg: ' Logon '
}).then(res => {
if (res.code === 1) {
uni.setStorageSync('token', res.data.token)
uni.setStorageSync('is_notice', res.data.is_notice)
uni.removeStorageSync('is_channel')
uni.switchTab({
url: '/pages/tabbar/index'
})
} else {
this.flag = true
}
}).then(res => {
console.log(res);
})
}
}),
// Verification code login
codeLogin() {
uni.navigateTo({
url: '/pages/login/phoneLogin'
})
},
// Registered account
goRegister() {
uni.navigateTo({
url: '/pages/login/register'
})
},
// Forget the password
goPassword() {
if (this.isPassword) {
uni.navigateTo({
url: '/pages/login/forgetPassword'
})
} else {
this.isPassword = true
}
},
// Get verification code
getCode: $DB(function() {
if (!this.sending) return
if (!this.from.mobile.match(/^(0|86|17951)?1[3456789]\d{
9}$/)) {
uni.showToast({
title: ' Please input the correct mobile number ',
icon: 'none'
});
return
}
this.$api.send({
mobile: this.from.mobile,
msg: ' In sending ',
event: 'login'
}).then(res => {
this.sending = false;
this.disabled = true;
if (res.code === 1) {
this.timeDown();
}
uni.showToast({
title: res.msg,
icon: 'none'
});
});
}),
timeDown() {
let result = setInterval(() => {
--this.second;
this.codeTxt = this.second + 'S'
if (this.second < 0) {
clearInterval(result);
this.sending = true;
this.disabled = false;
this.second = 60;
this.codeTxt = ' Get verification code '
}
}, 1000);
},
},
onLoad() {
if (uni.getStorageSync('sharecode')) {
this.from.sharecode = uni.getStorageSync('sharecode')
}
}
}
</script>
<style>
page {
background: #FFFFFF;
}
</style>
<style lang="scss">
.register {
min-height: 100vh;
padding: 0 42rpx;
position: relative;
.register_head {
display: flex;
flex-direction: column;
padding: 30rpx 0 40rpx 0;
text {
&:first-child {
font-size: 40rpx;
font-weight: bold;
}
&:last-child {
color: #999999;
font-size: 26rpx;
margin-top: 20rpx;
}
}
}
.register_li {
padding: 40rpx 0;
border-bottom: 2rpx solid #DDDDDD;
.register_ipt {
flex: 1;
input {
width: 100%;
font-size: 30rpx;
}
}
.code {
width: 150rpx;
color: #4EABFC;
font-size: 28rpx;
}
}
}
.register_btn {
height: 80rpx;
margin-top: 50rpx;
background: #F6AF32;
border-radius: 40rpx;
}
.register_code {
color: #4EABFC;
font-size: 28rpx;
text-align: right;
margin: 30rpx 0 0rpx 0;
}
.register_footer {
margin: 50rpx 0 125rpx 0;
text {
color: #4EABFC;
font-size: 26rpx;
&:nth-child(2) {
width: 1px;
height: 25rpx;
margin: 0 35rpx;
background: #4EABFC;
}
}
}
.register_fast {
margin-top: 125rpx;
flex-direction: column;
text {
color: #999999;
margin-bottom: 40rpx;
}
image {
width: 72rpx;
height: 72rpx;
}
}
.register_consent {
margin-top: 50px;
/* width: 100%; position: absolute; left: 50%; bottom: 70rpx; transform: translateX(-50%); */
image {
width: 30rpx;
height: 30rpx;
flex-shrink: 0;
margin-right: 10rpx;
}
.blue {
color: #4EABFC;
}
}
</style>
If you need the source code, leave your contact information ~
Thank you for reading , Let's pay attention to our little friends ~
边栏推荐
- Sword finger offer05 Replace spaces
- elastic_ L01_ summary
- Oh my Zsh + TMUX installation
- Take you to the installation and simple use tutorial of the deveco studio compiler of harmonyos to create and run Hello world?
- ES6新特性
- Flinksql can directly create tables and read MySQL or Kafka data on the client side, but how can it automatically flow and calculate?
- MySQL time zone solution
- I'm too lazy to write more than one character
- idea将web项目打包成war包并部署到服务器上运行
- 写一个简单的nodejs脚本
猜你喜欢

阿里大于发送短信(用户微服务--消息微服务)

Take you to the installation and simple use tutorial of the deveco studio compiler of harmonyos to create and run Hello world?

New features of ES6

公纵号发送提示信息(用户微服务--消息微服务)

Record your vulnhub breakthrough record

Sword finger offer09 Implementing queues with two stacks

Eureka self protection

最新版抽奖盲盒运营版

剑指Offer06. 从尾到头打印链表

Shutter: add gradient stroke to font
随机推荐
Approve iPad, which wants to use your icloud account
剑指Offer06. 从尾到头打印链表
TOGAF认证自学宝典V2.0
Summary of error prone knowledge points: Calculation of define s (x) 3*x*x+1.
Write a simple nodejs script
OpenStack节点地址改变
Kubectl_ Command experience set
flinksql是可以直接客户端建表读mysql或是kafka数据,但是怎么让它自动流转计算起来呢?
Oh my Zsh + TMUX installation
Pytext training times error: typeerror:__ init__ () got an unexpected keyword argument 'serialized_ options'
Togaf certification self-study classic v2.0
Adult adult adult
JVM memory model
Bert running error: attributeerror: module'tensorflow contrib. tpu' has no attribute 'InputPipelineConfig'
4000 word super detailed pointer
Take you to the installation and simple use tutorial of the deveco studio compiler of harmonyos to create and run Hello world?
idea将web项目打包成war包并部署到服务器上运行
Flutter Widget : KeyedSubtree
wpa_ cli
The difference between lambda and anonymous inner class