国产 无码 综合区,色欲AV无码国产永久播放,无码天堂亚洲国产AV,国产日韩欧美女同一区二区

微信小程序OA會(huì)議系統(tǒng)數(shù)據(jù)交互

這篇具有很好參考價(jià)值的文章主要介紹了微信小程序OA會(huì)議系統(tǒng)數(shù)據(jù)交互。希望對(duì)大家有所幫助。如果存在錯(cuò)誤或未考慮完全的地方,請(qǐng)大家不吝賜教,您也可以點(diǎn)擊"舉報(bào)違法"按鈕提交疑問。

前言

經(jīng)過我們所寫的上一文章:微信小程序會(huì)議OA系統(tǒng)其他頁面-CSDN博客

在我們的是基礎(chǔ)面板上面,可以看到出來我們的數(shù)據(jù)是死數(shù)據(jù),今天我們就完善我們的是數(shù)據(jù)

后臺(tái)

在我們?nèi)ネ瓿身?xiàng)目之前我們要把我們的項(xiàng)目后臺(tái)準(zhǔn)備好資源我放在我資源中,大家可以用于參考,也可以去使用

pom.xml

這個(gè)是我們用來導(dǎo)入的

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.6.2</version>
        <relativePath/> <!-- lookup parent from repository -->
    </parent>
    <groupId>com.zking</groupId>
    <artifactId>minoa</artifactId>
    <version>0.0.1-SNAPSHOT</version>
    <name>minoa</name>
    <description>Demo project for Spring Boot</description>
    <properties>
        <java.version>1.8</java.version>
        <fastjson.version>1.2.70</fastjson.version>
        <jackson.version>2.9.8</jackson.version>
    </properties>
    <dependencies>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-jdbc</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>
 
        <dependency>
            <groupId>org.mybatis.spring.boot</groupId>
            <artifactId>mybatis-spring-boot-starter</artifactId>
            <version>2.2.1</version>
        </dependency>
 
        <dependency>
            <groupId>mysql</groupId>
            <artifactId>mysql-connector-java</artifactId>
            <version>5.1.44</version>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
            <optional>true</optional>
        </dependency>
 
        <dependency>
            <groupId>com.alibaba</groupId>
            <artifactId>fastjson</artifactId>
            <version>${fastjson.version}</version>
        </dependency>
 
    </dependencies>
 
    <build>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
                <configuration>
                    <excludes>
                        <exclude>
                            <groupId>org.projectlombok</groupId>
                            <artifactId>lombok</artifactId>
                        </exclude>
                    </excludes>
                </configuration>
            </plugin>
 
            <plugin>
                <groupId>org.mybatis.generator</groupId>
                <artifactId>mybatis-generator-maven-plugin</artifactId>
                <version>1.3.2</version>
                <dependencies>
                    <!--使用Mybatis-generator插件不能使用太高版本的mysql驅(qū)動(dòng) -->
                    <dependency>
                        <groupId>mysql</groupId>
                        <artifactId>mysql-connector-java</artifactId>
                        <version>${mysql.version}</version>
                    </dependency>
                </dependencies>
                <configuration>
                    <overwrite>true</overwrite>
                </configuration>
            </plugin>
        </plugins>
    </build>
 
</project>
appliation.yml

這個(gè)應(yīng)用于生成mapper接口,model實(shí)體類以及mapper映射文件

spring:
  datasource:
    #type連接池類型 DBCP,C3P0,Hikari,Druid,默認(rèn)為Hikari
    type: com.zaxxer.hikari.HikariDataSource
    driver-class-name: com.mysql.jdbc.Driver
    url: jdbc:mysql://localhost:3306/mybatis_oapro?useUnicode=true&characterEncoding=UTF-8&useSSL=false
    username: root
    password: 123456
@MapperScan("com.zking.minoa.mapper") //指mapper接口所在包

微信小程序OA會(huì)議系統(tǒng)數(shù)據(jù)交互,微信小程序,交互,小程序

前端

在我們使用我們的微信小程序開發(fā)之前我們可以不我們的之前所配置的Mock等等關(guān)閉

微信小程序OA會(huì)議系統(tǒng)數(shù)據(jù)交互,微信小程序,交互,小程序

