hmp 4 лет назад
Родитель
Сommit
580c9ffcee

+ 3 - 1
assets/colorui/app.scss

@@ -244,4 +244,6 @@
 .plus::before {
 	content: '+';
 	margin-right: 10rpx;
-}
+}
+
+

+ 44 - 0
components/home-btn.vue

@@ -0,0 +1,44 @@
+<template>
+	<view :style="vuex_skin">
+		<!-- #ifdef H5 -->
+		<view class="homeBtn" @click="home">
+			<text class="cuIcon-homefill text-base" style="font-size: 40rpx;"></text>
+		</view>
+		<!-- #endif -->
+	</view>
+</template>
+
+<script>
+	export default {
+		name: "home",
+		data() {
+			return {
+
+			};
+		},
+		methods:{
+			home(){
+				uni.switchTab({
+					url:"/pages/index/home"
+				})
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+	.homeBtn {
+		width: 80upx;
+		height: 66upx;
+		border-radius: 50upx 0 0 50upx;
+		position: fixed;
+		bottom: 260upx;
+		right: 0;
+		z-index: 999;
+		display: flex;
+		justify-content: center;
+		align-items: center;
+		background: #ffffff;
+		box-shadow: -4upx -4upx 30upx #888888;
+	}
+</style>

+ 6 - 0
components/poster/poster.vue

@@ -8,7 +8,13 @@
 		</view>
 
 		<view class="btn" v-if="imgLoad">
+			<!-- #ifdef MP-WEIXIN -->
 			<view class="save-btn" @click.stop="saveImage">保存图片</view>
+			<!-- #endif -->
+			
+			<!-- #ifdef H5 -->
+			<text style="color: #e8e8e8;margin-top: 16rpx;font-size: 28rpx;" >长按保存图片</text>
+			<!-- #endif -->
 			<!-- <view class="save-btn" @click.stop="goLottery" v-if="subTitle"> 去抽奖 </view> -->
 		</view>
 		<canvas style="position: fixed;top: 999999999rpx;" @click.stop=""

+ 4 - 0
main.js

@@ -14,6 +14,10 @@ Vue.mixin(vuexStore);
 import login from "@/components/login.vue"
 Vue.component('login',login)
 
+//回到首页
+import homeBtn from "@/components/home-btn.vue"
+Vue.component('home-btn',homeBtn)
+
 //uView
 import uView from "uview-ui";
 Vue.use(uView);

+ 10 - 1
pages.json

@@ -219,7 +219,16 @@
 			}
 
 		}
-	],
+	    ,{
+            "path" : "pages/mine/setting/setting",
+            "style" :                                                                                    
+            {
+                "navigationBarTitleText": "设置",
+                "enablePullDownRefresh": false
+            }
+            
+        }
+    ],
 	"tabBar": {
 		"color": "#555555",
 		"backgroundColor": "#FFFFFF",

+ 1 - 0
pages/activity/activityDetail.vue

@@ -59,6 +59,7 @@
 		<timeline-popup ref="timelinePopup"></timeline-popup>
 		<sms-alert ref="smsAlert" @exchange="cmccVote"></sms-alert>
 		<vote-success ref="voteSuccess" @support="showShare"></vote-success>
+		<home-btn></home-btn>
 	</view>
 </template>
 

+ 8 - 0
pages/apply/apply.vue

@@ -73,6 +73,14 @@
 			};
 		},
 		onLoad(options) {
+			if (this.$isEmpty(this.vuex_userId)
+				||this.$isEmpty(options.activeType)
+				||this.$isEmpty(options.activeId)) {
+				uni.switchTab({
+					url:"/pages/index/home"
+				})
+				return
+			}
 			this.initData(options)
 		},
 		methods: {

+ 9 - 2
pages/introduce/notice.vue

@@ -4,6 +4,7 @@
 		<u-navbar title-color="#000000" :is-back="true" :title="title"></u-navbar>
 		<!-- #endif -->
 		<u-parse :html="content" ></u-parse>
+		<home-btn></home-btn>
 	</view>
 </template>
 
@@ -11,6 +12,7 @@
 	export default {
 		data() {
 			return {
+				isGobal:false,
 				title:"",
 				downOption: {
 					use: false,
@@ -21,6 +23,7 @@
 		},
 		onLoad(options) {
 			this.title=options.title
+			this.isGobal=options.isGobal || false
 			console.log(this.title);
 			// #ifdef H5
 			uni.setNavigationBarTitle({
@@ -39,9 +42,13 @@
 		methods: {
 			fetchDetail() {
 				let params = {
-					title: this.title,
-					activeId: this.vuex_active_setting.defaultActiveId,
+					title: this.title
 				}
+				//根据活动筛选,比如积分规则,用户隐私协议就不需要根据活动来筛选
+				if (!this.isGobal) {
+					params.activeId=this.vuex_active_setting.defaultActiveId
+				}
+				
 				this.$api.notice.getDetail(params).then(res => {
 					this.content = decodeURIComponent(res.data.data.content)
 				})

+ 4 - 3
pages/mine/info/info.vue

@@ -49,11 +49,11 @@
 				<view class="title">手机号</view>
 				<view class="center">
 					<view class="center">
-						<u-input disabled v-model="userData.phone"  :placeholder-style="placeholderStyle" :clearable="false"
-							inputAlign="right" placeholder="请填写手机号码"></u-input>
+						<u-input disabled v-model="userData.phone" :placeholder-style="placeholderStyle"
+							:clearable="false" inputAlign="right" placeholder="请填写手机号码"></u-input>
 					</view>
 					<view v-if="false" class="center  padding-bottom-10 padding-left-20">
-						<text class="text-base" >修改</text>
+						<text class="text-base">修改</text>
 					</view>
 				</view>
 			</view>
@@ -74,6 +74,7 @@
 		data() {
 			return {
 				placeholderStyle: 'color: #c0c4cc;font-size:26rpx',
+				isEdit: false,
 				userData: {
 					avatar: "",
 					nickName: "",

+ 8 - 8
pages/mine/mine.vue

@@ -131,13 +131,6 @@
 						auth: false ,//是否登录验证
 						show: true
 					},
-					{
-						name: '花积分',
-						icon: '/static/mine/huajifen.png',
-						url: '/pages/shop/shop',
-						auth: false ,//是否登录验证
-						show: true
-					},
 					{
 						name: '更多活动',
 						icon: '/static/mine/huodong.png',
@@ -150,7 +143,7 @@
 						icon: '/static/mine/guize.png',
 						url: '/pages/introduce/notice?title=积分规则',
 						auth: false,
-						show: true
+						show: false
 					},
 					{
 						name: '联系我们',
@@ -166,6 +159,13 @@
 						auth: false,
 						show: false
 					},
+					{
+						name: '设置',
+						icon: '/static/mine/mine-setting.png',
+						url: '/pages/mine/setting/setting',
+						auth: false,
+						show: true
+					},
 				],
 			}
 		},

+ 77 - 0
pages/mine/setting/setting.vue

@@ -0,0 +1,77 @@
+<template>
+	<view :style="vuex_skin">
+		<u-cell-group>
+			<u-cell-item v-for="(item,index) in menuList" :key="index" @click="jump(item)" :icon="item.icon"
+				:title="item.title"></u-cell-item>
+		</u-cell-group>
+
+		<view v-if="vuex_userId" class="center" style="margin-top: 200rpx;">
+			<button @click="logout" class="cu-btn  flex  text-lg bg-base radius" style="padding: 42rpx 0;width: 90%;">
+				退出登录
+			</button>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				menuList: [{
+						icon: 'question-circle',
+						title: '积分兑换规则', //显示的title
+						name: '积分规则', //对应后端获取数据的title
+						path: '/pages/introduce/notice'
+					},
+					{
+						icon: 'bookmark',
+						title: '用户隐私协议',
+						name: '用户隐私协议',
+						path: '/pages/introduce/notice'
+					}
+				]
+			}
+		},
+		onLoad() {
+			// #ifdef MP-WEIXIN
+			let obj = {
+				icon: 'account',
+				title: '用户授权设置',
+				path: ''
+			}
+			this.menuList.push(obj)
+			// #endif
+		},
+		methods: {
+			jump(item) {
+				if (item.title == '用户授权设置') {
+					uni.openSetting({
+						success(res) {
+							console.log(res.authSetting)
+						}
+					});
+					return
+				}
+				let params = {
+					title: item.name,
+					isGobal: true
+				}
+				uni.navigateTo({
+					url: item.path + this.$u.queryParams(params)
+				})
+			},
+			logout() {
+				this.$cache.clear()
+				this.$u.vuex('vuex_userId', null)
+				this.$u.vuex('vuex_phone', null)
+				uni.reLaunch({
+					url: "/pages/mine/mine"
+				})
+			},
+		}
+	}
+</script>
+
+<style>
+
+</style>

+ 1 - 0
pages/rank/rank.vue

@@ -120,6 +120,7 @@
 				</block>
 			</mescroll-body>
 		</view>
+		<home-btn></home-btn>
 	</view>
 </template>
 

+ 1 - 0
pages/shop/detail.vue

@@ -95,6 +95,7 @@
 		</view>
 		<login ref="login" @signIn="signIn" @phoneSuccess="phoneSuccess"></login>
 		<toast ref="toast"></toast>
+		<home-btn></home-btn>
 		<exchange-success ref="exchangeSuccess"></exchange-success>
 	</view>
 </template>

+ 1 - 1
pages/shop/shop.vue

@@ -30,7 +30,7 @@
 				</view>
 			</view>
 			<view class="swiper">
-				<u-swiper :list="swiperList" name="url" mode="rect" border-radius="12" height="250"></u-swiper>
+				<u-swiper :list="swiperList"  name="url" mode="rect" border-radius="12" height="270"></u-swiper>
 			</view>
 			<view class="recommend-info">
 				<view class="goods-list">