登录模块接口对接完毕
This commit is contained in:
@@ -78,3 +78,29 @@ export function apiReSetPsd(params) {
|
||||
method: 'POST'
|
||||
})
|
||||
}
|
||||
|
||||
// 更换手机号第一步
|
||||
export function apiComfirmCode (params) {
|
||||
return request({
|
||||
url: '/shiningCloud/user/comfirmCode',
|
||||
data: {
|
||||
devCode: uni.getStorageSync('cidAES'),
|
||||
phone: params.phone,
|
||||
code: params.code.trim()
|
||||
},
|
||||
method: 'POST'
|
||||
})
|
||||
}
|
||||
// 重新绑定手机号
|
||||
export function apiRebindPhone (params) {
|
||||
return request({
|
||||
url: '/shiningCloud/user/rebindPhone',
|
||||
data: {
|
||||
devCode: uni.getStorageSync('cidAES'),
|
||||
userId: uni.getStorageSync('userInfo').userId,
|
||||
phoneNew: params.phone,
|
||||
code: params.code.trim()
|
||||
},
|
||||
method: 'POST'
|
||||
})
|
||||
}
|
||||
@@ -421,7 +421,7 @@
|
||||
"list": [
|
||||
{
|
||||
"name": "login", //模式名称
|
||||
"path": "pages/user/changePhone", //启动页面,必选
|
||||
"path": "pages/device/APF/detail", //启动页面,必选
|
||||
"query": "" //启动参数,在页面的onLoad函数里面得到。
|
||||
}
|
||||
]
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<view>
|
||||
<uni-data-checkbox v-model="radio" :localdata="sex"></uni-data-checkbox>
|
||||
<view class="charts-box">
|
||||
<qiun-data-charts :ontouch="true" type="column" :opts="opts" :chartData="chartData" />
|
||||
<qiun-data-charts type="bar" :opts="opts" :chartData="chartData" />
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
@@ -27,12 +27,12 @@ export default {
|
||||
opts: {
|
||||
enableScroll: true,
|
||||
color: ["#1890FF", "#91CB74", "#FAC858", "#EE6666", "#73C0DE", "#3CA272", "#FC8452", "#9A60B4", "#ea7ccc"],
|
||||
padding: [15, 15, 0, 5],
|
||||
padding: [10,0,10,0],
|
||||
legend: {},
|
||||
xAxis: {
|
||||
disableGrid: true,
|
||||
itemCount: 8,
|
||||
scrollShow: true,
|
||||
// scrollShow: true,
|
||||
},
|
||||
yAxis: {
|
||||
data: [
|
||||
@@ -49,7 +49,7 @@ export default {
|
||||
activeBgOpacity: 0.08
|
||||
}
|
||||
},
|
||||
}
|
||||
啥}
|
||||
};
|
||||
},
|
||||
mounted () {
|
||||
@@ -65,11 +65,11 @@ export default {
|
||||
series: [
|
||||
{
|
||||
name: "电网侧",
|
||||
data: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30]
|
||||
data: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 7]
|
||||
},
|
||||
{
|
||||
name: "负载册",
|
||||
data: [30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]
|
||||
data: [5, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]
|
||||
}
|
||||
]
|
||||
};
|
||||
@@ -83,7 +83,6 @@ export default {
|
||||
<style lang="scss">
|
||||
.charts-box {
|
||||
margin-top: 20rpx;
|
||||
width: 100%;
|
||||
height: 300px;
|
||||
height:600px;
|
||||
}
|
||||
</style>
|
||||
@@ -26,7 +26,7 @@
|
||||
</uni-forms-item>
|
||||
<uni-forms-item name="code">
|
||||
<view class="login-box-input">
|
||||
<uni-easyinput type="number" v-model="formData.code" placeholder="请输入验证码" />
|
||||
<uni-easyinput type="number" v-model="formData.code2" placeholder="请输入验证码" />
|
||||
<view class="ml40"
|
||||
style="margin-left:40rpx;font-size: 28rpx; color: #666; width: 200rpx; text-align: center"
|
||||
v-if="waitTime > 0">{{ waitTime + 's后重新获取' }}</view>
|
||||
@@ -41,6 +41,7 @@
|
||||
</Cn-page>
|
||||
</template>
|
||||
<script>
|
||||
import { apiGetYms, apiComfirmCode, apiRebindPhone } from '@/common/api/user'
|
||||
export default {
|
||||
name: "jiaban",
|
||||
data () {
|
||||
@@ -104,7 +105,7 @@ export default {
|
||||
title: '请稍等'
|
||||
})
|
||||
apiGetYms({
|
||||
phone: this.formData.phone,
|
||||
phone: type == 5 ? this.formData.phone : this.formData.phone2,
|
||||
type,
|
||||
}).then(res => {
|
||||
uni.hideLoading()
|
||||
@@ -128,11 +129,32 @@ export default {
|
||||
this.formData.phoneShow = this.formData.phone.substr(0, 3) + '****' + this.formData.phone.substr(7)
|
||||
},
|
||||
firstSubmit () {
|
||||
apiComfirmCode({
|
||||
phone: this.formData.phone,
|
||||
code: this.formData.code,
|
||||
}).then(res => {
|
||||
this.step = 2
|
||||
|
||||
clearInterval(this.inter)
|
||||
this.waitTime = 0
|
||||
}).catch(err => {
|
||||
console.log(err);
|
||||
})
|
||||
},
|
||||
secondSubmit () {
|
||||
uni.navigateBack({ delta: 1 })
|
||||
apiRebindPhone({
|
||||
phone: this.formData.phone2,
|
||||
code: this.formData.code2,
|
||||
}).then(res => {
|
||||
this.$util.toast('绑定成功')
|
||||
uni.clearStorageSync();
|
||||
setTimeout(() => {
|
||||
uni.redirectTo({
|
||||
url: '/pages/user/login'
|
||||
})
|
||||
}, 1500);
|
||||
}).catch(err => {
|
||||
console.log(err);
|
||||
})
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user