sui 5 роки тому
джерело
коміт
3178709c88
11 змінених файлів з 163 додано та 31 видалено
  1. +17
    -12
      496_dongfengqichen/app.js
  2. +1
    -7
      496_dongfengqichen/app.wxss
  3. +59
    -0
      496_dongfengqichen/pages/component/tabBar/index.js
  4. +4
    -0
      496_dongfengqichen/pages/component/tabBar/index.json
  5. +19
    -0
      496_dongfengqichen/pages/component/tabBar/index.wxml
  6. +46
    -0
      496_dongfengqichen/pages/component/tabBar/index.wxss
  7. +2
    -1
      496_dongfengqichen/pages/index/index.json
  8. +8
    -6
      496_dongfengqichen/pages/index/index.wxml
  9. +2
    -2
      496_dongfengqichen/pages/index/index.wxss
  10. +2
    -1
      496_dongfengqichen/pages/myCenter/myCenter.json
  11. +3
    -2
      496_dongfengqichen/pages/myCenter/myCenter.wxml

+ 17
- 12
496_dongfengqichen/app.js Переглянути файл

@@ -2,14 +2,14 @@
App({
onLaunch: function () {
// 展示本地存储能力
// var openid = wx.getStorageSync('openid') || "";
// if (!openid) {
// // 登录
// this.wxLogin();
// } else {
// this.globalData.openid = openid;
// this.getRegionList();
// }
var openid = wx.getStorageSync('openid') || "";
if (!openid) {
// 登录
this.wxLogin();
} else {
this.globalData.openid = openid;
// this.getRegionList();
}
},
wxLogin() {
wx.login({
@@ -27,8 +27,10 @@ App({
// urlRoot: "",//接口根目录
urlStatic:"https://www.jiyou-tech.com/2020/496_qichen/static",//静态资源根目录
openid: "",//OPENID
session_key: "",//session_key
userInfo: null,//用户信息
openidSuccessFuc: null,//方法回调
nowPage:'1',//当前tabBar
},
// 获取openId
getOpenid: function (code) {
@@ -36,12 +38,15 @@ App({
title: '加载中',
mask: true,
})
this.wxRequest(this.globalData.urlRoot + "/login/getOpenid", { code: code }, res => {
this.wxRequest(this.globalData.urlRoot + "wxInfo/getOpenid", { code: code }, res => {
wx.hideLoading();
console.log(res);
if (res.code == 200) {
wx.setStorageSync("openid", res.openid);
this.globalData.openid = res.openid;
this.getRegionList();
wx.setStorageSync("openid", res.data.openid);
wx.setStorageSync("session_key", res.data.session_key);
this.globalData.openid = res.data.openid;
this.globalData.session_key = res.data.session_key;
// this.getRegionList();
if (this.globalData.openidSuccessFuc) {
this.globalData.openidSuccessFuc();
}

+ 1
- 7
496_dongfengqichen/app.wxss Переглянути файл

@@ -1,12 +1,6 @@
/**app.wxss**/
.container {
height: 100%;
display: flex;
flex-direction: column;
align-items: center;
justify-content: space-between;
padding: 200rpx 0;
box-sizing: border-box;
padding-bottom:150rpx;
}
image{
display: block;

+ 59
- 0
496_dongfengqichen/pages/component/tabBar/index.js Переглянути файл

@@ -0,0 +1,59 @@
// pages/component/tabBar/index.js
const app = getApp();
Component({
/**
* 组件的属性列表
*/
properties: {

},

/**
* 组件的初始数据
*/
data: {
imgUrl: app.globalData.urlStatic,//图片路径
nowPage: app.globalData.nowPage,//当前tabBar
btnSwitch:true,//按钮开关
},
ready:function(e){
this.setData({
btnSwitch:true,
nowPage: app.globalData.nowPage
})
},
/**
* 组件的方法列表
*/
methods: {
cutPage: function(e) {//打开遮罩
let page = e.currentTarget.dataset.page;
if (page == this.data.nowPage){
return;
}
this.data.btnSwitch = false;
app.globalData.nowPage = page;
if (page == '1') {
wx.redirectTo({
url: '../index/index'
})
} else if (page == '2'){
wx.redirectTo({
url: '../star/star'
})
} else if (page == '3'){
wx.showToast({
title: '暂未开启',
icon:'none'
})
// wx.redirectTo({
// url: '../index/index'
// })
} else if (page == '4'){
wx.redirectTo({
url: '../myCenter/myCenter'
})
}
}
}
})

+ 4
- 0
496_dongfengqichen/pages/component/tabBar/index.json Переглянути файл

@@ -0,0 +1,4 @@
{
"component": true,
"usingComponents": {}
}

+ 19
- 0
496_dongfengqichen/pages/component/tabBar/index.wxml Переглянути файл

@@ -0,0 +1,19 @@
<!--pages/component/tabBar/index.wxml-->
<view class="tabBarFrame">
<view class="tabBarOption" bindtap="cutPage" data-page="1">
<image class="tabBar1" src="{{imgUrl+'/tabBar/1_'+(nowPage==1?2:1)+'.png'}}"></image>
<view class="tabBarText {{nowPage==1?'tabBarText2':''}}">启辰星</view>
</view>
<view class="tabBarOption" bindtap="cutPage" data-page="2">
<image class="tabBar2" src="{{imgUrl+'/tabBar/2_'+(nowPage==2?2:1)+'.png'}}"></image>
<view class="tabBarText {{nowPage==2?'tabBarText2':''}}">星探计划</view>
</view>
<view class="tabBarOption" bindtap="cutPage" data-page="3">
<image class="tabBar3" src="{{imgUrl+'/tabBar/3_'+(nowPage==3?2:1)+'.png'}}"></image>
<view class="tabBarText {{nowPage==3?'tabBarText2':''}}">幸运星抓手</view>
</view>
<view class="tabBarOption" bindtap="cutPage" data-page="4" style="border:none;">
<image class="tabBar4" src="{{imgUrl+'/tabBar/4_'+(nowPage==4?2:1)+'.png'}}"></image>
<view class="tabBarText {{nowPage==4?'tabBarText2':''}}">个人中心</view>
</view>
</view>

+ 46
- 0
496_dongfengqichen/pages/component/tabBar/index.wxss Переглянути файл

@@ -0,0 +1,46 @@
/* pages/component/tabBar/index.wxss */
.tabBarFrame{
position: fixed;
left: 0;
bottom: 0;
background-color: white;
width:750rpx;
height:150rpx;
box-sizing: border-box;
border-top: 1rpx solid #B8B6B9;
display: flex;
align-items: center;
justify-content: center;
}
.tabBarOption{
display: flex;
align-items: center;
justify-content: center;
width: 175rpx;
border-right: 3rpx solid black;
height: 43rpx;
}
.tabBarText{
font-size: 20rpx;
margin-left:10rpx;
color: black;
}
.tabBarText2{
color: #1D7EAF;
}
.tabBar1{
width: 46rpx;
height: 19rpx;
}
.tabBar2{
width: 32rpx;
height: 25rpx;
}
.tabBar3{
width: 25rpx;
height: 28rpx;
}
.tabBar4{
width: 24rpx;
height: 27rpx;
}

+ 2
- 1
496_dongfengqichen/pages/index/index.json Переглянути файл

@@ -1,5 +1,6 @@
{
"usingComponents": {
"service": "../component/service/index"
"service": "../component/service/index",
"tabBar": "../component/tabBar/index"
}
}

+ 8
- 6
496_dongfengqichen/pages/index/index.wxml Переглянути файл

@@ -1,8 +1,9 @@
<!--index.wxml-->
<view class="all">
<view class="main">
<!-- <view class="contentFrame">
<video class="videoSty" ad-unit-id="" poster-for-crawler="" src="http://static.jiyou-tech.com/2018/327/video/video1212.mp4"></video>
<view class="main container">
<view class="contentFrame">
<video class="videoSty" ad-unit-id="" poster-for-crawler="" src=""></video>
<!-- <video class="videoSty" ad-unit-id="" poster-for-crawler="" src="{{imgUrl+'/video1212.mp4'}}"></video> -->
<view class="swiperFrame">
<swiper class="swiperSty" current="{{swiperCurrent}}" bindchange="swiperChange">
<swiper-item><image src="{{imgUrl+'/images/indexBottom.png'}}" style="width:100%;" mode="aspectFill"></image></swiper-item>
@@ -14,8 +15,8 @@
<image class="rightArrow" bindtap="nextImg" src="{{imgUrl+'/images/rightArrow.png'}}"></image>
</view>
<image class="indexBottom" src="{{imgUrl+'/images/indexBottom.png'}}"></image>
</view> -->
<image src="{{imgUrl+'/images/indexBg.jpg'}}" class='imgBg'></image>
</view>
<!-- <image src="{{imgUrl+'/images/indexBg.jpg'}}" class='imgBg'></image> -->
<view class="msgFrame">
<view class="inputGroup">
<input class="inputSty" placeholder="姓名"></input>
@@ -40,6 +41,7 @@
</view>
<view class="subscribeBtn">预约鉴赏</view>
</view>
<service></service>
</view>
<service></service>
<tabBar></tabBar>
</view>

+ 2
- 2
496_dongfengqichen/pages/index/index.wxss Переглянути файл

@@ -14,8 +14,8 @@ page{
height: 1356rpx;
}
.msgFrame{
position: fixed;
bottom: 0;
position: absolute;
bottom: 150rpx;
left: 0;
width:750rpx;
padding: 0 39rpx;

+ 2
- 1
496_dongfengqichen/pages/myCenter/myCenter.json Переглянути файл

@@ -1,5 +1,6 @@
{
"usingComponents": {
"service": "../component/service/index"
"service": "../component/service/index",
"tabBar": "../component/tabBar/index"
}
}

+ 3
- 2
496_dongfengqichen/pages/myCenter/myCenter.wxml Переглянути файл

@@ -1,6 +1,6 @@
<!--pages/myCenter/myCenter.wxml-->
<view>
<view class="main">
<view class="main container">
<view class="msgGroup" wx:if="{{!isLogin}}">
<view class="pageTitle">个人中心</view>
<view class="headGroup">
@@ -143,6 +143,7 @@
<view wx:if="{{selectNow==4}}">
</view>
<service></service>
</view>
<service></service>
<tabBar></tabBar>
</view>

Завантаження…
Відмінити
Зберегти