index.js
  loadMeetingInfo(){
    let that=this;
    wx.request({
      url: api.IndexUrl,
      dataType: 'json',
      success(res) {
      console.log(res)
      that.setData({
      lists:res.data.data.infoList
          })
        }
      })
  },

在我們添加后,我們要在生命周期函數(shù)加入以下代碼

  onLoad(options) {
    // this.loadSwiperImgs();
    // this.loadMeetingInfos();
    this.loadMeetingInfo();//首頁會(huì)議信息
  },
index.wxml
?
 <image class="video-img" mode="scaleToFill" src="{{item.image != null ? item.image : '/static/persons/會(huì)議桌.jpg'}}"></image>

效果:

微信小程序OA會(huì)議系統(tǒng)數(shù)據(jù)交互,微信小程序,交互,小程序

request
util.js
const formatTime = date => {
  const year = date.getFullYear()
  const month = date.getMonth() + 1
  const day = date.getDate()
  const hour = date.getHours()
  const minute = date.getMinutes()
  const second = date.getSeconds()
 
  return `${[year, month, day].map(formatNumber).join('/')} ${[hour, minute, second].map(formatNumber).join(':')}`
}
 
const formatNumber = n => {
  n = n.toString()
  return n[1] ? n : `0${n}`
}
 
/**
 * 封裝微信的request請(qǐng)求
 */
function request(url, data = {}, method = "GET") {
  return new Promise(function (resolve, reject) {
    wx.request({
      url: url,
      data: data,
      method: method,
      header: {
        'Content-Type': 'application/json',
      },
      success: function (res) {
        if (res.statusCode == 200) {
            resolve(res.data);//會(huì)把進(jìn)行中改變成已成功
        } else {
          reject(res.errMsg);//會(huì)把進(jìn)行中改變成已失敗
        }
      },
      fail: function (err) {
        reject(err)
      }
    })
  });
}
 
module.exports = {
  formatTime,request
}
頭部引用util
const util = require("../../utils/util.js")
方法?
loadMeetingInfo(){
    util.request(api.IndexUrl).then(res=>{
      this.setData({
        lists:res.data.infoList
      })
    });
    // let that=this;
    // wx.request({
    //     url: api.IndexUrl,
    //     dataType: 'json',
    //     success(res) {
    //       console.log(res)
    //       that.setData({
    //           lists:res.data.data.infoList
    //       })
    //     }
    //   })
  },

WXS如何使用

會(huì)議狀態(tài)

在微信開發(fā)者工具里面,右鍵可以直接創(chuàng)建?.wxs?文件,在其中直接編寫 WXS 腳本。如下:

comm.wxs:
// /pages/comm.wxs
function getStateName(state){
  if(state == 1){
      return "待審核"
  }else if(state == 2){
    return "審核通過"
  }else if(state == 3){
    return "審核不通過"
  }else if(state == 4){
    return "待開會(huì)議"
  }
    return "其他"
}
module.exports = {
  getStateName: getStateName
};
引入wxs

在我們的index.wxml中引入wxs,代碼如下:

<wxs src="/utils/comm.wxs" module="tools" />

將index.wxml中class為state的view代碼塊改為以下代碼

<view class="state">{{tools.getStateName(item.state)}}</view>

微信小程序OA會(huì)議系統(tǒng)數(shù)據(jù)交互,微信小程序,交互,小程序

統(tǒng)計(jì)參會(huì)人

在我們的comm.wxs中加入以下代碼

<view class="join"><text class="list-num">{{tools.getNum(item.canyuze,item.liexize,item.zhuchiren)}}</text>人報(bào)名</view>
function getNum(canyuze,liexize,zhuchiren){
  var person = canyuze + "," + liexize + "," + zhuchiren;
  return person.split(",").length;
}
module.exports = {
  getStateName: getStateName,
  getNum: getNum
};

然后在index.wxml中class為list-num的view代碼塊改為以下代碼

<view class="join"><text class="list-num">{{tools.getNum(item.canyuze,item.liexize,item.zhuchiren)}}</text>人報(bào)名</view>

微信小程序OA會(huì)議系統(tǒng)數(shù)據(jù)交互,微信小程序,交互,小程序

處理時(shí)間

