Browse Source

feat: 登录图标、日历页今日

test2
xuesinan 4 years ago
parent
commit
7de419da1a
  1. 12
      App.vue
  2. 1
      CHANGELOG.md
  3. 2
      components/Adv/Adv.vue
  4. 5
      components/Calendar/Calendar.vue
  5. 39
      hooks/user/userMixin.js
  6. 2
      pages/guide/adv.vue
  7. 11
      pages/index/index.vue
  8. 2
      pages/user/accountLogin.vue
  9. 16
      pages/user/login.vue
  10. 0
      static/adv.jpg
  11. 0
      static/weixinIcon.png

12
App.vue

@ -220,6 +220,7 @@ export default {
page {
height: 100%;
}
.uni-swiper-slides {
position: absolute;
left: 0;
@ -227,4 +228,15 @@ page {
right: 0;
bottom: 0;
}
.statbar {
width: 750rpx;
height: var(--status-bar-height);
.status_bar {
height: var(--status-bar-height);
width: 100%;
position: absolute;
}
}
</style>

1
CHANGELOG.md

@ -45,6 +45,7 @@
- | 账户名密码登录 | [ebf456e](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/ebf456e)
- | 主体颜色 | [bb5c0e3](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/bb5c0e3)
- | 注册、用户协议 | [68e9189](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/68e9189)
- | 状态栏、导入 | [f30bac2](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/f30bac2)
- | app.vue | [970cf9a](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/970cf9a)
- | app端请求路径不对 | [b31fa14](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/b31fa14)
deliver 交付物 | 点击交付物链接webview打开链接 | [daa59f1](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/daa59f1)

2
components/Adv/Adv.vue

@ -8,7 +8,7 @@
</swiper-item>
</swiper>
<image v-else src="/common/img/adv.jpg"></image>
<image v-else src="/static/adv.jpg"></image>
<view class="time-box absolute">{{ time }} 跳过</view>
</view>

5
components/Calendar/Calendar.vue

@ -327,7 +327,10 @@ const clickItem = e => {
//
const goToday = () => {
const d = new Date();
initDate(d);
d.fullDate = dayjs(d).format('YYYY-MM-DD');
data.selectedDate = d.fullDate;
// initDate(d);
emit('selected-change', d);
};
</script>

39
hooks/user/userMixin.js

@ -210,6 +210,7 @@ export default function userMixin() {
// 微信登录
function handleWxLogin() {
// #ifdef H5
const origin = `${Config.baseUrl}/pt-mui`; // 测试
const appid = 'wxd1842e073e0e6d91';
const state = 'wx_web';
@ -217,6 +218,44 @@ export default function userMixin() {
// eslint-disable-next-line
window.location.href =
`${href}?appid=${appid}&redirect_uri=${origin}&response_type=code&scope=snsapi_login&state=${state}#wechat_redirect`;
// #endif
// #ifdef APP-PLUS
uni.getProvider({
service: 'oauth',
success: function(res) {
console.log(res.provider);
//支持微信、qq和微博等
if (~res.provider.indexOf('weixin')) {
uni.login({
provider: 'weixin',
success: function(loginRes) {
uni.$ui.showToast("App微信获取用户信息成功", loginRes);
console.log("App微信获取用户信息成功", loginRes);
// 获取用户信息
uni.getUserInfo({
provider: 'weixin',
success: function(infoRes) {
uni.$ui.showToast('-------获取微信用户所有-----');
uni.$ui.showToast(infoRes.userInfo.openId);
uni.$ui.showToast(JSON.stringify(infoRes.userInfo));
console.log('-------获取微信用户所有-----');
console.log(infoRes.userInfo.openId);
console.log(JSON.stringify(infoRes.userInfo));
// 提交信息
// that.wxSubmit(infoRes.userInfo.openId)
}
});
// that.getApploginData(loginRes) //请求登录接口方法
},
fail: function(res) {
console.log("App微信获取用户信息失败", res);
}
})
}
}
});
// #endif
}
return {

2
pages/guide/adv.vue

@ -8,7 +8,7 @@
</swiper-item>
</swiper>
<image v-else src="/common/img/adv.jpg"></image>
<image v-else src="/static/adv.jpg"></image>
<view class="time-box absolute">{{ time }} 跳过</view>
</view>

11
pages/index/index.vue

@ -138,17 +138,6 @@
</script>
<style lang="scss" scoped>
.statbar {
width: 750rpx;
height: var(--status-bar-height);
.status_bar {
height: var(--status-bar-height);
width: 100%;
position: absolute;
}
}
.content {
display: flex;
flex-direction: column;

2
pages/user/accountLogin.vue

@ -27,7 +27,7 @@
快速登录
</view>
<view style="text-align: center; margin-top: 20rpx;" @click="mixinInit.handleWxLogin">
<image src="/common/img/weixinIcon.png" mode="" style="width: 85rpx;height: 85rpx;"></image>
<image src="../../static/weixinIcon.png" mode="" style="width: 85rpx;height: 85rpx;"></image>
</view>
</view>
</template>

16
pages/user/login.vue

@ -1,4 +1,8 @@
<template>
<view class="statbar">
<view class="status_bar"></view>
</view>
<view class="u-p-l-50 u-p-r-50 u-p-t-30">
<u-form :model="form" ref="phoneLoginForm" :error-type="['message']">
<u-form-item label="手机号码" prop="phone" label-width="160">
@ -16,26 +20,26 @@
<u-button slot="right" size="mini" v-if="mixinInit.dataObj.showInterval">{{ mixinInit.dataObj.interval }}</u-button>
</u-form-item>
<view class="flex flex-nowrap">
<!-- <view class="flex flex-nowrap">
<view class="flex-sub"></view>
<view class="u-m-t-30 u-font-12 text-gray-400" @click="openPage('/pages/user/forgetPassword')">忘记密码</view>
</view>
</view> -->
</u-form>
<view class="u-m-t-50">
<u-button @click="submitLogin" type="primary">立即登录</u-button>
</view>
<view class="flex justify-between">
<!-- <view class="flex justify-between">
<view class="u-m-t-30" style="color: #2885ED;" @click="openPage('/pages/user/rigister')">新用户注册</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 style="text-align: center; margin-top: 20rpx;" @click="mixinInit.handleWxLogin">
<image src="/common/img/weixinIcon.png" mode="" style="width: 85rpx;height: 85rpx;"></image>
<image src="../../static/weixinIcon.png" mode="" style="width: 85rpx;height: 85rpx;"></image>
</view>
</view>
</template>

0
common/img/adv.jpg → static/adv.jpg

Before

Width:  |  Height:  |  Size: 515 KiB

After

Width:  |  Height:  |  Size: 515 KiB

0
common/img/weixinIcon.png → static/weixinIcon.png

Before

Width:  |  Height:  |  Size: 8.6 KiB

After

Width:  |  Height:  |  Size: 8.6 KiB

Loading…
Cancel
Save