Browse Source

fix: 登录页验证码获取

test2
xuesinan 4 years ago
parent
commit
108e32293c
  1. 1
      App.vue
  2. 1
      CHANGELOG.md
  3. 5
      hooks/user/userMixin.js
  4. 9
      pages.json
  5. 4
      pages/index/index.vue
  6. 4
      pages/user/login.vue
  7. 14
      pages/workbench/workbench.vue
  8. 8
      store/user/actions.js

1
App.vue

@ -30,7 +30,6 @@ export default {
// App // App
// let firstOpenApp = uni.$storage.getStorageSync('firstOpenApp'); // let firstOpenApp = uni.$storage.getStorageSync('firstOpenApp');
// this.$store.commit('setFirstOpenApp'); // this.$store.commit('setFirstOpenApp');
this.getGuide(0); this.getGuide(0);
this.getGuide(1); this.getGuide(1);
// #endif // #endif

1
CHANGELOG.md

@ -76,6 +76,7 @@
--|--|-- --|--|--
- | 插件接口修改 | [53c6b90](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/53c6b90) - | 插件接口修改 | [53c6b90](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/53c6b90)
- | 查询插件 | [542d714](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/542d714) - | 查询插件 | [542d714](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/542d714)
- | 广告页、引导页 | [b63ade5](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/b63ade5)
交付物 | 修复检查人选择组件之间相互影响的bug | [435c0bd](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/435c0bd) 交付物 | 修复检查人选择组件之间相互影响的bug | [435c0bd](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/435c0bd)
交付物 | 重构交付物审核部分,修复审核bug | [5fd8889](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/5fd8889) 交付物 | 重构交付物审核部分,修复审核bug | [5fd8889](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/5fd8889)
- | 解决warning | [dcb0079](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/dcb0079) - | 解决warning | [dcb0079](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/dcb0079)

5
hooks/user/userMixin.js

@ -121,11 +121,10 @@ export default function userMixin() {
verificationCodeValue: form.verificationCodeValue, verificationCodeValue: form.verificationCodeValue,
}; };
const data = await store.dispatch('user/sendCode', params); const data = await store.dispatch('user/sendCode', params);
// console.log('11111', data); if (data) {
// if (data) {
getCodeInterval(); getCodeInterval();
dataObj.showPaste = true; dataObj.showPaste = true;
// } }
} catch (err) { } catch (err) {
dataObj.showPaste = false; dataObj.showPaste = false;
throw err; throw err;

9
pages.json

@ -1,5 +1,6 @@
{ {
"pages": [ //pageshttps://uniapp.dcloud.io/collocation/pages "pages": [ //pageshttps://uniapp.dcloud.io/collocation/pages
// #ifdef APP-PLUS
{ {
"path": "pages/guide/adv", "path": "pages/guide/adv",
"style": { "style": {
@ -14,6 +15,7 @@
"navigationStyle": "custom" "navigationStyle": "custom"
} }
}, },
// #endif
{ {
"path": "pages/index/index", "path": "pages/index/index",
"style": { "style": {
@ -21,6 +23,13 @@
"navigationStyle": "custom" "navigationStyle": "custom"
} }
}, },
{
"path": "pages/workbench/workbench",
"style": {
"navigationBarText": "TALL",
"navigationStyle": "custom"
}
},
{ {
"path": "pages/business/business", "path": "pages/business/business",
"style": { "style": {

4
pages/index/index.vue

@ -40,8 +40,8 @@
const store = useStore(); const store = useStore();
const token = computed(() => store.state.user.token); const token = computed(() => store.state.user.token);
const uTips = ref(null); const uTips = ref(null);
const firstOpenApp = computed(() => store.state.firstOpenApp); // const firstOpenApp = computed(() => store.state.firstOpenApp);
const isOpenApp = computed(() => store.state.isOpenApp); // APP // const isOpenApp = computed(() => store.state.isOpenApp); // APP
const data = reactive({ const data = reactive({
calendar: null, calendar: null,

4
pages/user/login.vue

@ -35,12 +35,12 @@
<view class="u-m-t-30" style="color: #2885ED;" @click="openPage('/pages/user/accountLogin')">用户名登录</view> <view class="u-m-t-30" style="color: #2885ED;" @click="openPage('/pages/user/accountLogin')">用户名登录</view>
</view> --> </view> -->
<view style="margin-top: 200rpx; text-align: center; color: #999999;font-size: 35rpx;"> <!-- <view style="margin-top: 200rpx; text-align: center; color: #999999;font-size: 35rpx;">
快速登录 快速登录
</view> </view>
<view style="text-align: center; margin-top: 20rpx;" @click="mixinInit.handleWxLogin"> <view style="text-align: center; margin-top: 20rpx;" @click="mixinInit.handleWxLogin">
<image src="../../static/weixinIcon.png" mode="" style="width: 85rpx;height: 85rpx;"></image> <image src="../../static/weixinIcon.png" mode="" style="width: 85rpx;height: 85rpx;"></image>
</view> </view> -->
</view> </view>
</template> </template>

14
pages/workbench/workbench.vue

@ -0,0 +1,14 @@
<template>
<image src="../../static/adv.jpg"></image>
</template>
<script>
</script>
<style lang="scss" scoped>
image {
width: 100%;
height: 100%;
object-fit: cover;
}
</style>

8
store/user/actions.js

@ -27,11 +27,11 @@ const actions = {
async sendCode({ commit }, params) { async sendCode({ commit }, params) {
try { try {
const res = await uni.$u.api.getSmsCode(params); const res = await uni.$u.api.getSmsCode(params);
// if (res) { if (res) {
uni.$ui.showToast('验证码发送成功'); uni.$ui.showToast('验证码发送成功');
// } else { } else {
// uni.$ui.showToast('验证码发送失败'); uni.$ui.showToast('验证码发送失败');
// } }
return res; return res;
} catch (error) { } catch (error) {
uni.$ui.showToast(error.msg || '验证码发送失败'); uni.$ui.showToast(error.msg || '验证码发送失败');

Loading…
Cancel
Save