Selaa lähdekoodia

交易详情编辑跳转

zxz 2 vuotta sitten
vanhempi
commit
99d82f5a5b
2 muutettua tiedostoa jossa 24 lisäystä ja 0 poistoa
  1. 12 0
      pageA/product/detail.vue
  2. 12 0
      pageA/product/sales_detail.vue

+ 12 - 0
pageA/product/detail.vue

@@ -216,6 +216,7 @@
 		<!-- 底部操作菜单 -->
 		<view class="page-bottom1">
 			<view class="Regular">
+				<u-button class="talk-online" @click="editInfo" v-if="show">编辑</u-button>
 				<u-button class="talk-online" @click="contactUs">立即沟通</u-button>
 				<u-button @click="salegrain" v-if="goods.pcFlag == 1" type="primary"
 					class="action-btn no-border add-cart-btn">立即卖粮</u-button>
@@ -247,6 +248,7 @@
 				content1: '您尚未登录,是否立即登录?',
 				content: '您还未认证粮商身份,下单前请先完善您的身份信息。',
 				isShowAlert: false,
+				show: false,
 				swiperCurrent: 0,
 				titleNViewBackground: '',
 				swiperLength: 0,
@@ -296,6 +298,9 @@
 			}).then(res => {
 				uni.hideLoading()
 				this.goods = res.data.data
+				if(that.goods.createUserId == uni.getStorageSync('userInfo').id){
+					that.show = true
+				}
 			})
 
 			// .then(res => {
@@ -313,6 +318,13 @@
 			...mapState(['hasLogin', 'userInfo'])
 		},
 		methods: {
+			editInfo(){
+				const that = this
+				uni.navigateTo({
+					url: '/pageD/myRelease/buyEdit?id='+that.goods.id+'&compId='+that.goods.compId
+				})
+				
+			},
 			alertBtn1() {
 				uni.navigateTo({
 					url: '/pages/public/login'

+ 12 - 0
pageA/product/sales_detail.vue

@@ -216,6 +216,7 @@
 		<!-- 底部操作菜单 -->
 		<view class="page-bottom1">
 			<view>
+				<button class="talk-online" @click="editInfo" v-if="show">编辑</button>
 				<button type="primary" @click="contactUs">立即沟通</button>
 				<button @click="salegrain" v-if="goods.pcFlag == 1" type="primary"
 					class=" action-btn no-border add-cart-btn">立即买粮</button>
@@ -241,6 +242,7 @@
 			return {
 				isShowAlert: false,
 				content: '您尚未登录,是否立即登录?',
+				show: false,
 				swiperCurrent: 0,
 				titleNViewBackground: '',
 				swiperLength: 0,
@@ -290,12 +292,22 @@
 			}).then(res => {
 				uni.hideLoading()
 				this.goods = res.data.data
+				if(that.goods.createUserId == uni.getStorageSync('userInfo').id){
+					that.show = true
+				}
 			})
 		},
 		computed: {
 			...mapState(['hasLogin', 'userInfo'])
 		},
 		methods: {
+			editInfo(){
+				const that = this
+				uni.navigateTo({
+					url: '/pageD/myRelease/sellEdit?id='+that.goods.id+'&compId='+that.goods.compId
+				})
+				
+			},
 			alertBtn() {
 				uni.navigateTo({
 					url: '/pages/public/login'