配置全局变量
This commit is contained in:
+9
-9
@@ -49,15 +49,15 @@ Page({
|
||||
const reg = new RegExp("<p>","g")
|
||||
const reg1 = new RegExp("</p>","g")
|
||||
if(res.result.records && res.result.records.length){
|
||||
res.result.records.forEach(item=>{
|
||||
item.msgContent = item.msgContent.replace(reg,"")
|
||||
item.msgContent = item.msgContent.replace(reg1,"")
|
||||
const startIndex = item.msgContent.indexOf("<a")
|
||||
const endIndex = item.msgContent.lastIndexOf("</a>")
|
||||
if(startIndex > -1 && endIndex > -1 ){
|
||||
item.msgContent = item.msgContent.substring(0, startIndex) + item.msgContent.slice(endIndex + 4) + '点击报名'
|
||||
}
|
||||
})
|
||||
// res.result.records.forEach(item=>{
|
||||
// item.msgContent = item.msgContent.replace(reg,"")
|
||||
// item.msgContent = item.msgContent.replace(reg1,"")
|
||||
// const startIndex = item.msgContent.indexOf("<a")
|
||||
// const endIndex = item.msgContent.lastIndexOf("</a>")
|
||||
// if(startIndex > -1 && endIndex > -1 ){
|
||||
// item.msgContent = item.msgContent.substring(0, startIndex) + item.msgContent.slice(endIndex + 4) + '点击报名'
|
||||
// }
|
||||
// })
|
||||
this.setData({
|
||||
list: [...this.data.list, ...res.result.records]
|
||||
})
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
</view>
|
||||
<text class="content-time">{{item.sendTime}}</text>
|
||||
</view>
|
||||
<text class="content-bottom">{{item.msgContent}}</text>
|
||||
<rich-text class="content-bottom" nodes="{{item.msgContent}}"></rich-text>
|
||||
<text class="status" wx:if="{{item.readFlag == 0}}"></text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@@ -30,8 +30,8 @@
|
||||
<text bindtap="updateInfo">忘记密码?</text>
|
||||
</view>
|
||||
<text class="other-way">或用以下方式登录</text>
|
||||
<view class="weixin">
|
||||
<image src="../../assets/images/wx.png" bindtap="wxLogin"></image>
|
||||
<view class="weixin" bindtap="wxLogin">
|
||||
<image src="../../assets/images/wx.png"></image>
|
||||
</view>
|
||||
</form>
|
||||
</view>
|
||||
|
||||
@@ -7,10 +7,7 @@ import {
|
||||
import MeetingApi from '../../assets/js/http/meetingApi'
|
||||
import signUpApi from '../../assets/js/http/signUp'
|
||||
import UserApi from '../../assets/js/http/userApi'
|
||||
import {
|
||||
baseUrl,
|
||||
URL_CONFIG
|
||||
} from '../../assets/js/http/api'
|
||||
import {baseUrl, URL_CONFIG} from '../../assets/js/project.config.js'
|
||||
Page({
|
||||
|
||||
/**
|
||||
|
||||
+2
-2
@@ -166,7 +166,7 @@ Page({
|
||||
*/
|
||||
onShow: function () {
|
||||
let userInfo = wx.getStorageSync('userInfo')
|
||||
let userInfoTemp = wx.getStorageSync('userInfoTemp')
|
||||
let avatarUrl = wx.getStorageSync('avatarUrl')
|
||||
let token = wx.getStorageSync('X-Access-Token')
|
||||
this.setData({
|
||||
token
|
||||
@@ -177,7 +177,7 @@ Page({
|
||||
phone: userInfo.phone.substr(0, 3) + '-' + userInfo.phone.substr(3, 4) + '-' + userInfo.phone.substr(7, 4)
|
||||
})
|
||||
}
|
||||
if (userInfoTemp) {
|
||||
if (avatarUrl) {
|
||||
this.setData({
|
||||
avatarUrl: userInfoTemp.avatarUrl
|
||||
})
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import UserApi from '../../assets/js/http/userApi'
|
||||
import { baseUrl, URL_CONFIG } from '../../assets/js/http/api'
|
||||
import {baseUrl, URL_CONFIG} from '../../assets/js/project.config.js'
|
||||
Page({
|
||||
|
||||
/**
|
||||
|
||||
@@ -5,10 +5,7 @@ import {
|
||||
previewFile,
|
||||
getFileInfo
|
||||
} from '../../assets/js/preview'
|
||||
import {
|
||||
baseUrl,
|
||||
URL_CONFIG
|
||||
} from '../../assets/js/http/api'
|
||||
import {baseUrl, URL_CONFIG} from '../../assets/js/project.config.js'
|
||||
|
||||
Page({
|
||||
|
||||
|
||||
@@ -5,10 +5,7 @@ import {
|
||||
phoneReg,
|
||||
postcode
|
||||
} from '../../utils/validate'
|
||||
import {
|
||||
baseUrl,
|
||||
URL_CONFIG
|
||||
} from '../../assets/js/http/api'
|
||||
import {baseUrl, URL_CONFIG} from '../../assets/js/project.config.js'
|
||||
Page({
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user