微信小程序新增快捷导航

This commit is contained in:
devil 2020-09-14 18:53:42 +08:00
parent d6fececc04
commit 507c9f004b
101 changed files with 1100 additions and 344 deletions

View File

@ -254,6 +254,9 @@ class Common extends Controller
// 当前url地址
$this->assign('my_url', __MY_URL__);
// 项目public目录URL地址
$this->assign('my_public_url', __MY_PUBLIC_URL__);
// 当前http类型
$this->assign('my_http', __MY_HTTP__);

View File

@ -16,10 +16,10 @@
</div>
<textarea class="am-radius am-validate" name="{{$data.common_agreement_userregister.only_tag}}" maxlength="105000" id="editor-tag" data-validation-message="{{$data.common_agreement_userregister.error_tips}}">{{if !empty($data)}}{{$data.common_agreement_userregister.value|raw}}{{/if}}</textarea>
</div>
<div class="am-form-group am-form-group-refreshing">
<div class="am-form-group am-form-group-refreshing am-margin-top-lg am-padding-left-0">
<button type="submit" class="am-btn am-btn-primary am-radius btn-loading-example am-btn-sm am-btn-block" data-am-loading="{loadingText:'处理中...'}">保存</button>
<a href="{{:MyUrl('index/agreement/index', ['document'=>'userregister'])}}" target="_blank">
<button type="button" class="am-btn am-btn-default am-btn-xs am-btn-block m-t-20">查看详情</button>
<button type="button" class="am-btn am-btn-default am-btn-xs am-btn-block am-margin-top-sm">查看详情</button>
</a>
</div>
</form>

View File

@ -59,7 +59,7 @@
<input name="is_show" value="1" type="checkbox" data-off-text="否" data-on-text="是" data-size="xs" data-on-color="success" data-off-color="default" data-handle-width="50" data-am-switch {{if isset($data['is_show']) and $data['is_show'] eq 1}}checked="true"{{/if}} />
</div>
<div class="am-form-group am-form-group-refreshing">
<div class="am-form-group am-form-group-refreshing am-margin-top-lg am-padding-left-0">
<input type="hidden" name="id" {{if !empty($data['id'])}} value="{{$data.id}}"{{/if}} />
<input type="hidden" name="user_id" {{if !empty($data['user_id'])}} value="{{$data.user_id}}"{{/if}} />
<button type="submit" class="am-btn am-btn-primary am-radius btn-loading-example am-btn-sm am-btn-block" data-am-loading="{loadingText:'处理中...'}">保存</button>

View File

@ -70,7 +70,7 @@
</select>
</div>
<div class="am-form-group am-form-group-refreshing">
<div class="am-form-group am-form-group-refreshing am-margin-top-lg am-padding-left-0">
<input type="hidden" name="nav_type" value="{{$nav_type}}" />
<button type="submit" class="am-btn am-btn-primary am-radius btn-loading-example am-btn-sm am-btn-block" data-am-loading="{loadingText:'处理中...'}">保存</button>
</div>

View File

@ -32,7 +32,7 @@
<textarea rows="3" name="{{$data.common_user_center_notice.only_tag}}" class="am-radius" placeholder="{{$data.common_user_center_notice.name}}" data-validation-message="{{$data.common_user_center_notice.error_tips}}">{{if !empty($data)}}{{$data.common_user_center_notice.value}}{{/if}}</textarea>
</div>
<div class="am-form-group am-form-group-refreshing">
<div class="am-form-group am-form-group-refreshing am-margin-top-lg am-padding-left-0">
<button type="submit" class="am-btn am-btn-primary am-radius btn-loading-example am-btn-sm am-btn-block" data-am-loading="{loadingText:'处理中...'}">保存</button>
</div>
</form>

View File

@ -259,7 +259,7 @@
{{default /}}
<div class="table-no"><i class="am-icon-warning"></i> {{$nav_type}}无配置信息</div>
{{/switch}}
<div class="am-form-group am-form-group-refreshing">
<div class="am-form-group am-form-group-refreshing am-margin-top-lg am-padding-left-0">
<button type="submit" class="am-btn am-btn-primary am-radius btn-loading-example am-btn-sm am-btn-block" data-am-loading="{loadingText:'处理中...'}">保存</button>
</div>
</form>

View File

@ -28,7 +28,7 @@
<input type="number" placeholder="顺序" name="sort" min="0" max="255" data-validation-message="顺序 0~255 之间的数值" class="am-radius" value="0" required />
</div>
{{include file="lib/enable" /}}
<div class="am-form-group am-form-group-refreshing">
<div class="am-form-group am-form-group-refreshing am-margin-top-lg am-padding-left-0">
<input type="hidden" name="id" />
<button type="submit" class="am-btn am-btn-primary am-radius btn-loading-example am-btn-sm am-btn-block" data-am-loading="{loadingText:'处理中...'}">保存</button>
</div>

View File

@ -28,7 +28,7 @@
<input type="number" placeholder="顺序" name="sort" min="0" max="255" data-validation-message="顺序 0~255 之间的数值" class="am-radius" value="0" required />
</div>
{{include file="lib/enable" /}}
<div class="am-form-group am-form-group-refreshing">
<div class="am-form-group am-form-group-refreshing am-margin-top-lg am-padding-horizontal-0">
<input type="hidden" name="id" />
<button type="submit" class="am-btn am-btn-primary am-radius btn-loading-example am-btn-sm am-btn-block" data-am-loading="{loadingText:'处理中...'}">保存</button>
</div>
@ -40,8 +40,8 @@
<!-- save win end -->
<!-- list start -->
<div id="tree" class="m-t-15">
<div class="m-t-30 t-c">
<div id="tree" class="am-margin-top-sm">
<div class="am-margin-top-lg am-text-center">
<img src="{{$attachment_host}}/static/common/images/loading.gif" />
<p>处理中...</p>
</div>

View File

@ -42,7 +42,7 @@
请到百度地图开放平台申请,<a href="https://ask.shopxo.net/article/142" target="_blank">查看配置教程 <i class="am-icon-external-link"></i></a>
</div>
</div>
<div class="am-form-group am-form-group-refreshing">
<div class="am-form-group am-form-group-refreshing am-margin-top-lg am-padding-left-0">
<button type="submit" class="am-btn am-btn-primary am-radius btn-loading-example am-btn-sm am-btn-block" data-am-loading="{loadingText:'处理中...'}">保存</button>
</div>
</form>

View File

@ -31,7 +31,7 @@
</ul>
<div class="plug-file-upload-submit" data-view-tag="ul.common_customer_store_qrcode-images-view">+选择图片</div>
</div>
<div class="am-form-group am-form-group-refreshing">
<div class="am-form-group am-form-group-refreshing am-margin-top-lg am-padding-left-0">
<button type="submit" class="am-btn am-btn-primary am-radius btn-loading-example am-btn-sm am-btn-block" data-am-loading="{loadingText:'处理中...'}">保存</button>
</div>
</form>

View File

@ -50,7 +50,7 @@
</span>
</div>
</div>
<div class="am-form-group am-form-group-refreshing">
<div class="am-form-group am-form-group-refreshing am-margin-top-lg am-padding-left-0">
<button type="submit" class="am-btn am-btn-primary am-radius btn-loading-example am-btn-sm am-btn-block" data-am-loading="{loadingText:'处理中...'}">保存</button>
</div>
</form>

View File

@ -25,7 +25,7 @@
<label>{{$data.home_email_user_email_binding.name}}<span class="am-form-group-label-tips">{{$data.home_email_user_email_binding.describe}}</span></label>
<script type="text/plain" id="email_user_email_binding" name="{{$data.home_email_user_email_binding.only_tag}}">{{if !empty($data)}}{{$data.home_email_user_email_binding.value|raw}}{{/if}}</script>
</div>
<div class="am-form-group am-form-group-refreshing">
<div class="am-form-group am-form-group-refreshing am-margin-top-lg am-padding-left-0">
<button type="submit" class="am-btn am-btn-primary am-radius btn-loading-example am-btn-sm am-btn-block" data-am-loading="{loadingText:'处理中...'}">保存</button>
</div>
</form>

View File

@ -39,7 +39,7 @@
<input type="number" placeholder="顺序" name="sort" min="0" max="255" data-validation-message="顺序 0~255 之间的数值" class="am-radius" value="0" required />
</div>
{{include file="lib/enable" /}}
<div class="am-form-group am-form-group-refreshing">
<div class="am-form-group am-form-group-refreshing am-margin-top-lg am-padding-left-0">
<input type="hidden" name="id" />
<button type="submit" class="am-btn am-btn-primary am-radius btn-loading-example am-btn-sm am-btn-block" data-am-loading="{loadingText:'处理中...'}">保存</button>
</div>

View File

@ -777,7 +777,7 @@
</div>
{{/foreach}}
<div class="am-form-group am-form-group-refreshing">
<div class="am-form-group am-form-group-refreshing am-margin-top-lg am-padding-left-0">
<button type="submit" class="am-btn am-btn-primary am-radius btn-loading-example am-btn-sm am-btn-block">确认</button>
</div>
{{else /}}

View File

@ -100,7 +100,7 @@
<div class="am-alert am-alert-secondary">
{{include file="lib/seo" /}}
</div>
<div class="am-form-group am-form-group-refreshing">
<div class="am-form-group am-form-group-refreshing am-margin-top-lg am-padding-horizontal-0">
<input type="hidden" name="id" />
<button type="submit" class="am-btn am-btn-primary am-radius btn-loading-example am-btn-sm am-btn-block" data-am-loading="{loadingText:'处理中...'}">保存</button>
</div>
@ -112,8 +112,8 @@
<!-- save win end -->
<!-- list start -->
<div id="tree" class="m-t-15" data-rank="3" data-additional='[{"field":"bg_color", "value":"", "type":"input"}, {"field":"bg_color", "value":"", "type":"css", "tag":"button.colorpicker-submit", "style":"background-color"}, {"field":"icon", "value":"", "type":"input"}, {"field":"icon_url", "value":"{{$attachment_host}}/static/admin/default/images/default-images.jpg", "type":"attr", "tag":"ul.goods-category-icon-images-view li img", "style":"src"}, {"field":"big_images", "value":"", "type":"input"}, {"field":"big_images_url", "value":"{{$attachment_host}}/static/admin/default/images/default-images.jpg", "type":"attr", "tag":"ul.goods-category-big_images-images-view li img", "style":"src"}, {"field":"vice_name", "value":"", "type":"input"}, {"field":"describe", "value":"", "type":"textarea"}, {"field":"is_home_recommended", "value":"0", "type":"input"}, {"field":"seo_title", "value":"", "type":"input"}, {"field":"seo_keywords", "value":"", "type":"input"}, {"field":"seo_desc", "value":"", "type":"textarea"}]'>
<div class="m-t-30 t-c">
<div id="tree" class="am-margin-top-sm" data-rank="3" data-additional='[{"field":"bg_color", "value":"", "type":"input"}, {"field":"bg_color", "value":"", "type":"css", "tag":"button.colorpicker-submit", "style":"background-color"}, {"field":"icon", "value":"", "type":"input"}, {"field":"icon_url", "value":"{{$attachment_host}}/static/admin/default/images/default-images.jpg", "type":"attr", "tag":"ul.goods-category-icon-images-view li img", "style":"src"}, {"field":"big_images", "value":"", "type":"input"}, {"field":"big_images_url", "value":"{{$attachment_host}}/static/admin/default/images/default-images.jpg", "type":"attr", "tag":"ul.goods-category-big_images-images-view li img", "style":"src"}, {"field":"vice_name", "value":"", "type":"input"}, {"field":"describe", "value":"", "type":"textarea"}, {"field":"is_home_recommended", "value":"0", "type":"input"}, {"field":"seo_title", "value":"", "type":"input"}, {"field":"seo_keywords", "value":"", "type":"input"}, {"field":"seo_desc", "value":"", "type":"textarea"}]'>
<div class="am-margin-top-lg am-text-center">
<img src="{{$attachment_host}}/static/common/images/loading.gif" />
<p>处理中...</p>
</div>

View File

@ -91,7 +91,7 @@
<input name="is_show" value="1" type="checkbox" data-off-text="否" data-on-text="是" data-size="xs" data-on-color="success" data-off-color="default" data-handle-width="50" data-am-switch {{if isset($data['is_show']) and $data['is_show'] eq 1}}checked="true"{{/if}} />
</div>
<div class="am-form-group am-form-group-refreshing">
<div class="am-form-group am-form-group-refreshing am-margin-top-lg am-padding-left-0">
<input type="hidden" name="id" {{if !empty($data['id'])}} value="{{$data.id}}"{{/if}} />
<button type="submit" class="am-btn am-btn-primary am-radius btn-loading-example am-btn-sm am-btn-block" data-am-loading="{loadingText:'处理中...'}">保存</button>
</div>

View File

@ -20,7 +20,7 @@
<button type="button" class="am-btn am-btn-default am-btn-sm am-radius"><i class="am-icon-cloud-upload"></i> 选择文件</button>
<input type="file" name="excel" multiple data-validation-message="请选择需要上传的文件" accept="application/vnd.ms-excel" required />
</div>
<div class="am-form-group am-form-group-refreshing">
<div class="am-form-group am-form-group-refreshing am-margin-top-lg am-padding-left-0">
<button type="submit" class="am-btn am-btn-primary am-radius btn-loading-example am-btn-sm am-btn-block" data-am-loading="{loadingText:'处理中...'}">确认</button>
</div>
</form>

