Skip to content
This repository has been archived by the owner on Mar 21, 2023. It is now read-only.

Commit

Permalink
update
Browse files Browse the repository at this point in the history
update to 2016/03/17
  • Loading branch information
ennnnny committed Mar 17, 2016
1 parent 9c4bb59 commit 4e712ee
Show file tree
Hide file tree
Showing 9 changed files with 36 additions and 23 deletions.
11 changes: 7 additions & 4 deletions Addons/Shop/Controller/WapController.class.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<?php

namespace Addons\Shop\Controller;

use Home\Controller\AddonsController;
Expand Down Expand Up @@ -228,7 +227,11 @@ function orderDetail() {
$this->assign ( 'addressInfo', $addressInfo );

if ($orderInfo ['status_code'] == 3) { // 在配送中的订单自动从接口获取快递信息
$res = $orderDao->getSendInfo ( $id );
//20160302
//聚合数据 http://www.juhe.cn
//这个免费的只有100次使用,所以屏蔽吧
//免费 10000次的只是针对app的SDK的
//$res = $orderDao->getSendInfo ( $id );
}

$log = M ( 'shop_order_log' )->where ( $map )->order ( 'status_code desc,cTime desc' )->select ();
Expand Down Expand Up @@ -478,8 +481,8 @@ private function _getShopCategory() {
return $list;
}
// 确认收货
function confirm_get() {
$id = I ( 'id' );
function confirm_get() {
$id = I ( 'get.id' );
$res = D ( 'Addons://Shop/Order' )->setStatusCode ( $id, 4 );
if ($res) {
$this->success ( '设置成功' );
Expand Down
13 changes: 7 additions & 6 deletions Addons/Shop/Model/OrderModel.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,15 +105,17 @@ function getOrderList($map) {
}
function getSendInfo($id) {
$info = $this->getInfo ( $id );
$map ['id'] = $info ['shop_id'];
$api_key = M ( 'shop' )->where ( $map )->getField ( 'api_key' );
empty ( $api_key ) && $api_key = '02727dd96ccf4c4eabb091d85cb7fa10';

//以下3行代码是有问题的,shop数据库中是没聚合数据的api_key这个字段的,会导致网页错误,所以屏蔽了
//$map ['id'] = $info ['shop_id'];
//$api_key = M ( 'shop' )->where ( $map )->getField ( 'api_key' );
//empty ( $api_key ) && $api_key = '02727dd96ccf4c4eabb091d85cb7fa10';
$api_key = '6df4bd9a502849eb856b0fa2c232deda';
$url = 'http://v.juhe.cn/exp/index?key=' . $api_key . '&com=' . $info ['send_code'] . '&no=' . $info ['send_number'];
$data = wp_file_get_contents ( $url );
$data = json_decode ( $data, true );

if ($data ['resultcode'] == 200) {

$save ['order_id'] = $id;
$save ['status_code'] = 3;
$save ['extend'] = 1;
Expand All @@ -124,8 +126,7 @@ function getSendInfo($id) {
$save ['remark'] = $vo ['zone'] . ' ' . $vo ['remark'];
M ( 'shop_order_log' )->add ( $save );
}
}

}
return $data;
}
function update($id, $save) {
Expand Down
3 changes: 2 additions & 1 deletion Addons/Shop/View/default/Public/mobile/shop.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,10 @@ function checkCartSubmit(){
}
}
function confirmGetGoods(url){

$.Dialog.confirmBox('温馨提示','确认已收货?',{rightCallback:function(){
$.Dialog.loading();
$.post(url,function(res){
$.post(url,function(res){
setTimeout(function(){
location.reload();
},1500);
Expand Down
4 changes: 2 additions & 2 deletions Addons/Shop/View/default/Wap/choose_pay.html
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@
</html>
<script type="text/javascript">
$('.choose_pay_type a').each(function(){
$(this).click(function(){
$(this).click(function(){
var paytype=$(this).attr('data-paytype');//alert(paytype);
var order_id={$order_id};
var order_id={$order_id};
var url="{:U('do_pay')}&paytype="+paytype+"&order_id="+order_id;
$(this).attr('href',url);
});
Expand Down
2 changes: 1 addition & 1 deletion Addons/Shop/View/default/Wap/orderDetail.html
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,6 @@ <h3 class="mb_10">订单号:{$info.order_number}</h3>
<!-- 底部导航 -->
<include file="_footer"/>
<block name="script">
</block>
</block>
</body>
</html>
6 changes: 3 additions & 3 deletions Addons/Shop/View/default/Wap/order_list.html
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,13 @@
</a>
<div class="order_list_bottom">
<if condition="$vo[pay_status]==0 && $vo[pay_type]!=10">
<a class="btn small_btn" href="{:U('choose_pay')}&order_id={$info.id}">立即付款</a>
<a class="btn small_btn" href="{:U('choose_pay')}&order_id={$vo[id]}">立即付款</a>
<else />
<eq name="vo[is_send]" value="0">
<span>等待卖家发货</span>
<else/>
<if condition="$vo['status_code']==3">
<a class="btn small_btn" href="javascript:;" onClick="confirmGetGoods('{:U('confirm_get',array('id'=>$vo[id]))}');">确认收货</a>
<if condition="$vo['status_code']==3">
<a class="btn small_btn" href="javascript:;" onClick="confirmGetGoods('{:U('confirm_get',array('id'=>$vo[id]))}');">确认收货</a>
</if>
</eq>
</if>
Expand Down
4 changes: 2 additions & 2 deletions Addons/WeiSite/Controller/WeiSiteController.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ function index() {
// 分类
$category = M ( 'weisite_category' )->where ( $map )->order ( 'sort asc, id desc' )->select ();
foreach ( $category as &$vo ) {
$vo ['icon'] = get_cover_url ( $vo ['icon'] );
$vo ['icon'] = get_cover_url ( $vo ['icon'] );
empty ( $vo ['url'] ) && $vo ['url'] = addons_url ( 'WeiSite://WeiSite/lists', array (
'cate_id' => $vo ['id']
) );
Expand Down Expand Up @@ -91,7 +91,7 @@ function lists() {
}
$this->assign ( 'category', $category );
$this->_footer ();
$this->display ( ONETHINK_ADDON_PATH . 'WeiSite/View/default/TemplateSubcate/' . $this->config ['template_subcate'] . '/index.html' );
$this->display ( ONETHINK_ADDON_PATH . 'WeiSite/View/default/TemplateSubcate/' . $this->config ['template_subcate'] . '/cate.html' );
} else {

$page = I ( 'p', 1, 'intval' );
Expand Down
4 changes: 2 additions & 2 deletions Application/Home/Controller/IndexController.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -166,8 +166,8 @@ public function main() {
) );
redirect ( $url );
}
$map ['status'] = 1;
$data = M ( 'addons' )->where ( $map )->order ( 'id DESC' )->select ();
$map_addons ['status'] = 1;
$data = M ( 'addons' )->where ( $map_addons )->order ( 'id DESC' )->select ();
$token_status = D ( 'Common/AddonStatus' )->getList ( true );
foreach ( $data as $k => &$vo ) {
if ($token_status [$vo ['name']] === '-1') {
Expand Down
12 changes: 10 additions & 2 deletions readme.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
������2016/3/17
1���������û�ʱ��һ����ѯ���������г�ͻ�������ݲ���ȷ���ѱ�������һ�¼���� by Wend
2�����΢�̳�֧�������⣨ȷ���ջ���Ч��ȷ���ջ�����ϸ������ʾ�������б��е��΢��֧��ʧЧ�������⣩ by Wend
3��΢��վ�����ڵ�������� by Wend
4��΢��վ����Ŀ¼�������� by Wend

������2016/3/14
1.��������Ԥ�����

������2016/2/9

1.�޸�Ϊ΢�Ź���ԱĬ�ϲ�����admin��̨��¼�ˣ������µij�������Ա����config�������޸ġ�������Ե�ṩ�����޸ġ�
Expand All @@ -12,5 +21,4 @@
3������΢�����ļ���̫����ԭʼ���������Ŀ������ṩ����Ȩ���������WeiPHP3.0�����ڰ�װ�����ṩ����Ҫ���û���������������̳���Ժ�������ṩ����΢�����ĵ�ַ
4��WeiPHP3.0��΢��վ�Ѿ����˼���pigcmsģ�壬��δ������������֤������Ȥ�Ŀ�����ͬ����������������̳���Ժ�������ṩ����ģ����Ͱ�װ����
5��WeiPHP2.X�����������ڴ���¸�����Ѯ�ṩ�������Ѿ����ƹ��IJ�Ʒ������������Ҫ��һ�����������������
6��WeiPHP3.0�Ķ��ο����ĵ����û������ĵ��Ѿ��ڱ�д�У�����ɻ��һʱ����QȺ����̳�Ϸ���

6��WeiPHP3.0�Ķ��ο����ĵ����û������ĵ��Ѿ��ڱ�д�У�����ɻ��һʱ����QȺ����̳�Ϸ���

0 comments on commit 4e712ee

Please sign in to comment.