日韩无码专区无码一级三级片|91人人爱网站中日韩无码电影|厨房大战丰满熟妇|AV高清无码在线免费观看|另类AV日韩少妇熟女|中文日本大黄一级黄色片|色情在线视频免费|亚洲成人特黄a片|黄片wwwav色图欧美|欧亚乱色一区二区三区

RELATEED CONSULTING
相關(guān)咨詢(xún)
選擇下列產(chǎn)品馬上在線(xiàn)溝通
服務(wù)時(shí)間:8:30-17:00
你可能遇到了下面的問(wèn)題
關(guān)閉右側(cè)工具欄

新聞中心

這里有您想知道的互聯(lián)網(wǎng)營(yíng)銷(xiāo)解決方案
創(chuàng)新互聯(lián)百度小程序教程:page-frame 基礎(chǔ)政務(wù)服務(wù)大廳模板
  • page-frame 基礎(chǔ)政務(wù)服務(wù)大廳模板
    • 示例
    • 頁(yè)面內(nèi)容
      • 服務(wù)大廳首頁(yè)
      • 服務(wù)列表頁(yè)
    • npm 依賴(lài)
    • Bug & Tip

    page-frame 基礎(chǔ)政務(wù)服務(wù)大廳模板

    從開(kāi)發(fā)者工具 v2.25.1-rc 版本開(kāi)始支持。

    成都創(chuàng)新互聯(lián)公司為客戶(hù)提供專(zhuān)業(yè)的成都網(wǎng)站建設(shè)、網(wǎng)站制作、程序、域名、空間一條龍服務(wù),提供基于WEB的系統(tǒng)開(kāi)發(fā). 服務(wù)項(xiàng)目涵蓋了網(wǎng)頁(yè)設(shè)計(jì)、網(wǎng)站程序開(kāi)發(fā)、WEB系統(tǒng)開(kāi)發(fā)、微信二次開(kāi)發(fā)、手機(jī)網(wǎng)站制作設(shè)計(jì)等網(wǎng)站方面業(yè)務(wù)。

    解釋:本模板適用于各政府部門(mén)或區(qū)縣政務(wù)服務(wù)線(xiàn)上辦事大廳快速搭建工作,如社保、公安、稅務(wù)、教育等部門(mén),模板包含服務(wù)類(lèi)目列表頁(yè)、二級(jí)服務(wù)列表頁(yè),開(kāi)發(fā)者可根據(jù)實(shí)際業(yè)務(wù)分類(lèi)方式進(jìn)行二次開(kāi)發(fā),以實(shí)現(xiàn)服務(wù)列表清晰、直觀、結(jié)構(gòu)化的展現(xiàn)形式。

    示例

    掃碼體驗(yàn)

    代碼示例

    請(qǐng)使用百度APP掃碼

    頁(yè)面內(nèi)容

    模板包含兩個(gè)頁(yè)面:服務(wù)大廳首頁(yè)、服務(wù)列表頁(yè)。

    服務(wù)大廳首頁(yè)

    頁(yè)面包含首頁(yè)頭部板塊、小程序名稱(chēng)及描述區(qū)域、服務(wù)提供方描述區(qū)域可對(duì)開(kāi)發(fā)者主體進(jìn)行介紹。模板提供紅、藍(lán)兩種配色供選擇。

    頁(yè)面路徑:pages/index

    代碼示例

    • SWAN
    • JSON
     
     
     
    1. s-if="{{!loading && !statusType && showBar}}"
    2. animation
    3. show-fixed-bar
    4. fixed-title="{{frameList.name}}"
    5. fixed-front-color="#000000"
    6. common-front-color="#ffffff"
    7. common-bg-color="{{theme}}"
    8. common-bg-opacity="{{true}}"
    9. switch-start-position="10"
    10. switch-end-position="60"
    11. >
    12. s-if="{{!loading && statusType}}"
    13. class="frame-status"
    14. icon="{{statusConfig[statusType].icon}}"
    15. title="{{statusConfig[statusType].title}}"
    16. desc="{{statusConfig[statusType].desc}}"
    17. showBtn="{{statusConfig[statusType].showBtn}}"
    18. bindsmtreloading="requestList"
    19. >
    20. s-else
    21. text="{{frameList.hoster}}"
    22. gov-layout-container="frame-content"
    23. >
    24. {{frameList.name}}
    25. {{frameList.slogan}}
    26. label="{{val.category}}"
    27. gov-label="gov-label"
    28. label-width="6em"
    29. border
    30. >
    31. s-for="item, s in val.subCategory"
    32. content="{{item.name}}"
    33. border="{{s !== val.subCategory.length - 1}}"
    34. contentDesc="{{item.desc}}"
    35. gov-content="gov-content"
    36. label-width="0"
    37. data-service="{{i}}"
    38. data-list="{{s}}"
    39. bindtap="goService"
    40. arrow
    41. clickable
    42. >
    43. slot="left"
    44. >
     
     
     
    1. {
    2. "navigationStyle": "custom",
    3. "navigationBarTextStyle": "white",
    4. "usingComponents": {
    5. "gov-custom-title-bar": "@smt-ui/component-gov/src/custom-title-bar",
    6. "gov-list-item": "@smt-ui/component-gov/src/list-item",
    7. "gov-layout": "@smt-ui/component-gov/src/layout",
    8. "smt-page-status": "@smt-ui/component/src/page-status"
    9. }
    10. }
    • 頁(yè)面初始化,可設(shè)置服務(wù)項(xiàng)、主題色,頁(yè)面狀態(tài)

    • JS

     
     
     
    1. onLoad(options) {
    2. // frameList為mock的數(shù)據(jù)
    3. const {code, theme} = frameList;
    4. this.setData({
    5. // 服務(wù)項(xiàng)
    6. frameList: frameList,
    7. // 根據(jù)主題修改配色
    8. theme: theme === 'blue' ? COLOR_BLUE : COLOR_RED,
    9. // code 0: 正常獲取數(shù)據(jù) 99999: 無(wú)網(wǎng)絡(luò) 其他: 服務(wù)異常
    10. statusType: code === 99999 ? 'noNetwork' : code !== 0 ? 'warning' : ''
    11. });
    12. }
    • 跳轉(zhuǎn)服務(wù)列表頁(yè),開(kāi)發(fā)者可以按需傳遞參數(shù)到列表頁(yè)

    • JS

     
     
     
    1. goService({currentTarget}) {
    2. const {service, list} = currentTarget.dataset;
    3. // 跳轉(zhuǎn)服務(wù)列表頁(yè),跳轉(zhuǎn)的list和theme參數(shù)只是mock數(shù)據(jù)舉例,具體是否需要帶參數(shù)跳轉(zhuǎn)、參數(shù)名稱(chēng)、參數(shù)值可自定義。
    4. swan.navigateTo({
    5. url: 'pages/@smt-ui-template-page-frame/pages/services/index?list=${JSON.stringify(this.data.frameList.service[service].subCategory[list])}&theme=${this.data.frameList.theme}'
    6. });
    7. }
    • 根據(jù)主題修改配色

    • JS

     
     
     
    1. import {COLOR_BLUE, COLOR_RED} from '../../common/style/color.js';
    2. ...
    3. this.setData({
    4. // 根據(jù)主題修改配色
    5. theme: theme === 'blue' ? COLOR_BLUE : COLOR_RED,
    6. });

    服務(wù)列表頁(yè)

    頁(yè)面包含服務(wù)類(lèi)目列表,可以將服務(wù)項(xiàng)進(jìn)行清晰直觀的分類(lèi)展示。

    頁(yè)面路徑:pages/services

    代碼示例

    • SWAN
    • JSON
     
     
     
    1. animation
    2. show-fixed-bar
    3. fixed-title="{{services.name}}"
    4. common-front-color="#000000"
    5. fixed-bg-color='#ffffff'
    6. common-bg-opacity="{{true}}"
    7. need-to-return="{{true}}"
    8. gov-fixed-nav-bar="{{isOpacity || statusType ? 'gov-fixed' : ''}}"
    9. switch-start-position="10"
    10. switch-end-position="60"
    11. >
    12. s-if="{{!loading && statusType}}"
    13. class="frame-status"
    14. icon="{{statusConfig[statusType].icon}}"
    15. title="{{statusConfig[statusType].title}}"
    16. desc="{{statusConfig[statusType].desc}}"
    17. showBtn="{{statusConfig[statusType].showBtn}}"
    18. bindsmtreloading="requestList"
    19. >
    20. s-else
    21. text="{{services.hoster}}"
    22. gov-layout-container="frame-content"
    23. gov-layout-text="frame-footer"
    24. >
    25. class="service-bg-img"
    26. src="{{headBg}}"
    27. >
    28. {{services.name}}
    29. {{desc}}
    30. {{val.name}}
    31. s-for="v in val.list"
    32. label="{{v.name}}"
    33. bindtap="clickService"
    34. gov-label="label-text"
    35. label-width="6em"
    36. arrow
    37. border
    38. clickable
    39. />
     
     
     
    1. {
    2. "navigationBarTextStyle": "black",
    3. "navigationStyle": "custom",
    4. "usingComponents": {
    5. "gov-custom-title-bar": "@smt-ui/component-gov/src/custom-title-bar",
    6. "gov-list-item": "@smt-ui/component-gov/src/list-item",
    7. "gov-layout": "@smt-ui/component-gov/src/layout",
    8. "smt-page-status": "@smt-ui/component/src/page-status"
    9. }
    10. }
    • 頁(yè)面初始化,可設(shè)置服務(wù)列表項(xiàng)、主題色、歡迎語(yǔ)

    • JS

     
     
     
    1. onLoad({list, theme, type}) {
    2. this.setData({
    3. // 設(shè)置服務(wù)列表項(xiàng)
    4. services: JSON.parse(list),
    5. // 根據(jù)當(dāng)前主題切換頭部背景
    6. headBg: '../../images/bg${theme}.png',
    7. desc: this.getGreet() + ',歡迎使用該服務(wù)!',
    8. theme: {
    9. // 根據(jù)當(dāng)前主題切換配色
    10. color: theme === 'blue' ? COLOR_BLUE_1 : COLOR_RED_1
    11. },
    12. statusType: type
    13. });
    14. }
    • 點(diǎn)擊服務(wù)項(xiàng)事件,可自定義落地頁(yè)

    • JS

     
     
     
    1. clickService() {
    2. // url路徑可根據(jù)實(shí)際落地頁(yè)路徑替換
    3. swan.navigateTo({
    4. url: './nextPage'
    5. });
    6. }

    npm 依賴(lài)

    名稱(chēng)版本號(hào)
    @smt-ui/component-gov1.1.19-alpha.0
    @smt-ui/componentlatest

    Bug & Tip

    • Tip:該模板使用了 ES6 語(yǔ)法,需要開(kāi)啟開(kāi)發(fā)者工具的增強(qiáng)編譯,操作步驟參看開(kāi)啟說(shuō)明;同時(shí)也需開(kāi)啟上傳代碼時(shí)樣式自動(dòng)補(bǔ)全。
    • Tip:以上代碼示例為純客戶(hù)端代碼,可直接在模擬器和真機(jī)預(yù)覽。
    • Tip:模板中使用的是測(cè)試數(shù)據(jù),你需要從接口中獲取真實(shí)的數(shù)據(jù)。

    當(dāng)前文章:創(chuàng)新互聯(lián)百度小程序教程:page-frame 基礎(chǔ)政務(wù)服務(wù)大廳模板
    網(wǎng)址分享:http://m.5511xx.com/article/ccdjepi.html