View File

@ -38,7 +38,7 @@
<label>描述</label>
<textarea rows="3" maxlength="60" name="describe" class="am-radius" placeholder="描述" data-validation-message="描述不能大于60个字符"></textarea>
</div>
<div class="am-form-group am-form-group-refreshing">
<div class="am-form-group am-form-group-refreshing am-margin-top-lg am-padding-horizontal-0">
<input type="hidden" name="id" />
<button type="submit" class="am-btn am-btn-primary am-radius btn-loading-example am-btn-sm am-btn-block" data-am-loading="{loadingText:'处理中...'}">保存</button>
</div>

View File

@ -66,7 +66,7 @@
</div>
{{include file="lib/is_show" /}}
{{include file="lib/is_new_window_open" /}}
<div class="am-form-group am-form-group-refreshing">
<div class="am-form-group am-form-group-refreshing am-margin-top-lg am-padding-horizontal-0">
<input type="hidden" name="id" />
<input type="hidden" name="data_type" value="custom" />
<input type="hidden" name="nav_type" value="{{$nav_type}}" />
@ -123,7 +123,7 @@
</div>
{{include file="lib/is_show" /}}
{{include file="lib/is_new_window_open" /}}
<div class="am-form-group am-form-group-refreshing">
<div class="am-form-group am-form-group-refreshing am-margin-top-lg am-padding-horizontal-0">
<input type="hidden" name="id" />
<input type="hidden" name="data_type" value="article" />
<input type="hidden" name="nav_type" value="{{$nav_type}}" />
@ -175,7 +175,7 @@
</div>
{{include file="lib/is_show" /}}
{{include file="lib/is_new_window_open" /}}
<div class="am-form-group am-form-group-refreshing">
<div class="am-form-group am-form-group-refreshing am-margin-top-lg am-padding-horizontal-0">
<input type="hidden" name="id" />
<input type="hidden" name="data_type" value="customview" />
<input type="hidden" name="nav_type" value="{{$nav_type}}" />
@ -236,7 +236,7 @@
</div>
{{include file="lib/is_show" /}}
{{include file="lib/is_new_window_open" /}}
<div class="am-form-group am-form-group-refreshing">
<div class="am-form-group am-form-group-refreshing am-margin-top-lg am-padding-horizontal-0">
<input type="hidden" name="id" />
<input type="hidden" name="data_type" value="goods_category" />
<input type="hidden" name="nav_type" value="{{$nav_type}}" />

View File

@ -38,7 +38,7 @@
<input type="file" name="file" class="file-event" data-tips-tag="#form-payment-tips" data-validation-message="请选择需要上传的文件" accept=".zip" multiple required />
<div id="form-payment-tips" class="am-margin-top-xs"></div>
</div>
<div class="am-form-group am-form-group-refreshing">
<div class="am-form-group am-form-group-refreshing am-margin-top-lg am-padding-horizontal-0">
<button type="submit" class="am-btn am-btn-primary am-radius btn-loading-example am-btn-sm am-btn-block" data-am-loading="{loadingText:'处理中...'}">确认</button>
</div>
</form>

View File

@ -27,7 +27,7 @@
{{/if}}
</div>
<div class="am-form-group am-form-group-refreshing">
<div class="am-form-group am-form-group-refreshing am-margin-top-lg am-padding-left-0">
<input type="hidden" name="id" {{if !empty($data)}} value="{{$data.id}}"{{/if}} />
<button type="submit" class="am-btn am-btn-primary am-radius btn-loading-example am-btn-sm am-btn-block" data-am-loading="{loadingText:'处理中...'}">下一步</button>
</div>

View File

@ -80,7 +80,7 @@
<input name="is_home" value="1" type="checkbox" data-off-text="没有" data-on-text="有" data-size="xs" data-on-color="success" data-off-color="default" data-handle-width="50" data-am-switch {{if isset($data['is_home']) and $data['is_home'] eq 1}}checked="true"{{/if}} />
</div>
<div class="am-form-group am-form-group-refreshing">
<div class="am-form-group am-form-group-refreshing am-margin-top-lg am-padding-left-0">
<input type="hidden" name="id" {{if !empty($data)}} value="{{$data.id}}"{{/if}} />
<button type="submit" class="am-btn am-btn-primary am-radius btn-loading-example am-btn-sm am-btn-block" data-am-loading="{loadingText:'处理中...'}">保存</button>
</div>

View File

@ -58,7 +58,7 @@
<input type="number" placeholder="顺序" name="sort" min="0" max="255" data-validation-message="顺序 0~255 之间的数值" class="am-radius" value="0" required />
</div>
{{include file="lib/is_show" /}}
<div class="am-form-group am-form-group-refreshing">
<div class="am-form-group am-form-group-refreshing am-margin-top-lg am-padding-horizontal-0">
<input type="hidden" name="id" />
<button type="submit" class="am-btn am-btn-primary am-radius btn-loading-example am-btn-sm am-btn-block" data-am-loading="{loadingText:'处理中...'}">保存</button>
</div>
@ -70,26 +70,26 @@
<!-- save win end -->
<!-- content start -->
<ul class="tree-list p-0 m-t-15">
<ul class="tree-list am-padding-left-0 am-margin-top-sm">
{{foreach $data as $v}}
<li id="data-list-{{$v.id}}" {{if $v['is_show'] eq 0}}class="bk-cr-ffd"{{/if}}>
{{if !empty($v['item'])}}
<i class="am-icon-plus c-p am-margin-right-xs"></i>
<label class="c-p">
{{else /}}
<label class="c-p m-l-20">
<label class="c-p am-padding-left-lg">
{{/if}}
<span>{{if !empty($v['icon'])}}<span class="iconfont {{$v.icon}}"></span>{{/if}} {{$v.name}}</span>
</label>
<div class="am-fr m-r-20 list-submit">
<span class="am-icon-edit am-icon-md c-p submit-edit {{if !empty($v['item'])}}am-margin-right-xs{{/if}}" data-am-modal="{target: '#power-save-win'}" data-json='{{:json_encode($v)}}' data-tag="power-save-win" data-item="{{if !empty($v['item'])}}ok{{else /}}no{{/if}}"></span>
{{if empty($v['item'])}}
<span class="am-icon-trash-o am-icon-md c-p m-l-20 m-r-15 submit-delete" data-url="{{:MyUrl('admin/power/delete')}}" data-id="{{$v.id}}"></span>
<span class="am-icon-trash-o am-icon-md c-p am-padding-left-lg m-r-15 submit-delete" data-url="{{:MyUrl('admin/power/delete')}}" data-id="{{$v.id}}"></span>
{{/if}}
</div>
</li>
{{if !empty($v['item'])}}
<ul class="list-find p-0 am-margin-top-xs" style="display:none;">
<ul class="list-find am-padding-left-0 am-margin-top-xs" style="display:none;">
{{foreach $v.item as $vs}}
<li id="data-list-{{$vs.id}}" {{if $vs['is_show'] eq 0}}class="bk-cr-ffd"{{/if}}>
<label class="c-p">

View File

@ -29,9 +29,7 @@
<select name="event_type" class="am-radius chosen-select" data-placeholder="可选择..." placeholder="事件值类型有误" data-validation-message="请选择事件类型" required>
<option value="">可选择...</option>
{{foreach $common_app_event_type as $v}}
{{if $v['value'] lt 3}}
<option value="{{$v.value}}" {{if isset($data['event_type']) and $data['event_type'] eq $v['value']}}selected{{else /}}{{if !isset($data['event_type']) and isset($v['checked']) and $v['checked'] eq true}}selected{{/if}}{{/if}}>{{$v.name}}</option>
{{/if}}
<option value="{{$v.value}}" {{if isset($data['event_type']) and $data['event_type'] eq $v['value']}}selected{{else /}}{{if !isset($data['event_type']) and isset($v['checked']) and $v['checked'] eq true}}selected{{/if}}{{/if}}>{{$v.name}}</option>
{{/foreach}}
</select>
</div>
@ -41,7 +39,7 @@
<div class="am-alert am-alert-warning am-radius" data-am-alert>
<button type="button" class="am-close">&times;</button>
<p class="am-text-xs">
WEB页面<br />&nbsp&nbsp&nbsp;1.以http开头<br />&nbsp&nbsp&nbsp;2.并在小程序后台加入白名单<br /><br /> 内部页面(小程序/APP内部地址)<br />&nbsp&nbsp&nbsp;1.小程序或APP内部地址<br />&nbsp&nbsp&nbsp;2.小程序以/pages开始<br />&nbsp&nbsp&nbsp;3.例如:/pages/user/user<br />&nbsp&nbsp&nbsp;4.支持带参数 ?x=xx
WEB页面<br />&nbsp&nbsp&nbsp;1.以http开头<br />&nbsp&nbsp&nbsp;2.并在小程序后台加入白名单<br /><br /> 内部页面(小程序/APP内部地址)<br />&nbsp&nbsp&nbsp;1.小程序或APP内部地址<br />&nbsp&nbsp&nbsp;2.小程序以/pages开始<br />&nbsp&nbsp&nbsp;3.例如:/pages/user/user<br />&nbsp&nbsp&nbsp;4.支持带参数 ?x=xx<br /><br /> 跳转原生地图查看指定位置<br />&nbsp&nbsp&nbsp;1.以 | 竖线分割,分别顺序 名称|地址|经度|纬度<br />&nbsp&nbsp&nbsp;2.例如ShopXO|上海浦东新区张江高科技园区XXX号|121.626444|31.20843
</p>
</div>
</div>

View File

@ -28,7 +28,7 @@
<input type="number" placeholder="顺序" name="sort" min="0" max="255" data-validation-message="顺序 0~255 之间的数值" class="am-radius" value="0" required />
</div>
{{include file="lib/enable" /}}
<div class="am-form-group am-form-group-refreshing">
<div class="am-form-group am-form-group-refreshing am-margin-top-lg am-padding-horizontal-0">
<input type="hidden" name="id" />
<input type="hidden" name="pid" value="0" />
<button type="submit" class="am-btn am-btn-primary am-radius btn-loading-example am-btn-sm am-btn-block" data-am-loading="{loadingText:'处理中...'}">保存</button>
@ -41,8 +41,8 @@
<!-- save win end -->
<!-- list start -->
<div id="tree" class="m-t-15">
<div class="m-t-30 t-c">
<div id="tree" class="am-margin-top-sm">
<div class="am-margin-top-lg am-text-center">
<img src="{{$attachment_host}}/static/common/images/loading.gif" />
<p>处理中...</p>
</div>

View File

@ -37,7 +37,7 @@
<input type="number" placeholder="顺序" name="sort" min="0" max="255" data-validation-message="顺序 0~255 之间的数值" class="am-radius" value="0" required />
</div>
{{include file="lib/enable" /}}
<div class="am-form-group am-form-group-refreshing">
<div class="am-form-group am-form-group-refreshing am-margin-top-lg am-padding-horizontal-0">
<input type="hidden" name="id" />
<button type="submit" class="am-btn am-btn-primary am-radius btn-loading-example am-btn-sm am-btn-block" data-am-loading="{loadingText:'处理中...'}">保存</button>
</div>
@ -49,8 +49,8 @@
<!-- save win end -->
<!-- list start -->
<div id="tree" class="m-t-15" data-additional='[{"field":"min_price", "value":"0", "type":"input"}, {"field":"max_price", "value":"0", "type":"input"}]'>
<div class="m-t-30 t-c">
<div id="tree" class="am-margin-top-sm" data-additional='[{"field":"min_price", "value":"0", "type":"input"}, {"field":"max_price", "value":"0", "type":"input"}]'>
<div class="am-margin-top-lg am-text-center">
<img src="{{$attachment_host}}/static/common/images/loading.gif" />
<p>处理中...</p>
</div>

View File

@ -33,7 +33,7 @@
<label>{{$data.home_seo_site_description.name}}<span class="am-form-group-label-tips">{{$data.home_seo_site_description.describe}}</span></label>
<textarea rows="6" name="{{$data.home_seo_site_description.only_tag}}" class="am-radius" placeholder="{{$data.home_seo_site_description.name}}" data-validation-message="{{$data.home_seo_site_description.error_tips}}">{{if !empty($data)}}{{$data.home_seo_site_description.value}}{{/if}}</textarea>
</div>
<div class="am-form-group am-form-group-refreshing">
<div class="am-form-group am-form-group-refreshing am-margin-top-lg am-padding-left-0">
<button type="submit" class="am-btn am-btn-primary am-radius btn-loading-example am-btn-sm am-btn-block" data-am-loading="{loadingText:'处理中...'}">保存</button>
</div>
</form>

View File

@ -37,7 +37,7 @@
</div>
</div>
<div class="am-form-group am-form-group-refreshing">
<div class="am-form-group am-form-group-refreshing am-margin-top-lg am-padding-left-0">
<input type="hidden" name="nav_type" value="{{$nav_type}}" />
<button type="submit" class="am-btn am-btn-primary am-radius btn-loading-example am-btn-sm am-btn-block" data-am-loading="{loadingText:'处理中...'}">保存</button>
</div>

View File

