本文给大家带来的是微信小程序红色店铺管理中心页面样式设计制作开发教程,制作好以后效果图如下:
一、wxml页面代码如下:
<!--pages/shopmanage/shopmanage.wxml-->
<view class="page">
<view class="userinfo">
<image class="userinfo-avatar fl_l" src="{{shopInfo.logo}}" background-size="cover"></image>
<text class="fl_l shopname">{{shopInfo.name}}</text>
<text class="fl_l baozheng" wx:if="{{shopInfo.shopmoney}}">保证金:{{shopInfo.shopmoney}}</text>
</view>
<view class="qbdd mt10">
<navigator url="../promanage/promanage">
<span class="font_14 c3">产品管理</span>
</navigator>
</view>
<view class="qbdd mt10">
<navigator url="../myshop/myshop">
<span class="font_14 c3">上传产品</span>
</navigator>
</view>
<view class="qbdd mt10">
<navigator url="shoppwd">
<span class="font_14 c3">修改密码</span>
</navigator>
</view>
<view class="lll">
<image src="../../images/kf.png"> <contact-button></contact-button> <contact-button></contact-button></image>
</view>
</view>
|
二、wxss样式文件代码如下:
/* pages/shopmanage/shopmanage.wxss */
.me{
height: 100%;
}
.userinfo{
position: relative;
width: 750rpx;
height: 320rpx;
background: #d9002f;
color: #fff;
display: flex;
flex-direction: column;
align-items: center;
}
.userinfo-avatar {
display: block;
width: 177rpx;
height: 177rpx;
margin: 20rpx;
margin-top: 25rpx;
border-radius: 50%;
border:2px solid #fff;
background: white;
box-shadow: 3px 3px 10px rgba(0,0,0,0.2);
}
.userinfo-nickname {
color: #fff;
font-size: 14px;
}
.sc{
background: #fff;
width: 100%;
font-size: 12px;
line-height: 16px;
color: #666;
padding: 4% 0;
}
.sc image{
width: 24px;
height: 24px;
display: inline-block;
}
.bte{
border-top: 1px solid #eee;
}
.qbdd{
background: #fff;
width: 92%;
font-size: 12px;
color: #666;
padding: 4%;
}
/*在线客服*/
.lll{
width:71rpx;
height:69rpx;
position:fixed;
right:0px;
bottom: 88px;
float: right
}
.lll image{
width:100%;
height:100%;
}
contact-button{
position: relative;
top:-35px;
left:9px;
opacity: 0;
}
.bottom{
margin-bottom: 10px;
}
/*保证金*/
.baozheng{
font-size: 26rpx;
color: #eee;
}
|
三、js页面代码如下:
// pages/shopmanage/shopmanage.js
var app=getApp();
Page({
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
var that = this;
wx.request({
url: app.d.ceshiUrl + '/Api/Shangchang/my_shop_details',
method: 'post',
data: { uid:app.globalData.userInfo.id },
header: {
'Content-Type': 'application/x-www-form-urlencoded'
},
success: function (res) {
var shop_info = res.data.shop_info;
var status = res.data.status;
if (status == 1) {
that.setData({
shopInfo: shop_info
});
} else {
wx.showToast({
title: res.data.err,
duration: 2000
});
}
},
error: function (e) {
wx.showToast({
title: '网络异常!',
duration: 2000
});
},
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})
|