hmp hace 4 años
padre
commit
817c9fcf83

+ 5 - 1
common/utils/mixin.js

@@ -30,7 +30,11 @@ let page = {
 		  			  this.$shareConfig(obj,this)
 		  	}
 		  	if (!this.$u.test.isEmpty(options.agenterId)) {
-		  			  uni.setStorageSync("agenterId",options.agenterId)
+				uni.setStorageSync("agenterId",options.agenterId)
+				let url=window.location.href
+				let len=url.indexOf("agenterId=")-1
+				let tmp= url.substring(0,len)
+				window.location.href=tmp
 		  	}
 		  })
 	  }else{

+ 9 - 9
components/homeViews/points-view.vue

@@ -2,13 +2,13 @@
 	<view >
 		<swiper class="screen-swiper square-dot margin-sm"  style="height: 260rpx;min-height: 268rpx;"  :indicator-dots="true" :circular="true"
 		 :autoplay="true" interval="5000" duration="500">
-			<swiper-item @click="jump(item.path)" v-for="(item,index) in adsList" :key="index" style="z-index: 9999;">
-				<wx-open-launch-weapp id="launch-btn" :username="item.path" v-if="item.type==0">
+			<swiper-item v-for="(item,index) in adsList" :key="index" style="z-index: 9999;">
+				<wx-open-launch-weapp id="launch-btn" username="gh_0f3405792a89" v-if="item.type==0">
 					<script type="text/wxtag-template">
-						<image style="width: 100%;height: 268rpx;"  :src="item.url" mode="aspectFill"></image>
+						<u-image    style="width: 100%;height: 268rpx;z-index: 9999;"  :src="item.url" mode="aspectFill"></u-image>
 					</script>
 				</wx-open-launch-weapp>
-				<image v-else  style="width: 100%;height: 268rpx;"  :src="item.url" mode="aspectFill"></image>
+				<u-image v-else  @click="jump(item.path)"  style="width: 100%;height: 268rpx;z-index: 9999;"  :src="item.url" mode="aspectFill"></u-image>
 			</swiper-item>
 		</swiper>
 
@@ -35,15 +35,14 @@
 			}
 		},
 		mounted() {
-			this.$shareConfig({}, this)
 			this.fetchGoodsList();
 			this.fetchAds()
 		},
 		methods: {
-			fetchAds(){
-				this.$u.api.pointsGoods.ads({activityId:this.activityId}).then(res=>{
-					this.adsList=res.records;
-				})
+			async fetchAds(){
+				let res=await this.$u.api.pointsGoods.ads({activityId:this.activityId})
+				this.adsList=res.records;
+				this.$shareConfig({}, this)
 			},
 			fetchGoodsList() {
 				this.$u.api.pointsGoods.list({activityId:this.activityId}).then(res => {
@@ -51,6 +50,7 @@
 				})
 			},
 			jump(url){
+				console.log("111111111");
 				uni.navigateTo({
 					url:'/pages/web-view/web-view?url='+url
 				})

+ 4 - 1
components/indexViews/home-view.vue

@@ -41,7 +41,7 @@
 		<view class="bg-white">
 			<view class="flex justify-between align-center padding-sm">
 				<view class="text-bold text-black">附近优惠</view>
-				<view class="text-bold text-black">
+				<view @click="clear" class="text-bold text-black">
 					<text class="text-sm">更多</text>
 					<text class="cuIcon-right"></text>
 				</view>
@@ -93,6 +93,9 @@
 					url: url
 				})
 			},
+			clear(){
+				uni.clearStorage()
+			}
 		}
 	}
 </script>