@ -23,7 +23,7 @@
<input type="text" name="{{$data.home_site_security_record_url.only_tag}}" placeholder="{{$data.home_site_security_record_url.describe}}" data-validation-message="{{$data.home_site_security_record_url.error_tips}}" class="am-radius" {{if !empty($data)}}value="{{$data.home_site_security_record_url.value}}"{{/if}} />
</div>
<div class="am-form-group am-form-group-refreshing">
<div class="am-form-group am-form-group-refreshing am-margin-top-lg am-padding-left-0">
<input type="hidden" name="nav_type" value="{{$nav_type}}" />
<button type="submit" class="am-btn am-btn-primary am-radius btn-loading-example am-btn-sm am-btn-block" data-am-loading="{loadingText:'处理中...'}">保存</button>
</div>

View File

@ -9,58 +9,96 @@
<!-- form start -->
<form class="am-form form-validation view-save" action="{{:MyUrl('admin/site/save')}}" method="POST" request-type="ajax-url" request-value="{{:MyUrl('admin/site/index', ['nav_type'=>'extends'])}}" enctype="multipart/form-data">
<div class="am-form-group">
<label>{{$data.common_is_login_answer.name}}<span class="am-form-group-label-tips">{{$data.common_is_login_answer.describe}}</span></label>
<select name="{{$data.common_is_login_answer.only_tag}}" class="am-radius chosen-select" data-validation-message="{{$data.common_is_login_answer.error_tips}}" required>
{{foreach $common_is_text_list as $v}}
<option value="{{$v.id}}" {{if isset($data['common_is_login_answer']['value']) and $data['common_is_login_answer']['value'] eq $v['id']}}selected{{/if}}>{{$v.name}}</option>
{{/foreach}}
</select>
</div>
<div class="am-form-group">
<label>{{$data.common_order_close_limit_time.name}}<span class="am-form-group-label-tips">{{$data.common_order_close_limit_time.describe}}</span></label>
<div class="am-input-group am-input-group-sm">
<input type="number" min="0" name="{{$data.common_order_close_limit_time.only_tag}}" placeholder="{{$data.common_order_close_limit_time.name}}" data-validation-message="{{$data.common_order_close_limit_time.error_tips}}" class="am-radius" {{if !empty($data)}}value="{{$data.common_order_close_limit_time.value}}"{{/if}} />
<span class="am-input-group-btn">
<button class="am-btn am-btn-default" type="button">分钟</button>
</span>
<!-- 基础配置 -->
<div class="am-panel am-panel-default">
<div class="am-panel-hd">
<h3 class="am-panel-title">基础配置</h3>
</div>
<div class="am-alert am-alert-warning">
<p>建议将该地址添加到linux定时任务定时请求即可结果 sucs:0, fail:0 冒号后面则是处理的数据条数sucs成功fali失败</p>
<a href="{{:MyUrl('api/crontab/orderclose')}}" target="_blank">{{:MyUrl('api/crontab/orderclose')}}</a>
<div class="am-panel-bd">
<div class="am-form-group">
<label>{{$data.common_is_login_answer.name}}<span class="am-form-group-label-tips">{{$data.common_is_login_answer.describe}}</span></label>
<select name="{{$data.common_is_login_answer.only_tag}}" class="am-radius chosen-select" data-validation-message="{{$data.common_is_login_answer.error_tips}}" required>
{{foreach $common_is_text_list as $v}}
<option value="{{$v.id}}" {{if isset($data['common_is_login_answer']['value']) and $data['common_is_login_answer']['value'] eq $v['id']}}selected{{/if}}>{{$v.name}}</option>
{{/foreach}}
</select>
</div>
</div>
</div>
<div class="am-form-group">
<label>{{$data.common_order_success_limit_time.name}}<span class="am-form-group-label-tips">{{$data.common_order_success_limit_time.describe}}</span></label>
<div class="am-input-group am-input-group-sm">
<input type="number" min="0" name="{{$data.common_order_success_limit_time.only_tag}}" placeholder="{{$data.common_order_success_limit_time.name}}" data-validation-message="{{$data.common_order_success_limit_time.error_tips}}" class="am-radius" {{if !empty($data)}}value="{{$data.common_order_success_limit_time.value}}"{{/if}} />
<span class="am-input-group-btn">
<button class="am-btn am-btn-default" type="button">分钟</button>
</span>
<!-- 定时脚本配置 -->
<div class="am-panel am-panel-default">
<div class="am-panel-hd">
<h3 class="am-panel-title">定时脚本配置</h3>
</div>
<div class="am-alert am-alert-warning">
<p>建议将该地址添加到linux定时任务定时请求即可结果 sucs:0, fail:0 冒号后面则是处理的数据条数sucs成功fali失败</p>
<a href="{{:MyUrl('api/crontab/ordersuccess')}}" target="_blank">{{:MyUrl('api/crontab/ordersuccess')}}</a>
<div class="am-panel-bd">
<div class="am-alert am-alert-warning" data-am-alert>
<button type="button" class="am-close">&times;</button>
<p>建议将脚本地址添加到linux定时任务定时请求即可结果 sucs:0, fail:0 冒号后面则是处理的数据条数sucs成功fali失败</p>
</div>
<div class="am-form-group">
<label>{{$data.common_order_close_limit_time.name}}<span class="am-form-group-label-tips">{{$data.common_order_close_limit_time.describe}}</span></label>
<div class="am-input-group am-input-group-sm">
<input type="number" min="0" name="{{$data.common_order_close_limit_time.only_tag}}" placeholder="{{$data.common_order_close_limit_time.name}}" data-validation-message="{{$data.common_order_close_limit_time.error_tips}}" class="am-radius" {{if !empty($data)}}value="{{$data.common_order_close_limit_time.value}}"{{/if}} />
<span class="am-input-group-btn">
<button class="am-btn am-btn-default" type="button">分钟</button>
</span>
</div>
<div class="am-alert">
<a href="{{:MyUrl('api/crontab/orderclose')}}" target="_blank">{{:MyUrl('api/crontab/orderclose')}}</a>
</div>
</div>
<div class="am-form-group">
<label>{{$data.common_order_success_limit_time.name}}<span class="am-form-group-label-tips">{{$data.common_order_success_limit_time.describe}}</span></label>
<div class="am-input-group am-input-group-sm">
<input type="number" min="0" name="{{$data.common_order_success_limit_time.only_tag}}" placeholder="{{$data.common_order_success_limit_time.name}}" data-validation-message="{{$data.common_order_success_limit_time.error_tips}}" class="am-radius" {{if !empty($data)}}value="{{$data.common_order_success_limit_time.value}}"{{/if}} />
<span class="am-input-group-btn">
<button class="am-btn am-btn-default" type="button">分钟</button>
</span>
</div>
<div class="am-alert">
<a href="{{:MyUrl('api/crontab/ordersuccess')}}" target="_blank">{{:MyUrl('api/crontab/ordersuccess')}}</a>
</div>
</div>
<div class="am-form-group">
<label>{{$data.common_pay_log_order_close_limit_time.name}}<span class="am-form-group-label-tips">{{$data.common_pay_log_order_close_limit_time.describe}}</span></label>
<div class="am-input-group am-input-group-sm">
<input type="number" min="0" name="{{$data.common_pay_log_order_close_limit_time.only_tag}}" placeholder="{{$data.common_pay_log_order_close_limit_time.name}}" data-validation-message="{{$data.common_pay_log_order_close_limit_time.error_tips}}" class="am-radius" {{if !empty($data)}}value="{{$data.common_pay_log_order_close_limit_time.value}}"{{/if}} />
<span class="am-input-group-btn">
<button class="am-btn am-btn-default" type="button">分钟</button>
</span>
</div>
<div class="am-alert">
<a href="{{:MyUrl('api/crontab/paylogorderclose')}}" target="_blank">{{:MyUrl('api/crontab/paylogorderclose')}}</a>
</div>
</div>
</div>
</div>
<div class="am-form-group">
<label>{{$data.common_pay_log_order_close_limit_time.name}}<span class="am-form-group-label-tips">{{$data.common_pay_log_order_close_limit_time.describe}}</span></label>
<div class="am-input-group am-input-group-sm">
<input type="number" min="0" name="{{$data.common_pay_log_order_close_limit_time.only_tag}}" placeholder="{{$data.common_pay_log_order_close_limit_time.name}}" data-validation-message="{{$data.common_pay_log_order_close_limit_time.error_tips}}" class="am-radius" {{if !empty($data)}}value="{{$data.common_pay_log_order_close_limit_time.value}}"{{/if}} />
<span class="am-input-group-btn">
<button class="am-btn am-btn-default" type="button">分钟</button>
</span>
<!-- CDN配置 -->
<div class="am-panel am-panel-default">
<div class="am-panel-hd">
<h3 class="am-panel-title">CDN配置</h3>
</div>
<div class="am-alert am-alert-warning">
<p>建议将该地址添加到linux定时任务定时请求即可结果 sucs:0, fail:0 冒号后面则是处理的数据条数sucs成功fali失败</p>
<a href="{{:MyUrl('api/crontab/paylogorderclose')}}" target="_blank">{{:MyUrl('api/crontab/paylogorderclose')}}</a>
<div class="am-panel-bd">
<div class="am-alert am-alert-warning" data-am-alert>
<button type="button" class="am-close">&times;</button>
<p>未设置则使用当前站点域名[ <a href="{{$my_public_url}}" target="_blank">{{$my_public_url}}</a> ]</p>
</div>
<div class="am-form-group">
<label>{{$data.common_cdn_attachment_host.name}}<span class="am-form-group-label-tips">{{$data.common_cdn_attachment_host.describe}}</span></label>
<input type="text" name="{{$data.common_cdn_attachment_host.only_tag}}" placeholder="{{$data.common_cdn_attachment_host.describe}}" data-validation-message="{{$data.common_cdn_attachment_host.error_tips}}" class="am-radius" {{if !empty($data)}}value="{{$data.common_cdn_attachment_host.value}}"{{/if}} />
</div>
<div class="am-form-group">
<label>{{$data.common_cdn_public_host.name}}<span class="am-form-group-label-tips">{{$data.common_cdn_public_host.describe}}</span></label>
<input type="text" name="{{$data.common_cdn_public_host.only_tag}}" placeholder="{{$data.common_cdn_public_host.describe}}" data-validation-message="{{$data.common_cdn_public_host.error_tips}}" class="am-radius" {{if !empty($data)}}value="{{$data.common_cdn_public_host.value}}"{{/if}} />
</div>
</div>
</div>
<div class="am-form-group am-form-group-refreshing">
<div class="am-form-group am-form-group-refreshing am-margin-top-lg am-padding-left-0">
<input type="hidden" name="nav_type" value="{{$nav_type}}" />
<button type="submit" class="am-btn am-btn-primary am-radius btn-loading-example am-btn-sm am-btn-block" data-am-loading="{loadingText:'处理中...'}">保存</button>
</div>

View File

@ -114,7 +114,7 @@
</div>
</div>
<div class="am-form-group am-form-group-refreshing">
<div class="am-form-group am-form-group-refreshing am-margin-top-lg am-padding-left-0">
<input type="hidden" name="nav_type" value="{{$nav_type}}" />
<button type="submit" class="am-btn am-btn-primary am-radius btn-loading-example am-btn-sm am-btn-block" data-am-loading="{loadingText:'处理中...'}">保存</button>
</div>

View File

@ -26,13 +26,14 @@
<button class="am-btn am-btn-default" type="button"></button>
</span>
</div>
<div class="am-alert am-alert-warning">
<div class="am-alert am-alert-warning" data-am-alert>
<button type="button" class="am-close">&times;</button>
<p>1. 默认展示3级最低1级、最高3级</p>
<p>2. 层级不一样、前端分类页样式也会不一样</p>
</div>
</div>
<div class="am-form-group am-form-group-refreshing">
<div class="am-form-group am-form-group-refreshing am-margin-top-lg am-padding-left-0">
<input type="hidden" name="nav_type" value="{{$nav_type}}" />
<button type="submit" class="am-btn am-btn-primary am-radius btn-loading-example am-btn-sm am-btn-block" data-am-loading="{loadingText:'处理中...'}">保存</button>
</div>

View File

@ -132,7 +132,7 @@
</select>
</div>
<div class="am-form-group am-form-group-refreshing">
<div class="am-form-group am-form-group-refreshing am-margin-top-lg am-padding-left-0">
<input type="hidden" name="nav_type" value="{{$nav_type}}" />
<button type="submit" class="am-btn am-btn-primary am-radius btn-loading-example am-btn-sm am-btn-block" data-am-loading="{loadingText:'处理中...'}">保存</button>
</div>

View File

@ -34,7 +34,7 @@
</div>
</div>
<div class="am-form-group am-form-group-refreshing">
<div class="am-form-group am-form-group-refreshing am-margin-top-lg am-padding-left-0">
<input type="hidden" name="nav_type" value="{{$nav_type}}" />
<button type="submit" class="am-btn am-btn-primary am-radius btn-loading-example am-btn-sm am-btn-block" data-am-loading="{loadingText:'处理中...'}">保存</button>
</div>

View File

@ -59,7 +59,7 @@
</select>
</div>
<div class="am-form-group am-form-group-refreshing">
<div class="am-form-group am-form-group-refreshing am-margin-top-lg am-padding-left-0">
<input type="hidden" name="nav_type" value="{{$nav_type}}" />
<button type="submit" class="am-btn am-btn-primary am-radius btn-loading-example am-btn-sm am-btn-block" data-am-loading="{loadingText:'处理中...'}">保存</button>
</div>

