gjy %!s(int64=2) %!d(string=hai) anos
pai
achega
ae6ba0497a
Modificáronse 2 ficheiros con 67 adicións e 33 borrados
  1. 15 7
      pages/business/businessNew.vue
  2. 52 26
      pages/business/release.vue

+ 15 - 7
pages/business/businessNew.vue

@@ -370,14 +370,22 @@
 					this.isShowAlert = true;
 					this.isShowAlert = true;
 
 
 				} else {
 				} else {
-					if (!uni.getStorageSync('userInfo').transactionStatus || uni.getStorageSync('userInfo')
-						.transactionStatus && uni.getStorageSync('userInfo').transactionStatus != '禁止发布') {
-						uni.navigateTo({
-							url: 'release'
+					this.$api.doRequest('get', '/commonUser/getInfo', {id:uni.getStorageSync('userInfo').id}).then(
+						res => {
+							console.log(res.data)
+							if (!res.data.data.transactionStatus || res.data.data.transactionStatus && res.data.data.transactionStatus != '禁止发布') {
+								uni.navigateTo({
+									url: 'release'
+								})
+							} else {
+								uni.showToast({
+									title: '暂未获得发布权限!',
+									icon:'none'
+								})
+							}
 						})
 						})
-					} else {
-
-					}
+					
+					
 
 
 				}
 				}
 
 

+ 52 - 26
pages/business/release.vue

@@ -72,11 +72,16 @@
 			<view class="edit-nickname">
 			<view class="edit-nickname">
 				<view>昵称长度限制在2-24个字符内</view>
 				<view>昵称长度限制在2-24个字符内</view>
 				<u-input v-model="dataObj.publisher" border class='nickname-input' />
 				<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>
 					<u-button type="success" size="medium" class="nickname-btn" @click="nickNamesubmit">保存</u-button>
+					
 				</view>
 				</view>
 			</view>
 			</view>
 		</u-popup>
 		</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>
 	</view>
 </template>
 </template>
 
 
@@ -128,6 +133,7 @@
 						disabled: false
 						disabled: false
 					}
 					}
 				],
 				],
+				isShowAlert:false,
 				businesslicense: [],
 				businesslicense: [],
 				value: '',
 				value: '',
 				action: this.$uploadUrl,
 				action: this.$uploadUrl,
@@ -257,6 +263,34 @@
 			closePopup() {
 			closePopup() {
 				this.dataObj.publisher = this.userInfo.wechatNo
 				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() {
 			nickNamesubmit() {
 				if (this.dataObj.publisher == null || this.dataObj.publisher == "") {
 				if (this.dataObj.publisher == null || this.dataObj.publisher == "") {
 					this.$api.msg('请输入昵称!')
 					this.$api.msg('请输入昵称!')
@@ -320,38 +354,30 @@
 				console.log(this.dataObj)
 				console.log(this.dataObj)
 				this.showNickname = true
 				this.showNickname = true
 			},
 			},
-			submit() {
-
+			async submit() {
+				
 				if (!this.dataObj.publishingContent && this.businesslicense.length == 0) {
 				if (!this.dataObj.publishingContent && this.businesslicense.length == 0) {
 					uni.showToast({
 					uni.showToast({
 						title: "图片和文字不能同时为空,错误提示“发布内容不能为空",
 						title: "图片和文字不能同时为空,错误提示“发布内容不能为空",
 						icon: 'none',
 						icon: 'none',
 						duration: 2000
 						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) {
 			dateFormat(time) {
 				let date = new Date(time);
 				let date = new Date(time);