Ver código fonte

commit -m 修复商品详情 冻结 隐身商品显示

zhengjinyi 4 anos atrás
pai
commit
d62dcc6f0e

+ 4 - 2
components/cm-module/pageFloorTemplate/templateA.vue

@@ -166,11 +166,13 @@
 		},
 		methods:{
 			initData(data){
+				this.floorData = data
+				// console.log(this.floorData)
 				this.$api.getStorage().then((resolve) =>{
 					this.shopId = resolve.shopId ? resolve.shopId : 0
+				}).catch(err => {
+					console.log('err',err)
 				})
-				this.floorData = data
-				console.log(this.floorData)
 			},
 			PromotionsFormat(promo){//促销活动类型数据处理
 				if(promo!=null){

+ 4 - 2
components/cm-module/pageFloorTemplate/templateB.vue

@@ -178,11 +178,13 @@
 		},
 		methods:{
 			initData(data){
+				this.floorData = data
+				// console.log(this.floorData)
 				this.$api.getStorage().then((resolve) =>{
 					this.shopId = resolve.shopId ? resolve.shopId : 0
+				}).catch(err => {
+					console.log('err',err)
 				})
-				this.floorData = data
-				// console.log(this.floorData)
 			},
 			PromotionsFormat(promo){//促销活动类型数据处理
 				if(promo!=null){

+ 4 - 2
components/cm-module/pageFloorTemplate/templateC.vue

@@ -178,11 +178,13 @@
 		},
 		methods:{
 			initData(data){
+				this.floorData = data
+				// console.log(this.floorData)
 				this.$api.getStorage().then((resolve) =>{
 					this.shopId = resolve.shopId ? resolve.shopId : 0
+				}).catch(err => {
+					console.log('err',err)
 				})
-				this.floorData = data
-				// console.log(this.floorData)
 			},
 			PromotionsFormat(promo){//促销活动类型数据处理
 				if(promo!=null){

+ 4 - 2
components/cm-module/pageFloorTemplate/templateD.vue

@@ -190,11 +190,13 @@
 		},
 		methods:{
 			initData(data){
+				this.floorData = data
+				// console.log(this.floorData)
 				this.$api.getStorage().then((resolve) =>{
 					this.shopId = resolve.shopId ? resolve.shopId : 0
+				}).catch(err => {
+					console.log('err',err)
 				})
-				this.floorData = data
-				// console.log(this.floorData)
 			},
 			PromotionsFormat(promo){//促销活动类型数据处理
 				if(promo!=null){

+ 4 - 2
components/cm-module/pageFloorTemplate/templateE.vue

@@ -166,11 +166,13 @@
 		},
 		methods:{
 			initData(data){
+				this.floorData = data
+				// console.log(this.floorData)
 				this.$api.getStorage().then((resolve) =>{
 					this.shopId = resolve.shopId ? resolve.shopId : 0
+				}).catch(err => {
+					console.log('err',err)
 				})
-				this.floorData = data
-				// console.log(this.floorData)
 			},
 			PromotionsFormat(promo){//促销活动类型数据处理
 				if(promo!=null){

+ 4 - 2
components/cm-module/pageFloorTemplate/templateF.vue

@@ -154,11 +154,13 @@
 		},
 		methods:{
 			initData(data){
+				this.floorData = data
+				// console.log(this.floorData)
 				this.$api.getStorage().then((resolve) =>{
 					this.shopId = resolve.shopId ? resolve.shopId : 0
+				}).catch(err => {
+					console.log('err',err)
 				})
-				this.floorData = data
-				// console.log(this.floorData)
 			},
 			PromotionsFormat(promo){//促销活动类型数据处理
 				if(promo!=null){

+ 7 - 5
components/cm-module/pageTemplate/templateA.vue

@@ -149,12 +149,12 @@
 				return Number(text).toFixed(2);			
 			},		
 		},
-		created(){
-			this.initData(this.pageData)
-		},
 		computed: {
 			...mapState(['hasLogin','userInfo','isActivity'])
 		},
+		created(){
+			this.initData(this.pageData)
+		},
 		watch: {
 			pageData: {
 				handler: function (el) {//监听对象的变换使用 function,箭头函数容易出现this指向不正确
@@ -166,11 +166,13 @@
 		},
 		methods:{
 			initData(data){
+				this.floorData = data
+				// console.log(this.floorData)
 				this.$api.getStorage().then((resolve) =>{
 					this.shopId = resolve.shopId ? resolve.shopId : 0
+				}).catch(err => {
+					console.log('err',err)
 				})
-				this.floorData = data
-				// console.log(this.floorData)
 			},
 			PromotionsFormat(promo){//促销活动类型数据处理
 				if(promo!=null){

+ 4 - 2
components/cm-module/pageTemplate/templateB.vue

@@ -178,11 +178,13 @@
 		},
 		methods:{
 			initData(data){
+				this.floorData = data
+				// console.log(this.floorData)
 				this.$api.getStorage().then((resolve) =>{
 					this.shopId = resolve.shopId ? resolve.shopId : 0
+				}).catch(err => {
+					console.log('err',err)
 				})
-				this.floorData = data
-				// console.log(this.floorData)
 			},
 			PromotionsFormat(promo){//促销活动类型数据处理
 				if(promo!=null){

+ 4 - 2
components/cm-module/pageTemplate/templateC.vue

@@ -178,11 +178,13 @@
 		},
 		methods:{
 			initData(data){
+				this.floorData = data
+				// console.log(this.floorData)
 				this.$api.getStorage().then((resolve) =>{
 					this.shopId = resolve.shopId ? resolve.shopId : 0
+				}).catch(err => {
+					console.log('err',err)
 				})
-				this.floorData = data
-				// console.log(this.floorData)
 			},
 			PromotionsFormat(promo){//促销活动类型数据处理
 				if(promo!=null){

+ 4 - 2
components/cm-module/pageTemplate/templateD.vue

@@ -190,11 +190,13 @@
 		},
 		methods:{
 			initData(data){
+				this.floorData = data
+				// console.log(this.floorData)
 				this.$api.getStorage().then((resolve) =>{
 					this.shopId = resolve.shopId ? resolve.shopId : 0
+				}).catch(err => {
+					console.log('err',err)
 				})
-				this.floorData = data
-				// console.log(this.floorData)
 			},
 			PromotionsFormat(promo){//促销活动类型数据处理
 				if(promo!=null){

+ 4 - 2
components/cm-module/pageTemplate/templateE.vue

@@ -166,11 +166,13 @@
 		},
 		methods:{
 			initData(data){
+				this.floorData = data
+				// console.log(this.floorData)
 				this.$api.getStorage().then((resolve) =>{
 					this.shopId = resolve.shopId ? resolve.shopId : 0
+				}).catch(err => {
+					console.log('err',err)
 				})
-				this.floorData = data
-				// console.log(this.floorData)
 			},
 			PromotionsFormat(promo){//促销活动类型数据处理
 				if(promo!=null){

+ 4 - 2
components/cm-module/pageTemplate/templateF.vue

@@ -166,11 +166,13 @@
 		},
 		methods:{
 			initData(data){
+				this.floorData = data
+				// console.log(this.floorData)
 				this.$api.getStorage().then((resolve) =>{
 					this.shopId = resolve.shopId ? resolve.shopId : 0
+				}).catch(err => {
+					console.log('err',err)
 				})
-				this.floorData = data
-				// console.log(this.floorData)
 			},
 			PromotionsFormat(promo){//促销活动类型数据处理
 				if(promo!=null){

+ 4 - 2
components/cm-module/pageTemplate/templateG.vue

@@ -154,11 +154,13 @@
 		},
 		methods:{
 			initData(data){
+				this.floorData = data
+				// console.log(this.floorData)
 				this.$api.getStorage().then((resolve) =>{
 					this.shopId = resolve.shopId ? resolve.shopId : 0
+				}).catch(err => {
+					console.log('err',err)
 				})
-				this.floorData = data
-				// console.log(this.floorData)
 			},
 			PromotionsFormat(promo){//促销活动类型数据处理
 				if(promo!=null){

+ 2 - 0
components/cm-module/pageTemplate/templateH.vue

@@ -172,6 +172,8 @@
 			initData(data){
 				this.$api.getStorage().then((resolve) =>{
 					this.shopId = resolve.shopId ? resolve.shopId : 0
+				}).catch(err => {
+					console.log('err',err)
 				})
 				if(data.floorImageList.length>0){
 					this.productList.splice(0,this.productList.length);

+ 0 - 1
pages/authorization/authorization.vue

@@ -52,7 +52,6 @@
 				wx.getUserProfile({
 					desc: '采美采购商城小程序获取您的信息', // 声明获取用户个人信息后的用途,后续会展示在弹窗中,请谨慎填写
 					success(res) {
-						console.log('asdadada',res)
 						self.wxLogin(res.userInfo)		
 						uni.login({
 							provider: 'weixin',

+ 8 - 4
pages/goods/product.vue

@@ -387,8 +387,14 @@
 					this.shopId = response.data.shopID
 					this.product = response.data
 					//已删除/已冻结
-					if(this.product.validFlag === '0'){
+					if(this.product.validFlag === '0' || this.product.validFlag =='10'){
 						this.isInvalid = true
+					}else if(this.product.validFlag === '9'){
+						if(this.userIdentity == 1){
+							this.isInvalid = true
+						}else{
+							this.isInvalid = false
+						}
 					}
 					this.ladderPriceFlag = this.product.ladderPriceFlag;
 					this.html = this.product.productDetail == null ? this.html : this.$api.adaptRichTextImg(this.product.productDetail.detailInfo)
@@ -411,10 +417,8 @@
 						this.retailPrice = this.product.retailPrice.toFixed(2);
 						this.buyRetailPrice = this.product.retailPrice;
 					}
-					
 					//处理下架商品和售罄商品
-					
-					if(this.product.validFlag =='3' || this.product.validFlag =='10' || this.stock == 0 || this.product.price1TextFlag == "1"){
+					if(this.product.validFlag =='3' || this.stock == 0 || this.product.price1TextFlag == "1"){
 						this.disabled = true
 						this.isNoneDisabled = true
 					}else if(this.product.price1TextFlag == "2"){

+ 1 - 1
pages/login/login.vue

@@ -105,7 +105,7 @@
 		},
 		onShow() {
 			this.$api.getStorage().then((resolve) =>{
-				this.params.unionId = resolve.unionId
+				this.params.unionId = resolve.unionId ?  resolve.unionId : 0
 			})
 			this.InitAuthorize()
 		}

+ 2 - 3
pages/tabBar/home/index.vue

@@ -13,7 +13,7 @@
 		</view>	
 		<!-- 楼层 -->
 		<view class="container-section tui-skeleton">
-			<page-floor :list="pageList" :userIdentity="userIdentity" :pageType='1' v-if="isRequest"></page-floor>
+			<page-floor :list="pageList" :pageType='1' v-if="isRequest"></page-floor>
 			<!-- <supplier-list :supplierObj="supplierObj" v-if="isRequest"></supplier-list> -->
 		</view>
 		<!-- 侧边 -->
@@ -63,7 +63,7 @@
 				modallayer:false,
 				isLogin:false,
 				skeletonShow: true,
-				userIdentity:'',
+				userIdentity:0,
 				flootData:[],//楼层
 				bannerImageList:[],//轮播
 				navBarsList:[],//导航分类
@@ -136,7 +136,6 @@
 			GetHomeFloorInfo(){//初始化首页楼层数据
 				this.CommonService.GetHomeDataInfo({userId:this.userID,soure:2}).then(response =>{
 					let data = response.data;
-					this.liveList = data.liveList;
 					this.pageList = data.homePageFloor;
 					this.supplierObj = data.supplierImage;
 					this.isRequest = true;