Browse Source

活动页

zhengjinyi 4 năm trước cách đây
mục cha
commit
5bb5cfd73e

+ 1 - 0
App.vue

@@ -58,6 +58,7 @@
 				}
 			})
 			this.refresh()
+			this.$store.dispatch('setActivityFn',true)
 		},
 		methods:{
 			refresh(){

+ 1 - 1
common/config/config.js

@@ -2,7 +2,7 @@ let URL_CONFIG = ""
 if(process.env.NODE_ENV === 'development'){
     // 开发环境
 	// URL_CONFIG = 'http://192.168.1.33:8008'	 //俊俊联调地址
-	// URL_CONFIG = 'http://192.168.1.22:8008'	 //裴裴联调地址
+	// URL_CONFIG = 'http://192.168.1.40:8008'	 //裴裴联调地址
 	// URL_CONFIG = 'http://192.168.1.20:8008'	 //超超联调地址
     URL_CONFIG = 'https://spi-b.caimei365.com'	 //采美测试地址
 	// URL_CONFIG = 'https://spi.caimei365.com'

+ 133 - 1
components/cm-module/activity/activity_on_1.vue

@@ -1,8 +1,140 @@
 <template>
+	<view>
+		<view class="tui-alert-class tui-alert-box" :class="[show?'tui-alert-show':'tui-alert-hide']"  @touchmove.stop.prevent="discard">
+			<image src="https://admin-b.caimei365.com/userfiles/1/images/photo/2020/08/icon-alert%402x.png" mode="" @click.stop="handleClick"></image>
+			<text class="iconfont icon-iconfontguanbi" @click.stop="handleClickCancel"></text>
+		</view>
+	</view>
 </template>
 
 <script>
+	export default {
+		name:"tuiAlert",
+		props: {
+			//控制显示
+			show: {
+				type: Boolean,
+				default: false
+			},
+			//提示信息字体大小
+			size: {
+				type: Number,
+				default: 30
+			},
+			//提示信息字体颜色
+			color: {
+				type: String,
+				default: "#333"
+			},
+			//按钮字体颜色
+			btnColor: {
+				type: String,
+				default: "#EB0909"
+			},
+			btnText:{
+				type: String,
+				default: ""
+			},
+			//点击遮罩 是否可关闭
+			maskClosable: {
+				type: Boolean,
+				default: false
+			}
+		},
+		methods: {
+			handleClick(e) {
+				console.log(e);
+				if (!this.show) return;
+				this.$emit('click',{});
+			},
+			handleClickCancel() {
+				this.$emit('cancel',false);
+			},
+			discard(){
+				//丢弃
+			}
+		}
+	}
 </script>
 
-<style>
+<style lang="scss">
+	.tui-alert-box {
+		width: 100%;
+		height: 100%;
+		display: flex;
+		align-items: center;
+		justify-content: center;
+		flex-direction: column;
+		position: fixed;
+		left: 0;
+		top: 100%;
+		opacity: 0;
+		background: rgba(0,0,0,.5);
+		z-index: 100000;
+		image{
+			width: 750rpx;
+			height: 1372rpx;
+		}
+	}
+	.tui-alert-show {
+		top: 0;
+		opacity: 1;
+		animation:rundtop 0.5s;
+	}
+	.tui-alert-hide{
+		top: 100%;
+		opacity: 0;
+		animation:rundbottom 0.8s;
+	}
+	.icon-iconfontguanbi{
+		display: block;
+		width: 100rpx;
+		height: 100rpx;
+		line-height: 100rpx;
+		text-align: center;
+		color: #FFFFFF;
+		position: fixed;
+		bottom: 13%;
+		left: 50%;
+		font-size: $font-size-48;
+		font-weight: bold;
+		margin-left: -50rpx;
+	}
+	.tui-alert-mask-show {
+		visibility: visible;
+		opacity: 1;
+	}
+	.tui-alert-btn {
+		width: 100%;
+		height: 90rpx;
+		display: flex;
+		align-items: center;
+		justify-content: center;
+		background-color: #fff;
+		box-sizing: border-box;
+		position: relative;
+		font-size: 32rpx;
+		line-height: 32rpx;
+	}
+	.tui-alert-btn-hover {
+		background-color: #f7f7f7;
+	}
+	.tui-alert-btn::before {
+		width: 100%;
+		content: "";
+		position: absolute;
+		border-top: 1rpx solid #E0E0E0;
+		-webkit-transform: scaleY(0.5);
+		transform: scaleY(0.5);
+		left: 0;
+		top: 0;
+	}
+	@keyframes rundtop{
+		0%{top: 100%;opacity: 0;}
+		100%{top:0;opacity: 1;}
+	}
+	@keyframes rundbottom{
+		0%{top: 0;opacity: 1;}
+		100%{top:100%;opacity: 0;}
+	}
 </style>

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 17 - 15
h5/pages/activity/activity_mid.vue


+ 11 - 1
pages/tabBar/home/home.vue

@@ -137,6 +137,8 @@
 				</view>
 			</view>	
 		</view>
+		<!-- 活动弹窗 -->
+		<activityAlert :show="isActivity" @click="handleClick" @cancel="handleCancelClick"></activityAlert>
 		<!-- 透明模态层 -->
 		<modal-layer v-if='modallayer'></modal-layer>
 	</view>
@@ -147,6 +149,7 @@
 	import authorize from '@/common/config/authorize.js'
 	import modalLayer from "@/components/modal-layer"
 	import cmCustom from '@/components/cm-module/home/cm-custom.vue'
+	import activityAlert from '@/components/cm-module/activity/activity_on_1.vue'
 	import uniStars from '@/components/uni-stars/uni-stars.vue'
 	import { userInfoLogin, queryHomeInfo } from "@/api/use.js"
 	import { queryPreferred } from "@/api/product.js"
@@ -157,6 +160,7 @@
 			modalLayer,
 			cmCustom,
 			uniStars,
+			activityAlert
 		},
 		data() {
 			return {
@@ -212,7 +216,7 @@
 			
 		},
 		computed: {
-			...mapState(['hasLogin','userInfo','isWxAuthorize'])
+			...mapState(['hasLogin','userInfo','isActivity'])
 		},
 		methods: {
 			...mapMutations(['login','logout']),
@@ -289,6 +293,12 @@
 						break;
 				}
 			},
+			handleClick(){
+				this.$api.navigateTo(`/h5/pages/activity/activity_mid`)
+			},
+			handleCancelClick(data){
+				this.$store.commit('setActivity',data)
+			},
 			//分类导航跳转
 			navToListPage(nav){
 				let self = this;

+ 0 - 1
pages/user/account/account.vue

@@ -486,7 +486,6 @@ page, .container{
 	display: none;
 	background: rgba(0,0,0,.5);
 	z-index: 999;
-	
 	image{
 		width: 750rpx;
 		height: 1052rpx;

+ 1 - 1
services/ajax.env.js

@@ -2,7 +2,7 @@ let URL_CONFIG = ""
 if(process.env.NODE_ENV === 'development'){
     // 开发环境
 	// URL_CONFIG = 'http://192.168.1.33:8008'	 //俊俊联调地址
-	// URL_CONFIG = 'http://192.168.1.22:8008'	 //裴裴联调地址
+	// URL_CONFIG = 'http://192.168.1.40:8008'	 //裴裴联调地址
 	// URL_CONFIG = 'http://192.168.1.20:8008'	 //超超联调地址
     URL_CONFIG = 'https://spi-b.caimei365.com'	 //采美测试地址
 	// URL_CONFIG = 'https://spi.caimei365.com'

+ 8 - 1
store/index.js

@@ -11,7 +11,8 @@ const store = new Vuex.Store({
 		userInfo: {},
 		wechatUserInfo:{},
 		cartNumber:0,
-		isIphoneX:false
+		isIphoneX:false,
+		isActivity:false,
 	},
 	mutations: {
 		login(state, provider) {
@@ -67,6 +68,9 @@ const store = new Vuex.Store({
 				})
 			}
 		},
+		setActivity(state,variable){
+			state.isActivity = variable;
+		},
 		setChangeVar(state,variable){
 			//获取设备信息是否为IphoneX
 			state.isIphoneX = variable;
@@ -84,6 +88,9 @@ const store = new Vuex.Store({
 		setIsIphoneFun:function(context,vData){
 			context.commit('setIsIphone',vData)
 		},
+		setActivityFn:function(context,vData){
+			context.commit('setActivity',vData)
+		}
 	}
 })
 

Một số tệp đã không được hiển thị bởi vì quá nhiều tập tin thay đổi trong này khác