更新代码

pull/1/MERGE
guaishoudemao 2021-02-06 17:25:18 +08:00
parent f3c1bcb6c5
commit d4f2aae8f9
40 changed files with 2294 additions and 2338 deletions

View File

@ -191,7 +191,7 @@ export function logout(){
*/ */
export function getTemlIds(data) 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});
} }
/** /**

View File

@ -124,8 +124,8 @@ export function userActivity(){
/* /*
* 余额明细types|2=全部,1=支出,2=收入 * 余额明细types|2=全部,1=支出,2=收入
* */ * */
export function getCommissionInfo(q, types) { export function getCommissionInfo(data) {
return request.get("spread/commission/" + types, q); 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);
}

View File

@ -66,7 +66,7 @@
// //
let ids = []; let ids = [];
ids.push(id); ids.push(id);
setCouponReceive(ids).then(res=>{ setCouponReceive(id).then(res=>{
that.$emit('ChangCouponsUseState', index); that.$emit('ChangCouponsUseState', index);
that.$util.Tips({title: "领取成功"}); that.$util.Tips({title: "领取成功"});
that.$emit('ChangCoupons', list[index]); that.$emit('ChangCoupons', list[index]);

View File

@ -62,6 +62,7 @@
}, },
goPay: function(number, paytype) { goPay: function(number, paytype) {
let that = this; let that = this;
let goPages = '/pages/order_pay_status/index?order_id=' + that.order_id;
if (!that.order_id) return that.$util.Tips({ if (!that.order_id) return that.$util.Tips({
title: '请选择要支付的订单' title: '请选择要支付的订单'
}); });
@ -73,7 +74,12 @@
}); });
wechatOrderPay({ wechatOrderPay({
orderNo: that.order_id, 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 payType: paytype
}).then(res => { }).then(res => {
let jsConfig = res.data.jsConfig; let jsConfig = res.data.jsConfig;
@ -167,9 +173,9 @@
break; break;
case 'weixinh5': case 'weixinh5':
uni.hideLoading(); 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({ return that.$util.Tips({
title: "支付成功", title: "支付",
icon: 'success' icon: 'success'
}, () => { }, () => {
that.$emit('onChangeFun', { that.$emit('onChangeFun', {
@ -178,119 +184,6 @@
}); });
break; 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 => { }).catch(err => {
uni.hideLoading(); uni.hideLoading();
return that.$util.Tips({ return that.$util.Tips({

View File

@ -77,6 +77,9 @@
.recommend .recommendList { .recommend .recommendList {
padding: 0 30rpx; padding: 0 30rpx;
/* #ifdef H5 */
padding-bottom: 50rpx;
/* #endif */
} }
.recommend .recommendList .item { .recommend .recommendList .item {

View File

@ -9,7 +9,7 @@
</scroll-view> </scroll-view>
</view> </view>
<view class="child-box" v-if="tabClick>0 && tabTitle[tabClick].child?tabTitle[tabClick].child.length>0:0"> <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 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)"> <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> <image :src="item.extra" mode="" :style="{'background-color':item.extra?'none':'#f7f7f7'}"></image>
@ -18,6 +18,17 @@
</view> </view>
</scroll-view> </scroll-view>
</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> </view>
</template> </template>

View File

@ -1,6 +1,5 @@
var josn=require('../../domain.json') let domain = 'http://localhost:8080'
let domain = josn.domain
module.exports = { module.exports = {
// 请求域名 格式: https://您的域名 // 请求域名 格式: https://您的域名
@ -12,7 +11,6 @@ module.exports = {
// #ifdef H5 // #ifdef H5
//H5接口是浏览器地址 //H5接口是浏览器地址
// HTTP_REQUEST_URL: window.location.protocol+"//"+window.location.host, // HTTP_REQUEST_URL: window.location.protocol+"//"+window.location.host,
// http://api.java.crmeb.net:20001
HTTP_REQUEST_URL:domain, HTTP_REQUEST_URL:domain,
// #endif // #endif

View File

@ -58,6 +58,7 @@ class AuthWechat {
resolve(this.instance); resolve(this.instance);
}) })
}).catch(err => { }).catch(err => {
console.log('微信分享配置失败',err);
this.status = false; this.status = false;
reject(err); reject(err);
}); });
@ -121,7 +122,6 @@ class AuthWechat {
this.toPromise(wx.chooseWXPay, config).then(res => { this.toPromise(wx.chooseWXPay, config).then(res => {
resolve(res); resolve(res);
}).catch(res => { }).catch(res => {
console.log('js中的错误',res)
resolve(res); resolve(res);
}); });
}).catch(res => { }).catch(res => {

View File

@ -8,17 +8,6 @@
<!-- :style="'top:'+navH/2+'rpx'" --> <!-- :style="'top:'+navH/2+'rpx'" -->
{{bargainCount.lookCount || 0}}人查看 {{bargainCount.shareCount || 0}}人分享 {{bargainCount.userCount || 0}}人参与 {{bargainCount.lookCount || 0}}人查看 {{bargainCount.shareCount || 0}}人分享 {{bargainCount.userCount || 0}}人参与
</view> </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> <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 v-if="bargainUid != userInfo.uid" class='pictxt acea-row row-center-wrapper'>
<view class='pictrue'> <view class='pictrue'>

View File

@ -22,7 +22,7 @@
<view class='wrapper'> <view class='wrapper'>
<view class='share acea-row row-between row-bottom'> <view class='share acea-row row-between row-bottom'>
<view class='money font-color'> <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>
<view class='iconfont icon-fenxiang' @click="listenerActionSheet"></view> <view class='iconfont icon-fenxiang' @click="listenerActionSheet"></view>
</view> </view>
@ -120,8 +120,7 @@
<view class='product-intro' id="past2"> <view class='product-intro' id="past2">
<view class='title'>产品介绍</view> <view class='title'>产品介绍</view>
<view class='conter'> <view class='conter'>
<!-- <rich-text :nodes="storeInfo.description" class="conter"></rich-text> --> <jyf-parser :html="storeInfo.content" ref="article" :tag-style="tagStyle"></jyf-parser>
<jyf-parser :html="storeInfo.description" ref="article" :tag-style="tagStyle"></jyf-parser>
</view> </view>
</view> </view>
<view style='height:120rpx;'></view> <view style='height:120rpx;'></view>
@ -198,8 +197,6 @@
<view class="share-box" v-if="H5ShareBox"> <view class="share-box" v-if="H5ShareBox">
<image src="/static/images/share-info.png" @click="H5ShareBox = false"></image> <image src="/static/images/share-info.png" @click="H5ShareBox = false"></image>
</view> </view>
<!-- <view class='mask' v-if="posterImageStatus"></view>
<canvas class="canvas" canvas-id='myCanvas' v-if="canvasStatus"></canvas> -->
<!-- #ifdef MP --> <!-- #ifdef MP -->
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize> <authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize>
<!-- #endif --> <!-- #endif -->
@ -212,12 +209,11 @@
<script> <script>
const app = getApp(); const app = getApp();
import uQRCode from '@/js_sdk/Sansnn-uQRCode/uqrcode.js' import uQRCode from '@/js_sdk/Sansnn-uQRCode/uqrcode.js'
import { base64src } from '@/utils/base64src.js'
import { import {
mapGetters mapGetters
} from "vuex"; } from "vuex";
// #ifdef MP // #ifdef MP
import { base64src } from '@/utils/base64src.js'
import authorize from '@/components/Authorize'; import authorize from '@/components/Authorize';
import { import {
getQrcode getQrcode
@ -809,7 +805,7 @@
}, },
// //
listenerActionClose: function() { listenerActionClose: function() {
this.posters = false; this.canvasStatus = false;
}, },
// //
posterImageClose: function() { posterImageClose: function() {
@ -1039,8 +1035,9 @@
}, },
//#ifdef MP //#ifdef MP
onShareAppMessage() { onShareAppMessage() {
let that = this;
return { return {
title: this.storeInfo.title, title: that.storeInfo.title,
path: app.globalData.openPages, path: app.globalData.openPages,
imageUrl: that.storeInfo.image imageUrl: that.storeInfo.image
}; };
@ -1399,8 +1396,8 @@
} }
.canvas { .canvas {
width: 750px; position:fixed;
height: 1190px; z-index: -5;
opacity: 0; opacity: 0;
} }

View File

@ -163,7 +163,6 @@
<script> <script>
const app = getApp(); const app = getApp();
import uQRCode from '@/js_sdk/Sansnn-uQRCode/uqrcode.js' import uQRCode from '@/js_sdk/Sansnn-uQRCode/uqrcode.js'
import { base64src } from '@/utils/base64src.js'
import { import {
mapGetters mapGetters
} from "vuex"; } from "vuex";
@ -183,6 +182,7 @@
import userEvaluation from '@/components/userEvaluation/index.vue' import userEvaluation from '@/components/userEvaluation/index.vue'
// #ifdef MP // #ifdef MP
import authorize from '@/components/Authorize'; import authorize from '@/components/Authorize';
import { base64src } from '@/utils/base64src.js'
import { import {
getQrcode getQrcode
} from '@/api/api.js'; } from '@/api/api.js';
@ -199,7 +199,6 @@
} from '@/libs/login.js'; } from '@/libs/login.js';
import { silenceBindingSpread } from "@/utils"; import { silenceBindingSpread } from "@/utils";
export default { export default {
computed: mapGetters(['isLogin']),
data() { data() {
return { return {
id: 0, id: 0,
@ -310,9 +309,9 @@
// //
if (options.scene) { if (options.scene) {
let value = this.$util.getUrlParams(decodeURIComponent(options.scene)); // let value = this.$util.getUrlParams(decodeURIComponent(options));
if (value.id){ if (options.id){
this.id = value.id; this.id = options.id;
}else{ }else{
return this.$util.Tips({ return this.$util.Tips({
title: '缺少参数无法查看商品' title: '缺少参数无法查看商品'
@ -322,8 +321,8 @@
}); });
} }
//广uid //广uid
if (value.pid) app.globalData.spid = value.pid; if (options.pid) app.globalData.spid = options.pid;
if (value.time) this.datatime = value.time if (options.time) this.datatime = options.time
} }
// #endif // #endif
@ -423,8 +422,8 @@
setTimeout(function() { setTimeout(function() {
that.infoScroll(); that.infoScroll();
}, 500); }, 500);
app.globalData.openPages = '/pages/activity/goods_seckill_details/index?id=' + that.id + '&time=' + that.time + app.globalData.openPages = '/pages/activity/goods_seckill_details/index?id=' + that.id + '&time=' + that.datatime +
'&status=' + that.status + '&scene=' + that.storeInfo.uid; '&status=' + that.status + '&scene=' + that.uid + '&productId=' + that.storeInfo.productId;
}).catch(err => { }).catch(err => {
that.$util.Tips({ 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> </script>

View File

@ -135,7 +135,9 @@
let people = this.storeCombination.storeCombination.people; let people = this.storeCombination.storeCombination.people;
let otPrice = this.storeCombination.storeCombination.otPrice; let otPrice = this.storeCombination.storeCombination.otPrice;
let count = this.storeCombination.count; let count = this.storeCombination.count;
setTimeout(() => {
this.PosterCanvas(arrImages, storeName, price, people,otPrice,count); this.PosterCanvas(arrImages, storeName, price, people,otPrice,count);
}, 300);
}, },
complete: () => { complete: () => {
}, },
@ -162,7 +164,7 @@
context.setFontSize(36); context.setFontSize(36);
context.setTextAlign('center'); context.setTextAlign('center');
context.setFillStyle('#282828'); context.setFillStyle('#282828');
let maxText = 17; let maxText = 20;
let text = storeName; let text = storeName;
let topText = ''; let topText = '';
let bottomText = ''; let bottomText = '';
@ -190,7 +192,7 @@
context.setFontSize(72); context.setFontSize(72);
context.setFillStyle('#fc4141'); context.setFillStyle('#fc4141');
context.fillText(price, 220, 210); context.fillText(price, 250, 210);
context.setFontSize(32); context.setFontSize(32);
context.setFillStyle('#FFFFFF'); context.setFillStyle('#FFFFFF');

View File

@ -1,5 +1,5 @@
<template> <template>
<view class='productSort'> <view class='productSort copy-data'>
<view class='header acea-row row-center-wrapper'> <view class='header acea-row row-center-wrapper'>
<view class='acea-row row-between-wrapper input'> <view class='acea-row row-between-wrapper input'>
<text class='iconfont icon-sousuo'></text> <text class='iconfont icon-sousuo'></text>
@ -7,7 +7,7 @@
placeholder-class='placeholder'></input> placeholder-class='placeholder'></input>
</view> </view>
</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" <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> :key="index" @click='tap(index,"b"+index)'><text>{{item.name}}</text></view>
</view> </view>
@ -25,6 +25,9 @@
<view class='list acea-row'> <view class='list acea-row'>
<block v-for="(itemn,indexn) in item.child" :key="indexn"> <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'> <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'}"> <view class='picture' :style="{'background-color':itemn.extra?'none':'#f7f7f7'}">
<image :src='itemn.extra'></image> <image :src='itemn.extra'></image>
</view> </view>
@ -61,19 +64,18 @@
onLoad(options) { onLoad(options) {
this.getAllCategory(); this.getAllCategory();
}, },
onShow(){ onShow() {},
},
methods: { methods: {
infoScroll: function() { infoScroll: function() {
let that = this; let that = this;
let len = that.productList.length; let len = that.productList.length;
let child = that.productList[len - 1]&&that.productList[len - 1].child?that.productList[len - 1].child:[]; let child = that.productList[len - 1] && that.productList[len - 1].child ? that.productList[len - 1].child : [];
this.number = child?child.length:0; this.number = child ? child.length : 0;
// //
uni.getSystemInfo({ uni.getSystemInfo({
success: function(res) { success: function(res) {
that.height = (res.windowHeight) * (750 / res.windowWidth) - 98; that.height = (res.windowHeight) * (750 / res.windowWidth);
}, },
}); });
let height = 0; let height = 0;
@ -98,9 +100,9 @@
let that = this; let that = this;
getCategoryList().then(res => { getCategoryList().then(res => {
that.productList = res.data; that.productList = res.data;
setTimeout(function(){ setTimeout(function() {
that.infoScroll(); that.infoScroll();
},500) }, 500)
}) })
}, },
scroll: function(e) { scroll: function(e) {
@ -169,14 +171,18 @@
.productSort .aside { .productSort .aside {
position: fixed; position: fixed;
width: 180rpx; width: 24%;
left: 0; left: 0;
top:0; top: 0;
background-color: #f7f7f7; background-color: #f7f7f7;
overflow-y: auto; overflow-y: auto;
overflow-x: hidden; overflow-x: hidden;
height: auto; height: auto;
margin-top: 96rpx; 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 { .productSort .aside .item {
@ -241,9 +247,6 @@
width: 100%; width: 100%;
height: 100%; height: 100%;
border-radius: 50%; border-radius: 50%;
div{
background-color: #f7f7f7;
}
} }
.productSort .conter .list .item .name { .productSort .conter .list .item .name {

View File

@ -39,7 +39,7 @@
<view class='activity'>赠送 {{storeInfo.give_integral}} 积分</view> <view class='activity'>赠送 {{storeInfo.give_integral}} 积分</view>
</view> </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='hide line1 acea-row'>
优惠券 优惠券
<view class='activity' v-for="(item,index) in couponList" :key="index">{{item.minPrice}}{{item.money}}</view> <view class='activity' v-for="(item,index) in couponList" :key="index">{{item.minPrice}}{{item.money}}</view>
@ -152,14 +152,22 @@
</view> </view>
<view>购物车</view> <view>购物车</view>
</navigator> </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'> <form @submit="joinCart" report-submit='true'>
<button class='joinCart bnts' form-type="submit">加入购物车</button> <button class='joinCart bnts' form-type="submit">加入购物车</button>
</form> </form>
<form @submit="goBuy" report-submit='true'> <form @submit="goBuy" report-submit='true'>
<button class='buy bnts' form-type="submit">立即购买</button> <button class='buy bnts' form-type="submit">立即购买</button>
</form> </form>
</view> </view> -->
</view> </view>
<shareRedPackets :sharePacket="sharePacket" @listenerActionSheet="listenerActionSheet" @closeChange="closeChange"></shareRedPackets> <shareRedPackets :sharePacket="sharePacket" @listenerActionSheet="listenerActionSheet" @closeChange="closeChange"></shareRedPackets>
<!-- 组件 --> <!-- 组件 -->
@ -216,7 +224,6 @@
<script> <script>
import uQRCode from '@/js_sdk/Sansnn-uQRCode/uqrcode.js' 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 yzf_chat from '@/plugin/chat/yzf_chat.js'
import store from '@/store'; import store from '@/store';
import { import {
@ -259,6 +266,7 @@
} from "@/utils"; } from "@/utils";
import parser from "@/components/jyf-parser/jyf-parser"; import parser from "@/components/jyf-parser/jyf-parser";
// #ifdef MP // #ifdef MP
import { base64src } from '@/utils/base64src.js'
import authorize from '@/components/Authorize'; import authorize from '@/components/Authorize';
import { import {
getQrcode getQrcode
@ -558,7 +566,7 @@
getUserInfo: function() { getUserInfo: function() {
let that = this; let that = this;
getUserInfo().then(res => { 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); store.commit('SETUID', res.data.uid);
// that.$set(that, 'uid', res.data.uid); // that.$set(that, 'uid', res.data.uid);
// #ifdef H5 // #ifdef H5
@ -1242,8 +1250,6 @@
}); });
}, },
fail: function(res) { fail: function(res) {
console.log('保存失败原因2')
console.log(res)
that.$util.Tips({ that.$util.Tips({
title: '保存失败' title: '保存失败'
}); });

View File

@ -208,6 +208,7 @@
</view> </view>
</view> </view>
</block> </block>
<Loading :loaded="loadend" :loading="loading"></Loading>
<block v-if="sortProduct.length == 0"> <block v-if="sortProduct.length == 0">
<view class="noCommodity"> <view class="noCommodity">
<view class='pictrue'> <view class='pictrue'>
@ -216,6 +217,7 @@
<recommend :hostProduct="hostProduct"></recommend> <recommend :hostProduct="hostProduct"></recommend>
</view> </view>
</block> </block>
</view> </view>
<coupon-window :window='window' :couponList="couponList" @onColse="onColse"></coupon-window> <coupon-window :window='window' :couponList="couponList" @onColse="onColse"></coupon-window>
<!-- #ifdef MP --> <!-- #ifdef MP -->
@ -290,7 +292,8 @@
getWechatConfig getWechatConfig
} from "@/api/public"; } from "@/api/public";
// #endif // #endif
const arrTemp = ["paySubscribe","orderSubscribe","extrctSubscribe", "orderRefundSubscribe", "rechargeSubscribe"]; import Loading from '@/components/Loading/index.vue';
const arrTemp = ["beforePay","afterPay","refundApply", "beforeRecharge", "createBargain","pink"];
export default { export default {
computed: mapGetters(['isLogin', 'uid']), computed: mapGetters(['isLogin', 'uid']),
components: { components: {
@ -304,11 +307,13 @@
c_bargain, c_bargain,
recommend, recommend,
// #ifdef MP // #ifdef MP
authorize authorize,
// #endif // #endif
Loading
}, },
data() { data() {
return { return {
loaded: false,
loading: false, loading: false,
isAuto: false, // isAuto: false, //
isShowAuth: false, // isShowAuth: false, //
@ -433,7 +438,7 @@
} }
}, },
getTem(data){ getTem(data){
getTemlIds({status:true,type:data}).then(res => { getTemlIds({type:data}).then(res => {
if (res.data) { if (res.data) {
let arr = res.data.map((item) => { let arr = res.data.map((item) => {
return item.tempId return item.tempId
@ -1677,6 +1682,7 @@
.productList { .productList {
background-color: #fff; background-color: #fff;
/* #ifdef H5 */ padding-bottom: 140rpx; /* #endif */
} }
.productList .list { .productList .list {

View File

@ -17,10 +17,10 @@
<block v-for="(item,index) in cartList.valid" :key="index"> <block v-for="(item,index) in cartList.valid" :key="index">
<view class='item acea-row row-between-wrapper'> <view class='item acea-row row-between-wrapper'>
<!-- #ifndef MP --> <!-- #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 --> <!-- #endif -->
<!-- #ifdef MP --> <!-- #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 --> <!-- #endif -->
<navigator :url='"/pages/goods_details/index?id="+item.productId' hover-class='none' class='picTxt acea-row row-between-wrapper'> <navigator :url='"/pages/goods_details/index?id="+item.productId' hover-class='none' class='picTxt acea-row row-between-wrapper'>
<view class='pictrue'> <view class='pictrue'>
@ -91,7 +91,7 @@
<view class='footer acea-row row-between-wrapper' v-if="cartList.valid.length > 0"> <view class='footer acea-row row-between-wrapper' v-if="cartList.valid.length > 0">
<view> <view>
<checkbox-group @change="checkboxAllChange"> <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> </checkbox-group>
</view> </view>
<view class='money acea-row row-middle' v-if="footerswitch==true"> <view class='money acea-row row-middle' v-if="footerswitch==true">
@ -510,22 +510,52 @@
this.setAllSelectValue(0) 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) { setAllSelectValue: function(status) {
let that = this; let that = this;
let selectValue = []; let selectValue = [];
let valid = that.cartList.valid; let valid = that.cartList.valid;
if (valid.length > 0) { if (valid.length > 0) {
for (let index in valid) { let newValid = valid.map(item => {
if (status == 1) { if (status) {
if(valid[index].attrStatus){ if (that.footerswitch) {
valid[index].checked = true; if (item.attrStatus) {
selectValue.push(valid[index].id); item.checked = true;
}else{ selectValue.push(item.id);
valid[index].checked = false; } else{
item.checked = false;
} }
} else valid[index].checked = false; } else{
item.checked = true;
selectValue.push(item.id);
} }
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.selectValue = selectValue;
that.switchSelect(); that.switchSelect();
} }
@ -534,23 +564,59 @@
let that = this; let that = this;
let value = event.detail.value; let value = event.detail.value;
let valid = that.cartList.valid; let valid = that.cartList.valid;
for (let index in valid) { let arr1 = [];
if (that.inArray(valid[index].id, value)){ let arr2 = [];
if(valid[index].attrStatus){ let arr3 = [];
valid[index].checked = true; let newValid = valid.map(item => {
}else{ if (that.inArray(item.id, value)) {
valid[index].checked = false; if (that.footerswitch) {
if (item.attrStatus) {
item.checked = true;
arr1.push(item);
} else{
item.checked = false;
} }
} else { } else{
valid[index].checked = false; item.checked = true;
arr1.push(item);
} }
} else{
item.checked = false;
arr2.push(item);
} }
that.$set(that.cartList, 'valid', valid); return item;
let newArr = that.cartList.valid.filter(item => item.attrStatus); });
that.isAllSelect = value.length == newArr.length; if (that.footerswitch) {
arr3 = arr2.filter(item => !item.attrStatus);
}
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; that.selectValue = value;
console.log(that.selectValue)
that.switchSelect(); 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) { inArray: function(search, array) {
for (let i in array) { for (let i in array) {
if (array[i] == search) { if (array[i] == search) {
@ -755,6 +821,33 @@
manage: function() { manage: function() {
let that = this; let that = this;
that.footerswitch = !that.footerswitch; 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() { unsetCart: function() {
let that = this, let that = this,
@ -780,7 +873,7 @@
that.getCartList(); that.getCartList();
} }
if (that.cartList.valid.length == 0 && that.cartList.invalid.length == 0) { if (that.cartList.valid.length == 0 && that.cartList.invalid.length == 0) {
that.getHostProduct(); // that.getHostProduct();
} }
} }
} }

View File

@ -17,12 +17,37 @@
<block v-for="(item,index) in cartList.valid" :key="index"> <block v-for="(item,index) in cartList.valid" :key="index">
<view class='item acea-row row-between-wrapper'> <view class='item acea-row row-between-wrapper'>
<!-- #ifndef MP --> <!-- #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 --> <!-- #endif -->
<!-- #ifdef MP --> <!-- #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 --> <!-- #endif -->
<navigator :url='"/pages/goods_details/index?id="+item.product_id' hover-class='none' class='picTxt acea-row row-between-wrapper'> <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'> <view class='pictrue'>
<image v-if="item.productInfo.attrInfo" :src='item.productInfo.attrInfo.image'></image> <image v-if="item.productInfo.attrInfo" :src='item.productInfo.attrInfo.image'></image>
<image v-else :src='item.productInfo.image'></image> <image v-else :src='item.productInfo.image'></image>
@ -35,12 +60,9 @@
<view class='carnum acea-row row-center-wrapper'> <view class='carnum acea-row row-center-wrapper'>
<view class="reduce" :class="item.numSub ? 'on' : ''" @click.stop='subCart(index)'>-</view> <view class="reduce" :class="item.numSub ? 'on' : ''" @click.stop='subCart(index)'>-</view>
<view class='num'>{{item.cart_num}}</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 class="plus" :class="item.numAdd ? 'on' : ''" @click.stop='addCart(index)'>+</view>
</view> </view>
</navigator> </navigator> -->
</view> </view>
</block> </block>
</checkbox-group> </checkbox-group>
@ -70,6 +92,12 @@
</block> </block>
</view> </view>
</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>
<view class='noCart' v-if="cartList.valid.length == 0 && cartList.invalid.length == 0"> <view class='noCart' v-if="cartList.valid.length == 0 && cartList.invalid.length == 0">
<view class='pictrue'> <view class='pictrue'>
@ -81,7 +109,7 @@
<view class='footer acea-row row-between-wrapper' v-if="cartList.valid.length > 0"> <view class='footer acea-row row-between-wrapper' v-if="cartList.valid.length > 0">
<view> <view>
<checkbox-group @change="checkboxAllChange"> <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> </checkbox-group>
</view> </view>
<view class='money acea-row row-middle' v-if="footerswitch==true"> <view class='money acea-row row-middle' v-if="footerswitch==true">
@ -152,7 +180,29 @@
isShowAuth: false, // isShowAuth: false, //
hotScroll:false, hotScroll:false,
hotPage:1, 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']), computed: mapGetters(['isLogin']),

View File

@ -7,7 +7,7 @@
<view class='item'><text class='iconfont icon-xuanzhong'></text>售后无忧</view> <view class='item'><text class='iconfont icon-xuanzhong'></text>售后无忧</view>
</view> </view>
<view class='nav acea-row row-between-wrapper'> <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' <view v-if="cartList.valid.length > 0 || cartList.invalid.length > 0" class='administrate acea-row row-center-wrapper'
@click='manage'>{{ footerswitch ? '管理' : '取消'}}</view> @click='manage'>{{ footerswitch ? '管理' : '取消'}}</view>
</view> </view>
@ -17,10 +17,10 @@
<block v-for="(item,index) in cartList.valid" :key="index"> <block v-for="(item,index) in cartList.valid" :key="index">
<view class='item acea-row row-between-wrapper'> <view class='item acea-row row-between-wrapper'>
<!-- #ifndef MP --> <!-- #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 --> <!-- #endif -->
<!-- #ifdef MP --> <!-- #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 --> <!-- #endif -->
<navigator :url='"/pages/goods_details/index?id="+item.productId' hover-class='none' class='picTxt acea-row row-between-wrapper'> <navigator :url='"/pages/goods_details/index?id="+item.productId' hover-class='none' class='picTxt acea-row row-between-wrapper'>
<view class='pictrue'> <view class='pictrue'>
@ -28,15 +28,15 @@
<image v-else :src='item.productInfo.image'></image> <image v-else :src='item.productInfo.image'></image>
</view> </view>
<view class='text'> <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='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='money' v-if="item.attrStatus">{{item.truePrice}}</view>
<view class="reElection acea-row row-between-wrapper" v-if="!item.trueStock || item.trueStock === 0 "> <view class="reElection acea-row row-between-wrapper" v-else>
<view class="title">请重新选择商品规格</view> <view class="title">请重新选择商品规格</view>
<view class="reBnt cart-color acea-row row-center-wrapper" @click.stop="reElection(item)">重选</view> <view class="reBnt cart-color acea-row row-center-wrapper" @click.stop="reElection(item)">重选</view>
</view> </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="reduce" :class="item.numSub ? 'on' : ''" @click.stop='subCart(index)'>-</view>
<view class='num'>{{item.cartNum}}</view> <view class='num'>{{item.cartNum}}</view>
<!-- <view class="num"> <!-- <view class="num">
@ -83,14 +83,13 @@
</view> </view>
<view class='noCart' v-if="cartList.valid.length == 0 && cartList.invalid.length == 0"> <view class='noCart' v-if="cartList.valid.length == 0 && cartList.invalid.length == 0">
<view class='pictrue'> <view class='pictrue'>
<image src='../columnGoods/static/noCart.png'></image> <image src='../../static/images/noCart.png'></image>
</view> </view>
<recommend :hostProduct='hostProduct'></recommend> <recommend :hostProduct='hostProduct'></recommend>
</view> </view>
<view style='height:120rpx;color: #F5F5F5;'>{{selectCountPrice}}</view> <view style='height:120rpx;color: #F5F5F5;'>{{selectCountPrice}}</view>
<view class='footer acea-row row-between-wrapper' v-if="cartList.valid.length > 0"> <view class='footer acea-row row-between-wrapper' v-if="cartList.valid.length > 0">
<view> <view>
{{isAllSelect}}
<checkbox-group @change="checkboxAllChange"> <checkbox-group @change="checkboxAllChange">
<checkbox value="all" :checked="!!isAllSelect" /><text class='checkAll'>全选 ({{cartCount}})</text> <checkbox value="all" :checked="!!isAllSelect" /><text class='checkAll'>全选 ({{cartCount}})</text>
</checkbox-group> </checkbox-group>
@ -190,8 +189,7 @@
attrValue: '', // attrValue: '', //
attrTxt: '请选择', // attrTxt: '请选择', //
cartId: 0, cartId: 0,
product_id: 0, product_id: 0
delCheck: [] //
}; };
}, },
computed: mapGetters(['isLogin']), computed: mapGetters(['isLogin']),
@ -234,7 +232,6 @@
}, },
this.isAllSelect = false; // this.isAllSelect = false; //
this.selectValue = []; // this.selectValue = []; //
this.delCheck = [];
this.selectCountPrice = 0.00; this.selectCountPrice = 0.00;
this.cartCount = 0; this.cartCount = 0;
this.isShowAuth = false; this.isShowAuth = false;
@ -281,7 +278,7 @@
}) })
.catch(res => { .catch(res => {
return that.$util.Tips({ return that.$util.Tips({
title: res.msg title: res
}); });
}); });
}, },
@ -444,19 +441,18 @@
subDel: function(event) { subDel: function(event) {
let that = this, let that = this,
selectValue = that.selectValue; selectValue = that.selectValue;
if (selectValue.length > 0)
// if (selectValue.length > 0) cartDel(selectValue).then(res => {
// cartDel(selectValue).then(res => { that.loadend = false;
// that.loadend = false; that.page = 1;
// that.page = 1; that.cartList.valid = [];
// that.cartList.valid = []; that.getCartList();
// that.getCartList(); that.getCartNum();
// that.getCartNum(); });
// }); else
// else return that.$util.Tips({
// return that.$util.Tips({ title: '请选择产品'
// title: '' });
// });
}, },
getSelectValueProductId: function() { getSelectValueProductId: function() {
let that = this; let that = this;
@ -477,16 +473,16 @@
selectValue = that.selectValue; selectValue = that.selectValue;
if (selectValue.length > 0) { if (selectValue.length > 0) {
let selectValueProductId = that.getSelectValueProductId(); let selectValueProductId = that.getSelectValueProductId();
// collectAll(that.getSelectValueProductId()).then(res => { collectAll(that.getSelectValueProductId()).then(res => {
// return that.$util.Tips({ return that.$util.Tips({
// title: res.msg, title: '收藏成功',
// icon: 'success' icon: 'success'
// }); });
// }).catch(err => { }).catch(err => {
// return that.$util.Tips({ return that.$util.Tips({
// title: err title: err
// }); });
// }); });
} else { } else {
return that.$util.Tips({ return that.$util.Tips({
title: '请选择产品' title: '请选择产品'
@ -497,9 +493,9 @@
let that = this, let that = this,
selectValue = that.selectValue; selectValue = that.selectValue;
if (selectValue.length > 0) { if (selectValue.length > 0) {
// uni.navigateTo({ uni.navigateTo({
// url: '/pages/users/order_confirm/index?new=false&cartId=' + selectValue.join(',') url: '/pages/users/order_confirm/index?new=false&cartId=' + selectValue.join(',')
// }); });
} else { } else {
return that.$util.Tips({ return that.$util.Tips({
title: '请选择产品' title: '请选择产品'
@ -521,18 +517,12 @@
if (valid.length > 0) { if (valid.length > 0) {
for (let index in valid) { for (let index in valid) {
if (status == 1) { if (status == 1) {
if(that.footerswitch){
if(valid[index].attrStatus){ if(valid[index].attrStatus){
valid[index].checked = true; valid[index].checked = true;
selectValue.push(valid[index].id); selectValue.push(valid[index].id);
}else{ }else{
valid[index].checked = false; valid[index].checked = false;
} }
}else{
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.$set(that.cartList, 'valid', valid);
@ -544,42 +534,21 @@
let that = this; let that = this;
let value = event.detail.value; let value = event.detail.value;
let valid = that.cartList.valid; let valid = that.cartList.valid;
//that.delCheck = value;
for (let index in valid) { for (let index in valid) {
const item = valid[index]
if (that.inArray(valid[index].id, value)){ if (that.inArray(valid[index].id, value)){
this.$set(item,'checked',true) if(valid[index].attrStatus){
valid[index].checked = true;
}else{ }else{
this.$set(item,'checked',false) valid[index].checked = false;
}
} else {
valid[index].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;
// }
// }
that.$set(that.cartList, 'valid', valid); that.$set(that.cartList, 'valid', valid);
let newArr = that.cartList.valid.filter(item => item.attrStatus); let newArr = that.cartList.valid.filter(item => item.attrStatus);
that.isAllSelect = value.length == newArr.length; that.isAllSelect = value.length == newArr.length;
that.selectValue = value that.selectValue = value;
that.switchSelect(); that.switchSelect();
}, },
inArray: function(search, array) { inArray: function(search, array) {
@ -599,18 +568,13 @@
that.selectCountPrice = selectCountPrice; that.selectCountPrice = selectCountPrice;
} else { } else {
for (let index in validList) { for (let index in validList) {
// if ((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))
// }
if (that.inArray(validList[index].id, selectValue) && validList[index].trueStock) {
selectCountPrice = that.$util.$h.Add(selectCountPrice, that.$util.$h.Mul(validList[index].cartNum, validList[ selectCountPrice = that.$util.$h.Add(selectCountPrice, that.$util.$h.Mul(validList[index].cartNum, validList[
index].truePrice)) index].truePrice))
} }
} }
that.selectCountPrice = selectCountPrice; that.selectCountPrice = selectCountPrice;
} }
console.log(that.selectCountPrice)
}, },
/** /**
* 购物车手动填写 * 购物车手动填写
@ -690,12 +654,9 @@
isValid : true isValid : true
} }
getCartList(data).then(res => { getCartList(data).then(res => {
//console.log(that.$util.toStringValue(res.data.list))
let valid = res.data.list; let valid = res.data.list;
let loadend = valid.length < that.limit; let loadend = valid.length < that.limit;
let validList = that.$util.SplitArray(valid, that.cartList.valid) let validList = that.$util.SplitArray(valid, that.cartList.valid);
//console.log(that.$util.toStringValue(validList))
let numSub = [{ let numSub = [{
numSub: true numSub: true
}, { }, {
@ -709,8 +670,6 @@
selectValue = []; selectValue = [];
if (validList.length > 0) { if (validList.length > 0) {
for (let index in validList) { 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) { if (validList[index].cartNum == 1) {
validList[index].numSub = true; validList[index].numSub = true;
} else { } 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.loadend = loadend;
that.loadTitle = loadend ? '我也是有底线的' : '加载更多'; that.loadTitle = loadend ? '我也是有底线的' : '加载更多';
that.page = that.page + 1; that.page = that.page + 1;
that.loading = false; that.loading = false;
// that.goodsHidden = cartList.valid.length <= 0 ? false : true; // that.goodsHidden = cartList.valid.length <= 0 ? false : true;
that.selectValue = selectValue; that.selectValue = selectValue;
that.delCheck = selectValue;
let newArr = validList.filter(item => item.attrStatus); let newArr = validList.filter(item => item.attrStatus);
that.isAllSelect = newArr.length == selectValue.length && newArr.length; that.isAllSelect = newArr.length == selectValue.length && newArr.length;
that.switchSelect(); that.switchSelect();
}).catch(function() { }).catch(function(err) {
that.$util.Tips({
title: err
});
that.loading = false; that.loading = false;
that.loadTitle = '加载更多'; that.loadTitle = '加载更多';
}) })
@ -795,59 +755,6 @@
manage: function() { manage: function() {
let that = this; let that = this;
that.footerswitch = !that.footerswitch; 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() { unsetCart: function() {
let that = this, let that = this,

View File

@ -37,12 +37,12 @@
<view @tap="goOrderDetails"> <view @tap="goOrderDetails">
<button formType="submit" class='returnBnt bg-color' hover-class='none'>查看订单</button> <button formType="submit" class='returnBnt bg-color' hover-class='none'>查看订单</button>
</view> </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> <button class='returnBnt bg-color' hover-class='none'>重新购买</button>
</view> </view>
<view @tap="goOrderDetails" v-if="order_pay_info.paid==0 && status==2"> <view @tap="goOrderDetails" v-if="order_pay_info.paid==0 && status==2">
<button class='returnBnt bg-color' hover-class='none'>重新支付</button> <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="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> <button @click="goIndex" class='returnBnt cart-color' formType="submit" hover-class='none' v-else></button>
</view> </view>

View File

@ -16,7 +16,7 @@
{{userInfo.nickname}} {{userInfo.nickname}}
<view class="vip" v-if="userInfo.vip"> <view class="vip" v-if="userInfo.vip">
<image :src="userInfo.vipIcon" alt=""> <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> </view>
<view class="num" v-if="userInfo.phone" @click="goEdit()"> <view class="num" v-if="userInfo.phone" @click="goEdit()">
@ -90,13 +90,6 @@
</navigator> </navigator>
</block> </block>
<!-- #ifdef H5 --> <!-- #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="item" @click="kefuClick">
<view class="left"> <view class="left">
<image src="/static/images/user_menu08.png"></image> <image src="/static/images/user_menu08.png"></image>

View File

@ -67,13 +67,13 @@
<view v-else> <view v-else>
<view class="item acea-row row-between-wrapper"> <view class="item acea-row row-between-wrapper">
<view>联系人</view> <view>联系人</view>
<view class="discount"> <view class="discount textR">
<input type="text" placeholder="请填写您的联系姓名" placeholder-class="placeholder" @blur='realName'></input> <input type="text" placeholder="请填写您的联系姓名" placeholder-class="placeholder" @blur='realName'></input>
</view> </view>
</view> </view>
<view class="item acea-row row-between-wrapper"> <view class="item acea-row row-between-wrapper">
<view>联系电话</view> <view>联系电话</view>
<view class="discount"> <view class="discount textR">
<input type="text" placeholder="请填写您的联系电话" placeholder-class="placeholder" @blur='phone'></input> <input type="text" placeholder="请填写您的联系电话" placeholder-class="placeholder" @blur='phone'></input>
</view> </view>
</view> </view>
@ -650,43 +650,6 @@
title: err 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) { getOrderPay: function(orderNo, message) {
let that = this; let that = this;
@ -783,7 +746,14 @@
}); });
}) })
} }
}) }).cache(res => {
return that.$util.Tips({
title: '取消支付'
}, {
tab: 5,
url: goPages + '&status=0'
});
});
// #endif // #endif
break; break;
case 'yue': case 'yue':
@ -804,7 +774,8 @@
url: goPages + '&status=0' url: goPages + '&status=0'
}); });
setTimeout(() => { setTimeout(() => {
location.href = jsConfig.mwebUrl; location.href = jsConfig.mwebUrl + '&redirect_url=' + window.location.protocol + '//' + window.location.host +
goPages + '&status=1';
}, 100) }, 100)
break; break;
} }
@ -1008,21 +979,25 @@
uni.showLoading({ uni.showLoading({
title: '订单支付中' title: '订单支付中'
}); });
// // #ifdef MP // #ifdef MP
// openPaySubscribe().then(() => { openPaySubscribe().then(() => {
// that.payment(data);
// });
// // #endif
// // #ifndef MP
// that.payment(data);
// // #endif
that.payment(data); that.payment(data);
});
// #endif
// #ifndef MP
that.payment(data);
// #endif
// that.payment(data);
} }
} }
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.textR {
text-align: right;
}
.order-submission .line { .order-submission .line {
width: 100%; width: 100%;
height: 3rpx; height: 3rpx;

View File

@ -95,7 +95,10 @@
multiIndex: [0, 0, 0], multiIndex: [0, 0, 0],
cityId: 0, cityId: 0,
defaultRegion: ['广东省', '广州市', '番禺区'], defaultRegion: ['广东省', '广州市', '番禺区'],
defaultRegionCode: '440113' defaultRegionCode: '440113',
bargain: false, //
combination: false, //
secKill: false //
}; };
}, },
computed: mapGetters(['isLogin']), computed: mapGetters(['isLogin']),
@ -105,6 +108,9 @@
this.pinkId = options.pinkId || 0; this.pinkId = options.pinkId || 0;
this.couponId = options.couponId || 0; this.couponId = options.couponId || 0;
this.id = options.id || 0; this.id = options.id || 0;
this.secKill = options.secKill || false;
this.combination = options.combination || false;
this.bargain = options.bargain || false;
uni.setNavigationBarTitle({ uni.setNavigationBarTitle({
title: options.id ? '修改地址' : '添加地址' title: options.id ? '修改地址' : '添加地址'
}) })
@ -271,7 +277,7 @@
uni.navigateTo({ uni.navigateTo({
url: '/pages/users/order_confirm/index?cartId=' + cartId + '&addressId=' + (that.id ? that.id : url: '/pages/users/order_confirm/index?cartId=' + cartId + '&addressId=' + (that.id ? that.id :
res.data res.data
.id) + '&pinkId=' + pinkId + '&couponId=' + couponId .id) + '&pinkId=' + pinkId + '&couponId=' + couponId + '&secKill=' + that.secKill + '&combination=' + that.combination + '&bargain=' + that.bargain
}); });
} else { } else {
uni.navigateBack({ uni.navigateBack({
@ -346,7 +352,7 @@
uni.navigateTo({ uni.navigateTo({
url: '/pages/users/order_confirm/index?cartId=' + cartId + '&addressId=' + (that.id ? that.id : url: '/pages/users/order_confirm/index?cartId=' + cartId + '&addressId=' + (that.id ? that.id :
res.data res.data
.id) + '&pinkId=' + pinkId + '&couponId=' + couponId .id) + '&pinkId=' + pinkId + '&couponId=' + couponId + '&secKill=' + that.secKill + '&combination=' + that.combination + '&bargain=' + that.bargain
}); });
} else { } else {
uni.navigateTo({ uni.navigateTo({
@ -427,7 +433,7 @@
that.pinkId = ''; that.pinkId = '';
that.couponId = ''; that.couponId = '';
uni.navigateTo({ 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 { } else {
// #ifdef H5 // #ifdef H5

View File

@ -306,7 +306,7 @@
this.couponId = ''; this.couponId = '';
uni.navigateTo({ uni.navigateTo({
url: '/pages/users/user_address/index?id=' + id + '&cartId=' + cartId + '&pinkId=' + pinkId + '&couponId=' + 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.pinkId = '';
this.couponId = ''; this.couponId = '';
uni.navigateTo({ 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) { goOrder: function(id) {

View File

@ -2,9 +2,9 @@
<view> <view>
<view class='bill-details'> <view class='bill-details'>
<view class='nav acea-row'> <view class='nav acea-row'>
<view class='item' :class='type==0 ? "on":""' @click='changeType(0)'>全部</view> <view class='item' :class='type==="all" ? "on":""' @click='changeType("all")'>全部</view>
<view class='item' :class='type==1 ? "on":""' @click='changeType(1)'>支出</view> <view class='item' :class='type==="expenditure" ? "on":""' @click='changeType("expenditure")'>支出</view>
<view class='item' :class='type==2 ? "on":""' @click='changeType(2)'>收入</view> <view class='item' :class='type==="income" ? "on":""' @click='changeType("income")'>收入</view>
</view> </view>
<view class='sign-record'> <view class='sign-record'>
<view class='list' v-for="(item,index) in userBillList" :key="index"> <view class='list' v-for="(item,index) in userBillList" :key="index">
@ -39,7 +39,7 @@
<script> <script>
import { import {
getCommissionInfo getBillList
} from '@/api/user.js'; } from '@/api/user.js';
import { import {
toLogin toLogin
@ -67,7 +67,7 @@
loadend: false, loadend: false,
page: 1, page: 1,
limit: 10, limit: 10,
type: 0, type: 'all',
userBillList: [], userBillList: [],
isAuto: false, // isAuto: false, //
isShowAuth: false // isShowAuth: false //
@ -91,7 +91,7 @@
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad: function(options) { onLoad: function(options) {
this.type = options.type || 0; this.type = options.type;
}, },
/** /**
* 页面上拉触底事件的处理函数 * 页面上拉触底事件的处理函数
@ -121,9 +121,10 @@
that.loadTitle = ""; that.loadTitle = "";
let data = { let data = {
page: that.page, 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:[], let list = res.data.list?res.data.list:[],
loadend = list.length < that.limit; loadend = list.length < that.limit;
that.userBillList = that.$util.SplitArray(list, that.userBillList); that.userBillList = that.$util.SplitArray(list, that.userBillList);

View File

@ -104,7 +104,7 @@
let ids = []; let ids = [];
ids.push(id); ids.push(id);
// //
setCouponReceive(ids).then(function (res) { setCouponReceive(id).then(function (res) {
list[index].isUse = true; list[index].isUse = true;
that.$set(that,'couponsList',list); that.$set(that,'couponsList',list);
that.$util.Tips({ title: '领取成功' }); that.$util.Tips({ title: '领取成功' });

View File

@ -37,19 +37,19 @@
</view> </view>
</view> </view>
<view class='nav acea-row row-middle'> <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'> <view class='pictrue'>
<image src='../../../static/images/record1.png'></image> <image src='../../../static/images/record1.png'></image>
</view> </view>
<view>账单记录</view> <view>账单记录</view>
</navigator> </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'> <view class='pictrue'>
<image src='../../../static/images/record2.png'></image> <image src='../../../static/images/record2.png'></image>
</view> </view>
<view>消费记录</view> <view>消费记录</view>
</navigator> </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'> <view class='pictrue'>
<image src='../../../static/images/record3.png'></image> <image src='../../../static/images/record3.png'></image>
</view> </view>

View File

@ -62,6 +62,7 @@
extractBank, extractBank,
transferIn transferIn
} from '@/api/user.js'; } from '@/api/user.js';
import { wechatQueryPayResult } from '@/api/order.js';
import { import {
toLogin toLogin
} from '@/libs/login.js'; } from '@/libs/login.js';
@ -251,12 +252,11 @@
rechar_id: this.rechar_id rechar_id: this.rechar_id
}).then(res => { }).then(res => {
uni.hideLoading(); uni.hideLoading();
let jsConfig = res.data.data; let jsConfig = res.data.data.jsConfig;
let packages = 'prepay_id=' + jsConfig.prepayId;
uni.requestPayment({ uni.requestPayment({
timeStamp: jsConfig.timeStamp.toString(), timeStamp: jsConfig.timeStamp,
nonceStr: jsConfig.nonceStr, nonceStr: jsConfig.nonceStr,
package: packages, package: jsConfig.packages,
signType: jsConfig.signType, signType: jsConfig.signType,
paySign: jsConfig.paySign, paySign: jsConfig.paySign,
success: function(res) { success: function(res) {
@ -294,31 +294,37 @@
rechar_id: that.rechar_id, rechar_id: that.rechar_id,
payType: 0 payType: 0
}).then(res => { }).then(res => {
let jsConfig = res.data; let jsConfig = res.data.jsConfig;
let packages = 'prepay_id=' + jsConfig.prepayId; let orderNo = res.data.orderNo;
let data = { let data = {
timestamp:jsConfig.timeStamp, timestamp:jsConfig.timeStamp,
nonceStr:jsConfig.nonceStr, nonceStr:jsConfig.nonceStr,
package:packages, package:jsConfig.packages,
signType:jsConfig.signType, signType:jsConfig.signType,
paySign:jsConfig.paySign, paySign:jsConfig.paySign
h5PayUrl:jsConfig.h5PayUrl
}; };
if (that.from == "weixinh5") { if (that.from == "weixinh5") {
let domain = encodeURIComponent(location.href.split('/pages')[0]); 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); location.replace(urls);
return that.$util.Tips({ return that.$util.Tips({
title: '支付成功',
icon: 'success'
}, {
tab: 5, tab: 5,
url: '/pages/users/user_money/index' url: '/pages/users/user_money/index'
}); });
// return that.$util.Tips({
// title: '',
// icon: 'success'
// }, {
// tab: 5,
// url: '/pages/users/user_money/index'
// });
} else { } else {
that.$wechat.pay(data) that.$wechat.pay(data)
.finally(() => { .finally(() => {
that.$set(that, 'userinfo.nowMoney', that.$util.$h.Add(value, that.userinfo.nowMoney)); that.$set(that, 'userinfo.nowMoney', that.$util.$h.Add(value, that.userinfo.nowMoney));
wechatQueryPayResult({
orderNo: orderNo
}).then(res => {
return that.$util.Tips({ return that.$util.Tips({
title: '支付成功', title: '支付成功',
icon: 'success' icon: 'success'
@ -326,6 +332,11 @@
tab: 5, tab: 5,
url: '/pages/users/user_money/index' url: '/pages/users/user_money/index'
}); });
}).cache(err => {
return that.$util.Tips({
title: err
});
})
}) })
.catch(function(err) { .catch(function(err) {
return that.$util.Tips({ return that.$util.Tips({

View File

@ -5,7 +5,7 @@
<view class="phone">当前手机号{{phone}}</view> <view class="phone">当前手机号{{phone}}</view>
<view class="list"> <view class="list">
<view class="item"> <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>
<view class="item"> <view class="item">
<input type='password' placeholder='确认新密码' placeholder-class='placeholder' name="qr_password" :value="qr_password"></input> <input type='password' placeholder='确认新密码' placeholder-class='placeholder' name="qr_password" :value="qr_password"></input>
@ -132,6 +132,9 @@
if (!password) return that.$util.Tips({ if (!password) return that.$util.Tips({
title: '请输入新密码' 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({ if (qr_password != password) return that.$util.Tips({
title: '两次输入的密码不一致!' title: '两次输入的密码不一致!'
}); });

View File

@ -34,7 +34,6 @@
// #ifdef H5 // #ifdef H5
import uQRCode from '@/js_sdk/Sansnn-uQRCode/uqrcode.js' import uQRCode from '@/js_sdk/Sansnn-uQRCode/uqrcode.js'
// #endif // #endif
import { base64src } from '@/utils/base64src.js'
import { import {
getUserInfo, getUserInfo,
spreadBanner spreadBanner
@ -46,6 +45,7 @@
mapGetters mapGetters
} from "vuex"; } from "vuex";
// #ifdef MP // #ifdef MP
import { base64src } from '@/utils/base64src.js'
import authorize from '@/components/Authorize'; import authorize from '@/components/Authorize';
import { import {
getQrcode getQrcode

View File

@ -45,10 +45,10 @@
<view class='itemn acea-row row-between-wrapper'> <view class='itemn acea-row row-between-wrapper'>
<view> <view>
<view class='name line1'>{{child.title}}</view> <view class='name line1'>{{child.title}}</view>
<view>{{child.add_time}}</view> <view>{{child.price}}</view>
</view> </view>
<view class='num font-color' v-if="child.pm == 1">+{{child.number}}</view> <view class='num font-color' v-if="child.type == 1">+{{child.price}}</view>
<view class='num' v-else>-{{child.number}}</view> <view class='num' v-else>-{{child.price}}</view>
</view> </view>
</block> </block>
</view> </view>
@ -181,14 +181,12 @@
page: that.page, page: that.page,
limit: that.limit limit: that.limit
}).then(res => { }).then(res => {
console.log(res)
let len = res.data.list.length; let len = res.data.list.length;
let recordListData = res.data.list; let recordListData = res.data.list;
recordListNew = recordList.concat(recordListData); recordListNew = recordList.concat(recordListData);
that.status = that.limit > len; that.status = that.limit > len;
that.page = that.page + 1; that.page = that.page + 1;
that.$set(that, 'recordList', recordListNew); that.$set(that, 'recordList', recordListNew);
console.log(that.recordList)
}); });
}, },
getCount: function() { getCount: function() {
@ -213,7 +211,7 @@
getCommissionInfo({ getCommissionInfo({
page: page, page: page,
limit: limit limit: limit
}, recordType).then(res => { }).then(res => {
if(res.data.list){ if(res.data.list){
let len = res.data.list.length; let len = res.data.list.length;
let recordListData = res.data.list; let recordListData = res.data.list;

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

View File

@ -1,7 +1,7 @@
// import { // import {
// SUBSCRIBE_MESSAGE // SUBSCRIBE_MESSAGE
// } from '../config/cache.js'; // } from '../config/cache.js';
const arrTemp = ["paySubscribe","orderSubscribe","extrctSubscribe", "orderRefundSubscribe", "rechargeSubscribe", 'pinkSubscribe', 'bargainSubscribe']; const arrTemp = ["beforePay","afterPay","refundApply", "beforeRecharge", "createBargain","pink"];
// export function auth() { // export function auth() {
// let tmplIds = {}; // let tmplIds = {};
@ -16,6 +16,7 @@ const arrTemp = ["paySubscribe","orderSubscribe","extrctSubscribe", "orderRefund
*/ */
export function openPaySubscribe() { export function openPaySubscribe() {
let tmplIds = uni.getStorageSync('tempID' + arrTemp[0]); let tmplIds = uni.getStorageSync('tempID' + arrTemp[0]);
console.log(tmplIds)
return subscribe(tmplIds); return subscribe(tmplIds);
} }
@ -32,16 +33,16 @@ export function openOrderSubscribe() {
* 提现消息订阅 * 提现消息订阅
* 成功 失败 消息 * 成功 失败 消息
*/ */
export function openExtrctSubscribe() { // export function openExtrctSubscribe() {
let tmplIds = uni.getStorageSync('tempID' + arrTemp[2]); // let tmplIds = uni.getStorageSync('tempID' + arrTemp[2]);
return subscribe(tmplIds); // return subscribe(tmplIds);
} // }
/** /**
* 订单退款 * 订单退款
*/ */
export function openOrderRefundSubscribe() { export function openOrderRefundSubscribe() {
let tmplIds = uni.getStorageSync('tempID' + arrTemp[3]); let tmplIds = uni.getStorageSync('tempID' + arrTemp[2]);
return subscribe(tmplIds); return subscribe(tmplIds);
} }
@ -49,6 +50,14 @@ export function openOrderRefundSubscribe() {
* 充值成功 * 充值成功
*/ */
export function openRechargeSubscribe() { export function openRechargeSubscribe() {
let tmplIds = uni.getStorageSync('tempID' + arrTemp[3]);
return subscribe(tmplIds);
}
/**
* 砍价成功
*/
export function openBargainSubscribe() {
let tmplIds = uni.getStorageSync('tempID' + arrTemp[4]); let tmplIds = uni.getStorageSync('tempID' + arrTemp[4]);
return subscribe(tmplIds); return subscribe(tmplIds);
} }
@ -60,22 +69,6 @@ export function openRechargeSubscribe() {
export function openPinkSubscribe() { export function openPinkSubscribe() {
let tmplIds = uni.getStorageSync('tempID' + arrTemp[5]); let tmplIds = uni.getStorageSync('tempID' + arrTemp[5]);
return subscribe(tmplIds); 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
// ]);
} }
// /** // /**
// * 提现 // * 提现

View File

@ -1,4 +1,4 @@
const fsm = uni.getFileSystemManager ? uni.getFileSystemManager() : null; const fsm = wx.getFileSystemManager ? wx.getFileSystemManager() : null;
const FILE_BASE_NAME = 'tmp_base64src'; //自定义文件名 const FILE_BASE_NAME = 'tmp_base64src'; //自定义文件名
export function base64src(base64data, cb) { export function base64src(base64data, cb) {