diff --git a/.github/workflows/Deploy CN.yml b/.github/workflows/Deploy CN.yml index 5fd67cfb..17b30125 100644 --- a/.github/workflows/Deploy CN.yml +++ b/.github/workflows/Deploy CN.yml @@ -1,4 +1,4 @@ -# . +# Disabled name: 🚀 Deploy INFO-SYS on: # Triggers the workflow on push or pull request events but only for the master branch diff --git a/.github/workflows/Deploy.yml b/.github/workflows/Deploy.yml index eec9b0a3..164c5b6d 100644 --- a/.github/workflows/Deploy.yml +++ b/.github/workflows/Deploy.yml @@ -92,3 +92,90 @@ jobs: *.exe *.docx .ftp-deploy-sync-state.json + + hn-notification: + needs: gh-win-cn-deploy + name: 🔔 Send notificaiton + runs-on: ubuntu-latest + if: always() # set "always" + steps: + - name: 🚚 Get latest code + uses: actions/checkout@v3 + # run this action to get the workflow conclusion + # You can get the conclusion via env (env.WORKFLOW_CONCLUSION) + - uses: technote-space/workflow-conclusion-action@v3 + + - name: Expose git commit data + uses: rlespinasse/git-commit-data-action@v1 + + - name: Print git commit data + run: | + echo "Get workflow conclusion" + echo " - ${{ env.WORKFLOW_CONCLUSION }}" + echo "Get commit info" + echo " - ${{ env.GIT_COMMIT_SHA }}" + echo " - ${{ env.GIT_COMMIT_SHORT_SHA }}" + +# echo "Get author info" +# echo " - ${{ env.GIT_COMMIT_AUTHOR }}" +# echo " - ${{ env.GIT_COMMIT_AUTHOR_NAME }}" +# echo " - ${{ env.GIT_COMMIT_AUTHOR_EMAIL }}" +# echo "Get committer info" +# echo " - ${{ env.GIT_COMMIT_COMMITTER }}" +# echo " - ${{ env.GIT_COMMIT_COMMITTER_NAME }}" +# echo " - ${{ env.GIT_COMMIT_COMMITTER_EMAIL }}" +# echo "Get message info" +# echo " - ${{ env.GIT_COMMIT_MESSAGE_SUBJECT }}" +# echo " - ${{ env.GIT_COMMIT_MESSAGE_SUBJECT_SANITIZED }}" +# echo " - ${{ env.GIT_COMMIT_MESSAGE_BODY }}" + + - name: ✉ Send some mail + uses: dawidd6/action-send-mail@v3 + with: + # Specify connection via URL (replaces server_address, server_port, secure, + # username and password) + # + # Format: + # + # * smtp://user:password@server:port + # * smtp+starttls://user:password@server:port + # connection_url: ${{secrets.MAIL_CONNECTION}} + # Required mail server address if not connection_url: + server_address: hwsmtp.exmail.qq.com + # Server port, default 25: + server_port: 465 + # Optional whether this connection use TLS (default is true if server_port is 465) + secure: true + # Optional (recommended) mail server username: + username: ${{secrets.MAIL_USERNAME}} + # Optional (recommended) mail server password: + password: ${{secrets.MAIL_PASSWORD}} + # Required mail subject: + subject: ${{env.WORKFLOW_CONCLUSION}} ${{ github.repository }} + # Required recipients' addresses: + to: ${{ env.GIT_COMMIT_COMMITTER_EMAIL }} + # Required sender full name (address can be skipped): + from: Git # + # Optional plain body: + body: | + ${{ env.WORKFLOW_CONCLUSION }} + ${{ github.repository }} + ${{ env.GIT_COMMIT_SHORT_SHA }}: ${{ env.GIT_COMMIT_MESSAGE_SUBJECT }} + # Optional HTML body read from file: + # html_body: file://README.html + # Optional carbon copy recipients: + # cc: lyt@hainatravel.com + # Optional blind carbon copy recipients: + # bcc: r2d2@example.com,hansolo@example.com + # Optional recipient of the email response: + # reply_to: luke@example.com + # Optional Message ID this message is replying to: + # in_reply_to: + # Optional unsigned/invalid certificates allowance: + ignore_cert: true + # Optional converting Markdown to HTML (set content_type to text/html too): + convert_markdown: true + # Optional attachments: + # attachments: attachments.zip,git.diff,./dist/static/*.js + # Optional priority: 'high', 'normal' (default) or 'low' + priority: low diff --git a/application/controllers/information.php b/application/controllers/information.php index a2f7ae7a..de625951 100644 --- a/application/controllers/information.php +++ b/application/controllers/information.php @@ -1679,6 +1679,7 @@ class Information extends CI_Controller $data = array(); $data['information'] = $information; + $recommand_template = ''; switch ($device) { case 'mobile': //获取移动优先的模板,如果有的话 @@ -1689,6 +1690,7 @@ class Information extends CI_Controller } else { return false; } + $recommand_template = 'mobile_first/ah-next-mobile'; break; case 'pc': //获取PC的模板,如果有的话 @@ -1699,6 +1701,7 @@ class Information extends CI_Controller } else { return false; } + $recommand_template = 'mobile_first/ah-next'; break; default: } @@ -1771,9 +1774,8 @@ class Information extends CI_Controller ); //推荐信息或者产品 - //信息推荐 - $template_recommand = $recommand_information; // $this->recommand_information($information); - $template = str_replace('', $this->load->view($template_path . '-next', array('recommands' => $template_recommand), true), $template); + $template_recommand = $recommand_information; + $template = str_replace('', $this->load->view($recommand_template, array('recommands' => $template_recommand), true), $template); //广告,改叫tips,防止被插件屏蔽 if (!empty($template_recommand['Tips Right'])) { $template = str_replace('', "
" . $template_recommand['Tips Right']->it_content . "
", $template); @@ -2801,7 +2803,7 @@ class Information extends CI_Controller } if (!empty($data)) { $exclude_ids[] = $data->is_id; - //读取附加移动端图片 + $data->desktop_photo = get_meta($data->ic_id, 'meta_addon_picture'); $data->mobile_photo = get_meta($data->ic_id, 'meta_addon_picture_mobile'); if (empty($data->mobile_photo)) { if (!empty($data->ic_photo)) { diff --git a/application/views/bootstrap/header.php b/application/views/bootstrap/header.php index 5a98abdf..7f00d58e 100644 --- a/application/views/bootstrap/header.php +++ b/application/views/bootstrap/header.php @@ -139,7 +139,7 @@ value=""> config->item('site_code'), array('jp', 'gm', 'vc', 'vac', 'ru', 'it'))) { ?> - @@ -204,11 +203,11 @@ config->item('site_code'), array('jp', 'gm', 'vc', 'vac', 'ru', 'it'))) { ?> - + - + @@ -221,79 +220,76 @@