|
@@ -72,11 +72,16 @@
|
|
|
<view class="edit-nickname">
|
|
|
<view>昵称长度限制在2-24个字符内</view>
|
|
|
<u-input v-model="dataObj.publisher" border class='nickname-input' />
|
|
|
- <view style="text-align: center;">
|
|
|
+ <view style="display:flex;justify-content: space-between;">
|
|
|
+ <u-button type="default" size="medium" class="nickname-btn" @click="showNickname=false">取消</u-button>
|
|
|
<u-button type="success" size="medium" class="nickname-btn" @click="nickNamesubmit">保存</u-button>
|
|
|
+
|
|
|
</view>
|
|
|
</view>
|
|
|
</u-popup>
|
|
|
+ <u-modal v-model="isShowAlert" :title-style="{fontSize: '18px',fontWeight:'500'}"
|
|
|
+ :content-style="{fontSize: '14px',fontWeight:'400'}" confirm-color='#22C572' confirm-text='确定' title='提示'
|
|
|
+ showCancelButton='false' content="确定发布交易信息?" @confirm="alertBtn" @cancel="cancelClick"></u-modal>
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
@@ -128,6 +133,7 @@
|
|
|
disabled: false
|
|
|
}
|
|
|
],
|
|
|
+ isShowAlert:false,
|
|
|
businesslicense: [],
|
|
|
value: '',
|
|
|
action: this.$uploadUrl,
|
|
@@ -257,6 +263,34 @@
|
|
|
closePopup() {
|
|
|
this.dataObj.publisher = this.userInfo.wechatNo
|
|
|
},
|
|
|
+ cancelClick() {
|
|
|
+ this.isShowAlert = false
|
|
|
+ },
|
|
|
+ alertBtn() {
|
|
|
+ uni.showLoading({
|
|
|
+ title: '数据加载中',
|
|
|
+ mask: true
|
|
|
+
|
|
|
+ })
|
|
|
+
|
|
|
+ this.dataObj.urlImg = this.imgList.toString()
|
|
|
+ this.dataObj.remark3 = this.dateFormat(new Date().getTime())
|
|
|
+ this.$api.doRequest('post', '/transactionExchangeInfo/addInfo', this.dataObj).then(res => {
|
|
|
+ console.log(res)
|
|
|
+ if (res.data.code == 200) {
|
|
|
+ this.num = 0
|
|
|
+ uni.navigateBack({
|
|
|
+ delta: 1
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ uni.showToast({
|
|
|
+ title: res.message,
|
|
|
+ icon: 'none',
|
|
|
+ duration: 2000
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
nickNamesubmit() {
|
|
|
if (this.dataObj.publisher == null || this.dataObj.publisher == "") {
|
|
|
this.$api.msg('请输入昵称!')
|
|
@@ -320,38 +354,30 @@
|
|
|
console.log(this.dataObj)
|
|
|
this.showNickname = true
|
|
|
},
|
|
|
- submit() {
|
|
|
-
|
|
|
+ async submit() {
|
|
|
+
|
|
|
if (!this.dataObj.publishingContent && this.businesslicense.length == 0) {
|
|
|
uni.showToast({
|
|
|
title: "图片和文字不能同时为空,错误提示“发布内容不能为空",
|
|
|
icon: 'none',
|
|
|
duration: 2000
|
|
|
})
|
|
|
+ return
|
|
|
}
|
|
|
- uni.showLoading({
|
|
|
- title: '数据加载中',
|
|
|
- mask: true
|
|
|
-
|
|
|
- })
|
|
|
-
|
|
|
- this.dataObj.urlImg = this.imgList.toString()
|
|
|
- this.dataObj.remark3 = this.dateFormat(new Date().getTime())
|
|
|
- this.$api.doRequest('post', '/transactionExchangeInfo/addInfo', this.dataObj).then(res => {
|
|
|
- console.log(res)
|
|
|
- if (res.data.code == 200) {
|
|
|
- this.num = 0
|
|
|
- uni.navigateBack({
|
|
|
- delta: 1
|
|
|
- })
|
|
|
- } else {
|
|
|
- uni.showToast({
|
|
|
- title: res.message,
|
|
|
- icon: 'none',
|
|
|
- duration: 2000
|
|
|
- })
|
|
|
- }
|
|
|
- })
|
|
|
+ var that = this
|
|
|
+ await this.$api.doRequest('get', '/commonUser/getInfo', {id:uni.getStorageSync('userInfo').id}).then(
|
|
|
+ res => {
|
|
|
+ if (!res.data.data.transactionStatus || res.data.data.transactionStatus && res.data.data.transactionStatus != '禁止发布') {
|
|
|
+ that.isShowAlert = true
|
|
|
+ } else {
|
|
|
+ uni.showToast({
|
|
|
+ title: '暂未获得发布权限!',
|
|
|
+ icon:'none'
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
+
|
|
|
},
|
|
|
dateFormat(time) {
|
|
|
let date = new Date(time);
|