在comm.wxs中加入時(shí)間處理代
function formatDate(ts, option) {
    var date = getDate(ts)
    var year = date.getFullYear()
    var month = date.getMonth() + 1
    var day = date.getDate()
    var week = date.getDay()
    var hour = date.getHours()
    var minute = date.getMinutes()
    var second = date.getSeconds()
    
    //獲取 年月日
    if (option == 'YY-MM-DD') return [year, month, day].map(formatNumber).join('-')
  
    //獲取 年月
    if (option == 'YY-MM') return [year, month].map(formatNumber).join('-')
  
    //獲取 年
    if (option == 'YY') return [year].map(formatNumber).toString()
  
    //獲取 月
    if (option == 'MM') return  [mont].map(formatNumber).toString()
  
    //獲取 日
    if (option == 'DD') return [day].map(formatNumber).toString()
  
    //獲取 年月日 周一 至 周日
    if (option == 'YY-MM-DD Week')  return [year, month, day].map(formatNumber).join('-') + ' ' + getWeek(week)
  
    //獲取 月日 周一 至 周日
    if (option == 'MM-DD Week')  return [month, day].map(formatNumber).join('-') + ' ' + getWeek(week)
  
    //獲取 周一 至 周日
    if (option == 'Week')  return getWeek(week)
  
    //獲取 時(shí)分秒
    if (option == 'hh-mm-ss') return [hour, minute, second].map(formatNumber).join(':')
  
    //獲取 時(shí)分
    if (option == 'hh-mm') return [hour, minute].map(formatNumber).join(':')
  
    //獲取 分秒
    if (option == 'mm-dd') return [minute, second].map(formatNumber).join(':')
  
    //獲取 時(shí)
    if (option == 'hh')  return [hour].map(formatNumber).toString()
  
    //獲取 分
    if (option == 'mm')  return [minute].map(formatNumber).toString()
  
    //獲取 秒
    if (option == 'ss') return [second].map(formatNumber).toString()
  
    //默認(rèn) 時(shí)分秒 年月日
    return [year, month, day].map(formatNumber).join('-') + ' ' + [hour, minute, second].map(formatNumber).join(':')
  }
  function formatNumber(n) {
    n = n.toString()
    return n[1] ? n : '0' + n
  }
  
  function getWeek(n) {
    switch(n) {
        case 1:
        return '星期一'
        case 2:
        return '星期二'
        case 3:
        return '星期三'
        case 4:
        return '星期四'
        case 5:
        return '星期五'
        case 6:
        return '星期六'
        case 7:
        return '星期日'
    }
  }
導(dǎo)出
module.exports = {
  getStateName: getStateName,
  getNum: getNum,
  formatDate: formatDate
};

在index.wxml中class為list-info的view代碼塊代碼改為以下代碼

<view class="list-info"><text>{{item.location}}</text>|<text>{{tools.formatDate(item.starttime)}}</text></view>

微信小程序OA會(huì)議系統(tǒng)數(shù)據(jù)交互,微信小程序,交互,小程序文章來源地址http://www.zghlxwxcb.cn/news/detail-720349.html

到了這里,關(guān)于微信小程序OA會(huì)議系統(tǒng)數(shù)據(jù)交互的文章就介紹完了。如果您還想了解更多內(nèi)容,請(qǐng)?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!

本文來自互聯(lián)網(wǎng)用戶投稿,該文觀點(diǎn)僅代表作者本人,不代表本站立場(chǎng)。本站僅提供信息存儲(chǔ)空間服務(wù),不擁有所有權(quán),不承擔(dān)相關(guān)法律責(zé)任。如若轉(zhuǎn)載,請(qǐng)注明出處: 如若內(nèi)容造成侵權(quán)/違法違規(guī)/事實(shí)不符,請(qǐng)點(diǎn)擊違法舉報(bào)進(jìn)行投訴反饋,一經(jīng)查實(shí),立即刪除!

領(lǐng)支付寶紅包贊助服務(wù)器費(fèi)用

