Merge pull request '1' (#52) from DJ into dev

Reviewed-on: http://git.hchyun.com/feashow/pupil/pulls/52
This commit is contained in:
odjbin
2023-01-16 08:09:34 +00:00
2 changed files with 88 additions and 11 deletions

View File

@@ -5,11 +5,20 @@
<u-modal :show="showM" closeOnClickOverlay="false" confirmText="确定" @confirm="confirm">
<rich-text :nodes="content"></rich-text>
</u-modal>
<view style="margin:0 20rpx;">
<u-overlay :show="!isLoad">
<login @success="reOnLoad()" @fail="failToLoad()"></login>
</u-overlay>
</view>
</view>
</template>
<script>
import login from 'pages/my/login/login'
export default {
components: {
login
},
data() {
return {
name: '',
@@ -17,8 +26,21 @@
showM: false,
content: `您的申请已提交<br>
请静待人工审核`,
isLoad: true,
}
},
onLoad() {
this.getIdeasAndNeeds()
if (!uni.getStorageSync('token') || uni.getStorageSync('token').length === 0) {
console.log(uni.getStorageSync('token'))
this.isLoad = false
// uni.navigateTo({
// url: '../../pages/my/login/login'
// })
return
}
this.isLoad = true
},
methods: {
handleSureClick() {
let name = this.$refs.nameAndphone.model.userInfo.name
@@ -42,6 +64,22 @@
// uni.switchTab({
// url: '/pages/my/my'
// })
},
reOnLoad() {
console.log('----------------true')
if (!uni.getStorageSync('token') || uni.getStorageSync('token').length === 0) {
this.$toast.warn('登录失败请重试')
this.isLoad = false
// uni.navigateTo({
// url: '../../pages/my/login/login'
// })
return
}
this.isLoad = true
},
failToLoad() {
console.log('----------------false')
this.$toast.warn('登录失败请重试')
}
}

View File

@@ -29,6 +29,13 @@
<u-modal :show="showM" :content="content" showCancelButton closeOnClickOverlay="false" @confirm="confirm"
@cancel="cancel">
</u-modal>
<view style="margin:0 20rpx;">
<u-overlay :show="!isLoad">
<login @success="reOnLoad()" @fail="failToLoad()"></login>
</u-overlay>
</view>
<view style="font-size: 24rpx;color: #A3A3A3;text-align: center;padding: 26rpx 0;" v-if="needsList.length==0">
暂无更多记录</view>
</view>
</template>
@@ -36,9 +43,14 @@
import {
dateFormatXwDetail
} from '../../utills/date.js'
import login from 'pages/my/login/login'
export default {
components: {
login
},
data() {
return {
isLoad: true,
id: '',
showM: false,
content: '您确定删除吗?',
@@ -52,17 +64,19 @@
}, {
name: '创意发布'
}],
needsList: [{
id: 1,
desc: '需求描述需求描述需求描述需求描述需求描述需求描述需求描述需求描述需求描述描述需求描述描...',
pname: '产品名称产品名称产品名称',
pub_time: '2022-12-03 09:59',
}, {
id: 2,
desc: '需求描述需求描述需求描述需求描述需求描述需求描述需求描述需求描述需求描述描述需求描述描...',
pname: '产品名称产品名称产品名称',
pub_time: '2022-12-03 09:59',
}]
needsList: [
// {
// id: 1,
// desc: '需求描述需求描述需求描述需求描述需求描述需求描述需求描述需求描述需求描述描述需求描述描...',
// pname: '产品名称产品名称产品名称',
// pub_time: '2022-12-03 09:59',
// }, {
// id: 2,
// desc: '需求描述需求描述需求描述需求描述需求描述需求描述需求描述需求描述需求描述描述需求描述描...',
// pname: '产品名称产品名称产品名称',
// pub_time: '2022-12-03 09:59',
// },
]
}
},
onLoad() {
@@ -72,6 +86,15 @@
this.type = 1
}
this.getIdeasAndNeeds()
if (!uni.getStorageSync('token') || uni.getStorageSync('token').length === 0) {
console.log(uni.getStorageSync('token'))
this.isLoad = false
// uni.navigateTo({
// url: '../../pages/my/login/login'
// })
return
}
this.isLoad = true
},
methods: {
//获取创意发布
@@ -114,6 +137,22 @@
},
cancel() {
this.showM = false
},
reOnLoad() {
console.log('----------------true')
if (!uni.getStorageSync('token') || uni.getStorageSync('token').length === 0) {
this.$toast.warn('登录失败请重试')
this.isLoad = false
// uni.navigateTo({
// url: '../../pages/my/login/login'
// })
return
}
this.isLoad = true
},
failToLoad() {
console.log('----------------false')
this.$toast.warn('登录失败请重试')
}
}
}