View File

@ -22,7 +22,7 @@
<input type="text" name="{{$data.home_search_keywords.only_tag}}" placeholder="{{$data.home_search_keywords.describe}}" data-validation-message="{{$data.home_search_keywords.error_tips}}" class="am-radius" data-am-tagsinput {{if !empty($data)}}value="{{$data.home_search_keywords.value}}"{{/if}} />
</div>
<div class="am-form-group am-form-group-refreshing">
<div class="am-form-group am-form-group-refreshing am-margin-top-lg am-padding-left-0">
<input type="hidden" name="nav_type" value="{{$nav_type}}" />
<button type="submit" class="am-btn am-btn-primary am-radius btn-loading-example am-btn-sm am-btn-block" data-am-loading="{loadingText:'处理中...'}">保存</button>
</div>

View File

@ -116,7 +116,7 @@
</div>
</div>
<div class="am-form-group am-form-group-refreshing">
<div class="am-form-group am-form-group-refreshing am-margin-top-lg am-padding-left-0">
<input type="hidden" name="nav_type" value="{{$nav_type}}" />
<button type="submit" class="am-btn am-btn-primary am-radius btn-loading-example am-btn-sm am-btn-block" data-am-loading="{loadingText:'处理中...'}">保存</button>
</div>
@ -163,7 +163,7 @@
<div id="map" data-level="17" class="am-margin-top-xs"></div>
</div>
<div class="am-form-group am-form-group-refreshing">
<div class="am-form-group am-form-group-refreshing am-margin-top-lg am-padding-horizontal-0">
<button type="submit" class="am-btn am-btn-primary am-radius btn-loading-example am-btn-sm am-btn-block" data-am-loading="{loadingText:'处理中...'}">确认</button>
</div>
</form>

View File

@ -45,7 +45,7 @@
</select>
</div>
<div class="am-form-group am-form-group-refreshing">
<div class="am-form-group am-form-group-refreshing am-margin-top-lg am-padding-left-0">
<input type="hidden" name="nav_type" value="{{$nav_type}}" />
<button type="submit" class="am-btn am-btn-primary am-radius btn-loading-example am-btn-sm am-btn-block" data-am-loading="{loadingText:'处理中...'}">保存</button>
</div>

View File

@ -21,7 +21,7 @@
<label>{{$data.common_sms_sign.name}}<span class="am-form-group-label-tips">{{$data.common_sms_sign.describe}}</span></label>
<input type="text" name="{{$data.common_sms_sign.only_tag}}" placeholder="{{$data.common_sms_sign.name}}" data-validation-message="{{$data.common_sms_sign.error_tips}}" class="am-radius" maxlength="16" {{if !empty($data)}}value="{{$data.common_sms_sign.value}}"{{/if}} />
</div>
<div class="am-form-group am-form-group-refreshing">
<div class="am-form-group am-form-group-refreshing am-margin-top-lg am-padding-left-0">
<button type="submit" class="am-btn am-btn-primary am-radius btn-loading-example am-btn-sm am-btn-block" data-am-loading="{loadingText:'处理中...'}">保存</button>
</div>
</form>

View File

@ -25,7 +25,7 @@
<label>{{$data.home_sms_user_mobile_binding.name}}<span class="am-form-group-label-tips">{{$data.home_sms_user_mobile_binding.describe}}</span></label>
<input type="text" name="{{$data.home_sms_user_mobile_binding.only_tag}}" placeholder="{{$data.home_sms_user_mobile_binding.name}}" data-validation-message="{{$data.home_sms_user_mobile_binding.error_tips}}" class="am-radius" {{if !empty($data)}}value="{{$data.home_sms_user_mobile_binding.value}}"{{/if}} />
</div>
<div class="am-form-group am-form-group-refreshing">
<div class="am-form-group am-form-group-refreshing am-margin-top-lg am-padding-left-0">
<button type="submit" class="am-btn am-btn-primary am-radius btn-loading-example am-btn-sm am-btn-block" data-am-loading="{loadingText:'处理中...'}">保存</button>
</div>
</form>

View File

@ -13,7 +13,7 @@
<div class="am-form-group">
<textarea rows="6" name="sql" class="am-radius" placeholder="SQL语句" data-validation-message="请填写需要执行的SQL语句" required></textarea>
</div>
<div class="am-form-group am-form-group-refreshing">
<div class="am-form-group am-form-group-refreshing am-margin-top-lg am-padding-left-0">
<button type="submit" class="am-btn am-btn-primary am-radius btn-loading-example am-btn-sm am-btn-block" data-am-loading="{loadingText:'处理中...'}">执行</button>
</div>
</form>

View File

@ -56,7 +56,7 @@
<input name="is_enable" value="1" type="checkbox" data-off-text="否" data-on-text="是" data-size="xs" data-on-color="success" data-off-color="default" data-handle-width="49" data-am-switch {{if isset($data['is_enable']) and $data['is_enable'] eq 1}}checked="true"{{/if}} />
</div>
<div class="am-form-group am-form-group-refreshing">
<div class="am-form-group am-form-group-refreshing am-margin-top-lg am-padding-left-0">
<input type="hidden" name="id" {{if !empty($data)}} value="{{$data.id}}"{{/if}} />
<button type="submit" class="am-btn am-btn-primary am-radius btn-loading-example am-btn-sm am-btn-block" data-am-loading="{loadingText:'处理中...'}">保存</button>
</div>

View File

@ -0,0 +1,42 @@
<?php
// +----------------------------------------------------------------------
// | ShopXO 国内领先企业级B2C免费开源电商系统
// +----------------------------------------------------------------------
// | Copyright (c) 2011~2019 http://shopxo.net All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: Devil
// +----------------------------------------------------------------------
namespace app\api\controller;
use app\service\BaseService;
/**
* 基础公共接口
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2020-09-12
* @desc description
*/
class Base extends Common
{
/**
* 配置信息
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2020-09-12
* @desc description
*/
public function Common()
{
// 参数
$params = $this->data_post;
$params['user'] = $this->user;
$data = BaseService::Common($params);
return DataReturn('success', 0, $data);
}
}
?>

View File

@ -70,7 +70,6 @@ class Buy extends Common
'goods_list' => $buy_goods,
'payment_list' => $payment_list,
'base' => $buy_base,
'common_order_is_booking' => (int) MyC('common_order_is_booking', 0),
'common_site_type' => (int) $buy_base['common_site_type'],
];

View File

@ -48,11 +48,8 @@ class Cart extends Common
{
$ret = BuyService::CartList(['user'=>$this->user]);
$ret['data'] = [
'data' => $ret['data'],
'customer_service_tel' => MyC('common_app_customer_service_tel', null, true),
'common_is_exhibition_mode_btn_text'=> MyC('common_is_exhibition_mode_btn_text', '立即咨询', true),
'common_site_type' => (int) MyC('common_site_type', 0, true),
'common_cart_total' => BuyService::UserCartTotal(['user'=>$this->user]),
'data' => $ret['data'],
'common_cart_total' => BuyService::UserCartTotal(['user'=>$this->user]),
];
return $ret;

View File

@ -118,26 +118,36 @@ class Goods extends Common
// 数据返回
$result = [
'goods' => $goods,
'common_order_is_booking' => (int) MyC('common_order_is_booking'),
'common_app_is_use_mobile_detail' => $is_use_mobile_detail,
'common_app_is_online_service' => (int) MyC('common_app_is_online_service'),
'common_app_is_good_thing' => (int) MyC('common_app_is_good_thing'),
'common_app_is_poster_share' => (int) MyC('common_app_is_poster_share'),
'nav_submit_text' => '立即购买',
'nav_submit_is_disabled' => false,
'common_cart_total' => BuyService::UserCartTotal(['user'=>$this->user]),
'customer_service_tel' => MyC('common_app_customer_service_tel', null, true),
'common_is_goods_detail_show_photo' => MyC('common_is_goods_detail_show_photo', 0, true),
// 站点模式
'common_site_type' => (int) $common_site_type,
'common_is_exhibition_mode_btn_text'=> MyC('common_is_exhibition_mode_btn_text', '立即咨询', true),
'is_goods_site_type_consistent' => $is_goods_site_type_consistent,
];
// 支付宝小程序在线客服
if(APPLICATION_CLIENT_TYPE == 'alipay')
// 是否开启预约
if(MyC('common_order_is_booking') == 1)
{
$result['common_app_mini_alipay_tnt_inst_id'] = MyC('common_app_mini_alipay_tnt_inst_id', null, true);
$result['common_app_mini_alipay_scene'] = MyC('common_app_mini_alipay_scene', null, true);
$result['nav_submit_text'] = '立即预约';
}
// 是否已下架、还有库存
if($goods['is_shelves'] != 1)
{
$result['nav_submit_text'] = '已下架';
$result['nav_submit_is_disabled'] = true;
} else {
if($goods['inventory'] <= 0)
{
$result['nav_submit_text'] = '卖光了';
$result['nav_submit_is_disabled'] = true;
}
}
// 站点模式 - 是否展示型
if($common_site_type == 1)
{
$result['nav_submit_text'] = MyC('common_is_exhibition_mode_btn_text', '立即咨询', true);
}
// 限时秒杀
@ -230,7 +240,7 @@ class Goods extends Common
{
$result = [
'category' => GoodsService::GoodsCategoryAll($this->data_post),
'category_show_level' => MyC('common_show_goods_category_level', 3, true),
//'category_show_level' => MyC('common_show_goods_category_level', 3, true),
];
return DataReturn('success', 0, $result);
}

View File

@ -52,21 +52,9 @@ class Index extends Common
'navigation' => AppHomeNavService::AppHomeNav(),
'banner_list' => BannerService::Banner(),
'data_list' => GoodsService::HomeFloorList(),
'common_shop_notice' => MyC('common_shop_notice', null, true),
'common_app_is_enable_search' => (int) MyC('common_app_is_enable_search', 1),
'common_app_is_enable_answer' => (int) MyC('common_app_is_enable_answer', 1),
'common_app_is_header_nav_fixed' => (int) MyC('common_app_is_header_nav_fixed', 0),
'common_app_is_online_service' => (int) MyC('common_app_is_online_service', 0),
'common_cart_total' => BuyService::UserCartTotal(['user'=>$this->user]),
];
// 支付宝小程序在线客服
if(APPLICATION_CLIENT_TYPE == 'alipay')
{
$result['common_app_mini_alipay_tnt_inst_id'] = MyC('common_app_mini_alipay_tnt_inst_id', null, true);
$result['common_app_mini_alipay_scene'] = MyC('common_app_mini_alipay_scene', null, true);
}
// 限时秒杀
$ret = PluginsService::PluginsControlCall(
'limitedtimediscount', 'index', 'index', 'api');

View File

@ -544,25 +544,25 @@ class User extends Common
'avatar' => $this->user['avatar'],
'nickname' => $this->user['nickname'],
'username' => $this->user['username'],
'customer_service_tel' => MyC('common_app_customer_service_tel', null, true),
'common_user_center_notice' => MyC('common_user_center_notice', null, true),
// 'customer_service_tel' => MyC('common_app_customer_service_tel', null, true),
// 'common_user_center_notice' => MyC('common_user_center_notice', null, true),
// 'common_app_is_online_service' => (int) MyC('common_app_is_online_service', 0),
// 'common_app_is_head_vice_nav' => (int) MyC('common_app_is_head_vice_nav', 0),
'user_order_status' => $user_order_status['data'],
'user_order_count' => $user_order_count,
'user_goods_favor_count' => $user_goods_favor_count,
'user_goods_browse_count' => $user_goods_browse_count,
'common_message_total' => $common_message_total,
'navigation' => AppCenterNavService::AppCenterNav(),
'common_app_is_online_service' => (int) MyC('common_app_is_online_service', 0),
'common_app_is_head_vice_nav' => (int) MyC('common_app_is_head_vice_nav', 0),
'common_cart_total' => BuyService::UserCartTotal(['user'=>$this->user]),
);
// 支付宝小程序在线客服
if(APPLICATION_CLIENT_TYPE == 'alipay')
{
$result['common_app_mini_alipay_tnt_inst_id'] = MyC('common_app_mini_alipay_tnt_inst_id', null, true);
$result['common_app_mini_alipay_scene'] = MyC('common_app_mini_alipay_scene', null, true);
}
// if(APPLICATION_CLIENT_TYPE == 'alipay')
// {
// $result['common_app_mini_alipay_tnt_inst_id'] = MyC('common_app_mini_alipay_tnt_inst_id', null, true);
// $result['common_app_mini_alipay_scene'] = MyC('common_app_mini_alipay_scene', null, true);
// }
// 返回数据
return DataReturn('success', 0, $result);

View File

