1. 程式人生 > 其它 >專案實戰-點餐小程式-25 我的-反饋建議

專案實戰-點餐小程式-25 我的-反饋建議

一、功能需求

  1. 反饋建議採用button元件
  2. 消除button元件的預設樣式,美化頁面樣式
  3. button按鈕的open-type微信開放能力的應用
  4. 反饋建議的後臺檢視

二、程式碼實現

1、me.wxml

 1 <view class="item">
 2 <!-- 給button新增open-type實現反饋建議功能 -->
 3 <button class="button" open-type="feedback">反饋建議</button>
 4 <image src="/images/right.png"></image>
5 </view> 6 <view class="item" > 7 <!-- 給button新增open-type實現線上客服功能 --> 8 <button class="button" open-type="contact">線上客服</button> 9 <image src="/images/right.png"></image> 10 </view>

2、me.wxss

 1 /*消除button的預設樣式*/
 2 .item .button{
 3   width: 100%;
 4   background-color
: #fff; 5 border: none; 6 text-align: left; 7 padding: 0; 8 margin: 0; 9 line-height: 1.3; 10 font-size: 28rpx; 11 font-weight: normal; 12 } 13 /*去除button邊框*/ 14 .item .button::after{ 15 border: none; 16 border-radius: 0; 17 }

三、效果展示