ThinkPHP Order Digital reminder function implementation method, thinkphp reminder function
This article describes how to implement the thinkPHP Order Digital reminder function. We will share this with you for your reference. The details are as follows:
Run the following command:
Html:
<Ul class = "am-avg-sm-5"> <li class = "condition-li" status = "0"> <span class = "condition"> all <if condition = "$ num. all neq 0 "> <span class =" badge "> {sh: $ num. all} </span> </if> </span> </li> <li class = "condition-li" status = "1"> <span class = "condition"> awaiting payment <if condition = "$ num. unpaid neq 0 "> <span class =" badge "> {sh: $ num. unpaid} </span> </if> </span> </li> <li class = "condition-li" status = "2"> <span class = "condition"> pending shipment <if condition = "$ num. unsent neq 0 "> <span class =" badge "> {sh: $ num. unsent} </span> </if> </span> </li> <li class = "condition-li" status = "3"> <span class = "condition"> waiting for receipt <if condition = "$ num. unresevied neq 0 "> <span class =" badge "> {sh: $ num. unresevied} </span> </if> </span> </li> <li class = "condition-li" status = "4"> <span class = "condition"> received <if condition = "$ num. resevied neq 0 "> <span class =" badge "> {sh: $ num. resevied} </span> </if> </span> </li> </ul>
Php:
// Numeric reminder for various States $ whereall = array ('Member _ id' => $ this-> member_id ); $ allorder = $ this-> orderModel-> where ($ whereall)-> select (); $ num = array ('all' => 0, 'unpaid' => 0, 'unsent' => 0, 'unrefered' => 0, 'refered' => 0); foreach ($ allorder as $ k => $ order) {if ($ order ['paytime'] = 0) {$ num ['unpaid'] ++;} if ($ order ['paytime']! = 0 & $ order ['sendtime'] = 0) {$ num ['unsent'] ++;} if ($ order ['paytime']! = 0 & $ order ['sendtime']! = 0 & $ order ['receivetime'] = 0) {$ num ['unsecret'] ++;} if ($ order ['paytime']! = 0 & $ order ['sendtime']! = 0 & $ order ['receivetime']! = 0) {$ num ['refered'] ++;} $ num ['all'] ++;} $ this-> assign ('num', $ num );
This time, values are transmitted in the form of arrays, with uniformity.
Add a fixed layout Effect
Css:
<style type="text/css"> .badge { background-color:#FFC245; position: absolute; top:-5px; right:-20px; } .condition{ position: relative; }</style>