@ -1267,24 +1267,25 @@ function UrlParamJoin($param)
}
/**
* [MyC 读取站点配置信息]
* @author Devil
* @blog http://gong.gg/
* @version 0.0.1
* @datetime 2016-12-29T17:17:25+0800
* @param [string] $key [索引名称]
* @param [mixed] $default [默认值]
* @param [boolean] $mandatory [是否强制校验值,默认false]
* @return [mixed] [配置信息值,没找到返回null]
* 读取站点配置信息
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2020-09-13
* @desc description
* @param [string] $key [索引名称]
* @param [mixed] $default [默认值]
* @param [boolean] $mandatory [是否强制校验值,默认false]
* @return [mixed] [配置信息值,没找到返回null]
*/
function MyC($key, $default = null, $mandatory = false)
{
$data = cache(config('shopxo.cache_common_my_config_key'));
$data = cache($key);
if($mandatory === true)
{
return empty($data[$key]) ? $default : $data[$key];
return empty($data) ? $default : $data;
}
return isset($data[$key]) ? $data[$key] : $default;
return ($data === null) ? $default : $data;
}
/**

View File

@ -46,7 +46,7 @@ class Agreement extends Common
public function Index()
{
// 参数
$params = input();
$params = $this->data_request;
// 获取协议内容
$data = [];

View File

@ -339,6 +339,9 @@ class Common extends Controller
// 当前url地址
$this->assign('my_url', __MY_URL__);
// 项目public目录URL地址
$this->assign('my_public_url', __MY_PUBLIC_URL__);
// 当前http类型
$this->assign('my_http', __MY_HTTP__);
@ -400,6 +403,12 @@ class Common extends Controller
// 默认不加载百度地图api
$this->assign('is_load_baidu_map_api', 0);
// 存在地图事件则载入
if(in_array(3, array_column($this->nav_quick, 'event_type')))
{
$this->assign('is_load_baidu_map_api', 1);
}
}
/**

View File

@ -41,7 +41,7 @@
<div class="banner-mixed">
<div class="mod-vip">
<div class="m-baseinfo">
<a href="{{if !empty($user)}}{{:MyUrl('index/user/index')}}{{else /}}javascript:;{{/if}}" target="_blank">
<a {{if !empty($user)}}href="{{:MyUrl('index/user/index')}}" target="_blank"{{else /}}href="javascript:;"{{/if}}>
<img src="{{if !empty($user['avatar'])}}{{$user.avatar}}{{else /}}{{$attachment_host}}/static/{{$module_name}}/{{$default_theme}}/images/default-user-avatar.jpg{{/if}}" class="user-avatar" />
</a>
<em>

View File

@ -90,7 +90,7 @@
</p>
{{if !empty($home_site_icp)}}
<p>
<a href="http://www.beian.miit.gov.cn/" target="_blank">
<a href="https://beian.miit.gov.cn/" target="_blank">
<img src="{{$attachment_host}}/static/common/images/beian-icp-icon.png" width="20" height="20" alt="ICP备案" />
{{$home_site_icp}}
</a>

View File

@ -8,11 +8,31 @@
{{foreach $nav_quick as $nav}}
{{if !empty($nav['images_url']) and !empty($nav['name'])}}
<li class="am-text-center am-padding-sm {{if isset($nav['class_name'])}}{{$nav.class_name}}{{/if}}">
<a href="{{if !empty($nav['event_value'])}}{{$nav.event_value}}{{else /}}javascript:;{{/if}}">
<p class="nav-icon" style="{{if !empty($nav['bg_color'])}}background:{{$nav.bg_color}};{{/if}}">
<img src="{{$nav.images_url}}" alt="{{$nav.name}}" />
</p>
<p class="am-margin-top-xs am-text-truncate">{{$nav.name}}</p>
{{if isset($nav['event_type']) and isset($nav['event_value']) and in_array($nav['event_type'], [3,4])}}
{{switch nav.event_type}}
{{case 3}}
<!-- 地图 -->
<a href="javascript:;" {{if !empty($nav['event_value_data']) and !empty($nav['event_value_data'][2]) and !empty($nav['event_value_data'][3])}}class="submit-map-popup" data-lng="{{$nav['event_value_data'][2]}}" data-lat="{{$nav['event_value_data'][3]}}"{{/if}}>
<p class="nav-icon" style="{{if !empty($nav['bg_color'])}}background:{{$nav.bg_color}};{{/if}}">
<img src="{{$nav.images_url}}" alt="{{$nav.name}}" />
</p>
{{/case}}
{{case 4}}
<!-- 电话 -->
<a {{if !empty($nav['event_value'])}}href="tel:{{$nav.event_value}}"{{else /}}href="javascript:;"{{/if}}>
<p class="nav-icon" style="{{if !empty($nav['bg_color'])}}background:{{$nav.bg_color}};{{/if}}">
<img src="{{$nav.images_url}}" alt="{{$nav.name}}" />
</p>
{{/case}}
{{/switch}}
{{else /}}
<!-- 默认url地址 -->
<a {{if !empty($nav['event_value'])}}href="{{$nav.event_value}}"{{else /}}href="javascript:;"{{/if}}>
<p class="nav-icon" style="{{if !empty($nav['bg_color'])}}background:{{$nav.bg_color}};{{/if}}">
<img src="{{$nav.images_url}}" alt="{{$nav.name}}" />
</p>
{{/if}}
<p class="am-margin-top-xs am-text-truncate">{{$nav.name}}</p>
</a>
</li>
{{/if}}

View File

@ -298,7 +298,7 @@ class AppCenterNavService
}
}
// 存储缓存
cache($key, $data, 3600*24);
cache($key, $data, 60);
}
// 手机用户中心导航钩子

View File

@ -295,7 +295,7 @@ class AppHomeNavService
}
// 存储缓存
cache($key, $data, 3600*24);
cache($key, $data, 60);
}
// 手机首页导航钩子

View File

@ -39,7 +39,6 @@ class BannerService
// 缓存
$key = config('shopxo.cache_banner_list_key').$platform;
$data = cache($key);
if(empty($data))
{
// 获取banner数据
@ -70,7 +69,7 @@ class BannerService
}
// 存储缓存
cache($key, $data, 3600*24);
cache($key, $data, 60);
}
return $data;
}

View File

@ -0,0 +1,104 @@
<?php
// +----------------------------------------------------------------------
// | ShopXO 国内领先企业级B2C免费开源电商系统
// +----------------------------------------------------------------------
// | Copyright (c) 2011~2019 http://shopxo.net All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: Devil
// +----------------------------------------------------------------------
namespace app\service;
use think\Db;
use think\facade\Hook;
use app\service\ResourcesService;
use app\service\QuickNavService;
/**
* 基础公共信息服务层
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2020-09-12
* @desc description
*/
class BaseService
{
public static function sss()
{
return MyC('common_timezone', 'Asia/Shanghai', true);
}
/**
* 公共配置信息
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2020-09-12
* @desc description
* @param [array] $params [输入参数]
*/
public static function Common($params = [])
{
// 配置信息
$config = [
// 基础
'common_site_type' => (int) MyC('common_site_type', 0, true),
'common_shop_notice' => MyC('common_shop_notice', null, true),
'common_app_is_enable_search' => (int) MyC('common_app_is_enable_search', 1),
'common_app_is_enable_answer' => (int) MyC('common_app_is_enable_answer', 1),
'common_app_is_header_nav_fixed' => (int) MyC('common_app_is_header_nav_fixed', 0),
'common_app_is_online_service' => (int) MyC('common_app_is_online_service', 0),
'common_app_customer_service_tel' => MyC('common_app_customer_service_tel', null, true),
'common_order_is_booking' => (int) MyC('common_order_is_booking'),
'common_is_exhibition_mode_btn_text'=> MyC('common_is_exhibition_mode_btn_text', '立即咨询', true),
// 用户中心相关
'common_user_center_notice' => MyC('common_user_center_notice', null, true),
'common_app_is_head_vice_nav' => (int) MyC('common_app_is_head_vice_nav', 0),
// 商品分类相关
'category_show_level' => MyC('common_show_goods_category_level', 3, true),
// 商品相关
'common_app_is_use_mobile_detail' => (int) MyC('common_app_is_use_mobile_detail'),
'common_app_is_good_thing' => (int) MyC('common_app_is_good_thing'),
'common_app_is_poster_share' => (int) MyC('common_app_is_poster_share'),
'common_is_goods_detail_show_photo' => (int) MyC('common_is_goods_detail_show_photo', 0, true),
];
// 支付宝小程序在线客服
if(APPLICATION_CLIENT_TYPE == 'alipay')
{
$config['common_app_mini_alipay_tnt_inst_id'] = MyC('common_app_mini_alipay_tnt_inst_id', null, true);
$config['common_app_mini_alipay_scene'] = MyC('common_app_mini_alipay_scene', null, true);
}
// 数据集合
$data = [
// 全局状态值(1接口执行成功,用于前端校验接口请求完成状态,以后再加入其它状态)
'status' => 1,
// 配置信息
'config' => $config,
// 价格符号
'price_symbol' => ResourcesService::CurrencyPriceSymbol(),
// 快捷入口信息
'quick_nav' => QuickNavService::QuickNav(),
];
// 公共配置信息钩子
$hook_name = 'plugins_service_base_commin';
Hook::listen($hook_name, [
'hook_name' => $hook_name,
'is_backend' => true,
'data' => &$data,
'params' => $params,
]);
return $data;
}
}
?>

View File

