wangmingchuan 9 months ago
parent c8897718e7
commit aa8c5f462a
  1. 2
      dist/dev/.sourcemap/mp-weixin/pages/lanhu_denglu/index.js.map
  2. 60
      dist/dev/mp-weixin/pages/lanhu_denglu/index.js
  3. 2
      dist/dev/mp-weixin/pages/lanhu_denglu/index.wxml
  4. 51
      dist/dev/mp-weixin/project.private.config.json
  5. 70
      src/pages/lanhu_denglu/index.vue

File diff suppressed because one or more lines are too long

@ -194,15 +194,73 @@ exports.default = void 0;
//
//
//
//
//
//
//
//
//
var _default = {
data: function data() {
return {
constants: {},
account: '',
password: ''
password: '',
yanzheng: 1
};
},
methods: {
yanzhengma: function yanzhengma() {
var _this = this;
if (!this.account) {
uni.showToast({
title: '请输入手机号',
icon: 'none',
// 如果要纯文本,将值设为 'none'
duration: 2000 // 持续时间为 2 秒
});
return;
}
uni.request({
url: getApp().globalData.baseUrl + 'sendSmsCode',
// 接口地址
method: 'POST',
// 请求方法
header: {
'content-type': 'application/json' // 默认值
},
data: {
'phone': this.account
},
success: function success(res) {
if (res.data.status != 200) {
uni.showToast({
title: res.data.msg,
icon: 'none',
// 如果要纯文本,将值设为 'none'
duration: 2000 // 持续时间为 2 秒
});
} else {
uni.showToast({
title: '获取成功',
icon: 'none',
// 如果要纯文本,将值设为 'none'
duration: 2000 // 持续时间为 2 秒
});
_this.yanzheng = 2;
}
},
fail: function fail(err) {
console.error(err); // 请求失败时处理错误
}
});
},
denglu: function denglu() {
console.log(4414);
uni.request({

@ -1 +1 @@
<view class="page flex-col" style="position:fixed;"><view class="section_1 flex-col" style="height:auto;"><view style="margin-top:25%;font-size:40rpx;font-weight:900;margin-left:10%;margin-bottom:40rpx;">登录</view></view><view class="flex-col"><view class="box_2 flex-col"><view class="image-text_1 flex-row " style="margin-top:100rpx;border-bottom:1px solid darkgray;"><image class="label_1" referrerpolicy="no-referrer" src="/static/lanhu_denglu/FigmaDDSSlicePNG2f2313d04e1b31b9579ab5a01299c820.png"></image><input class="text-group_1" style="padding-left:50rpx;width:100%;" placeholder="请输入手机号" data-event-opts="{{[['input',[['__set_model',['','account','$event',[]]]]]]}}" value="{{account}}" bindinput="__e"/></view><view class="image-text_1 flex-row " style="margin-top:100rpx;border-bottom:1px solid darkgray;"><image class="label_1" referrerpolicy="no-referrer" src="/static/lanhu_denglu/FigmaDDSSlicePNG779b4780a834e7d5867fd0949265e1f5.png"></image><input class="text-group_1" style="padding-left:50rpx;width:100%;" placeholder="请输入验证码" type="password" data-event-opts="{{[['input',[['__set_model',['','password','$event',[]]]]]]}}" value="{{password}}" bindinput="__e"/></view><view class="box_4 flex-row justify-between"><radio class=" " style="margin-top:-15rpx;"></radio><view class="text-wrapper_2"><text class="text_4">接受</text><text class="text_5">用户协议</text><text class="text_6">及</text><text class="text_7">隐私政策</text></view></view><view class="text-wrapper_3 flex-col"><text data-event-opts="{{[['tap',[['denglu']]]]}}" class="text_8" bindtap="__e">立即登录</text></view><text data-event-opts="{{[['tap',[['zhuce']]]]}}" class="text_9" bindtap="__e">注册</text></view></view></view>
<view class="page flex-col" style="position:fixed;"><view class="section_1 flex-col" style="height:auto;"><view style="margin-top:25%;font-size:40rpx;font-weight:900;margin-left:10%;margin-bottom:40rpx;">登录</view></view><view class="flex-col"><view class="box_2 flex-col"><view class="image-text_1 flex-row " style="margin-top:50rpx;border-bottom:1px solid darkgray;"><image class="label_1" referrerpolicy="no-referrer" src="/static/lanhu_denglu/FigmaDDSSlicePNG2f2313d04e1b31b9579ab5a01299c820.png"></image><input class="text-group_1" style="padding-left:50rpx;width:100%;" placeholder="请输入手机号" data-event-opts="{{[['input',[['__set_model',['','account','$event',[]]]]]]}}" value="{{account}}" bindinput="__e"/></view><view class="image-text_1 flex-row " style="margin-top:50rpx;border-bottom:1px solid darkgray;"><image class="label_1" style="width:80rpx;" referrerpolicy="no-referrer" src="/static/lanhu_denglu/FigmaDDSSlicePNG779b4780a834e7d5867fd0949265e1f5.png"></image><input class="text-group_1" style="padding-left:50rpx;width:100%;" placeholder="请输入验证码" data-event-opts="{{[['input',[['__set_model',['','captcha','$event',[]]]]]]}}" value="{{captcha}}" bindinput="__e"/><block wx:if="{{yanzheng==1}}"><view data-event-opts="{{[['tap',[['yanzhengma']]]]}}" class="text-wrapper_1 flex-col" bindtap="__e"><text class="text_3" style="width:200rpx;">获取验证码</text></view></block><block wx:else><view class="text-wrapper_1 flex-col" style="background-color:gray;"><text class="text_3" style="width:200rpx;text-align:center;color:white;">已发送</text></view></block></view><view class="box_4 flex-row justify-between"><radio class=" " style="margin-top:-15rpx;"></radio><view class="text-wrapper_2"><text class="text_4">接受</text><text class="text_5">用户协议</text><text class="text_6">及</text><text class="text_7">隐私政策</text></view></view><view class="text-wrapper_3 flex-col"><text data-event-opts="{{[['tap',[['denglu']]]]}}" class="text_8" bindtap="__e">立即登录</text></view><text data-event-opts="{{[['tap',[['zhuce']]]]}}" class="text_9" bindtap="__e">注册</text><text class="text_10" style="margin-top:20rpx;">其他登录方式</text><view class="image-wrapper_1 flex-col"><image class="label_3" referrerpolicy="no-referrer" src="/static/lanhu_denglu/FigmaDDSSlicePNG25a13c2ec08e1cf257bfcc6f670dfe9c.png"></image></view></view></view></view>

@ -0,0 +1,51 @@
{
"description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
"condition": {
"miniprogram": {
"list": [
{
"name": "pages/lanhu_denglu/index",
"pathName": "pages/lanhu_denglu/index",
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "pages/lanhu_zhuce/index",
"pathName": "pages/lanhu_zhuce/index",
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "pages/lanhu_kunbangqinqinghao/index",
"pathName": "pages/lanhu_kunbangqinqinghao/index",
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "pages/lanhu_daoruxuesheng/index",
"pathName": "pages/lanhu_daoruxuesheng/index",
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "pages/lanhu_zhuce/index",
"pathName": "pages/lanhu_zhuce/index",
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "pages/lanhu_denglu/index",
"pathName": "pages/lanhu_denglu/index",
"query": "",
"launchMode": "default",
"scene": null
}
]
}
}
}

@ -7,24 +7,30 @@
<view class="flex-col" style="">
<view class="box_2 flex-col" style="">
<view class="image-text_1 flex-row " style="margin-top: 100rpx;border-bottom: 1px solid darkgray;">
<view class="image-text_1 flex-row " style="margin-top: 50rpx;border-bottom: 1px solid darkgray;">
<image class="label_1" referrerpolicy="no-referrer"
src="/static/lanhu_denglu/FigmaDDSSlicePNG2f2313d04e1b31b9579ab5a01299c820.png" />
<input class="text-group_1" v-model="account" placeholder="请输入手机号" style="padding-left: 50rpx;width:100%">
<input class="text-group_1" v-model="account" placeholder="请输入手机号"
style="padding-left: 50rpx;width:100%">
</view>
<view class="image-text_1 flex-row " style="margin-top: 100rpx;border-bottom: 1px solid darkgray;">
<image class="label_1" referrerpolicy="no-referrer"
<view class="image-text_1 flex-row " style="margin-top:50rpx;border-bottom: 1px solid darkgray;">
<image class="label_1" referrerpolicy="no-referrer" style="width: 80rpx;"
src="/static/lanhu_denglu/FigmaDDSSlicePNG779b4780a834e7d5867fd0949265e1f5.png" />
<input class="text-group_1" v-model="password" placeholder="请输入验证码" type="password"
<input class="text-group_1" v-model="captcha" placeholder="请输入验证码"
style="padding-left: 50rpx;width:100%">
<!-- <view class="text-wrapper_1 flex-col">
<text class="text_3">获取验证码</text>
</view> -->
<view class="text-wrapper_1 flex-col" @click="yanzhengma()" v-if="yanzheng == 1">
<text class="text_3" style="width: 200rpx;">获取验证码</text>
</view>
<view class="text-wrapper_1 flex-col" v-else style="background-color: gray;">
<text class="text_3" style="width: 200rpx;text-align: center;color: white;">已发送</text>
</view>
</view>
<view class="box_4 flex-row justify-between">
@ -40,11 +46,11 @@
<text class="text_8" @click="denglu()">立即登录</text>
</view>
<text class="text_9" @click="zhuce()">注册</text>
<!-- <text class="text_10" style="margin-top: 20rpx;">其他登录方式</text>
<text class="text_10" style="margin-top: 20rpx;">其他登录方式</text>
<view class="image-wrapper_1 flex-col">
<image class="label_3" referrerpolicy="no-referrer"
src="/static/lanhu_denglu/FigmaDDSSlicePNG25a13c2ec08e1cf257bfcc6f670dfe9c.png" />
</view> -->
</view>
</view>
</view>
</view>
@ -56,9 +62,51 @@
constants: {},
account: '',
password: '',
yanzheng:1,
};
},
methods: {
yanzhengma() {
if (!this.account) {
uni.showToast({
title: '请输入手机号',
icon: 'none', // 'none'
duration: 2000 // 2
});
return
}
uni.request({
url: getApp().globalData.baseUrl + 'sendSmsCode', //
method: 'POST', //
header: {
'content-type': 'application/json' //
},
data: {
'phone': this.account
},
success: (res) => {
if (res.data.status != 200) {
uni.showToast({
title: res.data.msg,
icon: 'none', // 'none'
duration: 2000 // 2
});
} else {
uni.showToast({
title: '获取成功',
icon: 'none', // 'none'
duration: 2000 // 2
});
this.yanzheng = 2
}
},
fail: (err) => {
console.error(err); //
}
});
},
denglu() {
console.log(4414)
uni.request({
@ -80,7 +128,7 @@
});
} else {
uni.setStorageSync('token', res.data.data.token)
uni.showToast({
title: '登录成功',
icon: 'none', // 'none'

Loading…
Cancel
Save