xhj 2 лет назад
Родитель
Сommit
8e1be2b1a2

+ 2 - 2
match/activityManage/activityManage.vue

@@ -28,7 +28,7 @@
 							<image src="../static/images/person.png"></image>
 							{{item.person}}人
 						</view>
-						<view class="act-edit" v-if="item.state!=2&&pcId&&pcId==item.creator" @click="jumpUrl('/match/activityEdit/activityEdit?id='+item.id)">修改</view>
+						<view class="act-edit" v-if="item.state==0||item.state==6" @click="jumpUrl('/match/activityEdit/activityEdit?id='+item.id)">修改</view>
 					</view>
 				</view>
 			</view>
@@ -67,7 +67,7 @@
 		},
 		async onLoad(opt) {
 			await req.silenceLogin(opt.saleNo)
-			this.pcId = req.getStorage('userInfo').pcId
+			this.pcId = req.getStorage('userInfo').id
 			this.getPageList()
 		},
 		onShow() {

+ 2 - 1
pages.json

@@ -2,7 +2,8 @@
 	"pages": [{
 		"path": "pages/index/index",
 		"style": {
-			"navigationBarTitleText": ""
+			"navigationBarTitleText": "",
+			"navigationStyle": "custom"
 		}
 	}],
 	"subPackages": [{

+ 66 - 0
pages/index/index.css

@@ -0,0 +1,66 @@
+page{
+	background-color: #F8F8F8;
+}
+.top-fixed{
+	position: absolute;
+	z-index: 2;
+	text-align: center;
+	font-size: 34rpx;
+	font-weight: 500;
+	color: #FFFFFF;
+	left: 0;
+	right: 0;
+	top: 0;
+}
+.indexBanner{
+	width: 100%;
+	height: 500rpx;
+}
+
+.card-box{
+	margin: 30rpx;
+	padding: 30rpx;
+	background: #FFFFFF;
+	border-radius: 20rpx 20rpx 20rpx 20rpx;
+	opacity: 1;
+}
+.card-title{
+	font-size: 36rpx;
+	line-height: 50rpx;
+	font-weight: bold;
+	color: #333333;
+	padding-left: 20rpx;
+	position: relative;
+	margin-bottom: 30rpx;
+}
+.card-title::before{
+	content: '';
+	width: 8rpx;
+	height: 34rpx;
+	background: #27D699;
+	border-radius: 6rpx 6rpx 6rpx 6rpx;
+	opacity: 1;
+	position: absolute;
+	left: 0;
+	top: 50%;
+	transform: translateY(-50%);
+}
+.card-item{
+	width: calc(100% / 3);
+	display: inline-block;
+	margin-bottom: 40rpx;
+}
+.card-item-icon{
+	width: 120rpx;
+	height: 120rpx;
+	margin: auto;
+}
+.card-item-label{
+	height: 40rpx;
+	font-size: 28rpx;
+	text-align: center;
+	font-weight: 500;
+	color: #333333;
+	margin: auto;
+	margin-top: 14rpx;
+}

+ 50 - 6
pages/index/index.vue

@@ -1,22 +1,66 @@
 <template>
-	<view>
+	<view style="overflow: hidden;">
+		<view class="top-fixed" :style="'height: '+ systems.barHeight + 'rpx;'">
+			<view  :style="'line-height: '+ systems.navigationHeight + 'rpx;top:' + systems.ktxStatusHeight + 'rpx;height:'+systems.navigationHeight+'rpx;text-align: center;'">
+				云助理主页
+			</view>
+		</view>
+		<image class="indexBanner" src="../../static/images/indexBanner.png" mode="aspectFill"></image>
 		
+		<view style="margin-top: -100rpx;z-index: 3;position: relative;">
+			<view v-for="item,index in menu" :key="index" class="card-box">
+				<view class="card-title">{{item.name}}</view>
+				<view class="card-item" v-for="it,idx in item.children" :key="idx+'iit'" @click="jumpLink(it)">
+					<image class="card-item-icon" :src="it.pic" mode="aspectFill"></image>
+					<view class="card-item-label">{{it.name}}</view>
+				</view>
+			</view>
+		</view>
 	</view>
 </template>
 
 <script>
+	const req = require('../../utils/request.js');
+	const util = require('../../utils/util.js');
+	var app = getApp();
 	export default {
 		data() {
 			return {
-				
+				systems: {},
+				menu:[]
 			}
 		},
+		async onLoad(options) {
+			await req.silenceLogin(options.saleNo)
+			this.getMenu()
+		},
 		methods: {
-			
-		}
+			jumpLink(item){
+				if(!item.url) return req.msg("暂未开放")
+				uni.navigateTo({
+					url:item.url
+				})
+			},
+			getMenu(){
+				req.getRequest('/api/menuYzl/list',{},res=>{
+					this.menu = res
+				})
+			}
+		},
+		mounted() {
+			const systemInfo = uni.getSystemInfoSync();
+			// px转换到rpx的比例
+			let pxToRpxScale = 750 / systemInfo.windowWidth;
+			let systems = {
+				ktxStatusHeight: systemInfo.statusBarHeight * pxToRpxScale, // 状态栏的高度
+				navigationHeight: 44 * pxToRpxScale // 导航栏的高度
+			};
+			systems.barHeight = systems.ktxStatusHeight + systems.navigationHeight;
+			this.systems = systems;
+		},
 	}
 </script>
 
 <style>
-
-</style>
+	@import './index.css';
+</style>

BIN
static/images/indexBanner.png


+ 1 - 7
utils/request.js

@@ -18,12 +18,6 @@ const env = {
 
 var header = {
 	'content-type': 'application/x-www-form-urlencoded',
-	/*--商户的appi通过参数传入--*/
-	'appId': '',
-	// 'appId': 'ZQesLvuSYEejOJB', //测试
-	// 'appId': 'ZQWYx7XoOOhv4Ns', //正式
-
-	/*----*/
 }
 
 /**小程序配置 */
@@ -254,7 +248,7 @@ const removeStorage = (key) => {
 const silenceLogin = (saleNo) => {
 	return new Promise((resolve, reject) => {
 		let params = {
-			saleNo: '14308016'
+			saleNo: '14308016000'
 		}
 		// if(getStorage('userInfo')){
 		// 	resolve();