8a3e6a31 by simon

默认提交

1 parent fee985cc
......@@ -5,6 +5,7 @@
"pages/personal-list/personal-list",
"pages/reward/reward",
"pages/reward-completed/reward-completed",
"pages/blessing/blessing",
"pages/more/more",
"pages/poster-example/poster-example",
"pages/authorize/authorize",
......
......@@ -2,7 +2,7 @@ let ENV_CONFIG = require('./env/index');
const APPID = ''
/** ====每次发布版本记得修改此环境配置==== */
const ENV = 'Prod'; // Dev Prod
const ENV = 'Dev'; // Dev Prod
const NET_CONFIG = ENV_CONFIG[ENV];
const MOCKAPI = ENV_CONFIG.mockApi;
......
import {
getBindtapData
} from '../../utils/util';
let app = getApp();
Page({
data: {
authorizeVisible: false,
total: 0,
page: 1,
size: 10,
productList: [], // 产品列表
indexInfo: {},
userInfo: {},
},
onShareAppMessage() {},
showAuth() {
this.setData({
authorizeVisible: true
})
},
onLoad(options) {},
/**
* 基础方法
* 授权完毕重拉数据用
*/
initData() {
},
/**
* 到达底部
* 做加载更多操作
*/
onReachBottom() {
if (this.data.dataList.length < this.data.total) {
this.setData({
page: this.data.page + 1
});
this.queryDataList();
}
},
// 重置页面列表 点击搜索条件时需要
resetPage() {
this.setData({
page: 1,
dataList: []
})
},
/**
* 请求DataList
*/
queryDataList() {
return;
return new Promise((resolve, reject) => {
app.post({
sid: false,
url: app.api.dataList,
data: {
page: this.data.page,
size: this.data.size,
},
}).then((result) => {
let dataList = result.list;
dataList = this.data.dataList.concat(dataList);
this.setData({
dataList: dataList,
total: result.total
})
resolve();
})
});
},
/**
* 隐藏蒙层
*/
hideMask() {
this.setData({
productDetailVisible: false,
authorizeVisible: false,
})
},
/**
* 子组件事件
* @param {*} evt
*/
evtcomp(evt) {
let {
name,
data
} = evt.detail;
switch (name) {
// 隐藏蒙层
case "_evt_hide_mask":
this.hideMask();
break;
/**
* 重拉数据已在
*/
case "_evt_auth_complete":
// this.initData();
this.hideMask();
break;
default:
break;
}
},
})
@import '../../assets/scss/mixins';
@import '../../assets/scss/utils';
.page {
.bgc {}
.bg {
background: url('https://kdcdn.oss-cn-shenzhen.aliyuncs.com/weapp/jyes/assets/oss/blessing-bg.png') no-repeat center;
}
.main {
// 顶部背景
.top-bg {
position: absolute;
width: 750px;
}
.top-space {
// height: 136px;
// height: 202px;
height: 200px;
}
.content {
position: relative;
// 标题
.title {
font-size: 46px;
font-weight: 500;
text-align: center;
color: #fee085;
}
// 用户
.user {
font-size: 48px;
font-weight: 600;
text-align: center;
color: #fee085;
// 用户头像
.portrait {
position: relative;
margin: 24px auto 0;
text-align: center;
width: 216px;
@extend .fcc;
&-inner {
width: 167px;
}
&-border {
width: 216px;
position: absolute;
}
}
// 用户名称
.name {
margin: 24px auto 0;
display: flex;
justify-content: center;
align-items: flex-end;
.tt {
font-size: 48px;
font-weight: 500;
text-align: center;
color: #fee085;
}
&-edit {
width: 29px;
margin: 0 0 12px 12px;
}
}
}
}
}
}
<view class="page">
<view class="app__bgc bgc"></view>
<view class="app__bg bg"></view>
<view class="app__content main">
<!-- 顶部背景 -->
<image class="top-bg" mode="widthFix" src="../../image/blessing/top-d1.png" />
<!-- <view class="top-bg"></view> -->
<view class="top-space"></view>
<view class="content">
<view class="title">大年初一</view>
<!-- 用户 -->
<view class="user">
<!-- 用户头像 -->
<view class="portrait">
<image class="portrait-inner" mode="widthFix" src="../../image/blessing/portrait.png" />
<image class="portrait-border" mode="widthFix" src="../../image/blessing/portrait-border.png" />
</view>
<!-- 用户名称 -->
<view class="name">
<view class="tt">姓名</view>
<image class="name-edit" mode="widthFix" src="../../image/blessing/icon-edit.png" />
</view>
<!-- <view class="edit">
<view class="tt t1"></view>
<image class="name-edit" mode="widthFix" src="../../image/blessing/icon-edit.png" />
<view class="tt t2"></view>
</view> -->
</view>
</view>
</view>
</view>
......@@ -4,6 +4,7 @@ const routerPath = {
personalList: '/pages/personal-list/personal-list',
reward: '/pages/reward/reward',
rewardCompleted: '/pages/reward-completed/reward-completed',
blessing: '/pages/blessing/blessing',
authorize: '/pages/authorize/authorize', // 授权
example: '/pages/example/example',
......