vcard通讯录格式解析
TEL----电话
TITLE---职位
ROLE---职称
N----姓名
ORG----组织
ADR----地址
EMAIL---邮箱
URL----个人主页
TEL----电话
TITLE---职位
ROLE---职称
N----姓名
ORG----组织
ADR----地址
EMAIL---邮箱
URL----个人主页
在处理订单编号的时候,需要固定位数的数字,比如需要固定四位数格式
1->0001
56->0056
288->0288
1992->1992
可以使用php内置函数str_pad() 函数把字符串填充为新的长度。
str_pad(string,length,pad_string,pad_type)
//参数 描述
string //必需。规定要填充的字符串。
length //必需。规定新的字符串长度。如果该值小于字符串的原始长度,则不进行任何操作。
pad_string //可选。规定供填充使用的字符串。默认是空白。
pad_type //可选。规定填充字符串的哪边。
//可能的值:
STR_PAD_BOTH - //填充字符串的两侧。如果不是偶数,则右侧获得额外的填充。
STR_PAD_LEFT - //填充字符串的左侧。
STR_PAD_RIGHT - //填充字符串的右侧。默认。
例子:
$num=128;
$num=str_pad($num,4,"0",STR_PAD_LEFT);
echo $num;
输出
0128
问题:navigator和tabBar同样URL地址无法使用的问题。详细查看【网页地址】
当url和tabar的地址一致时候,navgator要增加open-type="switchTab"的属性。
<navigator url="/pages/loan/index" open-type="switchTab">
<text class="txt">地址一</text>
</navigator>
其他情况,可加open-type="navigate",默认情况下也是这个属性
<navigator url="/pages/loan/index" open-type="navigate">
<text class="txt">地址二</text>
</navigator>
wxml代码
<view class="notice">
<view class="title">公告:</view>
<swiper class="swiper_container" vertical="true" autoplay="true" circular="true" interval="2000">
<block wx:for="{{msgList}}" wx:key="{{item}}">
<navigator url="/pages/index/index?title={{item.url}}" open-type="navigate">
<swiper-item>
<view class="swiper_item">{{item.title}}</view>
</swiper-item>
</navigator>
</block>
</swiper>
</view>
数据js
msgList: [
{ url: "url", title: "多地首套房贷利率上浮 热点城市渐迎零折扣时代" },
{ url: "url", title: "悦如公寓三周年生日趴邀你免费吃喝欢唱城市渐迎零折扣时代" },
{ url: "url", title: "你想和一群有志青年一起过生日嘛?" }],
wxss样式
.notice {
width: 750rpx;
position: relative;
margin-top:12rpx;
}
.notice .title{
width: 151rpx;
float: left;
text-align: center;
font-size: 30rpx;
line-height:55rpx;
}
.notice .swiper_container {
height: 55rpx;
width: 600rpx;
line-height:55rpx;
float: right;
}
wxml代码
<swiper class="banner" indicator-dots="true" autoplay="true" interval="3000" duration="1000">
<swiper-item wx:for="{{imgUrls}}" wx:key="{{item.id}}">
<navigator url="{{item.action}}">
<image src="{{item.photo}}" background-size="cover"></image>
</navigator>
</swiper-item>
</swiper>
js代码
嵌套在data:{}里面
imgUrls:[
{"id":1,"action":"#","photo":"/static/demo/1.jpg"},
{"id":2,"action":"#","photo":"/static/demo/2.jpg"},
{"id":3,"action":"#","photo":"/static/demo/3.jpg"}
],
wxss
.banner {
width: 750rpx;
height: 320rpx;
}
.banner image {
width: 100%;
height: 320rpx;
}
我们在线购票时(如电影票、车票等)可以自己选座。开发者会在页面上列出座次席位,用户可以一目了然的看到可以选择的座位及支付。本文以电影院购票为例,为您展示如何选座、处理选座数据等。
在这里,我给大家介绍一款基于jQuery的在线选座插件:jQuery Seat
Charts,它支持自定义座位类型和价格,支持自定义样式,支持设置不可选的座位,也支持键盘控制座位。
555.png
我们假设进入电影《星际穿越》的选座页面,页面布局请看上面的大图,页面左边将在#seat-map中显示影院的座位布局图,右侧#booking-details显示影片相关信息以及选中的座位信息#selected-seats和票价金额信息,选择座位后确认到支付页面完成支付。
<div class="demo">
<div id="seat-map">
<div class="front">屏幕</div>
</div>
<div class="booking-details">
<p>影片:<span>星际穿越3D</span></p>
<p>时间:<span>11月14日 21:00</span></p>
<p>座位:</p>
代码如下:
说明:update 更新命令 yk_land 为表名 set设置 phone为表里面的字段 后面是值
UPDATE yk_land set phone ='13719073781'