You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
90 lines
1.8 KiB
90 lines
1.8 KiB
<template>
|
|
<view>
|
|
<view class="logo">
|
|
<view class="img">
|
|
<image mode="widthFix" src="../../../static/img/logo2.jpg">
|
|
</image>
|
|
</view>
|
|
</view>
|
|
<!-- 账号密码输入框 -->
|
|
<view class="form">
|
|
<view class="password">
|
|
<image src="../../../static/img/pas.png" style="width: 40rpx;height: 40rpx;"></image><input
|
|
placeholder="请输入密码" type="number" maxlength="6" v-model="passwd" password=true placeholder-style="color: #333333;" />
|
|
</view>
|
|
<view class="btn mart50" @tap="setUserPayPwd">确 认</view>
|
|
</view>
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
import {
|
|
setUserPayPwd
|
|
} from "../../../Utils/Api.js";
|
|
let app =getApp();
|
|
export default {
|
|
data() {
|
|
return {
|
|
passwd: '',
|
|
}
|
|
},
|
|
methods: {
|
|
setUserPayPwd() {
|
|
uni.hideKeyboard();
|
|
if (this.passwd == '') {
|
|
uni.showToast({
|
|
title: '请填写密码',
|
|
icon: "none"
|
|
});
|
|
return false;
|
|
}
|
|
uni.showLoading({
|
|
title: '设置中...'
|
|
})
|
|
let datas = {
|
|
"password": this.passwd
|
|
}
|
|
setUserPayPwd(datas).then(res => {
|
|
if (res.return_code == '000000') {
|
|
uni.hideLoading();
|
|
uni.showToast({
|
|
title: '设置成功',
|
|
icon: "none",
|
|
duration:2000
|
|
});
|
|
app.globalData.userInfo = res.return_data
|
|
.object
|
|
.highUser;
|
|
uni.setStorage({
|
|
key: "user",
|
|
data: res.return_data
|
|
.object
|
|
.highUser
|
|
})
|
|
uni.navigateBack({
|
|
})
|
|
} else {
|
|
uni.hideLoading();
|
|
uni.showToast({
|
|
title: res.return_msg,
|
|
icon: "none"
|
|
})
|
|
}
|
|
})
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style lang="scss">
|
|
@import "../../../static/css/login.scss";
|
|
.form {
|
|
.res {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
height: 100upx;
|
|
color: rgba($color: #ffffff, $alpha: 0.8);
|
|
}
|
|
}
|
|
</style>
|
|
|