更新代码
|
@ -191,7 +191,7 @@ export function logout(){
|
|||
*/
|
||||
export function getTemlIds(data)
|
||||
{
|
||||
return request.post('wechat/program/my/temp/list?limit=3&page=1', data , { noAuth:true});
|
||||
return request.get('wechat/program/my/temp/list', data , { noAuth:true});
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
13
api/user.js
|
@ -124,8 +124,8 @@ export function userActivity(){
|
|||
/*
|
||||
* 余额明细(types|2=全部,1=支出,2=收入)
|
||||
* */
|
||||
export function getCommissionInfo(q, types) {
|
||||
return request.get("spread/commission/" + types, q);
|
||||
export function getCommissionInfo(data) {
|
||||
return request.get("spread/commission/detail", data);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -405,5 +405,14 @@ export function getuserDalance()
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* 账单记录;
|
||||
*
|
||||
*/
|
||||
export function getBillList(data)
|
||||
{
|
||||
return request.get("recharge/bill/record",data);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -66,7 +66,7 @@
|
|||
//领取优惠券
|
||||
let ids = [];
|
||||
ids.push(id);
|
||||
setCouponReceive(ids).then(res=>{
|
||||
setCouponReceive(id).then(res=>{
|
||||
that.$emit('ChangCouponsUseState', index);
|
||||
that.$util.Tips({title: "领取成功"});
|
||||
that.$emit('ChangCoupons', list[index]);
|
||||
|
|
|
@ -62,6 +62,7 @@
|
|||
},
|
||||
goPay: function(number, paytype) {
|
||||
let that = this;
|
||||
let goPages = '/pages/order_pay_status/index?order_id=' + that.order_id;
|
||||
if (!that.order_id) return that.$util.Tips({
|
||||
title: '请选择要支付的订单'
|
||||
});
|
||||
|
@ -73,7 +74,12 @@
|
|||
});
|
||||
wechatOrderPay({
|
||||
orderNo: that.order_id,
|
||||
payChannel: this.$wechat.isWeixin() ? 'public' : 'weixinh5',
|
||||
// #ifdef MP
|
||||
payChannel: 'routine',
|
||||
// #endif
|
||||
// #ifdef H5 || APP-PLUS
|
||||
payChannel: that.$wechat.isWeixin() ? 'public' : 'weixinh5',
|
||||
// #endif
|
||||
payType: paytype
|
||||
}).then(res => {
|
||||
let jsConfig = res.data.jsConfig;
|
||||
|
@ -167,9 +173,9 @@
|
|||
break;
|
||||
case 'weixinh5':
|
||||
uni.hideLoading();
|
||||
location.replace(jsConfig.mwebUrl);
|
||||
location.replace(jsConfig.mwebUrl + '&redirect_url=' + window.location.protocol + '//' + window.location.host + goPages + '&status=1');
|
||||
return that.$util.Tips({
|
||||
title: "支付成功",
|
||||
title: "支付中",
|
||||
icon: 'success'
|
||||
}, () => {
|
||||
that.$emit('onChangeFun', {
|
||||
|
@ -178,119 +184,6 @@
|
|||
});
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
|
||||
// switch (paytype) {
|
||||
// case 'weixin':
|
||||
// if (res.data.result === undefined) return that.$util.Tips({
|
||||
// title: '缺少支付参数'
|
||||
// });
|
||||
// // #ifdef MP || APP-PLUS
|
||||
// let jsConfig = res.data.jsConfig;
|
||||
// uni.requestPayment({
|
||||
// timeStamp: jsConfig.timeStamp.toString(),
|
||||
// nonceStr: jsConfig.nonceStr,
|
||||
// package: jsConfig.package,
|
||||
// signType: jsConfig.signType,
|
||||
// paySign: jsConfig.paySign,
|
||||
// success: function(res) {
|
||||
// uni.hideLoading();
|
||||
// return that.$util.Tips({
|
||||
// title: '支付成功',
|
||||
// icon: 'success'
|
||||
// }, () => {
|
||||
// that.$emit('onChangeFun', {
|
||||
// action: 'pay_complete'
|
||||
// });
|
||||
// });
|
||||
// },
|
||||
// fail: function(e) {
|
||||
// uni.hideLoading();
|
||||
// return that.$util.Tips({
|
||||
// title: '取消支付'
|
||||
// }, () => {
|
||||
// that.$emit('onChangeFun', {
|
||||
// action: 'pay_fail'
|
||||
// });
|
||||
// });
|
||||
// },
|
||||
// complete: function(e) {
|
||||
// uni.hideLoading();
|
||||
// if (e.errMsg == 'requestPayment:cancel') return that.$util.Tips({
|
||||
// title: '取消支付'
|
||||
// }, () => {
|
||||
// that.$emit('onChangeFun', {
|
||||
// action: 'pay_fail'
|
||||
// });
|
||||
// });
|
||||
// },
|
||||
// });
|
||||
// // #endif
|
||||
// // #ifdef H5
|
||||
// if (res.data.status === "WECHAT_PAY") {
|
||||
// let jsConfig = res.data.jsConfig;
|
||||
// //let packages = 'prepay_id=' + jsConfig.prepayId;
|
||||
// let datas = {
|
||||
// timestamp:jsConfig.timeStamp,
|
||||
// nonceStr:jsConfig.nonceStr,
|
||||
// package:jsConfig.package,
|
||||
// signType:jsConfig.signType,
|
||||
// paySign:jsConfig.paySign
|
||||
// };
|
||||
// that.$wechat.pay(datas)
|
||||
// .then(() => {
|
||||
// return that.$util.Tips({
|
||||
// title: "支付成功",
|
||||
// icon: 'success'
|
||||
// }, () => {
|
||||
// that.$emit('onChangeFun', {
|
||||
// action: 'pay_complete'
|
||||
// });
|
||||
// });
|
||||
// })
|
||||
// .catch(function() {
|
||||
// return that.$util.Tips({
|
||||
// title: '支付失败'
|
||||
// });
|
||||
// });
|
||||
// } else {
|
||||
// uni.hideLoading();
|
||||
// location.replace(res.data.jsConfig.h5PayUrl);
|
||||
// return that.$util.Tips({
|
||||
// title: "支付成功",
|
||||
// icon: 'success'
|
||||
// }, () => {
|
||||
// that.$emit('onChangeFun', {
|
||||
// action: 'pay_complete'
|
||||
// });
|
||||
// });
|
||||
// }
|
||||
// // #endif
|
||||
// break;
|
||||
// case 'yue':
|
||||
// uni.hideLoading();
|
||||
// return that.$util.Tips({
|
||||
// title: '余额支付成功',
|
||||
// icon: 'success'
|
||||
// }, () => {
|
||||
// that.$emit('onChangeFun', {
|
||||
// action: 'pay_complete'
|
||||
// });
|
||||
// });
|
||||
// break;
|
||||
// case 'offline':
|
||||
// uni.hideLoading();
|
||||
// return that.$util.Tips({
|
||||
// title: '线下支付成功',
|
||||
// icon: 'success'
|
||||
// }, () => {
|
||||
// that.$emit('onChangeFun', {
|
||||
// action: 'pay_complete'
|
||||
// });
|
||||
// });
|
||||
// break;
|
||||
// }
|
||||
}).catch(err => {
|
||||
uni.hideLoading();
|
||||
return that.$util.Tips({
|
||||
|
|
|
@ -77,6 +77,9 @@
|
|||
|
||||
.recommend .recommendList {
|
||||
padding: 0 30rpx;
|
||||
/* #ifdef H5 */
|
||||
padding-bottom: 50rpx;
|
||||
/* #endif */
|
||||
}
|
||||
|
||||
.recommend .recommendList .item {
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
</scroll-view>
|
||||
</view>
|
||||
<view class="child-box" v-if="tabClick>0 && tabTitle[tabClick].child?tabTitle[tabClick].child.length>0:0">
|
||||
<scroll-view scroll-x="true" style="white-space: nowrap; display: flex;align-items: center; height: 100%;" scroll-with-animation :scroll-left="tabLeft" show-scrollbar="false">
|
||||
<scroll-view scroll-x="true">
|
||||
<view class="wrapper">
|
||||
<view v-for="(item,index) in tabTitle[tabClick].child?tabTitle[tabClick].child:[]" :key="index" class="child-item" :class="{on:index == childIndex}" @click="childTab(tabClick,index)">
|
||||
<image :src="item.extra" mode="" :style="{'background-color':item.extra?'none':'#f7f7f7'}"></image>
|
||||
|
@ -18,6 +18,17 @@
|
|||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
<!-- <image :src="item.extra" mode="" :style="{'background-color':(item.extra&&item.extra.indexOf('https://') > -1) || (item.extra&&item.extra.indexOf('http://') > -1)?'none':'#f7f7f7'}"></image> -->
|
||||
<!-- <view class="child-box" v-if="tabClick>0 && tabTitle[tabClick].child?tabTitle[tabClick].child.length>0:0">
|
||||
<scroll-view scroll-x="true" style="white-space: nowrap; display: flex;align-items: center; height: 100%;" scroll-with-animation :scroll-left="tabLeft" show-scrollbar="false">
|
||||
<view class="wrapper">
|
||||
<view v-for="(item,index) in tabTitle[tabClick].child?tabTitle[tabClick].child:[]" :key="index" class="child-item" :class="{on:index == childIndex}" @click="childTab(tabClick,index)">
|
||||
<image :src="item.extra" mode="" :style="{'background-color':item.extra?'none':'#f7f7f7'}"></image>
|
||||
<view class="txt line1">{{item.name}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view> -->
|
||||
</view>
|
||||
</template>
|
||||
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
|
||||
var josn=require('../../domain.json')
|
||||
let domain = josn.domain
|
||||
let domain = 'http://localhost:8080'
|
||||
|
||||
module.exports = {
|
||||
// 请求域名 格式: https://您的域名
|
||||
|
@ -12,7 +11,6 @@ module.exports = {
|
|||
// #ifdef H5
|
||||
//H5接口是浏览器地址
|
||||
// HTTP_REQUEST_URL: window.location.protocol+"//"+window.location.host,
|
||||
// http://api.java.crmeb.net:20001
|
||||
HTTP_REQUEST_URL:domain,
|
||||
// #endif
|
||||
|
||||
|
|
|
@ -58,6 +58,7 @@ class AuthWechat {
|
|||
resolve(this.instance);
|
||||
})
|
||||
}).catch(err => {
|
||||
console.log('微信分享配置失败',err);
|
||||
this.status = false;
|
||||
reject(err);
|
||||
});
|
||||
|
@ -121,7 +122,6 @@ class AuthWechat {
|
|||
this.toPromise(wx.chooseWXPay, config).then(res => {
|
||||
resolve(res);
|
||||
}).catch(res => {
|
||||
console.log('js中的错误',res)
|
||||
resolve(res);
|
||||
});
|
||||
}).catch(res => {
|
||||
|
|
|
@ -8,17 +8,6 @@
|
|||
<!-- :style="'top:'+navH/2+'rpx'" -->
|
||||
{{bargainCount.lookCount || 0}}人查看 丨 {{bargainCount.shareCount || 0}}人分享 丨 {{bargainCount.userCount || 0}}人参与
|
||||
</view>
|
||||
<!-- <view class='time font-color' v-if="bargainUid == userInfo.uid">
|
||||
倒计时
|
||||
<text>{{countDownDay}}</text>
|
||||
天
|
||||
<text>{{countDownHour}}</text>
|
||||
时
|
||||
<text>{{countDownMinute}}</text>
|
||||
分
|
||||
<text>{{countDownSecond}}</text>
|
||||
秒
|
||||
</view> -->
|
||||
<countDown :tipText="'倒计时'" :dayText="'天'" :hourText="'时'" :minuteText="'分'" :secondText="'秒'" :datatime="datatime" :isDay="true" v-if="bargainUid == userInfo.uid"></countDown>
|
||||
<view v-if="bargainUid != userInfo.uid" class='pictxt acea-row row-center-wrapper'>
|
||||
<view class='pictrue'>
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
<view class='wrapper'>
|
||||
<view class='share acea-row row-between row-bottom'>
|
||||
<view class='money font-color'>
|
||||
¥<text class='num'>{{storeInfo.price || 0}}</text><text class='y-money'>¥{{storeInfo.product_price || 0}}</text>
|
||||
¥<text class='num'>{{storeInfo.price || 0}}</text><text class='y-money'>¥{{storeInfo.otPrice || 0}}</text>
|
||||
</view>
|
||||
<view class='iconfont icon-fenxiang' @click="listenerActionSheet"></view>
|
||||
</view>
|
||||
|
@ -120,8 +120,7 @@
|
|||
<view class='product-intro' id="past2">
|
||||
<view class='title'>产品介绍</view>
|
||||
<view class='conter'>
|
||||
<!-- <rich-text :nodes="storeInfo.description" class="conter"></rich-text> -->
|
||||
<jyf-parser :html="storeInfo.description" ref="article" :tag-style="tagStyle"></jyf-parser>
|
||||
<jyf-parser :html="storeInfo.content" ref="article" :tag-style="tagStyle"></jyf-parser>
|
||||
</view>
|
||||
</view>
|
||||
<view style='height:120rpx;'></view>
|
||||
|
@ -198,8 +197,6 @@
|
|||
<view class="share-box" v-if="H5ShareBox">
|
||||
<image src="/static/images/share-info.png" @click="H5ShareBox = false"></image>
|
||||
</view>
|
||||
<!-- <view class='mask' v-if="posterImageStatus"></view>
|
||||
<canvas class="canvas" canvas-id='myCanvas' v-if="canvasStatus"></canvas> -->
|
||||
<!-- #ifdef MP -->
|
||||
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize>
|
||||
<!-- #endif -->
|
||||
|
@ -212,12 +209,11 @@
|
|||
<script>
|
||||
const app = getApp();
|
||||
import uQRCode from '@/js_sdk/Sansnn-uQRCode/uqrcode.js'
|
||||
|
||||
import { base64src } from '@/utils/base64src.js'
|
||||
import {
|
||||
mapGetters
|
||||
} from "vuex";
|
||||
// #ifdef MP
|
||||
import { base64src } from '@/utils/base64src.js'
|
||||
import authorize from '@/components/Authorize';
|
||||
import {
|
||||
getQrcode
|
||||
|
@ -645,7 +641,7 @@
|
|||
* 购物车数量加和数量减
|
||||
*
|
||||
*/
|
||||
ChangeCartNum: function(changeValue) {
|
||||
ChangeCartNum: function(changeValue) {
|
||||
//changeValue:是否 加|减
|
||||
//获取当前变动属性
|
||||
let productSelect = this.productValue[this.attrValue];
|
||||
|
@ -667,7 +663,7 @@
|
|||
let nums = this.storeInfo.onceNum || 0;
|
||||
//设置默认数据
|
||||
if (productSelect.cart_num == undefined) productSelect.cart_num = 1;
|
||||
if (changeValue) {
|
||||
if (changeValue) {
|
||||
if (num.cart_num === this.onceNum) {
|
||||
return this.$util.Tips({
|
||||
title: `该商品每次限购${this.onceNum}${this.storeInfo.unitName}`
|
||||
|
@ -809,7 +805,7 @@
|
|||
},
|
||||
// 分享关闭
|
||||
listenerActionClose: function() {
|
||||
this.posters = false;
|
||||
this.canvasStatus = false;
|
||||
},
|
||||
//隐藏海报
|
||||
posterImageClose: function() {
|
||||
|
@ -1039,8 +1035,9 @@
|
|||
},
|
||||
//#ifdef MP
|
||||
onShareAppMessage() {
|
||||
let that = this;
|
||||
return {
|
||||
title: this.storeInfo.title,
|
||||
title: that.storeInfo.title,
|
||||
path: app.globalData.openPages,
|
||||
imageUrl: that.storeInfo.image
|
||||
};
|
||||
|
@ -1399,8 +1396,8 @@
|
|||
}
|
||||
|
||||
.canvas {
|
||||
width: 750px;
|
||||
height: 1190px;
|
||||
position:fixed;
|
||||
z-index: -5;
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -163,7 +163,6 @@
|
|||
<script>
|
||||
const app = getApp();
|
||||
import uQRCode from '@/js_sdk/Sansnn-uQRCode/uqrcode.js'
|
||||
import { base64src } from '@/utils/base64src.js'
|
||||
import {
|
||||
mapGetters
|
||||
} from "vuex";
|
||||
|
@ -183,6 +182,7 @@
|
|||
import userEvaluation from '@/components/userEvaluation/index.vue'
|
||||
// #ifdef MP
|
||||
import authorize from '@/components/Authorize';
|
||||
import { base64src } from '@/utils/base64src.js'
|
||||
import {
|
||||
getQrcode
|
||||
} from '@/api/api.js';
|
||||
|
@ -199,7 +199,6 @@
|
|||
} from '@/libs/login.js';
|
||||
import { silenceBindingSpread } from "@/utils";
|
||||
export default {
|
||||
computed: mapGetters(['isLogin']),
|
||||
data() {
|
||||
return {
|
||||
id: 0,
|
||||
|
@ -310,9 +309,9 @@
|
|||
|
||||
//扫码携带参数处理
|
||||
if (options.scene) {
|
||||
let value = this.$util.getUrlParams(decodeURIComponent(options.scene));
|
||||
if (value.id){
|
||||
this.id = value.id;
|
||||
// let value = this.$util.getUrlParams(decodeURIComponent(options));
|
||||
if (options.id){
|
||||
this.id = options.id;
|
||||
}else{
|
||||
return this.$util.Tips({
|
||||
title: '缺少参数无法查看商品'
|
||||
|
@ -322,8 +321,8 @@
|
|||
});
|
||||
}
|
||||
//记录推广人uid
|
||||
if (value.pid) app.globalData.spid = value.pid;
|
||||
if (value.time) this.datatime = value.time
|
||||
if (options.pid) app.globalData.spid = options.pid;
|
||||
if (options.time) this.datatime = options.time
|
||||
}
|
||||
// #endif
|
||||
|
||||
|
@ -423,8 +422,8 @@
|
|||
setTimeout(function() {
|
||||
that.infoScroll();
|
||||
}, 500);
|
||||
app.globalData.openPages = '/pages/activity/goods_seckill_details/index?id=' + that.id + '&time=' + that.time +
|
||||
'&status=' + that.status + '&scene=' + that.storeInfo.uid;
|
||||
app.globalData.openPages = '/pages/activity/goods_seckill_details/index?id=' + that.id + '&time=' + that.datatime +
|
||||
'&status=' + that.status + '&scene=' + that.uid + '&productId=' + that.storeInfo.productId;
|
||||
|
||||
}).catch(err => {
|
||||
that.$util.Tips({
|
||||
|
@ -956,7 +955,17 @@
|
|||
});
|
||||
}
|
||||
},
|
||||
}
|
||||
},
|
||||
//#ifdef MP
|
||||
onShareAppMessage() {
|
||||
let that = this;
|
||||
return {
|
||||
title: that.storeInfo.title,
|
||||
path: app.globalData.openPages,
|
||||
imageUrl: that.storeInfo.image
|
||||
};
|
||||
},
|
||||
//#endif
|
||||
}
|
||||
</script>
|
||||
|
||||
|
|
|
@ -135,7 +135,9 @@
|
|||
let people = this.storeCombination.storeCombination.people;
|
||||
let otPrice = this.storeCombination.storeCombination.otPrice;
|
||||
let count = this.storeCombination.count;
|
||||
this.PosterCanvas(arrImages, storeName, price, people,otPrice,count);
|
||||
setTimeout(() => {
|
||||
this.PosterCanvas(arrImages, storeName, price, people,otPrice,count);
|
||||
}, 300);
|
||||
},
|
||||
complete: () => {
|
||||
},
|
||||
|
@ -162,7 +164,7 @@
|
|||
context.setFontSize(36);
|
||||
context.setTextAlign('center');
|
||||
context.setFillStyle('#282828');
|
||||
let maxText = 17;
|
||||
let maxText = 20;
|
||||
let text = storeName;
|
||||
let topText = '';
|
||||
let bottomText = '';
|
||||
|
@ -190,7 +192,7 @@
|
|||
|
||||
context.setFontSize(72);
|
||||
context.setFillStyle('#fc4141');
|
||||
context.fillText(price, 220, 210);
|
||||
context.fillText(price, 250, 210);
|
||||
|
||||
context.setFontSize(32);
|
||||
context.setFillStyle('#FFFFFF');
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<view class='productSort'>
|
||||
<view class='productSort copy-data'>
|
||||
<view class='header acea-row row-center-wrapper'>
|
||||
<view class='acea-row row-between-wrapper input'>
|
||||
<text class='iconfont icon-sousuo'></text>
|
||||
|
@ -7,7 +7,7 @@
|
|||
placeholder-class='placeholder'></input>
|
||||
</view>
|
||||
</view>
|
||||
<view class='aside' :style="{bottom: tabbarH + 'px',height: height + 'rpx'}">
|
||||
<view class='aside'>
|
||||
<view class='item acea-row row-center-wrapper' :class='index==navActive?"on":""' v-for="(item,index) in productList"
|
||||
:key="index" @click='tap(index,"b"+index)'><text>{{item.name}}</text></view>
|
||||
</view>
|
||||
|
@ -15,7 +15,7 @@
|
|||
<scroll-view scroll-y="true" :scroll-into-view="toView" :style='"height:"+height+"rpx;"' @scroll="scroll"
|
||||
scroll-with-animation='true'>
|
||||
<block v-for="(item,index) in productList" :key="index">
|
||||
|
||||
|
||||
<view class='listw' :id="'b'+index">
|
||||
<view class='title acea-row row-center-wrapper'>
|
||||
<view class='line'></view>
|
||||
|
@ -25,6 +25,9 @@
|
|||
<view class='list acea-row'>
|
||||
<block v-for="(itemn,indexn) in item.child" :key="indexn">
|
||||
<navigator hover-class='none' :url='"/pages/goods_list/index?cid="+itemn.id+"&title="+itemn.name' class='item acea-row row-column row-middle'>
|
||||
<!-- <view class='picture' :style="{'background-color':(itemn.extra&&itemn.extra.indexOf('https://') > -1) || (itemn.extra&&itemn.extra.indexOf('http://') > -1)?'none':'#f7f7f7'}">
|
||||
<image :src='itemn.extra'></image>
|
||||
</view> -->
|
||||
<view class='picture' :style="{'background-color':itemn.extra?'none':'#f7f7f7'}">
|
||||
<image :src='itemn.extra'></image>
|
||||
</view>
|
||||
|
@ -61,19 +64,18 @@
|
|||
onLoad(options) {
|
||||
this.getAllCategory();
|
||||
},
|
||||
onShow(){
|
||||
},
|
||||
onShow() {},
|
||||
methods: {
|
||||
infoScroll: function() {
|
||||
let that = this;
|
||||
let len = that.productList.length;
|
||||
let child = that.productList[len - 1]&&that.productList[len - 1].child?that.productList[len - 1].child:[];
|
||||
this.number = child?child.length:0;
|
||||
|
||||
let child = that.productList[len - 1] && that.productList[len - 1].child ? that.productList[len - 1].child : [];
|
||||
this.number = child ? child.length : 0;
|
||||
|
||||
//设置商品列表高度
|
||||
uni.getSystemInfo({
|
||||
success: function(res) {
|
||||
that.height = (res.windowHeight) * (750 / res.windowWidth) - 98;
|
||||
that.height = (res.windowHeight) * (750 / res.windowWidth);
|
||||
},
|
||||
});
|
||||
let height = 0;
|
||||
|
@ -98,9 +100,9 @@
|
|||
let that = this;
|
||||
getCategoryList().then(res => {
|
||||
that.productList = res.data;
|
||||
setTimeout(function(){
|
||||
setTimeout(function() {
|
||||
that.infoScroll();
|
||||
},500)
|
||||
}, 500)
|
||||
})
|
||||
},
|
||||
scroll: function(e) {
|
||||
|
@ -142,7 +144,7 @@
|
|||
z-index: 9;
|
||||
border-bottom: 1rpx solid #f5f5f5;
|
||||
}
|
||||
|
||||
|
||||
.productSort .header .input {
|
||||
width: 700rpx;
|
||||
height: 60rpx;
|
||||
|
@ -151,41 +153,45 @@
|
|||
box-sizing: border-box;
|
||||
padding: 0 25rpx;
|
||||
}
|
||||
|
||||
|
||||
.productSort .header .input .iconfont {
|
||||
font-size: 35rpx;
|
||||
color: #555;
|
||||
}
|
||||
|
||||
|
||||
.productSort .header .input .placeholder {
|
||||
color: #999;
|
||||
}
|
||||
|
||||
|
||||
.productSort .header .input input {
|
||||
font-size: 26rpx;
|
||||
height: 100%;
|
||||
width: 597rpx;
|
||||
}
|
||||
|
||||
|
||||
.productSort .aside {
|
||||
position: fixed;
|
||||
width: 180rpx;
|
||||
width: 24%;
|
||||
left: 0;
|
||||
top:0;
|
||||
top: 0;
|
||||
background-color: #f7f7f7;
|
||||
overflow-y: auto;
|
||||
overflow-x: hidden;
|
||||
height: auto;
|
||||
margin-top: 96rpx;
|
||||
/* 兼容 IOS<11.2 */
|
||||
bottom: calc(100rpx+ constant(safe-area-inset-bottom));
|
||||
/* 兼容 IOS>11.2 */
|
||||
bottom: calc(100rpx + env(safe-area-inset-bottom));
|
||||
}
|
||||
|
||||
|
||||
.productSort .aside .item {
|
||||
height: 100rpx;
|
||||
width: 100%;
|
||||
font-size: 26rpx;
|
||||
color: #424242;
|
||||
}
|
||||
|
||||
|
||||
.productSort .aside .item.on {
|
||||
background-color: #fff;
|
||||
border-left: 4rpx solid #fc4141;
|
||||
|
@ -194,58 +200,55 @@
|
|||
color: #fc4141;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
|
||||
.productSort .conter {
|
||||
margin: 96rpx 0 0 180rpx;
|
||||
padding: 0 14rpx;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
|
||||
.productSort .conter .listw {
|
||||
padding-top: 20rpx;
|
||||
}
|
||||
|
||||
|
||||
.productSort .conter .listw .title {
|
||||
height: 90rpx;
|
||||
}
|
||||
|
||||
|
||||
.productSort .conter .listw .title .line {
|
||||
width: 100rpx;
|
||||
height: 2rpx;
|
||||
background-color: #f0f0f0;
|
||||
}
|
||||
|
||||
|
||||
.productSort .conter .listw .title .name {
|
||||
font-size: 28rpx;
|
||||
color: #333;
|
||||
margin: 0 30rpx;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
|
||||
.productSort .conter .list {
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
|
||||
.productSort .conter .list .item {
|
||||
width: 177rpx;
|
||||
margin-top: 26rpx;
|
||||
}
|
||||
|
||||
|
||||
.productSort .conter .list .item .picture {
|
||||
width: 120rpx;
|
||||
height: 120rpx;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
|
||||
.productSort .conter .list .item .picture image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 50%;
|
||||
div{
|
||||
background-color: #f7f7f7;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.productSort .conter .list .item .name {
|
||||
font-size: 24rpx;
|
||||
color: #333;
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
<view class='activity'>赠送 {{storeInfo.give_integral}} 积分</view>
|
||||
</view>
|
||||
</view> -->
|
||||
<view class='coupon acea-row row-between-wrapper' @click='couponTap' style="margin-top: 20rpx;">
|
||||
<view v-if="couponList.length" class='coupon acea-row row-between-wrapper' @click='couponTap' style="margin-top: 20rpx;">
|
||||
<view class='hide line1 acea-row'>
|
||||
优惠券:
|
||||
<view class='activity' v-for="(item,index) in couponList" :key="index">满{{item.minPrice}}减{{item.money}}</view>
|
||||
|
@ -152,14 +152,22 @@
|
|||
</view>
|
||||
<view>购物车</view>
|
||||
</navigator>
|
||||
<view class='bnt acea-row'>
|
||||
<view class="bnt acea-row" v-if="attr.productSelect.stock <= 0">
|
||||
<form @submit="joinCart" report-submit="true"><button class="joinCart bnts" form-type="submit">加入购物车</button></form>
|
||||
<form report-submit="true"><button class="buy bnts bg-color-hui" form-type="submit">已售罄</button></form>
|
||||
</view>
|
||||
<view class="bnt acea-row" v-else>
|
||||
<form @submit="joinCart" report-submit="true"><button class="joinCart bnts" form-type="submit">加入购物车</button></form>
|
||||
<form @submit="goBuy" report-submit="true"><button class="buy bnts" form-type="submit">立即购买</button></form>
|
||||
</view>
|
||||
<!-- <view class='bnt acea-row'>
|
||||
<form @submit="joinCart" report-submit='true'>
|
||||
<button class='joinCart bnts' form-type="submit">加入购物车</button>
|
||||
</form>
|
||||
<form @submit="goBuy" report-submit='true'>
|
||||
<button class='buy bnts' form-type="submit">立即购买</button>
|
||||
</form>
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
<shareRedPackets :sharePacket="sharePacket" @listenerActionSheet="listenerActionSheet" @closeChange="closeChange"></shareRedPackets>
|
||||
<!-- 组件 -->
|
||||
|
@ -216,7 +224,6 @@
|
|||
|
||||
<script>
|
||||
import uQRCode from '@/js_sdk/Sansnn-uQRCode/uqrcode.js'
|
||||
import { base64src } from '@/utils/base64src.js'
|
||||
// import yzf_chat from '@/plugin/chat/yzf_chat.js'
|
||||
import store from '@/store';
|
||||
import {
|
||||
|
@ -259,6 +266,7 @@
|
|||
} from "@/utils";
|
||||
import parser from "@/components/jyf-parser/jyf-parser";
|
||||
// #ifdef MP
|
||||
import { base64src } from '@/utils/base64src.js'
|
||||
import authorize from '@/components/Authorize';
|
||||
import {
|
||||
getQrcode
|
||||
|
@ -558,7 +566,7 @@
|
|||
getUserInfo: function() {
|
||||
let that = this;
|
||||
getUserInfo().then(res => {
|
||||
that.$set(that.sharePacket, 'isState', that.sharePacket.priceName != '0' ? false : true);
|
||||
that.$set(that.sharePacket, 'isState', Math.floor(that.sharePacket.priceName) != 0 ? false : true);
|
||||
store.commit('SETUID', res.data.uid);
|
||||
// that.$set(that, 'uid', res.data.uid);
|
||||
// #ifdef H5
|
||||
|
@ -1242,8 +1250,6 @@
|
|||
});
|
||||
},
|
||||
fail: function(res) {
|
||||
console.log('保存失败原因2')
|
||||
console.log(res)
|
||||
that.$util.Tips({
|
||||
title: '保存失败'
|
||||
});
|
||||
|
|
|
@ -17,10 +17,10 @@
|
|||
<block v-for="(item,index) in cartList.valid" :key="index">
|
||||
<view class='item acea-row row-between-wrapper'>
|
||||
<!-- #ifndef MP -->
|
||||
<checkbox :value="(item.id).toString()" :checked="item.checked" :disabled="item.attrStatus?false:true" />
|
||||
<checkbox :value="(item.id).toString()" :checked="item.checked" :disabled="!item.attrStatus && footerswitch" />
|
||||
<!-- #endif -->
|
||||
<!-- #ifdef MP -->
|
||||
<checkbox :value="item.id" :checked="item.checked" :disabled="item.attrStatus?false:true" />
|
||||
<checkbox :value="item.id" :checked="item.checked" :disabled="!item.attrStatus && footerswitch" />
|
||||
<!-- #endif -->
|
||||
<navigator :url='"/pages/goods_details/index?id="+item.productId' hover-class='none' class='picTxt acea-row row-between-wrapper'>
|
||||
<view class='pictrue'>
|
||||
|
@ -91,7 +91,7 @@
|
|||
<view class='footer acea-row row-between-wrapper' v-if="cartList.valid.length > 0">
|
||||
<view>
|
||||
<checkbox-group @change="checkboxAllChange">
|
||||
<checkbox value="all" :checked="!!isAllSelect" /><text class='checkAll'>全选 ({{cartCount}})</text>
|
||||
<checkbox value="all" :checked="!!isAllSelect" /><text class='checkAll'>全选 ({{selectValue.length}})</text>
|
||||
</checkbox-group>
|
||||
</view>
|
||||
<view class='money acea-row row-middle' v-if="footerswitch==true">
|
||||
|
@ -510,22 +510,52 @@
|
|||
this.setAllSelectValue(0)
|
||||
}
|
||||
},
|
||||
// setAllSelectValue: function(status) {
|
||||
// let that = this;
|
||||
// let selectValue = [];
|
||||
// let valid = that.cartList.valid;
|
||||
// if (valid.length > 0) {
|
||||
// for (let index in valid) {
|
||||
// if (status == 1) {
|
||||
// if(valid[index].attrStatus){
|
||||
// valid[index].checked = true;
|
||||
// selectValue.push(valid[index].id);
|
||||
// }else{
|
||||
// valid[index].checked = false;
|
||||
// }
|
||||
// } else valid[index].checked = false;
|
||||
// }
|
||||
// that.$set(that.cartList, 'valid', valid);
|
||||
// that.selectValue = selectValue;
|
||||
// that.switchSelect();
|
||||
// }
|
||||
// },
|
||||
setAllSelectValue: function(status) {
|
||||
let that = this;
|
||||
let selectValue = [];
|
||||
let valid = that.cartList.valid;
|
||||
if (valid.length > 0) {
|
||||
for (let index in valid) {
|
||||
if (status == 1) {
|
||||
if(valid[index].attrStatus){
|
||||
valid[index].checked = true;
|
||||
selectValue.push(valid[index].id);
|
||||
}else{
|
||||
valid[index].checked = false;
|
||||
let newValid = valid.map(item => {
|
||||
if (status) {
|
||||
if (that.footerswitch) {
|
||||
if (item.attrStatus) {
|
||||
item.checked = true;
|
||||
selectValue.push(item.id);
|
||||
} else{
|
||||
item.checked = false;
|
||||
}
|
||||
} else{
|
||||
item.checked = true;
|
||||
selectValue.push(item.id);
|
||||
}
|
||||
} else valid[index].checked = false;
|
||||
}
|
||||
that.$set(that.cartList, 'valid', valid);
|
||||
that.isAllSelect = true;
|
||||
} else{
|
||||
item.checked = false;
|
||||
that.isAllSelect = false;
|
||||
}
|
||||
return item;
|
||||
});
|
||||
that.$set(that.cartList, 'valid', newValid);
|
||||
that.selectValue = selectValue;
|
||||
that.switchSelect();
|
||||
}
|
||||
|
@ -534,23 +564,59 @@
|
|||
let that = this;
|
||||
let value = event.detail.value;
|
||||
let valid = that.cartList.valid;
|
||||
for (let index in valid) {
|
||||
if (that.inArray(valid[index].id, value)){
|
||||
if(valid[index].attrStatus){
|
||||
valid[index].checked = true;
|
||||
}else{
|
||||
valid[index].checked = false;
|
||||
let arr1 = [];
|
||||
let arr2 = [];
|
||||
let arr3 = [];
|
||||
let newValid = valid.map(item => {
|
||||
if (that.inArray(item.id, value)) {
|
||||
if (that.footerswitch) {
|
||||
if (item.attrStatus) {
|
||||
item.checked = true;
|
||||
arr1.push(item);
|
||||
} else{
|
||||
item.checked = false;
|
||||
}
|
||||
} else{
|
||||
item.checked = true;
|
||||
arr1.push(item);
|
||||
}
|
||||
} else {
|
||||
valid[index].checked = false;
|
||||
}
|
||||
} else{
|
||||
item.checked = false;
|
||||
arr2.push(item);
|
||||
}
|
||||
return item;
|
||||
});
|
||||
if (that.footerswitch) {
|
||||
arr3 = arr2.filter(item => !item.attrStatus);
|
||||
}
|
||||
that.$set(that.cartList, 'valid', valid);
|
||||
let newArr = that.cartList.valid.filter(item => item.attrStatus);
|
||||
that.isAllSelect = value.length == newArr.length;
|
||||
that.$set(that.cartList, 'valid', newValid);
|
||||
// let newArr = that.cartList.valid.filter(item => item.attrStatus);
|
||||
that.isAllSelect = newValid.length === arr1.length + arr3.length;
|
||||
that.selectValue = value;
|
||||
console.log(that.selectValue)
|
||||
that.switchSelect();
|
||||
},
|
||||
// checkboxChange: function(event) {
|
||||
// let that = this;
|
||||
// let value = event.detail.value;
|
||||
// let valid = that.cartList.valid;
|
||||
// for (let index in valid) {
|
||||
// if (that.inArray(valid[index].id, value)){
|
||||
// if(valid[index].attrStatus){
|
||||
// valid[index].checked = true;
|
||||
// }else{
|
||||
// valid[index].checked = false;
|
||||
// }
|
||||
// } else {
|
||||
// valid[index].checked = false;
|
||||
// }
|
||||
// }
|
||||
// that.$set(that.cartList, 'valid', valid);
|
||||
// let newArr = that.cartList.valid.filter(item => item.attrStatus);
|
||||
// that.isAllSelect = value.length == newArr.length;
|
||||
// that.selectValue = value;
|
||||
// that.switchSelect();
|
||||
// },
|
||||
inArray: function(search, array) {
|
||||
for (let i in array) {
|
||||
if (array[i] == search) {
|
||||
|
@ -755,6 +821,33 @@
|
|||
manage: function() {
|
||||
let that = this;
|
||||
that.footerswitch = !that.footerswitch;
|
||||
let arr1 = [];
|
||||
let arr2 = [];
|
||||
let newValid = that.cartList.valid.map(item => {
|
||||
if (that.footerswitch) {
|
||||
if (item.attrStatus) {
|
||||
if (item.checked) {
|
||||
arr1.push(item.id);
|
||||
}
|
||||
} else{
|
||||
item.checked = false;
|
||||
arr2.push(item);
|
||||
}
|
||||
} else {
|
||||
if (item.checked) {
|
||||
arr1.push(item.id);
|
||||
}
|
||||
}
|
||||
return item;
|
||||
});
|
||||
that.cartList.valid = newValid;
|
||||
if (that.footerswitch) {
|
||||
that.isAllSelect = newValid.length === arr1.length + arr2.length;
|
||||
} else{
|
||||
that.isAllSelect = newValid.length === arr1.length;
|
||||
}
|
||||
that.selectValue = arr1;
|
||||
that.switchSelect();
|
||||
},
|
||||
unsetCart: function() {
|
||||
let that = this,
|
||||
|
@ -780,7 +873,7 @@
|
|||
that.getCartList();
|
||||
}
|
||||
if (that.cartList.valid.length == 0 && that.cartList.invalid.length == 0) {
|
||||
that.getHostProduct();
|
||||
// that.getHostProduct();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -17,12 +17,37 @@
|
|||
<block v-for="(item,index) in cartList.valid" :key="index">
|
||||
<view class='item acea-row row-between-wrapper'>
|
||||
<!-- #ifndef MP -->
|
||||
<checkbox :value="(item.id).toString()" :checked="item.checked" />
|
||||
<checkbox :value="(item.id).toString()" :checked="item.checked" :disabled="!item.attrStatus && footerswitch" />
|
||||
<!-- <checkbox :value="(item.id).toString()" :checked="item.checked" /> -->
|
||||
<!-- #endif -->
|
||||
<!-- #ifdef MP -->
|
||||
<checkbox :value="item.id" :checked="item.checked" />
|
||||
<checkbox :value="item.id" :checked="item.checked" :disabled="!item.attrStatus && footerswitch" />
|
||||
<!-- <checkbox :value="item.id" :checked="item.checked" /> -->
|
||||
<!-- #endif -->
|
||||
<navigator :url='"/pages/goods_details/index?id="+item.product_id' hover-class='none' class='picTxt acea-row row-between-wrapper'>
|
||||
<view class='pictrue'>
|
||||
<image v-if="item.productInfo.attrInfo" :src='item.productInfo.attrInfo.image'></image>
|
||||
<image v-else :src='item.productInfo.image'></image>
|
||||
</view>
|
||||
<view class='text'>
|
||||
<view class='line1' :class="item.attrStatus?'':'reColor'">{{item.productInfo.store_name}}</view>
|
||||
<view class='infor line1' v-if="item.productInfo.attrInfo">属性:{{item.productInfo.attrInfo.suk}}</view>
|
||||
<view class='money' v-if="item.attrStatus">¥{{item.truePrice}}</view>
|
||||
<view class="reElection acea-row row-between-wrapper" v-else>
|
||||
<view class="title">请重新选择商品规格</view>
|
||||
<view class="reBnt cart-color acea-row row-center-wrapper" @click.stop="reElection(item)">重选</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class='carnum acea-row row-center-wrapper' v-if="item.attrStatus">
|
||||
<view class="reduce" :class="item.numSub ? 'on' : ''" @click.stop='subCart(index)'>-</view>
|
||||
<view class='num'>{{item.cart_num}}</view>
|
||||
<!-- <view class="num">
|
||||
<input type="number" v-model="item.cart_num" @click.stop @input="iptCartNum(index)" @blur="blurInput(index)"/>
|
||||
</view> -->
|
||||
<view class="plus" :class="item.numAdd ? 'on' : ''" @click.stop='addCart(index)'>+</view>
|
||||
</view>
|
||||
</navigator>
|
||||
<!-- <navigator :url='"/pages/goods_details/index?id="+item.product_id' hover-class='none' class='picTxt acea-row row-between-wrapper'>
|
||||
<view class='pictrue'>
|
||||
<image v-if="item.productInfo.attrInfo" :src='item.productInfo.attrInfo.image'></image>
|
||||
<image v-else :src='item.productInfo.image'></image>
|
||||
|
@ -35,12 +60,9 @@
|
|||
<view class='carnum acea-row row-center-wrapper'>
|
||||
<view class="reduce" :class="item.numSub ? 'on' : ''" @click.stop='subCart(index)'>-</view>
|
||||
<view class='num'>{{item.cart_num}}</view>
|
||||
<!-- <view class="num">
|
||||
<input type="number" v-model="item.cart_num" @click.stop @input="iptCartNum(index)" @blur="blurInput(index)"/>
|
||||
</view> -->
|
||||
<view class="plus" :class="item.numAdd ? 'on' : ''" @click.stop='addCart(index)'>+</view>
|
||||
</view>
|
||||
</navigator>
|
||||
</navigator> -->
|
||||
</view>
|
||||
</block>
|
||||
</checkbox-group>
|
||||
|
@ -70,6 +92,12 @@
|
|||
</block>
|
||||
</view>
|
||||
</view>
|
||||
<view class='loadingicon acea-row row-center-wrapper' v-if="cartList.valid.length&&!loadend">
|
||||
<text class='loading iconfont icon-jiazai' :hidden='loading==false'></text>{{loadTitle}}
|
||||
</view>
|
||||
<view class='loadingicon acea-row row-center-wrapper' v-if="cartList.invalid.length&&loadend">
|
||||
<text class='loading iconfont icon-jiazai' :hidden='loadingInvalid==false'></text>{{loadTitleInvalid}}
|
||||
</view>
|
||||
</view>
|
||||
<view class='noCart' v-if="cartList.valid.length == 0 && cartList.invalid.length == 0">
|
||||
<view class='pictrue'>
|
||||
|
@ -81,7 +109,7 @@
|
|||
<view class='footer acea-row row-between-wrapper' v-if="cartList.valid.length > 0">
|
||||
<view>
|
||||
<checkbox-group @change="checkboxAllChange">
|
||||
<checkbox value="all" :checked="!!isAllSelect" /><text class='checkAll'>全选 ({{cartCount}})</text>
|
||||
<checkbox value="all" :checked="!!isAllSelect" /><text class='checkAll'>全选 ({{selectValue.length}})</text>
|
||||
</checkbox-group>
|
||||
</view>
|
||||
<view class='money acea-row row-middle' v-if="footerswitch==true">
|
||||
|
@ -152,7 +180,29 @@
|
|||
isShowAuth: false, //是否隐藏授权
|
||||
hotScroll:false,
|
||||
hotPage:1,
|
||||
hotLimit:10
|
||||
hotLimit:10,
|
||||
|
||||
loading: false,
|
||||
loadend: false,
|
||||
loadTitle: '加载更多', //提示语
|
||||
page: 1,
|
||||
limit: 20,
|
||||
loadingInvalid: false,
|
||||
loadendInvalid: false,
|
||||
loadTitleInvalid: '加载更多', //提示语
|
||||
pageInvalid: 1,
|
||||
limitInvalid: 20,
|
||||
attr: {
|
||||
cartAttr: false,
|
||||
productAttr: [],
|
||||
productSelect: {}
|
||||
},
|
||||
productValue: [], //系统属性
|
||||
storeInfo: {},
|
||||
attrValue: '', //已选属性
|
||||
attrTxt: '请选择', //属性页面提示
|
||||
cartId: 0,
|
||||
product_id: 0
|
||||
};
|
||||
},
|
||||
computed: mapGetters(['isLogin']),
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<view class='item'><text class='iconfont icon-xuanzhong'></text>售后无忧</view>
|
||||
</view>
|
||||
<view class='nav acea-row row-between-wrapper'>
|
||||
<view>{{footerswitch}}购物车 <text class='num font-color'>{{cartCount}}</text></view>
|
||||
<view>购物数量 <text class='num font-color'>{{cartCount}}</text></view>
|
||||
<view v-if="cartList.valid.length > 0 || cartList.invalid.length > 0" class='administrate acea-row row-center-wrapper'
|
||||
@click='manage'>{{ footerswitch ? '管理' : '取消'}}</view>
|
||||
</view>
|
||||
|
@ -17,10 +17,10 @@
|
|||
<block v-for="(item,index) in cartList.valid" :key="index">
|
||||
<view class='item acea-row row-between-wrapper'>
|
||||
<!-- #ifndef MP -->
|
||||
<checkbox :value="(item.id).toString()" :checked="item.checked" :disabled="item.attrStatus || !footerswitch ?false:true" />
|
||||
<checkbox :value="(item.id).toString()" :checked="item.checked" :disabled="item.attrStatus?false:true" />
|
||||
<!-- #endif -->
|
||||
<!-- #ifdef MP -->
|
||||
<checkbox :value="item.id" :checked="item.checked" :disabled="item.attrStatus || !footerswitch ?false:true" />
|
||||
<checkbox :value="item.id" :checked="item.checked" :disabled="item.attrStatus?false:true" />
|
||||
<!-- #endif -->
|
||||
<navigator :url='"/pages/goods_details/index?id="+item.productId' hover-class='none' class='picTxt acea-row row-between-wrapper'>
|
||||
<view class='pictrue'>
|
||||
|
@ -28,15 +28,15 @@
|
|||
<image v-else :src='item.productInfo.image'></image>
|
||||
</view>
|
||||
<view class='text'>
|
||||
<view class='line1' :class="item.trueStock || item.trueStock > 0 ?'':'reColor'">{{item.productInfo.storeName}}</view>
|
||||
<view class='line1' :class="item.attrStatus?'':'reColor'">{{item.productInfo.storeName}}</view>
|
||||
<view class='infor line1' v-if="item.productInfo.attrInfo">属性:{{item.productInfo.attrInfo.suk}}</view>
|
||||
<view class='money' v-if="item.trueStock || item.trueStock > 0 ">¥{{item.truePrice}}</view>
|
||||
<view class="reElection acea-row row-between-wrapper" v-if="!item.trueStock || item.trueStock === 0 ">
|
||||
<view class='money' v-if="item.attrStatus">¥{{item.truePrice}}</view>
|
||||
<view class="reElection acea-row row-between-wrapper" v-else>
|
||||
<view class="title">请重新选择商品规格</view>
|
||||
<view class="reBnt cart-color acea-row row-center-wrapper" @click.stop="reElection(item)">重选</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class='carnum acea-row row-center-wrapper' v-if="item.trueStock || item.trueStock > 0 ">
|
||||
<view class='carnum acea-row row-center-wrapper' v-if="item.attrStatus">
|
||||
<view class="reduce" :class="item.numSub ? 'on' : ''" @click.stop='subCart(index)'>-</view>
|
||||
<view class='num'>{{item.cartNum}}</view>
|
||||
<!-- <view class="num">
|
||||
|
@ -83,14 +83,13 @@
|
|||
</view>
|
||||
<view class='noCart' v-if="cartList.valid.length == 0 && cartList.invalid.length == 0">
|
||||
<view class='pictrue'>
|
||||
<image src='../columnGoods/static/noCart.png'></image>
|
||||
<image src='../../static/images/noCart.png'></image>
|
||||
</view>
|
||||
<recommend :hostProduct='hostProduct'></recommend>
|
||||
</view>
|
||||
<view style='height:120rpx;color: #F5F5F5;'>{{selectCountPrice}}</view>
|
||||
<view class='footer acea-row row-between-wrapper' v-if="cartList.valid.length > 0">
|
||||
<view>
|
||||
{{isAllSelect}}
|
||||
<checkbox-group @change="checkboxAllChange">
|
||||
<checkbox value="all" :checked="!!isAllSelect" /><text class='checkAll'>全选 ({{cartCount}})</text>
|
||||
</checkbox-group>
|
||||
|
@ -190,8 +189,7 @@
|
|||
attrValue: '', //已选属性
|
||||
attrTxt: '请选择', //属性页面提示
|
||||
cartId: 0,
|
||||
product_id: 0,
|
||||
delCheck: [] // 删除选中的
|
||||
product_id: 0
|
||||
};
|
||||
},
|
||||
computed: mapGetters(['isLogin']),
|
||||
|
@ -234,7 +232,6 @@
|
|||
},
|
||||
this.isAllSelect = false; //全选
|
||||
this.selectValue = []; //选中的数据
|
||||
this.delCheck = [];
|
||||
this.selectCountPrice = 0.00;
|
||||
this.cartCount = 0;
|
||||
this.isShowAuth = false;
|
||||
|
@ -281,7 +278,7 @@
|
|||
})
|
||||
.catch(res => {
|
||||
return that.$util.Tips({
|
||||
title: res.msg
|
||||
title: res
|
||||
});
|
||||
});
|
||||
},
|
||||
|
@ -444,19 +441,18 @@
|
|||
subDel: function(event) {
|
||||
let that = this,
|
||||
selectValue = that.selectValue;
|
||||
|
||||
// if (selectValue.length > 0)
|
||||
// cartDel(selectValue).then(res => {
|
||||
// that.loadend = false;
|
||||
// that.page = 1;
|
||||
// that.cartList.valid = [];
|
||||
// that.getCartList();
|
||||
// that.getCartNum();
|
||||
// });
|
||||
// else
|
||||
// return that.$util.Tips({
|
||||
// title: '请选择产品'
|
||||
// });
|
||||
if (selectValue.length > 0)
|
||||
cartDel(selectValue).then(res => {
|
||||
that.loadend = false;
|
||||
that.page = 1;
|
||||
that.cartList.valid = [];
|
||||
that.getCartList();
|
||||
that.getCartNum();
|
||||
});
|
||||
else
|
||||
return that.$util.Tips({
|
||||
title: '请选择产品'
|
||||
});
|
||||
},
|
||||
getSelectValueProductId: function() {
|
||||
let that = this;
|
||||
|
@ -477,16 +473,16 @@
|
|||
selectValue = that.selectValue;
|
||||
if (selectValue.length > 0) {
|
||||
let selectValueProductId = that.getSelectValueProductId();
|
||||
// collectAll(that.getSelectValueProductId()).then(res => {
|
||||
// return that.$util.Tips({
|
||||
// title: res.msg,
|
||||
// icon: 'success'
|
||||
// });
|
||||
// }).catch(err => {
|
||||
// return that.$util.Tips({
|
||||
// title: err
|
||||
// });
|
||||
// });
|
||||
collectAll(that.getSelectValueProductId()).then(res => {
|
||||
return that.$util.Tips({
|
||||
title: '收藏成功',
|
||||
icon: 'success'
|
||||
});
|
||||
}).catch(err => {
|
||||
return that.$util.Tips({
|
||||
title: err
|
||||
});
|
||||
});
|
||||
} else {
|
||||
return that.$util.Tips({
|
||||
title: '请选择产品'
|
||||
|
@ -497,9 +493,9 @@
|
|||
let that = this,
|
||||
selectValue = that.selectValue;
|
||||
if (selectValue.length > 0) {
|
||||
// uni.navigateTo({
|
||||
// url: '/pages/users/order_confirm/index?new=false&cartId=' + selectValue.join(',')
|
||||
// });
|
||||
uni.navigateTo({
|
||||
url: '/pages/users/order_confirm/index?new=false&cartId=' + selectValue.join(',')
|
||||
});
|
||||
} else {
|
||||
return that.$util.Tips({
|
||||
title: '请选择产品'
|
||||
|
@ -521,18 +517,12 @@
|
|||
if (valid.length > 0) {
|
||||
for (let index in valid) {
|
||||
if (status == 1) {
|
||||
if(that.footerswitch){
|
||||
if(valid[index].attrStatus){
|
||||
valid[index].checked = true;
|
||||
selectValue.push(valid[index].id);
|
||||
}else{
|
||||
valid[index].checked = false;
|
||||
}
|
||||
}else{
|
||||
if(valid[index].attrStatus){
|
||||
valid[index].checked = true;
|
||||
selectValue.push(valid[index].id);
|
||||
}else{
|
||||
valid[index].checked = false;
|
||||
}
|
||||
|
||||
} else valid[index].checked = false;
|
||||
}
|
||||
that.$set(that.cartList, 'valid', valid);
|
||||
|
@ -544,42 +534,21 @@
|
|||
let that = this;
|
||||
let value = event.detail.value;
|
||||
let valid = that.cartList.valid;
|
||||
//that.delCheck = value;
|
||||
for (let index in valid) {
|
||||
const item = valid[index]
|
||||
if (that.inArray(valid[index].id, value)){
|
||||
this.$set(item,'checked',true)
|
||||
}else{
|
||||
this.$set(item,'checked',false)
|
||||
}
|
||||
}
|
||||
// for (let index in valid) {
|
||||
// if (that.inArray(valid[index].id, value)){
|
||||
// // if(that.footerswitch && valid[index].trueStock){
|
||||
// // valid[index].checked = true;
|
||||
// // }else{
|
||||
// // valid[index].checked = true;
|
||||
// // }
|
||||
// if(that.footerswitch){
|
||||
// if(valid[index].attrStatus){
|
||||
// valid[index].checked = true;
|
||||
// }
|
||||
// else{
|
||||
// valid[index].checked = false;
|
||||
// }
|
||||
// }else{
|
||||
// valid[index].checked = true;
|
||||
|
||||
// }
|
||||
|
||||
// } else {
|
||||
// valid[index].checked = false;
|
||||
// }
|
||||
// }
|
||||
if (that.inArray(valid[index].id, value)){
|
||||
if(valid[index].attrStatus){
|
||||
valid[index].checked = true;
|
||||
}else{
|
||||
valid[index].checked = false;
|
||||
}
|
||||
} else {
|
||||
valid[index].checked = false;
|
||||
}
|
||||
}
|
||||
that.$set(that.cartList, 'valid', valid);
|
||||
let newArr = that.cartList.valid.filter(item => item.attrStatus);
|
||||
that.isAllSelect = value.length == newArr.length;
|
||||
that.selectValue = value
|
||||
that.selectValue = value;
|
||||
that.switchSelect();
|
||||
},
|
||||
inArray: function(search, array) {
|
||||
|
@ -599,18 +568,13 @@
|
|||
that.selectCountPrice = selectCountPrice;
|
||||
} else {
|
||||
for (let index in validList) {
|
||||
// if ((validList[index].trueStock)) {
|
||||
// selectCountPrice = that.$util.$h.Add(selectCountPrice, that.$util.$h.Mul(validList[index].cartNum, validList[
|
||||
// index].truePrice))
|
||||
// }
|
||||
if (that.inArray(validList[index].id, selectValue) && validList[index].trueStock) {
|
||||
if (that.inArray(validList[index].id, selectValue)) {
|
||||
selectCountPrice = that.$util.$h.Add(selectCountPrice, that.$util.$h.Mul(validList[index].cartNum, validList[
|
||||
index].truePrice))
|
||||
}
|
||||
}
|
||||
that.selectCountPrice = selectCountPrice;
|
||||
}
|
||||
console.log(that.selectCountPrice)
|
||||
},
|
||||
/**
|
||||
* 购物车手动填写
|
||||
|
@ -690,12 +654,9 @@
|
|||
isValid : true
|
||||
}
|
||||
getCartList(data).then(res => {
|
||||
//console.log(that.$util.toStringValue(res.data.list))
|
||||
let valid = res.data.list;
|
||||
let loadend = valid.length < that.limit;
|
||||
let validList = that.$util.SplitArray(valid, that.cartList.valid)
|
||||
//console.log(that.$util.toStringValue(validList))
|
||||
|
||||
let validList = that.$util.SplitArray(valid, that.cartList.valid);
|
||||
let numSub = [{
|
||||
numSub: true
|
||||
}, {
|
||||
|
@ -709,8 +670,6 @@
|
|||
selectValue = [];
|
||||
if (validList.length > 0) {
|
||||
for (let index in validList) {
|
||||
that.$set(validList[index], 'id', validList[index].id.toString());
|
||||
//validList[index].id = validList[index].id.toString();
|
||||
if (validList[index].cartNum == 1) {
|
||||
validList[index].numSub = true;
|
||||
} else {
|
||||
|
@ -734,19 +693,20 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
console.log('validList', validList)
|
||||
that.$set(that.cartList, 'valid', [...validList]);
|
||||
that.$set(that.cartList, 'valid', validList);
|
||||
that.loadend = loadend;
|
||||
that.loadTitle = loadend ? '我也是有底线的' : '加载更多';
|
||||
that.page = that.page + 1;
|
||||
that.loading = false;
|
||||
// that.goodsHidden = cartList.valid.length <= 0 ? false : true;
|
||||
that.selectValue = selectValue;
|
||||
that.delCheck = selectValue;
|
||||
let newArr = validList.filter(item => item.attrStatus);
|
||||
that.isAllSelect = newArr.length == selectValue.length && newArr.length;
|
||||
that.switchSelect();
|
||||
}).catch(function() {
|
||||
}).catch(function(err) {
|
||||
that.$util.Tips({
|
||||
title: err
|
||||
});
|
||||
that.loading = false;
|
||||
that.loadTitle = '加载更多';
|
||||
})
|
||||
|
@ -795,59 +755,6 @@
|
|||
manage: function() {
|
||||
let that = this;
|
||||
that.footerswitch = !that.footerswitch;
|
||||
let valid = that.cartList.valid
|
||||
for (let index in valid) {
|
||||
if(that.footerswitch && !valid[index].attrStatus){
|
||||
that.$set(valid[index],'checked',false);
|
||||
//that.selectValue.splice(index, 1)
|
||||
}
|
||||
|
||||
}
|
||||
// for (let index in valid) {
|
||||
// for(let indexn in that.selectValue){
|
||||
// if((valid[index].id = that.selectValue[indexn]) && that.footerswitch && !valid[index].attrStatus && !valid[index].checked){
|
||||
// console.log(indexn)
|
||||
// //that.selectValue.splice(indexn, 1)
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//that.$set(that.cartList, 'valid', valid);
|
||||
console.log(valid)
|
||||
// that.cartList.valid.map(item => {
|
||||
// if(item.checked){
|
||||
// that.$set(that.selectValue, item.id);
|
||||
// }
|
||||
// }
|
||||
// })
|
||||
// let selectValue = []
|
||||
// that.cartList.valid.map(item => {
|
||||
// // if(!item.trueStock){
|
||||
// // console.log('trueStock', item.trueStock)
|
||||
// // if(that.footerswitch){
|
||||
// // that.$set(item, 'attrStatus', false);
|
||||
// // that.$set(item, 'checked', false);
|
||||
// // console.log('item', item)
|
||||
// // }else{
|
||||
// // that.$set(item, 'attrStatus', true);
|
||||
// // }
|
||||
// // }
|
||||
// // if(!item.trueStock && !that.footerswitch){
|
||||
// // that.$set(item, 'attrStatus', true);
|
||||
// // }
|
||||
|
||||
// if(that.footerswitch){
|
||||
// if(!item.trueStock || item.trueStock === 0){
|
||||
// that.$set(item, 'attrStatus', false);
|
||||
// that.$set(item, 'checked', false);
|
||||
// }
|
||||
// }else{
|
||||
// console.log('lala', that.footerswitch)
|
||||
// if(!item.trueStock || item.trueStock === 0) {
|
||||
// that.$set(item, 'attrStatus', true);
|
||||
// selectValue.push(item.id);
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
},
|
||||
unsetCart: function() {
|
||||
let that = this,
|
||||
|
|
|
@ -37,12 +37,12 @@
|
|||
<view @tap="goOrderDetails">
|
||||
<button formType="submit" class='returnBnt bg-color' hover-class='none'>查看订单</button>
|
||||
</view>
|
||||
<view @tap="goOrderDetails" v-if="order_pay_info.paid==0 && status==1">
|
||||
<!-- <view @tap="goOrderDetails" v-if="order_pay_info.paid==0 && status==1">
|
||||
<button class='returnBnt bg-color' hover-class='none'>重新购买</button>
|
||||
</view>
|
||||
<view @tap="goOrderDetails" v-if="order_pay_info.paid==0 && status==2">
|
||||
<button class='returnBnt bg-color' hover-class='none'>重新支付</button>
|
||||
</view>
|
||||
</view> -->
|
||||
<button @click="goPink(order_pay_info.pinkId)" class='returnBnt cart-color' formType="submit" hover-class='none' v-if="order_pay_info.pinkId && order_pay_info.paid!=0 && status!=2 && status!=1">邀请好友参团</button>
|
||||
<button @click="goIndex" class='returnBnt cart-color' formType="submit" hover-class='none' v-else>返回首页</button>
|
||||
</view>
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
{{userInfo.nickname}}
|
||||
<view class="vip" v-if="userInfo.vip">
|
||||
<image :src="userInfo.vipIcon" alt="">
|
||||
<view style="margin-left: 10rpx;" class="vip-txt">{{userInfo.vipName}}</view>
|
||||
<view style="margin-left: 10rpx;" class="vip-txt">{{userInfo.vipName || ''}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="num" v-if="userInfo.phone" @click="goEdit()">
|
||||
|
@ -90,13 +90,6 @@
|
|||
</navigator>
|
||||
</block>
|
||||
<!-- #ifdef H5 -->
|
||||
<!-- <navigator class="item" url="/pages/customer_list/index" hover-class="none">
|
||||
<view class="left">
|
||||
<image src="/static/images/user_menu08.png"></image>
|
||||
<text>联系客服</text>
|
||||
</view>
|
||||
<view class="iconfont icon-xiangyou"></view>
|
||||
</navigator> -->
|
||||
<view class="item" @click="kefuClick">
|
||||
<view class="left">
|
||||
<image src="/static/images/user_menu08.png"></image>
|
||||
|
|
|
@ -67,13 +67,13 @@
|
|||
<view v-else>
|
||||
<view class="item acea-row row-between-wrapper">
|
||||
<view>联系人</view>
|
||||
<view class="discount">
|
||||
<view class="discount textR">
|
||||
<input type="text" placeholder="请填写您的联系姓名" placeholder-class="placeholder" @blur='realName'></input>
|
||||
</view>
|
||||
</view>
|
||||
<view class="item acea-row row-between-wrapper">
|
||||
<view>联系电话</view>
|
||||
<view class="discount">
|
||||
<view class="discount textR">
|
||||
<input type="text" placeholder="请填写您的联系电话" placeholder-class="placeholder" @blur='phone'></input>
|
||||
</view>
|
||||
</view>
|
||||
|
@ -650,43 +650,6 @@
|
|||
title: err
|
||||
});
|
||||
});
|
||||
// orderCreate(that.orderKey, data).then(res => {
|
||||
// let result = res.data.result,
|
||||
// status = res.data.status,
|
||||
// orderId = result.orderId,
|
||||
// jsConfig = res.data.jsConfig,
|
||||
// message = res.data.message;
|
||||
// if(that.totalPrice===0)return that.$util.Tips({
|
||||
// title: '支付成功',
|
||||
// icon: 'success'
|
||||
// });
|
||||
// if(that.news == "false"){
|
||||
// orderPay({
|
||||
// 'paytype': that.payType,
|
||||
// 'uni':res.data.result.key,
|
||||
// // #ifdef MP
|
||||
// 'from': 'routine',
|
||||
// // #endif
|
||||
// // #ifdef H5 || APP-PLUS
|
||||
// 'from': this.$wechat.isWeixin() ? 'public' : 'weixinh5',
|
||||
// // #endif
|
||||
// }).then(res=>{
|
||||
// result = res.data.result;
|
||||
// status = res.data.status;
|
||||
// orderId = result.orderId;
|
||||
// jsConfig = res.data.jsConfig;
|
||||
// message = res.data.message;
|
||||
// that.getPayType(status,orderId,message,jsConfig);
|
||||
// })
|
||||
// }else{
|
||||
// that.getPayType(status,orderId,message,jsConfig);
|
||||
// }
|
||||
// }).catch(err => {
|
||||
// uni.hideLoading();
|
||||
// return that.$util.Tips({
|
||||
// title: err
|
||||
// });
|
||||
// });
|
||||
},
|
||||
getOrderPay: function(orderNo, message) {
|
||||
let that = this;
|
||||
|
@ -783,7 +746,14 @@
|
|||
});
|
||||
})
|
||||
}
|
||||
})
|
||||
}).cache(res => {
|
||||
return that.$util.Tips({
|
||||
title: '取消支付'
|
||||
}, {
|
||||
tab: 5,
|
||||
url: goPages + '&status=0'
|
||||
});
|
||||
});
|
||||
// #endif
|
||||
break;
|
||||
case 'yue':
|
||||
|
@ -795,18 +765,19 @@
|
|||
url: goPages + '&status=1'
|
||||
});
|
||||
break;
|
||||
case 'weixinh5':
|
||||
uni.hideLoading();
|
||||
that.$util.Tips({
|
||||
title: '订单创建成功'
|
||||
}, {
|
||||
tab: 5,
|
||||
url: goPages + '&status=0'
|
||||
});
|
||||
setTimeout(() => {
|
||||
location.href = jsConfig.mwebUrl;
|
||||
}, 100)
|
||||
break;
|
||||
case 'weixinh5':
|
||||
uni.hideLoading();
|
||||
that.$util.Tips({
|
||||
title: '订单创建成功'
|
||||
}, {
|
||||
tab: 5,
|
||||
url: goPages + '&status=0'
|
||||
});
|
||||
setTimeout(() => {
|
||||
location.href = jsConfig.mwebUrl + '&redirect_url=' + window.location.protocol + '//' + window.location.host +
|
||||
goPages + '&status=1';
|
||||
}, 100)
|
||||
break;
|
||||
}
|
||||
}).catch(err => {
|
||||
uni.hideLoading();
|
||||
|
@ -1008,21 +979,25 @@
|
|||
uni.showLoading({
|
||||
title: '订单支付中'
|
||||
});
|
||||
// // #ifdef MP
|
||||
// openPaySubscribe().then(() => {
|
||||
// that.payment(data);
|
||||
// });
|
||||
// // #endif
|
||||
// // #ifndef MP
|
||||
// that.payment(data);
|
||||
// // #endif
|
||||
// #ifdef MP
|
||||
openPaySubscribe().then(() => {
|
||||
that.payment(data);
|
||||
});
|
||||
// #endif
|
||||
// #ifndef MP
|
||||
that.payment(data);
|
||||
// #endif
|
||||
// that.payment(data);
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.textR {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.order-submission .line {
|
||||
width: 100%;
|
||||
height: 3rpx;
|
||||
|
|
|
@ -95,7 +95,10 @@
|
|||
multiIndex: [0, 0, 0],
|
||||
cityId: 0,
|
||||
defaultRegion: ['广东省', '广州市', '番禺区'],
|
||||
defaultRegionCode: '440113'
|
||||
defaultRegionCode: '440113',
|
||||
bargain: false, //是否是砍价
|
||||
combination: false, //是否是拼团
|
||||
secKill: false //是否是秒杀
|
||||
};
|
||||
},
|
||||
computed: mapGetters(['isLogin']),
|
||||
|
@ -105,6 +108,9 @@
|
|||
this.pinkId = options.pinkId || 0;
|
||||
this.couponId = options.couponId || 0;
|
||||
this.id = options.id || 0;
|
||||
this.secKill = options.secKill || false;
|
||||
this.combination = options.combination || false;
|
||||
this.bargain = options.bargain || false;
|
||||
uni.setNavigationBarTitle({
|
||||
title: options.id ? '修改地址' : '添加地址'
|
||||
})
|
||||
|
@ -271,7 +277,7 @@
|
|||
uni.navigateTo({
|
||||
url: '/pages/users/order_confirm/index?cartId=' + cartId + '&addressId=' + (that.id ? that.id :
|
||||
res.data
|
||||
.id) + '&pinkId=' + pinkId + '&couponId=' + couponId
|
||||
.id) + '&pinkId=' + pinkId + '&couponId=' + couponId + '&secKill=' + that.secKill + '&combination=' + that.combination + '&bargain=' + that.bargain
|
||||
});
|
||||
} else {
|
||||
uni.navigateBack({
|
||||
|
@ -346,7 +352,7 @@
|
|||
uni.navigateTo({
|
||||
url: '/pages/users/order_confirm/index?cartId=' + cartId + '&addressId=' + (that.id ? that.id :
|
||||
res.data
|
||||
.id) + '&pinkId=' + pinkId + '&couponId=' + couponId
|
||||
.id) + '&pinkId=' + pinkId + '&couponId=' + couponId + '&secKill=' + that.secKill + '&combination=' + that.combination + '&bargain=' + that.bargain
|
||||
});
|
||||
} else {
|
||||
uni.navigateTo({
|
||||
|
@ -427,7 +433,7 @@
|
|||
that.pinkId = '';
|
||||
that.couponId = '';
|
||||
uni.navigateTo({
|
||||
url: '/pages/users/order_confirm/index?cartId=' + cartId + '&addressId=' + (that.id ? that.id : res.data.id) +'&pinkId=' + pinkId + '&couponId=' + couponId
|
||||
url: '/pages/users/order_confirm/index?cartId=' + cartId + '&addressId=' + (that.id ? that.id : res.data.id) +'&pinkId=' + pinkId + '&couponId=' + couponId + '&secKill=' + that.secKill + '&combination=' + that.combination + '&bargain=' + that.bargain
|
||||
});
|
||||
} else {
|
||||
// #ifdef H5
|
||||
|
|
|
@ -306,7 +306,7 @@
|
|||
this.couponId = '';
|
||||
uni.navigateTo({
|
||||
url: '/pages/users/user_address/index?id=' + id + '&cartId=' + cartId + '&pinkId=' + pinkId + '&couponId=' +
|
||||
couponId
|
||||
couponId + '&secKill' + this.secKill + '&combination=' + this.combination + '&bargain=' + this.bargain
|
||||
})
|
||||
},
|
||||
/**
|
||||
|
@ -343,7 +343,7 @@
|
|||
this.pinkId = '';
|
||||
this.couponId = '';
|
||||
uni.navigateTo({
|
||||
url: '/pages/users/user_address/index?cartId=' + cartId + '&pinkId=' + pinkId + '&couponId=' + couponId
|
||||
url: '/pages/users/user_address/index?cartId=' + cartId + '&pinkId=' + pinkId + '&couponId=' + couponId + '&secKill=' + this.secKill + '&combination=' + this.combination + '&bargain=' + this.bargain
|
||||
})
|
||||
},
|
||||
goOrder: function(id) {
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
<view>
|
||||
<view class='bill-details'>
|
||||
<view class='nav acea-row'>
|
||||
<view class='item' :class='type==0 ? "on":""' @click='changeType(0)'>全部</view>
|
||||
<view class='item' :class='type==1 ? "on":""' @click='changeType(1)'>支出</view>
|
||||
<view class='item' :class='type==2 ? "on":""' @click='changeType(2)'>收入</view>
|
||||
<view class='item' :class='type==="all" ? "on":""' @click='changeType("all")'>全部</view>
|
||||
<view class='item' :class='type==="expenditure" ? "on":""' @click='changeType("expenditure")'>支出</view>
|
||||
<view class='item' :class='type==="income" ? "on":""' @click='changeType("income")'>收入</view>
|
||||
</view>
|
||||
<view class='sign-record'>
|
||||
<view class='list' v-for="(item,index) in userBillList" :key="index">
|
||||
|
@ -39,7 +39,7 @@
|
|||
|
||||
<script>
|
||||
import {
|
||||
getCommissionInfo
|
||||
getBillList
|
||||
} from '@/api/user.js';
|
||||
import {
|
||||
toLogin
|
||||
|
@ -67,7 +67,7 @@
|
|||
loadend: false,
|
||||
page: 1,
|
||||
limit: 10,
|
||||
type: 0,
|
||||
type: 'all',
|
||||
userBillList: [],
|
||||
isAuto: false, //没有授权的不会自动授权
|
||||
isShowAuth: false //是否隐藏授权
|
||||
|
@ -91,7 +91,7 @@
|
|||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad: function(options) {
|
||||
this.type = options.type || 0;
|
||||
this.type = options.type;
|
||||
},
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
|
@ -121,9 +121,10 @@
|
|||
that.loadTitle = "";
|
||||
let data = {
|
||||
page: that.page,
|
||||
limit: that.limit
|
||||
limit: that.limit,
|
||||
type: that.type
|
||||
}
|
||||
getCommissionInfo(data, that.type).then(function(res) {
|
||||
getBillList(data).then(function(res) {
|
||||
let list = res.data.list?res.data.list:[],
|
||||
loadend = list.length < that.limit;
|
||||
that.userBillList = that.$util.SplitArray(list, that.userBillList);
|
||||
|
|
|
@ -104,7 +104,7 @@
|
|||
let ids = [];
|
||||
ids.push(id);
|
||||
//领取优惠券
|
||||
setCouponReceive(ids).then(function (res) {
|
||||
setCouponReceive(id).then(function (res) {
|
||||
list[index].isUse = true;
|
||||
that.$set(that,'couponsList',list);
|
||||
that.$util.Tips({ title: '领取成功' });
|
||||
|
|
|
@ -37,19 +37,19 @@
|
|||
</view>
|
||||
</view>
|
||||
<view class='nav acea-row row-middle'>
|
||||
<navigator class='item' hover-class='none' url='/pages/users/user_bill/index'>
|
||||
<navigator class='item' hover-class='none' url='/pages/users/user_bill/index?type=all'>
|
||||
<view class='pictrue'>
|
||||
<image src='../../../static/images/record1.png'></image>
|
||||
</view>
|
||||
<view>账单记录</view>
|
||||
</navigator>
|
||||
<navigator class='item' hover-class='none' url='/pages/users/user_bill/index?type=1'>
|
||||
<navigator class='item' hover-class='none' url='/pages/users/user_bill/index?type=expenditure'>
|
||||
<view class='pictrue'>
|
||||
<image src='../../../static/images/record2.png'></image>
|
||||
</view>
|
||||
<view>消费记录</view>
|
||||
</navigator>
|
||||
<navigator class='item' hover-class='none' url='/pages/users/user_bill/index?type=2' v-if="rechargeSwitch">
|
||||
<navigator class='item' hover-class='none' url='/pages/users/user_bill/index?type=income' v-if="rechargeSwitch">
|
||||
<view class='pictrue'>
|
||||
<image src='../../../static/images/record3.png'></image>
|
||||
</view>
|
||||
|
|
|
@ -62,6 +62,7 @@
|
|||
extractBank,
|
||||
transferIn
|
||||
} from '@/api/user.js';
|
||||
import { wechatQueryPayResult } from '@/api/order.js';
|
||||
import {
|
||||
toLogin
|
||||
} from '@/libs/login.js';
|
||||
|
@ -251,12 +252,11 @@
|
|||
rechar_id: this.rechar_id
|
||||
}).then(res => {
|
||||
uni.hideLoading();
|
||||
let jsConfig = res.data.data;
|
||||
let packages = 'prepay_id=' + jsConfig.prepayId;
|
||||
let jsConfig = res.data.data.jsConfig;
|
||||
uni.requestPayment({
|
||||
timeStamp: jsConfig.timeStamp.toString(),
|
||||
timeStamp: jsConfig.timeStamp,
|
||||
nonceStr: jsConfig.nonceStr,
|
||||
package: packages,
|
||||
package: jsConfig.packages,
|
||||
signType: jsConfig.signType,
|
||||
paySign: jsConfig.paySign,
|
||||
success: function(res) {
|
||||
|
@ -294,38 +294,49 @@
|
|||
rechar_id: that.rechar_id,
|
||||
payType: 0
|
||||
}).then(res => {
|
||||
let jsConfig = res.data;
|
||||
let packages = 'prepay_id=' + jsConfig.prepayId;
|
||||
let jsConfig = res.data.jsConfig;
|
||||
let orderNo = res.data.orderNo;
|
||||
let data = {
|
||||
timestamp:jsConfig.timeStamp,
|
||||
nonceStr:jsConfig.nonceStr,
|
||||
package:packages,
|
||||
package:jsConfig.packages,
|
||||
signType:jsConfig.signType,
|
||||
paySign:jsConfig.paySign,
|
||||
h5PayUrl:jsConfig.h5PayUrl
|
||||
paySign:jsConfig.paySign
|
||||
};
|
||||
if (that.from == "weixinh5") {
|
||||
let domain = encodeURIComponent(location.href.split('/pages')[0]);
|
||||
let urls = data.h5PayUrl + '&redirect_url='+ domain + '/pages/users/user_money/index';
|
||||
let urls = jsConfig.mwebUrl + '&redirect_url='+ domain + '/pages/users/user_money/index';
|
||||
location.replace(urls);
|
||||
return that.$util.Tips({
|
||||
title: '支付成功',
|
||||
icon: 'success'
|
||||
}, {
|
||||
tab: 5,
|
||||
url: '/pages/users/user_money/index'
|
||||
});
|
||||
// return that.$util.Tips({
|
||||
// title: '支付成功',
|
||||
// icon: 'success'
|
||||
// }, {
|
||||
// tab: 5,
|
||||
// url: '/pages/users/user_money/index'
|
||||
// });
|
||||
} else {
|
||||
that.$wechat.pay(data)
|
||||
.finally(() => {
|
||||
that.$set(that, 'userinfo.nowMoney', that.$util.$h.Add(value, that.userinfo.nowMoney));
|
||||
return that.$util.Tips({
|
||||
title: '支付成功',
|
||||
icon: 'success'
|
||||
}, {
|
||||
tab: 5,
|
||||
url: '/pages/users/user_money/index'
|
||||
});
|
||||
wechatQueryPayResult({
|
||||
orderNo: orderNo
|
||||
}).then(res => {
|
||||
return that.$util.Tips({
|
||||
title: '支付成功',
|
||||
icon: 'success'
|
||||
}, {
|
||||
tab: 5,
|
||||
url: '/pages/users/user_money/index'
|
||||
});
|
||||
}).cache(err => {
|
||||
return that.$util.Tips({
|
||||
title: err
|
||||
});
|
||||
})
|
||||
})
|
||||
.catch(function(err) {
|
||||
return that.$util.Tips({
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<view class="phone">当前手机号:{{phone}}</view>
|
||||
<view class="list">
|
||||
<view class="item">
|
||||
<input type='password' placeholder='设置新密码' placeholder-class='placeholder' name="password" :value="password"></input>
|
||||
<input type='password' placeholder='以字母开头,长度在6~18之间,只能包含字符、数字和下划线' placeholder-class='placeholder' name="password" :value="password"></input>
|
||||
</view>
|
||||
<view class="item">
|
||||
<input type='password' placeholder='确认新密码' placeholder-class='placeholder' name="qr_password" :value="qr_password"></input>
|
||||
|
@ -132,6 +132,9 @@
|
|||
if (!password) return that.$util.Tips({
|
||||
title: '请输入新密码'
|
||||
});
|
||||
if (!/^[a-zA-Z]\w{5,17}$/i.test(password)) return that.$util.Tips({
|
||||
title: '以字母开头,长度在6~18之间,只能包含字符、数字和下划线'
|
||||
});
|
||||
if (qr_password != password) return that.$util.Tips({
|
||||
title: '两次输入的密码不一致!'
|
||||
});
|
||||
|
|
|
@ -34,7 +34,6 @@
|
|||
// #ifdef H5
|
||||
import uQRCode from '@/js_sdk/Sansnn-uQRCode/uqrcode.js'
|
||||
// #endif
|
||||
import { base64src } from '@/utils/base64src.js'
|
||||
import {
|
||||
getUserInfo,
|
||||
spreadBanner
|
||||
|
@ -46,6 +45,7 @@
|
|||
mapGetters
|
||||
} from "vuex";
|
||||
// #ifdef MP
|
||||
import { base64src } from '@/utils/base64src.js'
|
||||
import authorize from '@/components/Authorize';
|
||||
import {
|
||||
getQrcode
|
||||
|
|
|
@ -45,10 +45,10 @@
|
|||
<view class='itemn acea-row row-between-wrapper'>
|
||||
<view>
|
||||
<view class='name line1'>{{child.title}}</view>
|
||||
<view>{{child.add_time}}</view>
|
||||
<view>{{child.price}}</view>
|
||||
</view>
|
||||
<view class='num font-color' v-if="child.pm == 1">+{{child.number}}</view>
|
||||
<view class='num' v-else>-{{child.number}}</view>
|
||||
<view class='num font-color' v-if="child.type == 1">+{{child.price}}</view>
|
||||
<view class='num' v-else>-{{child.price}}</view>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
|
@ -181,14 +181,12 @@
|
|||
page: that.page,
|
||||
limit: that.limit
|
||||
}).then(res => {
|
||||
console.log(res)
|
||||
let len = res.data.list.length;
|
||||
let recordListData = res.data.list;
|
||||
recordListNew = recordList.concat(recordListData);
|
||||
that.status = that.limit > len;
|
||||
that.page = that.page + 1;
|
||||
that.$set(that, 'recordList', recordListNew);
|
||||
console.log(that.recordList)
|
||||
});
|
||||
},
|
||||
getCount: function() {
|
||||
|
@ -213,7 +211,7 @@
|
|||
getCommissionInfo({
|
||||
page: page,
|
||||
limit: limit
|
||||
}, recordType).then(res => {
|
||||
}).then(res => {
|
||||
if(res.data.list){
|
||||
let len = res.data.list.length;
|
||||
let recordListData = res.data.list;
|
||||
|
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 2.3 KiB |
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 2.7 KiB |
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 2.4 KiB |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 2.5 KiB |
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.2 KiB |
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 2.3 KiB |
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 2.1 KiB |
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 2.3 KiB |
|
@ -1,7 +1,7 @@
|
|||
// import {
|
||||
// SUBSCRIBE_MESSAGE
|
||||
// } from '../config/cache.js';
|
||||
const arrTemp = ["paySubscribe","orderSubscribe","extrctSubscribe", "orderRefundSubscribe", "rechargeSubscribe", 'pinkSubscribe', 'bargainSubscribe'];
|
||||
const arrTemp = ["beforePay","afterPay","refundApply", "beforeRecharge", "createBargain","pink"];
|
||||
|
||||
// export function auth() {
|
||||
// let tmplIds = {};
|
||||
|
@ -16,6 +16,7 @@ const arrTemp = ["paySubscribe","orderSubscribe","extrctSubscribe", "orderRefund
|
|||
*/
|
||||
export function openPaySubscribe() {
|
||||
let tmplIds = uni.getStorageSync('tempID' + arrTemp[0]);
|
||||
console.log(tmplIds)
|
||||
return subscribe(tmplIds);
|
||||
}
|
||||
|
||||
|
@ -32,16 +33,16 @@ export function openOrderSubscribe() {
|
|||
* 提现消息订阅
|
||||
* 成功 和 失败 消息
|
||||
*/
|
||||
export function openExtrctSubscribe() {
|
||||
let tmplIds = uni.getStorageSync('tempID' + arrTemp[2]);
|
||||
return subscribe(tmplIds);
|
||||
}
|
||||
// export function openExtrctSubscribe() {
|
||||
// let tmplIds = uni.getStorageSync('tempID' + arrTemp[2]);
|
||||
// return subscribe(tmplIds);
|
||||
// }
|
||||
|
||||
/**
|
||||
* 订单退款
|
||||
*/
|
||||
export function openOrderRefundSubscribe() {
|
||||
let tmplIds = uni.getStorageSync('tempID' + arrTemp[3]);
|
||||
let tmplIds = uni.getStorageSync('tempID' + arrTemp[2]);
|
||||
return subscribe(tmplIds);
|
||||
}
|
||||
|
||||
|
@ -49,6 +50,14 @@ export function openOrderRefundSubscribe() {
|
|||
* 充值成功
|
||||
*/
|
||||
export function openRechargeSubscribe() {
|
||||
let tmplIds = uni.getStorageSync('tempID' + arrTemp[3]);
|
||||
return subscribe(tmplIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 砍价成功
|
||||
*/
|
||||
export function openBargainSubscribe() {
|
||||
let tmplIds = uni.getStorageSync('tempID' + arrTemp[4]);
|
||||
return subscribe(tmplIds);
|
||||
}
|
||||
|
@ -60,22 +69,6 @@ export function openRechargeSubscribe() {
|
|||
export function openPinkSubscribe() {
|
||||
let tmplIds = uni.getStorageSync('tempID' + arrTemp[5]);
|
||||
return subscribe(tmplIds);
|
||||
// let tmplIds = auth();
|
||||
// return subscribe([
|
||||
// tmplIds.pink_true
|
||||
// ]);
|
||||
}
|
||||
|
||||
/**
|
||||
* 砍价成功
|
||||
*/
|
||||
export function openBargainSubscribe() {
|
||||
let tmplIds = uni.getStorageSync('tempID' + arrTemp[6]);
|
||||
return subscribe(tmplIds);
|
||||
// let tmplIds = auth();
|
||||
// return subscribe([
|
||||
// tmplIds.bargain_success
|
||||
// ]);
|
||||
}
|
||||
// /**
|
||||
// * 提现
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
const fsm = uni.getFileSystemManager ? uni.getFileSystemManager() : null;
|
||||
const fsm = wx.getFileSystemManager ? wx.getFileSystemManager() : null;
|
||||
const FILE_BASE_NAME = 'tmp_base64src'; //自定义文件名
|
||||
|
||||
export function base64src(base64data, cb) {
|
||||
|
|