ppypp伦理天堂,91手机在线视频,免费在线观看黄色毛片,夜夜穞天天穞狠狠穞AV美女按摩

聯(lián)系官方銷售客服

1835022288

028-61286886

投訴 已解決 請教這種函數(shù)在網(wǎng)站首頁怎么使用我建了個(gè)模塊表單我在模塊頁面用 8 0

請教{$sp_total}這種函數(shù)在網(wǎng)站首頁怎么使用?

我建了個(gè)模塊表單sp,我在模塊show頁面用{$sp_total}能統(tǒng)計(jì)該內(nèi)容的模塊表單sp的數(shù)量,在表單里面用{$index.sp_total}、在欄目列表頁用{$t.sp_total}

那在網(wǎng)站首頁是怎么用呢?我用{$t.sp_total}沒效果

解決方案
  • 首頁需要循環(huán)出這條數(shù)據(jù),在輸出sql_total,先把循環(huán)寫了


    • blob

      外層有個(gè){module}列表循環(huán),在列表循環(huán)里面再調(diào)用的的count統(tǒng)計(jì)模塊表單(審批表單)數(shù)量。

      如果數(shù)量為0表示還沒人審批,我顯示一個(gè)內(nèi)容;

      如果數(shù)量不為0,表示已經(jīng)有人審批過,我根據(jù)審批情況顯示其他內(nèi)容。

      不為0這個(gè)情況,我直接根據(jù)語句能實(shí)現(xiàn)了,為0這個(gè)有點(diǎn)特殊,查詢結(jié)果是沒有任何東西,也不是0,

      所以我要單獨(dú)寫個(gè)數(shù)量統(tǒng)計(jì),判斷是不是0,但是我并不需要直接輸出這個(gè)數(shù)量結(jié)果,我需要把這個(gè)結(jié)果用到if語句里面去

      回復(fù)迅睿框架創(chuàng)始人


    • blob

      這是show頁面的效果,操作日志是表單實(shí)現(xiàn)的

      回復(fù)迅睿框架創(chuàng)始人

  • module循環(huán)怎么寫的

    • {module module=sqsp catid=1 field=id,title,url,uid,updatetime order=updatetime num=7}
      <tr>
        <td><a href="{$t.url}" title="{$t.title}">{dr_strcut($t.title, 39)}</a></td>
        <td>{php $user=dr_member_info($t.uid);} {$user.name}</td>
        <td>{dr_date($t._updatetime, 'm-d', 'red')}</td>
        <td>
      	{count action=sql sql='SELECT lcjd,spqk FROM hf_1_sqsp_form_spqxsq WHERE catid=1 and cid=$t.id'}
      	
      	{sql sql='SELECT lcjd,spqk FROM hf_1_sqsp_form_spqxsq WHERE catid=1 and cid=$t.id  ORDER BY inputtime DESC  LIMIT 1' return=s}
      			{if $s.lcjd==1}
      				{if $s.spqk==1}			<!-- 部門負(fù)責(zé)人選擇[同意],下一環(huán)節(jié)[業(yè)務(wù)管理部門] 審批	-->
      					<button type="button" class="btn btn-warning btn-xs">業(yè)務(wù)管理部門</button>
      				{else if $s.spqk==2}		<!-- 部門負(fù)責(zé)人[不同意],完結(jié)申請 -->
      					<button type="button" class="btn btn-warning btn-xs">結(jié)束</button>
      				{else if $s.spqk==3}	<!-- 部門負(fù)責(zé)人選擇[完善資料],等待提交人完善資料后,繼續(xù)當(dāng)前環(huán)節(jié)[部門負(fù)責(zé)人審核] -->
      					<button type="button" class="btn btn-warning btn-xs">完善資料</button>
      				{/if}
      			{else if $s.lcjd==2}
      			……
      			……
      			……

      回復(fù)迅睿框架創(chuàng)始人

  • {module module=sqsp catid=1 field=id,title,url,uid,updatetime,spqxsq_total order=updatetime num=7}
    
    數(shù)量 {$t.spqxsq_total}
    滿意答案
    短信幣+1
  • 迅睿框架創(chuàng)始人:非常謝謝,完美解決了~!