@ -1402,7 +1402,7 @@ class BuyService
if(in_array(APPLICATION_CLIENT_TYPE, config('shopxo.coordinate_transformation')))
{
// 坐标转换 火星(高德,谷歌,腾讯坐标) 转 百度
if(isset($address['lng']) && isset($address['lat']) && $address['lng'] > 0 && $address['lat'] > 0)
if(isset($address['lng']) && isset($address['lat']))
{
$map = \base\GeoTransUtil::GcjToBd($address['lng'], $address['lat']);
if(isset($map['lng']) && isset($map['lat']))

View File

@ -127,12 +127,15 @@ class ConfigService
$success++;
// 单条配置缓存删除
cache(config('shopxo.cache_config_row_key').$k, null);
cache($k, null);
}
}
if($success > 0)
{
// 配置信息更新
// 删除所有配置的缓存数据
cache(config('shopxo.cache_common_my_config_key'), null);
// 所有配置信息更新
self::ConfigInit(1);
// 是否需要更新路由规则
@ -185,7 +188,7 @@ class ConfigService
{
$key = config('shopxo.cache_common_my_config_key');
$data = cache($key);
if($status == 1 || empty($data))
if(empty($data) || $status == 1)
{
// 所有配置
$data = Db::name('Config')->column('value', 'only_tag');
@ -200,15 +203,20 @@ class ConfigService
}
}
// 富文本字段处理
foreach($data as $k=>$v)
// 数据处理
foreach($data as $k=>&$v)
{
// 富文本字段处理
if(in_array($k, self::$rich_text_list))
{
$data[$k] = ResourcesService::ContentStaticReplace($v, 'get');
$v = ResourcesService::ContentStaticReplace($v, 'get');
}
// 单个缓存
cache($k, $v);
}
// 所有配置缓存集合
cache($key, $data);
}
}
@ -274,22 +282,21 @@ class ConfigService
* @version 1.0.0
* @date 2019-05-16
* @desc description
* @param [string] $only_tag [唯一标记]
* @param [string] $key [唯一标记]
*/
public static function ConfigContentRow($only_tag)
public static function ConfigContentRow($key)
{
// 缓存key
$key = config('shopxo.cache_config_row_key').$only_tag;
$data = cache($key);
// 缓存key,单条新增前缀,与公共配置区分开
$data = cache('config_content_row_'.$key);
// 获取内容
if(empty($data))
{
$data = Db::name('Config')->where(['only_tag'=>$only_tag])->field('name,value,type,upd_time')->find();
$data = Db::name('Config')->where(['only_tag'=>$key])->field('name,value,type,upd_time')->find();
if(!empty($data))
{
// 富文本处理
if(in_array($only_tag, self::$rich_text_list))
if(in_array($key, self::$rich_text_list))
{
$data['value'] = ResourcesService::ContentStaticReplace($data['value'], 'get');
}
@ -335,7 +342,7 @@ class ConfigService
foreach($data as &$v)
{
// 坐标转换 百度转火星(高德,谷歌,腾讯坐标)
if(isset($v['lng']) && isset($v['lat']) && $v['lng'] > 0 && $v['lat'] > 0)
if(isset($v['lng']) && isset($v['lat']))
{
$map = \base\GeoTransUtil::BdToGcj($v['lng'], $v['lat']);
if(isset($map['lng']) && isset($map['lat']))

View File

@ -67,7 +67,7 @@ class GoodsService
$data = self::GoodsCategory($params);
// 存储缓存
cache($key, $data, 3600*24);
cache($key, $data, 60);
}
return $data;
}
@ -236,7 +236,7 @@ class GoodsService
}
// 存储缓存
cache($key, $data, 3600*24);
cache($key, $data, 60);
}
// 商品读取、商品不缓存、商品价格会根据用户等级可能会不一样

View File

@ -1322,7 +1322,7 @@ class OrderService
if(!empty($data) && is_array($data) && in_array(APPLICATION_CLIENT_TYPE, config('shopxo.coordinate_transformation')))
{
// 坐标转换 百度转火星(高德,谷歌,腾讯坐标)
if(isset($data['lng']) && isset($data['lat']) && $data['lng'] > 0 && $data['lat'] > 0)
if(isset($data['lng']) && isset($data['lat']))
{
$map = \base\GeoTransUtil::BdToGcj($data['lng'], $data['lat']);
if(isset($map['lng']) && isset($map['lat']))

View File

@ -287,18 +287,32 @@ class QuickNavService
{
foreach($data as &$v)
{
// 图片地址
$v['images_url_old'] = $v['images_url'];
$v['images_url'] = ResourcesService::AttachmentPathViewHandle($v['images_url']);
$v['event_value'] = empty($v['event_value']) ? null : $v['event_value'];
// 事件值
if(!empty($v['event_value']))
{
// 地图
if($v['event_type'] == 3)
{
$v['event_value_data'] = explode('|', $v['event_value']);
}
$v['event_value'] = $v['event_value'];
} else {
$v['event_value'] = null;
}
}
}
// 存储缓存
cache($key, $data, 3600*24);
cache($key, $data, 60);
}
// 快捷导航钩子
// 数据参数可以自定义新增 class_name 名称、方便非url事件使用js控制点击事件
// web端数据参数可以自定义新增 class_name 名称、方便非url事件使用js控制点击事件
$hook_name = 'plugins_service_quick_navigation_'.$platform;
Hook::listen($hook_name, [
'hook_name' => $hook_name,

View File

@ -422,7 +422,7 @@ class UserService
if(in_array(APPLICATION_CLIENT_TYPE, config('shopxo.coordinate_transformation')))
{
// 坐标转换 百度转火星(高德,谷歌,腾讯坐标)
if(isset($v['lng']) && isset($v['lat']) && $v['lng'] > 0 && $v['lat'] > 0)
if(isset($v['lng']) && isset($v['lat']))
{
$map = \base\GeoTransUtil::BdToGcj($v['lng'], $v['lat']);
if(isset($map['lng']) && isset($map['lat']))

View File

@ -13,6 +13,19 @@
// | 应用设置
// +----------------------------------------------------------------------
// cdn地址
$cdn_attachment_host = MyC('common_cdn_attachment_host', __MY_PUBLIC_URL__, true);
$cdn_public_host = MyC('common_cdn_public_host', __MY_PUBLIC_URL__, true);
if(substr($cdn_attachment_host, -1) == DS)
{
$cdn_attachment_host = substr($cdn_attachment_host, 0, -1);
}
if(substr($cdn_public_host, -1) != DS)
{
$cdn_public_host .= DS;
}
// 配置信息
return [
// 开发模式
'is_develop' => false,
@ -42,9 +55,6 @@ return [
// 用户密码找回左侧数据
'cache_user_forgetpwd_left_key' => 'cache_user_forgetpwd_left_data',
// 配置信息一条缓存 拼接唯一标记 [ only_tag ]
'cache_config_row_key' => 'cache_config_row_data_',
// 用户缓存信息
'cache_user_info' => 'cache_user_info_',
@ -64,10 +74,10 @@ return [
'cache_quick_navigation_key' => 'cache_quick_navigation_data_',
// 附件host、最后不要带/斜杠结尾, 数据库图片地址以/static/...开头
'attachment_host' => defined('__MY_PUBLIC_URL__') ? substr(__MY_PUBLIC_URL__, 0, -1) : '',
'attachment_host' => $cdn_attachment_host,
// css/js引入host地址
'public_host' => __MY_PUBLIC_URL__,
// css/js引入host地址、以/斜杠结尾
'public_host' => $cdn_public_host,
// 应用商店地址
'store_url' => 'https://store.shopxo.net/',

View File

@ -165,7 +165,7 @@ iframe { border: 0; }
form.am-form .am-form-group-refreshing:hover { background: none; }
/* 弹窗 */
.am-popup .am-form-group, .am-modal form.am-form .am-form-group, .business-form-block { padding: 10px 5px !important; }
.am-popup form.am-form .am-form-group, .am-modal form.am-form .am-form-group, .business-form-block { padding: 10px 5px; }
/* 地址联动 */
.region-linkage select { width: 33%; display: -webkit-inline-box; }

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

@ -23,5 +23,5 @@
<!-- 新增入口 -->
<navigator url="/pages/answer-form/answer-form" hover-class="none">
<view class="answer-add-submit bg-white bg-main r-fff tc">+</view>
<view class="answer-add-submit bg-main cr-fff tc">+</view>
</navigator>

View File

@ -23,5 +23,5 @@
<!-- 新增入口 -->
<navigator url="/pages/answer-form/answer-form" hover-class="none">
<view class="answer-add-submit bg-white bg-main r-fff tc">+</view>
<view class="answer-add-submit bg-main cr-fff tc">+</view>
</navigator>

View File

@ -23,5 +23,5 @@
<!-- -->
<navigator url="/pages/answer-form/answer-form" hover-class="none">
<view class="answer-add-submit bg-white bg-main r-fff tc">+</view>
<view class="answer-add-submit bg-main cr-fff tc">+</view>
</navigator>

View File

@ -23,5 +23,5 @@
<!-- 新增入口 -->
<navigator url="/pages/answer-form/answer-form" hover-class="none">
<view class="answer-add-submit bg-white bg-main r-fff tc">+</view>
<view class="answer-add-submit bg-main cr-fff tc">+</view>
</navigator>

View File

@ -1,5 +1,8 @@
App({
data: {
// 配置信息缓存key
cache_config_info_key: "cache_config_info_key",
// 用户登录缓存key
cache_user_login_key: "cache_user_login_key",
@ -59,21 +62,19 @@ App({
"user_orderaftersale": "退款/售后",
"user_orderaftersale_detail": "订单售后",
"user_order_comments": "订单评论",
"coupon": "领劵中心",
"user_coupon": "优惠劵",
"extraction_address": "自提地址",
},
// 请求地址
request_url: "{{request_url}}",
request_url: 'http://shopxo.com/',
request_url: 'https://dev.shopxo.net/',
// request_url: 'https://dev.shopxo.net/',
// 基础信息
application_title: "{{application_title}}",
application_describe: "{{application_describe}}",
// 价格符号
// 默认价格符号
price_symbol: "{{price_symbol}}",
price_symbol: "¥"
},
@ -93,8 +94,18 @@ App({
key: this.data.cache_launch_info_key,
data: options
});
// 初始化配置
this.init_config();
},
sleep(delay) {
var start = (new Date()).getTime();
while((new Date()).getTime() - start < delay) {
continue;
}
},
/**
* 启动参数处理
*/
@ -705,4 +716,89 @@ App({
});
},
/**
* 获取配置信息可指定默认值
* key 数据key支持多级读取 . 分割key名称
* default_value 默认值
*/
get_config(key, default_value) {
var value = null;
let config = wx.getStorageSync(this.data.cache_config_info_key) || null;
if(config != null)
{
// 数据读取
var arr = key.split('.');
if(arr.length == 1)
{
value = config[key] == undefined ? null : config[key];
} else {
value = config;
for(var i in arr)
{
if(value[arr[i]] != undefined)
{
value = value[arr[i]];
} else {
value = null;
break;
}
}
}
}
return (value === null) ? ((default_value === undefined) ? value : default_value) : value;
},
// 初始化 配置信息
init_config() {
var self = this;
wx.request({
url: this.get_request_url('common', 'base'),
method: 'POST',
data: {},
dataType: 'json',
header: { 'content-type': 'application/x-www-form-urlencoded' },
success: (res) => {
if (res.data.code == 0) {
wx.setStorage({
key: this.data.cache_config_info_key,
data: res.data.data,
fail: () => {
this.showToast('配置信息缓存失败');
}
});
} else {
this.showToast(res.data.msg);
}
},
fail: () => {
this.showToast('服务器请求出错');
},
});
},
/**
* 配置是否有效(100毫秒检验一次最多检验100次)
* object 回调操作对象
* method 回调操作对象的函数
*/
is_config(object, method) {
var self = this;
var count = 0;
var timer = setInterval(function()
{
if(self.get_config('status') == 1)
{
clearInterval(timer);
if (typeof object === 'object' && (method || null) != null) {
object[method](true);
}
}
count++;
if(count >= 100)
{
clearInterval(timer);
}
}, 100);
},
});

View File

@ -0,0 +1,24 @@
const app = getApp();
Component({
data: {
popup_status: false,
data: [],
},
methods: {
// 弹层开启
quick_open_event(e) {
var data = app.get_config('quick_nav') || [];
this.setData({ popup_status: true, data: data });
},
// 弹层关闭
quick_close_event(e) {
this.setData({ popup_status: false });
},
// 操作事件
navigation_event(e) {
app.operation_event(e);
},
},
});

View File

@ -0,0 +1,6 @@
{
"component": true,
"usingComponents": {
"component-popup": "/components/popup/popup"
}
}

View File

@ -0,0 +1,29 @@
<!-- 开启事件 -->
<view class="quick-event-submit" bindtap="quick_open_event">
<image src="/images/quick-submit-icon.png" mode="widthFix"></image>
</view>
<!-- 弹窗 -->
<component-popup prop-show="{{popup_status}}" prop-position="bottom" bindonclose="quick_close_event">
<view class="popup-container">
<view class="close oh">
<view class="icon-right" catchtap="quick_close_event">
<icon type="clear" size="20" />
</view>
</view>
<view class="popup-content">
<view wx:if="{{data.length > 0}}" class="data-list">
<view class="items" wx:for="{{data}}" wx:key="key">
<view class="items-content" data-value="{{item.event_value}}" data-type="{{item.event_type}}" bindtap="navigation_event" style="background-color:{{item.bg_color}}">
<image src="{{item.images_url}}" mode="aspectFit" />
</view>
<view class="title">{{item.name}}</view>
</view>
</view>
<view wx:else>
<import src="/pages/common/nodata.wxml" />
<template is="nodata" data="{{status: 0}}"></template>
</view>
</view>
</view>
</component-popup>

View File

@ -0,0 +1,88 @@
/**
* 弹窗
*/
.quick-event-submit {
position: fixed;
bottom: 60rpx;
left: 20rpx;
width: 100rpx;
height: 100rpx;
border-radius: 50%;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
background-color: #d2364c;
}
.quick-event-submit image {
width: 50rpx;
height: 50rpx;
margin: 25rpx auto 25rpx auto;
display: block;
}
.popup-container {
padding: 20rpx 10rpx 0 10rpx;
background: #fff;
}
.popup-container .close {
overflow: hidden;
}
.popup-container .close .icon-right {
float: right;
}
.popup-content {
max-height: 80vh;
overflow-y: scroll;
overflow-x: hidden;
padding-bottom: 20rpx;
}
/**
* 内容
*/
.data-list {
overflow: hidden;
background: #fff;
}
.data-list .items {
width: calc(25% - 60rpx);
float: left;
padding: 30rpx;
}
.items-content {
border-radius: 50%;
padding: 20rpx;
text-align: center;
width: 70rpx;
height: 70rpx;
margin: 0 auto;
}
.data-list .items image {
width: 60rpx !important;
height: 60rpx !important;
margin-top: 5rpx;
}
.data-list .items .title {
margin-top: 10rpx;
font-size: 32rpx;
text-align:center;
-o-text-overflow: ellipsis;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
max-width: 100%;
}
/*
* 没有数据
*/
.no-data-box {
padding: 80rpx 0;
text-align: center;
}
.no-data-box image {
width: 160rpx;
margin-bottom: 30rpx;
}
.no-data-box .no-data-tips {
font-size: 28rpx;
color: #a6a6a6;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

@ -1,7 +1,6 @@
const app = getApp();
Page({
data: {
price_symbol: app.data.price_symbol,
data_list_loding_status: 1,
buy_submit_disabled_status: false,
data_list_loding_msg: '',
@ -15,7 +14,6 @@ Page({
is_first: 1,
extension_data: [],
payment_id: 0,
common_order_is_booking: 0,
common_site_type: 0,
extraction_address: [],
site_model: 0,
@ -24,6 +22,10 @@ Page({
{ name: "自提点取货", value: 2 }
],
// 基础配置
price_symbol: app.data.price_symbol,
common_order_is_booking: 0,
// 优惠劵
plugins_coupon_data: null,
plugins_use_coupon_ids: [],
@ -43,11 +45,27 @@ Page({
},
onShow() {
// 数据加载
this.init();
this.setData({ is_first: 0 });
// 初始化配置
this.init_config();
},
// 获取数据列表
// 初始化配置
init_config(status) {
if((status || false) == true) {
this.setData({
price_symbol: app.get_config('price_symbol'),
common_order_is_booking: app.get_config('config.common_order_is_booking'),
});
} else {
app.is_config(this, 'init_config');
}
},
// 获取数据
init() {
// 订单参数信息是否正确
if (this.data.params == null) {
@ -101,7 +119,6 @@ Page({
total_price: data.base.actual_price,
extension_data: data.extension_data || [],
data_list_loding_status: 3,
common_order_is_booking: data.common_order_is_booking || 0,
common_site_type: data.common_site_type || 0,
extraction_address: data.base.extraction_address || [],
plugins_coupon_data: data.plugins_coupon_data || null,

View File

@ -1,7 +1,6 @@
const app = getApp();
Page({
data: {
price_symbol: app.data.price_symbol,
data_list_loding_status: 1,
data_list_loding_msg: '',
data_bottom_line_status: false,
@ -11,17 +10,38 @@ Page({
is_selected_all: false,
buy_submit_disabled_status: true,
// 站点模式
// 基础配置
price_symbol: app.data.price_symbol,
common_site_type: 0,
common_is_exhibition_mode_btn_text: null,
customer_service_tel: null,
common_app_customer_service_tel: null,
},
onShow() {
wx.setNavigationBarTitle({ title: app.data.common_pages_title.cart });
// 数据加载
this.init();
// 初始化配置
this.init_config();
},
// 初始化配置
init_config(status) {
if((status || false) == true) {
this.setData({
price_symbol: app.get_config('price_symbol'),
common_site_type: app.get_config('config.common_site_type'),
common_is_exhibition_mode_btn_text: app.get_config('config.common_is_exhibition_mode_btn_text', '立即咨询'),
common_app_customer_service_tel: app.get_config('config.common_app_customer_service_tel'),
});
} else {
app.is_config(this, 'init_config');
}
},
// 获取数据
init(e) {
var user = app.get_user_info(this, "init");
if (user != false) {
@ -84,11 +104,6 @@ Page({
data_list_loding_status: data.data.length == 0 ? 0 : 3,
data_bottom_line_status: true,
data_list_loding_msg: '购物车空空如也',
// 站点模式
common_site_type: data.common_site_type || 0,
common_is_exhibition_mode_btn_text: data.common_is_exhibition_mode_btn_text || '立即咨询',
customer_service_tel: data.customer_service_tel || null,
});
// 导航购物车处理
@ -384,7 +399,7 @@ Page({
// 展示型事件
exhibition_submit_event(e) {
app.call_tel(this.data.customer_service_tel);
app.call_tel(this.data.common_app_customer_service_tel);
},
});

View File

@ -4,18 +4,36 @@ Page({
data_list_loding_status: 1,
nav_active_index: 0,
data_list: [],
category_show_level: 3,
data_content: null,
// 基础配置
category_show_level: 3,
},
onShow() {
wx.setNavigationBarTitle({title: app.data.common_pages_title.goods_category});
// 数据加载
this.init();
// 初始化配置
this.init_config();
// 显示分享菜单
app.show_share_menu();
},
// 初始化配置
init_config(status) {
if((status || false) == true) {
this.setData({
category_show_level: app.get_config('config.category_show_level'),
});
} else {
app.is_config(this, 'init_config');
}
},
// 获取数据
init() {
// 加载loding
@ -43,7 +61,6 @@ Page({
}
this.setData({
data_list: category,
category_show_level: res.data.data.category_show_level || 3,
data_content: data_content,
data_list_loding_status: category.length == 0 ? 0 : 3,
data_bottom_line_status: true,

View File

@ -1,8 +1,6 @@
const app = getApp();
Page({
data: {
price_symbol: app.data.price_symbol,
indicator_dots: false,
indicator_color: 'rgba(0, 0, 0, .3)',
indicator_active_color: '#e31c55',
@ -17,7 +15,6 @@ Page({
goods_photo: [],
goods_specifications_choose: [],
goods_content_app: [],
popup_status: false,
goods_favor_text: '收藏',
goods_favor_icon: '/images/goods-detail-favor-icon-0.png',
@ -25,6 +22,8 @@ Page({
buy_event_type: 'buy',
nav_submit_text: '立即购买',
nav_submit_is_disabled: true,
common_site_type: 0,
is_goods_site_type_consistent: 0,
goods_spec_base_price: 0,
goods_spec_base_original_price: 0,
@ -32,24 +31,22 @@ Page({
goods_spec_base_images: '',
show_field_price_text: null,
goods_video_is_autoplay: false,
common_app_is_use_mobile_detail: 1,
common_is_goods_detail_show_photo: 0,
popup_share_status: false,
common_app_is_online_service: 0,
// 限时秒杀插件
plugins_limitedtimediscount_is_valid: 0,
plugins_limitedtimediscount_data: null,
plugins_limitedtimediscount_is_show_time: true,
plugins_limitedtimediscount_time_millisecond: 0,
plugins_limitedtimediscount_timer: null,
plugins_limitedtimediscount_timers: null,
// 购物车快捷导航
quick_nav_cart_count: 0,
// 基础配置
price_symbol: app.data.price_symbol,
common_app_is_poster_share: 0,
common_app_is_good_thing : 0,
common_app_is_online_service: 0,
common_app_is_use_mobile_detail: 0,
common_is_goods_detail_show_photo: 0,
common_app_customer_service_tel: null,
// 好物圈分享信息
common_app_is_good_thing : 0,
share_product: {
"item_code": "",
"title": "",
@ -60,21 +57,16 @@ Page({
"brand_info": {},
},
// 海报分享
common_app_is_poster_share: 0,
// 限时秒杀插件
plugins_limitedtimediscount_is_valid: 0,
plugins_limitedtimediscount_data: null,
plugins_limitedtimediscount_is_show_time: true,
plugins_limitedtimediscount_time_millisecond: 0,
plugins_limitedtimediscount_timer: null,
plugins_limitedtimediscount_timers: null,
// 优惠劵
plugins_coupon_data: null,
// 购物车快捷导航
quick_nav_cart_count: 0,
// 站点模式
common_site_type: 0,
is_goods_site_type_consistent: 0,
customer_service_tel: null,
// 优惠劵领取
temp_coupon_receive_index: null,
temp_coupon_receive_value: null,
},
@ -86,17 +78,39 @@ Page({
// 参数赋值,初始化
//params['goods_id']=12;
this.setData({params: params});
},
onShow() {
wx.setNavigationBarTitle({title: (this.data.goods == null) ? app.data.common_pages_title.goods_detail : this.data.goods.title});
// 数据加载
this.init();
// 初始化配置
this.init_config();
// 显示分享菜单
app.show_share_menu();
},
onShow() {
wx.setNavigationBarTitle({title: (this.data.goods == null) ? app.data.common_pages_title.goods_detail : this.data.goods.title});
// 初始化配置
init_config(status) {
if((status || false) == true) {
this.setData({
price_symbol: app.get_config('price_symbol'),
common_app_is_use_mobile_detail: app.get_config('config.common_app_is_use_mobile_detail'),
common_is_goods_detail_show_photo: app.get_config('config.common_is_goods_detail_show_photo'),
common_app_is_online_service: app.get_config('config.common_app_is_online_service'),
common_app_is_good_thing: app.get_config('config.common_app_is_good_thing'),
common_app_is_poster_share: app.get_config('config.common_app_is_poster_share'),
common_app_customer_service_tel: app.get_config('config.common_app_customer_service_tel'),
});
} else {
app.is_config(this, 'init_config');
}
},
// 获取数据列表
// 获取数据
init() {
// 参数校验
if((this.data.params.goods_id || null) == null)
@ -128,6 +142,8 @@ Page({
if (res.data.code == 0) {
var data = res.data.data;
self.setData({
data_bottom_line_status: true,
data_list_loding_status: 3,
goods: data.goods,
indicator_dots: (data.goods.photo.length > 1),
autoplay: (data.goods.photo.length > 1),
@ -137,23 +153,18 @@ Page({
temp_buy_number: data.goods.buy_min_number || 1,
goods_favor_text: (data.goods.is_favor == 1) ? '已收藏' : '收藏',
goods_favor_icon: '/images/goods-detail-favor-icon-' + data.goods.is_favor+'.png',
data_bottom_line_status: true,
data_list_loding_status: 3,
nav_submit_text: data.nav_submit_text,
nav_submit_is_disabled: data.nav_submit_is_disabled,
common_site_type: data.common_site_type || 0,
is_goods_site_type_consistent: data.is_goods_site_type_consistent || 0,
goods_spec_base_price: data.goods.price,
goods_spec_base_original_price: data.goods.original_price,
goods_spec_base_inventory: data.goods.inventory,
goods_spec_base_images: data.goods.images,
show_field_price_text: (data.goods.show_field_price_text == '销售价') ? null : (data.goods.show_field_price_text.replace(/<[^>]+>/g, "") || null),
common_app_is_use_mobile_detail: data.common_app_is_use_mobile_detail || 0,
common_is_goods_detail_show_photo: data.common_is_goods_detail_show_photo || 0,
common_app_is_online_service: data.common_app_is_online_service || 0,
plugins_limitedtimediscount_data: data.plugins_limitedtimediscount_data || null,
plugins_limitedtimediscount_is_valid: ((data.plugins_limitedtimediscount_data || null) != null && (data.plugins_limitedtimediscount_data.is_valid || 0) == 1) ? 1 : 0,
common_app_is_good_thing: data.common_app_is_good_thing || 0,
'share_product.item_code': data.goods.id.toString(),
'share_product.title': data.goods.title,
'share_product.image_list': data.goods.photo.map(function (v) { return v.images;}),
@ -162,7 +173,9 @@ Page({
'share_product.src_mini_program_path': '/pages/goods-detail/goods-detail?goods_id='+data.goods.id,
'share_product.brand_info.name': data.goods.brand_name,
common_app_is_poster_share: data.common_app_is_poster_share || 0,
plugins_limitedtimediscount_data: data.plugins_limitedtimediscount_data || null,
plugins_limitedtimediscount_is_valid: ((data.plugins_limitedtimediscount_data || null) != null && (data.plugins_limitedtimediscount_data.is_valid || 0) == 1) ? 1 : 0,
plugins_coupon_data: data.plugins_coupon_data || null,
quick_nav_cart_count: data.common_cart_total || 0,
});
@ -178,34 +191,6 @@ Page({
// 不能选择规格处理
this.goods_specifications_choose_handle_dont(0);
// 购买按钮处理
var nav_submit_text = ((data.common_order_is_booking || 0) == 0) ? '立即购买' : '立即预约';
var nav_submit_is_disabled = (data.goods.is_shelves == 1 && data.goods.inventory > 0) ? false : true;
if (data.goods.is_shelves != 1) {
nav_submit_text = '已下架';
nav_submit_is_disabled = true;
} else {
if(data.goods.inventory <= 0) {
nav_submit_text = '卖光了';
nav_submit_is_disabled = true;
}
}
// 站点模式 - 是否展示型
var common_site_type = data.common_site_type || 0;
if (common_site_type == 1) {
nav_submit_text = data.common_is_exhibition_mode_btn_text || '立即咨询';
}
// 数据赋值
this.setData({
nav_submit_text: nav_submit_text,
nav_submit_is_disabled: nav_submit_is_disabled,
common_site_type: common_site_type,
is_goods_site_type_consistent: data.is_goods_site_type_consistent || 0,
customer_service_tel: data.customer_service_tel || null,
});
} else {
self.setData({
data_bottom_line_status: false,
@ -882,7 +867,7 @@ Page({
// 展示型事件
exhibition_submit_event(e) {
app.call_tel(this.data.customer_service_tel);
app.call_tel(this.data.common_app_customer_service_tel);
},
// 自定义分享

View File

@ -1,7 +1,6 @@
const app = getApp();
Page({
data: {
price_symbol: app.data.price_symbol,
data_list_loding_status: 1,
data_bottom_line_status: false,
data_list: [],
@ -18,11 +17,15 @@ Page({
{ name: "价格", field: "min_price", sort: "asc", "icon": "default" },
{ name: "最新", field: "id", sort: "asc", "icon": "default" }
],
// 基础配置
price_symbol: app.data.price_symbol,
},
onLoad(params) {
this.setData({params: params, post_data: params});
this.init();
// 启动参数处理
params = app.launch_params_handle(params);
this.setData({params: params});
// 显示分享菜单
app.show_share_menu();
@ -30,9 +33,26 @@ Page({
onShow() {
wx.setNavigationBarTitle({title: app.data.common_pages_title.goods_search});
// 数据加载
this.init();
// 初始化配置
this.init_config();
},
// 初始化
// 初始化配置
init_config(status) {
if((status || false) == true) {
this.setData({
price_symbol: app.get_config('price_symbol'),
});
} else {
app.is_config(this, 'init_config');
}
},
// 获取数据
init() {
// 获取数据
this.get_data_list();

View File

@ -1,16 +1,18 @@
const app = getApp();
Page({
data: {
price_symbol: app.data.price_symbol,
load_status: 0,
data_list_loding_status: 1,
data_bottom_line_status: false,
data_list: [],
banner_list: [],
navigation: [],
// 基础配置
price_symbol: app.data.price_symbol,
common_shop_notice: null,
common_app_is_enable_search: 1,
common_app_is_enable_answer: 1,
common_app_is_enable_search: 0,
common_app_is_enable_answer: 0,
common_app_is_header_nav_fixed: 0,
common_app_is_online_service: 0,
@ -23,13 +25,33 @@ Page({
},
onShow() {
// 数据加载
this.init();
// 初始化配置
this.init_config();
// 显示分享菜单
app.show_share_menu();
},
// 获取数据列表
// 初始化配置
init_config(status) {
if((status || false) == true) {
this.setData({
price_symbol: app.get_config('price_symbol'),
common_shop_notice: app.get_config('config.common_shop_notice'),
common_app_is_enable_search: app.get_config('config.common_app_is_enable_search'),
common_app_is_enable_answer: app.get_config('config.common_app_is_enable_answer'),
common_app_is_header_nav_fixed: app.get_config('config.common_app_is_header_nav_fixed'),
common_app_is_online_service: app.get_config('config.common_app_is_online_service'),
});
} else {
app.is_config(this, 'init_config');
}
},
// 获取数据
init() {
var self = this;
@ -55,12 +77,7 @@ Page({
banner_list: data.banner_list || [],
navigation: data.navigation || [],
data_list: data.data_list,
common_shop_notice: data.common_shop_notice || null,
common_app_is_enable_search: data.common_app_is_enable_search,
common_app_is_enable_answer: data.common_app_is_enable_answer,
common_app_is_header_nav_fixed: data.common_app_is_header_nav_fixed,
data_list_loding_status: data.data_list.length == 0 ? 0 : 3,
common_app_is_online_service: data.common_app_is_online_service || 0,
plugins_limitedtimediscount_data: data.plugins_limitedtimediscount_data || null,
plugins_limitedtimediscount_is_valid: ((data.plugins_limitedtimediscount_data || null) != null && (data.plugins_limitedtimediscount_data.is_valid || 0) == 1) ? 1 : 0,
});

View File

@ -5,6 +5,7 @@
"backgroundColorBottom": "#f5f5f5",
"backgroundTextStyle": "light",
"usingComponents": {
"component-quick-nav": "/components/quick-nav/quick-nav",
"component-icon-nav": "/components/icon-nav/icon-nav",
"component-banner": "/components/slider/slider"
}

View File

@ -8,7 +8,7 @@
</view>
<!-- 商城公告 -->
<view wx:if="{{common_shop_notice != null}}">
<view wx:if="{{(common_shop_notice || null) != null}}">
<view class="tips">{{common_shop_notice}}</view>
</view>
@ -81,6 +81,9 @@
<template is="online_service"></template>
</view>
<!-- 快捷导航 -->
<component-quick-nav></component-quick-nav>
<view wx:if="{{load_status == 1}}">
<import src="/pages/common/copyright.wxml" />
<template is="copyright"></template>

View File

@ -1,7 +1,6 @@
const app = getApp();
Page({
data: {
price_symbol: app.data.price_symbol,
data_bottom_line_status: false,
data_list_loding_status: 1,
data_list_loding_msg: '',
@ -11,21 +10,37 @@ Page({
// 优惠劵领取
temp_coupon_receive_index: null,
temp_coupon_receive_value: null,
// 基础配置
price_symbol: app.data.price_symbol,
},
onLoad(params) {
this.init();
// 显示分享菜单
app.show_share_menu();
},
onShow() {
wx.setNavigationBarTitle({ title: app.data.common_pages_title.coupon });
// 数据加载
this.init();
// 初始化配置
this.init_config();
},
// 初始化配置
init_config(status) {
if((status || false) == true) {
this.setData({
price_symbol: app.get_config('price_symbol'),
});
} else {
app.is_config(this, 'init_config');
}
},
// 获取数据
init() {
// 获取数据
this.get_data_list();
},

View File

@ -1,3 +1,4 @@
{
"enablePullDownRefresh": true
"enablePullDownRefresh": true,
"navigationBarTitleText": "领劵中心"
}

View File

@ -1,7 +1,6 @@
const app = getApp();
Page({
data: {
price_symbol: app.data.price_symbol,
data_bottom_line_status: false,
data_list_loding_status: 1,
data_list_loding_msg: '',
@ -13,16 +12,31 @@ Page({
{ name: "已过期", value: "already_expire" },
],
nav_tabs_value: 'not_use',
// 基础配置
price_symbol: app.data.price_symbol,
},
onLoad(params) {
onShow() {
// 数据加载
this.init();
// 初始化配置
this.init_config();
},
onShow() {
wx.setNavigationBarTitle({ title: app.data.common_pages_title.user_coupon });
// 初始化配置
init_config(status) {
if((status || false) == true) {
this.setData({
price_symbol: app.get_config('price_symbol'),
});
} else {
app.is_config(this, 'init_config');
}
},
// 获取数据
init() {
var user = app.get_user_info(this, "init");
if (user != false) {

View File

@ -1,3 +1,4 @@
{
"enablePullDownRefresh": true
"enablePullDownRefresh": true,
"navigationBarTitleText": "优惠劵"
}

View File

@ -25,7 +25,6 @@ function init_user_chart(canvas, width, height) {
Page({
data: {
price_symbol: app.data.price_symbol,
data_list_loding_status: 1,
data_list_loding_msg: '加载中...',
data_bottom_line_status: false,
@ -45,12 +44,31 @@ Page({
user_chart: {
onInit: init_user_chart,
},
},
onShow() {
this.init();
// 基础配置
price_symbol: app.data.price_symbol,
},
onShow() {
// 数据加载
this.init();
// 初始化配置
this.init_config();
},
// 初始化配置
init_config(status) {
if((status || false) == true) {
this.setData({
price_symbol: app.get_config('price_symbol'),
});
} else {
app.is_config(this, 'init_config');
}
},
// 获取数据
init() {
var self = this;
wx.showLoading({ title: "加载中..." });

View File

@ -25,7 +25,6 @@ function init_user_chart(canvas, width, height) {
Page({
data: {
price_symbol: app.data.price_symbol,
data_list_loding_status: 1,
data_list_loding_msg: '加载中...',
data_bottom_line_status: false,
@ -44,12 +43,31 @@ Page({
user_chart: {
onInit: init_user_chart,
},
// 基础配置
price_symbol: app.data.price_symbol,
},
onShow() {
onShow() {
// 数据加载
this.init();
// 初始化配置
this.init_config();
},
// 初始化配置
init_config(status) {
if((status || false) == true) {
this.setData({
price_symbol: app.get_config('price_symbol'),
});
} else {
app.is_config(this, 'init_config');
}
},
// 获取数据
init() {
var self = this;
wx.showLoading({ title: "加载中..." });

View File

@ -23,5 +23,5 @@
<!-- 新增入口 -->
<navigator url="/pages/answer-form/answer-form" hover-class="none">
<view class="answer-add-submit bg-white bg-main r-fff tc">+</view>
<view class="answer-add-submit bg-main cr-fff tc">+</view>
</navigator>

View File

@ -1,19 +1,38 @@
const app = getApp();
Page({
data: {
price_symbol: app.data.price_symbol,
data_list: [],
data_page_total: 0,
data_page: 1,
data_list_loding_status: 1,
data_bottom_line_status: false,
// 基础配置
price_symbol: app.data.price_symbol,
},
onShow() {
wx.setNavigationBarTitle({title: app.data.common_pages_title.user_favor});
// 数据加载
this.init();
// 初始化配置
this.init_config();
},
// 初始化配置
init_config(status) {
if((status || false) == true) {
this.setData({
price_symbol: app.get_config('price_symbol'),
});
} else {
app.is_config(this, 'init_config');
}
},
// 获取数据
init() {
var user = app.get_user_info(this, "init");
if (user != false) {

View File

@ -1,19 +1,38 @@
const app = getApp();
Page({
data: {
price_symbol: app.data.price_symbol,
data_list: [],
data_page_total: 0,
data_page: 1,
data_list_loding_status: 1,
data_bottom_line_status: false,
// 基础配置
price_symbol: app.data.price_symbol,
},
onShow() {
wx.setNavigationBarTitle({ title: app.data.common_pages_title.user_goods_browse });
// 数据加载
this.init();
// 初始化配置
this.init_config();
},
// 初始化配置
init_config(status) {
if((status || false) == true) {
this.setData({
price_symbol: app.get_config('price_symbol'),
});
} else {
app.is_config(this, 'init_config');
}
},
// 获取数据
init() {
var user = app.get_user_info(this, "init");
if (user != false) {

View File

@ -1,7 +1,6 @@
const app = getApp();
Page({
data: {
price_symbol: app.data.price_symbol,
params: null,
data_list_loding_status: 1,
data_list_loding_msg: '',
@ -11,18 +10,38 @@ Page({
detail_list: [],
extension_data: [],
site_fictitious: null,
// 基础配置
price_symbol: app.data.price_symbol,
},
onLoad(params) {
//params['id'] = 5;
this.setData({params: params});
this.init();
},
onShow() {
wx.setNavigationBarTitle({title: app.data.common_pages_title.user_order_detail});
// 数据加载
this.init();
// 初始化配置
this.init_config();
},
// 初始化配置
init_config(status) {
if((status || false) == true) {
this.setData({
price_symbol: app.get_config('price_symbol'),
});
} else {
app.is_config(this, 'init_config');
}
},
// 获取数据
init() {
var self = this;
wx.showLoading({title: "加载中..." });

View File

@ -1,7 +1,6 @@
const app = getApp();
Page({
data: {
price_symbol: app.data.price_symbol,
data_list: [],
data_page_total: 0,
data_page: 1,
@ -24,6 +23,9 @@ Page({
],
nav_status_index: 0,
order_select_ids: [],
// 基础配置
price_symbol: app.data.price_symbol,
},
onLoad(params) {
@ -42,13 +44,30 @@ Page({
params: params,
nav_status_index: nav_status_index,
});
this.init();
},
onShow() {
wx.setNavigationBarTitle({title: app.data.common_pages_title.user_order});
// 数据加载
this.init();
// 初始化配置
this.init_config();
},
// 初始化配置
init_config(status) {
if((status || false) == true) {
this.setData({
price_symbol: app.get_config('price_symbol'),
});
} else {
app.is_config(this, 'init_config');
}
},
// 获取数据
init() {
var user = app.get_user_info(this, 'init');
if (user != false) {

View File

@ -1,7 +1,6 @@
const app = getApp();
Page({
data: {
price_symbol: app.data.price_symbol,
params: null,
data_list_loding_status: 1,
data_list_loding_msg: '',
@ -110,6 +109,9 @@ Page({
form_images_list: [],
form_express_name: '',
form_express_number: '',
// 基础配置
price_symbol: app.data.price_symbol,
},
onLoad(params) {
@ -117,13 +119,30 @@ Page({
params: params,
popup_delivery_status: ((params.is_delivery_popup || 0) == 1),
});
this.init();
},
onShow() {
wx.setNavigationBarTitle({ title: app.data.common_pages_title.user_orderaftersale_detail });
// 数据加载
this.init();
// 初始化配置
this.init_config();
},
// 初始化配置
init_config(status) {
if((status || false) == true) {
this.setData({
price_symbol: app.get_config('price_symbol'),
});
} else {
app.is_config(this, 'init_config');
}
},
// 获取数据
init() {
var self = this;
wx.showLoading({ title: "加载中..." });

View File

@ -1,7 +1,6 @@
const app = getApp();
Page({
data: {
price_symbol: app.data.price_symbol,
params: null,
data_list_loding_status: 1,
data_list_loding_msg: '',
@ -25,6 +24,9 @@ Page({
{ name: "已取消", value: "5" },
],
nav_status_index: 0,
// 基础配置
price_symbol: app.data.price_symbol,
},
onLoad(params) {
@ -44,13 +46,30 @@ Page({
form_keyword_value: params.keywords || '',
nav_status_index: nav_status_index,
});
this.init();
},
onShow() {
wx.setNavigationBarTitle({ title: app.data.common_pages_title.user_orderaftersale });
// 数据加载
this.init();
// 初始化配置
this.init_config();
},
// 初始化配置
init_config(status) {
if((status || false) == true) {
this.setData({
price_symbol: app.get_config('price_symbol'),
});
} else {
app.is_config(this, 'init_config');
}
},
// 获取数据
init() {
var user = app.get_user_info(this, "init");
if (user != false) {

View File

@ -3,8 +3,6 @@ Page({
data: {
avatar: app.data.default_user_head_src,
nickname: "用户名",
customer_service_tel: null,
common_user_center_notice: null,
message_total: 0,
head_nav_list: [
{ name: "订单总数", url: "user-order", count: 0 },
@ -22,16 +20,39 @@ Page({
// 远程自定义导航
navigation: [],
// 基础配置
common_app_customer_service_tel: null,
common_user_center_notice: null,
common_app_is_online_service: 0,
common_app_is_head_vice_nav: 0,
},
onShow() {
wx.setNavigationBarTitle({title: app.data.common_pages_title.user});
// 数据加载
this.init();
// 初始化配置
this.init_config();
},
// 初始化配置
init_config(status) {
if((status || false) == true) {
this.setData({
common_app_customer_service_tel: app.get_config('config.common_app_customer_service_tel'),
common_user_center_notice: app.get_config('config.common_user_center_notice'),
common_app_is_online_service: app.get_config('config.common_app_is_online_service'),
common_app_is_head_vice_nav: app.get_config('config.common_app_is_head_vice_nav'),
});
} else {
app.is_config(this, 'init_config');
}
},
// 获取数据
init(e) {
var user = app.get_user_info(this, "init"),
self = this;
@ -102,15 +123,11 @@ Page({
this.setData({
user_order_status_list: temp_user_order_status_list,
customer_service_tel: data.customer_service_tel || null,
common_user_center_notice: data.common_user_center_notice || null,
avatar: ((data.avatar || null) != null) ? data.avatar : ((this.data.avatar || null) == null ? app.data.default_user_head_src : this.data.avatar),
nickname: (data.nickname != null) ? data.nickname : this.data.nickname,
message_total: ((data.common_message_total || 0) == 0) ? 0 : data.common_message_total,
head_nav_list: temp_head_nav_list,
navigation: data.navigation || [],
common_app_is_online_service: data.common_app_is_online_service || 0,
common_app_is_head_vice_nav: data.common_app_is_head_vice_nav || 0,
});
// 导航购物车处理
@ -142,11 +159,11 @@ Page({
// 客服电话
call_event() {
if(this.data.customer_service_tel == null)
if(this.data.common_app_customer_service_tel == null)
{
app.showToast("客服电话有误");
} else {
app.call_tel(this.data.customer_service_tel);
app.call_tel(this.data.common_app_customer_service_tel);
}
},

Some files were not shown because too many files have changed in this diff Show More