相關(guān)文章

  • 微信小程序之會(huì)議OA首頁數(shù)據(jù)交互,會(huì)議狀態(tài),會(huì)議人數(shù)轉(zhuǎn)換,會(huì)議室交互,WXS的使用

    微信小程序之會(huì)議OA首頁數(shù)據(jù)交互,會(huì)議狀態(tài),會(huì)議人數(shù)轉(zhuǎn)換,會(huì)議室交互,WXS的使用

    前言: 本篇博客使用結(jié)合了SpringMVC,mybatis,maven,小程序,如果不熟悉使用可以翻看我之前的博客,以便大家可以更好的學(xué)習(xí)!??! 這是我們今天完成后的效果: 1.1啟動(dòng)開發(fā)工具,導(dǎo)入后臺(tái) 導(dǎo)入框架: 配置maven 注意數(shù)據(jù)庫的名稱: 啟動(dòng) 1.2導(dǎo)入數(shù)據(jù)表 1.3前臺(tái)頁面的編碼(

    2024年02月08日
    瀏覽(19)
  • 微信小程序 —— 會(huì)議OA項(xiàng)目首頁布局與Mock數(shù)據(jù)交互

    微信小程序 —— 會(huì)議OA項(xiàng)目首頁布局與Mock數(shù)據(jù)交互

    14天閱讀挑戰(zhàn)賽 如果世界上有奇跡,那一定是努力的另一個(gè)名字。 目錄 一、小程序布局 1.1 Flex布局 1.2 Flex屬性 ? 二、OA會(huì)議首頁搭建 2.1?首頁底部菜單 2.2?創(chuàng)建后端結(jié)口 2.3?Mock模擬數(shù)據(jù) 2.4 首頁輪播圖搭建 2.5?首頁內(nèi)容搭建? 布局的傳統(tǒng)解決方案,基于盒狀模型,依賴 dis

    2024年02月08日
    瀏覽(23)
  • 會(huì)議室預(yù)訂小程序,共享會(huì)議室小程序,微信小程序會(huì)議室預(yù)約系統(tǒng)畢設(shè)作品

    會(huì)議室預(yù)訂小程序,共享會(huì)議室小程序,微信小程序會(huì)議室預(yù)約系統(tǒng)畢設(shè)作品

    目的 :本課題主要目標(biāo)是設(shè)計(jì)并能夠?qū)崿F(xiàn)一個(gè)基于微信小程序會(huì)議室預(yù)約系統(tǒng),前臺(tái)用戶使用小程序,后臺(tái)管理使用基PHP+MySql的B/S架構(gòu);通過后臺(tái)添加會(huì)議室信息、管理用戶信息、管理預(yù)約信息;前臺(tái)用戶通過小程序登錄,查看會(huì)議室信息、發(fā)起預(yù)約。 意義 :微信小程序會(huì)

    2024年02月08日
    瀏覽(24)
  • 微信小程序之會(huì)議OA首頁后臺(tái)交互

    springboot+mybatis appliation.yml 生成mapper接口,model實(shí)體類,mapper映射文件 application.yml 在啟動(dòng)類 Promise 是異步編程的一種解決方案,比傳統(tǒng)的解決方案——回調(diào)函數(shù)和事件——更合理和更強(qiáng)大。它由社區(qū)最早提出和實(shí)現(xiàn),ES6 將其寫進(jìn)了語言標(biāo)準(zhǔn),統(tǒng)一了用法,原生提供了Promise對(duì)象

    2024年02月20日
    瀏覽(36)
  • 微信小程序之會(huì)議OA個(gè)人中心后臺(tái)交互

    微信小程序之會(huì)議OA個(gè)人中心后臺(tái)交互

    目錄 獲取用戶昵稱頭像和昵稱 小程序登錄 登錄-小程序 wx.checkSession wx.login wx.request 后臺(tái) 準(zhǔn)備數(shù)據(jù)表 反向生成工具生成 準(zhǔn)備封裝前端傳過來的數(shù)據(jù) 小程序服器配置 導(dǎo)入微信小程序SDK application.yml WxProperties WxConfig WxAuthController 登錄-小程序 login.js user.js util.js emoji wx.getUserProfi

    2024年02月22日
    瀏覽(32)
  • 微信小程序共享會(huì)議室預(yù)約系統(tǒng)設(shè)計(jì)與實(shí)現(xiàn)

    微信小程序共享會(huì)議室預(yù)約系統(tǒng)設(shè)計(jì)與實(shí)現(xiàn)

    ?博主介紹 :黃菊華老師《Vue.js入門與商城開發(fā)實(shí)戰(zhàn)》《微信小程序商城開發(fā)》圖書作者,CSDN博客專家,在線教育專家,CSDN鉆石講師;專注大學(xué)生畢業(yè)設(shè)計(jì)教育和輔導(dǎo)。 所有項(xiàng)目都配有從入門到精通的基礎(chǔ)知識(shí)視頻課程,免費(fèi) 項(xiàng)目配有對(duì)應(yīng)開發(fā)文檔、開題報(bào)告、任務(wù)書、

    2024年02月04日
    瀏覽(34)
  • 微信小程序畢業(yè)設(shè)計(jì)作品成品(27)微信小程序共享會(huì)議室預(yù)約系統(tǒng)設(shè)計(jì)與實(shí)現(xiàn)

    微信小程序畢業(yè)設(shè)計(jì)作品成品(27)微信小程序共享會(huì)議室預(yù)約系統(tǒng)設(shè)計(jì)與實(shí)現(xiàn)

    博主介紹: 《Vue.js入門與商城開發(fā)實(shí)戰(zhàn)》《微信小程序商城開發(fā)》圖書作者,CSDN博客專家,在線教育專家,CSDN鉆石講師;專注大學(xué)生畢業(yè)設(shè)計(jì)教育和輔導(dǎo)。 所有項(xiàng)目都配有從入門到精通的基礎(chǔ)知識(shí)視頻課程,免費(fèi) 項(xiàng)目配有對(duì)應(yīng)開發(fā)文檔、開題報(bào)告、任務(wù)書、PPT、論文模版

    2024年02月08日
    瀏覽(23)
  • 基于php微信小程序共享會(huì)議室預(yù)約系統(tǒng)設(shè)計(jì)與實(shí)現(xiàn)

    基于php微信小程序共享會(huì)議室預(yù)約系統(tǒng)設(shè)計(jì)與實(shí)現(xiàn)

    開發(fā)概要 開發(fā)操作系統(tǒng):windows10 + 4G內(nèi)存 + 500G 小程序開發(fā):微信開發(fā)者工具(MINA框架) 后臺(tái)環(huán)境:IIS +PHP 后臺(tái)開發(fā)語言:PHP 后臺(tái)開發(fā)工具:Dreamweaver +PhpStorm 數(shù)據(jù)庫:mysql8 數(shù)據(jù)庫管理工具:navicat 其他開發(fā)語言:html + css +javascript

    2024年02月11日
    瀏覽(52)
  • 【畢業(yè)設(shè)計(jì)】基于微信小程序的會(huì)議室預(yù)約管理系統(tǒng)(附源碼)

    【畢業(yè)設(shè)計(jì)】基于微信小程序的會(huì)議室預(yù)約管理系統(tǒng)(附源碼)

    傳統(tǒng)的會(huì)議室預(yù)約采用人工登記的方式,效率低下,給場(chǎng)館預(yù)約用戶和場(chǎng)館管理員造成了極大不便?;谖⑿判〕绦虻臅?huì)議室預(yù)約系統(tǒng),能夠有效避免會(huì)議室預(yù)約用戶通過線下或致電的方式了解會(huì)議室各時(shí)間段的占用情況,也不需要與會(huì)議室管理員反復(fù)溝通以確認(rèn)預(yù)約。預(yù)約人員只

    2024年02月05日
    瀏覽(31)
  • uniapp微信小程序vue企業(yè)會(huì)議室預(yù)約系統(tǒng)python+python+nodejs+php

    uniapp微信小程序vue企業(yè)會(huì)議室預(yù)約系統(tǒng)python+python+nodejs+php

    該系統(tǒng)游客可以通過注冊(cè)成為注冊(cè)員工,之后就能夠?qū)?huì)議室、車輛信息瀏覽與預(yù)約。員工登錄后可以修改個(gè)人密碼,這個(gè)主要是微信端登錄的。服務(wù)端登錄管理員;管理員在登錄前選擇自己的角色,然后登錄該系統(tǒng)進(jìn)行相應(yīng)的操作。主要編輯上傳、會(huì)議室、會(huì)議室預(yù)約、車

    2024年04月29日
    瀏覽(23)

覺得文章有用就打賞一下文章作者

支付寶掃一掃打賞

博客贊助

微信掃一掃打賞

請(qǐng)作者喝杯咖啡吧~博客贊助

支付寶掃一掃領(lǐng)取紅包,優(yōu)惠每天領(lǐng)

二維碼1

領(lǐng)取紅包

二維碼2

領(lǐng)紅包