position: relative;
position: absolute;
position: relative;
width: 10rpx;
height: 10rpx;
top:6rpx;
left:1rpx;
width: 50%;
height: 100rpx;
top:50%;
top:30rpx;
position: absolute;
width: 100%;
height: 100%;
border-radius: 50%;
height:500rpx;
width:auto;
height:auto;
overflow: hidden;
居中
display:flex;
justify-content:center;
align-items:center;
text-align:center;
文本
左对齐
text-align:justify;
居中
text-align:center;
文本缩进
text-indent:50rpx;
字体间距
letter-spacing:7rpx;
行高
line-height:40rpx;
颜色
color:#969696;
底线
border-bottom:1.4px #e6e6e6 solid;
字体大小
1.4px #f9f9f9 solid
font-size: 25rpx;
换行
flex-wrap: wrap;
word-wrap:break-word; word-break:normal;
不换行
white-space:nowrap; //字体不换行
flex-wrap: nowrap;
font-size:25rpx;
font-weight:bold;
flex-direction 属性规定灵活项目的方向。
flex-wrap: wrap;
flex-direction:row; 横
flex-direction:column; 竖排
提高优先级
!important
去除按钮边框
.share{
border: 0 !important;
background-color: white !important;
color: white!important;
}
.share::after{
border: 0 !important;
}
JS:
e.currentTarget.dataset.parent
//小程序分享
//开启右上角分享按钮
wx.showShareMenu({
withShareTicket: true
})
//处理分享事件
// 分享
onShareAppMessage: function (res) {
if (res.from === 'button') {
// 来自页面内转发按钮
console.log(res.target.dataset)
var name = res.target.dataset.name
var goods_id = res.target.dataset.goods
return {
title: name,
path: '/pages/index/goods/goods?id=' + goods_id,
success:function(e){ //分享回调
}
}
}else{
return {
title: this.data.name,
path: '/pages/index/goods/goods?id=' + this.data.goods_id,
success: function (e) { //分享回调
}
}
}
},
wx.redirectTo({
url: 'test?id=1'
})
e.currentTarget.dataset.index // 获取data- 传进来的index
<navigator url="/page/index/index" open-type="switchTab" hover-class="other-navigator-hover">切换 Tab</navigator>
'Content-Type': 'application/x-www-form-urlencoded' // 默认值
var value = wx.getStorageSync('key')
that.setData({
key: value
})
//刷新页面
function myrefresh(){
window.location.reload();
}
样式模板:
{
"navigationBarTitleText": "提交订单"
}
//完善手机号码
<form bindsubmit='sendphone'>
<view class='phone'>
<view class='text'>手机号</view>
<view class='input'><input placeholder="请输入手机号码" type='number' name='phone'></input></view>
</view>
<view class='code'>
<view class='text'>验证码</view>
<view class='input-code'><input placeholder="请输入验证码" type='number' name='code'></input></view>
<view><button bindtap='sendcode'>获取验证码</button></view>
</view>
<view class='bnt'>
<button form-type='submit'>确定</button>
</view>
</form>
wx.getStorage({
key: 'key',
success: function (res) {
}})
//封装的AJAX
var com = require('../../utils/util.js')
that.setData({
key: key
})
var that = this;
//普通版
wx.getStorage({
key: 'key',
success: function (res) {
com.POST({
url: 'Goods/top_stylist_delete',
data: {
key: res.data,
car_id:car_id
},
success: function (msg) {
if(msg.data.code==200){
}
}
})
}
})
//最新
var that = this
wx.getStorage({
key: 'key',
success: function (res) {
com.POST({
url: 'Store/stylist_grade',
data: {
key: res.data,
grade:1
},
success: function (msg) {
console.log(msg)
if (msg.data.code==200){
wx.showModal({
title: '温馨提示',
content: msg.data.datas,
success: function (res) {
if (res.confirm) {
wx.switchTab({
url: '/pages/index/index'
})
}
}
})
}else{
wx.showModal({
title: '温馨提示',
content: msg.data.error,
success: function (res) {
if (res.confirm) {
wx.switchTab({
url: '/pages/index/index'
})
}
}
})
}
}
})
}
})
},
//返回更新数据
//获取页面栈
var pages = getCurrentPages();
console.log(pages)
if (pages.length > 1) {
//上一个页面实例对象
var prePage = pages[pages.length - 2];
//关键在这里
prePage.setData({
name: that.data.name,
phone: that.data.phone,
address: that.data.address,
is_address:true
})
}
wx.navigateBack({ changed: true });//返回上一页
wx.getStorage({
key: 'key',
success: function (res) {
console.log(res)
wx.request({
url: url + 'Goods/get_car_goods',
method: "POST",
data: {
key: res.data
},
header: {
"Content-Type": "application/x-www-form-urlencoded" //不同于get
},
success: function (res) {
var dataArray = [];
var datalength = res.data.datas.length;
for (var i = 0; i < datalength; i++) {
var index = res.data.datas[i];
// console.log(index);
var obj = {
isSelect: false,
id: index.goods_id, //商品id
title: index.goods_name, //商品标题
typeid: index.class_id, //商品分类<=5是成衣>5是图纸
gnum: index.goods_sn, //商品编号
prices: index.price, //商品价格
imgurl: index.image_thumb, //商品图片
number: 1 //商品数量
}
dataArray.push(obj);
}
that.setData({
dataLists: dataArray
})
console.log(that.data.dataLists)
}
})
}
})
标题
{
"navigationBarTitleText": "我的订单"
}
//提示
wx.showToast({
title: '请选择商品',
icon: 'none',
duration: 2000
})
wx.redirectTo({
url: 'test?id=1'
})
wx.showModal({
title: '温馨提示',
content: '该宝贝不能减少了哟~',
success: function(res) {
if (res.confirm) {
wx.switchTab({
url: '/pages/index/index'
})
}
}
})
//延时跳转
setTimeout(function(){
wx.navigateTo({
url: '/pages/dd/index'
})
},2000)
//跳转
wx.switchTab({
url: '/pages/index/index'
})
wx.navigateTo({
url: 'test?id=1'
})
<button size="mini" type="primary" bindtap='onsale' >绑定手机号码</button>
吴振强
13242605046
广东省广州市海珠区中大轻纺交易园E30006尚古服装设计有限公司
<!--弹窗 -->
<view class="modal {{showAmountModal.showModal}}">
<view class="modal-content">
<view class="modal-line-box amount-title">
<text>温馨提示</text>
</view>
<view>点击授权获取微信头像和微信名字</view>
</view>
<button open-type="getUserInfo" type='primary' bindgetuserinfo='onGotUserInfo' class="button-color">授权</button>
</view>
<view class="mask {{showAmountModal.showMask}}"></view>
/* 弹窗 */
.modal{
position: absolute;
left: 0rpx;
top: 20%;
z-index: 200;
width:100%;
}
.modal-content{
width:60%;
height:300rpx;
margin:0 auto;
background:#fff;
font-size:30rpx;
font-family:"微软雅黑";
padding:20rpx;
border-radius:5px;
}
.modal-line-box{
margin: 30rpx 0rpx;
}
.modal-line-box.amount-title{
text-align: center;
font-size: 40rpx;
}
.mask{
position: fixed;
top: 0px;
left: 0px;
width: 100%;
height:100%;
z-index: 100;
background:rgba(0,0,0,0.5);
}
.showMask,.showModal{
display: block;
}
.hideMask,.hideModal{
display: none;
}
.button-color{
width:30%;
margin-top:-94rpx;
height:65rpx;
display:flex;
align-items:center;
justify-content:center;
}
//底部提示
.is-show {
position: relative;
width: 100%;
height: 70rpx;
display: flex;
justify-content: center;
align-items: center;
font-size: 28rpx;
/* border-top:1.4px #e6e6e6 solid; */
margin-top:14rpx;
}
.is-hide {
display: none;
position: relative;
width: 100%;
height: 70rpx;
padding-left: 33%;
padding-top: 3%;
font-size: 28rpx;
}
刷新
wx.startPullDownRefresh();
onPullDownRefresh: function(){
wx.stopPullDownRefresh()
}
//统计数量
$options=[
'field'=>'count(*) as count',
'table'=>'goods',
'where'=>[
'store_id'=>$_POST['store_id']
]
];
$count =M()->selectOne($options);
$list[$k]['count']=$count['count'];
pay_status: pay_status,
shipping_status: shipping_status,
order_status: order_status,
border:2.4px #E4C34D solid;
getindex
waitpay
waitsend
waitget
allok
allcolse
style='height:42rpx;'
style='width:44.7rpx;'
// {
// "pagePath": "pages/car/carlist/carlist",
// "iconPath": "images/car1.png",
// "selectedIconPath": "images/car.png",
// "text": "购物车"
// },
private $datas = array(
'mch_appid'=>'wx3670f6b94f08b57e', //商户账号appid
'mchid'=>'1263967901', //商户号
'nonce_str'=>'', //随机字符串
'sign'=>'', //签名
'out_trade_no'=>'', //商户订单号
'openid'=>'', //用户openid
'check_name'=>'', //校验用户姓名选项
'amount'=>'', //金额
'desc'=>'尚古服装设计有限公司用户提现',//企业付款描述信息
'spbill_create_ip'=>'', //Ip地址
//开启事务管理
M()->startTrans();
if($list && $lists){
M()->commit(); //提交事务管理
output_data('发货成功!');
}else{
M()->rollback(); //回滚
output_errors("发货失败,请重试!");
}
);
//转换时间
date('Y-m-d H:i:s',$v['add_time']);
//悬浮窗
<view class="floating" bindtap='backIndex'>
<image src='/images/daohang-16.png'></image>
<view>首页</view>
</view>
/* 悬浮窗 */
.floating{
position:fixed;
width:70rpx;
height:80rpx;
bottom:135px;
left:670rpx;
justify-content:center;
align-items:center;
flex-direction:column;
display:flex;
z-index: 300;
}
.floating image{
position: relative;
width:60rpx;
height:60rpx;
border:1.4px #e6e6e6 solid;
border-radius:15rpx;
}
.floating view{
position: relative;
display:flex;
flex-direction:row;
font-size: 20rpx;
}
// 悬浮窗
backIndex(){
wx.switchTab({
url: '/pages/index/index'
})
},