样式修改
This commit is contained in:
@@ -31,7 +31,7 @@ const UserApi = {
|
||||
// 设置密码
|
||||
setPassword: (params) => http.post(`${URL_CONFIG}company/changePasswordWithToken`, params),
|
||||
// 修改密码
|
||||
updatePassword: (params) => http.post(`${URL_CONFIG}company/verificationChangePassword`, params),
|
||||
updatePassword: (params) => http.post(`${URL_CONFIG}company/changePassword`, params),
|
||||
// 图片验证码
|
||||
sendImage: (params) => http.get(`${URL_CONFIG}sys/randomImage/${params.time}`, params),
|
||||
// 确认签到
|
||||
|
||||
@@ -1,23 +1,21 @@
|
||||
import MeetingApi from '../js/http/meetingApi'
|
||||
import { baseUrl } from '../../assets/js/http/api'
|
||||
/**
|
||||
* 预览文件的方法
|
||||
* 预览文件的方法
|
||||
* @param fileId 文件id
|
||||
* @param fileName 文件名称
|
||||
*/
|
||||
|
||||
// 文件下载的地址 后期上线需要修改地址
|
||||
const downFileUrl = `http://localhost:3000/jero-boot/sys/common/download/`
|
||||
const downFileUrl = `${baseUrl}/jero-boot/sys/common/download/`
|
||||
|
||||
// 预览
|
||||
export function previewFile(fileId,fileName) {
|
||||
|
||||
// 目前没有在真机调试上试过 不知道要不要改前缀
|
||||
// console.log(that.data.pdfFilePath.replace("wxfile", 'http'));
|
||||
// 文件下载的地址
|
||||
// 文件下载的地址
|
||||
const url = downFileUrl + fileId
|
||||
// 文件类型 目前是通过文件名称去截取
|
||||
// 文件类型 目前是通过文件名称去截取
|
||||
const fileType = sliceFileTypeByFileName(fileName)
|
||||
// const fileType =
|
||||
// const fileType =
|
||||
wx.downloadFile({
|
||||
url: url,
|
||||
success: function (res) {
|
||||
@@ -44,7 +42,7 @@ export function previewFile(fileId,fileName) {
|
||||
})
|
||||
}
|
||||
|
||||
// 截取文件类型的方法
|
||||
// 截取文件类型的方法
|
||||
export function sliceFileTypeByFileName(fileName){
|
||||
// 获取 . 的索引
|
||||
let index = fileName.lastIndexOf('.')
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
<view>
|
||||
<text>关联项目</text>
|
||||
<view class="ass-project">
|
||||
<text wx:for="{{form.listProject}}" data-file="{{item}}" wx:key="item">{{item.chargeProject}}</text>
|
||||
<text wx:for="{{form.listProject}}" data-file="{{item}}" wx:key="item">{{item.chargeProject}}撒打算打sadsaasdsadas算阿江河湖海三打算</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@@ -32,10 +32,15 @@ page{
|
||||
.basic-info view:last-child{
|
||||
border-bottom: 0;
|
||||
}
|
||||
.basic-info view text:nth-child(1){
|
||||
flex-shrink: 0;
|
||||
margin-right: 10px;
|
||||
}
|
||||
.email-info text:nth-child(1){
|
||||
color: #333;
|
||||
font-size: 14px;
|
||||
line-height: 25px;
|
||||
flex: 1;
|
||||
}
|
||||
.email-info{
|
||||
padding: 15px;
|
||||
@@ -44,6 +49,7 @@ page{
|
||||
color: #069F99;
|
||||
font-size: 14px;
|
||||
display: block;
|
||||
width: 70px;
|
||||
margin-top: 10px;
|
||||
text-align: center;
|
||||
flex-shrink: 0;
|
||||
@@ -55,9 +61,17 @@ page{
|
||||
flex-direction: column;
|
||||
justify-content: flex-end;
|
||||
align-items: flex-end;
|
||||
overflow: hidden;
|
||||
}
|
||||
.ass-project text{
|
||||
width: 100%;
|
||||
display: block;
|
||||
overflow: hidden;
|
||||
text-align: right;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
color: #069F99;
|
||||
display: block;
|
||||
line-height: 25px;
|
||||
margin: 0 !important;
|
||||
}
|
||||
@@ -87,6 +87,10 @@ Page({
|
||||
},
|
||||
// 微信登录
|
||||
wxLogin(){
|
||||
wx.showToast({
|
||||
title: '登录中...',
|
||||
icon: 'loading'
|
||||
})
|
||||
const that = this
|
||||
wxBind((res)=>{
|
||||
let params = {
|
||||
@@ -144,11 +148,8 @@ Page({
|
||||
key: 'X-Access-Token',
|
||||
data: res.result.token
|
||||
})
|
||||
// 如果绑定过微信就不再进行绑定
|
||||
if(!res.result.userInfo.openId){
|
||||
// 绑定微信
|
||||
this.wxBindPhone()
|
||||
}
|
||||
// 绑定微信
|
||||
this.wxBindPhone()
|
||||
// 跳转首页
|
||||
wx.switchTab({
|
||||
url: '../home/home',
|
||||
|
||||
@@ -108,11 +108,8 @@ Page({
|
||||
if(this.data.flag){
|
||||
UserApi.passWordLogin(params).then(res => {
|
||||
if(res.success){
|
||||
// 如果绑定过微信就不再进行绑定
|
||||
if(!res.result.userInfo.openId){
|
||||
// 绑定微信
|
||||
this.wxBindPhone()
|
||||
}
|
||||
// 绑定微信
|
||||
this.wxBindPhone()
|
||||
// 存token和userInfo
|
||||
wx.setStorage({
|
||||
key: 'X-Access-Token',
|
||||
|
||||
@@ -85,7 +85,7 @@ Page({
|
||||
data: that.data.password
|
||||
})
|
||||
// 绑定微信
|
||||
this.wxBind()
|
||||
this.wxBindPhone()
|
||||
wx.switchTab({
|
||||
url: '../home/home',
|
||||
})
|
||||
@@ -100,10 +100,9 @@ Page({
|
||||
}
|
||||
},
|
||||
// 绑定微信
|
||||
wxBind(){
|
||||
wxBindPhone(){
|
||||
const that = this
|
||||
wxBind((res)=>{
|
||||
// 微信和该账号绑定
|
||||
let params = {
|
||||
openId: res.data.openid,
|
||||
rsaPublicKey: that.data.rsaPublicKey
|
||||
|
||||
@@ -152,8 +152,12 @@ Page({
|
||||
if(res.success){
|
||||
wx.showToast({
|
||||
title: res.result,
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
})
|
||||
wx.navigateBack()
|
||||
setTimeout(() => {
|
||||
wx.navigateBack()
|
||||
}, 2000);
|
||||
}
|
||||
}).catch(err => {
|
||||
wx.hideToast()
|
||||
|
||||
Reference in New Issue
Block a user