mirror of
https://github.com/crmeb/CRMEB.git
synced 2025-12-14 12:32:50 +00:00
小程序更新修复退款问题,添加分享海报,首页授权页面修改,添加微信收获地址
This commit is contained in:
parent
1740495c3f
commit
4e198e30be
@ -51,4 +51,132 @@ function setView($uid,$product_id=0,$cate=0,$type='',$content='',$min=20){
|
||||
'content'=>$content
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建海报图片
|
||||
* @param array $product
|
||||
* @return bool|string
|
||||
*/
|
||||
function createPoster($product = array()){
|
||||
header("Content-type: image/jpg");
|
||||
$filePath = 'public/uploads/poster/'.time().'.jpg';
|
||||
$dir = iconv("UTF-8", "GBK", "public/uploads/poster");
|
||||
if(!file_exists($dir)) mkdir($dir,0775,true);
|
||||
$config = array(
|
||||
'text'=>array(
|
||||
array(
|
||||
'text'=>substr(iconv_substr($product['store_name'],0,mb_strlen($product['store_name']),'utf-8'),0,24).'...',
|
||||
'left'=>50,
|
||||
'top'=>500,
|
||||
'fontPath'=>ROOT_PATH.'public/uploads/poster/simsunb.ttf', //字体文件
|
||||
'fontSize'=>16, //字号
|
||||
'fontColor'=>'40,40,40', //字体颜色
|
||||
'angle'=>0,
|
||||
),
|
||||
array(
|
||||
'text'=>'¥'.$product['price'],
|
||||
'left'=>50,
|
||||
'top'=>580,
|
||||
'fontPath'=>ROOT_PATH.'public/uploads/poster/simsunb.ttf', //字体文件
|
||||
'fontSize'=>16, //字号
|
||||
'fontColor'=>'40,40,40', //字体颜色
|
||||
'angle'=>0,
|
||||
)
|
||||
),
|
||||
'image'=>array(
|
||||
array(
|
||||
'url'=>$product['image'],
|
||||
'left'=>50,
|
||||
'top'=>70,
|
||||
'right'=>0,
|
||||
'stream'=>0,
|
||||
'bottom'=>0,
|
||||
'width'=>350,
|
||||
'height'=>350,
|
||||
'opacity'=>100,
|
||||
),
|
||||
array(
|
||||
'url'=>$product['code_path'],
|
||||
'left'=>250,
|
||||
'top'=>480,
|
||||
'right'=>0,
|
||||
'stream'=>0,
|
||||
'bottom'=>0,
|
||||
'width'=>160,
|
||||
'height'=>180,
|
||||
'opacity'=>100,
|
||||
),
|
||||
),
|
||||
'background'=>ROOT_PATH.'public/uploads/poster/background.jpg' //背景图
|
||||
);
|
||||
$imageDefault = array(
|
||||
'left'=>0,
|
||||
'top'=>0,
|
||||
'right'=>0,
|
||||
'bottom'=>0,
|
||||
'width'=>100,
|
||||
'height'=>100,
|
||||
'opacity'=>100
|
||||
);
|
||||
$textDefault = array(
|
||||
'text'=>'2222222222',
|
||||
'left'=>0,
|
||||
'top'=>0,
|
||||
'fontSize'=>32, //字号
|
||||
'fontColor'=>'255,255,255', //字体颜色
|
||||
'angle'=>0,
|
||||
);
|
||||
$background = $config['background'];//海报最底层得背景
|
||||
//背景方法
|
||||
$backgroundInfo = getimagesize($background);
|
||||
$backgroundFun = 'imagecreatefrom'.image_type_to_extension($backgroundInfo[2], false);
|
||||
$background = $backgroundFun($background);
|
||||
// $backgroundWidth = imagesx($background); //背景宽度
|
||||
// $backgroundHeight = imagesy($background); //背景高度
|
||||
$backgroundWidth = 460; //背景宽度
|
||||
$backgroundHeight = 700; //背景高度
|
||||
$imageRes = imageCreatetruecolor($backgroundWidth,$backgroundHeight);
|
||||
$color = imagecolorallocate($imageRes, 0, 0, 0);
|
||||
imagefill($imageRes, 0, 0, $color);
|
||||
// imageColorTransparent($imageRes, $color); //颜色透明
|
||||
imagecopyresampled($imageRes,$background,0,0,0,0,imagesx($background),imagesy($background),imagesx($background),imagesy($background)); //处理了图片
|
||||
if(!empty($config['image'])){
|
||||
foreach ($config['image'] as $key => $val) {
|
||||
$val = array_merge($imageDefault,$val);
|
||||
$info = getimagesize($val['url']);
|
||||
$function = 'imagecreatefrom'.image_type_to_extension($info[2], false);
|
||||
if($val['stream']){ //如果传的是字符串图像流
|
||||
$info = getimagesizefromstring($val['url']);
|
||||
$function = 'imagecreatefromstring';
|
||||
}
|
||||
$res = $function($val['url']);
|
||||
$resWidth = $info[0];
|
||||
$resHeight = $info[1];
|
||||
//建立画板 ,缩放图片至指定尺寸
|
||||
$canvas=imagecreatetruecolor($val['width'], $val['height']);
|
||||
imagefill($canvas, 0, 0, $color);
|
||||
//关键函数,参数(目标资源,源,目标资源的开始坐标x,y, 源资源的开始坐标x,y,目标资源的宽高w,h,源资源的宽高w,h)
|
||||
imagecopyresampled($canvas, $res, 0, 0, 0, 0, $val['width'], $val['height'],$resWidth,$resHeight);
|
||||
$val['left'] = $val['left']<0?$backgroundWidth- abs($val['left']) - $val['width']:$val['left'];
|
||||
$val['top'] = $val['top']<0?$backgroundHeight- abs($val['top']) - $val['height']:$val['top'];
|
||||
//放置图像
|
||||
imagecopymerge($imageRes,$canvas, $val['left'],$val['top'],$val['right'],$val['bottom'],$val['width'],$val['height'],$val['opacity']);//左,上,右,下,宽度,高度,透明度
|
||||
} }
|
||||
//处理文字
|
||||
if(!empty($config['text'])){
|
||||
foreach ($config['text'] as $key => $val) {
|
||||
$val = array_merge($textDefault,$val);
|
||||
list($R,$G,$B) = explode(',', $val['fontColor']);
|
||||
$fontColor = imagecolorallocate($imageRes, $R, $G, $B);
|
||||
$val['left'] = $val['left']<0?$backgroundWidth- abs($val['left']):$val['left'];
|
||||
$val['top'] = $val['top']<0?$backgroundHeight- abs($val['top']):$val['top'];
|
||||
imagettftext($imageRes,$val['fontSize'],$val['angle'],$val['left'],$val['top'],$fontColor,$val['fontPath'],$val['text']);
|
||||
}
|
||||
}
|
||||
//生成图片
|
||||
$res = imagejpeg ($imageRes,$filePath,90); //保存到本地
|
||||
imagedestroy($imageRes);
|
||||
if(!$res) return false;
|
||||
return $filePath;
|
||||
}
|
||||
@ -876,9 +876,7 @@ class AuthApi extends AuthController{
|
||||
['refund_reason_wap_img',''],
|
||||
['refund_reason_wap_explain',''],
|
||||
],$request);
|
||||
if($data['refund_reason_wap_img']){
|
||||
$data['refund_reason_wap_img'] = explode(',',$data['refund_reason_wap_img']);
|
||||
}
|
||||
if($data['refund_reason_wap_img']) $data['refund_reason_wap_img'] = explode(',',$data['refund_reason_wap_img']);
|
||||
if(!$uni || $data['text'] == '') return JsonService::fail('参数错误!');
|
||||
$res = StoreOrder::orderApplyRefund($uni,$this->userInfo['uid'],$data['text'],$data['refund_reason_wap_explain'],$data['refund_reason_wap_img']);
|
||||
if($res)
|
||||
@ -1437,7 +1435,11 @@ class AuthApi extends AuthController{
|
||||
$path = 'public/uploads/routine/'.$this->userInfo['uid'].'.jpg';
|
||||
$domain=SystemConfigService::get('site_url').'/';
|
||||
if(file_exists($path)) return JsonService::successful($domain.$path);
|
||||
else file_put_contents($path,RoutineCode::getCode($this->userInfo['uid']));
|
||||
else{
|
||||
$dir = iconv("UTF-8", "GBK", "public/uploads/routine");
|
||||
mkdir ($dir,0775,true);
|
||||
file_put_contents($path,RoutineCode::getCode($this->userInfo['uid']));
|
||||
}
|
||||
return JsonService::successful($domain.$path);
|
||||
}
|
||||
|
||||
@ -1890,14 +1892,14 @@ class AuthApi extends AuthController{
|
||||
* @param string $path
|
||||
* @param int $width
|
||||
*/
|
||||
public function get_pages($path = '',$productId = 0,$width = 430){
|
||||
if($path == '' || !$productId) return JsonService::fail('参数错误'); header('content-type:image/jpg');
|
||||
if(!$this->userInfo['uid']) return JsonService::fail('授权失败,请重新授权');
|
||||
$path = 'public/uploads/routinepage/'.$productId.'.jpg';
|
||||
if(file_exists($path)) return JsonService::successful($path);
|
||||
else file_put_contents($path,RoutineCode::getCode($this->userInfo['uid']));
|
||||
return JsonService::successful($path);
|
||||
}
|
||||
// public function get_pages($path = '',$productId = 0,$width = 430){
|
||||
// if($path == '' || !$productId) return JsonService::fail('参数错误'); header('content-type:image/jpg');
|
||||
// if(!$this->userInfo['uid']) return JsonService::fail('授权失败,请重新授权');
|
||||
// $path = 'public/uploads/routinepage/'.$productId.'.jpg';
|
||||
// if(file_exists($path)) return JsonService::successful($path);
|
||||
// else file_put_contents($path,RoutineCode::getCode($this->userInfo['uid']));
|
||||
// return JsonService::successful($path);
|
||||
// }
|
||||
|
||||
/**
|
||||
* 文章列表
|
||||
@ -1944,6 +1946,26 @@ class AuthApi extends AuthController{
|
||||
return JsonService::successful($content);
|
||||
}
|
||||
|
||||
public function poster($id = 0){
|
||||
if(!$id) return JsonService::fail('参数错误');
|
||||
$productInfo = StoreProduct::getValidProduct($id,'store_name,id,price,image,code_path');
|
||||
if(empty($productInfo)) return JsonService::fail('参数错误');
|
||||
if($productInfo['code_path'] == '') {
|
||||
$codePath = 'public/uploads/codepath/product/'.$productInfo['id'].'.jpg';
|
||||
if(!file_exists($codePath)){
|
||||
$dir = iconv("UTF-8", "GBK", "public/uploads/codepath/product");
|
||||
mkdir($dir,0775,true);
|
||||
file_put_contents($codePath,RoutineCode::getPages('pages/product-con/index?id='.$productInfo['id']));
|
||||
}
|
||||
$res = StoreProduct::edit(['code_path'=>$codePath],$id);
|
||||
if($res) $productInfo['code_path'] = $codePath;
|
||||
else return JsonService::fail('没有查看权限');
|
||||
}
|
||||
$posterPath = createPoster($productInfo);
|
||||
return JsonService::successful($posterPath);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 刷新数据缓存
|
||||
*/
|
||||
|
||||
@ -1,35 +1,24 @@
|
||||
<?php
|
||||
namespace app\wap\controller;
|
||||
|
||||
use service\WechatService;
|
||||
|
||||
namespace app\routine\controller;
|
||||
use behavior\wechat\PaymentBehavior;
|
||||
use service\HookService;
|
||||
use service\RoutineNotify;
|
||||
|
||||
/**
|
||||
* 微信服务器 验证控制器
|
||||
* Class Wechat
|
||||
* @package app\wap\controller
|
||||
* 小程序支付回调
|
||||
* Class Routine
|
||||
* @package app\routine\controller
|
||||
*/
|
||||
class Wechat
|
||||
class Routine
|
||||
{
|
||||
|
||||
/**
|
||||
* 微信服务器 验证
|
||||
*/
|
||||
public function serve()
|
||||
{
|
||||
WechatService::serve();
|
||||
}
|
||||
|
||||
/**
|
||||
* 支付 异步回调
|
||||
*/
|
||||
public function notify()
|
||||
{
|
||||
WechatService::handleNotify();
|
||||
$result = RoutineNotify::notify();
|
||||
if($result) HookService::listen('wechat_pay_success_'.strtolower($result['attach']),$result['out_trade_no'],$result,true,PaymentBehavior::class);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
15
application/routine/model/store/StoreOrder.php
Executable file → Normal file
15
application/routine/model/store/StoreOrder.php
Executable file → Normal file
@ -378,11 +378,16 @@ class StoreOrder extends ModelBasic
|
||||
if(!$res)
|
||||
return self::setErrorInfo('申请退款失败!');
|
||||
else{
|
||||
try{
|
||||
$adminIds = SystemConfigService::get('site_store_admin_uids');
|
||||
if(!$adminIds || !($adminList = array_unique(array_filter(explode(',',trim($adminIds)))))) return false;
|
||||
RoutineTemplate::sendOrderRefundStatus($order,$refundReasonWap,$adminList);//小程序 发送模板消息
|
||||
}catch (\Exception $e){}
|
||||
$adminIds = SystemConfigService::get('site_store_admin_uids');
|
||||
if(!empty($adminIds)){
|
||||
try{
|
||||
if(!($adminList = array_unique(array_filter(explode(',',trim($adminIds)))))){
|
||||
self::setErrorInfo('申请退款成功,');
|
||||
return false;
|
||||
}
|
||||
RoutineTemplate::sendOrderRefundStatus($order,$refundReasonWap,$adminList);//小程序 发送模板消息
|
||||
}catch (\Exception $e){}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@ -9,8 +9,10 @@ namespace app\routine\model\store;
|
||||
|
||||
use app\routine\model\store\StoreCombination;
|
||||
use app\routine\model\user\User;
|
||||
use app\routine\model\user\UserBill;
|
||||
use app\routine\model\user\WechatUser;
|
||||
use basic\ModelBasic;
|
||||
use service\SystemConfigService;
|
||||
use service\WechatTemplateService;
|
||||
use think\Url;
|
||||
use traits\ModelTrait;
|
||||
@ -148,16 +150,22 @@ class StorePink extends ModelBasic
|
||||
* @param $pid
|
||||
*/
|
||||
public static function orderPinkAfter($uidAll,$pid){
|
||||
foreach ($uidAll as $v){
|
||||
$openid = WechatUser::uidToOpenid($v);
|
||||
WechatTemplateService::sendTemplate($openid,WechatTemplateService::ORDER_USER_GROUPS_SUCCESS,[
|
||||
'first'=>'亲,您的拼团已经完成了',
|
||||
'keyword1'=> self::where('id',$pid)->whereOr('k_id',$pid)->where('uid',$v)->value('order_id'),
|
||||
'keyword2'=> self::alias('p')->where('p.id',$pid)->whereOr('p.k_id',$pid)->where('p.uid',$v)->join('__STORE_COMBINATION__ c','c.id=p.cid')->value('c.title'),
|
||||
'remark'=>'点击查看订单详情'
|
||||
],Url::build('My/order_pink_after',['id'=>$pid],true,true));
|
||||
}
|
||||
self::where('uid','IN',implode(',',$uidAll))->where('id',$pid)->whereOr('k_id',$pid)->update(['is_tpl'=>1]);
|
||||
// foreach ($uidAll as $v){
|
||||
// $openid = WechatUser::uidToOpenid($v);
|
||||
// WechatTemplateService::sendTemplate($openid,WechatTemplateService::ORDER_USER_GROUPS_SUCCESS,[
|
||||
// 'first'=>'亲,您的拼团已经完成了',
|
||||
// 'keyword1'=> self::where('id',$pid)->whereOr('k_id',$pid)->where('uid',$v)->value('order_id'),
|
||||
// 'keyword2'=> self::alias('p')->where('p.id',$pid)->whereOr('p.k_id',$pid)->where('p.uid',$v)->join('__STORE_COMBINATION__ c','c.id=p.cid')->value('c.title'),
|
||||
// 'remark'=>'点击查看订单详情'
|
||||
// ],Url::build('My/order_pink_after',['id'=>$pid],true,true));
|
||||
// }
|
||||
self::beginTrans();
|
||||
$res1 = self::where('uid','IN',implode(',',$uidAll))->where('id',$pid)->whereOr('k_id',$pid)->update(['is_tpl'=>1]);
|
||||
$res2 = true;
|
||||
// if(SystemConfigService::get('colonel_status')) $res2 = self::setRakeBackColonel($pid);
|
||||
// else $res2 = true;
|
||||
$res = $res1 && $res2;
|
||||
self::checkTrans($res);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -339,4 +347,27 @@ class StorePink extends ModelBasic
|
||||
else return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 拼团成功后给团长返佣金
|
||||
* @param int $id
|
||||
* @return bool
|
||||
*/
|
||||
// public static function setRakeBackColonel($id = 0){
|
||||
// if(!$id) return false;
|
||||
// $pinkRakeBack = self::where('id',$id)->field('people,price,uid,id')->find()->toArray();
|
||||
// $countPrice = bcmul($pinkRakeBack['people'],$pinkRakeBack['price'],2);
|
||||
// if(bcsub((float)$countPrice,0,2) <= 0) return true;
|
||||
// $rakeBack = (SystemConfigService::get('rake_back_colonel') ?: 0)/100;
|
||||
// if($rakeBack <= 0) return true;
|
||||
// $rakeBackPrice = bcmul($countPrice,$rakeBack,2);
|
||||
// if($rakeBackPrice <= 0) return true;
|
||||
// $mark = '拼团成功,奖励佣金'.floatval($rakeBackPrice);
|
||||
// self::beginTrans();
|
||||
// $res1 = UserBill::income('获得拼团佣金',$pinkRakeBack['uid'],'now_money','colonel',$rakeBackPrice,$id,0,$mark);
|
||||
// $res2 = User::bcInc($pinkRakeBack['uid'],'now_money',$rakeBackPrice,'uid');
|
||||
// $res = $res1 && $res2;
|
||||
// self::checkTrans($res);
|
||||
// return $res;
|
||||
// }
|
||||
}
|
||||
@ -81,7 +81,9 @@ class User extends ModelBasic
|
||||
*/
|
||||
public static function isUserSpread($uid = 0){
|
||||
if(!$uid) return false;
|
||||
$isPromoter = self::where('uid',$uid)->value('is_promoter');
|
||||
$status = (int)SystemConfigService::get('store_brokerage_statu');
|
||||
$isPromoter = true;
|
||||
if($status == 1) $isPromoter = self::where('uid',$uid)->value('is_promoter');
|
||||
if($isPromoter) return true;
|
||||
else return false;
|
||||
}
|
||||
|
||||
7
application/routine/model/user/UserRecharge.php
Executable file → Normal file
7
application/routine/model/user/UserRecharge.php
Executable file → Normal file
@ -24,14 +24,15 @@ class UserRecharge extends ModelBasic
|
||||
|
||||
public static function addRecharge($uid,$price,$recharge_type = 'weixin',$paid = 0)
|
||||
{
|
||||
$order_id = self::getNewOrderId();
|
||||
$order_id = self::getNewOrderId($uid);
|
||||
return self::set(compact('order_id','uid','price','recharge_type','paid'));
|
||||
}
|
||||
|
||||
public static function getNewOrderId()
|
||||
public static function getNewOrderId($uid = 0)
|
||||
{
|
||||
if(!$uid) return false;
|
||||
$count = (int) self::where('add_time',['>=',strtotime(date("Y-m-d"))],['<',strtotime(date("Y-m-d",strtotime('+1 day')))])->count();
|
||||
return 'wx1'.date('YmdHis',time()).(10000+$count+1);
|
||||
return 'wx1'.date('YmdHis',time()).(10000+$count+$uid);
|
||||
}
|
||||
|
||||
public static function jsPay($orderInfo)
|
||||
|
||||
@ -2,169 +2,54 @@
|
||||
var app = getApp();
|
||||
// var wxh = require('../../utils/wxh.js');
|
||||
App({
|
||||
onLaunch: function () {
|
||||
// 展示本地存储能力
|
||||
var that = this;
|
||||
var logs = wx.getStorageSync('logs') || []
|
||||
logs.unshift(Date.now())
|
||||
wx.setStorageSync('logs', logs)
|
||||
that.getRoutineStyle();
|
||||
},
|
||||
globalData: {
|
||||
routineStyle:'#ffffff',
|
||||
uid: null,
|
||||
openPages:'',
|
||||
spid:0,
|
||||
urlImages: '',
|
||||
url: 'https://shop.crmeb.net/'
|
||||
},
|
||||
getRoutineStyle:function(){
|
||||
var that = this;
|
||||
wx.request({
|
||||
url: that.globalData.url + '/routine/login/get_routine_style',
|
||||
method: 'post',
|
||||
dataType : 'json',
|
||||
success: function (res) {
|
||||
that.globalData.routineStyle = res.data.data.routine_style;
|
||||
that.setBarColor();
|
||||
}
|
||||
onLaunch: function () {
|
||||
// 展示本地存储能力
|
||||
var that = this;
|
||||
var logs = wx.getStorageSync('logs') || []
|
||||
logs.unshift(Date.now())
|
||||
wx.setStorageSync('logs', logs)
|
||||
that.getRoutineStyle();
|
||||
},
|
||||
globalData: {
|
||||
routineStyle:'#ffffff',
|
||||
uid: null,
|
||||
openPages:'',
|
||||
spid:0,
|
||||
urlImages: '',
|
||||
url: 'https://shop.crmeb.net/'
|
||||
},
|
||||
getRoutineStyle:function(){
|
||||
var that = this;
|
||||
wx.request({
|
||||
url: that.globalData.url + '/routine/login/get_routine_style',
|
||||
method: 'post',
|
||||
dataType : 'json',
|
||||
success: function (res) {
|
||||
that.globalData.routineStyle = res.data.data.routine_style;
|
||||
that.setBarColor();
|
||||
}
|
||||
})
|
||||
},
|
||||
setBarColor:function(){
|
||||
var that = this;
|
||||
wx.setNavigationBarColor({
|
||||
frontColor: '#000000',
|
||||
backgroundColor: that.globalData.routineStyle,
|
||||
})
|
||||
},
|
||||
setUserInfo : function(){
|
||||
var that = this;
|
||||
if (that.globalData.uid == null) {//是否存在用户信息,如果不存在跳转到首页
|
||||
wx.showToast({
|
||||
title: '用户信息获取失败',
|
||||
icon: 'none',
|
||||
duration: 1500,
|
||||
})
|
||||
setTimeout(function () {
|
||||
wx.navigateTo({
|
||||
url: '/pages/load/load',
|
||||
})
|
||||
},
|
||||
setBarColor:function(){
|
||||
var that = this;
|
||||
wx.setNavigationBarColor({
|
||||
frontColor: '#000000',
|
||||
backgroundColor: that.globalData.routineStyle,
|
||||
})
|
||||
},
|
||||
setUserInfo : function(){
|
||||
var that = this;
|
||||
if (that.globalData.uid == null) {//是否存在用户信息,如果不存在跳转到首页
|
||||
wx.showToast({
|
||||
title: '用户信息获取失败',
|
||||
icon: 'none',
|
||||
duration: 1500,
|
||||
})
|
||||
setTimeout(function () {
|
||||
wx.navigateTo({
|
||||
url: '/pages/enter/enter',
|
||||
})
|
||||
}, 2000)
|
||||
}
|
||||
},
|
||||
getUserInfo: function () {
|
||||
var that = this;
|
||||
wx.getUserInfo({
|
||||
lang: 'zh_CN',
|
||||
success: function (res) {
|
||||
var userInfo = res.userInfo
|
||||
wx.login({
|
||||
success: function (res) {
|
||||
if (res.code) {
|
||||
userInfo.code = res.code;
|
||||
userInfo.spid = that.globalData.spid;
|
||||
wx.request({
|
||||
url: that.globalData.url + '/routine/login/index',
|
||||
method: 'post',
|
||||
dataType : 'json',
|
||||
data: {
|
||||
info: userInfo
|
||||
},
|
||||
success: function (res) {
|
||||
that.globalData.uid = res.data.data.uid;
|
||||
if (!res.data.data.status){
|
||||
wx.redirectTo({
|
||||
url: '/pages/login-status/login-status',
|
||||
})
|
||||
}
|
||||
if (that.globalData.openPages != '') {
|
||||
wx.navigateTo({
|
||||
url: that.globalData.openPages
|
||||
})
|
||||
} else {
|
||||
wx.switchTab({
|
||||
url: '/pages/index/index'
|
||||
})
|
||||
}
|
||||
},
|
||||
fail: function () {
|
||||
console.log('获取用户信息失败');
|
||||
wx.navigateTo({
|
||||
url: '/pages/enter/enter',
|
||||
})
|
||||
},
|
||||
})
|
||||
} else {
|
||||
console.log('登录失败!' + res.errMsg)
|
||||
}
|
||||
},
|
||||
fail: function () {
|
||||
console.log('获取用户信息失败');
|
||||
wx.navigateTo({
|
||||
url: '/pages/enter/enter',
|
||||
})
|
||||
},
|
||||
})
|
||||
},
|
||||
fail:function(){
|
||||
console.log('获取用户信息失败');
|
||||
wx.navigateTo({
|
||||
url: '/pages/enter/enter',
|
||||
})
|
||||
},
|
||||
})
|
||||
},
|
||||
getUserInfoEnter: function () {
|
||||
var that = this;
|
||||
wx.getUserInfo({
|
||||
lang: 'zh_CN',
|
||||
success: function (res) {
|
||||
var userInfo = res.userInfo
|
||||
wx.login({
|
||||
success: function (res) {
|
||||
if (res.code) {
|
||||
userInfo.code = res.code;
|
||||
userInfo.spid = that.globalData.spid;
|
||||
wx.request({
|
||||
url: that.globalData.url + '/routine/login/index',
|
||||
method: 'post',
|
||||
dataType : 'json',
|
||||
data: {
|
||||
info: userInfo
|
||||
},
|
||||
success: function (res) {
|
||||
that.globalData.uid = res.data.data.uid;
|
||||
if (that.globalData.openPages != '') {
|
||||
wx.navigateTo({
|
||||
url: that.globalData.openPages
|
||||
})
|
||||
} else {
|
||||
wx.reLaunch({
|
||||
url: '/pages/index/index'
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
} else {
|
||||
console.log('登录失败!' + res.errMsg)
|
||||
}
|
||||
},
|
||||
fail: function (res) {
|
||||
wx.showToast({
|
||||
title: '授权失败,请重新打开小程序',
|
||||
icon: 'none',
|
||||
duration: 1500,
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
fail: function (res) {
|
||||
wx.showToast({
|
||||
title: '授权失败,请重新授权',
|
||||
icon: 'none',
|
||||
duration: 1500,
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
}, 1500)
|
||||
}
|
||||
},
|
||||
})
|
||||
@ -3,9 +3,9 @@
|
||||
"pages/load/load",
|
||||
"pages/login-status/login-status",
|
||||
"pages/payment/payment",
|
||||
"pages/home/home",
|
||||
"pages/new-con/new-con",
|
||||
"pages/new-list/new-list",
|
||||
"pages/enter/enter",
|
||||
"pages/index/index",
|
||||
"pages/refunding/refunding",
|
||||
"pages/miao-list/miao-list",
|
||||
@ -14,13 +14,11 @@
|
||||
"pages/product-countdown/index",
|
||||
"pages/refund-page/refund-page",
|
||||
"pages/refund-order/refund-order",
|
||||
"pages/cut-one/cut-one",
|
||||
"pages/spread/spread",
|
||||
"pages/promotion-order/promotion-order",
|
||||
"pages/coupon/coupon",
|
||||
"pages/news-list/news-list",
|
||||
"pages/product-con/index",
|
||||
"pages/product-pinke/index",
|
||||
"pages/comment-con/comment-con",
|
||||
"pages/orderForm/orderForm",
|
||||
"pages/orders-list/orders-list",
|
||||
|
||||
@ -33,9 +33,9 @@ page{font-size: 28rpx; background-color: #f7f7f7; color: #333;}
|
||||
.line{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
|
||||
.line2{word-break:break-all;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;}
|
||||
.zhao{position:fixed;top:0;left:0;right:0;bottom:0;background-color:#000;opacity:0.7;}
|
||||
.index-con{position:fixed; right:6rpx;top: 20%; width: 80rpx; height: 100rpx;}
|
||||
.index-con{position:fixed; left:6rpx;top: 20%; width: 80rpx; height: 100rpx;}
|
||||
.index-con image{width: 82rpx; height: 82rpx;}
|
||||
.index-con navigator{width: 82rpx; height: 82rpx;position: absolute;bottom: 0;left: 0}
|
||||
.index-con .index-area{display:inline-block;top:88rpx;left:0px;position:relative;height: 500rpx;width:82rpx;}
|
||||
.index-con navigator{width: 82rpx; height: 100rpx;position: absolute;bottom: 0;left: 0}
|
||||
.index-con .index-area{display:inline-block;top:88rpx;left:0px;position:relative;height: 600rpx;width:82rpx;}
|
||||
|
||||
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 229 KiB After Width: | Height: | Size: 57 KiB |
@ -11,7 +11,6 @@ Page({
|
||||
onLoad: function (options) {
|
||||
app.setBarColor();
|
||||
app.setUserInfo();
|
||||
console.log(options);
|
||||
if (options.cartId) {
|
||||
this.setData({
|
||||
cartId: options.cartId,
|
||||
@ -21,6 +20,60 @@ Page({
|
||||
}
|
||||
this.getAddress();
|
||||
},
|
||||
getWxAddress:function(){
|
||||
var that = this;
|
||||
wx.authorize({
|
||||
scope: 'scope.address',
|
||||
success: function(res) {
|
||||
wx.chooseAddress({
|
||||
success: function(res) {
|
||||
console.log(res);
|
||||
var addressP = {};
|
||||
addressP.province = res.provinceName;
|
||||
addressP.city = res.cityName;
|
||||
addressP.district = res.countyName;
|
||||
wx.request({
|
||||
url: app.globalData.url + '/routine/auth_api/edit_user_address?uid=' + app.globalData.uid,
|
||||
method: 'POST',
|
||||
data: {
|
||||
address: addressP,
|
||||
is_default: 0,
|
||||
real_name: res.userName,
|
||||
post_code: res.postalCode,
|
||||
phone: res.telNumber,
|
||||
detail: res.detailInfo,
|
||||
id: 0
|
||||
},
|
||||
success: function (res) {
|
||||
if (res.data.code == 200) {
|
||||
wx.showToast({
|
||||
title: '添加成功',
|
||||
icon: 'success',
|
||||
duration: 1000
|
||||
})
|
||||
that.getAddress();
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
fail: function(res) {
|
||||
if (res.errMsg == 'chooseAddress:cancel'){
|
||||
wx.showToast({
|
||||
title: '取消选择',
|
||||
icon: 'none',
|
||||
duration: 1500
|
||||
})
|
||||
}
|
||||
},
|
||||
complete: function(res) {},
|
||||
})
|
||||
},
|
||||
fail: function(res) {
|
||||
console.log(res);
|
||||
},
|
||||
complete: function(res) {},
|
||||
})
|
||||
},
|
||||
getAddress: function () {
|
||||
var that = this;
|
||||
var header = {
|
||||
|
||||
@ -19,4 +19,8 @@
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
<view class='footer' bindtap='addAddress'>新增地址</view>
|
||||
<view style='height:80rpx'></view>
|
||||
<view class='footer'>
|
||||
<view class='system-address' bindtap='addAddress'>新增地址</view>
|
||||
<view class='weixin-address' bindtap='getWxAddress'>微信地址</view>
|
||||
</view>
|
||||
|
||||
@ -11,4 +11,7 @@
|
||||
.Maddress{font-size:26rpx;}
|
||||
.edit,.del{width:112rpx;height:54rpx;border:1rpx solid #999999;border-radius:8rpx;text-align:center;line-height:54rpx;display:inline-block;font-size:24rpx;}
|
||||
.del{margin-left:20rpx;}
|
||||
.footer{width:100%;height:100rpx;line-height:100rpx;font-size:30rpx;text-align:center;color:#ffffff;background-color:#FF3D3D;position:fixed;bottom:0;}
|
||||
.footer{width:100%;height:100rpx;line-height:100rpx;font-size:30rpx;
|
||||
text-align:center;color:#ffffff;background-color:#eb4e2b;position:fixed;bottom:0;}
|
||||
.footer .system-address{width:50%;float:left;}
|
||||
.footer .weixin-address{width:50%;float:right;background-color:#f3b23e}
|
||||
@ -1,170 +1,173 @@
|
||||
var app = getApp();
|
||||
// pages/cash/cash.js
|
||||
Page({
|
||||
data: {
|
||||
ooo:'',
|
||||
_num:0,
|
||||
url: app.globalData.urlImages,
|
||||
hiddentap: true,
|
||||
hidde: true,
|
||||
money:'',
|
||||
index:0,
|
||||
array:["请选择银行","招商银行","建设银行","农业银行"]
|
||||
},
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad:function (opends) {
|
||||
app.setBarColor();
|
||||
var that = this;
|
||||
this.getUserInfo();
|
||||
this.getUserExtractBank();
|
||||
wx.request({
|
||||
url: app.globalData.url + '/routine/auth_api/minmoney?uid=' + app.globalData.uid,
|
||||
method: 'POST',
|
||||
success: function (res) {
|
||||
that.setData({
|
||||
minmoney: res.data.msg
|
||||
})
|
||||
}
|
||||
data: {
|
||||
ooo:'',
|
||||
_num:0,
|
||||
url: app.globalData.urlImages,
|
||||
hiddentap: true,
|
||||
hidde: true,
|
||||
money:'',
|
||||
index:0,
|
||||
array:["请选择银行","招商银行","建设银行","农业银行"]
|
||||
},
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad:function (opends) {
|
||||
app.setBarColor();
|
||||
app.setUserInfo();
|
||||
var that = this;
|
||||
this.getUserInfo();
|
||||
this.getUserExtractBank();
|
||||
wx.request({
|
||||
url: app.globalData.url + '/routine/auth_api/minmoney?uid=' + app.globalData.uid,
|
||||
method: 'POST',
|
||||
success: function (res) {
|
||||
that.setData({
|
||||
minmoney: res.data.msg
|
||||
})
|
||||
},
|
||||
getUserInfo:function(){
|
||||
var that = this;
|
||||
wx.request({
|
||||
url: app.globalData.url + '/routine/auth_api/my?uid=' + app.globalData.uid,
|
||||
method: 'POST',
|
||||
success: function (res) {
|
||||
that.setData({
|
||||
money: res.data.data.now_money
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
getUserInfo:function(){
|
||||
var that = this;
|
||||
wx.request({
|
||||
url: app.globalData.url + '/routine/auth_api/my?uid=' + app.globalData.uid,
|
||||
method: 'POST',
|
||||
success: function (res) {
|
||||
that.setData({
|
||||
money: res.data.data.now_money
|
||||
})
|
||||
}
|
||||
});
|
||||
},
|
||||
getUserExtractBank:function () {
|
||||
var that = this;
|
||||
wx.request({
|
||||
url: app.globalData.url + '/routine/auth_api/get_user_extract_bank?uid=' + app.globalData.uid,
|
||||
method: 'get',
|
||||
success: function (res) {
|
||||
that.setData({
|
||||
array: res.data.data
|
||||
});
|
||||
},
|
||||
getUserExtractBank:function () {
|
||||
var that = this;
|
||||
wx.request({
|
||||
url: app.globalData.url + '/routine/auth_api/get_user_extract_bank?uid=' + app.globalData.uid,
|
||||
method: 'get',
|
||||
success: function (res) {
|
||||
that.setData({
|
||||
array: res.data.data
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
cardtap:function(e){
|
||||
var flag = this.data.hiddentap;
|
||||
if (flag){
|
||||
this.setData({
|
||||
hiddentap: false
|
||||
})
|
||||
}else{
|
||||
this.setData({
|
||||
hiddentap: true
|
||||
})
|
||||
}
|
||||
},
|
||||
idnumtap: function (e) {
|
||||
this.setData({
|
||||
_num: e.target.dataset.idnum,
|
||||
hiddentap: true
|
||||
})
|
||||
if (e.target.dataset.idnum==1){
|
||||
this.setData({
|
||||
hidde: false
|
||||
})
|
||||
}else{
|
||||
this.setData({
|
||||
hidde: true
|
||||
})
|
||||
}
|
||||
},
|
||||
maskhide:function(e){
|
||||
this.setData({
|
||||
hiddentap: true
|
||||
})
|
||||
},
|
||||
bindPickerChange:function(e){
|
||||
this.setData({
|
||||
index: e.detail.value
|
||||
})
|
||||
},
|
||||
formSubmit:function(e){
|
||||
var header = {
|
||||
// 'content-type': 'application/x-www-form-urlencoded',
|
||||
'cookie': app.globalData.sessionId//读取cookie
|
||||
};
|
||||
var that = this;
|
||||
var flag = true;
|
||||
var warn = "";
|
||||
var minmon = that.data.minmoney;
|
||||
var mymoney = that.data.money;
|
||||
var list={};
|
||||
if (that.data.hidde==true){
|
||||
list.$name = e.detail.value.name;
|
||||
list.cardnum = e.detail.value.cardnum;
|
||||
list.bankname = that.data.array[that.data.index];
|
||||
list.money = e.detail.value.money;
|
||||
list.money = Number(list.money);
|
||||
list.extract_type = 'bank';
|
||||
if (list.$name == "") {
|
||||
warn = "请填写持卡人姓名";
|
||||
} else if (list.cardnum == "") {
|
||||
warn = "请输入银行卡号";
|
||||
} else if (list.bankname == "请选择银行") {
|
||||
warn = "请选择银行";
|
||||
} else if (list.money < minmon) {
|
||||
warn = "请输入正确的金额"
|
||||
} else if (list.money > mymoney) {
|
||||
warn = "您的余额不足"
|
||||
}else {
|
||||
flag = false;
|
||||
}
|
||||
if (flag == true) {
|
||||
wx.showModal({
|
||||
title: '提示',
|
||||
content: warn
|
||||
})
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
list.weixin = e.detail.value.weixin;
|
||||
list.money = e.detail.value.wmoney;
|
||||
list.money = Number(list.money);
|
||||
list.extract_type = 'weixin';
|
||||
if (list.weixin == "") {
|
||||
warn = "请填写微信号";
|
||||
} else if (list.money < minmon) {
|
||||
warn = "请输入正确的金额"
|
||||
} else if (list.money > mymoney) {
|
||||
warn = "您的余额不足"
|
||||
} else {
|
||||
flag = false;
|
||||
}
|
||||
if (flag == true) {
|
||||
wx.showModal({
|
||||
title: '提示',
|
||||
content: warn
|
||||
})
|
||||
return false;
|
||||
}
|
||||
}
|
||||
wx.request({
|
||||
url: app.globalData.url + '/routine/auth_api/user_extract?uid=' + app.globalData.uid,
|
||||
data: { lists: list},
|
||||
method: 'POST',
|
||||
header: header,
|
||||
success: function (res) {
|
||||
that.setData({
|
||||
money: (that.data.money - list.money).toFixed(2)
|
||||
})
|
||||
wx.showToast({
|
||||
title: res.data.msg,
|
||||
icon: 'success',
|
||||
duration: 1500
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
});
|
||||
},
|
||||
cardtap:function(e){
|
||||
var flag = this.data.hiddentap;
|
||||
if (flag){
|
||||
this.setData({
|
||||
hiddentap: false
|
||||
})
|
||||
}else{
|
||||
this.setData({
|
||||
hiddentap: true
|
||||
})
|
||||
}
|
||||
},
|
||||
idnumtap: function (e) {
|
||||
this.setData({
|
||||
_num: e.target.dataset.idnum,
|
||||
hiddentap: true
|
||||
})
|
||||
if (e.target.dataset.idnum==1){
|
||||
this.setData({
|
||||
hidde: false
|
||||
})
|
||||
}else{
|
||||
this.setData({
|
||||
hidde: true
|
||||
})
|
||||
}
|
||||
},
|
||||
maskhide:function(e){
|
||||
this.setData({
|
||||
hiddentap: true
|
||||
})
|
||||
},
|
||||
bindPickerChange:function(e){
|
||||
this.setData({
|
||||
index: e.detail.value
|
||||
})
|
||||
},
|
||||
formSubmit:function(e){
|
||||
var header = {
|
||||
// 'content-type': 'application/x-www-form-urlencoded',
|
||||
'cookie': app.globalData.sessionId//读取cookie
|
||||
};
|
||||
var that = this;
|
||||
var flag = true;
|
||||
var warn = "";
|
||||
var minmon = that.data.minmoney;
|
||||
var mymoney = that.data.money;
|
||||
var list={};
|
||||
if (that.data.hidde==true){
|
||||
list.$name = e.detail.value.name;
|
||||
list.cardnum = e.detail.value.cardnum;
|
||||
list.bankname = that.data.array[that.data.index];
|
||||
list.money = e.detail.value.money;
|
||||
list.money = Number(list.money);
|
||||
list.extract_type = 'bank';
|
||||
if (list.$name == "") {
|
||||
warn = "请填写持卡人姓名";
|
||||
} else if (list.cardnum == "") {
|
||||
warn = "请输入银行卡号";
|
||||
} else if (list.bankname == "请选择银行") {
|
||||
warn = "请选择银行";
|
||||
} else if (list.money < minmon) {
|
||||
warn = "请输入正确的金额"
|
||||
} else if (list.money > mymoney) {
|
||||
warn = "您的余额不足"
|
||||
}else {
|
||||
flag = false;
|
||||
}
|
||||
if (flag == true) {
|
||||
wx.showModal({
|
||||
title: '提示',
|
||||
content: warn
|
||||
})
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
list.weixin = e.detail.value.weixin;
|
||||
list.money = e.detail.value.wmoney;
|
||||
list.money = Number(list.money);
|
||||
list.extract_type = 'weixin';
|
||||
if (list.weixin == "") {
|
||||
warn = "请填写微信号";
|
||||
} else if (list.money < minmon) {
|
||||
warn = "请输入正确的金额"
|
||||
} else if (list.money > mymoney) {
|
||||
warn = "您的余额不足"
|
||||
} else {
|
||||
flag = false;
|
||||
}
|
||||
if (flag == true) {
|
||||
wx.showModal({
|
||||
title: '提示',
|
||||
content: warn
|
||||
})
|
||||
return false;
|
||||
}
|
||||
}
|
||||
wx.request({
|
||||
url: app.globalData.url + '/routine/auth_api/user_extract?uid=' + app.globalData.uid,
|
||||
data: { lists: list},
|
||||
method: 'POST',
|
||||
header: header,
|
||||
success: function (res) {
|
||||
that.setData({
|
||||
money: (that.data.money - list.money).toFixed(2)
|
||||
})
|
||||
wx.showToast({
|
||||
title: res.data.msg,
|
||||
icon: 'success',
|
||||
duration: 1500
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
})
|
||||
@ -2,253 +2,253 @@
|
||||
var app = getApp();
|
||||
var wxh = require('../../utils/wxh.js');
|
||||
Page({
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
xinghidden:true,
|
||||
xinghidden2:true,
|
||||
xinghidden3: true,
|
||||
url: '',
|
||||
hidden:false,
|
||||
unique:'',
|
||||
uni:'',
|
||||
dataimg:[]
|
||||
},
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad: function (e) {
|
||||
app.setBarColor();
|
||||
var header = {
|
||||
'content-type': 'application/x-www-form-urlencoded'
|
||||
};
|
||||
var that = this;
|
||||
console.log(e);
|
||||
if (e.unique) {
|
||||
var unique = e.unique;
|
||||
that.setData({
|
||||
unique: unique,
|
||||
});
|
||||
}
|
||||
if (e.uni){
|
||||
that.setData({
|
||||
uni: e.uni
|
||||
});
|
||||
}
|
||||
wx.showLoading({ title: "正在加载中……" });
|
||||
wx.request({
|
||||
url: app.globalData.url + '/routine/auth_api/get_order_product?uid=' + app.globalData.uid,
|
||||
data: { unique: unique},
|
||||
method: 'get',
|
||||
header: header,
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
xinghidden:true,
|
||||
xinghidden2:true,
|
||||
xinghidden3: true,
|
||||
url: '',
|
||||
hidden:false,
|
||||
unique:'',
|
||||
uni:'',
|
||||
dataimg:[]
|
||||
},
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad: function (e) {
|
||||
app.setBarColor();
|
||||
app.setUserInfo();
|
||||
var header = {
|
||||
'content-type': 'application/x-www-form-urlencoded'
|
||||
};
|
||||
var that = this;
|
||||
if (e.unique) {
|
||||
var unique = e.unique;
|
||||
that.setData({
|
||||
unique: unique,
|
||||
});
|
||||
}
|
||||
if (e.uni){
|
||||
that.setData({
|
||||
uni: e.uni
|
||||
});
|
||||
}
|
||||
wx.showLoading({ title: "正在加载中……" });
|
||||
wx.request({
|
||||
url: app.globalData.url + '/routine/auth_api/get_order_product?uid=' + app.globalData.uid,
|
||||
data: { unique: unique},
|
||||
method: 'get',
|
||||
header: header,
|
||||
success: function (res) {
|
||||
wx.hideLoading();
|
||||
that.setData({
|
||||
ordercon: res.data.data
|
||||
});
|
||||
},
|
||||
fail: function (res) {
|
||||
console.log('submit fail');
|
||||
},
|
||||
complete: function (res) {
|
||||
console.log('submit complete');
|
||||
}
|
||||
});
|
||||
},
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady: function () {
|
||||
|
||||
},
|
||||
tapxing:function(e){
|
||||
var index = e.target.dataset.index;
|
||||
this.setData({
|
||||
xinghidden: false,
|
||||
xing: index
|
||||
})
|
||||
},
|
||||
tapxing2: function (e) {
|
||||
var index = e.target.dataset.index;
|
||||
this.setData({
|
||||
xinghidden2: false,
|
||||
xing2: index
|
||||
})
|
||||
},
|
||||
tapxing3: function (e) {
|
||||
var index = e.target.dataset.index;
|
||||
this.setData({
|
||||
xinghidden3: false,
|
||||
xing3: index
|
||||
})
|
||||
},
|
||||
delImages:function(e){
|
||||
var that = this;
|
||||
var dataimg = that.data.dataimg;
|
||||
var index = e.currentTarget.dataset.id;
|
||||
dataimg.splice(index,1);
|
||||
that.setData({
|
||||
dataimg: dataimg
|
||||
})
|
||||
|
||||
},
|
||||
uploadpic:function(e){
|
||||
var that = this;
|
||||
wx.chooseImage({
|
||||
count: 1, //最多可以选择的图片总数
|
||||
sizeType: ['compressed'], // 可以指定是原图还是压缩图,默认二者都有
|
||||
sourceType: ['album', 'camera'], // 可以指定来源是相册还是相机,默认二者都有
|
||||
success: function (res) {
|
||||
// 返回选定照片的本地文件路径列表,tempFilePath可以作为img标签的src属性显示图片
|
||||
var tempFilePaths = res.tempFilePaths;
|
||||
//启动上传等待中...
|
||||
wx.showLoading({
|
||||
title: '图片上传中',
|
||||
})
|
||||
var len = tempFilePaths.length;
|
||||
for (var i = 0; i < len; i++) {
|
||||
wx.uploadFile({
|
||||
url: app.globalData.url + '/routine/auth_api/upload?uid=' + app.globalData.uid,
|
||||
filePath: tempFilePaths[i],
|
||||
name: 'pics',
|
||||
formData: {
|
||||
'filename': 'pics'
|
||||
},
|
||||
header: {
|
||||
"Content-Type": "multipart/form-data"
|
||||
},
|
||||
success: function (res) {
|
||||
wx.hideLoading();
|
||||
wx.hideLoading();
|
||||
if(res.statusCode == 403){
|
||||
wx.showToast({
|
||||
title: res.data,
|
||||
icon: 'none',
|
||||
duration: 1500,
|
||||
})
|
||||
} else {
|
||||
var data = JSON.parse(res.data);
|
||||
data.data.url = app.globalData.url + data.data.url;
|
||||
that.data.dataimg.push(data);
|
||||
that.setData({
|
||||
ordercon: res.data.data
|
||||
dataimg: that.data.dataimg
|
||||
});
|
||||
var len2 = that.data.dataimg.length;
|
||||
if (len2 >= 8) {
|
||||
that.setData({
|
||||
hidden: true
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
fail: function (res) {
|
||||
console.log('submit fail');
|
||||
},
|
||||
complete: function (res) {
|
||||
console.log('submit complete');
|
||||
}
|
||||
});
|
||||
},
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady: function () {
|
||||
|
||||
},
|
||||
tapxing:function(e){
|
||||
var index = e.target.dataset.index;
|
||||
this.setData({
|
||||
xinghidden: false,
|
||||
xing: index
|
||||
})
|
||||
},
|
||||
tapxing2: function (e) {
|
||||
var index = e.target.dataset.index;
|
||||
this.setData({
|
||||
xinghidden2: false,
|
||||
xing2: index
|
||||
})
|
||||
},
|
||||
tapxing3: function (e) {
|
||||
var index = e.target.dataset.index;
|
||||
this.setData({
|
||||
xinghidden3: false,
|
||||
xing3: index
|
||||
})
|
||||
},
|
||||
delImages:function(e){
|
||||
var that = this;
|
||||
var dataimg = that.data.dataimg;
|
||||
var index = e.currentTarget.dataset.id;
|
||||
dataimg.splice(index,1);
|
||||
that.setData({
|
||||
dataimg: dataimg
|
||||
})
|
||||
|
||||
},
|
||||
uploadpic:function(e){
|
||||
var that = this;
|
||||
wx.chooseImage({
|
||||
count: 1, //最多可以选择的图片总数
|
||||
sizeType: ['compressed'], // 可以指定是原图还是压缩图,默认二者都有
|
||||
sourceType: ['album', 'camera'], // 可以指定来源是相册还是相机,默认二者都有
|
||||
success: function (res) {
|
||||
// 返回选定照片的本地文件路径列表,tempFilePath可以作为img标签的src属性显示图片
|
||||
var tempFilePaths = res.tempFilePaths;
|
||||
//启动上传等待中...
|
||||
wx.showLoading({
|
||||
title: '图片上传中',
|
||||
})
|
||||
var len = tempFilePaths.length;
|
||||
for (var i = 0; i < len; i++) {
|
||||
wx.uploadFile({
|
||||
url: app.globalData.url + '/routine/auth_api/upload?uid=' + app.globalData.uid,
|
||||
filePath: tempFilePaths[i],
|
||||
name: 'pics',
|
||||
formData: {
|
||||
'filename': 'pics'
|
||||
},
|
||||
header: {
|
||||
"Content-Type": "multipart/form-data"
|
||||
},
|
||||
success: function (res) {
|
||||
wx.hideLoading();
|
||||
if(res.statusCode == 403){
|
||||
wx.showToast({
|
||||
title: res.data,
|
||||
icon: 'none',
|
||||
duration: 1500,
|
||||
})
|
||||
} else {
|
||||
var data = JSON.parse(res.data);
|
||||
data.data.url = app.globalData.url + data.data.url;
|
||||
that.data.dataimg.push(data);
|
||||
that.setData({
|
||||
dataimg: that.data.dataimg
|
||||
});
|
||||
var len2 = that.data.dataimg.length;
|
||||
if (len2 >= 8) {
|
||||
that.setData({
|
||||
hidden: true
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
fail: function (res) {
|
||||
wx.showToast({
|
||||
title: '上传图片失败',
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
})
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
formSubmit:function(e){
|
||||
var header = {
|
||||
'content-type': 'application/x-www-form-urlencoded'
|
||||
};
|
||||
var that = this;
|
||||
var unique = that.data.unique;
|
||||
var comment = e.detail.value.comment;
|
||||
var product_score = that.data.xing;
|
||||
var service_score = that.data.xing2;
|
||||
var pics = [];
|
||||
var dataimg = that.data.dataimg;
|
||||
for (var i = 0; i < dataimg.length;i++){
|
||||
pics.push(that.data.url+dataimg[i].data.url)
|
||||
};
|
||||
if (comment==""){
|
||||
wx.showToast({
|
||||
title: '请填写你对宝贝的心得!',
|
||||
wx.showToast({
|
||||
title: '上传图片失败',
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
})
|
||||
return false;
|
||||
}
|
||||
wx.showLoading({ title: "正在发布评论……" });
|
||||
wx.request({
|
||||
url: app.globalData.url + '/routine/auth_api/user_comment_product?uid=' + app.globalData.uid+'&unique=' + unique,
|
||||
data: {comment: comment, product_score: product_score, service_score: service_score, pics: pics},
|
||||
method: 'post',
|
||||
header: header,
|
||||
success: function (res) {
|
||||
wx.hideLoading();
|
||||
if (res.data.code==200){
|
||||
wx.showToast({
|
||||
title: '评价成功',
|
||||
icon: 'success',
|
||||
duration: 1000
|
||||
})
|
||||
setTimeout(function(){
|
||||
wx.navigateTo({
|
||||
url: '/pages/orders-con/orders-con?order_id='+that.data.uni,
|
||||
})
|
||||
},1200)
|
||||
}else{
|
||||
wx.showToast({
|
||||
title: res.data.msg,
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
})
|
||||
}
|
||||
},
|
||||
fail: function (res) {
|
||||
console.log('submit fail');
|
||||
},
|
||||
complete: function (res) {
|
||||
console.log('submit complete');
|
||||
})
|
||||
}
|
||||
});
|
||||
},
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage: function () {
|
||||
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
formSubmit:function(e){
|
||||
var header = {
|
||||
'content-type': 'application/x-www-form-urlencoded'
|
||||
};
|
||||
var that = this;
|
||||
var unique = that.data.unique;
|
||||
var comment = e.detail.value.comment;
|
||||
var product_score = that.data.xing;
|
||||
var service_score = that.data.xing2;
|
||||
var pics = [];
|
||||
var dataimg = that.data.dataimg;
|
||||
for (var i = 0; i < dataimg.length;i++){
|
||||
pics.push(that.data.url+dataimg[i].data.url)
|
||||
};
|
||||
if (comment==""){
|
||||
wx.showToast({
|
||||
title: '请填写你对宝贝的心得!',
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
})
|
||||
return false;
|
||||
}
|
||||
wx.showLoading({ title: "正在发布评论……" });
|
||||
wx.request({
|
||||
url: app.globalData.url + '/routine/auth_api/user_comment_product?uid=' + app.globalData.uid+'&unique=' + unique,
|
||||
data: {comment: comment, product_score: product_score, service_score: service_score, pics: pics},
|
||||
method: 'post',
|
||||
header: header,
|
||||
success: function (res) {
|
||||
wx.hideLoading();
|
||||
if (res.data.code==200){
|
||||
wx.showToast({
|
||||
title: '评价成功',
|
||||
icon: 'success',
|
||||
duration: 1000
|
||||
})
|
||||
setTimeout(function(){
|
||||
wx.navigateTo({
|
||||
url: '/pages/orders-con/orders-con?order_id='+that.data.uni,
|
||||
})
|
||||
},1200)
|
||||
}else{
|
||||
wx.showToast({
|
||||
title: res.data.msg,
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
})
|
||||
}
|
||||
},
|
||||
fail: function (res) {
|
||||
console.log('submit fail');
|
||||
},
|
||||
complete: function (res) {
|
||||
console.log('submit complete');
|
||||
}
|
||||
});
|
||||
},
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage: function () {
|
||||
|
||||
}
|
||||
})
|
||||
@ -12,7 +12,10 @@
|
||||
<textarea placeholder='宝贝满足你的期待么?说说你的想法,分享给想买的他们吧~' placeholder-class='placeholder' name = 'comment'></textarea>
|
||||
<view class='imgul'>
|
||||
<block wx:for="{{dataimg}}">
|
||||
<view class='imgpic'><image src='{{url}}{{item.data.url}}' class='dataimg'></image><icon class='iconfont icon-guanbi guanbi'></icon></view>
|
||||
<view class='imgpic'>
|
||||
<image src='{{item.data.url}}' class='dataimg'></image>
|
||||
<icon class='iconfont icon-guanbi guanbi' data-id='{{index}}' bindtap='delImages'></icon>
|
||||
</view>
|
||||
</block>
|
||||
<view class='upimg' bindtap='uploadpic' hidden='{{hidden}}'></view>
|
||||
</view>
|
||||
|
||||
@ -19,7 +19,8 @@ Page({
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad: function (options) {
|
||||
app.setBarColor();
|
||||
app.setBarColor();
|
||||
app.setUserInfo();
|
||||
var productId = options.productId;
|
||||
this.setData({
|
||||
productId: productId
|
||||
|
||||
@ -20,6 +20,7 @@ Page({
|
||||
},
|
||||
onLoad: function (options) {
|
||||
app.setBarColor();
|
||||
app.setUserInfo();
|
||||
if (options.cartId){
|
||||
this.setData({
|
||||
cartId: options.cartId,
|
||||
|
||||
@ -12,7 +12,6 @@ Page({
|
||||
|
||||
},
|
||||
headertaps:function(e){
|
||||
// console.log(e);
|
||||
this.setData({
|
||||
_active: e.target.dataset.idx
|
||||
});
|
||||
|
||||
@ -29,7 +29,7 @@ Page({
|
||||
dataType : 'json',
|
||||
success: function (res) {
|
||||
that.setData({
|
||||
logo: res.data.data.site_logo,
|
||||
logo: app.globalData.url + res.data.data.site_logo,
|
||||
name: res.data.data.site_name
|
||||
})
|
||||
}
|
||||
|
||||
@ -8,6 +8,7 @@ Page({
|
||||
},
|
||||
onLoad: function (options) {
|
||||
app.setBarColor();
|
||||
app.setUserInfo();
|
||||
var header = {
|
||||
'content-type': 'application/x-www-form-urlencoded',
|
||||
};
|
||||
|
||||
@ -58,7 +58,6 @@ Page({
|
||||
method: 'POST',
|
||||
header: header,
|
||||
success: function (res) {
|
||||
console.log(res.data.data.banner);
|
||||
that.setData({
|
||||
imgUrls: res.data.data.banner,
|
||||
recommendLsit: res.data.data.best,
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
.swiper-item{position: relative; width: 100%;}
|
||||
.swiper_banner swiper-item image{width: 100%; height: 400rpx;}
|
||||
.swiper-box .wx-swiper-dots.wx-swiper-dots-horizontal{width: 100%; padding-right: 30rpx;display: flex;justify-content:flex-end;box-sizing: border-box;}
|
||||
.nav{ width: 100%; padding:0 20rpx; box-sizing: border-box; height: 197rpx; align-items: center; background-color: #fff;}
|
||||
.nav{ width: 100%; padding:0 10rpx; box-sizing: border-box; height: 197rpx; align-items: center; background-color: #fff;}
|
||||
.nav .nav-item{width: 25%;}
|
||||
.nav .nav-item image{width: 80rpx; height:80rpx;}
|
||||
.nav .nav-item text{display: blcok;}
|
||||
|
||||
@ -16,6 +16,8 @@ Page({
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad: function (options) {
|
||||
app.setBarColor();
|
||||
app.setUserInfo();
|
||||
this.getUserInfo();
|
||||
this.getList();
|
||||
},//user_integral_list
|
||||
|
||||
@ -1,71 +1,63 @@
|
||||
// pages/load/load.js
|
||||
var app = getApp();
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
|
||||
logo: '',
|
||||
name: '',
|
||||
spid: 0,
|
||||
url: app.globalData.url,
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad: function (options) {
|
||||
if (options.scene) {
|
||||
app.globalData.spid = options.scene;
|
||||
}
|
||||
var that = this;
|
||||
that.getEnterLogo();
|
||||
app.setBarColor();
|
||||
app.getUserInfo();
|
||||
if (options.scene) that.data.spid = options.scene;
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady: function () {
|
||||
|
||||
getEnterLogo: function () {
|
||||
var that = this;
|
||||
wx.request({
|
||||
url: app.globalData.url + '/routine/login/get_enter_logo',
|
||||
method: 'post',
|
||||
dataType : 'json',
|
||||
success: function (res) {
|
||||
that.setData({
|
||||
logo: res.data.data.site_logo,
|
||||
name: res.data.data.site_name
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow: function () {
|
||||
|
||||
//获取用户信息并且授权
|
||||
getUserInfo: function(e){
|
||||
var userInfo = e.detail.userInfo;
|
||||
userInfo.spid = this.data.spid;
|
||||
wx.login({
|
||||
success: function (res) {
|
||||
if (res.code) {
|
||||
userInfo.code = res.code;
|
||||
wx.request({
|
||||
url: app.globalData.url + '/routine/login/index',
|
||||
method: 'post',
|
||||
dataType : 'json',
|
||||
data: {
|
||||
info: userInfo
|
||||
},
|
||||
success: function (res) {
|
||||
app.globalData.uid = res.data.data.uid;
|
||||
if (app.globalData.openPages != '' && app.globalData.openPages != undefined) {//跳转到指定页面
|
||||
wx.navigateTo({
|
||||
url: app.globalData.openPages
|
||||
})
|
||||
} else {//跳转到首页
|
||||
wx.reLaunch({
|
||||
url: '/pages/index/index'
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
} else {
|
||||
console.log('登录失败!' + res.errMsg)
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage: function () {
|
||||
|
||||
}
|
||||
})
|
||||
@ -1,3 +1,3 @@
|
||||
{
|
||||
"navigationBarTitleText": "引导页"
|
||||
"navigationBarTitleText": "授权"
|
||||
}
|
||||
@ -1,4 +1,8 @@
|
||||
<view class='loading-pic'>
|
||||
<image src='/images/long.gif'></image>
|
||||
<view>正在加载中...</view>
|
||||
<view class="warrant">
|
||||
<view class='white'>
|
||||
<view class='pictrue'></view>
|
||||
<view class='tip'>您的信息和数据将受到保护</view>
|
||||
<button class='but' type="primary" open-type="getUserInfo" lang="zh_CN" bindgetuserinfo="getUserInfo">授权并登录</button>
|
||||
</view>
|
||||
<view class='mask'></view>
|
||||
</view>
|
||||
|
||||
File diff suppressed because one or more lines are too long
@ -13,6 +13,8 @@ Page({
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad: function (options) {
|
||||
app.setBarColor();
|
||||
app.setUserInfo();
|
||||
this.getSiteServicePhone();
|
||||
},
|
||||
|
||||
|
||||
@ -8,8 +8,13 @@ Page({
|
||||
lovely:'',
|
||||
url: app.globalData.urlImages,
|
||||
},
|
||||
setTouchMove: function (e) {
|
||||
var that = this;
|
||||
wxh.home(that, e);
|
||||
},
|
||||
onLoad: function (options) {
|
||||
app.setBarColor();
|
||||
app.setUserInfo();
|
||||
this.getList();
|
||||
},
|
||||
getList: function () {
|
||||
|
||||
@ -31,10 +31,4 @@
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
<movable-area class='index-con' >
|
||||
<movable-view class='index-area' direction="all">
|
||||
<navigator url='/pages/index/index' hover-class='none' open-type = "switchTab" >
|
||||
<image src='/images/home.png'></image>
|
||||
</navigator>
|
||||
</movable-view>
|
||||
</movable-area>
|
||||
<include src="/pages/home/home.wxml"/>
|
||||
|
||||
@ -17,3 +17,4 @@
|
||||
.list-time{position:absolute;bottom:10rpx;font-size:45rpx;left:18rpx;}
|
||||
.list-time>text{width:38rpx;height:38rpx;line-height:38rpx;text-align:center;display:inline-block;vertical-align:middle;background-color:#333333;color:#FFFFFF;font-size:20rpx;border-radius:5rpx;margin-right: 16rpx;}
|
||||
.list-time-top{background-color:rgba(255, 255, 255, 0.5);position:absolute;bottom:0;width:100%;height:60rpx;}
|
||||
@import "/pages/home/home.wxss";
|
||||
@ -16,11 +16,16 @@ Page({
|
||||
countDownSecond:"00"
|
||||
},
|
||||
|
||||
setTouchMove: function (e) {
|
||||
var that = this;
|
||||
wxh.home(that, e);
|
||||
},
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad: function (options) {
|
||||
app.setBarColor();
|
||||
app.setUserInfo();
|
||||
var that = this;
|
||||
var timeStamp = "1912245455"
|
||||
wxh.time2(timeStamp, that);
|
||||
|
||||
@ -41,10 +41,4 @@
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
<movable-area class='index-con' >
|
||||
<movable-view class='index-area' direction="all">
|
||||
<navigator url='/pages/index/index' hover-class='none' open-type = "switchTab" >
|
||||
<image src='/images/home.png'></image>
|
||||
</navigator>
|
||||
</movable-view>
|
||||
</movable-area>
|
||||
<include src="/pages/home/home.wxml"/>
|
||||
|
||||
@ -14,3 +14,4 @@
|
||||
.bottom-flag{font-size:26rpx;color:#FFA200;}
|
||||
.bottom-but{width:140rpx;height:58rpx;text-align:center;line-height:58rpx;border-radius:100rpx;background-color:#FF3D3D;color:#fff;font-size:24rpx;box-shadow:-1rpx 0rpx 5rpx #FF3D3D;}
|
||||
.bottom-on{color:#999999!important;}
|
||||
@import "/pages/home/home.wxss";
|
||||
|
||||
@ -17,6 +17,7 @@ Page({
|
||||
onLoad: function (options) {
|
||||
var that = this;
|
||||
app.setBarColor();
|
||||
app.setUserInfo();
|
||||
if (options.id){
|
||||
that.setData({
|
||||
newId: options.id
|
||||
|
||||
@ -23,6 +23,7 @@ Page({
|
||||
*/
|
||||
onLoad: function (options) {
|
||||
app.setBarColor();
|
||||
app.setUserInfo();
|
||||
this.getNewList();
|
||||
this.getArticleBanner();
|
||||
this.getArticleHot();
|
||||
|
||||
@ -20,6 +20,7 @@ Page({
|
||||
*/
|
||||
onLoad: function (options) {
|
||||
app.setBarColor();
|
||||
app.setUserInfo();
|
||||
this.getNoticeList();
|
||||
},
|
||||
getNoticeList:function(){
|
||||
|
||||
@ -8,7 +8,7 @@ Page({
|
||||
data: {
|
||||
cartArr: [
|
||||
{ "name": "微信", "icon": "icon-weixinzhifu", value:'weixin'},
|
||||
// { "name": "余额支付", "icon": "icon-yuezhifu", value: 'yue' },
|
||||
{ "name": "余额支付", "icon": "icon-yuezhifu", value: 'yue' },
|
||||
// { "name": "线下付款", "icon": "icon-wallet", value: 'offline' },
|
||||
// { "name": "到店自提", "icon": "icon-dianpu", value: 'ziti' },
|
||||
],
|
||||
@ -39,6 +39,7 @@ Page({
|
||||
*/
|
||||
onLoad: function (options) {
|
||||
app.setBarColor();
|
||||
app.setUserInfo();
|
||||
var that = this;
|
||||
if (options.pinkId){
|
||||
that.setData({
|
||||
|
||||
@ -3,288 +3,290 @@ var app = getApp();
|
||||
var wxh = require('../../utils/wxh.js');
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
url: app.globalData.urlImages
|
||||
},
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
url: app.globalData.urlImages
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad: function (e) {
|
||||
app.setBarColor();
|
||||
var header = {
|
||||
'content-type': 'application/x-www-form-urlencoded'
|
||||
};
|
||||
var uni = e.order_id;
|
||||
var that = this;
|
||||
wx.showLoading({ title: "正在加载中……" });
|
||||
wx.request({
|
||||
url: app.globalData.url + '/routine/auth_api/get_order?uid=' + app.globalData.uid,
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad: function (e) {
|
||||
app.setBarColor();
|
||||
app.globalData.openPages = '/pages/orders-con/orders-con?order_id=' + e.order_id;
|
||||
app.setUserInfo();
|
||||
var header = {
|
||||
'content-type': 'application/x-www-form-urlencoded'
|
||||
};
|
||||
var uni = e.order_id;
|
||||
var that = this;
|
||||
wx.showLoading({ title: "正在加载中……" });
|
||||
wx.request({
|
||||
url: app.globalData.url + '/routine/auth_api/get_order?uid=' + app.globalData.uid,
|
||||
data: { uni: uni },
|
||||
method: 'get',
|
||||
header: header,
|
||||
success: function (res) {
|
||||
wx.hideLoading();
|
||||
that.setData({
|
||||
ordercon:res.data.data
|
||||
});
|
||||
},
|
||||
fail: function (res) {
|
||||
console.log('submit fail');
|
||||
},
|
||||
complete: function (res) {
|
||||
console.log('submit complete');
|
||||
}
|
||||
});
|
||||
},
|
||||
getPay:function(e){
|
||||
var that = this;
|
||||
wx.request({
|
||||
url: app.globalData.url + '/routine/auth_api/pay_order?uid=' + app.globalData.uid +'&uni='+e.target.dataset.id,
|
||||
method: 'get',
|
||||
success: function (res) {
|
||||
var data = res.data.data;
|
||||
if (res.data.code == 200 && res.data.data.status == 'WECHAT_PAY') {
|
||||
var jsConfig = res.data.data.result.jsConfig;
|
||||
console.log(jsConfig);
|
||||
wx.requestPayment({
|
||||
timeStamp: jsConfig.timeStamp,
|
||||
nonceStr: jsConfig.nonceStr,
|
||||
package: jsConfig.package,
|
||||
signType: jsConfig.signType,
|
||||
paySign: jsConfig.paySign,
|
||||
success: function (res) {
|
||||
wx.showToast({
|
||||
title: '支付成功',
|
||||
icon: 'success',
|
||||
duration: 1000,
|
||||
})
|
||||
setTimeout(function () {
|
||||
wx.navigateTo({ //跳转至指定页面并关闭其他打开的所有页面(这个最好用在返回至首页的的时候)
|
||||
url: '/pages/orders-con/orders-con?order_id=' + data.result.orderId
|
||||
})
|
||||
}, 1200)
|
||||
},
|
||||
fail: function (res) {
|
||||
wx.showToast({
|
||||
title: '支付失败',
|
||||
icon: 'success',
|
||||
duration: 1000,
|
||||
})
|
||||
// setTimeout(function () {
|
||||
// wx.navigateTo({
|
||||
// url: '/pages/orders-con/orders-con?order_id=' + data.result.orderId
|
||||
// })
|
||||
// }, 1200)
|
||||
},
|
||||
complete: function (res) {
|
||||
console.log(res);
|
||||
if (res.errMsg == 'requestPayment:cancel') {
|
||||
wx.showToast({
|
||||
title: '取消支付',
|
||||
icon: 'none',
|
||||
duration: 1000,
|
||||
})
|
||||
// setTimeout(function () {
|
||||
// wx.navigateTo({ //跳转至指定页面并关闭其他打开的所有页面(这个最好用在返回至首页的的时候)
|
||||
// url: '/pages/orders-con/orders-con?order_id=' + data.result.orderId
|
||||
// })
|
||||
// }, 1200)
|
||||
}
|
||||
},
|
||||
})
|
||||
} else if (res.data.code == 200){
|
||||
wx.showToast({
|
||||
title: res.data.msg,
|
||||
icon: 'success',
|
||||
duration: 2000
|
||||
})
|
||||
setTimeout(function () {
|
||||
wx.navigateTo({ //跳转至指定页面并关闭其他打开的所有页面(这个最好用在返回至首页的的时候)
|
||||
url: '/pages/orders-con/orders-con?order_id=' + data.result.orderId
|
||||
})
|
||||
}, 1200)
|
||||
}else{
|
||||
wx.showToast({
|
||||
title: res.data.msg,
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
})
|
||||
setTimeout(function () {
|
||||
wx.navigateTo({ //跳转至指定页面并关闭其他打开的所有页面(这个最好用在返回至首页的的时候)
|
||||
url: '/pages/orders-con/orders-con?order_id=' + data.result.orderId
|
||||
})
|
||||
}, 1200)
|
||||
}
|
||||
},
|
||||
fail: function (res) {
|
||||
console.log('submit fail');
|
||||
}
|
||||
});
|
||||
},
|
||||
delOrder:function(e){
|
||||
var header = {
|
||||
'content-type': 'application/x-www-form-urlencoded'
|
||||
};
|
||||
var uni = e.currentTarget.dataset.uni;
|
||||
var that = this;
|
||||
wx.showModal({
|
||||
title: '确认删除订单?',
|
||||
content: '订单删除后将无法查看',
|
||||
success: function (res) {
|
||||
if (res.confirm) {
|
||||
wx.request({
|
||||
url: app.globalData.url + '/routine/auth_api/user_remove_order?uid=' + app.globalData.uid,
|
||||
data: { uni: uni },
|
||||
method: 'get',
|
||||
header: header,
|
||||
success: function (res) {
|
||||
wx.hideLoading();
|
||||
that.setData({
|
||||
ordercon:res.data.data
|
||||
});
|
||||
if (res.data.code == 200) {
|
||||
wx.showToast({
|
||||
title: '成功',
|
||||
icon: 'success',
|
||||
duration: 2000
|
||||
})
|
||||
setTimeout(function(){
|
||||
wx.navigateTo({
|
||||
url: '/pages/orders-list/orders-list',
|
||||
})
|
||||
},1500)
|
||||
} else {
|
||||
wx.showToast({
|
||||
title: res.data.msg,
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
})
|
||||
}
|
||||
// that.setData({
|
||||
// ordercon: that.data.ordercon
|
||||
// });
|
||||
},
|
||||
fail: function (res) {
|
||||
console.log('submit fail');
|
||||
console.log('submit fail');
|
||||
},
|
||||
complete: function (res) {
|
||||
console.log('submit complete');
|
||||
console.log('submit complete');
|
||||
}
|
||||
});
|
||||
},
|
||||
getPay:function(e){
|
||||
var that = this;
|
||||
wx.request({
|
||||
url: app.globalData.url + '/routine/auth_api/pay_order?uid=' + app.globalData.uid +'&uni='+e.target.dataset.id,
|
||||
});
|
||||
} else if (res.cancel) {
|
||||
console.log('用户点击取消')
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
goTel:function(e){
|
||||
console.log(e);
|
||||
wx.makePhoneCall({
|
||||
phoneNumber: e.currentTarget.dataset.tel //仅为示例,并非真实的电话号码
|
||||
})
|
||||
},
|
||||
goJoinPink:function(e){
|
||||
var uni = e.currentTarget.dataset.uni;
|
||||
wx.navigateTo({
|
||||
url: '/pages/join-pink/index?id=' + uni,
|
||||
})
|
||||
},
|
||||
confirmOrder:function(e){
|
||||
var header = {
|
||||
'content-type': 'application/x-www-form-urlencoded'
|
||||
};
|
||||
var uni = e.currentTarget.dataset.uni;
|
||||
var that = this;
|
||||
wx.showModal({
|
||||
title: '确认收货',
|
||||
content: '为保障权益,请收到货确认无误后,再确认收货',
|
||||
success: function (res) {
|
||||
if (res.confirm) {
|
||||
wx.request({
|
||||
url: app.globalData.url + '/routine/auth_api/user_take_order?uid=' + app.globalData.uid,
|
||||
data: { uni: uni },
|
||||
method: 'get',
|
||||
header: header,
|
||||
success: function (res) {
|
||||
var data = res.data.data;
|
||||
if (res.data.code == 200 && res.data.data.status == 'WECHAT_PAY') {
|
||||
var jsConfig = res.data.data.result.jsConfig;
|
||||
console.log(jsConfig);
|
||||
wx.requestPayment({
|
||||
timeStamp: jsConfig.timeStamp,
|
||||
nonceStr: jsConfig.nonceStr,
|
||||
package: jsConfig.package,
|
||||
signType: jsConfig.signType,
|
||||
paySign: jsConfig.paySign,
|
||||
success: function (res) {
|
||||
wx.showToast({
|
||||
title: '支付成功',
|
||||
icon: 'success',
|
||||
duration: 1000,
|
||||
})
|
||||
setTimeout(function () {
|
||||
wx.navigateTo({ //跳转至指定页面并关闭其他打开的所有页面(这个最好用在返回至首页的的时候)
|
||||
url: '/pages/orders-con/orders-con?order_id=' + data.result.orderId
|
||||
})
|
||||
}, 1200)
|
||||
},
|
||||
fail: function (res) {
|
||||
wx.showToast({
|
||||
title: '支付失败',
|
||||
icon: 'success',
|
||||
duration: 1000,
|
||||
})
|
||||
// setTimeout(function () {
|
||||
// wx.navigateTo({
|
||||
// url: '/pages/orders-con/orders-con?order_id=' + data.result.orderId
|
||||
// })
|
||||
// }, 1200)
|
||||
},
|
||||
complete: function (res) {
|
||||
console.log(res);
|
||||
if (res.errMsg == 'requestPayment:cancel') {
|
||||
wx.showToast({
|
||||
title: '取消支付',
|
||||
icon: 'none',
|
||||
duration: 1000,
|
||||
})
|
||||
// setTimeout(function () {
|
||||
// wx.navigateTo({ //跳转至指定页面并关闭其他打开的所有页面(这个最好用在返回至首页的的时候)
|
||||
// url: '/pages/orders-con/orders-con?order_id=' + data.result.orderId
|
||||
// })
|
||||
// }, 1200)
|
||||
}
|
||||
},
|
||||
})
|
||||
} else if (res.data.code == 200){
|
||||
wx.showToast({
|
||||
title: res.data.msg,
|
||||
icon: 'success',
|
||||
duration: 2000
|
||||
})
|
||||
setTimeout(function () {
|
||||
wx.navigateTo({ //跳转至指定页面并关闭其他打开的所有页面(这个最好用在返回至首页的的时候)
|
||||
url: '/pages/orders-con/orders-con?order_id=' + data.result.orderId
|
||||
})
|
||||
}, 1200)
|
||||
}else{
|
||||
wx.showToast({
|
||||
title: res.data.msg,
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
})
|
||||
setTimeout(function () {
|
||||
wx.navigateTo({ //跳转至指定页面并关闭其他打开的所有页面(这个最好用在返回至首页的的时候)
|
||||
url: '/pages/orders-con/orders-con?order_id=' + data.result.orderId
|
||||
})
|
||||
}, 1200)
|
||||
}
|
||||
if(res.data.code==200){
|
||||
wx.navigateTo({
|
||||
url: '/pages/orders-list/orders-list?nowstatus=4',
|
||||
})
|
||||
}else{
|
||||
wx.showToast({
|
||||
title: res.data.msg,
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
})
|
||||
}
|
||||
that.setData({
|
||||
ordercon: that.data.ordercon
|
||||
});
|
||||
},
|
||||
fail: function (res) {
|
||||
console.log('submit fail');
|
||||
console.log('submit fail');
|
||||
},
|
||||
complete: function (res) {
|
||||
console.log('submit complete');
|
||||
}
|
||||
});
|
||||
},
|
||||
delOrder:function(e){
|
||||
var header = {
|
||||
'content-type': 'application/x-www-form-urlencoded'
|
||||
};
|
||||
var uni = e.currentTarget.dataset.uni;
|
||||
var that = this;
|
||||
wx.showModal({
|
||||
title: '确认删除订单?',
|
||||
content: '订单删除后将无法查看',
|
||||
success: function (res) {
|
||||
if (res.confirm) {
|
||||
wx.request({
|
||||
url: app.globalData.url + '/routine/auth_api/user_remove_order?uid=' + app.globalData.uid,
|
||||
data: { uni: uni },
|
||||
method: 'get',
|
||||
header: header,
|
||||
success: function (res) {
|
||||
if (res.data.code == 200) {
|
||||
wx.showToast({
|
||||
title: '成功',
|
||||
icon: 'success',
|
||||
duration: 2000
|
||||
})
|
||||
setTimeout(function(){
|
||||
wx.navigateTo({
|
||||
url: '/pages/orders-list/orders-list',
|
||||
})
|
||||
},1500)
|
||||
} else {
|
||||
wx.showToast({
|
||||
title: res.data.msg,
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
})
|
||||
}
|
||||
// that.setData({
|
||||
// ordercon: that.data.ordercon
|
||||
// });
|
||||
},
|
||||
fail: function (res) {
|
||||
console.log('submit fail');
|
||||
},
|
||||
complete: function (res) {
|
||||
console.log('submit complete');
|
||||
}
|
||||
});
|
||||
} else if (res.cancel) {
|
||||
console.log('用户点击取消')
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
goTel:function(e){
|
||||
console.log(e);
|
||||
wx.makePhoneCall({
|
||||
phoneNumber: e.currentTarget.dataset.tel //仅为示例,并非真实的电话号码
|
||||
})
|
||||
},
|
||||
goJoinPink:function(e){
|
||||
var uni = e.currentTarget.dataset.uni;
|
||||
wx.navigateTo({
|
||||
url: '/pages/join-pink/index?id=' + uni,
|
||||
})
|
||||
},
|
||||
confirmOrder:function(e){
|
||||
var header = {
|
||||
'content-type': 'application/x-www-form-urlencoded'
|
||||
};
|
||||
var uni = e.currentTarget.dataset.uni;
|
||||
var that = this;
|
||||
wx.showModal({
|
||||
title: '确认收货',
|
||||
content: '为保障权益,请收到货确认无误后,再确认收货',
|
||||
success: function (res) {
|
||||
if (res.confirm) {
|
||||
wx.request({
|
||||
url: app.globalData.url + '/routine/auth_api/user_take_order?uid=' + app.globalData.uid,
|
||||
data: { uni: uni },
|
||||
method: 'get',
|
||||
header: header,
|
||||
success: function (res) {
|
||||
if(res.data.code==200){
|
||||
wx.navigateTo({
|
||||
url: '/pages/orders-list/orders-list?nowstatus=4',
|
||||
})
|
||||
}else{
|
||||
wx.showToast({
|
||||
title: res.data.msg,
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
})
|
||||
}
|
||||
that.setData({
|
||||
ordercon: that.data.ordercon
|
||||
});
|
||||
},
|
||||
fail: function (res) {
|
||||
console.log('submit fail');
|
||||
},
|
||||
complete: function (res) {
|
||||
console.log('submit complete');
|
||||
}
|
||||
});
|
||||
} else if (res.cancel) {
|
||||
console.log('用户点击取消')
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
goIndex:function(){
|
||||
wx.switchTab({
|
||||
url: '/pages/index/index'
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady: function () {
|
||||
});
|
||||
} else if (res.cancel) {
|
||||
console.log('用户点击取消')
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
goIndex:function(){
|
||||
wx.switchTab({
|
||||
url: '/pages/index/index'
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady: function () {
|
||||
|
||||
},
|
||||
|
||||
},
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow: function () {
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide: function () {
|
||||
|
||||
},
|
||||
|
||||
},
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide: function () {
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh: function () {
|
||||
|
||||
},
|
||||
|
||||
},
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage: function () {
|
||||
|
||||
}
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage: function () {
|
||||
|
||||
}
|
||||
})
|
||||
@ -116,8 +116,6 @@
|
||||
<view wx:if="{{ordercon._status._type==1 && ordercon.combination_id}}" class='pay-btn' bindtap='goJoinPink' data-uni='{{ordercon.pink_id}}'>查看拼团</view>
|
||||
<navigator wx:if="{{ordercon._status._type==2 && ordercon.delivery_type == 'express'}}" hover-class="none" url='/pages/logistics/logistics?orderId={{ordercon.order_id}}'><view class='delete-btn' >查看物流</view></navigator>
|
||||
<view wx:if="{{ordercon._status._type==2}}" class='pay-btn' bindtap='confirmOrder' data-uni='{{ordercon.order_id}}'>确认收货</view>
|
||||
<view wx:if="{{ordercon._status._type==4}}" class='delete-btn' bindtap='delOrder' data-uni='{{ordercon.order_id}}'>删除订单</view>
|
||||
<!-- <navigator wx:if="{{ordercon._status._type==3}}" hover-class="none" url='/pages/product-con/index'><view class='delete-btn'>再次购买</view></navigator> -->
|
||||
<!-- <navigator wx:if="{{ordercon._status._type==3}}" hover-class="none" url='/pages/comment-con/comment-con?order_id={{ordercon.order_id}}'><view class='pay-btn'>立即评价</view></navigator> -->
|
||||
<view wx:if="{{ordercon._status._type==4 || ordercon._status._type==0}}" class='delete-btn' bindtap='delOrder' data-uni='{{ordercon.order_id}}'>删除订单</view>
|
||||
<navigator wx:if="{{!ordercon.seckill_id && !ordercon.bargain_id && !ordercon.combination_id && (ordercon._status._type==3||ordercon._status._type==4)}}" hover-class="none" bindtap='goIndex'><view class='pay-btn'>再次购买</view></navigator>
|
||||
</view>
|
||||
@ -13,6 +13,10 @@ Page({
|
||||
title: "玩命加载中...",
|
||||
hidden: false
|
||||
},
|
||||
setTouchMove: function (e) {
|
||||
var that = this;
|
||||
wxh.home(that, e);
|
||||
},
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
|
||||
@ -52,12 +52,6 @@
|
||||
</block>
|
||||
<view class='loading flex'><icon class='iconfont icon-jiazaizhong loadingpic' hidden='{{hidden}}'></icon>{{title}}</view>
|
||||
</view>
|
||||
<movable-area class='index-con' >
|
||||
<movable-view class='index-area' direction="all">
|
||||
<navigator url='/pages/index/index' hover-class='none' open-type = "switchTab" >
|
||||
<image src='/images/home.png'></image>
|
||||
</navigator>
|
||||
</movable-view>
|
||||
</movable-area>
|
||||
<include src="/pages/home/home.wxml"/>
|
||||
|
||||
|
||||
|
||||
@ -27,4 +27,5 @@
|
||||
.info-list .pro-item:last-child .wrapper{border-bottom: 0;}
|
||||
.state-ytk{color:#333!important;}
|
||||
.youfei{font-size:22rpx;}
|
||||
.kuang{border:1rpx solid #999!important;background-color:#fff!important;color:#999!important;}
|
||||
.kuang{border:1rpx solid #999!important;background-color:#fff!important;color:#999!important;}
|
||||
@import "/pages/home/home.wxss";
|
||||
@ -14,6 +14,8 @@ Page({
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad: function (options) {
|
||||
app.setBarColor();
|
||||
app.setUserInfo();
|
||||
this.getUserInfo();
|
||||
},
|
||||
getUserInfo:function(){
|
||||
|
||||
@ -8,6 +8,7 @@ Page({
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
posterImage:'',//海报路径
|
||||
attrName:'',
|
||||
attr:'选择商品属性',
|
||||
attrValue:'',
|
||||
@ -42,6 +43,10 @@ Page({
|
||||
status:0,
|
||||
actionSheetHidden:true,
|
||||
},
|
||||
setTouchMove: function (e) {
|
||||
var that = this;
|
||||
wxh.home(that, e);
|
||||
},
|
||||
goPhone: function () {
|
||||
wx.request({
|
||||
url: app.globalData.url + '/routine/auth_api/get_site_phone?uid=' + app.globalData.uid,
|
||||
@ -136,6 +141,61 @@ Page({
|
||||
actionSheetHidden: !this.data.actionSheetHidden
|
||||
})
|
||||
},
|
||||
savePosterPath:function(){
|
||||
var that = this;
|
||||
wx.downloadFile({
|
||||
url: that.data.posterImage,
|
||||
success: function(res) {
|
||||
var path = res.tempFilePath;
|
||||
wx.saveImageToPhotosAlbum({
|
||||
filePath: path,
|
||||
success: function(res) {
|
||||
wx.showToast({
|
||||
title: '保存成功',
|
||||
icon: 'success',
|
||||
duration: 1500,
|
||||
})
|
||||
},
|
||||
fail: function (res) {
|
||||
wx.showToast({
|
||||
title: '保存失败',
|
||||
icon: 'none',
|
||||
duration: 1500,
|
||||
})
|
||||
},
|
||||
complete: function(res) {},
|
||||
})
|
||||
},
|
||||
fail: function(res) {},
|
||||
complete: function(res) {},
|
||||
})
|
||||
},
|
||||
goPoster:function(){
|
||||
var that = this;
|
||||
wx.request({
|
||||
url: app.globalData.url + '/routine/auth_api/poster?uid=' + app.globalData.uid,
|
||||
method: 'GET',
|
||||
data: {
|
||||
id: that.data.id,
|
||||
},
|
||||
success: function (res) {
|
||||
if(res.data.code == 200){
|
||||
that.setData({
|
||||
posterImage: app.globalData.url + res.data.msg,
|
||||
actionSheetHidden: !that.data.actionSheetHidden
|
||||
})
|
||||
that.savePosterPath();
|
||||
}else{
|
||||
wx.showToast({
|
||||
title: res.data.msg,
|
||||
icon: 'none',
|
||||
duration: 1500,
|
||||
mask: true,
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
goPhoto:function(){
|
||||
var that = this;
|
||||
wx.showActionSheet({
|
||||
|
||||
@ -15,13 +15,21 @@
|
||||
</view>
|
||||
<action-sheet hidden="{{actionSheetHidden}}" bindchange="listenerActionSheet" >
|
||||
<action-sheet-item >
|
||||
<button open-type="share" class='contact'>发送给朋友</button>
|
||||
<button open-type="share" class='contact' >
|
||||
<view class='iconn'></view>
|
||||
发送给朋友
|
||||
</button>
|
||||
<button class='contact' bindtap='goPoster' >
|
||||
<view class='iconn iconn1'></view>
|
||||
生成海报
|
||||
</button>
|
||||
<!-- <view bindtap='goPoster' class='action-sheet'>
|
||||
<view class='iconn iconn1'></view>
|
||||
生成海报
|
||||
</view> -->
|
||||
</action-sheet-item>
|
||||
<!-- <action-sheet-item bindtap='goPhoto' class='action-sheet'>
|
||||
生成海报
|
||||
</action-sheet-item> -->
|
||||
<!--自动隐藏action-sheet-->
|
||||
<action-sheet-cancel>取消</action-sheet-cancel>
|
||||
<!-- <action-sheet-cancel>取消</action-sheet-cancel> -->
|
||||
</action-sheet>
|
||||
<view class='price-wrapper flex'>
|
||||
<view class='price'><text>¥</text>{{storeInfo.price}}</view>
|
||||
@ -38,10 +46,10 @@
|
||||
<view>销量:{{storeInfo.sales}}{{storeInfo.unit_name}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class='block-bar' bindtap='goCoupon'>
|
||||
<view class='block-bar' bindtap='goCoupon'>
|
||||
<text class='title'>领券</text>
|
||||
<text>领取优惠券 </text>
|
||||
</view> -->
|
||||
</view>
|
||||
<!-- <view class='block-bar integral' wx:if="{{storeInfo.give_integral > 0}}">
|
||||
<text class='title'>积分</text>
|
||||
<text>购买可获得{{storeInfo.give_integral}}积分</text>
|
||||
@ -108,12 +116,6 @@
|
||||
<view class='payment-btn' bindtap='goOrder'>确认下单</view>
|
||||
</view>
|
||||
</view>
|
||||
<movable-area class='index-con' >
|
||||
<movable-view class='index-area' direction="all">
|
||||
<navigator url='/pages/index/index' hover-class='none' open-type = "switchTab" >
|
||||
<image src='/images/home.png'></image>
|
||||
</navigator>
|
||||
</movable-view>
|
||||
</movable-area>
|
||||
<include src="/pages/home/home.wxml"/>
|
||||
<include src="/pages/foo-tan/foo-tan.wxml"/>
|
||||
<import src="/wxParse/wxParse.wxml"/>
|
||||
|
||||
File diff suppressed because one or more lines are too long
@ -30,6 +30,7 @@ Page({
|
||||
*/
|
||||
onLoad: function (options) {
|
||||
app.setBarColor();
|
||||
app.setUserInfo();
|
||||
if (options.id){
|
||||
this.setData({
|
||||
seckillId: options.id
|
||||
|
||||
@ -99,4 +99,6 @@
|
||||
</movable-area>
|
||||
|
||||
<include src="/pages/foo-tan/foo-tan.wxml"/>
|
||||
<import src="/wxParse/wxParse.wxml"/>
|
||||
<import src="/wxParse/wxParse.wxml"/>
|
||||
|
||||
|
||||
|
||||
@ -53,6 +53,7 @@ swiper-item{position: relative; width: 100%;}
|
||||
.item-span{min-width:20rpx;height:20rpx;border-radius:50rpx;background-color:#ff3d3d;color: #fff;display:block;font-size:12rpx;text-align:center;line-height:20rpx;position:absolute;right:23rpx;top:0;}
|
||||
.countdown-time text{height:35rpx;padding:0 8rpx;display:inline-block;background-color:#fff;color:#ff3d3d;line-height:35rpx;border-radius:5rpx;margin-top:8rpx;}
|
||||
@import "/pages/foo-tan/foo-tan.wxss";
|
||||
@import "/wxParse/wxParse.wxss";
|
||||
.wxParse-p{margin-bottom:-4px;
|
||||
}
|
||||
@import "/wxParse/wxParse.wxss";
|
||||
|
||||
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -15,6 +15,8 @@ Page({
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad: function (options) {
|
||||
app.setBarColor();
|
||||
app.setUserInfo();
|
||||
var that = this;
|
||||
var header = {
|
||||
'content-type': 'application/x-www-form-urlencoded',
|
||||
|
||||
@ -1,154 +1,155 @@
|
||||
var app = getApp();
|
||||
// pages/promotion-order/promotion-order.js
|
||||
Page({
|
||||
data: {
|
||||
url: app.globalData.urlImages,
|
||||
currentTab:"",
|
||||
hiddens:true,
|
||||
icondui:0,
|
||||
icondui2: 0,
|
||||
alloeder: ['全部订单', '已评价', '已发货'],
|
||||
allOrder:"全部订单",
|
||||
promoter:"推广粉丝",
|
||||
promoterList: [],
|
||||
orderlist:[],
|
||||
orderconut:'',
|
||||
ordermoney:''
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad: function (options) {
|
||||
app.setBarColor();
|
||||
app.setUserInfo();
|
||||
var header = {
|
||||
'content-type': 'application/x-www-form-urlencoded',
|
||||
};
|
||||
this.orderlist();
|
||||
this.extension(header);
|
||||
this.orderlistmoney();
|
||||
|
||||
},
|
||||
extension: function (header){
|
||||
var that = this;
|
||||
wx.request({
|
||||
url: app.globalData.url + '/routine/auth_api/get_spread_list?uid=' + app.globalData.uid,
|
||||
method: 'POST',
|
||||
header: header,
|
||||
success: function (res) {
|
||||
// console.log(res.data.data);
|
||||
if (res.data.code==200){
|
||||
that.setData({
|
||||
promoterList: res.data.data.list
|
||||
})
|
||||
}else{
|
||||
that.setData({
|
||||
promoterList: []
|
||||
})
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
spread: function () {
|
||||
wx.navigateTo({
|
||||
url: '../../pages/spread/spread',
|
||||
success: function (res) { },
|
||||
fail: function (res) { },
|
||||
complete: function (res) { },
|
||||
})
|
||||
},
|
||||
|
||||
ordertap:function(e){
|
||||
var currentTab = e.target.dataset.index;
|
||||
this.setData({
|
||||
currentTab:currentTab,
|
||||
hiddens:false
|
||||
})
|
||||
console.log(this.data.currentTab)
|
||||
},
|
||||
icondui:function(e){
|
||||
var that=this;
|
||||
var icondui = e.target.dataset.ider;
|
||||
data: {
|
||||
url: app.globalData.urlImages,
|
||||
currentTab:"",
|
||||
hiddens:true,
|
||||
icondui:0,
|
||||
icondui2: 0,
|
||||
alloeder: ['全部订单', '已评价', '已发货'],
|
||||
allOrder:"全部订单",
|
||||
promoter:"推广粉丝",
|
||||
promoterList: [],
|
||||
orderlist:[],
|
||||
orderconut:'',
|
||||
ordermoney:''
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad: function (options) {
|
||||
app.setBarColor();
|
||||
app.setUserInfo();
|
||||
var header = {
|
||||
'content-type': 'application/x-www-form-urlencoded',
|
||||
};
|
||||
this.orderlist();
|
||||
this.extension(header);
|
||||
this.orderlistmoney();
|
||||
|
||||
},
|
||||
extension: function (header){
|
||||
var that = this;
|
||||
wx.request({
|
||||
url: app.globalData.url + '/routine/auth_api/get_spread_list?uid=' + app.globalData.uid,
|
||||
method: 'POST',
|
||||
header: header,
|
||||
success: function (res) {
|
||||
// console.log(res.data.data);
|
||||
if (res.data.code==200){
|
||||
that.setData({
|
||||
promoterList: res.data.data.list
|
||||
})
|
||||
}else{
|
||||
that.setData({
|
||||
icondui: icondui,
|
||||
hiddens: true,
|
||||
allOrder: that.data.alloeder[icondui],
|
||||
currentTab: -1
|
||||
promoterList: []
|
||||
})
|
||||
that.orderlist();
|
||||
this.orderlistmoney();
|
||||
},
|
||||
icondui2:function(e){
|
||||
var that = this;
|
||||
var icondui2 = e.target.dataset.ider;
|
||||
var promoterLists = that.data.promoterList;
|
||||
var len = promoterLists.length;
|
||||
for (var index in promoterLists){
|
||||
if (promoterLists[index]['uid'] == icondui2){
|
||||
var promoter = promoterLists[index]['nickname'];
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
spread: function () {
|
||||
wx.navigateTo({
|
||||
url: '../../pages/spread/spread',
|
||||
success: function (res) { },
|
||||
fail: function (res) { },
|
||||
complete: function (res) { },
|
||||
})
|
||||
},
|
||||
|
||||
ordertap:function(e){
|
||||
var currentTab = e.target.dataset.index;
|
||||
this.setData({
|
||||
currentTab:currentTab,
|
||||
hiddens:false
|
||||
})
|
||||
console.log(this.data.currentTab)
|
||||
},
|
||||
icondui:function(e){
|
||||
var that=this;
|
||||
var icondui = e.target.dataset.ider;
|
||||
|
||||
that.setData({
|
||||
icondui2: icondui2,
|
||||
hiddens: true,
|
||||
promoter: promoter,
|
||||
currentTab: -1
|
||||
})
|
||||
that.orderlist();
|
||||
},
|
||||
zhaoguan:function(e){
|
||||
this.setData({
|
||||
hiddens: true,
|
||||
currentTab: -1
|
||||
})
|
||||
},
|
||||
orderlist: function (){
|
||||
var header = {
|
||||
'content-type': 'application/x-www-form-urlencoded',
|
||||
};
|
||||
var that = this;
|
||||
var icondui = that.data.icondui;
|
||||
var icondui2 = that.data.icondui2;
|
||||
wx.request({
|
||||
url: app.globalData.url + '/routine/auth_api/subordinateOrderlist?uid=' + app.globalData.uid,
|
||||
data: { uid: icondui2, status: icondui},
|
||||
method: 'POST',
|
||||
header: header,
|
||||
success: function (res) {
|
||||
if (res.data.code==200){
|
||||
that.setData({
|
||||
orderlist: res.data.data
|
||||
})
|
||||
}else{
|
||||
that.setData({
|
||||
orderlist: []
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
orderlistmoney: function () {
|
||||
var that = this;
|
||||
wx.request({
|
||||
url: app.globalData.url + '/routine/auth_api/subordinateOrderlistmoney?uid=' + app.globalData.uid,
|
||||
data: { status: that.data.icondui},
|
||||
method: 'POST',
|
||||
success: function (res) {
|
||||
if (res.data.code == 200) {
|
||||
that.setData({
|
||||
ordermoney: res.data.data.sum,
|
||||
orderconut: res.data.data.cont
|
||||
})
|
||||
} else {
|
||||
that.setData({
|
||||
ordermoney:'',
|
||||
orderconut:''
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
that.setData({
|
||||
icondui: icondui,
|
||||
hiddens: true,
|
||||
allOrder: that.data.alloeder[icondui],
|
||||
currentTab: -1
|
||||
})
|
||||
that.orderlist();
|
||||
this.orderlistmoney();
|
||||
},
|
||||
icondui2:function(e){
|
||||
var that = this;
|
||||
var icondui2 = e.target.dataset.ider;
|
||||
var promoterLists = that.data.promoterList;
|
||||
var len = promoterLists.length;
|
||||
for (var index in promoterLists){
|
||||
if (promoterLists[index]['uid'] == icondui2){
|
||||
var promoter = promoterLists[index]['nickname'];
|
||||
}
|
||||
}
|
||||
|
||||
that.setData({
|
||||
icondui2: icondui2,
|
||||
hiddens: true,
|
||||
promoter: promoter,
|
||||
currentTab: -1
|
||||
})
|
||||
that.orderlist();
|
||||
},
|
||||
zhaoguan:function(e){
|
||||
this.setData({
|
||||
hiddens: true,
|
||||
currentTab: -1
|
||||
})
|
||||
},
|
||||
orderlist: function (){
|
||||
var header = {
|
||||
'content-type': 'application/x-www-form-urlencoded',
|
||||
};
|
||||
var that = this;
|
||||
var icondui = that.data.icondui;
|
||||
var icondui2 = that.data.icondui2;
|
||||
wx.request({
|
||||
url: app.globalData.url + '/routine/auth_api/subordinateOrderlist?uid=' + app.globalData.uid,
|
||||
data: { uid: icondui2, status: icondui},
|
||||
method: 'POST',
|
||||
header: header,
|
||||
success: function (res) {
|
||||
if (res.data.code==200){
|
||||
that.setData({
|
||||
orderlist: res.data.data
|
||||
})
|
||||
}else{
|
||||
that.setData({
|
||||
orderlist: []
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
orderlistmoney: function () {
|
||||
var that = this;
|
||||
wx.request({
|
||||
url: app.globalData.url + '/routine/auth_api/subordinateOrderlistmoney?uid=' + app.globalData.uid,
|
||||
data: { status: that.data.icondui},
|
||||
method: 'POST',
|
||||
success: function (res) {
|
||||
if (res.data.code == 200) {
|
||||
that.setData({
|
||||
ordermoney: res.data.data.sum,
|
||||
orderconut: res.data.data.cont
|
||||
})
|
||||
} else {
|
||||
that.setData({
|
||||
ordermoney:'',
|
||||
orderconut:''
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
})
|
||||
@ -18,6 +18,7 @@ Page({
|
||||
*/
|
||||
onLoad: function (options) {
|
||||
app.setBarColor();
|
||||
app.setUserInfo();
|
||||
this.getorderlist();
|
||||
},
|
||||
searchSubmit: function () {
|
||||
|
||||
@ -20,6 +20,7 @@ Page({
|
||||
*/
|
||||
onLoad: function (options) {
|
||||
app.setBarColor();
|
||||
app.setUserInfo();
|
||||
if (options.orderId){
|
||||
this.setData({
|
||||
orderId: options.orderId
|
||||
|
||||
@ -16,6 +16,7 @@ Page({
|
||||
*/
|
||||
onLoad: function (options) {
|
||||
app.setBarColor();
|
||||
app.setUserInfo();
|
||||
if (options.id){
|
||||
this.setData({
|
||||
orderId: options.id
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
var app = getApp();
|
||||
var wxh = require('../../utils/wxh.js');
|
||||
// pages/spread/spread.js
|
||||
Page({
|
||||
|
||||
@ -16,6 +17,10 @@ Page({
|
||||
hiddens:true
|
||||
},
|
||||
|
||||
setTouchMove: function (e) {
|
||||
var that = this;
|
||||
wxh.home(that, e);
|
||||
},
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
|
||||
@ -45,10 +45,4 @@
|
||||
<view class='tan-footer'>分销二维码</view>
|
||||
</view>
|
||||
<view class='zhao' hidden='{{hiddens}}' bindtap='tanguan'></view>
|
||||
<movable-area class='index-con' >
|
||||
<movable-view class='index-area' direction="all">
|
||||
<navigator url='/pages/index/index' hover-class='none' open-type = "switchTab" >
|
||||
<image src='/images/home.png'></image>
|
||||
</navigator>
|
||||
</movable-view>
|
||||
</movable-area>
|
||||
<include src="/pages/home/home.wxml"/>
|
||||
|
||||
@ -32,5 +32,6 @@ page{background-color:#fff;}
|
||||
.tan-icon{position:absolute;top:-218rpx;right:-153rpx;font-size:30rpx!important;width:60rpx;height:60rpx;text-align:center;line-height:60rpx;background-color:#E0E0E0;color:#A0A0A0;border-radius:50%;}
|
||||
.text-infos{display: flex;align-items: center; margin-left:20rpx;}
|
||||
.icon-erweima1{position: relative;top:5rpx;margin-right:10rpx;}
|
||||
@import "/pages/home/home.wxss";
|
||||
|
||||
|
||||
|
||||
@ -1,133 +1,138 @@
|
||||
var app = getApp();
|
||||
var wxh = require('../../utils/wxh.js');
|
||||
// pages/user/user.js
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
url: app.globalData.urlImages,
|
||||
userinfo:[],
|
||||
orderStatusNum:[],
|
||||
coupon:'',
|
||||
collect:''
|
||||
},
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
url: app.globalData.urlImages,
|
||||
userinfo:[],
|
||||
orderStatusNum:[],
|
||||
coupon:'',
|
||||
collect:''
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad: function (options) {
|
||||
app.setBarColor();
|
||||
app.setUserInfo();
|
||||
var header = {
|
||||
'content-type': 'application/x-www-form-urlencoded',
|
||||
};
|
||||
var that = this;
|
||||
wx.request({
|
||||
url: app.globalData.url + '/routine/auth_api/my?uid=' + app.globalData.uid,
|
||||
method: 'POST',
|
||||
header: header,
|
||||
success: function (res) {
|
||||
that.setData({
|
||||
userinfo: res.data.data,
|
||||
orderStatusNum: res.data.data.orderStatusNum
|
||||
})
|
||||
}
|
||||
});
|
||||
},
|
||||
goNotification:function(){
|
||||
wx.navigateTo({
|
||||
url: '/pages/news-list/news-list',
|
||||
setTouchMove: function (e) {
|
||||
var that = this;
|
||||
wxh.home(that, e);
|
||||
},
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad: function (options) {
|
||||
app.setBarColor();
|
||||
app.setUserInfo();
|
||||
var header = {
|
||||
'content-type': 'application/x-www-form-urlencoded',
|
||||
};
|
||||
var that = this;
|
||||
wx.request({
|
||||
url: app.globalData.url + '/routine/auth_api/my?uid=' + app.globalData.uid,
|
||||
method: 'POST',
|
||||
header: header,
|
||||
success: function (res) {
|
||||
that.setData({
|
||||
userinfo: res.data.data,
|
||||
orderStatusNum: res.data.data.orderStatusNum
|
||||
})
|
||||
},
|
||||
onShow: function () {
|
||||
var header = {
|
||||
'content-type': 'application/x-www-form-urlencoded',
|
||||
};
|
||||
var that = this;
|
||||
wx.request({
|
||||
url: app.globalData.url + '/routine/auth_api/my?uid=' + app.globalData.uid,
|
||||
method: 'POST',
|
||||
header: header,
|
||||
success: function (res) {
|
||||
that.setData({
|
||||
userinfo: res.data.data
|
||||
})
|
||||
}
|
||||
});
|
||||
},
|
||||
/**
|
||||
* 生命周期函数--我的余额
|
||||
*/
|
||||
money:function(){
|
||||
wx.navigateTo({
|
||||
url: '/pages/main/main?now=' + this.data.userinfo.now_money + '&uid='+app.globalData.uid,
|
||||
success: function (res) { },
|
||||
fail: function (res) { },
|
||||
complete: function (res) { },
|
||||
}
|
||||
});
|
||||
},
|
||||
goNotification:function(){
|
||||
wx.navigateTo({
|
||||
url: '/pages/news-list/news-list',
|
||||
})
|
||||
},
|
||||
onShow: function () {
|
||||
var header = {
|
||||
'content-type': 'application/x-www-form-urlencoded',
|
||||
};
|
||||
var that = this;
|
||||
wx.request({
|
||||
url: app.globalData.url + '/routine/auth_api/my?uid=' + app.globalData.uid,
|
||||
method: 'POST',
|
||||
header: header,
|
||||
success: function (res) {
|
||||
that.setData({
|
||||
userinfo: res.data.data
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 生命周期函数--我的积分
|
||||
*/
|
||||
integral: function () {
|
||||
wx.navigateTo({
|
||||
url: '/pages/integral-con/integral-con?inte=' + this.data.userinfo.integral + '&uid=' + app.globalData.uid,
|
||||
success: function (res) { },
|
||||
fail: function (res) { },
|
||||
complete: function (res) { },
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 生命周期函数--我的优惠卷
|
||||
*/
|
||||
coupons: function () {
|
||||
wx.navigateTo({
|
||||
url: '/pages/coupon/coupon',
|
||||
success: function (res) { },
|
||||
fail: function (res) { },
|
||||
complete: function (res) { },
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 生命周期函数--我的收藏
|
||||
*/
|
||||
collects: function () {
|
||||
wx.navigateTo({
|
||||
url: '/pages/collect/collect',
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 生命周期函数--我的推广人
|
||||
*/
|
||||
extension:function(){
|
||||
wx.navigateTo({
|
||||
url: '/pages/feree/feree',
|
||||
success: function (res) { },
|
||||
fail: function (res) { },
|
||||
complete: function (res) { },
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 生命周期函数--我的推广
|
||||
*/
|
||||
myextension: function () {
|
||||
wx.navigateTo({
|
||||
url: '/pages/extension/extension',
|
||||
success: function (res) { },
|
||||
fail: function (res) { },
|
||||
complete: function (res) { },
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 生命周期函数--我的砍价
|
||||
*/
|
||||
// cut_down_the_price:function(){
|
||||
// wx.navigateTo({
|
||||
// url: '../../pages/feree/feree',
|
||||
// success: function (res) { },
|
||||
// fail: function (res) { },
|
||||
// complete: function (res) { },
|
||||
// })
|
||||
// }
|
||||
}
|
||||
});
|
||||
},
|
||||
/**
|
||||
* 生命周期函数--我的余额
|
||||
*/
|
||||
money:function(){
|
||||
wx.navigateTo({
|
||||
url: '/pages/main/main?now=' + this.data.userinfo.now_money + '&uid='+app.globalData.uid,
|
||||
success: function (res) { },
|
||||
fail: function (res) { },
|
||||
complete: function (res) { },
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 生命周期函数--我的积分
|
||||
*/
|
||||
integral: function () {
|
||||
wx.navigateTo({
|
||||
url: '/pages/integral-con/integral-con?inte=' + this.data.userinfo.integral + '&uid=' + app.globalData.uid,
|
||||
success: function (res) { },
|
||||
fail: function (res) { },
|
||||
complete: function (res) { },
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 生命周期函数--我的优惠卷
|
||||
*/
|
||||
coupons: function () {
|
||||
wx.navigateTo({
|
||||
url: '/pages/coupon/coupon',
|
||||
success: function (res) { },
|
||||
fail: function (res) { },
|
||||
complete: function (res) { },
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 生命周期函数--我的收藏
|
||||
*/
|
||||
collects: function () {
|
||||
wx.navigateTo({
|
||||
url: '/pages/collect/collect',
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 生命周期函数--我的推广人
|
||||
*/
|
||||
extension:function(){
|
||||
wx.navigateTo({
|
||||
url: '/pages/feree/feree',
|
||||
success: function (res) { },
|
||||
fail: function (res) { },
|
||||
complete: function (res) { },
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 生命周期函数--我的推广
|
||||
*/
|
||||
myextension: function () {
|
||||
wx.navigateTo({
|
||||
url: '/pages/extension/extension',
|
||||
success: function (res) { },
|
||||
fail: function (res) { },
|
||||
complete: function (res) { },
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 生命周期函数--我的砍价
|
||||
*/
|
||||
// cut_down_the_price:function(){
|
||||
// wx.navigateTo({
|
||||
// url: '../../pages/feree/feree',
|
||||
// success: function (res) { },
|
||||
// fail: function (res) { },
|
||||
// complete: function (res) { },
|
||||
// })
|
||||
// }
|
||||
})
|
||||
@ -147,10 +147,8 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<movable-area class='index-con' >
|
||||
<movable-view class='index-area' direction="all">
|
||||
<navigator url='/pages/index/index' hover-class='none' open-type = "switchTab" >
|
||||
<image src='/images/home.png'></image>
|
||||
</navigator>
|
||||
</movable-view>
|
||||
</movable-area>
|
||||
<include src="/pages/home/home.wxml"/>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ -15,9 +15,9 @@ min-width:26rpx;height:26rpx;text-align:center;line-height:26rpx;}
|
||||
.title-bar{padding:0 28rpx; height: 88rpx; align-items: center; justify-content: space-between; border-bottom: 1px solid #f7f7f7; }
|
||||
.title-bar navigator{font-size: 24rpx; color:#999;}
|
||||
.list-wrapper{ flex-wrap: wrap; align-items: center;}
|
||||
.list-wrapper .item{width: 25%; text-align: center; margin-top:30rpx;position: relative}
|
||||
.list-wrapper .item{width: 25%; text-align: center;margin:20rpx 0;position: relative}
|
||||
.list-wrapper .item .iconfont{font-size: 45rpx;}
|
||||
.list-wrapper .item .text{font-size: 24rpx; color:#555;}
|
||||
.list-wrapper .item .text{font-size: 24rpx; color:#555;margin-top:10rpx;}
|
||||
|
||||
.orders image{width: 42rpx; height: 45rpx;}
|
||||
.orders .list-wrapper{height: 142rpx;}
|
||||
@ -37,3 +37,4 @@ min-width:26rpx;height:26rpx;text-align:center;line-height:26rpx;}
|
||||
.contact-but{background-color:#ffffff;line-height:normal!important;}
|
||||
.contact-but::after{border:none;}
|
||||
.item-span{min-width:26rpx;height:26rpx;border-radius:50rpx;background-color:#ff3d3d;color: #fff;display:block;font-size:20rpx;text-align:center;line-height:26rpx;position:absolute;right:46rpx;top:0;}
|
||||
@import "/pages/home/home.wxss";
|
||||
|
||||
@ -15,6 +15,14 @@ var carmin = function (that){
|
||||
minusStatus: minusStatus
|
||||
});
|
||||
}
|
||||
//返回首页
|
||||
var home = function (that, e) {
|
||||
if (e.touches[0].clientY < 500 && e.touches[0].clientY > 0) {
|
||||
that.setData({
|
||||
top: e.touches[0].clientY
|
||||
})
|
||||
}
|
||||
}
|
||||
//购物车加
|
||||
var carjia = function(that){
|
||||
var num = that.data.num;
|
||||
@ -143,5 +151,6 @@ module.exports = {
|
||||
time: time,
|
||||
footan: footan,
|
||||
tapsize: tapsize,
|
||||
home: home,
|
||||
time2: time2
|
||||
}
|
||||
@ -17,9 +17,9 @@
|
||||
color: #666;
|
||||
line-height: 1.8;
|
||||
}
|
||||
.wxParse-p{margin-bottom: -4px;}
|
||||
view{
|
||||
word-break:break-all;
|
||||
margin-bottom: -5rpx;
|
||||
}
|
||||
.wxParse-inline{
|
||||
display: inline;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user