Commit 32d589a1 authored by gaodapeng's avatar gaodapeng

增加了home/balance两部分的界面。封装部分自定义弹窗

parent 116e8c72
{"tinyType":"alipayiot","tinyCnName":"支付宝 IoT","tinyProjectType":"xpaas-mini","alipayiot:xpaas-mini:tinyIcon":"https://gw.alipayobjects.com/mdn/rms_c763d8/afts/img/A*vNMFT7X_u3sAAAAAAAAAAABkARQnAQ","alipayiot:xpaas-mini:auditLink":null,"alipayiot:xpaas-mini:whiteListLink":null,"alipayiot:xpaas-mini:createLink":null,"alipayiot:xpaas-mini:component2":false,"alipayiot:xpaas-mini:_enableAutoPush":false,"alipayiot:xpaas-mini:_appIdList":[],"alipayiot:xpaas-mini:uploadTime":"","alipayiot:xpaas-mini:packageSize":0,"alipayiot:xpaas-mini:lastDeviceName":"蜻蜓F4","isSimulatorOpen":true,"isNotFirstToggleSimulator":true,"alipayiot:xpaas-mini:MockStore":{"localLoginInfo":{"name":"ywxadmin","password":"1234567a","sn":""},"localAccountInfo":{"accountId":126,"actType":1,"agreement":1,"isShopCart":0,"merchantId":"2088222276054714","merchantName":"一网鲜(杭州)信息科技有限公司","realName":"力拔山兮气盖世时不利兮骓不逝","storeList":[{"address":"杭州市江干区科技园路2号","hasStoreManager":1,"storeId":"001","storeName":"一网鲜"}],"token":"431398226761175040","userName":"ywxadmin","userPhone":"13858057743"}},"storageVersion":"1.5.7"}
......@@ -2,6 +2,6 @@
const g = typeof global !== 'undefined' ? global : self;
g.appXAppJson = {
"app": {
"$homepage": "pages/paysuccess/paysuccess"
"$homepage": "pages/balance/balance"
}
};
require('@alipay/appx-compiler/lib/sjsEnvInit');
require('./config$');
require('../../custom_widgets/spin/spin?hash=05d2a9730dd6009bf9446182f9c985f40f8c0f43');
require('../../node_modules/mini-antui/es/input-item/index?hash=05d2a9730dd6009bf9446182f9c985f40f8c0f43');
require('../../pages/paysuccess/paysuccess?hash=8a39df616008c86a406618844f053cdc5567752b');
require('../../pages/login/login?hash=4ebd76d5932655db30c27bd67ebeb700d746609f');
require('../../pages/index/index?hash=32d7d2807ed4e666ef03b4b3fe8c38ecf2e34e68');
if(!self.__appxInited) {
self.__appxInited = 1;
require('./config$');
var AFAppX = self.AFAppX.getAppContext
? self.AFAppX.getAppContext().AFAppX
: self.AFAppX;
self.getCurrentPages = AFAppX.getCurrentPages;
self.getApp = AFAppX.getApp;
self.Page = AFAppX.Page;
self.App = AFAppX.App;
self.my = AFAppX.bridge || AFAppX.abridge;
self.abridge = self.my;
self.Component = AFAppX.WorkerComponent || function(){};
self.$global = AFAppX.$global;
self.requirePlugin = AFAppX.requirePlugin;
if(AFAppX.registerApp) {
AFAppX.registerApp({
appJSON: appXAppJson,
});
}
function success() {
require('../../app');
require('../../custom_widgets/spin/spin?hash=05d2a9730dd6009bf9446182f9c985f40f8c0f43');
require('../../node_modules/mini-antui/es/input-item/index?hash=05d2a9730dd6009bf9446182f9c985f40f8c0f43');
require('../../pages/paysuccess/paysuccess?hash=8a39df616008c86a406618844f053cdc5567752b');
require('../../pages/login/login?hash=4ebd76d5932655db30c27bd67ebeb700d746609f');
require('../../pages/index/index?hash=32d7d2807ed4e666ef03b4b3fe8c38ecf2e34e68');
}
self.bootstrapApp ? self.bootstrapApp({ success }) : success();
}
\ No newline at end of file
{
"pages": [
"pages/balance/balance",
"pages/scan/scan",
"pages/paysuccess/paysuccess",
"pages/home/home",
"pages/login/login",
"pages/index/index"
],
......
page {
display: flex;
flex-direction: column;
/* background-color: #ff7f30; */
width: 100%;
height: 100%;
}
.dialog {
width: 750rpx;
height: 76%;
color: white;
font-size: 66rpx;
background-color: white;
/* border: 2px solid red; */
}
.scanRemindIcon {
width: 659rpx;
height: 604rpx;
margin-top: 192rpx;
margin-left: 34rpx;
}
.scanRemindText {
font-size: 38rpx;
color: #D9000000;
}
.close{
width: 28rpx;
height: 28rpx;
}
\ No newline at end of file
<popup show="{{showBottom}}" position="bottom" onClose="onPopupClose" >
<view class="dialog">
<!-- 图片 -->
<view class="scanRemindIcon">
<image mode="scaleToFill" src="/images/icon_scan_remind"/>
</view>
<!-- x -->
<view class="close">
<image mode="scaleToFill" src="/images/icon_dialog_cancel"/>
</view>
<view class="scanRemindText">请扫描会员码支付</view>
<view class="scanRemindError">该付款码无法识别,请重新扫描</view>
<view class=""> </view>
</view>
</popup>
Component({
mixins: [],// minxin 方便复用代码
data: {
},// 组件内部数据
props: {
remindText: "",
warningText:"",
loadingText: "",
resultSuccessText:"",
resultFailureText:"",
resultText:"",
statusIdle: 1,//初始状态
statusProgress:2,//loading状态
statusSuccessResult:3,//成功状态
statusFailedResult:4,//失败状态
currentStatus:1 //当前状态
},// 可给外部传入的属性添加默认值
didMount() {
},// 生命周期函数,加载成功
didUpdate() {},//刷新
didUnmount() {},//生命周期
methods: {// 自定义方法
},
});
\ No newline at end of file
{
"component": true
}
\ No newline at end of file
page{
display: flex;
flex-direction: column;
background-color: #ffffff;
width: 100%;
height: 100%;
align-items: center;
}
.goodsRemind{
color: #ffffff;
position:relative;
margin-top: 91rpx;
}
.payPrice{
color: #ffffff;
font-size: 94rpx;
margin-top: 8rpx;
}
.priceDetailRow{
display: flex;
flex-direction: row;
justify-content:space-between;
box-sizing: border-box;/*为元素设定的任何内边距和边框都发生在已设定的宽度和高度内部*/
width:750rpx;
color: rgba(255, 255, 255, 0.65);
padding-left: 47rpx;
padding-right: 47rpx;
}
.payWayContainer{
display: flex;
flex-direction: column;
width: 234rpx;
padding: 40rpx;
box-sizing: border-box;
}
.payWayText{
font-size:34rpx;
font-family:PingFangSC-Regular,PingFang SC;
font-weight:400;
color:rgba(0,0,0,0.85);
line-height:34rpx;
margin-top: 28rpx;
text-align: center;
}
\ No newline at end of file
<view class="page">
<image mode="aspectFit" src="/images/bg_balance.png" style="width:750rpx;height:504rpx"/>
<view style="position:absolute;width:100%;height:auto;left:0rpx;top:0rpx;display:flex;flex-direction:column;align-items:center">
<view class="goodsRemind">共计{{goodsNum}}件商品,应付总额</view>
<view class="payPrice">¥{{payPrice}}</view>
<view class="priceDetailRow" style="margin-top:58rpx;">
<view>订单总金额</view>
<view>¥{{totalPrice}}</view>
</view>
<view class="priceDetailRow" style="margin-top:30rpx;">
<view>商家活动优惠</view>
<view>¥{{couponPrice}}</view>
</view>
</view>
<view style="font-size:38rpx;width:300rpx;color:rgba(0,0,0,0.85);font-weight:500;font-family:PingFangSC-Medium,PingFang SC;opacity:0.85;margin:75rpx auto;">请选择支付方式</view>
<view style="width:750rpx;margin-top:78rpx;justify-content:space-between;display:flex;flex-direction:row;box-sizing:border-box;padding-left:96rpx;padding-right:96rpx;">
<view class="payWayContainer">
<image mode="aspectFit" src="/images/icon_facepay.png" style="width:134rpx;height:131rpx;margin:10rpx 10rpx 10rpx 10rpx;"/>
<view class="payWayText">刷脸支付</view>
</view>
<view class="payWayContainer">
<image mode="aspectFit" src="/images/icon_qrpay.png" style="width:134rpx;height:131rpx;margin:10rpx 10rpx 10rpx 10rpx;"/>
<view class="payWayText">扫码支付</view>
</view>
</view>
<!-- 测试popup是否好用,能用,适合用。 -->
<popup show="{{qrPayShow}}" position="bottom">
<!-- 图片 -->
<view class="scanRemindIcon">
<image mode="scaleToFill" src="/images/icon_scan_remind"/>
</view>
<!-- x -->
<view class="close">
<image mode="scaleToFill" src="/images/icon_dialog_cancel"/>
</view>
<view class="scanRemindText">请扫描会员码支付</view>
<view class="scanRemindError">该付款码无法识别,请重新扫描</view>
<view class=""> </view>
</popup>
</view>
\ No newline at end of file
Page({
data: {
goodsNum:"--",
payPrice:"--",
totalPrice:"--",
couponPrice:"--",
qrPayShow:false,
},
onLoad() {},
facePay(){
},
qrPay(){
//todo 这里增加唤起弹窗的逻辑
this.setData({
qrPayShow:true,
});
}
});
{}
\ No newline at end of file
page{
display: flex;
flex-direction: column;
background: url("/images/bg_home.png")no-repeat fixed top;
background-size: 100% 100%;
width: 100%;
height: 100%;
align-items: center;
}
.container{
position: relative;
width: 750rpx;
height: 430rpx;
margin: 0 auto;
margin-top: 38rpx;
}
\ No newline at end of file
<view class="page" onTap="homeTap">
</view>
\ No newline at end of file
Page({
data: {
},
onLoad() {
},
onReady(){
if (my.canIUse('hideBackHome')) {
my.hideBackHome();
}
},
scanDialog(ref){
// if(ref.getAttribute("id") == "drawbackDialog"){
// }else if(ref.getAttribute("id") == ""){
// }
},
homeTap(){
//FIXME 这里是跳转到新的界面
my.navigateTo({
url: "/pages/balance/balance"
});
}
});
{
"usingComponents":{
"scandialog":"/custom_widgets/scandialog/scandialog"
}
}
\ No newline at end of file
......@@ -5,6 +5,7 @@ page {
width: 100%;
height: 100%;
background: url(/images/bg_login.png) no-repeat fixed top;
background-size: 100% 100%;
}
.welcomeText {
......
......@@ -135,6 +135,8 @@ Page({
//跳转广告页
my.reLaunch({
url: "/pages/paysuccess/paysuccess"
//url: "/pages/home/home"
});
my.showToast({
type: 'success',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment