全新UI视觉体验,移动端API优化降低重复调用,提高并发6倍,修复N多Bug

pull/1/MERGE
stivepeim 2021-06-11 17:41:16 +08:00
parent 39c4716fc1
commit c42aab28a1
242 changed files with 14141 additions and 11619 deletions

174
App.vue
View File

@ -1,13 +1,16 @@
<!-- <template>
<view>
<iframe ref="geoPage" width="0" height="0" frameborder="0" style="display:none;"
scrolling="no" src="https://java.crmeb.net">
</iframe>
</view>
</template> -->
<script>
import { checkLogin } from "./libs/login";
import { HTTP_REQUEST_URL } from './config/app';
import {
checkLogin
} from "./libs/login";
import {
HTTP_REQUEST_URL
} from './config/app';
import Auth from './libs/wechat.js';
import Routine from './libs/routine.js';
import Apps from './libs/apps.js';
import {
mapActions
} from 'vuex'
export default {
globalData: {
@ -15,33 +18,57 @@
code: 0,
isLogin: false,
userInfo: {},
MyMenus:[]
MyMenus: [],
windowHeight: 0,
id: 0
},
onLaunch: function(option) {
let that = this;
// #ifdef H5
uni.getSystemInfo({
success: function(res) {
// title
// 44px
let height = res.windowHeight - res.statusBarHeight - 44
// #ifdef H5
that.globalData.windowHeight = res.windowHeight + 'px'
// #endif
}
});
// #endif
// #ifdef MP
if (HTTP_REQUEST_URL == '') {
console.error("请配置根目录下的config.js文件中的 'HTTP_REQUEST_URL'\n\n请修改开发者工具中【详情】->【AppID】改为自己的Appid\n\n请前往后台【小程序】->【小程序配置】填写自己的 appId and AppSecret");
console.error(
"请配置根目录下的config.js文件中的 'HTTP_REQUEST_URL'\n\n请修改开发者工具中【详情】->【AppID】改为自己的Appid\n\n请前往后台【小程序】->【小程序配置】填写自己的 appId and AppSecret"
);
return false;
}
if (option.query.hasOwnProperty('scene')) {
switch(option.scene){
//
case 1047:
let val = that.$util.getUrlParams(decodeURIComponent(option.query.scene));
that.globalData.code = val.pid;
break;
//
case 1048:
that.globalData.code = option.query.scene;
break;
//
case 1049:
that.globalData.code = option.query.scene;
break;
//
case 1001:
that.globalData.spid = option.query.scene;
case 1047: //
case 1048: //
case 1049: //
case 1001: //
let value = this.$util.getUrlParams(decodeURIComponent(option.query.scene));
let values = value.split(',');
if(values.length === 2){
let v1 = values[0].split(":");
if (v1[0] === 'pid') {
that.globalData.spid = v1[1];
} else{
that.globalData.id = v1[1];
}
let v2 = values[1].split(":");
if (v2[0] === 'pid') {
that.globalData.spid = v2[1];
}else{
that.globalData.id = v2[1];
}
}else{
that.globalData.spid = values[0].split(":")[1];
}
break;
}
}
@ -52,8 +79,86 @@
that.globalData.navHeight = res.statusBarHeight * (750 / res.windowWidth) + 91;
}
});
// #ifdef MP
let menuButtonInfo = uni.getMenuButtonBoundingClientRect();
that.globalData.navH = menuButtonInfo.top * 2 + menuButtonInfo.height / 2;
// #endif
// #ifdef H5
let snsapiBase = 'snsapi_base';
let urlData = location.pathname + location.search;
if (!that.$store.getters.isLogin && Auth.isWeixin()) {
const {
code,
state,
scope
} = option.query;
if (code && code != uni.getStorageSync('snsapiCode') && location.pathname.indexOf(
'/pages/users/wechat_login/index') === -1) {
// code
uni.setStorageSync('snsapiCode', code);
let spread = that.globalData.spid ? that.globalData.spid : 0;
Auth.auth(code, that.$Cache.get('spread'))
.then(res => {
uni.setStorageSync('snRouter', decodeURIComponent(decodeURIComponent(option.query
.back_url)));
if (res.type === 'register') {
this.$Cache.set('snsapiKey', res.key);
}
if (res.type === 'login') {
this.$store.commit('LOGIN', {
token: res.token
});
this.$store.commit("SETUID", res.uid);
location.replace(decodeURIComponent(decodeURIComponent(option.query.back_url)));
}
})
.catch(error => {
// this.$util.Tips({
// title: error
// });
if (!this.$Cache.has('snsapiKey')) {
if (location.pathname.indexOf('/pages/users/wechat_login/index') === -1) {
Auth.oAuth(snsapiBase, option.query.back_url);
}
}
});
} else {
if (!this.$Cache.has('snsapiKey')) {
if (location.pathname.indexOf('/pages/users/wechat_login/index') === -1) {
Auth.oAuth(snsapiBase, urlData);
}
}
}
} else {
if (option.query.back_url) {
location.replace(uni.getStorageSync('snRouter'));
}
}
// #endif
// #ifdef MP
//
if (!this.$store.getters.isLogin) {
let spread = that.globalData.spid ? that.globalData.spid : 0;
Routine.getCode()
.then(code => {
Routine.authUserInfo(code, {
'spread_spid': spread
}).then(res => {
// that.$store.commit('AuthorizeType', res.data.type);
})
})
.catch(res => {
uni.hideLoading();
});
}
// #endif
},
mounted() {
async mounted() {
if(this.$store.getters.isLogin && !this.$Cache.get('USER_INFO'))await this.$store.dispatch('USERINFO');
},
methods: {
},
onShow: function() {
// #ifdef H5
@ -84,29 +189,36 @@
/* 条件编译仅在H5平台生效 */
// #ifdef H5
body::-webkit-scrollbar,html::-webkit-scrollbar {
body::-webkit-scrollbar,
html::-webkit-scrollbar {
display: none;
}
// #endif
view {
box-sizing: border-box;
}
.bg-color-red {
background-color: #e93323!important;
background-color: #E93323 !important;
}
.syspadding {
padding-top: var(--status-bar-height);
}
.flex {
display: flex;
}
.uni-scroll-view::-webkit-scrollbar {
/* 隐藏滚动条,但依旧具备可以滚动的功能 */
display: none
}
::-webkit-scrollbar {
width: 0;
height: 0;
color: transparent;
}
</style><!-- -->
</style>

View File

@ -55,7 +55,7 @@ export function getBargainList(data) {
* @param object data
*/
export function getBargainUserList(data){
return request.get('bargain/user/list',data);
return request.get('bargain/record',data);
}
@ -76,12 +76,13 @@ export function getBargainDetail(id) {
}
/**
* 砍价 开启砍价用户信息
* 用户砍价信息,注意自己的活动和别人的活动的区别
*/
export function postBargainStartUser(data) {
return request.get("bargain/start/user", data);
export function getBargainUser(data) {
return request.get("bargain/user", data);
}
/**
* 砍价开启
*/
@ -110,20 +111,6 @@ export function postBargainHelpList(params,data) {
return request.get("bargain/help/list?limit="+params.limit+"&page="+params.page, data,{});
}
/**
* 砍价 砍价帮总人数剩余金额进度条已经砍掉的价格
*/
export function postBargainHelpCount(data) {
return request.get("bargain/help/count", data,1);
}
/**
* 砍价 观看/分享/参与次数
*/
export function postBargainShare(bargainId) {
return request.get("bargain/share/" + bargainId);
}
/**
* 秒杀产品时间区间
*
@ -193,5 +180,41 @@ export function scombinationCode(id) {
* @param int id
*/
export function getSeckillHeaderApi(){
return request.get('seckill/header',{},{noAuth:true});
}
/**
* 首页秒杀产品列表
*/
export function getSeckillIndexApi(){
return request.get('seckill/index',{},{noAuth:true});
}
/**
* 首页拼团产品列表
*/
export function getCombinationIndexApi(){
return request.get('combination/index',{},{noAuth:true});
}
/**
* 首页砍价产品列表
*/
export function getBargainIndexApi(){
return request.get('bargain/index',{},{noAuth:true});
}
/**
* 首页砍价产品列表
*/
export function bargainHeaderApi(){
return request.get('bargain/header');
}
/**
* 拼图列表头部
*/
export function combinationHeaderApi(){
return request.get('combination/header');
}

View File

@ -120,9 +120,6 @@ export function verifyCode(){
export function registerVerify(phone){
return request.post('sendCode', { phone: phone },{noAuth:true},1)
}
// export function registerVerify(phone, reset, key, code){
// return request.post('register/verify', { phone: phone, type: reset === undefined ? 'reset' : reset, key: key, code: code },{noAuth:true})
// }
/**
* 手机号注册

View File

@ -4,10 +4,8 @@ import request from "@/utils/request.js";
* 获取购物车列表
* @param numType boolean true 购物车数量,false=购物车产品数量
*/
export function getCartCounts(numType) {
return request.get("cart/count", {
numType: numType === undefined ? true : numType
});
export function getCartCounts(numType,type) {
return request.get("cart/count?numType=" + numType + "&type=" + type);
}
/**
* 获取购物车列表
@ -184,8 +182,8 @@ export function orderConfirm(cartId, isNew, addAgain,secKill,combination,bargain
* @param string price
*
*/
export function getCouponsOrderPrice(data) {
return request.get('coupons/order', data)
export function getCouponsOrderPrice(preOrderNo) {
return request.get(`coupons/order/${preOrderNo}`)
}
/**
@ -194,8 +192,8 @@ export function getCouponsOrderPrice(data) {
* @param object data
*
*/
export function orderCreate(key, data) {
return request.post('order/create/' + key, data);
export function orderCreate(data) {
return request.post('order/create', data);
}
/**
@ -204,8 +202,8 @@ export function orderCreate(key, data) {
* @param data
* @returns {*}
*/
export function postOrderComputed(key, data) {
return request.post("order/computed/" + key, data);
export function postOrderComputed(data) {
return request.post("order/computed/price", data);
}
/**
@ -229,5 +227,29 @@ export function wechatOrderPay(data) {
* @param object data
*/
export function wechatQueryPayResult(data) {
return request.get('pay/queryPayResult', data);
return request.get('pay/queryPayResult?orderNo=' + data);
}
/**
* 申请退款商品详情
* @param object data
*/
export function applyRefund(orderId) {
return request.get(`order/apply/refund/${orderId}`);
}
/**
* 预下单
* @param object data
*/
export function preOrderApi(data) {
return request.post(`order/pre/order`, data);
}
/**
* 加载预下单
* @param object preOrderNo
*/
export function loadPreOrderApi(preOrderNo) {
return request.get(`order/load/pre/${preOrderNo}`);
}

View File

@ -12,22 +12,15 @@ export function getWechatConfig() {
return request.get("wechat/config",{ url: encodeURIComponent(wechat.signLink()) },{ noAuth: true });
}
// export function getWechatConfig() {
// return request.get(
// "wechat/config",
// { url: encodeURIComponent(location.href.split('#')[0]) },
// { noAuth: true }
// );
// }
/**
* 获取微信sdk配置
* @returns {*}
*/
export function wechatAuth(code, spread, login_type) {
export function wechatAuth(code, spread) {
var reg=/^[0-9]+.?[0-9]*$/; //判断字符串是否为数字 ,判断正整数用/^[1-9]+[0-9]*]*$/
spread = reg.test(spread) ? spread : 0;
return request.get(
"wechat/authorize/login",
{ code, spread_spid:spread, login_type },
"wechat/authorize/login?code=" + code + "&spread_spid=" + spread, {},
{ noAuth: true }
);
}
@ -98,14 +91,26 @@ export function getUserPhone(data){
}
/**
* 静默授权
* APP微信登录
* @param {Object} data
*/
export function silenceAuth(data) {
//#ifdef MP
return request.get("wechat/authorize/program/login", data, { noAuth : true });
//#endif
//#ifdef H5
return request.get("wechat/authorize/login", data, { noAuth : true });
//#endif
export function appAuth(data) {
return request.post("wechat/authorize/app/login", data, { noAuth : true });
}
/**
* 苹果登录
* @param {Object} data
*/
export function appleLogin(data) {
return request.post("ios/login", data, { noAuth : true });
}
/**
* 苹果绑定手机号
* @param {Object} data
*/
export function iosBinding(data) {
return request.post("ios/binding/phone", data, { noAuth : true });
}

View File

@ -5,8 +5,8 @@ import request from "@/utils/request.js";
* @param int id
*
*/
export function getProductDetail(id) {
return request.get('product/detail/' + id, {}, {
export function getProductDetail(id, type) {
return request.get('product/detail/' + id + '?type=' + type, {}, {
noAuth: true
});
}
@ -41,15 +41,20 @@ export function collectAdd(id, category) {
}
/**
* 删除收藏产品
* 取消收藏产品
* @param int id
* @param string category product=普通产品,product_seckill=秒杀产品
*/
export function collectDel(id, category) {
return request.post('collect/del', {
id: id,
'category': category === undefined ? 'product' : category
});
export function collectDel(proId) {
return request.post(`collect/cancel/${proId}`);
}
/**
* 删除收藏产品
* @param string id
*/
export function collectDelete(ids) {
return request.post(`collect/delete`,ids);
}
/**
@ -111,7 +116,7 @@ export function collectAll(id, category) {
*
*/
export function getGroomList(type, data) {
return request.get('groom/list/' + type, data, {
return request.get('index/product/' + type, data, {
noAuth: true
});
}
@ -163,3 +168,24 @@ export function getSearchKeyword() {
export function storeListApi(data) {
return request.post("store/list", data, {}, 1);
}
/**
* 优品推荐
* @param object data
*/
export function getProductGood() {
return request.get('product/good');
}
/**
* 详情页产品评论
* @param int id
* @param object data
*
*/
export function getReplyProduct(id) {
return request.get('reply/product/' + id, {
noAuth: true
})
}

View File

@ -46,9 +46,6 @@ export function getCodeApi() {
export function registerVerify(phone){
return request.post('sendCode', { phone: phone },{noAuth:true},1)
}
// export function registerVerify(data) {
// return request.post("register/verify", data, { noAuth : true });
// }
/**
* h5用户手机号注册
@ -176,7 +173,7 @@ export function spreadCount(type){
}
/*
* 推广数据
* 推广数据 当前佣金 提现总金额
* */
export function getSpreadInfo() {
return request.get("commission");
@ -316,6 +313,13 @@ export function rechargeWechat(data) {
return request.post("recharge/wechat", data);
}
/*
* app微信充值
* */
export function appWechat(data) {
return request.post("recharge/wechat/app", data);
}
/*
* 余额充值
* */
@ -414,5 +418,23 @@ export function getBillList(data)
return request.get("recharge/bill/record",data);
}
/*
* 积分中心详情
* */
export function postIntegralUser() {
return request.get("integral/user");
}
/*
* 立即提现 冻结期冻结佣金可提现佣金最低可提现金额
* */
export function extractUser() {
return request.get("extract/user");
}
/*
* 推广人统计页 推广人数一级+二级一级人数二级人数
* */
export function spreadPeoCount() {
return request.get("spread/people/count");
}

View File

@ -10,8 +10,7 @@
<button class='item grant' @click="setUserInfo"></button>
<!-- #endif -->
<!-- #ifdef MP -->
<!-- <button class='item grant' type="primary" open-type="getUserInfo" lang="zh_CN" @getuserinfo="setUserInfo"></button> -->
<button hover-class="none" @tap="getUserProfile" class='item grant'>微信登录</button>
<button class='item grant' type="primary" open-type="getUserInfo" lang="zh_CN" @getuserinfo="setUserInfo"></button>
<!-- #endif -->
</view>
</view>
@ -59,52 +58,6 @@
this.setAuthStatus();
},
methods:{
getUserProfile() {
let self = this;
uni.showLoading({
title: '正在登录中'
});
Routine.getUserProfile()
.then(res => {
Routine.getCode()
.then(code => {
self.getWxUser(code, res);
})
.catch(res => {
uni.hideLoading();
});
})
.catch(res => {
uni.hideLoading();
});
},
getWxUser(code, res) {
let self = this
let userInfo = res.userInfo;
userInfo.code = code;
userInfo.spread_spid = app.globalData.spid; //广ID
userInfo.spread_code = app.globalData.code; //广ID
userInfo.avatar = userInfo.userInfo.avatarUrl;
userInfo.city = userInfo.userInfo.city;
userInfo.country = userInfo.userInfo.country;
userInfo.nickName = userInfo.userInfo.nickName;
userInfo.province = userInfo.userInfo.province;
userInfo.sex = userInfo.userInfo.gender;
userInfo.type = 'routine'
Routine.authUserInfo(code,userInfo).then(res=>{
uni.hideLoading();
this.$emit('authColse',false);
this.$emit('onLoadFun',this.userInfo);
}).catch(res=>{
uni.hideLoading();
uni.showToast({
title:res.message,
icon:'none',
duration:2000
});
});
},
setAuthStatus(){
Routine.authorize().then(res=>{
if(res.islogin === false)
@ -118,7 +71,6 @@
},
getUserInfo(code){
Routine.getUserInfo().then(res=>{
console.log('res',res);
let userInfo = res.userInfo
userInfo.code = code;
userInfo.spread_spid = app.globalData.spid;//广ID
@ -187,7 +139,7 @@
.Popup .bottom .item{width:50%;height:80rpx;background-color:#eeeeee;text-align:center;line-height:80rpx;font-size:24rpx;color:#666;margin-top:54rpx;}
.Popup .bottom .item.on{width: 100%}
.flex{display:flex;}
.Popup .bottom .item.grant{font-size:28rpx;color:#fff;font-weight:bold;background-color:#e93323;border-radius:0;padding:0;}
.Popup .bottom .item.grant{font-size:28rpx;color:#fff;font-weight:bold;background-color:$theme-color;border-radius:0;padding:0;}
.mask{position:fixed;top:0;right:0;left:0;bottom:0;background-color:rgba(0,0,0,0.65);z-index:310;}
</style>

View File

@ -45,21 +45,26 @@
isLog: {
type: Boolean,
default: false,
},
}
},
data() {
return {
active: 0,
//
addressList: [],
is_loading: true
is_loading: true,
addressList: []
};
},
methods: {
tapAddress: function(e, addressid) {
this.active = e;
this.$emit('OnChangeAddress', addressid);
let a = {};
for (let i = 0, leng = this.addressList.length; i < leng; i++) {
if (this.addressList[i].id == addressid) {
a = this.addressList[i];
}
}
this.$emit('OnChangeAddress', a);
},
close: function() {
this.$emit('changeClose');
@ -79,14 +84,18 @@
limit: 5
}).then(res => {
let addressList = res.data.list;
that.$set(that, 'addressList', addressList);
that.is_loading = false;
let defaultAddress = {};
//
if(!that.address.addressId) return;
for (let i = 0, leng = addressList.length; i < leng; i++) {
if (addressList[i].id == that.address.addressId) {
that.active = i;
defaultAddress = this.addressList[i];
}
}
that.$set(that, 'addressList', addressList);
that.is_loading = false;
this.$emit('OnDefaultAddress', defaultAddress);
})
}
}

View File

@ -1,14 +1,14 @@
<template>
<view class="time" :style="justifyLeft">
<text class="red" v-if="tipText">{{ tipText }}</text>
<text class="styleAll" v-if="isDay === true">{{ day }}</text>
<text class="timeTxt red" v-if="dayText">{{ dayText }}</text>
<text class="styleAll" :class='isCol?"timeCol":""'>{{ hour }}</text>
<text class="timeTxt red" v-if="hourText">{{ hourText }}</text>
<text class="styleAll" :class='isCol?"timeCol":""'>{{ minute }}</text>
<text class="timeTxt red" v-if="minuteText">{{ minuteText }}</text>
<text class="styleAll" :class='isCol?"timeCol":""'>{{ second }}</text>
<text class="timeTxt red" v-if="secondText">{{ secondText }}</text>
<text class="" v-if="tipText">{{ tipText }}</text>
<text class="styleAll p6" v-if="isDay === true" :style="{background:bgColor.bgColor,color:bgColor.Color}">{{ day }}{{bgColor.isDay?'':''}}</text>
<text class="timeTxt" v-if="dayText" :style="{width:bgColor.timeTxtwidth,color:bgColor.bgColor}">{{ dayText }}</text>
<text class="styleAll" :class='isCol?"timeCol":""' :style="{background:bgColor.bgColor,color:bgColor.Color,width:bgColor.width}">{{ hour }}</text>
<text class="timeTxt" v-if="hourText" :class='isCol?"whit":""' :style="{width:bgColor.timeTxtwidth,color:bgColor.bgColor}">{{ hourText }}</text>
<text class="styleAll" :class='isCol?"timeCol":""' :style="{background:bgColor.bgColor,color:bgColor.Color,width:bgColor.width}">{{ minute }}</text>
<text class="timeTxt" v-if="minuteText" :class='isCol?"whit":""' :style="{width:bgColor.timeTxtwidth,color:bgColor.bgColor}">{{ minuteText }}</text>
<text class="styleAll" :class='isCol?"timeCol":""' :style="{background:bgColor.bgColor,color:bgColor.Color,width:bgColor.width}">{{ second }}</text>
<text class="timeTxt" v-if="secondText">{{ secondText }}</text>
</view>
</template>
@ -52,6 +52,10 @@
isCol: {
type: Boolean,
default: false
},
bgColor: {
type: Object,
default: null
}
},
data: function() {
@ -112,7 +116,29 @@
};
</script>
<style>
<style scoped>
.p6{
padding: 0 8rpx;
}
.styleAll{
/* color: #fff; */
font-size: 24rpx;
height: 36rpx;
line-height: 36rpx;
border-radius: 6rpx;
text-align: center;
/* padding: 0 6rpx; */
}
.timeTxt{
text-align: center;
/* width: 16rpx; */
height: 36rpx;
line-height: 36rpx;
display: inline-block;
}
.whit{
color: #fff !important;
}
.time {
display: flex;
justify-content: center;
@ -124,13 +150,13 @@
}
.timeCol {
width: 40rpx;
/* width: 40rpx;
height: 40rpx;
line-height: 40rpx;
text-align:center;
border-radius: 6px;
background: #fff;
font-size: 24rpx;
font-size: 24rpx; */
color: #E93323;
}
</style>

View File

@ -1,9 +1,18 @@
<template>
<view>
<view class='coupon-list-window' :class='coupon.coupon==true?"on":""'>
<view class='title'>优惠券<text class='iconfont icon-guanbi' @click='close'></text></view>
<view class='coupon-list' v-if="coupon.list.length">
<view class='item acea-row row-center-wrapper' v-for="(item,index) in coupon.list" @click="getCouponUser(index,item.id)" :key='index'>
<view v-if="!orderShow" class="nav acea-row row-around">
<view :class="['acea-row', 'row-middle', type === 1 ? 'on' : '']" @click="setType(1)"></view>
<view :class="['acea-row', 'row-middle', type === 2 ? 'on' : '']" @click="setType(2)"></view>
<view :class="['acea-row', 'row-middle', type === 3 ? 'on' : '']" @click="setType(3)"></view>
</view>
<!-- <view class="occupy" v-if="!orderShow"></view> -->
<!-- <view class='title'>优惠券<text class='iconfont icon-guanbi' @click='close'></text></view> -->
<view class='coupon-list' :style="{'margin-top':!orderShow?'0':'50rpx'}">
<block v-if="coupon.list.length">
<!-- <view class='item acea-row row-center-wrapper' v-for="(item,index) in coupon.list" :key='index'> -->
<view class='item acea-row row-center-wrapper' v-for="(item,index) in coupon.list"
@click="getCouponUser(index,item.id)" :key='index'>
<view class='money acea-row row-column row-center-wrapper' :class='item.isUse?"moneyGray":""'>
<view><text class='num'>{{item.money?Number(item.money):''}}</text></view>
<view class="pic-num">{{item.minPrice}}元可用</view>
@ -11,28 +20,37 @@
<view class='text'>
<view class='condition line2'>
<span class='line-title' :class='item.isUse?"gray":""' v-if='item.useType===1'>通用</span>
<span class='line-title' :class='item.isUse?"gray":""' v-else-if='item.useType===3'>品类</span>
<span class='line-title' :class='item.isUse?"gray":""'
v-else-if='item.useType===3'>品类</span>
<span class='line-title' :class='item.isUse?"gray":""' v-else></span>
<span>{{item.name}}</span>
</view>
<view class='data acea-row row-between-wrapper'>
<view v-if="item.day>0">{{item.day}}</view>
<view v-else>{{ item.useStartTimeStr&& item.useEndTimeStr ? item.useStartTimeStr + " - " + item.useEndTimeStr : ""}}</view>
<view v-else>
{{ item.useStartTimeStr&& item.useEndTimeStr ? item.useStartTimeStr + " - " + item.useEndTimeStr : ""}}
</view>
<view class='bnt gray' v-if="item.isUse">{{item.use_title || ''}}</view>
<view class='bnt bg-color' v-else>{{coupon.statusTile || ''}}</view>
</view>
</view>
</view>
</view>
</block>
<!-- 无优惠券 -->
<view class='pictrue' v-else><image src='../../static/images/noCoupon.png'></image></view>
<view class='pictrue' v-else>
<image src='../../static/images/noCoupon.png'></image>
</view>
</view>
</view>
<view class='mask' catchtouchmove="true" :hidden='coupon.coupon==false' @click='close'></view>
</view>
</template>
<script>
import { setCouponReceive } from '@/api/api.js';
import {
setCouponReceive
} from '@/api/api.js';
export default {
props: {
// 0=,1=使
@ -45,16 +63,24 @@
default: function() {
return {};
}
},
//使tab
orderShow: {
type: String,
default: function() {
return '';
}
}
},
data() {
return {
type: 1
};
},
methods: {
close: function() {
this.type = 1
this.$emit('ChangCouponsClone');
},
getCouponUser: function(index, id) {
@ -68,7 +94,9 @@
ids.push(id);
setCouponReceive(id).then(res => {
that.$emit('ChangCouponsUseState', index);
that.$util.Tips({title: "领取成功"});
that.$util.Tips({
title: "领取成功"
});
that.$emit('ChangCoupons', list[index]);
})
break;
@ -76,20 +104,75 @@
that.$emit('ChangCoupons', index);
break;
}
},
setType: function(type) {
this.type = type;
this.$emit('tabCouponType', type);
}
}
}
</script>
<style scoped lang="scss">
.coupon-list-window{position:fixed;bottom:0;left:0;width:100%;background-color:#f5f5f5;border-radius:16rpx 16rpx 0 0;z-index:555;transform:translate3d(0,100%,0);transition:all .3s cubic-bezier(.25,.5,.5,.9);}
.coupon-list-window.on{transform:translate3d(0,0,0);}
.coupon-list-window .title{height:124rpx;width:100%;text-align:center;line-height:124rpx;font-size:32rpx;font-weight:bold;position:relative;}
.coupon-list-window .title .iconfont{position:absolute;right:30rpx;top:50%;transform:translateY(-50%);font-size:35rpx;color:#8a8a8a;font-weight:normal;}
.coupon-list-window .coupon-list{margin:0 0 50rpx 0;height:550rpx;overflow:auto;}
.coupon-list-window .pictrue{width:414rpx;height:336rpx;margin:0 auto 50rpx auto;}
.coupon-list-window .pictrue image{width:100%;height:100%;}
.pic-num{color: #fff;font-size: 24rpx;}
.coupon-list-window {
position: fixed;
bottom: 0;
left: 0;
width: 100%;
background-color: #f5f5f5;
border-radius: 16rpx 16rpx 0 0;
z-index: 555;
transform: translate3d(0, 100%, 0);
transition: all .3s cubic-bezier(.25, .5, .5, .9);
}
.coupon-list-window.on {
transform: translate3d(0, 0, 0);
}
.coupon-list-window .title {
height: 124rpx;
width: 100%;
text-align: center;
line-height: 124rpx;
font-size: 32rpx;
font-weight: bold;
position: relative;
}
.coupon-list-window .title .iconfont {
position: absolute;
right: 30rpx;
top: 50%;
transform: translateY(-50%);
font-size: 35rpx;
color: #8a8a8a;
font-weight: normal;
}
.coupon-list-window .coupon-list {
margin: 0 0 30rpx 0;
height: 823rpx;
overflow: auto;
padding-top: 30rpx;
}
.coupon-list-window .pictrue {
width: 414rpx;
height: 336rpx;
margin: 208rpx auto;
}
.coupon-list-window .pictrue image {
width: 100%;
height: 100%;
}
.pic-num {
color: #fff;
font-size: 24rpx;
}
.line-title {
width: 90rpx;
padding: 0 10rpx;
@ -102,9 +185,51 @@
color: #E83323;
margin-right: 12rpx;
}
.line-title.gray {
border-color: #BBB;
color: #bbb;
background-color: #F5F5F5;
}
.nav {
// position: absolute;
// top: 0;
// left: 0;
width: 100%;
height: 96rpx;
border-bottom: 2rpx solid #F5F5F5;
border-top-left-radius: 16rpx;
border-top-right-radius: 16rpx;
background-color: #FFFFFF;
font-size: 30rpx;
color: #999999;
}
.nav .acea-row {
border-top: 5rpx solid transparent;
border-bottom: 5rpx solid transparent;
}
.nav .acea-row.on {
border-bottom-color: #E93323;
color: #282828;
}
.nav .acea-row:only-child {
border-bottom-color: transparent;
}
.occupy {
height: 106rpx;
}
.coupon-list .item {
margin-bottom: 20rpx;
box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.06);
}
.coupon-list .item .money {
font-weight: normal;
}
</style>

View File

@ -24,6 +24,7 @@
justify-content: center;
align-items: center;
margin-top: 200rpx;
padding-bottom: 60rpx;
image{
width: 414rpx;
height: 240rpx;

View File

@ -73,7 +73,7 @@
border-radius: 50rpx;
opacity: 0;
height: 0;
color: #e93323;
color: $theme-color;
width: 0;
}

View File

@ -1,7 +1,7 @@
<template>
<view v-if="isUp">
<view class="mobile-bg" @click="close"></view>
<view class="mobile-mask animated" :class="{slideInUp:isUp}">
<view class="mobile-bg" v-if="isShow" @click="close"></view>
<view class="mobile-mask animated" :class="{slideInUp:isUp}" :style="{position:isPos?'fixed':'static'}">
<view class="input-item">
<input type="text" v-model="account" placeholder="输入手机号" />
</view>
@ -9,7 +9,7 @@
<input type="text" v-model="codeNum" placeholder="输入验证码" />
<button class="code" :disabled="disabled" @click="code">{{text}}</button>
</view>
<view class="sub_btn" @click="loginBtn"></view>
<view class="sub_btn" @click="loginBtn">{{(!userInfo.phone && isLogin) || (userInfo.phone && isLogin)?'':''}}</view>
</view>
</view>
</template>
@ -18,6 +18,7 @@
const app = getApp();
import sendVerifyCode from "@/mixins/SendVerifyCode";
import Routine from '@/libs/routine';
import {mapGetters} from "vuex";
import {
loginMobile,
registerVerify,
@ -26,10 +27,17 @@
phoneSilenceAuth,
phoneWxSilenceAuth
} from "@/api/user";
import { bindingPhone } from '@/api/api.js'
import { getUserPhone } from '@/api/public';
import {
bindingPhone
} from '@/api/api.js'
import {
getUserPhone,
iosBinding
} from '@/api/public';
const BACK_URL = "login_back_url";
export default {
name: 'login_mobile',
computed: mapGetters(['userInfo','isLogin']),
props: {
isUp: {
type: Boolean,
@ -38,18 +46,38 @@
authKey: {
type: String,
default: '',
},
isShow: {
type: Boolean,
default: true
},
isPos: {
type: Boolean,
default: true
},
appleShow: {
type: String,
default: ''
},
platform: {
type: String,
default: '',
}
},
data() {
return {
keyCode: '',
account: '',
codeNum:''
codeNum: '',
isApp: 0
}
},
mixins: [sendVerifyCode],
mounted() {
//this.getCode();
},
onLoad() {
},
methods: {
//
@ -62,7 +90,9 @@
title: '请输入正确的手机号码'
});
await registerVerify(that.account).then(res => {
that.$util.Tips({title:res.msg});
that.$util.Tips({
title: res.msg
});
that.sendCode();
}).catch(err => {
return that.$util.Tips({
@ -99,27 +129,49 @@
if (!/^[\w\d]+$/i.test(that.codeNum)) return that.$util.Tips({
title: '请输入正确的验证码'
});
uni.showLoading({ title: '正在登录中' });
getUserPhone({
captcha: that.codeNum,
phone: that.account,
spid: app.globalData.spid,
spread: app.globalData.code,
type: 'public',
key: this.authKey
}).then(res=>{
let time = res.data.expires_time - this.$Cache.time();
this.$store.commit('LOGIN', {
token: res.data.token,
time: time
uni.showLoading({
title: !this.userInfo.phone && this.isLogin?'正在绑定中':'正在登录中'
});
this.getUserInfo();
if (!this.userInfo.phone && this.isLogin) {
iosBinding({
captcha: that.codeNum,
phone: that.account
}).then(res => {
that.$util.Tips({
title: '绑定手机号成功',
icon: 'success'
}, {
tab: 3
})
that.isApp = 1;
that.getUserInfo();
}).catch(error => {
uni.hideLoading()
this.$util.Tips({
that.$util.Tips({
title: error
})
})
} else {
getUserPhone({
captcha: that.codeNum,
phone: that.account,
// #ifdef H5
type: 'public',
// #endif
key: that.authKey
}).then(res => {
that.$store.commit('LOGIN', {
token: res.data.token
});
that.$store.commit("SETUID", res.data.uid);
that.getUserInfo();
}).catch(error => {
uni.hideLoading()
that.$util.Tips({
title: error
})
})
}
},
// #ifdef MP
phoneSilenceAuth(code) {
@ -131,11 +183,8 @@
phone: this.account,
captcha: this.codeNum
}).then(res => {
let time = res.data.expires_time - this.$Cache.time();
this.$store.commit('LOGIN', {
token: res.data.token,
time: time
});
this.$store.commit('LOGIN', res.data.token);
this.$store.commit("SETUID", res.data.uid);
this.getUserInfo();
}).catch(error => {
self.$util.Tips({
@ -151,8 +200,6 @@
let that = this;
getUserInfo().then(res => {
uni.hideLoading();
that.userInfo = res.data
that.$store.commit("SETUID", res.data.uid);
that.$store.commit("UPDATE_USERINFO", res.data);
// #ifdef MP
that.$util.Tips({
@ -170,10 +217,9 @@
},
}
}
</script>
<style lang="stylus">
<style lang="stylus" scoped>
.mobile-bg {
position: fixed;
left: 0;
@ -182,20 +228,27 @@
height: 100%;
background: rgba(0, 0, 0, 0.5);
}
.isPos {
position: static;
}
.mobile-mask {
z-index: 20;
position: fixed;
// position: fixed;
left: 0;
bottom: 0;
width: 100%;
padding: 67rpx 30rpx;
background: #fff;
.input-item {
display: flex;
justify-content: space-between;
width: 100%;
height: 86rpx;
margin-bottom: 38rpx;
input {
flex: 1;
display: block;
@ -204,6 +257,7 @@
border-radius: 43rpx;
border: 1px solid #DCDCDC;
}
.code {
display: flex;
align-items: center;
@ -213,14 +267,16 @@
margin-left: 30rpx;
background: rgba(233, 51, 35, 0.05);
font-size: 28rpx;
color: #E93323;
color: $theme-color;
border-radius: 43rpx;
&[disabled] {
background: rgba(0, 0, 0, 0.05);
color: #999;
}
}
}
.sub_btn {
width: 690rpx;
height: 86rpx;
@ -233,6 +289,7 @@
text-align: center;
}
}
.animated {
animation-duration: .4s
}

View File

@ -20,7 +20,7 @@
getCodeApi,
getUserInfo
} from "@/api/user";
import { getLogo, silenceAuth, getUserPhone } from '@/api/public';
import { getLogo, getUserPhone } from '@/api/public';
export default{
name:'routine_phone',
props:{
@ -51,7 +51,6 @@
// #ifdef MP
//
getphonenumber(e){
console.log(e)
uni.showLoading({ title: '加载中' });
Routine.getCode()
.then(code => {
@ -67,22 +66,21 @@
encryptedData: encryptedData,
iv: iv,
code: code,
spid: app.globalData.spid,
spread: app.globalData.code,
key:this.authKey,
type: 'routine'
})
.then(res => {
let time = res.data.expires_time - this.$Cache.time();
this.$store.commit('LOGIN', {
token: res.data.token,
time: time
token: res.data.token
});
this.$store.commit("SETUID", res.data.uid);
this.getUserInfo();
})
.catch(res => {
console.log(res);
uni.hideLoading();
this.$util.Tips({
title: res
});
});
},
/**
@ -93,7 +91,6 @@
getUserInfo().then(res => {
uni.hideLoading();
that.userInfo = res.data
that.$store.commit("SETUID", res.data.uid);
that.$store.commit("UPDATE_USERINFO", res.data);
that.isStatus = true
this.close()
@ -150,7 +147,7 @@
height: 86rpx;
line-height: 86rpx;
margin-top: 60rpx;
background: #E93323;
background: $theme-color;
border-radius: 43rpx;
color: #fff;
font-size: 28rpx;

View File

@ -1,26 +1,27 @@
<template>
<view class="orderGoods">
<view class='total'>{{totalNmu}}件商品</view>
<view class='goodWrapper'>
<view class='item acea-row row-between-wrapper' v-for="(item,index) in cartInfo" :key="index" @click="jumpCon(item.productId)">
<view class="orderGoods borRadius14">
<view class='total'>{{ orderProNum?orderProNum:totalNmu}}件商品</view>
<view class='goodWrapper pad30'>
<view class='item acea-row row-between-wrapper' v-for="(item,index) in cartInfo" :key="index"
@click="jumpCon(item.productId)">
<view class='pictrue'>
<image :src='item.productInfo.attrInfo.image' v-if="item.productInfo.attrInfo"></image>
<image :src='item.productInfo.image' v-else></image>
<image :src='item.image'></image>
</view>
<view class='text'>
<view class='acea-row row-between-wrapper'>
<view class='name line1'>{{item.productInfo.storeName}}</view>
<view class='num'>x {{item.cartNum}}</view>
<view class='name line1'>{{item.productName ? item.productName : item.storeName}}</view>
<view class='num'>x {{item.payNum ? item.payNum : item.cartNum}}</view>
</view>
<view class='attr line1' v-if="item.productInfo.attrInfo">{{item.productInfo.attrInfo.suk}}</view>
<view class='money font-color' v-if="item.productInfo.attrInfo">{{item.productInfo.attrInfo.price}}</view>
<view class='money font-color' v-else>{{item.productInfo.price}}</view>
<view class='evaluate' v-if='item.isReply==0 && evaluate==3' @click.stop="evaluateTap(item.productAttrUnique,orderId,ids)">评价</view>
<view class='evaluate' v-else-if="item.isReply==1 && evaluate==3">已评价</view>
<view class='attr line1' v-if="item.sku">{{item.sku}}</view>
<view class='money font-color'>{{item.price}}</view>
<view class='evaluate' v-if='item.isReply==0 && evaluate==2' @click.stop="evaluateTap(item)">评价
</view>
<view class='evaluate' v-else-if="item.isReply==1">已评价</view>
</view>
</view>
</view>
</view>
</template>
<script>
@ -47,6 +48,18 @@
jump: {
type: Boolean,
default: false,
},
orderProNum: {
type: Number,
default: function() {
return 0;
}
},
productType: {
type: Number,
default: function() {
return 0;
}
}
},
data() {
@ -64,15 +77,16 @@
}
},
methods: {
evaluateTap:function(unique,orderId,ids){
evaluateTap(item) {
uni.navigateTo({
url:"/pages/users/goods_comment_con/index?unique="+unique+"&uni="+orderId + "&id=" + ids
url: "/pages/users/goods_comment_con/index?unique=" + item.attrId + "&orderId=" + this.orderId + '&id=' + this.ids
})
},
jumpCon: function(id) {
let type = this.productType==0?'normal':'video'
if (this.jump) {
uni.navigateTo({
url: `/pages/goods_details/index?id=${id}`
url: `/pages/goods_details/index?id=${id}&type=${type}`
})
}
}
@ -83,19 +97,20 @@
<style scoped lang="scss">
.orderGoods {
background-color: #fff;
margin-top: 12rpx;
margin-top: 15rpx;
}
.orderGoods .total {
width: 100%;
height: 86rpx;
padding: 0 30rpx;
padding: 0 24rpx;
border-bottom: 2rpx solid #f0f0f0;
font-size: 30rpx;
color: #282828;
line-height: 86rpx;
box-sizing: border-box;
}
.pictrue image {
background: #f4f4f4;
}

View File

@ -4,8 +4,8 @@
<view class="title acea-row row-center-wrapper">
选择付款方式<text class="iconfont icon-guanbi" @click='close'></text>
</view>
<view class="item acea-row row-between-wrapper" @click='goPay(item.number || 0 , item.value)' v-for="(item,index) in payMode"
:key="index">
<view class="item acea-row row-between-wrapper" @click='goPay(item.number || 0 , item.value)'
v-for="(item,index) in payMode" :key="index">
<view class="left acea-row row-between-wrapper">
<view class="iconfont" :class="item.icon"></view>
<view class="text">
@ -26,8 +26,12 @@
<script>
import {
orderPay,
wechatOrderPay
wechatOrderPay,
wechatQueryPayResult
} from '@/api/order.js';
import {
mapGetters
} from "vuex";
export default {
props: {
payMode: {
@ -54,6 +58,7 @@
};
},
computed: mapGetters(['systemPlatform']),
methods: {
close: function() {
this.$emit('onChangeFun', {
@ -77,12 +82,13 @@
// #ifdef MP
payChannel: 'routine',
// #endif
// #ifdef H5 || APP-PLUS
// #ifdef H5
payChannel: that.$wechat.isWeixin() ? 'public' : 'weixinh5',
// #endif
payType: paytype
}).then(res => {
let jsConfig = res.data.jsConfig;
that.order_id = res.data.orderNo;
switch (res.data.payType) {
case 'weixin':
// #ifdef MP
@ -93,15 +99,23 @@
signType: jsConfig.signType,
paySign: jsConfig.paySign,
success: function(ress) {
uni.hideLoading();
wechatQueryPayResult(that.order_id).then(res => {
uni.hideLoading();
return that.$util.Tips({
title: '支付成功',
title: "支付成功",
icon: 'success'
}, () => {
that.$emit('onChangeFun', {
action: 'pay_complete'
});
});
}).cache(err => {
uni.hideLoading();
return that.$util.Tips({
title: err
});
})
},
fail: function(e) {
uni.hideLoading();
@ -115,7 +129,8 @@
},
complete: function(e) {
uni.hideLoading();
if (e.errMsg == 'requestPayment:cancel') return that.$util.Tips({
if (e.errMsg == 'requestPayment:cancel') return that.$util
.Tips({
title: '取消支付'
}, () => {
that.$emit('onChangeFun', {
@ -135,13 +150,13 @@
};
that.$wechat.pay(datas).then(res => {
if (res.errMsg == 'chooseWXPay:cancel') {
uni.hideLoading();
return that.$util.Tips({
title: '支付失败'
});
} else {
wechatQueryPayResult({
orderNo: that.order_id
}).then(res => {
wechatQueryPayResult(that.order_id).then(res => {
uni.hideLoading();
return that.$util.Tips({
title: "支付成功",
icon: 'success'
@ -150,13 +165,19 @@
action: 'pay_complete'
});
});
}).cache(errW => {
}).cache(err => {
uni.hideLoading();
return that.$util.Tips({
title: errW
title: err
});
})
}
}).cache(errW => {
uni.hideLoading();
return that.$util.Tips({
title: errW
});
})
// #endif
break;
@ -173,7 +194,8 @@
break;
case 'weixinh5':
uni.hideLoading();
location.replace(jsConfig.mwebUrl + '&redirect_url=' + window.location.protocol + '//' + window.location.host + goPages + '&status=1');
location.replace(jsConfig.mwebUrl + '&redirect_url=' + window.location.protocol +
'//' + window.location.host + goPages + '&status=1');
return that.$util.Tips({
title: "支付中",
icon: 'success'

View File

@ -1,30 +1,24 @@
<template>
<!-- <view class='product-bg'>
<swiper :indicator-dots="indicatorDots"
:autoplay="autoplay" :circular="circular" :interval="interval" :duration="duration" @change="change">
<block v-for="(item,index) in imgUrls" :key="index">
<swiper-item>
<image :src="item" class="slide-image"/>
</swiper-item>
</block>
</swiper>
<view class='pages'>{{currents}}/{{imgUrls.length || 1}}</view>
</view> -->
<view class='product-bg'>
<swiper :indicator-dots="indicatorDots" indicator-active-color="#e93323"
:autoplay="autoplay" :circular="circular" :interval="interval" :duration="duration" @change="change">
<swiper :indicator-dots="indicatorDots" indicator-active-color="#e93323" :autoplay="autoplay"
:circular="circular" :interval="interval" :duration="duration" @change="change">
<swiper-item v-if="videoline">
<view class="item">
<video id="myVideo" :src='videoline' objectFit="cover" controls style="width:100%;height:100% " show-center-play-btn show-mute-btn="true" auto-pause-if-navigate :custom-cache="false"></video>
<view class="poster" v-if="controls">
<view v-show="!controls" style="width:100%;height:100% ">
<video id="myVideo" :src='videoline' objectFit="cover" controls style="width:100%;height:100% "
show-center-play-btn show-mute-btn="true" auto-pause-if-navigate :custom-cache="false"
:enable-progress-gesture="false" :poster="imgUrls[0]" @pause="videoPause"></video>
</view>
<view class="poster" v-show="controls">
<image class="image" :src="imgUrls[0]"></image>
</view>
<view class="stop" v-if="controls" @tap="bindPause">
<view class="stop" v-show="controls" @tap="bindPause">
<image class="image" src="../../static/images/stop.png"></image>
</view>
</view>
</swiper-item>
<block v-for="(item,index) in imgUrls" :key='index'>
<swiper-item>
<image :src="item" class="slide-image" />
@ -43,8 +37,7 @@
return [];
}
},
videoline:
{
videoline: {
type: String,
value: ""
}
@ -53,20 +46,27 @@
return {
indicatorDots: true,
circular: true,
autoplay: false,
autoplay: true,
interval: 3000,
duration: 500,
currents: "1",
controls:true
controls: true,
isPlay:true,
videoContext:''
};
},
mounted() {
//this.videoContext = uni.createVideoContext('myVideo',this);
if(this.videoline){
this.imgUrls.shift()
}
},
methods: {
videoPause(e){
},
bindPause: function() {
this.videoContext.play();
this.$set(this, 'controls', false)
this.autoplay = false
},
change: function(e) {
this.$set(this, 'currents', e.detail.current + 1);
@ -76,14 +76,74 @@
</script>
<style scoped lang="scss">
.product-bg{width:100%;height:750rpx;position:relative;}
.product-bg swiper{width:100%;height:100%;position:relative;}
.product-bg .slide-image{width:100%;height:100%;}
.product-bg .pages{position:absolute;background-color:#fff;height:34rpx;padding:0 10rpx;border-radius:3rpx;right:30rpx;bottom:30rpx;line-height:34rpx;font-size:24rpx;color:#050505;}
#myVideo{width: 100%;height: 100%}
.product-bg .item{position:relative;width:100%;height:100%;}
.product-bg .item .poster{position:absolute;top:0;left:0;height:750rpx;width:100%;z-index:9;}
.product-bg .item .poster .image{width:100%;height:100%;}
.product-bg .item .stop{position:absolute;top:50%;left:50%;width:136rpx;height:136rpx;margin-top:-68rpx;margin-left:-68rpx;z-index:9;}
.product-bg .item .stop .image{width:100%;height:100%;}
.product-bg {
width: 100%;
height: 750rpx;
position: relative;
}
.product-bg swiper {
width: 100%;
height: 100%;
position: relative;
}
.product-bg .slide-image {
width: 100%;
height: 100%;
}
.product-bg .pages {
position: absolute;
background-color: #fff;
height: 34rpx;
padding: 0 10rpx;
border-radius: 3rpx;
right: 30rpx;
bottom: 30rpx;
line-height: 34rpx;
font-size: 24rpx;
color: #050505;
}
#myVideo {
width: 100%;
height: 100%
}
.product-bg .item {
position: relative;
width: 100%;
height: 100%;
}
.product-bg .item .poster {
position: absolute;
top: 0;
left: 0;
height: 750rpx;
width: 100%;
z-index: 9;
}
.product-bg .item .poster .image {
width: 100%;
height: 100%;
}
.product-bg .item .stop {
position: absolute;
top: 50%;
left: 50%;
width: 136rpx;
height: 136rpx;
margin-top: -68rpx;
margin-left: -68rpx;
z-index: 9;
}
.product-bg .item .stop .image {
width: 100%;
height: 100%;
}
</style>

View File

@ -1,6 +1,7 @@
<template>
<view>
<view class="product-window" :class="(attr.cartAttr === true ? 'on' : '') + ' ' + (iSbnt?'join':'') + ' ' + (iScart?'joinCart':'')">
<view class="product-window"
:class="(attr.cartAttr === true ? 'on' : '') + ' ' + (iSbnt?'join':'') + ' ' + (iScart?'joinCart':'')">
<view class="textpic acea-row row-between-wrapper">
<view class="pictrue">
<image :src="attr.productSelect.image"></image>
@ -12,7 +13,7 @@
<view class="money font-color">
<text class="num">{{ attr.productSelect.price }}</text>
<text class="stock" v-if='isShow'>库存: {{ attr.productSelect.stock }}</text>
<text class='stock' v-if="limitNum">: {{attr.productSelect.quotaShow}}</text>
<text class='stock' v-if="limitNum">: {{attr.productSelect.quota}}</text>
</view>
</view>
<view class="iconfont icon-guanbi" @click="closeAttr"></view>
@ -22,9 +23,10 @@
<view class="item" v-for="(item, indexw) in attr.productAttr" :key="indexw">
<view class="title">{{ item.attrName }}</view>
<view class="listn acea-row row-middle">
<view class="itemn" :class="item.index === itemn.attr ? 'on' : ''" v-for="(itemn, indexn) in item.attrValue"
@click="tapAttr(indexw, indexn)" :key="indexn">
{{ itemn.attr }}
<view class="itemn" :class="item.index === itemn ? 'on' : ''"
v-for="(itemn, indexn) in item.attrValues" @click="tapAttr(indexw, indexn)"
:key="indexn">
{{ itemn }}
</view>
</view>
</view>
@ -32,26 +34,32 @@
<view class="cart acea-row row-between-wrapper">
<view class="title">数量</view>
<view class="carnum acea-row row-left">
<view class="item reduce" :class="attr.productSelect.cart_num <= 1 ? 'on' : ''" @click="CartNumDes">
<view class="item reduce" :class="attr.productSelect.cart_num <= 1 ? 'on' : ''"
@click="CartNumDes">
-
</view>
<view class='item num'>
<input type="number" v-model="attr.productSelect.cart_num" data-name="productSelect.cart_num" @input="bindCode(attr.productSelect.cart_num)"></input>
<input type="number" v-model="attr.productSelect.cart_num"
data-name="productSelect.cart_num"
@input="bindCode(attr.productSelect.cart_num)"></input>
</view>
<view v-if="iSplus" class="item plus" :class="
attr.productSelect.cart_num >= attr.productSelect.stock
? 'on'
: ''
"
@click="CartNumAdd">
" @click="CartNumAdd">
+
</view>
<view v-else class='item plus' :class='(attr.productSelect.cart_num >= attr.productSelect.quota) || (attr.productSelect.cart_num >= attr.productSelect.stock) || (attr.productSelect.cart_num >= attr.productSelect.num)? "on":""' @click='CartNumAdd'>+</view>
<view v-else class='item plus'
:class='(attr.productSelect.cart_num >= attr.productSelect.quota) || (attr.productSelect.cart_num >= attr.productSelect.stock) || (attr.productSelect.cart_num >= attr.productSelect.num)? "on":""'
@click='CartNumAdd'>+</view>
</view>
</view>
</view>
<view class="joinBnt bg-color" v-if="iSbnt && attr.productSelect.stock>0 &&attr.productSelect.quota>0" @click="goCat"></view>
<view class="joinBnt on" v-else-if="(iSbnt && attr.productSelect.quota<=0)||(iSbnt &&attr.productSelect.stock<=0)">已售罄</view>
<view class="joinBnt bg-color" v-if="iSbnt && attr.productSelect.stock>0 &&attr.productSelect.quota>0"
@click="goCat">我要参团</view>
<view class="joinBnt on"
v-else-if="(iSbnt && attr.productSelect.quota<=0)||(iSbnt &&attr.productSelect.stock<=0)">已售罄</view>
<view class="joinBnt bg-color" v-if="iScart && attr.productSelect.stock" @click="goCat"></view>
<!-- <view class="joinBnt bg-color" v-if="iSbnt && attr.productSelect.stock && attr.productSelect.quota" @click="goCat"></view> -->
<view class="joinBnt on" v-else-if="(iScart && !attr.productSelect.stock)">已售罄</view>
@ -92,8 +100,7 @@
data() {
return {};
},
mounted() {
},
mounted() {},
methods: {
goCat: function() {
this.$emit('goCat');
@ -163,7 +170,9 @@
transform: translate3d(0, 0, 0);
}
.product-window.join{padding-bottom: 30rpx;}
.product-window.join {
padding-bottom: 30rpx;
}
.product-window.joinCart {
padding-bottom: 30rpx;
@ -190,7 +199,7 @@
.product-window .textpic .text {
width: 410rpx;
font-size: 32rpx;
color: #202020;
color: #333333;
}
.product-window .textpic .text .money {
@ -240,15 +249,15 @@
font-size: 26rpx;
color: #282828;
padding: 7rpx 33rpx;
border-radius: 25rpx;
border-radius: 40rpx;
margin: 20rpx 0 0 14rpx;
background-color: #F2F2F2;
}
.product-window .productWinList .item .listn .itemn.on {
color: #E93323;
color: $theme-color;
background: rgba(255, 244, 243, 1);
border-color: #E93323;
border-color: $theme-color;
}
.product-window .productWinList .item .listn .itemn.limit {
@ -290,7 +299,7 @@
.product-window .cart .carnum .reduce.on {
// border-color: #e3e3e3;
color: #DEDEDE;
font-size: 60rpx;
font-size: 44rpx;
}
.product-window .cart .carnum .plus {
@ -308,7 +317,28 @@
background: rgba(242, 242, 242, 1);
color: #282828;
font-size: 28rpx;
border-radius: 12rpx;
line-height: 29px;
height: 54rpx;
input {
display: -webkit-inline-box;
}
}
.product-window .joinBnt {
font-size: 30rpx;
width: 620rpx;
height: 86rpx;
border-radius: 50rpx;
text-align: center;
line-height: 86rpx;
color: #fff;
margin: 21rpx auto 0 auto;
}
.product-window .joinBnt.on {
background-color: #bbb;
color: #fff;
}
.product-window .joinBnt{font-size: 30rpx;width: 620rpx;height: 86rpx;border-radius: 50rpx;text-align: center;line-height: 86rpx;color: #fff;margin: 21rpx auto 0 auto;}
.product-window .joinBnt.on{background-color:#bbb;color:#fff;}
</style>

View File

@ -58,6 +58,7 @@
.recommend .title {
height: 135rpx;
line-height: 135rpx;
font-size: 28rpx;
color: #282828;
}
@ -96,7 +97,7 @@
.recommend .recommendList .item .pictrue image {
width: 100%;
height: 100%;
border-radius: 6rpx;
border-radius: 14rpx;
}
.recommend .recommendList .item .name {
@ -108,6 +109,7 @@
.recommend .recommendList .item .money {
font-size: 20rpx;
margin-top: 8rpx;
font-weight: 600;
}
.recommend .recommendList .item .money .num {

View File

@ -48,5 +48,5 @@
.swiper swiper .slide-image{width:100%;height:100%;}
.swiper .dots{position:absolute;right:40rpx;bottom:20rpx;}
.swiper .dots .dot{width:12rpx;height:12rpx;border:2rpx solid #fff;border-radius:50%;margin-right:15rpx;}
.swiper .dots .dot.active{border-color:#e93323;background-color:#e93323;}
.swiper .dots .dot.active{border-color:$theme-color;background-color:$theme-color;}
</style>

View File

@ -1,34 +1,37 @@
<template>
<!-- v-if="reply.length>0" -->
<view class="evaluateWtapper">
<view class="evaluateItem" v-for="(item, indexw) in reply" :key="indexw">
<view class="pic-text acea-row row-middle">
<view class="pic-text acea-row">
<view class="pictrue">
<image :src="item.avatar"></image>
</view>
<view class="acea-row row-between-wrapper" style="width: 87%;">
<view class="acea-row row-middle">
<view class="content">
<view>
<view class="acea-row row-between">
<view class="acea-row">
<view class="name line1">{{ item.nickname }}</view>
<view class="start" :class="'star' + item.productScore"></view>
<view class="start" :class="'star' + item.score"></view>
</view>
<view class="time">{{ item.createTime }}</view>
<!-- <view class="time">{{ item.createTime }}</view>
<view class="time">{{ item.suk }}</view> -->
<!-- <view class="time">{{ item.createTime }} {{ item.sku }}</view> -->
</view>
<view class="sku">规格{{ item.sku?item.sku:'无' }}</view>
</view>
<view class="time">规格{{ item.sku?item.sku:'无' }}</view>
<view class="evaluate-infor">{{ item.comment }}</view>
<view class="imgList acea-row" v-if="item.pics.length && item.pics[0]">
<view class="imgList acea-row" v-if="item.pics && item.pics.length && item.pics[0]">
<view class="pictrue" v-for="(itemn, indexn) in item.pics" :key="indexn">
<image :src="itemn" class="image" @click='getpreviewImage(indexw, indexn)'></image>
</view>
</view>
<view class="reply" v-if="item.merchantReplyContent">
<text class="font-color">店小二</text>{{
item.merchantReplyContent
}}
<text class="font-color">店小二</text>{{ item.merchantReplyContent }}
</view>
</view>
</view>
</view>
</view>
</template>
<script>
@ -55,7 +58,9 @@
<style scoped lang='scss'>
.evaluateWtapper .evaluateItem {
background-color: #fff;
padding-bottom: 25rpx;
padding: 24rpx;
border-bottom-left-radius: 14rpx;
border-bottom-right-radius: 14rpx;
}
.evaluateWtapper .evaluateItem~.evaluateItem {
@ -65,14 +70,15 @@
.evaluateWtapper .evaluateItem .pic-text {
font-size: 26rpx;
color: #282828;
height: 95rpx;
padding: 0 30rpx;
.content{
width: 84%;
margin-left: 20rpx;
}
}
.evaluateWtapper .evaluateItem .pic-text .pictrue {
width: 56rpx;
height: 56rpx;
margin-right: 20rpx;
width: 62rpx;
height: 62rpx;
}
.evaluateWtapper .evaluateItem .pic-text .pictrue image {
@ -87,40 +93,47 @@
.evaluateWtapper .evaluateItem .time {
font-size: 24rpx;
color: #82848f;
padding: 0 30rpx;
}
color: #999999;
}
.sku{
font-size: 24rpx;
color: #999999;
margin: 10rpx 0;
}
.evaluateWtapper .evaluateItem .evaluate-infor {
font-size: 28rpx;
color: #282828;
margin-top: 19rpx;
padding: 0 30rpx;
color: #333;
margin-bottom: 14rpx;
}
.evaluateWtapper .evaluateItem .imgList {
padding: 0 30rpx 0 15rpx;
margin-top: 25rpx;
.evaluateWtapper .evaluateItem .imgList {/*
padding: 0 24rpx;
margin-top: 16rpx; */
}
.evaluateWtapper .evaluateItem .imgList .pictrue {
width: 156rpx;
height: 156rpx;
margin: 0 0 15rpx 15rpx;
width: 102rpx;
height: 102rpx;
margin-right: 14rpx;
border-radius: 14rpx;
margin-bottom: 16rpx;
/* margin: 0 0 15rpx 15rpx; */
}
.evaluateWtapper .evaluateItem .imgList .pictrue image {
width: 100%;
height: 100%;
background-color: #f7f7f7;
border-radius: 14rpx;
}
.evaluateWtapper .evaluateItem .reply {
font-size: 26rpx;
color: #454545;
background-color: #f7f7f7;
border-radius: 5rpx;
margin: 20rpx 30rpx 0 30rpx;
border-radius: 14rpx;
margin: 20rpx 30rpx 0 0rpx;
padding: 20rpx;
position: relative;
}

View File

@ -4,13 +4,13 @@ let domain = 'http://127.0.0.1:8080'
module.exports = {
// 请求域名 格式: https://您的域名
// #ifdef MP
// HTTP_REQUEST_URL:'',
HTTP_REQUEST_URL: domain,
// #endif
// #ifdef H5
//H5接口是浏览器地址
// HTTP_REQUEST_URL: window.location.protocol+"//"+window.location.host,
// http://api.java.crmeb.net:20001
HTTP_REQUEST_URL:domain,
// #endif

View File

@ -29,4 +29,6 @@ module.exports = {
CACHE_LONGITUDE: 'LONGITUDE',
//缓存纬度
CACHE_LATITUDE: 'LATITUDE',
//app手机信息
PLATFORM: 'systemPlatform'
}

24
libs/apps.js Normal file
View File

@ -0,0 +1,24 @@
import { appAuth } from '../api/public';
class Apps{
/**
* 授权登录获取token
* @param {Object} code
*/
authApp(code) {
return new Promise((resolve, reject) => {
appAuth(code,{'spread_spid': 0})
.then(({
data
}) => {
resolve(data);
Cache.set(WX_AUTH, code);
Cache.clear(STATE_KEY);
loginType && Cache.clear(LOGINTYPE);
})
.catch(reject);
});
}
}
export default new Apps();

View File

@ -1,11 +1,12 @@
import store from "../store";
import Cache from '../utils/cache';
// #ifdef H5 || APP-PLUS
import { Debounce } from '@/utils/validate.js'
// #ifdef H5
import { isWeixin } from "../utils";
import auth from './wechat';
// #endif
import { LOGIN_STATUS, USER_INFO, EXPIRES_TIME, STATE_R_KEY} from './../config/cache';
import { LOGIN_STATUS, USER_INFO, EXPIRES_TIME, STATE_R_KEY, BACK_URL} from './../config/cache';
function prePage(){
let pages = getCurrentPages();
@ -13,28 +14,55 @@ function prePage(){
return prePage.route;
}
export function toLogin(push, pathLogin) {
export const toLogin = Debounce(_toLogin,800)
export function _toLogin(push, pathLogin) {
store.commit("LOGOUT");
let path = prePage();
let login_back_url = Cache.get(BACK_URL);
// #ifdef H5
path = location.href;
// path = location.href;
path = location.pathname + location.search;
// #endif
if(!pathLogin)
if(!pathLogin){
pathLogin = '/page/users/login/index'
Cache.set('login_back_url',path);
// #ifdef H5 || APP-PLUS
}
// #ifdef H5
if (isWeixin()) {
auth.oAuth();
let urlData = location.pathname + location.search
if (urlData.indexOf('?') !== -1) {
urlData += '&go_longin=1';
} else {
if (path !== pathLogin) {
push ? uni.navigateTo({
urlData += '?go_longin=1';
}
if (!Cache.has('snsapiKey')) {
auth.oAuth('snsapi_base', urlData);
} else {
if (['/pages/user/index'].indexOf(login_back_url) == -1) {
uni.navigateTo({
url: '/pages/users/wechat_login/index'
})
}
}
} else {
if (['/pages/user/index'].indexOf(login_back_url) == -1) {
uni.navigateTo({
url: '/pages/users/login/index'
}) : uni.reLaunch({
url: '/pages/users/login/index'
});
})
}
}
// #endif
if (['pages/user/index','/pages/user/index'].indexOf(login_back_url) == -1) {
// #ifdef MP
uni.navigateTo({
url: '/pages/users/wechat_login/index'
})
// #endif
}
}

View File

@ -1,12 +1,20 @@
import {
preOrderApi
} from '@/api/order.js';
import util from 'utils/util'
/**
* 去商品详情
*/
export function goShopDetail(item, uid) {
return new Promise(resolve => {
if (item.activityH5 && item.activityH5.type === "1") {
uni.navigateTo({
url: `/pages/activity/goods_seckill_details/index?id=${item.activityH5.id}&time=${item.activityH5.time}&status=2`
url: `/pages/activity/goods_seckill_details/index?id=${item.activityH5.id}`
})
} else if (item.activityH5 && item.activityH5.type === "2") {
uni.navigateTo({
url: `/pages/activity/goods_bargain_details/index?id=${item.activityH5.id}&bargain=${uid}`
url: `/pages/activity/goods_bargain_details/index?id=${item.activityH5.id}&startBargainUid=${uid}`
})
} else if (item.activityH5 && item.activityH5.type === "3") {
uni.navigateTo({
@ -17,3 +25,23 @@ export function goShopDetail(item,uid) {
}
});
}
/**
* 活动商品普通商品购物车再次购买预下单
*/
export function getPreOrder(preOrderType, orderDetails) {
return new Promise((resolve, reject) => {
preOrderApi({
"preOrderType": preOrderType,
"orderDetails": orderDetails
}).then(res => {
uni.navigateTo({
url: '/pages/users/order_confirm/index?preOrderNo=' + res.data.preOrderNo
});
}).catch(err => {
return util.Tips({
title: err
});
})
});
}

View File

@ -3,7 +3,6 @@ import { checkLogin } from './login';
import { login } from '../api/public';
import Cache from '../utils/cache';
import { STATE_R_KEY, USER_INFO, EXPIRES_TIME, LOGIN_STATUS} from './../config/cache';
class Routine
{
@ -25,16 +24,6 @@ class Routine
getUserProfile(){
let that = this , code = this.getUserCode();
return new Promise( (resolve,reject) => {
// uni.getUserInfo({
// lang: 'zh_CN',
// success(user) {
// if(code) user.code = code;
// resolve({userInfo:user,islogin:false});
// },
// fail(res){
// reject(res);
// }
// })
uni.getUserProfile({
lang: 'zh_CN',
desc: '用于完善会员资料', // 声明获取用户个人信息后的用途,后续会展示在弹窗中,请谨慎填写
@ -76,9 +65,6 @@ class Routine
async getCode(){
let provider = await this.getProvider();
return new Promise((resolve,reject)=>{
if(Cache.has(STATE_R_KEY)){
return resolve(Cache.get(STATE_R_KEY));
}
uni.login({
provider:provider,
success(res) {
@ -130,17 +116,19 @@ class Routine
});
});
}
/**
* 小程序登录
*/
authUserInfo(code,data)
{
return new Promise((resolve, reject)=>{
login(code,data).then(res=>{
// let time = res.data.expiresTime - Cache.time();
store.commit('UPDATE_USERINFO', res.data.user);
store.commit('LOGIN', {token:res.data.token});
store.commit('SETUID', res.data.user.uid);
// Cache.set(EXPIRES_TIME,res.data.expiresTime,time);
Cache.set(USER_INFO,res.data.user);
if(res.data.type==='login'){
store.commit('LOGIN', {
token: res.data.token
});
store.commit("SETUID", res.data.uid);
}
return resolve(res);
}).catch(res=>{
return reject(res);

View File

@ -112,6 +112,21 @@ class AuthWechat {
});
}
// 使用微信内置地图查看位置接口;
seeLocation(config){
return new Promise((resolve, reject) => {
this.wechat().then(wx => {
this.toPromise(wx.openLocation, config).then(res => {
resolve(res);
}).catch(err => {
reject(err);
});
}).catch(err => {
reject(err);
})
});
}
/**
* 微信支付
* @param {Object} config
@ -153,12 +168,37 @@ class AuthWechat {
/**
* 自动去授权
*/
oAuth() {
if (uni.getStorageSync(WX_AUTH) && store.state.app.token) return;
oAuth(snsapiBase,url) {
if (uni.getStorageSync(WX_AUTH) && store.state.app.token && snsapiBase == 'snsapi_base') return;
const {
code
} = parseQuery();
if (!code) return this.toAuth();
if (!code || code == uni.getStorageSync('snsapiCode')){
return this.toAuth(snsapiBase,url);
}else{
if(Cache.has('snsapiKey'))
return this.auth(code).catch(error=>{
uni.showToast({
title:error,
icon:'none'
})
})
}
// if (uni.getStorageSync(WX_AUTH) && store.state.app.token) return;
// const {
// code
// } = parseQuery();
// if (!code){
// return this.toAuth(snsapiBase,url);
// }else{
// if(Cache.has('snsapiKey'))
// return this.auth(code).catch(error=>{
// uni.showToast({
// title:error,
// icon:'none'
// })
// })
// }
}
clearAuthStatus() {
@ -171,24 +211,16 @@ class AuthWechat {
*/
auth(code) {
return new Promise((resolve, reject) => {
let loginType = Cache.get(LOGINTYPE);
wechatAuth(code, Cache.get("spread"), loginType)
wechatAuth(code, Cache.get("spread"))
.then(({
data
}) => {
// let expires_time = data.expires_time.substring(0, 19);
// expires_time = expires_time.replace(/-/g, '/');
// expires_time = new Date(expires_time).getTime();
// let newTime = Math.round(new Date() / 1000);
store.commit("LOGIN", {
token: data.token
// time: expires_time - newTime
});
resolve(data);
Cache.set(WX_AUTH, code);
Cache.clear(STATE_KEY);
// Cache.clear('spread');
loginType && Cache.clear(LOGINTYPE);
resolve();
})
.catch(reject);
});
@ -198,9 +230,15 @@ class AuthWechat {
* 获取跳转授权后的地址
* @param {Object} appId
*/
getAuthUrl(appId) {
getAuthUrl(appId,snsapiBase,backUrl) {
let url = `${location.origin}${backUrl}`
if(url.indexOf('?') == -1){
url = url+'?'
}else{
url = url+'&'
}
const redirect_uri = encodeURIComponent(
`${location.origin}/pages/auth/index?back_url=` +
`${url}scope=${snsapiBase}&back_url=` +
encodeURIComponent(
encodeURIComponent(
uni.getStorageSync(BACK_URL) ?
@ -214,16 +252,21 @@ class AuthWechat {
("" + Math.random()).split(".")[1] + "authorizestate"
);
uni.setStorageSync(STATE_KEY, state);
return `https://open.weixin.qq.com/connect/oauth2/authorize?appid=${appId}&redirect_uri=${redirect_uri}&response_type=code&scope=snsapi_base&state=${state}#wechat_redirect`;
return `https://open.weixin.qq.com/connect/oauth2/authorize?appid=${appId}&redirect_uri=${redirect_uri}&response_type=code&scope=snsapi_userinfo&state=${state}#wechat_redirect`;
// if(snsapiBase==='snsapi_base'){
// return `https://open.weixin.qq.com/connect/oauth2/authorize?appid=${appId}&redirect_uri=${redirect_uri}&response_type=code&scope=snsapi_base&state=${state}#wechat_redirect`;
// }else{
// return `https://open.weixin.qq.com/connect/oauth2/authorize?appid=${appId}&redirect_uri=${redirect_uri}&response_type=code&scope=snsapi_userinfo&state=${state}#wechat_redirect`;
// }
}
/**
* 跳转自动登录
*/
toAuth() {
toAuth(snsapiBase,backUrl) {
let that = this;
this.wechat().then(wx => {
location.href = this.getAuthUrl(that.initConfig.appId);
location.href = this.getAuthUrl(that.initConfig.appId,snsapiBase,backUrl);
})
}

View File

@ -4,13 +4,14 @@ import store from './store'
import Cache from './utils/cache'
import util from 'utils/util'
import configs from './config/app.js'
import * as Order from './libs/order';
Vue.prototype.$util = util;
Vue.prototype.$config = configs;
Vue.prototype.$Cache = Cache;
Vue.prototype.$eventHub = new Vue();
Vue.config.productionTip = false
Vue.prototype.$Order = Order;
// #ifdef H5
import { parseQuery } from "./utils";
@ -46,7 +47,7 @@ if (vconsole !== undefined && vconsole === md5Crmeb) {
let vConsole = new VConsole();
}
Auth.isWeixin() && Auth.oAuth();
// Auth.isWeixin() && Auth.oAuth();
// #endif

View File

@ -1,17 +1,17 @@
{
"name" : "crmeb",
"appid" : "__UNI__06E0263",
"description" : "",
"appid" : "__UNI__66E0853",
"description" : "crmeb商城",
"versionName" : "1.0.0",
"versionCode" : "100",
"versionCode" : 1001,
"transformPx" : false,
/* 5+App */
"app-plus" : {
"usingComponents" : true,
"nvueCompiler" : "uni-app",
"splashscreen" : {
"alwaysShowBeforeRender" : true,
"waiting" : true,
"alwaysShowBeforeRender" : false,
"waiting" : false,
"autoclose" : true,
"delay" : 0
},
@ -22,44 +22,47 @@
/* android */
"android" : {
"permissions" : [
"<uses-feature android:name=\"android.hardware.camera\"/>",
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
"<uses-permission android:name=\"android.permission.CALL_PHONE\"/>",
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
"<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
"<uses-permission android:name=\"android.permission.INTERNET\"/>",
"<uses-permission android:name=\"android.permission.MODIFY_AUDIO_SETTINGS\"/>",
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
"<uses-permission android:name=\"android.permission.READ_CONTACTS\"/>",
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
"<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
"<uses-permission android:name=\"android.permission.WRITE_CONTACTS\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.CAMERA\"/>",
"<uses-permission android:name=\"android.permission.RECORD_AUDIO\"/>",
"<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
"<uses-permission android:name=\"android.permission.MODIFY_AUDIO_SETTINGS\"/>",
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
"<uses-permission android:name=\"android.permission.CALL_PHONE\"/>",
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\"/>",
"<uses-feature android:name=\"android.hardware.camera\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\"/>",
"<uses-permission android:name=\"android.permission.WRITE_CONTACTS\"/>",
"<uses-permission android:name=\"android.permission.WRITE_EXTERNAL_STORAGE\"/>",
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
]
],
"abiFilters" : []
},
/* ios */
"ios" : {},
"ios" : {
"idfa" : false
},
/* SDK */
"sdkConfigs" : {}
"sdkConfigs" : {},
"icons" : {}
}
},
/* */
"quickapp" : {},
/* */
"mp-weixin" : {
"appid" : "wxcda5a2b1b98b6a95",
"appid" : "11",
"setting" : {
"urlCheck" : false,
"minified" : false,
"urlCheck" : true,
"minified" : true,
"postcss" : true,
"es6" : true
},
@ -98,10 +101,23 @@
"sdkConfigs" : {
"maps" : {
"qqmap" : {
"key" : "NO7BZ-APDKP-UCBD7-VT7CX-R5UZK-JBF2W"
"key" : "map key"
}
}
},
"optimization" : {
"treeShaking" : {
"enable" : true
}
},
"async" : {
"timeout" : 200000
},
"title" : "CRMEB"
},
"plus" : {
"statusbar" : {
"immersed" : true
}
}
}

View File

@ -4,10 +4,10 @@
"path": "pages/index/index",
"style": {
"navigationBarTitleText": "首页",
"navigationStyle": "custom",
"app-plus": {
"scrollIndicator": false //
}
"navigationStyle": "custom"
// "app-plus": {
// "scrollIndicator": false //
// }
}
},
{
@ -22,7 +22,8 @@
"navigationBarTitleText": "个人中心",
"navigationBarBackgroundColor": "#e93323"
// #ifdef MP
,"navigationBarTextStyle": "#fff"
,
"navigationBarTextStyle": "#fff"
// #endif
}
},
@ -30,9 +31,6 @@
"path": "pages/goods_details/index",
"style": {
"navigationStyle": "custom"
// #ifdef MP
,"navigationBarTextStyle": "#fff"
// #endif
}
},
{
@ -105,24 +103,33 @@
"navigationBarTitleText": "订单详情",
"navigationBarBackgroundColor": "#e93323"
// #ifdef MP
,"navigationBarTextStyle": "#fff"
,
"navigationBarTextStyle": "#fff"
// #endif
}
}
,{
}, {
"path": "pages/index/components/a_seckill",
"style": {}
}
,{
}, {
"path": "pages/index/components/b_combination",
"style": {}
}
],
"subPackages": [
{
"subPackages": [{
"root": "pages/users",
"name": "users",
"pages": [
{
"path": "privacy/index",
"style": {
"navigationBarTitleText": "隐私协议"
}
},
{
"path": "web_page/index",
"style": {
}
},
{
"path": "retrievePassword/index",
"style": {
@ -189,7 +196,8 @@
"navigationBarTitleText": "我的推广",
"navigationBarBackgroundColor": "#e93323"
// #ifdef MP
,"navigationBarTextStyle": "#fff"
,
"navigationBarTextStyle": "#fff"
// #endif
}
},
@ -205,7 +213,8 @@
"navigationBarTitleText": "佣金记录",
"navigationBarBackgroundColor": "#e93323"
// #ifdef MP
,"navigationBarTextStyle": "#fff"
,
"navigationBarTextStyle": "#fff"
// #endif
}
},
@ -215,18 +224,15 @@
"navigationBarTitleText": "提现",
"navigationBarBackgroundColor": "#e93323"
// #ifdef MP
,"navigationBarTextStyle": "#fff"
,
"navigationBarTextStyle": "#fff"
// #endif
}
},
{
"path": "user_vip/index",
"style": {
"navigationBarTitleText": "会员中心",
"navigationBarBackgroundColor": "#232323"
// #ifdef MP
,"navigationBarTextStyle": "#fff"
// #endif
"navigationBarTitleText": "会员中心"
}
},
{
@ -244,10 +250,11 @@
{
"path": "user_phone/index",
"style": {
"navigationBarTitleText": "绑定手机",
"navigationBarTitleText": "修改手机号",
"navigationBarBackgroundColor": "#e93323"
// #ifdef MP
,"navigationBarTextStyle": "#fff"
,
"navigationBarTextStyle": "#fff"
// #endif
}
},
@ -263,7 +270,8 @@
"navigationBarTitleText": "修改密码",
"navigationBarBackgroundColor": "#e93323"
// #ifdef MP
,"navigationBarTextStyle": "#fff"
,
"navigationBarTextStyle": "#fff"
// #endif
}
},
@ -285,7 +293,8 @@
"navigationBarTitleText": "推广人列表",
"navigationBarBackgroundColor": "#e93323"
// #ifdef MP
,"navigationBarTextStyle": "#fff"
,
"navigationBarTextStyle": "#fff"
// #endif
}
},
@ -295,7 +304,8 @@
"navigationBarTitleText": "推广人订单",
"navigationBarBackgroundColor": "#e93323"
// #ifdef MP
,"navigationBarTextStyle": "#fff"
,
"navigationBarTextStyle": "#fff"
// #endif
}
},
@ -305,7 +315,8 @@
"navigationBarTitleText": "推广人排行",
"navigationBarBackgroundColor": "#e93323"
// #ifdef MP
,"navigationBarTextStyle": "#fff"
,
"navigationBarTextStyle": "#fff"
// #endif
}
},
@ -315,7 +326,8 @@
"navigationBarTitleText": "佣金排行",
"navigationBarBackgroundColor": "#e93323"
// #ifdef MP
,"navigationBarTextStyle": "#fff"
,
"navigationBarTextStyle": "#fff"
// #endif
}
},
@ -367,6 +379,13 @@
"navigationBarTitleText": "账户登录",
"navigationStyle": "custom"
}
},
{
"path": "app_login/index",
"style": {
"navigationBarTitleText": "绑定手机号",
"navigationStyle": "custom"
}
}
]
},
@ -376,27 +395,33 @@
"pages": [{
"path": "goods_bargain/index",
"style": {
"navigationStyle": "custom"
"navigationBarTitleText": "砍价列表"
// #ifdef MP
,"navigationBarTextStyle": "#fff"
,
"navigationBarTextStyle": "black",
"navigationBarBackgroundColor": "#fff"
// #endif
}
},
{
"path": "goods_bargain_details/index",
"style": {
"navigationStyle": "custom"
"navigationBarTitleText": "砍价详情"
// #ifdef MP
,"navigationBarTextStyle": "#fff"
,
"navigationBarTextStyle": "black",
"navigationBarBackgroundColor": "#fff"
// #endif
}
},
{
"path": "goods_combination/index",
"style": {
"navigationStyle": "custom"
// #ifdef MP
,"navigationBarTextStyle": "#fff"
"navigationBarTitleText": "拼团列表"
// #ifdef MP || APP-PLUS
,
"navigationBarTextStyle": "#fff",
"navigationBarBackgroundColor": "#e93323"
// #endif
}
},
@ -404,9 +429,6 @@
"path": "goods_combination_details/index",
"style": {
"navigationStyle": "custom"
// #ifdef MP
,"navigationBarTextStyle": "#fff"
// #endif
}
},
{
@ -420,8 +442,9 @@
"style": {
"navigationBarTitleText": "限时秒杀"
// #ifdef MP
,"navigationBarTextStyle": "#fff"
,"navigationBarBackgroundColor":"#e93323"
,
"navigationBarTextStyle": "#fff",
"navigationBarBackgroundColor": "#e93323"
// #endif
}
},
@ -430,7 +453,8 @@
"style": {
"navigationBarTitleText": "秒杀详情"
// #ifdef MP
,"navigationStyle": "custom"
,
"navigationStyle": "custom"
// #endif
}
},
@ -439,8 +463,9 @@
"style": {
"navigationBarTitleText": "砍价海报"
// #ifdef MP
,"navigationBarTextStyle": "#fff"
,"navigationBarBackgroundColor":"#e93323"
,
"navigationBarTextStyle": "#fff",
"navigationBarBackgroundColor": "#e93323"
// #endif
}
},
@ -452,59 +477,15 @@
}
]
},
{
"root": "pages/admin",
"name": "adminOrder",
"pages":[
{
"path": "order/index",
"style": {
"navigationBarTitleText": "订单首页"
}
},
{
"path": "orderList/index",
"style": {
"navigationBarTitleText": "订单列表"
}
},
{
"path": "orderDetail/index",
"style": {
"navigationBarTitleText": "订单详情"
}
},
{
"path": "delivery/index",
"style": {
"navigationBarTitleText": "订单发货"
}
},
{
"path": "statistics/index",
"style": {
"navigationBarTitleText": "订单数据统计"
}
},
{
"path": "order_cancellation/index",
"style": {
"navigationBarTitleText": "订单核销"
}
}
]
},
{
"root": "pages/columnGoods",
"name": "columnGoods",
"pages":[
{
"pages": [{
"path": "HotNewGoods/index",
"style": {
"navigationBarTitleText": "精品推荐"
}
}
]
}]
}
],
"globalStyle": {
@ -522,8 +503,7 @@
"selectedColor": "#fc4141",
"borderStyle": "white",
"backgroundColor": "#ffffff",
"list": [
{
"list": [{
"pagePath": "pages/index/index",
"iconPath": "static/images/1-001.png",
"selectedIconPath": "static/images/1-002.png",
@ -551,12 +531,10 @@
},
"condition": { //
"current": 0, //(list )
"list": [
{
"list": [{
"name": "", //
"path": "", //
"query": "" //onLoad
}
]
}]
}
}

View File

@ -1,20 +1,21 @@
<template>
<view>
<block v-if="bargain.length>0">
<div class="bargain-record" ref="container">
<div class="item" v-for="(item, index) in bargain" :key="index">
<div class="bargain-record pad30" ref="container">
<div class="item borRadius14" v-for="(item, index) in bargain" :key="index">
<div class="picTxt acea-row row-between-wrapper">
<div class="pictrue">
<image :src="item.image" />
</div>
<div class="text acea-row row-column-around">
<div class="line1" style="width: 100%;">{{ item.title }}</div>
<count-down :justify-left="'justify-content:left'" :is-day="true" :tip-text="' '" :day-text="' '" :hour-text="' '" :minute-text="' '"
:second-text="' 秒'" :datatime="item.datatime" v-if="item.status === 1"></count-down>
<count-down :justify-left="'justify-content:left'" :bgColor="bgColor" :is-day="true" :tip-text="' '" :day-text="'天'"
:hour-text="' 时 '" :minute-text="' 分 '"
:second-text="' 秒 '" :datatime="item.stopTime/1000" v-if="item.status === 1"></count-down>
<div class="successTxt font-color-red" v-else-if="item.status === 3">砍价成功</div>
<div class="endTxt" v-else></div>
<div class="money font-color-red">
已砍至<span class="symbol"></span><span class="num">{{ item.residue_price }}</span>
<div class="money">
已砍至<span class="symbol font-color-red"></span><span class="num font-color-red">{{ item.surplusPrice }}</span>
</div>
</div>
</div>
@ -23,13 +24,16 @@
<div class="success" v-else-if="item.status === 3">砍价成功</div>
<div class="end" v-else></div>
<div class="acea-row row-middle row-right">
<div class="bnt cancel" v-if="item.status === 1" @click="getBargainUserCancel(item.bargain_id)">
取消活动
<div class="bnt bg-color-red" v-if="item.status === 3 && !item.isOrder" @click="goConfirm(item)">
去付款
</div>
<div class="bnt bg-color-red" v-if="item.status === 1" @click="goDetail(item.bargain_id)">
<div class="bnt bg-color-red" v-if="item.status === 3 && !item.isDel && item.isOrder && !item.isPay" @click="goPay(item.surplusPrice,item.orderNo)">
立即付款
</div>
<div class="bnt bg-color-red" v-if="item.status === 1" @click="goDetail(item.id)">
继续砍价
</div>
<!-- <div class="bnt bg-color-red" v-else @click="goList"></div> -->
<div class="bnt bg-color-red" v-if="item.status === 2" @click="goList"></div>
</div>
</div>
</div>
@ -40,6 +44,7 @@
<emptyPage title="暂无砍价记录~"></emptyPage>
</block>
<home></home>
<payment :payMode='payMode' :pay_close="pay_close" @onChangeFun='onChangeFun' :order_id="pay_order_id" :totalPrice='totalPrice'></payment>
</view>
</template>
<script>
@ -49,44 +54,127 @@
getBargainUserList,
getBargainUserCancel
} from "@/api/activity";
import {
getUserInfo
} from '@/api/user.js';
import Loading from "@/components/Loading";
import home from '@/components/home';
import payment from '@/components/payment';
import {
mapGetters
} from "vuex";
export default {
name: "BargainRecord",
components: {
CountDown,
Loading,
emptyPage,
home
home,
payment
},
props: {},
computed: mapGetters(['isLogin', 'userInfo', 'uid']),
data: function() {
return {
bgColor:{
'bgColor': '',
'Color': '#E93323',
'width': '40rpx',
'timeTxtwidth': '28rpx',
'isDay': false
},
bargain: [],
status: false, // false true
loadingList: false, // false true
page: 1, //
limit: 20, //
userInfo: {}
payMode: [{
name: "微信支付",
icon: "icon-weixinzhifu",
value: 'weixin',
title: '微信快捷支付'
},
{
name: "余额支付",
icon: "icon-yuezhifu",
value: 'yue',
title: '可用余额:',
number: 0
}
],
pay_close: false,
pay_order_id: '',
totalPrice: '0'
};
},
onLoad: function() {
this.getBargainUserList();
this.getUserInfo();
// this.$scroll(this.$refs.container, () => {
// !this.loadingList && this.getBargainUserList();
// });
},
onShow() {
if (this.isLogin) {
this.payMode[1].number = this.userInfo.nowMoney;
this.$set(this, 'payMode', this.payMode);
} else {
toLogin();
}
},
methods: {
goDetail: function(id) {
// this.$router.push({
// path: "/activity/dargain_detail/" + id +'&bargain='+ userInfo.uid
// });
/**
* 打开支付组件
*
*/
goPay(pay_price, order_id) {
this.$set(this, 'pay_close', true);
this.$set(this, 'pay_order_id', order_id);
this.$set(this, 'totalPrice', pay_price);
},
/**
* 事件回调
*
*/
onChangeFun: function(e) {
let opt = e;
let action = opt.action || null;
let value = opt.value != undefined ? opt.value : null;
(action && this[action]) && this[action](value);
},
/**
* 关闭支付组件
*
*/
payClose: function() {
this.pay_close = false;
},
/**
* 支付成功回调
*
*/
pay_complete: function() {
this.status = false;
this.page = 1;
this.$set(this, 'bargain', []);
this.$set(this, 'pay_close', false);
this.getBargainUserList();
},
/**
* 支付失败回调
*
*/
pay_fail: function() {
this.pay_close = false;
},
goConfirm: function(item) { //
if (this.isLogin === false) {
toLogin();
} else {
uni.navigateTo({
url: `/pages/activity/goods_bargain_details/index?id=${id}&bargain=${this.userInfo.uid}`
url: `/pages/activity/goods_bargain_details/index?id=${item.id}&startBargainUid=${this.uid}&storeBargainId=${item.bargainUserId}`
})
}
},
goDetail: function(id) {
uni.navigateTo({
url: `/pages/activity/goods_bargain_details/index?id=${id}&startBargainUid=${this.uid}`
})
},
//
@ -104,8 +192,8 @@
limit: that.limit
})
.then(res => {
that.status = res.data.length < that.limit;
that.bargain.push.apply(that.bargain, res.data);
that.status = res.data.list.length < that.limit;
that.bargain.push.apply(that.bargain, res.data.list);
that.page++;
that.loadingList = false;
})
@ -133,16 +221,7 @@
title: res
})
});
},
/**
* 获取个人用户信息
*/
getUserInfo: function() {
let that = this;
getUserInfo().then(res => {
that.userInfo = res.data;
});
},
}
},
onReachBottom() {
this.getBargainUserList();
@ -150,25 +229,29 @@
};
</script>
<style lang="scss">
<style lang="scss" scoped>
/*砍价记录*/
.bargain-record .item .picTxt .text .time .styleAll {
.bargain-record .item .picTxt .text .time {
height: 36rpx;
line-height: 36rpx;
.styleAll {
color: #fc4141;
font-size:24rpx;
}
}
.bargain-record .item .picTxt .text .time .red {
color: #999;
font-size:24rpx;
}
.bargain-record .item {
background-color: #fff;
margin-bottom: 12upx;
margin-top: 15rpx;
padding: 30rpx 24rpx 0 24rpx;
}
.bargain-record .item .picTxt {
height: 210upx;
border-bottom: 1px solid #f0f0f0;
padding: 0 30upx;
padding-bottom: 30rpx;
}
.bargain-record .item .picTxt .pictrue {
@ -183,10 +266,10 @@
}
.bargain-record .item .picTxt .text {
width: 515upx;
width: 470rpx;
font-size: 30upx;
color: #282828;
height: 150upx;
color: #333333;
height: 160rpx;
}
.bargain-record .item .picTxt .text .time {
@ -205,6 +288,7 @@
}
.bargain-record .item .picTxt .text .money {
font-size: 24upx;
color: #999999;
}
.bargain-record .item .picTxt .text .money .num {
@ -218,7 +302,6 @@
.bargain-record .item .bottom {
height: 100upx;
padding: 0 30upx;
font-size: 27upx;
}
@ -231,7 +314,7 @@
}
.bargain-record .item .bottom .success {
color: #e93323;
color: $theme-color;
}
.bargain-record .item .bottom .bnt {

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -5,52 +5,53 @@
<view class='navbarH' :style='"height:"+navH+"rpx;"'>
<view class='navbarCon acea-row row-center-wrapper'>
<view class="header acea-row row-center-wrapper">
<view class="item" :class="navActive === index ? 'on' : ''" v-for="(item,index) in navList" :key='index' @tap="tap(item,index)">
<view class="item" :class="navActive === index ? 'on' : ''" v-for="(item,index) in navList"
:key='index' @tap="tap(item,index)">
{{ item }}
</view>
</view>
</view>
</view>
</view>
<!-- #ifndef APP-PLUS -->
<view id="home" class="home-nav acea-row row-center-wrapper iconfont icon-xiangzuo" :class="opacity>0.5?'on':''"
:style="{ top: homeTop + 'rpx' }" v-if="returnShow" @tap="returns">
</view>
<!-- #endif -->
<!-- <view class='iconfont icon-xiangzuo' :style="'top:'+navH/2+'rpx'" @tap='returns'></view> -->
<!-- 详情 -->
<view class='product-con'>
<scroll-view :scroll-top="scrollTop" scroll-y='true' scroll-with-animation="true" :style="'height:'+height+'px;'"
@scroll="scroll">
<scroll-view :scroll-top="scrollTop" scroll-y='true' scroll-with-animation="true"
:style="'height:'+height+'px;'" @scroll="scroll">
<view id="past0">
<productConSwiper :imgUrls="imgUrls"></productConSwiper>
<view class='wrapper'>
<productConSwiper :imgUrls="imgUrls" class="mb30"></productConSwiper>
<view class="pad30">
<view class='wrapper mb30'>
<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.otPrice || 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>
<view class='introduce'>{{storeInfo.title}}</view>
<view class='introduce line2'>{{storeInfo.storeName}}</view>
<view class='label acea-row row-between-wrapper'>
<view class='stock'>类型{{storeInfo.people || 0}}人团</view>
<view>累计销量{{storeInfo.total?storeInfo.total:0}} {{storeInfo.unit_name || ''}}</view>
<view>限购: {{ storeInfo.quotaShow ? storeInfo.quotaShow : 0 }} {{storeInfo.unit_name || ''}}</view>
<view>累计销量{{parseFloat(storeInfo.sales) + parseFloat(storeInfo.ficti)}} {{storeInfo.unitName || ''}}</view>
<view>限购: {{ storeInfo.quotaShow ? storeInfo.quotaShow : 0 }}
{{storeInfo.unitName || ''}}
</view>
</view>
<view class='attribute acea-row row-between-wrapper' @tap='selecAttr' v-if='attribute.productAttr.length'>
<view>{{attr}}<text class='atterTxt'>{{attrValue}}</text></view>
</view>
<view class='attribute acea-row row-between-wrapper mb30 borRadius14' @tap='selecAttr'
v-if='attribute.productAttr.length'>
<view class="line1">{{attr}}<text class='atterTxt'>{{attrValue}}</text></view>
<view class='iconfont icon-jiantou'></view>
</view>
<view class='notice acea-row row-middle'>
<view class='notice acea-row row-middle mb30 borRadius14' v-if="parseFloat(pinkOkSum) >0">
<view class='num font-color'>
<text class='iconfont icon-laba'></text>
已拼{{pinkOkSum}}<text class='line'>|</text>
</view>
<view class='swiper'>
<swiper :indicator-dots="indicatorDots" :autoplay="autoplay" interval="2500" duration="500" vertical="true"
circular="true">
<swiper :indicator-dots="indicatorDots" :autoplay="autoplay" interval="2500"
duration="500" vertical="true" circular="true">
<block v-for="(item,index) in itemNew" :key='index'>
<swiper-item>
<view class='line1'>{{item.nickname}}拼团成功</view>
@ -59,8 +60,9 @@
</swiper>
</view>
</view>
<view class='assemble'>
<view class='item acea-row row-between-wrapper' v-for='(item,index) in pink' :key='index' v-if="index < AllIndex">
<view v-if='attribute.productSelect.quota > 0' class='assemble mb30 borRadius14'>
<view class='item acea-row row-between-wrapper' v-for='(item,index) in pink' :key='index'
v-if="index < AllIndex">
<view class='pictxt acea-row row-between-wrapper'>
<view class='pictrue'>
<image :src='item.avatar'></image>
@ -70,29 +72,35 @@
<view class='right acea-row row-middle'>
<view>
<view class='lack'>还差<text class='font-color'>{{item.count}}</text>人成团</view>
<view class='time'>
<count-down :is-day="false" :tip-text="' '" :day-text="' '" :hour-text="':'" :minute-text="':'" :second-text="' '"
:datatime="item.stopTime/1000"></count-down>
<view class='time acea-row'>
<count-down :is-day="false" :tip-text="' '" :day-text="' '" :hour-text="':'"
:minute-text="':'" :second-text="' '" :datatime="item.stopTime/1000" :bgColor="bgColor">
</count-down>
</view>
</view>
<navigator hover-class='none' :url="'/pages/activity/goods_combination_status/index?id='+item.id" class='spellBnt'>
<navigator hover-class='none'
:url="'/pages/activity/goods_combination_status/index?id='+item.id"
class='spellBnt'>
去拼单
<text class='iconfont icon-jiantou'></text>
</navigator>
</view>
</view>
<template v-if="pink.length">
<view class='more' @tap='showAll' v-if="pink.length > AllIndex"><text class='iconfont icon-xiangxia'></text></view>
<view class='more' @tap='hideAll' v-else-if="pink.length === AllIndex && pink.length !== AllIndexDefault">收起<text class='iconfont icon-xiangshang'></text></view>
<view class='more' @tap='showAll' v-if="pink.length > AllIndex"><text
class='iconfont icon-xiangxia'></text></view>
<view class='more' @tap='hideAll'
v-else-if="pink.length === AllIndex && pink.length !== AllIndexDefault">收起<text
class='iconfont icon-xiangshang'></text></view>
</template>
</view>
<view class='playWay'>
<view class='title acea-row row-between-wrapper'>
<view class='playWay mb30 borRadius14'>
<view class='title acea-row row-between row-middle'>
<view>拼团玩法</view>
<!-- <navigator hover-class='none' class='font-color' url='/pages/activity/goods_combination_rule/index'>查看规则<text class="iconfont icon-jiantou"></text></navigator> -->
</view>
<view class='way acea-row row-middle'>
<view class='item'>
<view class='item acea-row row-middle'>
<text class='num'></text>
开团/参团
</view>
@ -111,20 +119,27 @@
</view>
</view>
</view>
</view>
<view class='userEvaluation' id="past1">
<view class='title acea-row row-between-wrapper'>
<view>用户评价({{replyCount}})</view>
<navigator class='praise' hover-class='none' :url='"/pages/users/goods_comment_list/index?productId="+storeInfo.productId'>
<text class='font-color'>{{replyChance || 0}}%</text>
好评率
<view class='userEvaluation borRadius14' id="past1">
<view class='title acea-row row-between-wrapper' :style="replyCount==0?'border-bottom-left-radius:14rpx;border-bottom-right-radius:14rpx;':''">
<view>用户评价<i>({{replyCount}})</i></view>
<navigator class='praise' hover-class='none'
:url='"/pages/users/goods_comment_list/index?productId="+storeInfo.productId'>
<i>好评</i><text class='font-color'>{{replyChance || 0}}%</text>
<text class='iconfont icon-jiantou'></text>
</navigator>
</view>
<userEvaluation :reply="reply"></userEvaluation>
<userEvaluation :reply="reply" v-if="reply.length>0"></userEvaluation>
</view>
</view>
</view>
<view class='product-intro' id="past2">
<view class='title'>产品介绍</view>
<view class='title'>
<image src="../../../static/images/xzuo.png"></image>
<span class="sp">产品详情</span>
<image src="../../../static/images/xyou.png"></image>
</view>
<view class='conter'>
<jyf-parser :html="storeInfo.content" ref="article" :tag-style="tagStyle"></jyf-parser>
</view>
@ -145,22 +160,28 @@
</navigator>
<!-- #endif -->
<view @tap='setCollect' class='item'>
<view class='iconfont icon-shoucang1' v-if="storeInfo.userCollect"></view>
<view class='iconfont icon-shoucang1' v-if="userCollect"></view>
<view class='iconfont icon-shoucang' v-else></view>
<view>收藏</view>
</view>
<view class="bnt acea-row">
<view class="joinCart bnts" @tap="goProduct"></view>
<view class="buy bnts" @tap="goCat" v-if='attribute.productSelect.stock>0&&attribute.productSelect.quota>0'>
<view class="buy bnts" @tap="goCat"
v-if='attribute.productSelect.quota>0'>
立即开团
</view>
<view class="buy bnts bg-color-hui" v-if='attribute.productSelect.quota <= 0 || attribute.productSelect.stock <= 0'>
<view class="buy bnts bg-color-hui" v-if="!dataShow">
立即开团
</view>
<view class="buy bnts bg-color-hui"
v-if='attribute.productSelect.quota <= 0'>
已售罄
</view>
</view>
</view>
</view>
<shareRedPackets :sharePacket="sharePacket" @listenerActionSheet="listenerActionSheet" @closeChange="closeChange"></shareRedPackets>
<shareRedPackets :sharePacket="sharePacket" @listenerActionSheet="listenerActionSheet"
@closeChange="closeChange"></shareRedPackets>
<!-- 分享按钮 -->
<view class="generate-posters acea-row row-middle" :class="posters ? 'on' : ''">
<!-- #ifndef MP -->
@ -175,16 +196,6 @@
<view class="">发送给朋友</view>
</button>
<!-- #endif -->
<!-- #ifdef APP-PLUS -->
<view class="item" @click="appShare('WXSceneSession')">
<view class="iconfont icon-weixin3"></view>
<view class="">微信好友</view>
</view>
<view class="item" @click="appShare('WXSenceTimeline')">
<view class="iconfont icon-pengyouquan"></view>
<view class="">微信朋友圈</view>
</view>
<!-- #endif -->
<button class="item" hover-class='none' @tap="goPoster">
<view class="iconfont icon-haibao"></view>
<view class="">生成海报</view>
@ -214,11 +225,11 @@
<image src="/static/images/share-info.png" @click="H5ShareBox = false"></image>
</view>
<!-- #ifdef MP -->
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize>
<!-- <authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize> -->
<!-- #endif -->
<home></home>
<product-window :attr='attribute' :limitNum='1' @myevent="onMyEvent" @ChangeAttr="ChangeAttr" @ChangeCartNum="ChangeCartNum"
@iptCartNum="iptCartNum" @attrVal="attrVal"></product-window>
<product-window :attr='attribute' :limitNum='1' @myevent="onMyEvent" @ChangeAttr="ChangeAttr"
@ChangeCartNum="ChangeCartNum" @iptCartNum="iptCartNum" @attrVal="attrVal"></product-window>
</view>
</template>
@ -228,8 +239,11 @@
import {
mapGetters
} from "vuex";
import { silenceBindingSpread } from "@/utils";
// #ifdef MP
import { base64src } from '@/utils/base64src.js'
import {
base64src
} from '@/utils/base64src.js'
import authorize from '@/components/Authorize';
import {
getQrcode
@ -247,7 +261,8 @@
collectAdd,
collectDel,
getReplyList,
getReplyConfig
getReplyConfig,
getReplyProduct
} from '@/api/store.js';
import {
imageBase64
@ -282,6 +297,13 @@
}),
data() {
return {
bgColor:{
'bgColor': '',
'Color': '#999999',
'isDay': true
},
userCollect:false,
dataShow: 0,
navH: '',
id: 0,
userInfo: {},
@ -350,14 +372,14 @@
H5ShareBox: false, //
onceNum: 0, //
errT: '',
returnShow: true
returnShow: true,
homeTop: 20
}
},
watch: {
isLogin: {
handler: function(newV, oldV) {
if (newV) {
this.downloadFilePromotionCode();
this.combinationDetail();
}
},
@ -366,8 +388,9 @@
},
onLoad(options) {
let that = this
this.$store.commit("PRODUCT_TYPE", 'normal');
var pages = getCurrentPages();
that.returnShow = pages.length === 1 ? false : true;
// that.returnShow = pages.length === 1 ? false : true;
this.$nextTick(() => {
// #ifdef MP
const menuButton = uni.getMenuButtonBoundingClientRect();
@ -393,42 +416,21 @@
//res.windowHeight:px*2rpx98
},
});
//
// #ifdef MP
if (options.scene) {
let value = this.$util.getUrlParams(decodeURIComponent(options.scene));
if (value.id) options.id = value.id;
//广uid
if (value.pid) app.globalData.spid = value.pid;
}
if (!options.id && !options.scene) return this.$util.Tips({
title: '缺少参数无法查看商品'
}, {
tab: 3,
url: 1
});
//广uid
if (options.spid) app.globalData.spid = options.spid;
// #endif
if (options.hasOwnProperty('id')) {
this.id = options.id
if (options.hasOwnProperty('id') || options.scene) {
options.scene ? this.id = app.globalData.id : this.id = options.id;
// app.globalData.openPages = '/pages/activity/goods_combination_details/index?id=' + this.id + '&spid=' + this.userInfo.uid;
if (this.isLogin) {
this.combinationDetail();
} else {
// #ifdef H5 || APP-PLUS
// #ifdef H5
try {
uni.setStorageSync('comGoodsId', options.id);
} catch (e) {}
// #endif
// #ifdef H5 || APP-PLUS
this.$Cache.set('login_back_url',
`/pages/activity/goods_combination_details/index?id=${options.id}&spid=${options.spid?options.spid:0}`
);
toLogin();
// #endif
// #ifdef MP
this.isAuto = true;
this.$set(this, 'isShowAuth', true);
// #endif
}
} else {
try {
@ -446,42 +448,9 @@
})
}
};
this.isLogin && silenceBindingSpread();
},
methods: {
// app
// #ifdef APP-PLUS
appShare(scene) {
let that = this
console.log(HTTP_REQUEST_URL)
let routes = getCurrentPages(); //
let curRoute = routes[routes.length - 1].$page.fullPath //
uni.share({
provider: "weixin",
scene: scene,
type: 0,
href: `${HTTP_REQUEST_URL}${curRoute}`,
title: that.storeInfo.title,
summary: that.storeInfo.info,
imageUrl: that.storeInfo.image,
success: function(res) {
uni.showToast({
title: '分享成功',
icon: 'success'
})
that.posters = false;
},
fail: function(err) {
uni.showToast({
title: '分享失败',
icon: 'none',
duration: 2000
})
that.posters = false;
}
});
},
// #endif
getProductReplyCount: function() {
let that = this;
getReplyConfig(that.storeInfo.productId).then(res => {
@ -490,12 +459,8 @@
});
},
getProductReplyList: function() {
getReplyList(this.storeInfo.productId, {
page: 1,
limit: 3,
type: 0,
}).then(res => {
this.reply = res.data.list;
getReplyProduct(this.storeInfo.productId).then(res => {
this.reply = res.data.productReply ? [res.data.productReply] : [];
})
},
kefuClick() {
@ -543,42 +508,40 @@
var that = this;
var data = that.id;
getCombinationDetail(data).then(function(res) {
that.dataShow = 1;
uni.setNavigationBarTitle({
title: res.data.storeInfo.title.substring(0, 16)
title: res.data.storeCombination.storeName.substring(0, 16)
})
that.storeInfo = res.data.storeInfo;
that.storeInfo = res.data.storeCombination;
that.getProductReplyList();
that.getProductReplyCount();
that.imgUrls = JSON.parse(res.data.storeInfo.images);
that.attribute.productSelect.num = res.data.storeInfo.onceNum;
that.pink = res.data.pink || [];
that.pindAll = res.data.pindAll || [];
that.imgUrls = JSON.parse(res.data.storeCombination.sliderImage);
that.attribute.productSelect.num = res.data.storeCombination.onceNum;
that.userCollect = res.data.userCollect;
that.pink = res.data.pinkList || [];
// that.pindAll = res.data.pindAll || [];
that.itemNew = res.data.pinkOkList || [];
that.pinkOkSum = res.data.pinkOkSum;
that.attribute.productAttr = res.data.productAttr || [];
that.productValue = res.data.productValue;
that.onceNum = res.data.storeInfo.onceNum;
that.onceNum = res.data.storeCombination.onceNum;
that.DefaultSelect();
// that.PromotionCode = res.data.storeInfo.code_base
// #ifdef H5
that.setShare();
that.storeImage = that.storeInfo.image
that.make();
that.getImageBase64(that.storeImage);
// #endif
// #ifdef APP-PLUS
that.downloadFilestoreImage();
that.downloadFileAppCode();
// #endif
// #ifdef MP
that.getQrcode();
that.imgTop = res.data.storeInfo.image;
that.imgTop = res.data.storeCombination.image;
// #endif
// #ifndef H5
that.downloadFilestoreImage();
// #endif
// that.setProductSelect();
that.DefaultSelect();
setTimeout(function() {
that.infoScroll();
}, 500);
@ -600,8 +563,8 @@
"onMenuShareAppMessage",
"onMenuShareTimeline"
], {
desc: this.storeInfo.info,
title: this.storeInfo.title,
desc: this.storeInfo.storeInfo,
title: this.storeInfo.storeName,
link: location.href,
imgUrl: this.storeInfo.image
}).then(res => {
@ -635,12 +598,11 @@
self.$set(
self.attribute.productSelect,
"storeName",
self.storeInfo.title
self.storeInfo.storeName
);
self.$set(self.attribute.productSelect, "image", productSelect.image);
self.$set(self.attribute.productSelect, "price", productSelect.price);
self.$set(self.attribute.productSelect, "stock", productSelect.stock);
self.$set(self.attribute.productSelect, "unique", productSelect.unique);
self.$set(self.attribute.productSelect, "unique", productSelect.id);
self.$set(self.attribute.productSelect, "quota", productSelect.quota);
self.$set(self.attribute.productSelect, "quotaShow", productSelect.quotaShow);
self.$set(self.attribute.productSelect, "cart_num", 1);
@ -650,13 +612,12 @@
self.$set(
self.attribute.productSelect,
"storeName",
self.storeInfo.title
self.storeInfo.storeName
);
self.$set(self.attribute.productSelect, "image", self.storeInfo.image);
self.$set(self.attribute.productSelect, "price", self.storeInfo.price);
self.$set(self.attribute.productSelect, "quota", 0);
self.$set(self.attribute.productSelect, "quotaShow", 0);
self.$set(self.attribute.productSelect, "stock", 0);
self.$set(self.attribute.productSelect, "unique", "");
self.$set(self.attribute.productSelect, "cart_num", 0);
self.$set(self, "attrValue", "");
@ -665,17 +626,14 @@
self.$set(
self.attribute.productSelect,
"storeName",
self.storeInfo.title
self.storeInfo.storeName
);
self.$set(self.attribute.productSelect, "image", self.storeInfo.image);
self.$set(self.attribute.productSelect, "price", self.storeInfo.price);
self.$set(self.attribute.productSelect, "stock", self.storeInfo.stock);
self.$set(self.attribute.productSelect, "quota", 0);
self.$set(self.attribute.productSelect, "stock", 0);
self.$set(
self.attribute.productSelect,
"unique",
self.storeInfo.unique || ""
"unique", ""
);
self.$set(self.attribute.productSelect, "cart_num", 1);
self.$set(self, "attrValue", "");
@ -708,7 +666,8 @@
//
onLoadFun: function(e) {
this.userInfo = e
app.globalData.openPages = '/pages/activity/goods_combination_details/index?id=' + this.id + '&spid=' + e.uid;
app.globalData.openPages = '/pages/activity/goods_combination_details/index?id=' + this.id + '&spid=' +
e.uid;
this.combinationDetail();
//this.downloadFilePromotionCode();
},
@ -728,17 +687,19 @@
//
let productSelect = this.productValue[this.attrValue];
if (this.buyNum === productSelect.quota) {
return this.$util.Tips({title: '您已超出当前商品每人限购数量,请浏览其他商品'});
return this.$util.Tips({
title: '您已超出当前商品每人限购数量,请浏览其他商品'
});
}
if (this.cart_num) {
productSelect.cart_num = this.cart_num;
this.attribute.productSelect.cart_num = this.cart_num;
}
//,
if (productSelect === undefined && !this.attribute.productAttr.length) productSelect = this.attribute.productSelect;
if (productSelect === undefined && !this.attribute.productAttr.length) productSelect = this.attribute
.productSelect;
//0
if (productSelect === undefined) return;
let stock = productSelect.stock || 0;
let quotaShow = productSelect.quota_show || 0;
let quota = productSelect.quota || 0;
let num = this.attribute.productSelect;
@ -755,7 +716,7 @@
let arrMin = [];
arrMin.push(nums);
arrMin.push(quota);
arrMin.push(stock);
// arrMin.push(stock);
let minN = Math.min.apply(null, arrMin);
if (num.cart_num >= minN) {
this.$set(this.attribute.productSelect, "cart_num", minN ? minN : 1);
@ -774,7 +735,8 @@
}
},
attrVal(val) {
this.attribute.productAttr[val.indexw].index = this.attribute.productAttr[val.indexw].attrValues[val.indexn];
this.attribute.productAttr[val.indexw].index = this.attribute.productAttr[val.indexw].attrValues[val
.indexn];
},
/**
* 属性变动赋值
@ -786,8 +748,7 @@
if (productSelect) {
this.$set(this.attribute.productSelect, "image", productSelect.image);
this.$set(this.attribute.productSelect, "price", productSelect.price);
this.$set(this.attribute.productSelect, "stock", productSelect.stock);
this.$set(this.attribute.productSelect, "unique", productSelect.unique);
this.$set(this.attribute.productSelect, "unique", productSelect.id);
this.$set(this.attribute.productSelect, "cart_num", 1);
this.$set(this.attribute.productSelect, "quota", productSelect.quota);
this.$set(this.attribute.productSelect, "quotaShow", productSelect.quotaShow);
@ -797,7 +758,6 @@
} else {
this.$set(this.attribute.productSelect, "image", this.storeInfo.image);
this.$set(this.attribute.productSelect, "price", this.storeInfo.price);
this.$set(this.attribute.productSelect, "stock", 0);
this.$set(this.attribute.productSelect, "unique", "");
this.$set(this.attribute.productSelect, "cart_num", 0);
this.$set(this.attribute.productSelect, "quota", 0);
@ -824,7 +784,8 @@
//
if (this.attribute.cartAttr === true && this.isOpen == false) return this.isOpen = true
//,,
if (this.attribute.productAttr.length && productSelect === undefined && this.isOpen == true) return that.$util.Tips({
if (this.attribute.productAttr.length && productSelect === undefined && this.isOpen == true) return that
.$util.Tips({
title: '请选择属性'
});
var data = {
@ -834,30 +795,25 @@
productAttrUnique: productSelect !== undefined ? productSelect.id : '',
isNew: true,
};
postCartAdd(data).then(function(res) {
that.isOpen = false
uni.navigateTo({
url: '/pages/users/order_confirm/index?new=true&cartId=' + res.data.cartId + '&combination=true'
});
}).catch(function(res) {
uni.showToast({
title: res,
icon: 'none'
})
})
this.$Order.getPreOrder("buyNow",[{
"attrValueId": parseFloat(this.attribute.productSelect.unique),
"combinationId": parseFloat(this.id),
"productNum": parseFloat(this.cart_num ? this.cart_num : this.attribute.productSelect.cart_num),
"productId": parseFloat(this.storeInfo.productId)
}]);
},
/**
* 收藏商品
*/
setCollect: function() {
var that = this;
if (this.storeInfo.userCollect) {
if (this.userCollect) {
collectDel(this.storeInfo.productId).then(res => {
that.storeInfo.userCollect = !that.storeInfo.userCollect
that.userCollect = !that.userCollect
})
} else {
collectAdd(this.storeInfo.productId).then(res => {
that.storeInfo.userCollect = !that.storeInfo.userCollect
that.userCollect = !that.userCollect
})
}
},
@ -871,6 +827,7 @@
toLogin();
} else {
// #ifdef H5
if(!this.imgTop) this.getImageBase64(this.storeImage);
if (this.$wechat.isWeixin() === true) {
this.weixinStatus = true;
}
@ -957,7 +914,9 @@
},
getImageBase64: function(images) {
let that = this;
imageBase64({url:images}).then(res=>{
imageBase64({
url: images
}).then(res => {
that.imgTop = res.data.code
})
},
@ -989,10 +948,12 @@
success: (res) => {
arrImagesUrlTop = res.tempFilePath;
let arrImages = [that.posterbackgd, arrImagesUrlTop, that.PromotionCode];
let storeName = that.storeInfo.title;
let storeName = that.storeInfo.storeName;
let price = that.storeInfo.price;
setTimeout(() => {
that.$util.PosterCanvas(arrImages, storeName, price, that.storeInfo.otPrice, function(tempFilePath) {
that.$util.PosterCanvas(arrImages, storeName, price, that.storeInfo
.otPrice,
function(tempFilePath) {
that.posterImage = tempFilePath;
that.canvasStatus = true;
uni.hideLoading();
@ -1019,22 +980,19 @@
},
//
make() {
let that = this;
let href = location.href;
let hrefs = href.indexOf("?") === -1 ? href + "?spread=" + uid : href + "&spread=" + that.uid;
let href = location.href.split('?')[0] + "?id="+ this.id + "&spread=" + this.uid;
uQRCode.make({
canvasId: 'qrcode',
text: hrefs,
size: that.qrcodeSize,
text: href,
size: this.qrcodeSize,
margin: 10,
success: res => {
that.PromotionCode = res;
this.PromotionCode = res;
},
complete: (res) => {
},
complete: (res) => {},
fail: res => {
that.$util.Tips({
this.$util.Tips({
title: '海报二维码生成失败!'
});
}
@ -1094,20 +1052,19 @@
let data = this.storeInfo;
let href = location.href;
if (this.$wechat.isWeixin()) {
getUserInfo().then(res => {
href =
href.indexOf("?") === -1 ?
href + "?spread=" + res.data.uid :
href + "&spread=" + res.data.uid;
href + "?spread=" + this.uid :
href + "&spread=" + this.uid;
let configAppMessage = {
desc: data.store_info,
title: data.store_name,
desc: data.storeInfo,
title: data.storeName,
link: href,
imgUrl: data.image
};
this.$wechat.wechatEvevt(["updateAppMessageShareData", "updateTimelineShareData"], configAppMessage)
});
this.$wechat.wechatEvevt(["updateAppMessageShareData", "updateTimelineShareData"],
configAppMessage)
}
},
scroll: function(e) {
@ -1145,7 +1102,7 @@
onShareAppMessage() {
let that = this;
return {
title: that.storeInfo.title,
title: that.storeInfo.storeName,
path: app.globalData.openPages,
imageUrl: that.storeInfo.image
};
@ -1156,6 +1113,16 @@
</script>
<style scoped lang="scss">
.userEvaluation{
i{
display: inline-block;
}
}
.attribute{
.line1{
width: 600rpx;
}
}
.share-box {
z-index: 1000;
position: fixed;
@ -1169,6 +1136,7 @@
height: 100%;
}
}
.generate-posters {
width: 100%;
height: 170rpx;
@ -1176,7 +1144,7 @@
position: fixed;
left: 0;
bottom: 0;
z-index: 99;
z-index: 1000;
transform: translate3d(0, 100%, 0);
transition: all 0.3s cubic-bezier(0.25, 0.5, 0.5, 0.9);
border-top: 1rpx solid #eee;
@ -1200,7 +1168,6 @@
.generate-posters .item .iconfont.icon-haibao {
color: #5391f1;
}
.navbar .header {
height: 96rpx;
font-size: 30rpx;
@ -1266,7 +1233,8 @@
}
.product-con .wrapper {
padding-bottom: 26rpx;
margin-top: 30rpx;
border-radius: 14rpx;
}
.product-con .wrapper .share .money .y-money {
@ -1280,8 +1248,7 @@
width: 100%;
height: 62rpx;
background-color: #ffedeb;
margin-top: 20rpx;
padding: 0 30rpx;
padding: 0 24rpx;
box-sizing: border-box;
}
@ -1296,7 +1263,7 @@
}
.product-con .notice .num .line {
color: #282828;
color: #333333;
margin-left: 15rpx;
}
@ -1313,7 +1280,7 @@
width: 100%;
overflow: hidden;
font-size: 24rpx;
color: #282828;
color: #333333;
}
.product-con .assemble {
@ -1321,18 +1288,15 @@
}
.product-con .assemble .item {
padding-right: 30rpx;
margin-left: 30rpx;
padding-right: 24rpx;
margin-left: 24rpx;
border-bottom: 1rpx solid #f0f0f0;
height: 132rpx;
}
.product-con .assemble .item .pictxt {
width: 295rpx;
height: 130rpx;
}
.product-con .assemble .item .pictxt .text {
width: 194rpx;
width: 172rpx;
margin-left: 16rpx;
}
.product-con .assemble .item .pictxt .pictrue {
@ -1367,10 +1331,10 @@
width: 140rpx;
height: 50rpx;
border-radius: 50rpx;
background-image: linear-gradient(to right, #ff2358 0%, #ff0000 100%);
background: linear-gradient(90deg, #FF5555 0%, #FF0000 100%);
text-align: center;
line-height: 50rpx;
margin-left: 30rpx;
margin-left: 16rpx;
}
.product-con .assemble .item .right .spellBnt .iconfont {
@ -1380,7 +1344,7 @@
.product-con .assemble .more {
font-size: 24rpx;
color: #282828;
color: #333333;
text-align: center;
height: 90rpx;
line-height: 90rpx;
@ -1393,39 +1357,42 @@
.product-con .playWay {
background-color: #fff;
padding: 0 30rpx;
padding: 0 24rpx;
margin-top: 20rpx;
font-size: 28rpx;
color: #282828;
color: #333333;
}
.product-con .playWay .title {
height: 86rpx;
border-bottom: 1rpx solid #eee;
font-size: 28rpx;
}
.product-con .playWay .title .iconfont {
margin-left: 13rpx;
font-size: 28rpx;
font-size: 26rpx;
color: #717171;
}
.product-con .playWay .way {
min-height: 110rpx;
height: 110rpx;
line-height: 110rpx;
font-size: 26rpx;
color: #282828;
color: #333333;
}
.product-con .playWay .way .iconfont {
color: #cdcdcd;
font-size: 40rpx;
font-size: 26rpx;
margin: 0 35rpx;
}
.product-con .playWay .way .item .num {
font-size: 35rpx;
vertical-align: 3rpx;
vertical-align: 4rpx;
margin-right: 6rpx;
display: inline-block;
}
.product-con .playWay .way .item .tip {
@ -1442,8 +1409,9 @@
box-sizing: border-box;
height: 100rpx;
background-color: #fff;
z-index: 99;
z-index: 999;
border-top: 1rpx solid #f0f0f0;
text-align: center;
}
.product-con .footer .item {
@ -1587,7 +1555,7 @@
font-size: 33rpx;
width: 56rpx;
height: 56rpx;
z-index: 99;
z-index: 999;
left: 33rpx;
background: rgba(190, 190, 190, 0.5);
border-radius: 50%;

View File

@ -6,8 +6,8 @@
<div class="line1" v-text="storeCombination.title"></div>
<div class="money">
<span class="num" v-text="storeCombination.price"></span>
<span class="team cart-color" v-text="storeCombination.people + '人拼'"></span>
<span class="num" v-text="storeCombination.price || 0"></span>
<span class="team cart-color">{{storeCombination.people +'人拼'}}</span>
</div>
</div>
<div v-if="pinkBool === -1" class="iconfont icon-pintuanshibai"></div>
@ -18,40 +18,47 @@
<div class="line"></div>
<div class="name acea-row row-center-wrapper">
剩余
<CountDown :is-day="false" :tip-text="' '" :day-text="' '" :hour-text="' : '" :minute-text="' : '" :second-text="' '" :datatime="pinkT.stopTime/1000"></CountDown>
结束
<CountDown :bgColor="bgColor" :is-day="false" :tip-text="' '" :day-text="' '" :hour-text="' : '"
:minute-text="' : '" :second-text="' '" :datatime="pinkT.stopTime/1000"></CountDown>
<span class="end">结束</span>
</div>
<div class="line"></div>
</div>
<div class="tips font-color-red" v-if="pinkBool === 1"></div>
<div class="tips" v-else-if="pinkBool === -1">还差{{ count }}拼团失败</div>
<div class="tips font-color-red" v-else-if="pinkBool === 0">拼团中还差{{ count }}人拼团成功</div>
<div class="list acea-row row-middle" :class="[pinkBool === 1 || pinkBool === -1 ? 'result' : '', iShidden ? 'on' : '']">
<div class="list acea-row row-middle"
:class="[pinkBool === 1 || pinkBool === -1 ? 'result' : '', iShidden ? 'on' : '']">
<div class="pinkT">
<div class="pictrue"><img :src="pinkT.avatar" /></div>
<div class="acea-row row-middle" v-if="pinkAll.length > 0">
<div class="chief">团长</div>
</div>
<block v-if="pinkAll.length > 0">
<div class="pictrue" v-for="(item, index) in pinkAll" :key="index"><img :src="item.avatar" /></div>
</block>
<div class="pictrue" v-for="index in count" :key="index"><img class="img-none"
src="/static/images/vacancy.png" /></div>
</div>
<div class="pictrue" v-for="index in count" :key="index"><img class="img-none" src="/static/images/vacancy.png" /></div>
</div>
<div v-if="(pinkBool === 1 || pinkBool === -1) && count > 9" class="lookAll acea-row row-center-wrapper" @click="lookAll">
<div v-if="(pinkBool === 1 || pinkBool === -1) && count > 9" class="lookAll acea-row row-center-wrapper"
@click="lookAll">
{{ iShidden ? '收起' : '查看全部' }}
<span class="iconfont" :class="iShidden ? 'icon-xiangshang' : 'icon-xiangxia'"></span>
</div>
<!-- #ifdef H5 -->
<!-- #ifndef MP -->
<div v-if="userBool === 1 && isOk == 0 && pinkBool === 0">
<div class="teamBnt bg-color-red" v-if="$wechat.isWeixin() && pinkT.stopTime>timestamp" @click="H5ShareBox = true"></div>
<div class="teamBnt bg-color-red" v-if='!$wechat.isWeixin() && pinkT.stopTime>timestamp' @click="goPoster">邀请好友参团</div>
<div class="teamBnt bg-color-red" v-if='pinkT.stopTime>timestamp' @click="goPoster">邀请好友参团</div>
</div>
<!-- <div class="teamBnt bg-color-red" v-if="userBool === 1 && isOk == 0 && pinkBool === 0" @click="goPoster">
邀请好友参团
</div> -->
<!-- #endif -->
<!-- #ifdef MP -->
<button open-type="share" class="teamBnt bg-color-red" v-if="userBool === 1 && isOk == 0 && pinkBool === 0 && pinkT.stopTime>timestamp"></button>
<button open-type="share" class="teamBnt bg-color-red"
v-if="userBool === 1 && isOk == 0 && pinkBool === 0 && pinkT.stopTime>timestamp">邀请好友参团</button>
<!-- #endif -->
<div class="teamBnt bg-color-hui" v-if="pinkT.stopTime<timestamp && isOk == 0 && pinkBool === 0"></div>
<div class="teamBnt bg-color-red" v-else-if="userBool === 0 && pinkBool === 0 && count > 0 && pinkT.stopTime>timestamp" @click="pay">我要参团</div>
<div class="teamBnt bg-color-red" v-if="pinkBool === 1 || pinkBool === -1" @click="goDetail(storeCombination.id)"></div>
<div class="teamBnt bg-color-red"
v-else-if="userBool === 0 && pinkBool === 0 && count > 0 && pinkT.stopTime>timestamp" @click="pay">我要参团
</div>
<div class="teamBnt bg-color-red" v-if="pinkBool === 1 || pinkBool === -1"
@click="goDetail(storeCombination.id)">再次开团</div>
<div class="cancel" @click="getCombinationRemove" v-if="pinkBool === 0 && userBool === 1">
<span class="iconfont icon-guanbi3"></span>
取消开团
@ -81,33 +88,57 @@
</div>
</div>
</div>
<product-window
:attr="attr"
:limitNum="1"
:iSbnt="1"
@myevent="onMyEvent"
@ChangeAttr="ChangeAttr"
@ChangeCartNum="ChangeCartNum"
@iptCartNum="iptCartNum"
@attrVal="attrVal"
@goCat="goPay"
></product-window>
<product-window :attr="attr" :limitNum="1" :iSbnt="1" @myevent="onMyEvent" @ChangeAttr="ChangeAttr"
@ChangeCartNum="ChangeCartNum" @iptCartNum="iptCartNum" @attrVal="attrVal" @goCat="goPay"></product-window>
<view class="mask" v-if="posters || canvasStatus" @click="listenerActionClose"></view>
<!-- 发送给朋友图片 -->
<view class="share-box" v-if="H5ShareBox"><image src="/static/images/share-info.png" @click="H5ShareBox = false"></image></view>
<view class="share-box" v-if="H5ShareBox">
<image src="/static/images/share-info.png" @click="H5ShareBox = false"></image>
</view>
<!-- 海报展示 -->
<view class='poster-pop' v-if="canvasStatus">
<image :src='imagePath'></image>
<!-- #ifndef H5 -->
<view class='save-poster' @click="savePosterPath"></view>
<!-- #endif -->
<!-- #ifdef H5 -->
<view class="keep">长按图片保存至相册</view>
<view class='iconfont icon-cha2 close' @tap='listenerActionClose'></view>
<!-- #endif -->
</view>
<view class="canvas">
<canvas style="width:597px;height:850px;" canvas-id="activityCanvas"></canvas>
<canvas canvas-id="qrcode" :style="{width: `${qrcodeSize}px`, height: `${qrcodeSize}px`}"
style="opacity: 0;" />
</view>
<!-- #ifdef MP -->
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize>
<!-- <authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize> -->
<!-- #endif -->
<home></home>
<!-- <Product-window v-on:changeFun="changeFun" :attr="attr" :limitNum='1' :iSbnt='1'></Product-window> -->
</div>
</template>
<script>
import CountDown from '@/components/countDown';
import ProductWindow from '@/components/productWindow';
import { toLogin } from '@/libs/login.js';
import { mapGetters } from 'vuex';
import { getCombinationPink, postCombinationRemove, getCombinationMore } from '@/api/activity';
import { postCartAdd } from '@/api/store';
import uQRCode from '@/js_sdk/Sansnn-uQRCode/uqrcode.js';
import {
imageBase64
} from "@/api/public";
import {
toLogin
} from '@/libs/login.js';
import {
mapGetters
} from 'vuex';
import {
getCombinationPink,
postCombinationRemove,
getCombinationMore
} from '@/api/activity';
import {
postCartAdd
} from '@/api/store';
// #ifdef MP
import authorize from '@/components/Authorize';
// #endif
@ -127,13 +158,20 @@ export default {
props: {},
data: function() {
return {
bgColor: {
'bgColor': '#333333',
'Color': '#fff',
'width': '44rpx',
'timeTxtwidth': '16rpx',
'isDay': true
},
currentPinkOrder: '', //
isOk: 0, //
pinkBool: 0, //|0=,1=
userBool: 0, //|0=,1=
pinkAll: [], //
pinkT: [], //
storeCombination: [], //
storeCombination: {}, //
storeCombinationHost: [], //
pinkId: 0,
count: 0, //
@ -161,27 +199,27 @@ export default {
loading: false,
loadend: false,
userInfo: {},
posters: false, // app
H5ShareBox: false, //
isAuto: false, //
isShowAuth: false, //
onceNum: 0, //,
timestamp: 0 //
timestamp: 0, //
qrcodeSize: 600,
posterbackgd: '/static/images/canbj.png',
PromotionCode: '', //
canvasStatus: false,
imgTop: '', //base64
imagePath: '' //
};
},
watch: {
isLogin:{
handler:function(newV,oldV){
if(newV){
this.getCombinationPink();
}
},
deep:true
},
userData: {
handler: function(newV, oldV) {
if (newV) {
this.userInfo = newV;
app.globalData.openPages = '/pages/activity/goods_combination_status/index?id=' + this.pinkId;
app.globalData.openPages = '/pages/activity/goods_combination_status/index?id=' + this.pinkId +
"&spread=" + this.uid;
}
},
deep: true
@ -189,30 +227,25 @@ export default {
},
computed: mapGetters({
'isLogin': 'isLogin',
'userData':'userInfo'
'userData': 'userInfo',
'uid': 'uid'
}),
onLoad(options) {
var that = this;
that.pinkId = options.id;
if (that.isLogin == false) {
// #ifdef H5 || APP-PLUS
toLogin();
// #endif
// #ifdef MP
this.isAuto = true;
this.$set(this, 'isShowAuth', true);
// #endif
} else {
this.timestamp = (new Date()).getTime();
// #ifdef H5
this.getCombinationPink();
// #endif
}
},
onShow() {},
mounted: function() {
this.getCombinationPink();
this.combinationMore();
},
// link: window.location.protocol + '//' + window.location.host +
// '/pages/activity/goods_combination_status/index?id=' + that.pinkId + "&spread=" + this.uid,
//#ifdef MP
/**
* 用户点击右上角分享
@ -227,6 +260,11 @@ export default {
},
//#endif
methods: {
//
listenerActionClose: function() {
this.posters = false;
this.canvasStatus = false;
},
//
combinationMore: function() {
var that = this;
@ -280,8 +318,6 @@ export default {
this.$set(this.attr.productSelect, 'cart_num', e);
this.$set(this, "cart_num", e);
}
// this.$set(this.attr.productSelect, 'cart_num', e);
// this.$set(this, 'cart_num', e);
},
attrVal(val) {
this.attr.productAttr[val.indexw].index = this.attr.productAttr[val.indexw].attrValues[val.indexn];
@ -315,8 +351,6 @@ export default {
this.$set(this.attr.productSelect, 'quotaShow', productSelect.quotaShow);
this.attrValue = res;
this.attrTxt = '已选择';
// this.$set(this, 'attrValue', res);
// this.$set(this, 'attrTxt', '');
} else {
this.$set(this.attr.productSelect, 'image', this.storeCombination.image);
this.$set(this.attr.productSelect, 'price', this.storeCombination.price);
@ -327,8 +361,6 @@ export default {
this.$set(this.attr.productSelect, 'stock', 0);
this.attrValue = '';
this.attrTxt = '请选择';
// this.$set(this, 'attrValue', '');
// this.$set(this, 'attrTxt', '');
}
},
ChangeCartNum: function(res) {
@ -340,7 +372,8 @@ export default {
this.attr.productSelect.cart_num = this.cart_num;
}
//,
if (productSelect === undefined && !this.attr.productAttr.length) productSelect = this.attr.productSelect;
if (productSelect === undefined && !this.attr.productAttr.length) productSelect = this.attr
.productSelect;
if (productSelect === undefined) return;
let stock = productSelect.stock || 0;
let quotaShow = productSelect.quotaShow || 0;
@ -446,35 +479,61 @@ export default {
that.isOpen = true;
},
goPay() {
var that = this;
var data = {};
// that.attr.cartAttr = res;
data.pinkId = that.pinkId;
data.productId = that.storeCombination.productId;
data.cartNum = that.attr.productSelect.cart_num;
data.productAttrUnique = that.attr.productSelect.unique;
data.combinationId = that.storeCombination.id;
data.isNew = true;
postCartAdd(data)
.then(res => {
uni.navigateTo({
url: '/pages/users/order_confirm/index?new=true&cartId=' + res.data.cartId + '&pinkId=' + that.pinkId +'&combination=true'
});
})
.catch(res => {
that.$util.Tips({
title: res
});
});
this.$Order.getPreOrder("buyNow", [{
"attrValueId": parseFloat(this.attr.productSelect.unique),
"combinationId": parseFloat(this.storeCombination.id),
"productNum": parseFloat(this.attr.productSelect.cart_num),
"productId": parseFloat(this.storeCombination.productId),
"pinkId": parseFloat(this.pinkId)
}]);
},
goPoster: function() {
var that = this;
// this.$router.push({
// path: "/activity/poster/" + that.pinkId + "/1"
// });
uni.navigateTo({
url: '/pages/activity/poster-poster/index?type=2&id=' + that.pinkId
//#ifdef H5
if (this.$wechat.isWeixin()) {
this.H5ShareBox = true;
} else {
uni.showLoading({
title: '海报生成中',
mask: true
});
this.posters = false;
let arrImagesUrl = '';
let arrImagesUrlTop = '';
if (!this.PromotionCode) {
uni.hideLoading();
this.$util.Tips({
title: this.errT
});
return
}
setTimeout(() => {
if (!this.imgTop) {
uni.hideLoading();
this.$util.Tips({
title: '无法生成商品海报!'
});
return
}
}, 1000);
uni.downloadFile({
url: this.imgTop,
success: (res) => {
arrImagesUrlTop = res.tempFilePath;
let arrImages = [this.posterbackgd, arrImagesUrlTop, this.PromotionCode];
setTimeout(() => {
this.$util.activityCanvas(arrImages, this.storeCombination.title,
this.storeCombination.price, this.storeCombination.people +
'人团', '还差' + this.count + '人拼团成功', 9,
(tempFilePath) => {
this.imagePath = tempFilePath;
this.canvasStatus = true;
uni.hideLoading();
});
}, 500);
}
});
}
//#endif
},
goOrder: function() {
var that = this;
@ -491,23 +550,48 @@ export default {
//
goDetail: function(id) {
this.pinkId = id;
// this.getCombinationPink();
uni.navigateTo({
url: '/pages/activity/goods_combination_details/index?id=' + id
});
// this.$router.push({
// path: "/activity/group_detail/" + id
// });
},
// base64
getImageBase64: function(images) {
let that = this;
imageBase64({
url: images
}).then(res => {
that.imgTop = res.data.code;
})
},
//
make() {
let href = location.protocol + '//' + location.host +
'/pages/activity/goods_combination_status/index?id=' + this.pinkId + "&spread=" + this.uid;
uQRCode.make({
canvasId: 'qrcode',
text: href,
size: this.qrcodeSize,
margin: 10,
success: res => {
this.PromotionCode = res;
},
complete: () => {},
fail: res => {
this.$util.Tips({
title: '海报二维码生成失败!'
});
}
})
},
//
getCombinationPink: function() {
var that = this;
getCombinationPink(that.pinkId)
.then(res => {
// that.$set(that, 'storeCombinationHost', res.data.store_combination_host);
let storeCombination = res.data.storeCombination;
res.data.pinkT.stop_time = parseInt(res.data.pinkT.stopTime);
that.$set(that, 'storeCombination', res.data.storeCombination);
that.$set(that.attr.productSelect, 'num', res.data.storeCombination.num);
that.$set(that, 'storeCombination', storeCombination);
that.$set(that.attr.productSelect, 'num', storeCombination.totalNum);
that.$set(that, 'pinkT', res.data.pinkT);
that.$set(that, 'pinkAll', res.data.pinkAll);
that.$set(that, 'count', res.data.count);
@ -516,14 +600,18 @@ export default {
that.$set(that, 'isOk', res.data.isOk);
that.$set(that, 'currentPinkOrder', res.data.currentPinkOrder);
that.$set(that, 'userInfo', res.data.userInfo);
that.onceNum = res.data.storeCombination.onceNum;
that.attr.productAttr = res.data.storeCombination.productAttr;
that.productValue = res.data.storeCombination.productValue;
that.onceNum = storeCombination.onceNum;
that.attr.productAttr = storeCombination.productAttr;
that.productValue = storeCombination.productValue;
//#ifdef H5
this.getImageBase64(storeCombination.image);
that.make();
that.setOpenShare();
//#endif
that.setProductSelect();
if (that.attr.productAttr != 0) that.DefaultSelect();
})
.catch(err => {
if (that.isLogin) {
@ -541,12 +629,15 @@ export default {
let configTimeline = {
title: '您的好友' + that.userInfo.nickname + '邀请您参团' + that.storeCombination.title,
desc: that.storeCombination.title,
link: window.location.protocol + '//' + window.location.host + '/pages/activity/goods_combination_status/index?id=' + that.pinkId,
link: window.location.protocol + '//' + window.location.host +
'/pages/activity/goods_combination_status/index?id=' + that.pinkId + "&spread=" + this.uid,
imgUrl: that.storeCombination.image
};
if (this.$wechat.isWeixin()) {
this.$wechat
.wechatEvevt(['updateAppMessageShareData', 'updateTimelineShareData', 'onMenuShareAppMessage', 'onMenuShareTimeline'], configTimeline)
.wechatEvevt(['updateAppMessageShareData', 'updateTimelineShareData', 'onMenuShareAppMessage',
'onMenuShareTimeline'
], configTimeline)
.then(res => {
console.log(res);
})
@ -569,14 +660,11 @@ export default {
cid: that.storeCombination.id
})
.then(res => {
that.$util.Tips(
{
that.$util.Tips({
title: res.msg
},
{
}, {
tab: 3
}
);
});
})
.catch(res => {
that.$util.Tips({
@ -591,6 +679,70 @@ export default {
};
</script>
<style lang="scss" scoped>
.pinkT {
position: relative;
.chief {
position: absolute;
width: 72rpx;
height: 30rpx;
background-color: #E93323;
border-radius: 15rpx;
font-size: 20rpx;
line-height: 30rpx;
text-align: center;
right: -24rpx;
top: -16rpx;
color: #fff;
}
}
.canvas {
position: fixed;
opacity: 0;
}
.poster-pop {
width: 594rpx;
height: 850rpx;
position: fixed;
left: 50%;
transform: translateX(-50%);
z-index: 999;
top: 50%;
margin-top: -466rpx;
image {
width: 100%;
height: 100%;
display: block;
border-radius: 10rpx;
}
.close {
text-align: center;
margin-top: 55rpx;
color: #fff;
font-size: 52rpx;
}
.save-poster {
background-color: #df2d0a;
font-size: 22rpx;
color: #fff;
text-align: center;
height: 76rpx;
line-height: 76rpx;
width: 100%;
}
.keep {
color: #fff;
text-align: center;
font-size: 25rpx;
margin-top: 25rpx;
}
}
/*开团*/
.group-con .header {
width: 100%;
@ -702,7 +854,6 @@ export default {
.group-con .wrapper .list.result {
max-height: 240rpx;
overflow: hidden;
}
.group-con .wrapper .list.result.on {

View File

@ -1,28 +1,29 @@
<template>
<div>
<view class='flash-sale'>
<!-- #ifdef H5 -->
<view class='iconfont icon-xiangzuo' @tap='goBack' :style="'top:'+ (navH/2) +'rpx'" v-if="returnShow"></view>
<!-- #endif -->
<view class="saleBox"></view>
<!-- banner -->
<!-- <navigator :url='item.url' class='slide-navigator acea-row row-between-wrapper' hover-class='none'>
<image :src="item.pic" class="slide-image" lazy-load></image>
</navigator> -->
<view class="header" v-if="timeList.length">
<view class="header" v-if="dataList.length">
<swiper indicator-dots="true" autoplay="true" :circular="circular" interval="3000" duration="1500"
indicator-color="rgba(255,255,255,0.6)" indicator-active-color="#fff">
<block v-for="(item,index) in timeList[active].slide" :key="index">
<swiper-item>
<image :src="item.sattDir" class="slide-image" lazy-load></image>
<block v-for="(items,index) in dataList[active].slide" :key="index">
<swiper-item class="borRadius14">
<image :src="items.sattDir" class="slide-image borRadius14" lazy-load></image>
</swiper-item>
</block>
</swiper>
</view>
<view class="seckillList acea-row row-between-wrapper">
<view class="priceTag">
<image src="/static/images/priceTag.png"></image>
</view>
<view class='timeLsit'>
<scroll-view class="scroll-view_x" scroll-x scroll-with-animation :scroll-left="scrollLeft" style="width:auto;overflow:hidden;height:106rpx;">
<block v-for="(item,index) in timeList" :key='index'>
<scroll-view class="scroll-view_x" scroll-x scroll-with-animation :scroll-left="scrollLeft"
style="width:auto;overflow:hidden;">
<block v-for="(item,index) in dataList" :key='index'>
<view @tap='settimeList(item,index)' class='item' :class="active == index?'on':''">
<view class='time'>{{item.time.split(',')[0]}}</view>
<view class="state">{{item.statusName}}</view>
@ -31,7 +32,7 @@
</scroll-view>
</view>
</view>
<view class='list' v-if='seckillList.length>0'>
<view class='list pad30' v-if='seckillList.length>0'>
<block v-for="(item,index) in seckillList" :key='index'>
<view class='item acea-row row-between-wrapper' @tap='goDetails(item)'>
<view class='pictrue'>
@ -39,11 +40,12 @@
</view>
<view class='text acea-row row-column-around'>
<view class='name line1'>{{item.title}}</view>
<view class='money'>
<view class='money'><text class="font-color"></text>
<text class='num font-color'>{{item.price}}</text>
<text class="y_money">{{item.otPrice}}</text>
</view>
<view class="limit">限量 <text class="limitPrice">{{item.quotaShow}} {{item.unitName}}</text></view>
<view class="limit">限量 <text class="limitPrice">{{item.quota}} {{item.unitName}}</text>
</view>
<view class="progress">
<view class='bg-reds' :style="'width:'+item.percent+'%;'"></view>
<view class='piece'>已抢{{item.percent}}%</view>
@ -70,7 +72,8 @@
getSeckillHeaderApi,
getSeckillList
} from '../../../api/activity.js';
import home from '@/components/home/index.vue'
import home from '@/components/home/index.vue';
let app = getApp();
export default {
components: {
home
@ -80,11 +83,10 @@
circular: true,
autoplay: true,
interval: 500,
// duration: 500,
topImage: '',
seckillList: [],
timeList: [],
active: 5,
active: 0,
scrollLeft: 0,
interval: 0,
status: 1,
@ -96,31 +98,36 @@
loading: false,
loadend: false,
pageloading: false,
seckillHeader: []
dataList: [],
returnShow: true,
navH: ''
}
},
onLoad() {
var pages = getCurrentPages();
this.returnShow = pages.length===1?false:true;
// #ifdef H5
this.navH = app.globalData.navHeight-18;
// #endif
this.getSeckillConfig();
},
methods: {
goBack: function() {
uni.navigateBack();
},
getSeckillConfig: function() {
let that = this;
getSeckillHeaderApi().then(res => {
res.data.seckillTime.map(item => {
res.data.map(item => {
item.slide = JSON.parse(item.slide)
})
that.timeList = res.data.seckillTime;
that.active = res.data.seckillTimeIndex;
if (that.timeList.length) {
that.scrollLeft = (that.active - 1.37) * 100
setTimeout(function() {
that.loading = true
}, 2000);
that.seckillList = [],
that.page = 1
that.status = that.timeList[that.active].status
that.dataList = res.data;
that.getSeckillList();
}
that.seckillList = [];
that.page = 1;
that.status = that.dataList[that.active].status;
that.getSeckillList();
});
},
getSeckillList: function() {
@ -132,7 +139,7 @@
if (that.loadend) return;
if (that.pageloading) return;
this.pageloading = true
getSeckillList(that.timeList[that.active].id, data).then(res => {
getSeckillList(that.dataList[that.active].id, data).then(res => {
var seckillList = res.data.list;
var loadend = seckillList.length < that.limit;
that.page++;
@ -155,7 +162,7 @@
that.countDownHour = "00";
that.countDownMinute = "00";
that.countDownSecond = "00";
that.status = that.timeList[that.active].status;
that.status = that.dataList[that.active].status;
that.loadend = false;
that.page = 1;
that.seckillList = [];
@ -164,7 +171,7 @@
},
goDetails(item) {
uni.navigateTo({
url: '/pages/activity/goods_seckill_details/index?id=' + item.id + '&time=' + this.timeList[this.active].timeSwap + '&status=' + this.status + '&productId=' + item.productId
url: '/pages/activity/goods_seckill_details/index?id=' + item.id
})
}
},
@ -181,22 +188,42 @@
page {
background-color: #F5F5F5 !important;
}
</style>
<style scoped lang="scss">
.icon-xiangzuo {
font-size: 40rpx;
color: #fff;
position: fixed;
left: 30rpx;
z-index: 99;
transform: translateY(-20%);
}
.flash-sale .header {
width: 710rpx;
height: 300rpx;
margin: -215rpx auto 0 auto;
border-radius: 20rpx;
height: 330rpx;
margin: -276rpx auto 0 auto;
border-radius: 14rpx;
overflow: hidden;
swiper{
height: 330rpx !important;
border-radius: 14rpx;
overflow: hidden;
}
}
.flash-sale .header image {
width: 100%;
height: 100%;
border-radius: 20rpx;
border-radius: 14rpx;
overflow: hidden;
img{
border-radius: 14rpx;
}
}
.flash-sale .seckillList {
padding: 0 20rpx;
padding: 25rpx;
}
.flash-sale .seckillList .priceTag {
@ -210,9 +237,8 @@
}
.flash-sale .timeLsit {
width: 610rpx;
width: 596rpx;
white-space: nowrap;
margin: 10rpx 0;
}
.flash-sale .timeLsit .item {
@ -220,10 +246,9 @@
font-size: 20rpx;
color: #666;
text-align: center;
padding: 11rpx 0;
box-sizing: border-box;
height: 96rpx;
margin-right: 35rpx;
margin-right: 30rpx;
width: 130rpx;
}
.flash-sale .timeLsit .item .time {
@ -233,13 +258,15 @@
}
.flash-sale .timeLsit .item.on .time {
color: #E93323;
color: $theme-color;
}
.flash-sale .timeLsit .item.on .state {
width: 90rpx;
height: 30rpx;
line-height: 30rpx;
border-radius: 15rpx;
width: 128rpx;
/* padding: 0 12rpx; */
background: linear-gradient(90deg, rgba(252, 25, 75, 1) 0%, rgba(252, 60, 32, 1) 100%);
color: #fff;
}
@ -269,11 +296,11 @@
.flash-sale .list .item {
height: 230rpx;
position: relative;
width: 710rpx;
/* width: 710rpx; */
margin: 0 auto 20rpx auto;
background-color: #fff;
border-radius: 20rpx;
padding: 0 25rpx;
border-radius: 14rpx;
padding: 25rpx 24rpx;
}
.flash-sale .list .item .pictrue {
@ -290,7 +317,7 @@
}
.flash-sale .list .item .text {
width: 460rpx;
width: 440rpx;
font-size: 30rpx;
color: #333;
height: 166rpx;
@ -302,7 +329,7 @@
.flash-sale .list .item .text .money {
font-size: 30rpx;
color: #E93323;
color: $theme-color;
}
.flash-sale .list .item .text .money .num {
@ -330,7 +357,7 @@
.flash-sale .list .item .text .progress {
overflow: hidden;
background-color: #FFEFEF;
background-color: #EEEEEE;
width: 260rpx;
border-radius: 18rpx;
height: 18rpx;
@ -369,7 +396,10 @@
.flash-sale .saleBox {
width: 100%;
height: 230rpx;
height: 298rpx;
/* #ifdef MP */
height: 300rpx;
/* #endif */
background: rgba(233, 51, 35, 1);
border-radius: 0 0 50rpx 50rpx;
}

File diff suppressed because one or more lines are too long

View File

@ -2,9 +2,6 @@
<view>
<view class='poster-poster'>
<view class='tip'><text class='iconfont icon-shuoming'></text>提示点击图片即可保存至手机相册 </view>
<!-- <view class='pictrue'>
<image :src='image' mode="widthFix"></image>
</view> -->
<view class='pictrue' v-if="canvasStatus">
<image :src='imagePath'></image>
</view>

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 174 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 686 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 929 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 145 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 662 B

View File

@ -1,358 +0,0 @@
<template>
<view class="deliver-goods">
<header>
<view class="order-num acea-row row-between-wrapper">
<view class="num line1">订单号{{ order_id }}</view>
<view class="name line1">
<span class="iconfont icon-yonghu2"></span>{{ delivery.nickname }}
</view>
</view>
<view class="address">
<view class="name">
{{ delivery.real_name
}}<span class="phone">{{ delivery.user_phone }}</span>
</view>
<view>{{ delivery.user_address }}</view>
</view>
<view class="line"><image src="@/static/images/line.jpg" /></view>
</header>
<view class="wrapper">
<view class="item acea-row row-between-wrapper">
<view>发货方式</view>
<view class="mode acea-row row-middle row-right">
<view class="goods" :class="active === index ? 'on' : ''" v-for="(item, index) in types" :key="index" @click="changeType(item, index)">
{{ item.title }}<span class="iconfont icon-xuanzhong2"></span>
</view>
</view>
</view>
<block v-if="logistics.length>0">
<view class="list" v-show="active === 0">
<view class="item acea-row row-between-wrapper">
<view>发货方式</view>
<view class="select-box">
<picker class="pickerBox" @change="bindPickerChange" :value="seIndex" :range="logistics" range-key="name">
<!-- <view></view> -->
<view class="uni-input">{{logistics[seIndex].name}}</view>
</picker>
</view>
</view>
<view class="item acea-row row-between-wrapper">
<view>快递单号</view>
<input type="text" placeholder="填写快递单号" v-model="delivery_id" class="mode" />
</view>
</view>
</block>
<view class="list" v-show="active === 1">
<view class="item acea-row row-between-wrapper">
<view>送货人</view>
<input type="text" placeholder="填写送货人" v-model="delivery_name" class="mode" />
</view>
<view class="item acea-row row-between-wrapper">
<view>送货电话</view>
<input type="text" placeholder="填写送货电话" v-model="delivery_id" class="mode" />
</view>
</view>
</view>
<view style="height:1.2rem;"></view>
<view class="confirm" @click="saveInfo"></view>
</view>
</template>
<script>
import {
getAdminOrderDelivery,
setAdminOrderDelivery,
getLogistics
} from "@/api/admin";
import { checkPhone } from '@/utils/validate.js'
export default {
name: "GoodsDeliver",
components: {},
props: {},
data: function() {
return {
types: [{
type: "express",
title: "发货"
},
{
type: "send",
title: "送货"
},
{
type: "fictitious",
title: "无需发货"
}
],
active: 0,
order_id: "",
delivery: [],
logistics: [],
delivery_type: "express",
delivery_name: "",
delivery_id: "",
seIndex:0,
};
},
watch: {
"$route.params.oid": function(newVal) {
let that = this;
if (newVal != undefined) {
that.order_id = newVal;
that.getIndex();
}
}
},
onLoad: function(option) {
this.order_id = option.id;
this.getIndex();
this.getLogistics();
},
methods: {
changeType: function(item, index) {
this.active = index;
this.delivery_type = item.type;
this.delivery_name = "";
this.delivery_id = "";
},
getIndex: function() {
let that = this;
getAdminOrderDelivery(that.order_id).then(
res => {
that.delivery = res.data;
},
error => {
that.$dialog.error(error);
}
);
},
getLogistics: function() {
let that = this;
getLogistics().then(
res => {
that.logistics = res.data;
},
error => {
that.$dialog.error(error);
}
);
},
async saveInfo() {
let that = this,
delivery_type = that.delivery_type,
delivery_name = that.logistics[that.seIndex].name,
delivery_id = that.delivery_id,
userName = that.delivery_name,
save = {};
save.order_id = that.order_id;
save.delivery_type = that.delivery_type;
switch (delivery_type) {
case "send":
if(!userName){
return that.$util.Tips({
title:'请填写送货人姓名'
})
}
if(!delivery_id || !checkPhone(delivery_id)){
return that.$util.Tips({
title:'请填写正确的手机号码'
})
}
save.delivery_name = userName;
save.delivery_id = delivery_id;
that.setInfo(save);
break;
case "express":
if(!delivery_id){
return this.$util.Tips({
title:'请填写快递单号'
})
}
save.delivery_name = delivery_name;
save.delivery_id = delivery_id;
that.setInfo(save);
break;
case "fictitious":
that.setInfo(save);
break;
}
},
setInfo: function(item) {
let that = this;
setAdminOrderDelivery(item).then(
res => {
that.$util.Tips({
title:res,
icon:'success',
mask:true
})
setTimeout(res=>{
uni.navigateBack();
},2000)
},
error => {
that.$dialog.error(error);
}
);
},
bindPickerChange(e){
this.seIndex = e.detail.value
}
}
};
</script>
<style lang="scss">
/*发货*/
.deliver-goods header {
width: 100%;
background-color: #fff;
margin-top: 10upx;
}
.deliver-goods header .order-num {
padding: 0 30upx;
border-bottom: 1px solid #f5f5f5;
height: 67upx;
}
.deliver-goods header .order-num .num {
width: 430upx;
font-size: 26upx;
color: #282828;
position: relative;
}
.deliver-goods header .order-num .num:after {
position: absolute;
content: '';
width: 1px;
height: 30upx;
background-color: #ddd;
top: 50%;
margin-top: -15upx;
right: 0;
}
.deliver-goods header .order-num .name {
width: 260upx;
font-size: 26upx;
color: #282828;
text-align: center;
}
.deliver-goods header .order-num .name .iconfont {
font-size: 35upx;
color: #477ef3;
vertical-align: middle;
margin-right: 10upx;
}
.deliver-goods header .address {
font-size: 26upx;
color: #868686;
background-color: #fff;
padding: 30upx;
}
.deliver-goods header .address .name {
font-size: 34upx;
color: #282828;
margin-bottom: 10upx;
}
.deliver-goods header .address .name .phone {
margin-left: 40upx;
}
.deliver-goods header .line {
width: 100%;
height: 3upx;
}
.deliver-goods header .line image {
width: 100%;
height: 100%;
display: block;
}
.deliver-goods .wrapper {
width: 100%;
background-color: #fff;
}
.deliver-goods .wrapper .item {
border-bottom: 1px solid #f0f0f0;
padding: 0 30upx;
height: 96upx;
font-size: 32upx;
color: #282828;
position: relative;
}
.deliver-goods .wrapper .item .mode {
width: 460upx;
height: 100%;
text-align: right;
}
.deliver-goods .wrapper .item .mode .iconfont {
font-size: 30upx;
margin-left: 13upx;
}
.deliver-goods .wrapper .item .mode .goods~.goods {
margin-left: 30upx;
}
.deliver-goods .wrapper .item .mode .goods {
color: #bbb;
}
.deliver-goods .wrapper .item .mode .goods.on {
color: #477ef3;
}
.deliver-goods .wrapper .item .icon-up {
position: absolute;
font-size: 35upx;
color: #2c2c2c;
right: 30upx;
}
.deliver-goods .wrapper .item select {
direction: rtl;
padding-right: 60upx;
position: relative;
z-index: 2;
}
.deliver-goods .wrapper .item input::placeholder {
color: #bbb;
}
.deliver-goods .confirm {
font-size: 32upx;
color: #fff;
width: 100%;
height: 100upx;
background-color: #477ef3;
text-align: center;
line-height: 100upx;
position: fixed;
bottom: 0;
}
.select-box{
flex: 1;
height: 100%;
.pickerBox{
display: flex;
align-items: center;
justify-content: flex-end;
width: 100%;
height: 100%;
}
}
</style>

File diff suppressed because one or more lines are too long

View File

@ -1,773 +0,0 @@
<template>
<view class="order-details pos-order-details">
<view class="header acea-row row-middle">
<view class="state">{{ title }}</view>
<view class="data">
<view class="order-num">订单{{ orderInfo.order_id }}</view>
<view>
<span class="time">{{ orderInfo.add_time }}</span>
</view>
</view>
</view>
<view class="remarks acea-row row-between-wrapper" v-if="goname != 'looks'">
<span class="iconfont icon-zhinengkefu-"></span>
<input type="button" class="line1" style="text-align: left;" :value="
orderInfo.remark ? orderInfo.remark : '订单未备注,点击添加备注信息'
"
@click="modify('1')" />
</view>
<view class="orderingUser acea-row row-middle">
<span class="iconfont icon-yonghu2"></span>{{ orderInfo.nickname }}
</view>
<view class="address">
<view class="name">
{{ orderInfo.real_name
}}<span class="phone">{{ orderInfo.user_phone }}</span>
</view>
<view>{{ orderInfo.user_address }}</view>
</view>
<view class="line">
<image src="/static/images/line.jpg" />
</view>
<view class="pos-order-goods">
<navigator :url="`/pages/goods_details/index?id=${item.cart_info.productInfo.product_id}`" hover-class="none" class="goods acea-row row-between-wrapper" v-for="(item, index) in orderInfo._info" :key="index">
<view class="picTxt acea-row row-between-wrapper">
<view class="pictrue">
<image :src="item.cart_info.productInfo.image" />
</view>
<view class="text acea-row row-between row-column">
<view class="info line2">
{{ item.cart_info.productInfo.store_name }}
</view>
<view class="attr">{{ item.cart_info.productInfo.suk }}</view>
</view>
</view>
<view class="money">
<view class="x-money">{{ item.cart_info.productInfo.price }}</view>
<view class="num">x{{ item.cart_info.cart_num }}</view>
<view class="y-money">{{ item.cart_info.productInfo.ot_price }}</view>
</view>
</navigator>
</view>
<view class="public-total">
{{ orderInfo.total_num }}件商品应支付
<span class="money">{{ orderInfo.pay_price }}</span> ( 邮费 ¥{{
orderInfo.pay_postage
}}
)
</view>
<view class="wrapper">
<view class="item acea-row row-between">
<view>订单编号</view>
<view class="conter acea-row row-middle row-right">
{{ orderInfo.order_id
}}
<!-- #ifdef H5 -->
<span class="copy copy-data" :data-clipboard-text="orderInfo.order_id">复制</span>
<!-- #endif -->
<!-- #ifdef MP -->
<span class="copy copy-data" @click="copyNum(orderInfo.order_id)"></span>
<!-- #endif -->
</view>
</view>
<view class="item acea-row row-between">
<view>下单时间</view>
<view class="conter">{{ orderInfo.add_time }}</view>
</view>
<view class="item acea-row row-between">
<view>支付状态</view>
<view class="conter">
{{ orderInfo.paid == 1 ? "已支付" : "未支付" }}
</view>
</view>
<view class="item acea-row row-between">
<view>支付方式</view>
<view class="conter">{{ payType }}</view>
</view>
<view class="item acea-row row-between">
<view>买家留言</view>
<view class="conter">{{ orderInfo.mark }}</view>
</view>
</view>
<view class="wrapper">
<view class="item acea-row row-between">
<view>支付金额</view>
<view class="conter">{{ orderInfo.total_price }}</view>
</view>
<view class="item acea-row row-between">
<view>优惠券抵扣</view>
<view class="conter">-{{ orderInfo.coupon_price }}</view>
</view>
<view class="item acea-row row-between">
<view>运费</view>
<view class="conter">{{ orderInfo.freight_price }}</view>
</view>
<view class="actualPay acea-row row-right">
实付款<span class="money font-color-red">{{ orderInfo.pay_price }}</span>
</view>
</view>
<view class="wrapper" v-if="
orderInfo.delivery_type != 'fictitious' && orderInfo._status._type === 2
">
<view class="item acea-row row-between">
<view>配送方式</view>
<view class="conter" v-if="orderInfo.delivery_type === 'express'">
快递
</view>
<view class="conter" v-if="orderInfo.delivery_type === 'send'"></view>
</view>
<view class="item acea-row row-between">
<view v-if="orderInfo.delivery_type === 'express'"></view>
<view v-if="orderInfo.delivery_type === 'send'"></view>
<view class="conter">{{ orderInfo.delivery_name }}</view>
</view>
<view class="item acea-row row-between">
<view v-if="orderInfo.delivery_type === 'express'"></view>
<view v-if="orderInfo.delivery_type === 'send'"></view>
<view class="conter">
{{ orderInfo.delivery_id
}}<span class="copy copy-data" :data-clipboard-text="orderInfo.delivery_id">复制</span>
</view>
</view>
</view>
<view style="height:120upx;"></view>
<view class="footer acea-row row-right row-middle" v-if="goname != 'looks'">
<view class="more"></view>
<view class="bnt cancel" @click="modify('0')" v-if="types == 0">
一键改价
</view>
<view class="bnt cancel" @click="modify('0')" v-if="types == -1">
立即退款
</view>
<view class="bnt cancel" @click="modify('1')"></view>
<view class="bnt cancel" v-if="orderInfo.pay_type === 'offline' && orderInfo.paid === 0" @click="offlinePay">
确认付款
</view>
<navigator class="bnt delivery" v-if="types == 1" :url="'/pages/admin/delivery/index?id='+orderInfo.order_id"></navigator>
</view>
<PriceChange :change="change" :orderInfo="orderInfo" v-on:closechange="changeclose($event)" v-on:savePrice="savePrice"
:status="status"></PriceChange>
</view>
</template>
<script>
import PriceChange from "@/components/PriceChange";
// #ifdef H5
import ClipboardJS from "@/plugin/clipboard/clipboard.js";
// #endif
import {
getAdminOrderDetail,
setAdminOrderPrice,
setAdminOrderRemark,
setOfflinePay,
setOrderRefund
} from "@/api/admin";
// import { required, num } from "@utils/validate";
// import { validatorDefaultCatch } from "@utils/dialog";
import {
isMoney
} from '@/utils/validate.js'
export default {
name: "AdminOrder",
components: {
PriceChange
},
props: {},
data: function() {
return {
order: false,
change: false,
order_id: "",
orderInfo: {
_status: {}
},
status: "",
title: "",
payType: "",
types: "",
clickNum: 1,
goname:''
};
},
watch: {
"$route.params.oid": function(newVal) {
let that = this;
if (newVal != undefined) {
that.order_id = newVal;
that.getIndex();
}
}
},
onLoad: function(option) {
let self = this
this.order_id = option.id;
this.goname = option.goname
this.getIndex();
// #ifdef H5
this.$nextTick(function() {
var clipboard = new ClipboardJS('.copy-data');
// var copybtn = document.getElementsByClassName("copy-data");
// var clipboard = new Clipboard(copybtn);
clipboard.on('success', function(e) {
self.$util.Tips({
title:'复制成功'
})
});
clipboard.on('error', function(e) {
self.$util.Tips({
title:'复制失败'
})
});
});
// #endif
},
methods: {
more: function() {
this.order = !this.order;
},
modify: function(status) {
this.change = true;
this.status = status;
},
changeclose: function(msg) {
this.change = msg;
},
getIndex: function() {
let that = this;
getAdminOrderDetail(that.order_id).then(
res => {
that.orderInfo = res.data;
that.types = res.data._status._type;
that.title = res.data._status._title;
that.payType = res.data._status._payType;
},
err => {
that.$util.Tips({
title: err
}, {
tab: 3,
url: 1
});
}
);
},
async savePrice(opt) {
let that = this,
data = {},
price = opt.price,
refund_price = opt.refund_price,
refund_status = that.orderInfo.refund_status,
remark = opt.remark;
data.order_id = that.orderInfo.order_id;
if (that.status == 0 && refund_status === 0) {
if (!isMoney(price)) {
return that.$util.Tips({
title: '请输入正确的金额'
});
}
data.price = price;
setAdminOrderPrice(data).then(
function() {
that.change = false;
that.$util.Tips({
title: '改价成功',
icon: 'success'
})
that.getIndex();
},
function() {
that.change = false;
that.$util.Tips({
title: '改价失败',
icon: 'none'
})
}
);
} else if (that.status == 0 && refund_status === 1) {
if (!isMoney(refund_price)) {
return that.$util.Tips({
title: '请输入正确的金额'
});
}
data.price = refund_price;
data.type = opt.type;
setOrderRefund(data).then(
res => {
that.change = false;
that.$util.Tips({
title: res
});
that.getIndex();
},
err => {
that.change = false;
that.$util.Tips({
title: err
});
}
);
} else {
if (!remark) {
return this.$util.Tips({
title: '请输入备注'
})
}
data.remark = remark;
setAdminOrderRemark(data).then(
res => {
that.change = false;
this.$util.Tips({
title: res,
icon: 'success'
})
that.getIndex();
},
err => {
that.change = false;
that.$util.Tips({
title: err
});
}
);
}
},
offlinePay: function() {
setOfflinePay({
order_id: this.orderInfo.order_id
}).then(
res => {
this.$util.Tips({
title: res,
icon: 'success'
});
this.getIndex();
},
err => {
this.$util.Tips({
title: err
});
}
);
},
// #ifdef MP
copyNum(id) {
uni.setClipboardData({
data: id,
success: function() {
console.log('success');
}
});
},
// #endif
// #ifdef H5
webCopy(item, index) {
let items = item
let indexs = index
let self = this
if (self.clickNum == 1) {
self.clickNum += 1
self.webCopy(items, indexs)
}
}
// #endif
}
};
</script>
<style>
/*商户管理订单详情*/
.pos-order-details .header {
background: linear-gradient(to right, #2291f8 0%, #1cd1dc 100%);
background: -webkit-linear-gradient(to right, #2291f8 0%, #1cd1dc 100%);
background: -moz-linear-gradient(to right, #2291f8 0%, #1cd1dc 100%);
}
.pos-order-details .header .state {
font-size: 36upx;
color: #fff;
}
.pos-order-details .header .data {
margin-left: 35upx;
font-size: 28upx;
}
.pos-order-details .header .data .order-num {
font-size: 30upx;
margin-bottom: 8upx;
}
.pos-order-details .remarks {
width: 100%;
height: 86upx;
background-color: #fff;
padding: 0 30upx;
}
.pos-order-details .remarks .iconfont {
font-size: 40upx;
color: #2a7efb;
}
.pos-order-details .remarks input {
width: 630upx;
height: 100%;
font-size: 30upx;
}
.pos-order-details .remarks input::placeholder {
color: #666;
}
.pos-order-details .orderingUser {
font-size: 26upx;
color: #282828;
padding: 0 30upx;
height: 67upx;
background-color: #fff;
margin-top: 16upx;
border-bottom: 1px solid #f5f5f5;
}
.pos-order-details .orderingUser .iconfont {
font-size: 40upx;
color: #2a7efb;
margin-right: 15upx;
}
.pos-order-details .address {
margin-top: 0;
}
.pos-order-details .pos-order-goods {
margin-top: 17upx;
}
.pos-order-details .footer .more {
font-size: 27upx;
color: #aaa;
width: 100upx;
height: 64upx;
text-align: center;
line-height: 64upx;
margin-right: 25upx;
position: relative;
}
.pos-order-details .footer .delivery {
background: linear-gradient(to right, #2291f8 0%, #1cd1dc 100%);
background: -webkit-linear-gradient(to right, #2291f8 0%, #1cd1dc 100%);
background: -moz-linear-gradient(to right, #2291f8 0%, #1cd1dc 100%);
}
.pos-order-details .footer .more .order .arrow {
width: 0;
height: 0;
border-left: 11upx solid transparent;
border-right: 11upx solid transparent;
border-top: 20upx solid #e5e5e5;
position: absolute;
left: 15upx;
bottom: -18upx;
}
.pos-order-details .footer .more .order .arrow:before {
content: '';
width: 0;
height: 0;
border-left: 9upx solid transparent;
border-right: 9upx solid transparent;
border-top: 19upx solid #fff;
position: absolute;
left: -10upx;
bottom: 0;
}
.pos-order-details .footer .more .order {
width: 200upx;
background-color: #fff;
border: 1px solid #eee;
border-radius: 10upx;
position: absolute;
top: -200upx;
z-index: 9;
}
.pos-order-details .footer .more .order .item {
height: 77upx;
line-height: 77upx;
}
.pos-order-details .footer .more .order .item~.item {
border-top: 1px solid #f5f5f5;
}
.pos-order-details .footer .more .moreName {
width: 100%;
height: 100%;
}
/*订单详情*/
.order-details .header {
padding: 0 30upx;
height: 150upx;
}
.order-details .header.on {
background-color: #666 !important;
}
.order-details .header .pictrue {
width: 110upx;
height: 110upx;
}
.order-details .header .pictrue image {
width: 100%;
height: 100%;
}
.order-details .header .data {
color: rgba(255, 255, 255, 0.8);
font-size: 24upx;
margin-left: 27upx;
}
.order-details .header.on .data {
margin-left: 0;
}
.order-details .header .data .state {
font-size: 30upx;
font-weight: bold;
color: #fff;
margin-bottom: 7upx;
}
/* .order-details .header .data .time{margin-left:20upx;} */
.order-details .nav {
background-color: #fff;
font-size: 26upx;
color: #282828;
padding: 25upx 0;
}
.order-details .nav .navCon {
padding: 0 40upx;
}
.order-details .nav .navCon .on {
font-weight: bold;
color: #e93323;
}
.order-details .nav .progress {
padding: 0 65upx;
margin-top: 10upx;
}
.order-details .nav .progress .line {
width: 100upx;
height: 2upx;
background-color: #939390;
}
.order-details .nav .progress .iconfont {
font-size: 25upx;
color: #939390;
margin-top: -2upx;
width: 30upx;
height: 30upx;
line-height: 33upx;
text-align: center;
margin-right: 0 !important;
}
.order-details .address {
font-size: 26upx;
color: #868686;
background-color: #fff;
padding: 25upx 30upx 30upx 30upx;
}
.order-details .address .name {
font-size: 30upx;
color: #282828;
margin-bottom: 0.1rem;
}
.order-details .address .name .phone {
margin-left: 40upx;
}
.order-details .line {
width: 100%;
height: 3upx;
}
.order-details .line image {
width: 100%;
height: 100%;
display: block;
}
.order-details .wrapper {
background-color: #fff;
margin-top: 12upx;
padding: 30upx;
}
.order-details .wrapper .item {
font-size: 28upx;
color: #282828;
}
.order-details .wrapper .item~.item {
margin-top: 20upx;
}
.order-details .wrapper .item .conter {
color: #868686;
width: 500upx;
text-align: right;
}
.order-details .wrapper .item .conter .copy {
font-size: 20rpx;
color: #333;
border-radius: 3rpx;
border: 1px solid #666;
padding: 0rpx 15rpx;
margin-left: 24rpx;
height: 40rpx;
}
.order-details .wrapper .actualPay {
border-top: 1upx solid #eee;
margin-top: 30upx;
padding-top: 30upx;
}
.order-details .wrapper .actualPay .money {
font-weight: bold;
font-size: 30upx;
}
.order-details .footer {
width: 100%;
height: 100upx;
position: fixed;
bottom: 0;
left: 0;
background-color: #fff;
padding: 0 30upx;
border-top: 1px solid #eee;
}
.order-details .footer .bnt {
width: auto;
height: 60upx;
line-height: 60upx;
text-align: center;
line-height: upx;
border-radius: 50upx;
color: #fff;
font-size: 27upx;
padding: 0 3%;
}
.order-details .footer .bnt.cancel {
color: #aaa;
border: 1px solid #ddd;
}
.order-details .footer .bnt.default {
color: #444;
border: 1px solid #444;
}
.order-details .footer .bnt~.bnt {
margin-left: 18upx;
}
.pos-order-goods {
padding: 0 30upx;
background-color: #fff;
}
.pos-order-goods .goods {
height: 185upx;
}
.pos-order-goods .goods~.goods {
border-top: 1px dashed #e5e5e5;
}
.pos-order-goods .goods .picTxt {
width: 515upx;
}
.pos-order-goods .goods .picTxt .pictrue {
width: 130upx;
height: 130upx;
}
.pos-order-goods .goods .picTxt .pictrue image {
width: 100%;
height: 100%;
border-radius: 6upx;
}
.pos-order-goods .goods .picTxt .text {
width: 365upx;
height: 130upx;
}
.pos-order-goods .goods .picTxt .text .info {
font-size: 28upx;
color: #282828;
}
.pos-order-goods .goods .picTxt .text .attr {
font-size: 24upx;
color: #999;
}
.pos-order-goods .goods .money {
width: 164upx;
text-align: right;
font-size: 28upx;
}
.pos-order-goods .goods .money .x-money {
color: #282828;
}
.pos-order-goods .goods .money .num {
color: #ff9600;
margin: 5upx 0;
}
.pos-order-goods .goods .money .y-money {
color: #999;
text-decoration: line-through;
}
.public-total {
font-size: 28upx;
color: #282828;
border-top: 1px solid #eee;
height: 92upx;
line-height: 92upx;
text-align: right;
padding: 0 30upx;
background-color: #fff;
}
.public-total .money {
color: #ff4c3c;
}
</style>

View File

@ -1,466 +0,0 @@
<template>
<view class="pos-order-list" ref="container">
<view class="nav acea-row row-around row-middle">
<view class="item" :class="where.status == 0 ? 'on' : ''" @click="changeStatus(0)">
待付款
</view>
<view class="item" :class="where.status == 1 ? 'on' : ''" @click="changeStatus(1)">
待发货
</view>
<view class="item" :class="where.status == 2 ? 'on' : ''" @click="changeStatus(2)">
待收货
</view>
<view class="item" :class="where.status == 3 ? 'on' : ''" @click="changeStatus(3)">
待评价
</view>
<view class="item" :class="where.status == 4 ? 'on' : ''" @click="changeStatus(4)">
已完成
</view>
<view class="item" :class="where.status == -3 ? 'on' : ''" @click="changeStatus(-3)">
退款
</view>
</view>
<view class="list">
<view class="item" v-for="(item, index) in list" :key="index">
<view class="order-num acea-row row-middle" @click="toDetail(item)">
订单号{{ item.order_id }}
<span class="time">下单时间{{ item.add_time }}</span>
</view>
<view class="pos-order-goods" v-for="(val, key) in item._info" :key="key">
<view class="goods acea-row row-between-wrapper" @click="toDetail(item)">
<view class="picTxt acea-row row-between-wrapper">
<view class="pictrue">
<image :src="val.cart_info.productInfo.image" />
</view>
<view class="text acea-row row-between row-column">
<view class="info line2">
{{ val.cart_info.productInfo.store_name }}
</view>
<view class="attr" v-if="val.cart_info.productInfo.suk">
{{ val.cart_info.productInfo.suk }}
</view>
</view>
</view>
<view class="money">
<view class="x-money">{{ val.cart_info.productInfo.price }}</view>
<view class="num">x{{ val.cart_info.cart_num }}</view>
<view class="y-money">
{{ val.cart_info.productInfo.ot_price }}
</view>
</view>
</view>
</view>
<view class="public-total">
{{ item.total_num }}件商品应支付
<span class="money">{{ item.pay_price }}</span> ( 邮费 ¥{{
item.total_postage
}}
)
</view>
<view class="operation acea-row row-between-wrapper">
<view class="more">
<!-- <view class="iconfont icon-gengduo" @click="more(index)"></view>-->
<!-- <view class="order" v-show="current === index">-->
<!-- <view class="items">-->
<!-- {{ where.status > 0 ? "删除" : "取消" }}订单-->
<!-- </view>-->
<!-- <view class="arrow"></view>-->
<!-- </view>-->
</view>
<view class="acea-row row-middle">
<view class="bnt" @click="modify(item, 0)" v-if="where.status == 0">
一键改价
</view>
<view class="bnt" @click="modify(item, 1)">订单备注</view>
<view class="bnt" @click="modify(item, 0)" v-if="where.status == -3 && item.refund_status === 1">
立即退款
</view>
<view class="bnt cancel" v-if="item.pay_type === 'offline' && item.paid === 0" @click="offlinePay(item)">
确认付款
</view>
<navigator class="bnt" v-if="where.status == 1" :url="'/pages/admin/delivery/index?id='+item.order_id">
</navigator>
</view>
</view>
</view>
</view>
<Loading :loaded="loaded" :loading="loading"></Loading>
<PriceChange :change="change" :orderInfo="orderInfo" v-on:closechange="changeclose($event)" v-on:savePrice="savePrice"
:status="status"></PriceChange>
</view>
</template>
<script>
import {
getAdminOrderList,
setAdminOrderPrice,
setAdminOrderRemark,
setOfflinePay,
setOrderRefund
} from "@/api/admin";
import Loading from '@/components/Loading/index'
import PriceChange from '@/components/PriceChange/index'
import { isMoney } from '@/utils/validate.js'
export default {
name: "AdminOrderList",
components: {
Loading,
PriceChange
},
data() {
return {
current: "",
change: false,
types: 0,
where: {
page: 1,
limit: 10,
status: 0
},
list: [],
loaded: false,
loading: false,
orderInfo: {},
status: ""
};
},
watch: {
"$route.params.types": function(newVal) {
let that = this;
if (newVal != undefined) {
that.where.status = newVal;
that.init();
}
},
types: function() {
this.getIndex();
}
},
onLoad(option) {
this.where.status = option.types
this.current = "";
this.getIndex();
},
methods: {
//
getIndex: function() {
let that = this;
if (that.loading || that.loaded) return;
that.loading = true;
getAdminOrderList(that.where).then(
res => {
that.loading = false;
that.loaded = res.data.length < that.where.limit;
that.list.push.apply(that.list, res.data);
that.where.page = that.where.page + 1;
},
err => {
that.$dialog.error(err);
}
);
},
//
init: function() {
this.list = [];
this.where.page = 1;
this.loaded = false;
this.loading = false;
this.getIndex();
this.current = "";
},
//
changeStatus(val) {
if (this.where.status != val) {
this.where.status = val;
this.init();
}
},
//
modify: function(item, status) {
let temp = status.toString()
this.change = true;
this.orderInfo = item;
this.status = temp;
},
changeclose: function(msg) {
this.change = msg;
},
async savePrice(opt) {
let that = this,
data = {},
price = opt.price,
refund_price = opt.refund_price,
refund_status = that.orderInfo.refund_status,
remark = opt.remark;
data.order_id = that.orderInfo.order_id;
if (that.status == 0 && refund_status === 0) {
if(!isMoney(price)){
return that.$util.Tips({title: '请输入正确的金额'});
}
data.price = price;
setAdminOrderPrice(data).then(
function() {
that.change = false;
that.$util.Tips({
title:'改价成功',
icon:'success'
})
that.init();
},
function() {
that.change = false;
that.$util.Tips({
title:'改价失败',
icon:'none'
})
}
);
} else if (that.status == 0 && refund_status === 1) {
if(!isMoney(refund_price)){
return that.$util.Tips({title: '请输入正确的金额'});
}
data.price = refund_price;
data.type = opt.type;
setOrderRefund(data).then(
res => {
that.change = false;
that.$util.Tips({title: res});
that.init();
},
err => {
that.change = false;
that.$util.Tips({title: err});
}
);
} else {
if(!remark){
return this.$util.Tips({
title:'请输入备注'
})
}
data.remark = remark;
setAdminOrderRemark(data).then(
res => {
that.change = false;
this.$util.Tips({
title:res,
icon:'success'
})
that.init();
},
err => {
that.change = false;
that.$util.Tips({title: err});
}
);
}
},
toDetail(item){
uni.navigateTo({
url:`/pages/admin/orderDetail/index?id=${item.order_id}`
})
}
},
onReachBottom() {
this.getIndex()
}
}
</script>
<style>
.pos-order-list .nav {
width: 100%;
height: 96upx;
background-color: #fff;
font-size: 30upx;
color: #282828;
position: fixed;
top: 0;
left: 0;
z-index: 9999;
}
.pos-order-list .nav .item.on {
color: #2291f8;
}
.pos-order-list .list {
margin-top: 120upx;
}
.pos-order-list .list .item {
background-color: #fff;
width: 100%;
}
.pos-order-list .list .item~.item {
margin-top: 24upx;
}
.pos-order-list .list .item .order-num {
height: 124upx;
border-bottom: 1px solid #eee;
font-size: 30upx;
font-weight: bold;
color: #282828;
padding: 0 30upx;
}
.pos-order-list .list .item .order-num .time {
font-size: 26upx;
font-weight: normal;
color: #999;
margin-top: -40upx;
}
.pos-order-list .list .item .operation {
padding: 20upx 30upx;
margin-top: 3upx;
}
.pos-order-list .list .item .operation .more {
position: relative;
}
.pos-order-list .list .item .operation .icon-gengduo {
font-size: 50upx;
color: #aaa;
}
.pos-order-list .list .item .operation .order .arrow {
width: 0;
height: 0;
border-left: 11upx solid transparent;
border-right: 11upx solid transparent;
border-top: 20upx solid #e5e5e5;
position: absolute;
left: 15upx;
bottom: -18upx;
}
.pos-order-list .list .item .operation .order .arrow:before {
content: '';
width: 0;
height: 0;
border-left: 7upx solid transparent;
border-right: 7upx solid transparent;
border-top: 20upx solid #fff;
position: absolute;
left: -7upx;
bottom: 0;
}
.pos-order-list .list .item .operation .order {
width: 200upx;
background-color: #fff;
border: 1px solid #eee;
border-radius: 10upx;
position: absolute;
top: -100upx;
z-index: 9;
}
.pos-order-list .list .item .operation .order .items {
height: 77upx;
line-height: 77upx;
text-align: center;
}
.pos-order-list .list .item .operation .order .items~.items {
border-top: 1px solid #f5f5f5;
}
.pos-order-list .list .item .operation .bnt {
font-size: 28upx;
color: #5c5c5c;
width: 170upx;
height: 60upx;
border-radius: 30upx;
border: 1px solid #bbb;
text-align: center;
line-height: 60upx;
}
.pos-order-list .list .item .operation .bnt~.bnt {
margin-left: 14upx;
}
.pos-order-goods {
padding: 0 30upx;
background-color: #fff;
}
.pos-order-goods .goods {
height: 185upx;
}
.pos-order-goods .goods~.goods {
border-top: 1px dashed #e5e5e5;
}
.pos-order-goods .goods .picTxt {
width: 515upx;
}
.pos-order-goods .goods .picTxt .pictrue {
width: 130upx;
height: 130upx;
}
.pos-order-goods .goods .picTxt .pictrue image {
width: 100%;
height: 100%;
border-radius: 6upx;
}
.pos-order-goods .goods .picTxt .text {
width: 365upx;
height: 130upx;
}
.pos-order-goods .goods .picTxt .text .info {
font-size: 28upx;
color: #282828;
}
.pos-order-goods .goods .picTxt .text .attr {
font-size: 24upx;
color: #999;
}
.pos-order-goods .goods .money {
width: 164upx;
text-align: right;
font-size: 28upx;
}
.pos-order-goods .goods .money .x-money {
color: #282828;
}
.pos-order-goods .goods .money .num {
color: #ff9600;
margin: 5upx 0;
}
.pos-order-goods .goods .money .y-money {
color: #999;
text-decoration: line-through;
}
.public-total {
font-size: 28upx;
color: #282828;
border-top: 1px solid #eee;
height: 92upx;
line-height: 92upx;
text-align: right;
padding: 0 30upx;
background-color: #fff;
}
.public-total .money {
color: #ff4c3c;
}
</style>

File diff suppressed because one or more lines are too long

Binary file not shown.

Before

Width:  |  Height:  |  Size: 191 KiB

View File

@ -1,631 +0,0 @@
<template>
<div class="statistical-page" ref="container">
<div class="navs">
<div class="list">
<div class="item" :class="time == 'today' ? 'on' : ''" @click="setTime('today')">
今天
</div>
<div class="item" :class="time == 'yesterday' ? 'on' : ''" @click="setTime('yesterday')">
昨天
</div>
<div class="item" :class="time == 'seven' ? 'on' : ''" @click="setTime('seven')">
最近7天
</div>
<div class="item" :class="time == 'month' ? 'on' : ''" @click="setTime('month')">
本月
</div>
<div class="item" :class="time == 'date' ? 'on' : ''" @click="dateTitle">
<!-- <span class="iconfont icon-xiangxia"></span>
<span v-for="(value, index) in renderValues" :key="index">
{{ value }}</span
> -->
自定义
</div>
</div>
</div>
<div class="wrapper">
<div class="title">
{{ title }}{{ this.where.type == 1 ? "营业额(元)" : "订单量(份)" }}
</div>
<div class="money">{{ time_price }}</div>
<div class="increase acea-row row-between-wrapper">
<div>
{{ title }}增长率<span :class="increase_time_status === 1 ? 'red' : 'green'">{{ increase_time_status === 1 ? "" : "-" }}{{ growth_rate }}%
<span class="iconfont" :class="
increase_time_status === 1
? 'icon-xiangshang1'
: 'icon-xiangxia2'
"></span></span>
</div>
<div>
{{ title }}增长<span :class="increase_time_status === 1 ? 'red' : 'green'">{{ increase_time_status === 1 ? "" : "-" }}{{ increase_time }}
<span class="iconfont" :class="
increase_time_status === 1
? 'icon-xiangshang1'
: 'icon-xiangxia2'
"></span></span>
</div>
</div>
</div>
<div class="chart">
<div class="chart-title">
单位{{where.type == 1?'元':'份'}}
</div>
<canvas canvas-id="canvasLineA" id="canvasLineA" class="charts" disable-scroll=true @touchstart="touchLineA"
@touchmove="moveLineA" @touchend="touchEndLineA"></canvas>
</div>
<div class="public-wrapper">
<div class="title">
<span class="iconfont icon-xiangxishuju"></span>详细数据
</div>
<div class="nav acea-row row-between-wrapper">
<div class="data">日期</div>
<div class="browse">订单量</div>
<div class="turnover">成交额</div>
</div>
<div class="conter">
<div class="item acea-row row-between-wrapper" v-for="(item, index) in list" :key="index">
<div class="data">{{ item.time }}</div>
<div class="browse">{{ item.count }}</div>
<div class="turnover">{{ item.price }}</div>
</div>
</div>
</div>
<uni-calendar ref="calendar" :date="info.date" :insert="info.insert" :lunar="info.lunar" :startDate="info.startDate" :endDate="info.endDate" :range="info.range" @confirm="confirm" :showMonth="info.showMonth" />
<div class="mask" @touchmove.prevent v-show="current === true" @click="close"></div>
<!-- <Loading :loaded="loaded" :loading="loading"></Loading> -->
</div>
</template>
<script>
import uCharts from '@/components/ucharts/ucharts'
import uniCalendar from '@/components/uni-calendar/uni-calendar.vue'
var canvaLineA = null;
// import Calendar from 'mpvue-calendar'
// #ifdef MP-WEIXIN
// import 'mpvue-calendar/src/style.css
// #endif
// #ifdef H5
// import 'mpvue-calendar/src/browser-style.css'
// #endif
import {
getStatisticsMonth,
getStatisticsTime
} from "@/api/admin";
// import Loading from "@components/Loading";
const year = new Date().getFullYear();
const month = new Date().getMonth() + 1;
const day = new Date().getDate();
export default {
name: "Statistics",
components: {
// Calendar,
// uCharts
uniCalendar
},
props: {},
data: function() {
return {
value: [
[year, month, day - 1],
[year, month, day]
],
isrange: true,
weekSwitch: false,
ismulti: false,
monFirst: true,
clean: false, //
lunar: false, //
renderValues: [],
monthRange: [],
current: false,
where: {
start: "",
stop: "",
type: ""
},
types: "", //|order=|price=
time: "", //|today=|yesterday=|month=
title: "", //|today=|yesterday=|month=
growth_rate: "", //
increase_time: "", //
increase_time_status: "", //
time_price: "", //
loaded: false,
loading: false,
filter: {
page: 1,
limit: 10,
start: "",
stop: ""
},
list: [],
// charts
cWidth: '',
cHeight: '',
pixelRatio: 1,
textarea: '',
"LineA": {
"categories": ["2012", "2013", "2014", "2015", "2016", "2017"],
"series": [{
"data": [35, 8, 25, 37, 4, 20]
}]
},
info: {
startDate: '',
endDate: '',
lunar: false,
range: true,
insert: false,
selected: [],
showMonth:false
}
};
},
watch: {
"$route.params": function(newVal) {
var that = this;
if (newVal != undefined) {
that.setType(newVal.type);
that.setTime(newVal.time);
that.getIndex();
}
}
},
onLoad: function(options) {
this.setType(options.type);
this.setTime(options.time);
this.cWidth = uni.upx2px(690);
this.cHeight = uni.upx2px(500);
// this.handelRenderValues();
// this.getIndex();
this.getInfo();
// this.$scroll(this.$refs.container, () => {
// !this.loading && this.getInfo();
// });
},
computed: {
monthRangeText() {
return this.monthRange.length ? "固定" : "指定范围";
}
},
methods: {
getIndex: function() {
let tempDay = []
let tempNum = []
var that = this;
getStatisticsTime(that.where).then(
res => {
var _info = res.data.chart,
day = [],
num = [];
_info.forEach(function(item) {
day.push(item.time);
num.push(item.num);
});
that.growth_rate = res.data.growth_rate;
that.increase_time = res.data.increase_time;
that.increase_time_status = res.data.increase_time_status;
that.time_price = res.data.time;
res.data.chart.forEach((item, index) => {
tempDay.push(item.time)
tempNum.push(item.num)
})
that.LineA.categories = tempDay
that.LineA.series[0].data = tempNum
that.showLineA("canvasLineA", that.LineA);
},
error => {
that.$dialog.error(error);
}
);
},
setTime: function(time) {
let self = this
this.time = time;
var year = new Date().getFullYear(),
month = new Date().getMonth() + 1,
day = new Date().getDate();
this.list = [];
this.filter.page = 1;
this.loaded = false;
this.loading = false;
switch (time) {
case "today":
this.where.start =
new Date(Date.parse(year + "/" + month + "/" + day)).getTime() /
1000;
this.where.stop =
new Date(Date.parse(year + "/" + month + "/" + day)).getTime() /
1000 +
24 * 60 * 60 -
1;
this.title = "今日";
this.getIndex();
this.getInfo();
break;
case "yesterday":
this.where.start =
new Date(Date.parse(year + "/" + month + "/" + day)).getTime() /
1000 -
24 * 60 * 60;
this.where.stop =
new Date(Date.parse(year + "/" + month + "/" + day)).getTime() /
1000 -
1;
this.title = "昨日";
this.getIndex();
this.getInfo();
break;
case "month":
this.where.start =
new Date(year, new Date().getMonth(), 1).getTime() / 1000;
this.where.stop = new Date(year, month, 1).getTime() / 1000 - 1;
this.title = "本月";
this.getIndex();
this.getInfo();
break;
case "seven":
this.where.start =
new Date(Date.parse(year + "/" + month + "/" + day)).getTime() /
1000 +
24 * 60 * 60 -
7 * 3600 * 24;
this.where.stop =
new Date(Date.parse(year + "/" + month + "/" + day)).getTime() /
1000 +
24 * 60 * 60 -
1;
this.title = "七日";
this.getIndex();
this.getInfo();
break;
}
},
setType: function(type) {
switch (type) {
case "price":
this.where.type = 1;
break;
case "order":
this.where.type = 2;
break;
}
},
dateTitle: function() {
this.$refs.calendar.open()
this.time = 'date'
// this.current = true;
},
close: function() {
this.current = false;
},
getInfo: function() {
var that = this;
if (that.loading || that.loaded) return;
that.loading = true;
that.filter.start = that.where.start;
that.filter.stop = that.where.stop;
getStatisticsMonth(that.filter).then(
res => {
that.loading = false;
that.loaded = res.data.length < that.filter.limit;
that.list.push.apply(that.list, res.data);
that.filter.page = that.filter.page + 1;
},
error => {
that.$dialog.message(error);
}
);
},
// charts
showLineA(canvasId, chartData) {
let _self = this
canvaLineA = new uCharts({
$this: _self,
canvasId: canvasId,
type: 'line',
fontSize: 11,
padding: [15, 15, 0, 15],
legend: {
show: false,
padding: 5,
lineHeight: 11,
margin: 5,
},
dataLabel: true,
dataPointShape: true,
dataPointShapeType: 'hollow',
background: '#FFFFFF',
pixelRatio: _self.pixelRatio,
categories: chartData.categories,
series: chartData.series,
animation: true,
enableScroll: true, //
xAxis: {
disableGrid: false,
type: 'grid',
gridType: 'dash',
itemCount: 4,
scrollShow: true,
scrollAlign: 'left'
},
yAxis: {
//disabled:true
gridType: 'dash',
splitNumber: 8,
min: 0,
max: 30,
format: (val) => {
return val.toFixed(0)
} //Y
},
width: _self.cWidth * _self.pixelRatio,
height: _self.cHeight * _self.pixelRatio,
extra: {
line: {
type: 'straight'
}
},
});
},
// charts
touchLineA(e) {
canvaLineA.scrollStart(e);
},
moveLineA(e) {
canvaLineA.scroll(e);
},
touchEndLineA(e) {
canvaLineA.scrollEnd(e);
},
//
confirm(e) {
let self = this
if(e.range.after && e.range.before){
let star = new Date(e.range.after).getTime()/1000
let stop = new Date(e.range.before).getTime()/1000
self.where.start = star
self.where.stop = stop
self.list = [];
self.filter.page = 1;
self.loaded = false;
self.loading = false;
Promise.all([self.getIndex(),self.getInfo()]);
}
},
},
onReachBottom() {
this.getInfo();
}
};
</script>
<style>
/*交易额统计*/
.statistical-page .navs {
width: 100%;
height: 96upx;
background-color: #fff;
overflow: hidden;
line-height: 96upx;
position: fixed;
top: 0;
left: 0;
z-index: 9;
}
.statistical-page .navs .list {
overflow-y: hidden;
overflow-x: auto;
white-space: nowrap;
-webkit-overflow-scrolling: touch;
width: 100%;
}
.statistical-page .navs .item {
font-size: 32upx;
color: #282828;
margin-left: 60upx;
display: inline-block;
}
.statistical-page .navs .item.on {
color: #2291f8;
}
.statistical-page .navs .item .iconfont {
font-size: 25upx;
margin-left: 13upx;
}
.statistical-page .wrapper {
width: 740upx;
background-color: #fff;
border-radius: 10upx;
margin: 119upx auto 0 auto;
padding: 50upx 60upx;
}
.statistical-page .wrapper .title {
font-size: 30upx;
color: #999;
text-align: center;
}
.statistical-page .wrapper .money {
font-size: 72upx;
color: #fba02a;
text-align: center;
margin-top: 10upx;
}
.statistical-page .wrapper .increase {
font-size: 28upx;
color: #999;
margin-top: 20upx;
}
.statistical-page .wrapper .increase .red {
color: #ff6969;
}
.statistical-page .wrapper .increase .green {
color: #1abb1d;
}
.statistical-page .wrapper .increase .iconfont {
font-size: 23upx;
margin-left: 15upx;
}
.statistical-page .chart {
width: 690upx;
background-color: #fff;
border-radius: 10upx;
margin: 23upx auto 0 auto;
/* padding: 25upx 22upx 0 22upx; */
}
.statistical-page .chart .chart-title{
padding:20upx 20upx 10upx;
font-size: 26upx;
color: #999;
}
.statistical-page .chart canvas {
width: 100%;
height: 530rpx;
}
.statistical-page .chart .company {
font-size: 26upx;
color: #999;
}
.yd-confirm {
background-color: #fff;
font-size: unset;
width: 540upx;
height: 250upx;
border-radius: 40upx;
}
.yd-confirm-hd {
text-align: center;
}
.yd-confirm-title {
color: #030303;
font-weight: bold;
font-size: 36upx;
}
.yd-confirm-bd {
text-align: center;
font-size: 28upx;
color: #333333;
}
.yd-confirm-ft {
line-height: 90upx;
margin-top: 14px;
border-top: 1upx solid #eee;
}
.yd-confirm-ft>a {
color: #e93323;
}
.yd-confirm-ft>a.primary {
border-left: 1upx solid #eee;
color: #e93323;
}
.echarts {
width: 100%;
height: 550upx;
}
.calendar-wrapper {
position: fixed;
bottom: 0;
left: 0;
width: 100%;
z-index: 777;
transform: translate3d(0, 100%, 0);
transition: all 0.3s cubic-bezier(0.25, 0.5, 0.5, 0.9);
}
.calendar-wrapper.on {
transform: translate3d(0, 0, 0);
}
.statistical-page .wrapper .increase {
font-size: 26upx;
}
.statistical-page .wrapper .increase .iconfont {
margin-left: 0;
}
.public-wrapper .title {
font-size: 30upx;
color: #282828;
padding: 0 30upx;
margin-bottom: 20upx;
}
.public-wrapper .title .iconfont {
color: #2291f8;
font-size: 40upx;
margin-right: 13upx;
vertical-align: middle;
}
.public-wrapper {
margin: 18upx auto 0 auto;
width: 690upx;
background-color: #fff;
border-radius: 10upx;
padding-top: 25upx;
}
.public-wrapper .nav {
padding: 0 30upx;
height: 70upx;
line-height: 70upx;
font-size: 24upx;
color: #999;
}
.public-wrapper .data {
width: 210upx;
text-align: left;
}
.public-wrapper .browse {
width: 192upx;
text-align: right;
}
.public-wrapper .turnover {
width: 227upx;
text-align: right;
}
.public-wrapper .conter {
padding: 0 30upx;
}
.public-wrapper .conter .item {
border-bottom: 1px solid #f7f7f7;
height: 70upx;
font-size: 24upx;
}
.public-wrapper .conter .item .turnover {
color: #d84242;
}
</style>

View File

@ -25,7 +25,6 @@
wechat.auth(code, state)
.then(() => {
getUserInfo().then(res => {
that.$store.commit("SETUID", res.data.uid);
location.href = decodeURIComponent(
decodeURIComponent(option.back_url)
);

View File

@ -63,7 +63,6 @@ export default {
if (this.type === "1") {
this.name = "精品推荐";
this.icon = "icon-jingpintuijian";
// document.title = "";
uni.setNavigationBarTitle({
title:"精品推荐"
})

View File

@ -266,7 +266,6 @@
import {
getOrderDetail
} from "@/api/order";
// import VueCoreImageUpload from "vue-core-image-upload";
import easyUpload from '@/components/easy-upload/easy-upload.vue'
import {
TOKENNAME,
@ -291,8 +290,6 @@
export default {
name: NAME,
components: {
// swiper,
// swiperSlide,
easyUpload,
home
},
@ -482,7 +479,6 @@
this.getHistory();
},
imageuploaded(res) {
console.log(res)
if (res.status !== 200) return this.$dialog.error(res || "上传图片失败");
this.sendMsg(res.data.url, 3);
},
@ -515,7 +511,6 @@
this.active = false;
},
keyup: function() {
console.log(this.$refs.input.innerHTML.length);
if (this.$refs.input.innerHTML.length > 0) {
this.sendColor = true;
} else {
@ -557,13 +552,6 @@
}else{
this.sendColor = false
}
// if ($event.keyCode === 13) {
// $event.preventDefault();
// if (this.$refs.input.innerHTML) {
// this.sendMsg(this.$refs.input.innerHTML, 1);
// this.$refs.input.innerHTML = "";
// }
// }
this.height();
},
start() {
@ -622,9 +610,6 @@
// this.$refs.input.blur();
// });
}
// this.$nextTick(function() {
// window.scrollTo(0, document.documentElement.scrollHeight);
// });
this.height();
},
height() {
@ -771,7 +756,7 @@
.broadcast_details_pic {
font-size: 36rpx;
color: #e93323;
color: $theme-color;
text-align: left;
}

View File

@ -36,7 +36,6 @@
},
onLoad: function (options) {
this.type = options.type;
cosole.log('hello')
},
onShow: function () {
let type = this.type;

View File

@ -1,9 +1,5 @@
<template>
<view class='productSort copy-data'>
<!-- #ifdef APP-PLUS -->
<view class="sys-head" :style="{height:sysHeight}"></view>
<!-- #endif -->
<view class='productSort'>
<view class='header acea-row row-center-wrapper'>
<view class='acea-row row-between-wrapper input'>
<text class='iconfont icon-sousuo'></text>
@ -11,12 +7,15 @@
placeholder-class='placeholder'></input>
</view>
</view>
<view class='aside'>
<view class='aside' :style="{bottom: tabbarH + 'px',height: height + 'rpx'}">
<scroll-view scroll-y="true" scroll-with-animation='true' style="height: 100%;">
<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>
</scroll-view>
</view>
<view class='conter'>
<scroll-view scroll-y="true" :scroll-into-view="toView" :style='"height:"+height+"rpx;"' @scroll="scroll"
<scroll-view scroll-y="true" :scroll-into-view="toView" :style='"height:"+height+"rpx;margin-top: 96rpx;"' @scroll="scroll"
scroll-with-animation='true'>
<block v-for="(item,index) in productList" :key="index">
@ -29,9 +28,6 @@
<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>
@ -48,7 +44,6 @@
</template>
<script>
let sysHeight = uni.getSystemInfoSync().statusBarHeight + 'px';
import {
getCategoryList
} from '@/api/store.js';
@ -63,14 +58,14 @@
height: 0,
hightArr: [],
toView: "",
tabbarH: 0,
sysHeight: sysHeight,
tabbarH: 0
}
},
onLoad(options) {
this.getAllCategory();
},
onShow() {},
onShow(){
},
methods: {
infoScroll: function() {
let that = this;
@ -81,7 +76,7 @@
//
uni.getSystemInfo({
success: function(res) {
that.height = (res.windowHeight) * (750 / res.windowWidth);
that.height = (res.windowHeight) * (750 / res.windowWidth) - 98;
},
});
let height = 0;
@ -139,9 +134,6 @@
</script>
<style scoped lang="scss">
.sys-head{
background-color: #fff;
}
.productSort .header {
width: 100%;
height: 96rpx;
@ -164,7 +156,7 @@
}
.productSort .header .input .iconfont {
font-size: 35rpx;
font-size: 26rpx;
color: #555;
}
@ -180,18 +172,15 @@
.productSort .aside {
position: fixed;
width: 24%;
width: 180rpx;
left: 0;
top:0;
background-color: #f7f7f7;
overflow-y: auto;
overflow-y: scroll;
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 {
@ -256,6 +245,9 @@
width: 100%;
height: 100%;
border-radius: 50%;
div{
background-color: #f7f7f7;
}
}
.productSort .conter .list .item .name {

File diff suppressed because it is too large Load Diff

View File

@ -2,12 +2,15 @@
<view>
<view class='productList'>
<view class='search bg-color acea-row row-between-wrapper'>
<!-- #ifdef H5 -->
<view class="iconfont icon-xiangzuo" @click="goback()"></view>
<!-- #endif -->
<view class='input acea-row row-between-wrapper'><text class='iconfont icon-sousuo'></text>
<input placeholder='搜索商品名称' placeholder-class='placeholder' confirm-type='search' name="search" :value='where.keyword'
@confirm="searchSubmit"></input>
<input placeholder='搜索商品名称' placeholder-class='placeholder' confirm-type='search' name="search"
:value='where.keyword' @confirm="searchSubmit"></input>
</view>
<view class='iconfont' :class='is_switch==true?"icon-pailie":"icon-tupianpailie"' @click='Changswitch'>
</view>
<view class='iconfont' :class='is_switch==true?"icon-pailie":"icon-tupianpailie"' @click='Changswitch'></view>
</view>
<view class='nav acea-row row-middle'>
<view class='item' :class='title ? "font-color":""' @click='set_where(1)'>{{title ? title:'默认'}}</view>
@ -26,17 +29,26 @@
<!-- down -->
<view class='item' :class='nows ? "font-color":""' @click='set_where(4)'>新品</view>
</view>
<view :class='is_switch==true?"":"listBox"' v-if="productList.length>0">
<view class='list acea-row row-between-wrapper' :class='is_switch==true?"":"on"'>
<view class='item' :class='is_switch==true?"":"on"' hover-class='none' v-for="(item,index) in productList" :key="index" @click="godDetail(item)">
<view class='item' :class='is_switch==true?"":"on"' hover-class='none'
v-for="(item,index) in productList" :key="index" @click="godDetail(item)">
<view class='pictrue' :class='is_switch==true?"":"on"'>
<image :src='item.image' :class='is_switch==true?"":"on"'></image>
<span class="pictrue_log_class" :class="is_switch === true ? 'pictrue_log_big' : 'pictrue_log'" v-if="item.activityH5 && item.activityH5.type === '1'"></span>
<span class="pictrue_log_class" :class="is_switch === true ? 'pictrue_log_big' : 'pictrue_log'" v-if="item.activityH5 && item.activityH5.type === '2'"></span>
<span class="pictrue_log_class" :class="is_switch === true ? 'pictrue_log_big' : 'pictrue_log'" v-if="item.activityH5 && item.activityH5.type === '3'"></span>
<span class="pictrue_log_class"
:class="is_switch === true ? 'pictrue_log_big' : 'pictrue_log'"
v-if="item.activityH5 && item.activityH5.type === '1'">秒杀</span>
<span class="pictrue_log_class"
:class="is_switch === true ? 'pictrue_log_big' : 'pictrue_log'"
v-if="item.activityH5 && item.activityH5.type === '2'">砍价</span>
<span class="pictrue_log_class"
:class="is_switch === true ? 'pictrue_log_big' : 'pictrue_log'"
v-if="item.activityH5 && item.activityH5.type === '3'">拼团</span>
</view>
<view class='text' :class='is_switch==true?"":"on"'>
<view class='name line1'>{{item.storeName}}</view>
<view class='money font-color' :class='is_switch==true?"":"on"'><text class='num'>{{item.price}}</text></view>
<view class='money font-color' :class='is_switch==true?"":"on"'><text
class='num'>{{item.price}}</text></view>
<view class='vip acea-row row-between-wrapper' :class='is_switch==true?"":"on"'>
<view class='vip-money' v-if="item.vip_price && item.vip_price > 0">{{item.vip_price}}
<image src='../../static/images/vip.png'></image>
@ -45,6 +57,7 @@
</view>
</view>
</view>
</view>
<view class='loadingicon acea-row row-center-wrapper' v-if='productList.length > 0'>
<text class='loading iconfont icon-jiazai' :hidden='loading==false'></text>{{loadTitle}}
</view>
@ -65,8 +78,12 @@
getProductHot
} from '@/api/store.js';
import recommend from '@/components/recommend';
import {mapGetters} from "vuex";
import { goShopDetail } from '@/libs/order.js'
import {
mapGetters
} from "vuex";
import {
goShopDetail
} from '@/libs/order.js'
export default {
computed: mapGetters(['uid']),
components: {
@ -103,7 +120,6 @@
this.title = options.title || '';
this.$set(this.where, 'keyword', options.searchValue || '');
this.get_product_list();
this.get_host_product();
},
methods: {
goback() {
@ -205,6 +221,9 @@
that.loadTitle = loadend ? '已全部加载' : '加载更多';
that.$set(that, 'productList', productList);
that.$set(that.where, 'page', that.where.page + 1);
if (that.productList.length === 0) {
this.get_host_product();
}
}).catch(err => {
that.loading = false;
that.loadTitle = '加载更多';
@ -229,6 +248,10 @@
.iconfont {
color: #fff;
}
.listBox{
padding: 20px 15px;
margin-top: 154rpx;
}
.productList .search {
width: 100%;
height: 86rpx;
@ -250,7 +273,12 @@
}
.productList .search .input input {
/* #ifdef H5 */
width: 528rpx;
/* #endif */
/* #ifndef H5 */
width: 548rpx;
/* #endif */
height: 100%;
font-size: 26rpx;
}
@ -302,34 +330,39 @@
}
.productList .list {
padding: 0 20rpx;
margin-top: 172rpx;
padding: 0 30rpx;
margin-top: 192rpx;
}
.productList .list.on {
border-radius: 14rpx;
margin-top: 0 !important;
background-color: #fff;
border-top: 1px solid #f6f6f6;
padding: 40rpx 0 0 0;
// margin: 20rpx 0;
// background-color: #fff;
}
.productList .list .item {
width: 345rpx;
margin-top: 20rpx;
width: 335rpx;
background-color: #fff;
border-radius: 20rpx;
border-radius: 14rpx;
margin-bottom: 20rpx;
}
.productList .list .item.on {
width: 100%;
display: flex;
border-bottom: 1rpx solid #f6f6f6;
padding: 30rpx 0;
padding: 0 24rpx 50rpx 24rpx;
margin: 0;
border-radius: 14rpx;
}
.productList .list .item .pictrue {
position: relative;
width: 100%;
height: 345rpx;
height: 335rpx;
}
.productList .list .item .pictrue.on {
@ -348,14 +381,14 @@
}
.productList .list .item .text {
padding: 20rpx 17rpx 26rpx 17rpx;
padding: 18rpx 20rpx;
font-size: 30rpx;
color: #222;
}
.productList .list .item .text.on {
width: 508rpx;
padding: 0 0 0 22rpx;
width: 456rpx;
padding: 0 0 0 20rpx;
}
.productList .list .item .text .money {
@ -397,5 +430,6 @@
.noCommodity {
background-color: #fff;
padding-bottom: 30rpx;
margin-top: 172rpx;
}
</style>

View File

@ -21,7 +21,7 @@
</view>
</view>
<view class='noCommodity'>
<view class='pictrue' v-if="bastList.length == 0">
<view class='pictrue' v-if="bastList.length == 0 && isbastList">
<image src='../../static/images/noSearch.png'></image>
</view>
<recommend :hostProduct='hostProduct' v-if="bastList.length == 0"></recommend>
@ -56,7 +56,8 @@
loadend: false,
loadTitle: '加载更多',
hotPage:1,
isScroll:true
isScroll:true,
isbastList: false
};
},
onShow: function() {
@ -97,6 +98,7 @@
that.loadend = loadend;
that.loadTitle = loadend ? "😕人家是有底线的~~" : "加载更多";
that.page = that.page + 1;
that.isbastList = true;
}).catch(err => {
that.loading = false,
that.loadTitle = '加载更多'
@ -153,10 +155,11 @@
.searchGood .search {
padding-left: 30rpx;
background-color: #fff !important;
}
.searchGood .search {
margin-top: 20rpx;
padding-top: 20rpx;
}
.searchGood .search .input {
@ -170,7 +173,7 @@
.searchGood .search .input input {
width: 472rpx;
font-size: 28rpx;
font-size: 26rpx;
}
.searchGood .search .input .placeholder {
@ -206,7 +209,7 @@
color: #454545;
padding: 0 21rpx;
height: 60rpx;
border-radius: 3rpx;
border-radius: 30rpx;
line-height: 60rpx;
border: 1rpx solid #aaa;
margin: 0 0 20rpx 20rpx;

File diff suppressed because one or more lines are too long

View File

@ -1,17 +1,25 @@
<template>
<view :class="{borderShow:isBorader}">
<view class="combination" v-if="combinationList.length">
<view class="title acea-row row-right">
<!-- <view class="acea-row row-middle">
<view class="sign">
<image src="../../../static/images/sign02.png"></image>
<view class="title acea-row row-between">
<view class="spike-bd">
<view v-if="assistUserList.length > 0" class="activity_pic">
<view v-for="(item,index) in assistUserList" :key="index" class="picture"
:style='index===2?"position: relative":"position: static"'>
<span class="avatar" :style='"background-image: url("+item+")"'></span>
<span v-if="index===2 && Number(assistUserCount) > 3" class="mengceng">
<i>···</i>
</span>
</view>
<view class="name">拼团惠<text>享超值开团价</text></view>
</view> -->
<navigator url="/pages/activity/goods_combination/index" hover-class="none" class="more acea-row row-center-wrapper">更多<text class="iconfont icon-xiangyou"></text></navigator>
<text class="pic_count">{{assistUserCount}}人参与</text>
</view>
</view>
<navigator url="/pages/activity/goods_combination/index" hover-class="none"
class="more acea-row row-center-wrapper">GO<text class="iconfont icon-xiangyou"></text></navigator>
</view>
<view class="conter acea-row">
<scroll-view scroll-x="true" style="white-space: nowrap; vertical-align: middle;" show-scrollbar="false">
<scroll-view scroll-x="true" style="white-space: nowrap; vertical-align: middle;"
show-scrollbar="false">
<view class="itemCon" v-for="(item, index) in combinationList" :key="index" @click="goDetail(item)">
<view class="item">
<view class="pictrue">
@ -42,7 +50,7 @@
<script>
let app = getApp();
import {
getCombinationList
getCombinationIndexApi
} from '@/api/activity.js';
export default {
name: 'b_combination',
@ -50,6 +58,8 @@
return {
combinationList: [],
isBorader: false,
assistUserList: [],
assistUserCount: 0
};
},
created() {
@ -60,13 +70,10 @@
//
getCombinationList: function() {
let that = this;
// let limit = that.$config.LIMIT;
let data = {
page: 1,
limit: 4
};
getCombinationList(data).then(function(res) {
that.combinationList = res.data.list;
getCombinationIndexApi().then(function(res) {
that.combinationList = res.data.productList;
that.assistUserList = res.data.avatarList;
that.assistUserCount = res.data.totalPeople;
}).catch((res) => {
return that.$util.Tips({
title: res
@ -83,6 +90,57 @@
</script>
<style lang="scss" scoped>
.mengceng {
width: 38rpx;
height: 38rpx;
line-height: 36rpx;
background: rgba(51, 51, 51, 0.6);
text-align: center;
border-radius: 50%;
opacity: 1;
position: absolute;
left: 0px;
top: 2rpx;
color: #FFF;
i{
font-style: normal;
font-size: 20rpx;
}
}
.activity_pic {
margin-left: 28rpx;
padding-left: 20rpx;
.picture {
display: inline-block;
}
.avatar {
width: 38rpx;
height: 38rpx;
display: inline-table;
vertical-align: middle;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
border-radius: 50%;
background-repeat: no-repeat;
background-size: cover;
background-position: 0 0;
margin-right: -10rpx;
box-shadow: 0 0 0 1px #fff;
}
.pic_count {
margin-left: 30rpx;
color: $theme-color;
font-size: 22rpx;
font-weight: 500;
}
}
.default {
width: 690rpx;
height: 300rpx;
@ -91,20 +149,26 @@
background-color: #ccc;
text-align: center;
line-height: 300rpx;
.iconfont {
font-size: 80rpx;
}
}
.combination {
width: 700rpx;
width: auto;
background-color: #fff;
border-radius: 14rpx;
margin: 26rpx auto 0 auto;
padding: 25rpx 20rpx 21rpx 20rpx;
margin: 0 auto 30rpx auto;
padding: 16rpx 24rpx 24rpx 24rpx;
background-image: url(../../../static/images/pth.png);
background-repeat: no-repeat;
background-size: 100%;
.title {
width: 80%;
margin-left: 128rpx;
.sign {
width: 40rpx;
height: 40rpx;
@ -130,53 +194,67 @@
}
.more {
height: 37rpx;
width: 86rpx;
height: 40rpx;
background: linear-gradient(142deg, #FFE9CE 0%, #FFD6A7 100%);
opacity: 1;
border-radius: 18px;
font-size: 22rpx;
color: #666666;
padding-left: 2rpx;
color: #FE960F;
padding-left: 8rpx;
font-weight: 800;
.iconfont {
font-size: 20rpx;
font-size: 21rpx;
}
}
}
.conter {
margin-top: 28rpx;
margin-top: 24rpx;
.itemCon {
display: inline-block;
width: 174rpx;
width: 220rpx;
margin-right: 24rpx;
}
.item {
width: 100%;
.pictrue {
width: 100%;
height: 174rpx;
height: 220rpx;
border-radius: 6rpx;
image {
width: 100%;
height: 100%;
border-radius: 6rpx;
}
}
.text {
margin-top: 4rpx;
.y_money {
font-size: 20rpx;
font-size: 24rpx;
color: #999999;
text-decoration: line-through;
}
.name {
font-size: 24rpx;
color: #000;
margin-top: 14rpx;
}
.money {
color: #FD502F;
font-size: 28rpx;
height: 100%;
font-weight: bold;
margin: 2rpx 0;
margin: 10rpx 0 0rpx 0;
.num {
font-size: 28rpx;
}

View File

@ -3,12 +3,9 @@
<view class="combination" v-if="bargList.length">
<view class="title acea-row row-between">
<view class="acea-row row-column">
<view class="sign">
Hi{{userData.nickname || '亲爱的顾客'}}
<image src="../../../static/images/kanjia.png" class="pic"></image>
</view>
<view class="name"><text>你的好友正在邀请你参与砍价</text></view>
</view>
<navigator url="/pages/activity/goods_bargain/index" hover-class="none" class="more acea-row row-center-wrapper">更多<text class="iconfont icon-xiangyou"></text></navigator>
<navigator url="/pages/activity/goods_bargain/index" hover-class="none" class="more acea-row row-center-wrapper">GO<text class="iconfont icon-xiangyou"></text></navigator>
</view>
<view class="conter acea-row">
<scroll-view scroll-x="true" style="white-space: nowrap; vertical-align: middle;" show-scrollbar="false">
@ -21,7 +18,6 @@
<view class="name line1">{{item.title}}</view>
<view class="money">¥<text class="num">{{item.minPrice}}</text></view>
<view class="btn">参与砍价</view>
<!-- <view class="y_money">¥{{item.price}}</view> -->
</view>
</view>
</view>
@ -37,7 +33,7 @@
toLogin
} from '@/libs/login.js';
import {
getBargainList
getBargainIndexApi
} from '@/api/activity.js';
import { mapGetters } from 'vuex';
export default {
@ -60,17 +56,13 @@
methods: {
//
getBargainList() {
let limit = this.$config.LIMIT;
getBargainList({
page: 1,
limit: limit
}).then(res => {
this.bargList = res.data.list
getBargainIndexApi().then(res => {
this.bargList = res.data ? res.data.productList : [];
})
},
bargDetail(item){
uni.navigateTo({
url: `/pages/activity/goods_bargain_details/index?id=${item.id}&bargain=${this.uid}`
url: `/pages/activity/goods_bargain_details/index?id=${item.id}&startBargainUid=${this.uid}`
});
}
}
@ -78,6 +70,10 @@
</script>
<style lang="scss" scoped>
.pic{
width: 130rpx;
height: 30rpx;
}
.default{
width: 690rpx;
height: 300rpx;
@ -91,20 +87,19 @@
}
}
.combination{
width: 690rpx;
width: auto;
background-image: url(../../../static/images/kjbj.png);
background-repeat: no-repeat;
background-size: 100%;
// height: 288rpx;
background-color: #fff;
border-radius: 14rpx;
margin: 26rpx auto 0 auto;
margin: 30rpx auto 0 auto;
padding: 25rpx 20rpx 25rpx 20rpx;
.title {
.sign {
font-size: 32rpx;
color: #E93323;
color: $theme-color;
margin-bottom: 2rpx;
font-weight: bold;
margin-bottom: 10rpx;
@ -120,13 +115,17 @@
}
.more {
height: 37rpx;
width: 86rpx;
height: 40rpx;
background: linear-gradient(142deg, #FFE9CE 0%, #FFD6A7 100%);
opacity: 1;
border-radius: 18px;
font-size: 22rpx;
color: #666666;
padding-left: 2rpx;
color: #FE960F;
padding-left: 8rpx;
font-weight: 800;
.iconfont {
font-size: 20rpx;
font-size: 21rpx;
}
}
}
@ -134,14 +133,14 @@
margin-top: 28rpx;
.itemCon {
display: inline-block;
width: 174rpx;
width: 220rpx;
margin-right: 24rpx;
}
.item{
width:100%;
.pictrue{
width: 100%;
height: 174rpx;
height: 220rpx;
border-radius: 6rpx;
image{
width: 100%;
@ -152,7 +151,7 @@
.text{
margin-top: 4rpx;
.y_money {
font-size: 20rpx;
font-size: 24rpx;
color: #999999;
text-decoration: line-through;
}
@ -166,13 +165,13 @@
font-size: 28rpx;
height: 100%;
font-weight: bold;
margin: 2rpx 0;
margin: 10rpx 0;
.num {
font-size: 28rpx;
}
}
.btn{
width: 174rpx;
width: 220rpx;
height: 48rpx;
line-height: 48rpx;
text-align: center;

File diff suppressed because it is too large Load Diff

View File

@ -3,7 +3,7 @@
<view class='newsDetail'>
<view class='title'>{{articleInfo.title}}</view>
<view class='list acea-row row-middle'>
<view class='label'>{{articleInfo.categoryName}}</view>
<view class='label'>{{articleInfo.author}}</view>
<view class='item'></text>{{articleInfo.createTime}}</view>
<view class='item'><text class='iconfont icon-liulan'></text>{{articleInfo.visit}}</view>
</view>
@ -144,30 +144,25 @@
page {
background-color: #fff !important;
}
.newsDetail{
padding: 30rpx 0;
}
.newsDetail .title {
padding: 0 30rpx;
font-size: 34rpx;
color: #282828;
font-weight: bold;
margin: 45rpx 0 23rpx 0;
line-height: 1.5;
}
.newsDetail .list {
margin: 0 30rpx;
// border-bottom: 1rpx solid #eee;
margin: 28rpx 30rpx 0 30rpx;
padding-bottom: 25rpx;
}
.newsDetail .list .label {
font-size: 30rpx;
color: #B1B2B3;
// height: 38rpx;
// border-radius: 3rpx;
// text-align: center;
// line-height: 38rpx;
// padding: 0 10rpx;
}
.newsDetail .list .item {

View File

@ -7,7 +7,7 @@
<block v-for="(item,index) in imgUrls" :key="index">
<swiper-item>
<navigator :url="'/pages/news_details/index?id='+item.id">
<image :src="item.imageInput[0]" class="slide-image" />
<image :src="item.imageInput" class="slide-image" />
</navigator>
</swiper-item>
</block>
@ -16,7 +16,7 @@
<view class='nav' v-if="navList.length > 0">
<scroll-view class="scroll-view_x" scroll-x scroll-with-animation :scroll-left="scrollLeft" style="width:auto;overflow:hidden;">
<block v-for="(item,index) in navList" :key="index">
<view class='item' :class='active==item.id?"on":""' @click='tabSelect(item.id, index)'>
<view class='item borRadius14' :class='active==item.id?"on":""' @click='tabSelect(item.id, index)'>
<view>{{item.name}}</view>
<view class='line bg-color' v-if="active==item.id"></view>
</view>
@ -25,38 +25,15 @@
</view>
<view class='list'>
<block v-for="(item,index) in articleList" :key="index">
<navigator :url='"/pages/news_details/index?id="+item.id' hover-class='none' class='item acea-row row-between-wrapper'
v-if="item.imageInput.length == 1">
<navigator :url='"/pages/news_details/index?id="+item.id' hover-class='none' class='item acea-row row-between-wrapper'>
<view class='text acea-row row-column-between'>
<view class='name line2'>{{item.title}}</view>
<view>{{item.createTime}}</view>
</view>
<view class='pictrue'>
<image :src='item.imageInput[0]'></image>
<image :src='item.imageInput'></image>
</view>
</navigator>
<navigator :url='"/pages/news_details/index?id="+item.id' hover-class='none' class='item' v-else-if="item.imageInput.length == 2">
<view class='title line1'>{{item.title}}</view>
<view class='picList acea-row row-between-wrapper'>
<block v-for="(itemImg,indexImg) in item.imageInput" :key="indexImg">
<view class='pictrue'>
<image :src='itemImg'></image>
</view>
</block>
</view>
<view class='time'>{{item.createTime}}</view>
</navigator>
<navigator :url='"/pages/news_details/index?id="+item.id' hover-class='none' class='item' v-else-if="item.imageInput.length > 2">
<view class='title line1'>{{item.title}}</view>
<view class='picList on acea-row row-between-wrapper'>
<block v-for="(itemImg,indexImg) in item.imageInput" :key="indexImg">
<view class='pictrue'>
<image :src='itemImg'></image>
</view>
</block>
</view>
<view class='time'>{{item.createTime}}</view>
</navigator>
</block>
</view>
</view>
@ -194,7 +171,7 @@
.newsList .swiper .slide-image {
width: 100%;
height: 335rpx;
border-radius: 6rpx;
border-radius: 14rpx;
}
// #ifdef MP-WEIXIN
.newsList .swiper .wx-swiper-dot {
@ -213,7 +190,6 @@
margin-bottom: -15rpx;
}
// #endif
// #ifdef APP-PLUS || H5
.newsList .swiper .uni-swiper-dot {
width: 12rpx !important;
height: 12rpx !important;
@ -229,9 +205,8 @@
.newsList .swiper .uni-swiper-dots.uni-swiper-dots-horizontal {
margin-bottom: -15rpx;
}
// #endif
.newsList .nav {
padding: 0 30rpx;
padding: 0 24rpx;
width: 100%;
white-space: nowrap;
box-sizing: border-box;
@ -260,7 +235,7 @@
}
.newsList .list .item {
margin: 0 30rpx;
margin: 0 24rpx;
border-bottom: 1rpx solid #f0f0f0;
padding: 35rpx 0;
}
@ -273,7 +248,7 @@
.newsList .list .item .pictrue image {
width: 100%;
height: 100%;
border-radius: 6rpx;
border-radius: 14rpx;
}
.newsList .list .item .text {

View File

@ -1,97 +1,116 @@
<template>
<view>
<view class='shoppingCart copy-data'>
<view class='labelNav acea-row row-around row-middle'>
<view class='labelNav acea-row row-around'>
<view class='item'><text class='iconfont icon-xuanzhong'></text>100%正品保证</view>
<view class='item'><text class='iconfont icon-xuanzhong'></text>所有商品精挑细选</view>
<view class='item'><text class='iconfont icon-xuanzhong'></text>售后无忧</view>
</view>
<view class='nav acea-row row-between-wrapper'>
<view class="borRadius14 cartBox">
<view
v-if="(cartList.valid.length === 0 && cartList.invalid.length === 0) || (cartList.valid.length > 0)"
class='nav acea-row row-between-wrapper'>
<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 v-if="cartList.valid.length > 0 || cartList.invalid.length > 0"
class='administrate acea-row row-center-wrapper' @click='manage'>{{ footerswitch ? '管理' : '取消'}}
</view>
<view v-if="cartList.valid.length > 0 || cartList.invalid.length > 0">
</view>
<view v-if="cartList.valid.length > 0 || cartList.invalid.length > 0" class="pad30">
<view class='list'>
<checkbox-group @change="checkboxChange">
<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" />
<checkbox :value="(item.id).toString()" :checked="item.checked"
:disabled="!item.attrStatus && footerswitch" style="margin-right: 10rpx;" />
<!-- #endif -->
<!-- #ifdef MP -->
<checkbox :value="item.id" :checked="item.checked" :disabled="!item.attrStatus && footerswitch" />
<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'>
<navigator :url='"/pages/goods_details/index?id="+item.productId' 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>
<image :src='item.image'></image>
</view>
<view class='text'>
<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.attrStatus">{{item.truePrice}}</view>
<view class='line1' :class="item.attrStatus?'':'reColor'">{{item.storeName}}
</view>
<view class='infor line1' v-if="item.suk">{{item.suk}}</view>
<view class='money' v-if="item.attrStatus">{{item.price}}</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 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="reduce" :class="item.numSub ? 'on' : ''"
@click.stop='subCart(index)'>-</view>
<view class='num'>{{item.cartNum}}</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>
</navigator>
</view>
</block>
</checkbox-group>
</view>
<view class='invalidGoods' v-if="cartList.invalid.length > 0">
<!-- cartList.valid.length===0 && cartList.invalid.length > 0 -->
<view v-if="cartList.invalid.length > 0" class='invalidGoods borRadius14'
:style="cartList.valid.length===0 && cartList.invalid.length > 0 ? 'position: relative;z-index: 111;top: -120rpx;':'position: static;'">
<view class='goodsNav acea-row row-between-wrapper'>
<view @click='goodsOpen'><text class='iconfont' :class='goodsHidden==true?"icon-xiangxia":"icon-xiangshang"'></text>失效商品</view>
<view v-if="cartList.invalid.length > 1 || cartList.valid.length > 0" @click='goodsOpen'>
<text class='iconfont'
:class='goodsHidden==true?"icon-xiangxia":"icon-xiangshang"'></text>失效商品
</view>
<view v-else>
失效商品
</view>
<view class='del' @click='unsetCart'><text class='iconfont icon-shanchu1'></text>清空</view>
</view>
<view class='goodsList' :hidden='goodsHidden'>
<block v-for="(item,index) in cartList.invalid" :key='index'>
<view class='item acea-row row-between-wrapper'>
<view class='invalid'>失效</view>
<view 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>
<image :src='item.image'></image>
</view>
<view class='text acea-row row-column-between'>
<view class='line1 name'>{{item.productInfo.storeName}}</view>
<view class='infor line1' v-if="item.productInfo.attrInfo">{{item.productInfo.attrInfo.suk}}</view>
<view class='line1 name'>{{item.storeName}}</view>
<view class='infor line1' v-if="item.suk">{{item.suk}}</view>
<view class='acea-row row-between-wrapper'>
<!-- <view>{{item.truePrice}}</view> -->
<view class='end'>该商品已失效</view>
</view>
</view>
</view>
</view>
</block>
</view>
</view>
<view class='loadingicon acea-row row-center-wrapper' v-if="cartList.valid.length&&!loadend">
<!-- <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> -->
<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}}
<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='noCart' v-if="cartList.valid.length == 0 && cartList.invalid.length == 0 && canShow">
<view class='pictrue'>
<image src='../../static/images/noCart.png'></image>
</view>
<recommend :hostProduct='hostProduct'></recommend>
</view>
<view style='height:120rpx;color: #F5F5F5;'>{{selectCountPrice}}</view>
</view>
</view>
<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'>全选 ({{selectValue.length}})</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">
@ -109,23 +128,20 @@
</form>
</view>
</view>
</view>
<productWindow :attr="attr" :isShow='1' :iSplus='1' :iScart='1' @myevent="onMyEvent" @ChangeAttr="ChangeAttr"
@ChangeCartNum="ChangeCartNum" @attrVal="attrVal" @iptCartNum="iptCartNum" @goCat="reGoCat" id='product-window'></productWindow>
@ChangeCartNum="ChangeCartNum" @attrVal="attrVal" @iptCartNum="iptCartNum" @goCat="reGoCat"
id='product-window'></productWindow>
<view class="uni-p-b-96"></view>
<view class="uni-p-b-98"></view>
<!-- #ifdef MP -->
<authorize :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize>
<!-- <authorize :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize> -->
<!-- #endif -->
</view>
</template>
<script>
// #ifdef APP-PLUS
let sysHeight = uni.getSystemInfoSync().statusBarHeight + 'px';
// #endif
// #ifndef APP-PLUS
let sysHeight = 0
// #endif
import {
getCartList,
getCartCounts,
@ -160,7 +176,7 @@
data() {
return {
cartCount: 0,
goodsHidden: true,
goodsHidden: false,
footerswitch: true,
hostProduct: [],
cartList: {
@ -191,33 +207,28 @@
productSelect: {}
},
productValue: [], //
storeInfo: {},
productInfo: {},
attrValue: '', //
attrTxt: '请选择', //
cartId: 0,
product_id: 0,
sysHeight:sysHeight
sysHeight: sysHeight,
canShow: false
};
},
computed: mapGetters(['isLogin']),
onLoad: function(options) {
let that = this;
if (that.isLogin == false) {
// #ifdef H5 || APP-PLUS
toLogin();
// #endif
// #ifdef MP
this.isAuto = true;
this.$set(this, 'isShowAuth', true);
// #endif
}
},
onShow: function() {
this.canShow = false
if (this.isLogin == true) {
this.hotPage = 1;
this.hostProduct = [],
this.hotScroll = false,
this.getHostProduct();
this.loadend = false;
this.page = 1;
this.cartList.valid = [];
@ -226,10 +237,8 @@
this.pageInvalid = 1;
this.cartList.invalid = [];
this.getInvalidList();
this.getCartNum();
this.goodsHidden = true;
//this.getCartNum();
this.footerswitch = true;
this.hostProduct = [];
this.hotScroll = false;
this.hotPage = 1;
this.hotLimit = 10;
@ -267,7 +276,7 @@
productId: that.product_id,
num: that.attr.productSelect.cart_num,
unique: that.attr.productSelect !== undefined ?
that.attr.productSelect.unique : that.storeInfo.id
that.attr.productSelect.unique : that.productInfo.id
};
getResetCart(q)
.then(function(res) {
@ -310,8 +319,8 @@
getProductDetail(item.productId).then(res => {
uni.hideLoading();
that.attr.cartAttr = true;
let storeInfo = res.data.storeInfo;
that.$set(that, 'storeInfo', storeInfo);
let productInfo = res.data.productInfo;
that.$set(that, 'productInfo', productInfo);
that.$set(that.attr, 'productAttr', res.data.productAttr);
that.$set(that, 'productValue', res.data.productValue);
that.DefaultSelect();
@ -334,10 +343,10 @@
this.$set(this, "attrValue", res);
this.$set(this, "attrTxt", "已选择");
} else {
this.$set(this.attr.productSelect, "image", this.storeInfo.image);
this.$set(this.attr.productSelect, "price", this.storeInfo.price);
this.$set(this.attr.productSelect, "image", this.productInfo.image);
this.$set(this.attr.productSelect, "price", this.productInfo.price);
this.$set(this.attr.productSelect, "stock", 0);
this.$set(this.attr.productSelect, "unique", this.storeInfo.id);
this.$set(this.attr.productSelect, "unique", this.productInfo.id);
this.$set(this.attr.productSelect, "cart_num", 0);
this.$set(this, "attrValue", "");
this.$set(this, "attrTxt", "请选择");
@ -365,7 +374,7 @@
this.$set(
this.attr.productSelect,
"storeName",
this.storeInfo.storeName
this.productInfo.storeName
);
this.$set(this.attr.productSelect, "image", productSelect.image);
this.$set(this.attr.productSelect, "price", productSelect.price);
@ -378,12 +387,12 @@
this.$set(
this.attr.productSelect,
"storeName",
this.storeInfo.storeName
this.productInfo.storeName
);
this.$set(this.attr.productSelect, "image", this.storeInfo.image);
this.$set(this.attr.productSelect, "price", this.storeInfo.price);
this.$set(this.attr.productSelect, "image", this.productInfo.image);
this.$set(this.attr.productSelect, "price", this.productInfo.price);
this.$set(this.attr.productSelect, "stock", 0);
this.$set(this.attr.productSelect, "unique", this.storeInfo.id);
this.$set(this.attr.productSelect, "unique", this.productInfo.id);
this.$set(this.attr.productSelect, "cart_num", 0);
this.$set(this, "attrValue", "");
this.$set(this, "attrTxt", "请选择");
@ -391,15 +400,15 @@
this.$set(
this.attr.productSelect,
"storeName",
this.storeInfo.storeName
this.productInfo.storeName
);
this.$set(this.attr.productSelect, "image", this.storeInfo.image);
this.$set(this.attr.productSelect, "price", this.storeInfo.price);
this.$set(this.attr.productSelect, "stock", this.storeInfo.stock);
this.$set(this.attr.productSelect, "image", this.productInfo.image);
this.$set(this.attr.productSelect, "price", this.productInfo.price);
this.$set(this.attr.productSelect, "stock", this.productInfo.stock);
this.$set(
this.attr.productSelect,
"unique",
this.storeInfo.id || ""
this.productInfo.id || ""
);
this.$set(this.attr.productSelect, "cart_num", 1);
this.$set(this, "attrValue", "");
@ -407,7 +416,8 @@
}
},
attrVal(val) {
this.$set(this.attr.productAttr[val.indexw], 'index', this.attr.productAttr[val.indexw].attrValues[val.indexn]);
this.$set(this.attr.productAttr[val.indexw], 'index', this.attr.productAttr[val.indexw].attrValues[val
.indexn]);
},
/**
* 购物车数量加和数量减
@ -496,19 +506,30 @@
});
}
},
//
subOrder: function(event) {
let that = this,
selectValue = that.selectValue;
if (selectValue.length > 0) {
uni.navigateTo({
url: '/pages/users/order_confirm/index?new=false&cartId=' + selectValue.join(',')
});
that.getPreOrder();
} else {
return that.$util.Tips({
title: '请选择产品'
});
}
},
/**
* 预下单
*/
getPreOrder: function() {
let shoppingCartId = this.selectValue.map(item => {
return {
"shoppingCartId": Number(item)
}
})
this.$Order.getPreOrder("shoppingCart", shoppingCartId);
},
checkboxAllChange: function(event) {
let value = event.detail.value;
if (value.length > 0) {
@ -517,26 +538,6 @@
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 = [];
@ -620,8 +621,9 @@
} else {
for (let index in validList) {
if (that.inArray(validList[index].id, selectValue)) {
selectCountPrice = that.$util.$h.Add(selectCountPrice, that.$util.$h.Mul(validList[index].cartNum, validList[
index].truePrice))
selectCountPrice = that.$util.$h.Add(selectCountPrice, that.$util.$h.Mul(validList[index]
.cartNum, validList[
index].price))
}
}
that.selectCountPrice = selectCountPrice;
@ -670,9 +672,9 @@
let that = this;
let item = that.cartList.valid[index];
item.cartNum = Number(item.cartNum) + 1;
let productInfo = item.productInfo;
if (productInfo.hasOwnProperty('attrInfo') && item.cartNum >= item.productInfo.attrInfo.stock) {
item.cartNum = item.productInfo.attrInfo.stock;
let productInfo = item;
if (item.cartNum >= item.stock) {
item.cartNum = item.stock;
item.numAdd = true;
item.numSub = false;
} else {
@ -693,22 +695,40 @@
},
getCartNum: function() {
let that = this;
getCartCounts().then(res => {
getCartCounts(true, 'sum').then(res => {
that.cartCount = res.data.count;
});
},
getCartList: function() {
getCartData(data) {
return new Promise((resolve, reject) => {
getCartList(data).then((res) => {
resolve(res.data);
}).catch(function(err) {
this.loading = false;
this.canShow = true;
this.$util.Tips({
title: err
});
})
});
},
async getCartList() {
uni.showLoading({
title: '加载中',
mask: true
});
let that = this;
if (this.loadend) return false;
if (this.loading) return false;
let data = {
page: that.page,
limit: that.limit,
isValid: true
}
getCartList(data).then(res => {
let valid = res.data.list;
let loadend = valid.length < that.limit;
getCartCounts(true, 'sum').then(async c => {
that.cartCount = c.data.count;
if (c.data.count === 0) that.getHostProduct();
for (let i = 0; i < Math.ceil(that.cartCount / that.limit); i++) {
let cartList = await this.getCartData(data);
let valid = cartList.list;
let validList = that.$util.SplitArray(valid, that.cartList.valid);
let numSub = [{
numSub: true
@ -728,12 +748,11 @@
} else {
validList[index].numSub = false;
}
let productInfo = validList[index].productInfo;
let stock = validList[index].productInfo.attrInfo?validList[index].productInfo.attrInfo.stock:0;
if (productInfo.hasOwnProperty('attrInfo') && validList[index].cartNum == stock) {
let productInfo = validList[index];
let stock = validList[index].stock ? validList[index].stock : 0;
if (validList[index].cartNum == stock) {
validList[index].numAdd = true;
} else if (validList[index].cartNum == validList[index].productInfo.stock) {
} else if (validList[index].cartNum == validList[index].stock) {
validList[index].numAdd = true;
} else {
validList[index].numAdd = false;
@ -747,22 +766,17 @@
}
}
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;
data.page += 1;
that.selectValue = selectValue;
let newArr = validList.filter(item => item.attrStatus);
that.isAllSelect = newArr.length == selectValue.length && newArr.length;
that.switchSelect();
}).catch(function(err) {
that.$util.Tips({
title: err
});
}
that.loading = false;
that.loadTitle = '加载更多';
})
that.canShow = true;
uni.hideLoading();
});
},
getInvalidList: function() {
let that = this;
@ -780,9 +794,9 @@
that.$set(that.cartList, 'invalid', invalidList);
that.loadendInvalid = loadendInvalid;
that.loadTitleInvalid = loadendInvalid ? '我也是有底线的' : '加载更多';
that.pageInvalid = that.pageInvalid + 1;
that.loadingInvalid = false;
//if(invalid.length===0) that.getHostProduct();
}).catch(res => {
that.loadingInvalid = false;
that.loadTitleInvalid = '加载更多';
@ -847,6 +861,7 @@
title: '清除成功'
});
that.$set(that.cartList, 'invalid', []);
that.getHostProduct();
}).catch(res => {
});
@ -856,8 +871,6 @@
let that = this;
if (that.loadend) {
that.getInvalidList();
} else {
that.getCartList();
}
if (that.cartList.valid.length == 0 && that.cartList.invalid.length == 0 && this.hotPage != 1) {
that.getHostProduct();
@ -867,16 +880,39 @@
</script>
<style scoped lang="scss">
.invalidClas {
position: relative;
z-index: 111;
top: -120rpx;
}
.invalidClasNO {
position: static;
margin-top: 15px;
}
.cartBox {
// background-color: #fff;
}
.shoppingCart {
/* #ifdef H5 */
// padding-bottom: 0;
// padding-bottom: constant(safe-area-inset-bottom);
// padding-bottom: env(safe-area-inset-bottom);
/* #endif */
}
.shoppingCart .labelNav {
height: 76rpx;
padding: 0 30rpx;
height: 178rpx;
padding: 30rpx 30rpx 0 30rpx;
font-size: 22rpx;
color: #8c8c8c;
color: #fff;
position: fixed;
left: 0;
width: 100%;
box-sizing: border-box;
background-color: #f5f5f5;
background-color: $theme-color;
z-index: 5;
top: 0;
}
@ -887,17 +923,20 @@
}
.shoppingCart .nav {
width: 100%;
height: 80rpx;
width: 92%;
height: 90rpx;
background-color: #fff;
padding: 0 30rpx;
padding: 0 24rpx;
-webkit-box-sizing: border-box;
box-sizing: border-box;
font-size: 28rpx;
color: #282828;
position: fixed;
left: 0;
z-index: 5;
top: 76rpx;
left: 30rpx;
z-index: 6;
top: 94rpx;
border-top-left-radius: 14rpx;
border-top-right-radius: 14rpx;
}
.shoppingCart .nav .num {
@ -905,12 +944,8 @@
}
.shoppingCart .nav .administrate {
font-size: 26rpx;
color: #282828;
width: 110rpx;
height: 46rpx;
border-radius: 6rpx;
border: 1px solid #868686;
font-size: 28rpx;
color: #333333;
}
.shoppingCart .noCart {
@ -931,17 +966,20 @@
}
.shoppingCart .list {
margin-top: 171rpx;
width: 100%;
margin-top: 178rpx;
overflow: hidden;
border-bottom-left-radius: 14rpx;
border-bottom-right-radius: 14rpx;
}
.shoppingCart .list .item {
padding: 25rpx 30rpx;
padding: 24rpx;
background-color: #fff;
margin-bottom: 15rpx;
}
.shoppingCart .list .item .picTxt {
width: 627rpx;
width: 582rpx;
position: relative;
}
@ -957,7 +995,7 @@
}
.shoppingCart .list .item .picTxt .text {
width: 444rpx;
width: 396rpx;
font-size: 28rpx;
color: #282828;
}
@ -983,14 +1021,15 @@
.shoppingCart .list .item .picTxt .text .infor {
font-size: 24rpx;
color: #868686;
color: #999999;
margin-top: 16rpx;
}
.shoppingCart .list .item .picTxt .text .money {
font-size: 32rpx;
color: #282828;
color: #E93323;
margin-top: 28rpx;
font-weight: 600;
}
.shoppingCart .list .item .picTxt .carnum {
@ -1005,7 +1044,7 @@
width: 66rpx;
text-align: center;
height: 100%;
line-height: 40rpx;
line-height: 44rpx;
font-size: 28rpx;
color: #a4a4a4;
}
@ -1013,6 +1052,9 @@
.shoppingCart .list .item .picTxt .carnum .reduce {
border-right: 0;
border-radius: 3rpx 0 0 3rpx;
border-radius: 22rpx 0rpx 0rpx 22rpx;
font-size: 34rpx;
line-height: 40rpx;
}
.shoppingCart .list .item .picTxt .carnum .reduce.on {
@ -1023,6 +1065,9 @@
.shoppingCart .list .item .picTxt .carnum .plus {
border-left: 0;
border-radius: 0 3rpx 3rpx 0;
border-radius: 0rpx 22rpx 22rpx 0rpx;
font-size: 34rpx;
line-height: 40rpx;
}
.shoppingCart .list .item .picTxt .carnum .num {
@ -1031,15 +1076,20 @@
.shoppingCart .invalidGoods {
background-color: #fff;
margin-top: 30rpx;
/* #ifdef MP */
margin-top: 140rpx;
/* #endif */
}
.shoppingCart .invalidGoods .goodsNav {
width: 100%;
height: 66rpx;
padding: 0 30rpx;
height: 90rpx;
padding: 0 24rpx;
box-sizing: border-box;
font-size: 28rpx;
color: #282828;
color: #333333;
}
.shoppingCart .invalidGoods .goodsNav .iconfont {
@ -1050,35 +1100,36 @@
.shoppingCart .invalidGoods .goodsNav .del {
font-size: 26rpx;
color: #999;
color: #333;
}
.shoppingCart .invalidGoods .goodsNav .del .icon-shanchu1 {
color: #999;
color: #333;
font-size: 33rpx;
vertical-align: -2rpx;
margin-right: 8rpx;
}
.shoppingCart .invalidGoods .goodsList .item {
padding: 20rpx 30rpx;
border-top: 1rpx solid #f5f5f5;
padding: 24rpx;
}
.shoppingCart .invalidGoods .goodsList .picTxt {
width: 576rpx;
}
.shoppingCart .invalidGoods .goodsList .item .invalid {
font-size: 22rpx;
color: #fff;
width: 70rpx;
color: #CCCCCC;
height: 36rpx;
background-color: #aaa;
border-radius: 3rpx;
text-align: center;
line-height: 36rpx;
}
.shoppingCart .invalidGoods .goodsList .item .pictrue {
width: 140rpx;
height: 140rpx;
width: 160rpx;
height: 160rpx;
}
.shoppingCart .invalidGoods .goodsList .item .pictrue image {
@ -1088,7 +1139,7 @@
}
.shoppingCart .invalidGoods .goodsList .item .text {
width: 433rpx;
width: 396rpx;
font-size: 28rpx;
color: #999;
height: 140rpx;
@ -1107,35 +1158,44 @@
color: #bbb;
}
.shoppingCart .footer {
.footer {
z-index: 9;
width: 100%;
height: 96rpx;
background-color: #fafafa;
height: 100rpx;
background-color: #fff;
position: fixed;
padding: 0 30rpx;
padding: 0 24rpx;
box-sizing: border-box;
border-top: 1rpx solid #eee;
//
// border-bottom: 1px solid #EEEEEE;
/* #ifdef H5 */
bottom: 98rpx;
/* #endif */
/* #ifdef MP */
bottom: 0;
//
// #ifndef MP
bottom: 50px;
// #endif
/* #endif */
/* #ifndef MP */
// bottom: 98rpx;
// bottom: calc(98rpx+ constant(safe-area-inset-bottom)); /// IOS<11.2/
// bottom: calc(98rpx + env(safe-area-inset-bottom)); /// IOS>11.2/
/* #endif */
}
.shoppingCart .footer .checkAll {
.footer .checkAll {
font-size: 28rpx;
color: #282828;
margin-left: 16rpx;
margin-left: 14rpx;
}
// .shoppingCart .footer checkbox .wx-checkbox-input{background-color:#fafafa;}
.shoppingCart .footer .money {
.footer .money {
font-size: 30rpx;
.font-color {
font-weight: 600;
}
}
.shoppingCart .footer .placeOrder {
.footer .placeOrder {
color: #fff;
font-size: 30rpx;
width: 226rpx;
@ -1146,7 +1206,7 @@
margin-left: 22rpx;
}
.shoppingCart .footer .button .bnt {
.footer .button .bnt {
font-size: 28rpx;
color: #999;
border-radius: 50rpx;
@ -1157,7 +1217,11 @@
line-height: 60rpx;
}
.shoppingCart .footer .button form~form {
.footer .button form~form {
margin-left: 17rpx;
}
.uni-p-b-96 {
height: 96rpx;
}
</style>

View File

@ -2,46 +2,52 @@
<view>
<view class='order-details'>
<!-- 给header上与data上加on为退款订单-->
<view class='header bg-color acea-row row-middle' :class='isGoodsReturn ? "on":""'>
<view class='header bg-color' :class='isGoodsReturn ? "on":""'>
<view class='picTxt acea-row row-middle'>
<view class='pictrue' v-if="isGoodsReturn==false">
<image :src="orderInfo.statusPic"></image>
</view>
<view class='data' :class='isGoodsReturn ? "on":""'>
<view class='state'>{{orderInfo.pstatus.msg}}</view>
<view class='state'>{{orderInfo.orderStatusMsg}}</view>
<view>{{orderInfo.createTime}}</view>
</view>
</view>
<view v-if="isGoodsReturn==false">
</view>
<view v-if="isGoodsReturn==false" class="pad30">
<view class='nav'>
<view class='navCon acea-row row-between-wrapper'>
<view :class="status.type == 0 || status.type == -9 ? 'on':''">待付款</view>
<view :class="status.type == 1 ? 'on':''">{{orderInfo.shippingType==1 ? '待发货':'待核销'}}</view>
<view :class="status.type == 2 ? 'on':''" v-if="orderInfo.shippingType == 1"></view>
<view :class="status.type == 3 ? 'on':''">待评价</view>
<view :class="status.type == 4 ? 'on':''">已完成</view>
<view :class="!orderInfo.paid ? 'on':''">待付款</view>
<view :class="orderInfo.paid && orderInfo.status == 0 ? 'on':''">
{{orderInfo.shippingType==1 ? '待发货':'待核销'}}</view>
<view :class="orderInfo.status == 1 ? 'on':''" v-if="orderInfo.shippingType == 1"></view>
<view :class="orderInfo.status == 2 ? 'on':''">待评价</view>
<view :class="orderInfo.status == 3 ? 'on':''">已完成</view>
</view>
<view class='progress acea-row row-between-wrapper'>
<view class='iconfont' :class='(status.type == 0 || status.type == -9 ? "icon-webicon318":"icon-yuandianxiao") + " " + (status.type >= 0 ? "font-color":"")'></view>
<view class='line' :class='status.type > 0 ? "bg-color":""'></view>
<view class='iconfont' :class='(status.type == 1 ? "icon-webicon318":"icon-yuandianxiao") + " " + (status.type >= 1 ? "font-color":"")'></view>
<view class='line' :class='status.type > 1 ? "bg-color":""' v-if="orderInfo.shippingType == 1"></view>
<view class='iconfont' :class='(status.type == 2 ? "icon-webicon318":"icon-yuandianxiao") + " " +(status.type >= 2 ? "font-color":"")'
<view class='iconfont'
:class='(!orderInfo.paid ? "icon-webicon318":"icon-yuandianxiao") + " " + ( orderInfo.paid ? "font-color":"")'>
</view>
<view class='line' :class='orderInfo.paid > 0 ? "bg-color":""'></view>
<view class='iconfont'
:class='(orderInfo.status == 0 ? "icon-webicon318":"icon-yuandianxiao") + " " + (orderInfo.status >= 0 ? "font-color":"")'>
</view>
<view class='line' :class='orderInfo.status > 0 ? "bg-color":""'
v-if="orderInfo.shippingType == 1"></view>
<view class='line' :class='status.type > 2 ? "bg-color":""'></view>
<view class='iconfont' :class='(status.type == 3 ? "icon-webicon318":"icon-yuandianxiao") + " " + (status.type >= 3 ? "font-color":"")'></view>
<view class='line' :class='status.type > 3 ? "bg-color":""'></view>
<view class='iconfont' :class='(status.type == 4 ? "icon-webicon318":"icon-yuandianxiao") + " " + (status.type >= 4 ? "font-color":"")'></view>
<view class='iconfont'
:class='(orderInfo.status == 1 ? "icon-webicon318":"icon-yuandianxiao") + " " +(orderInfo.status >= 1 ? "font-color":"")'
v-if="orderInfo.shippingType == 1"></view>
<view class='line' :class='orderInfo.status > 1 ? "bg-color":""'></view>
<view class='iconfont'
:class='(orderInfo.status == 2 ? "icon-webicon318":"icon-yuandianxiao") + " " + (orderInfo.status >= 2 ? "font-color":"")'>
</view>
<view class='line' :class='orderInfo.status > 2 ? "bg-color":""'></view>
<view class='iconfont'
:class='(orderInfo.status == 3 ? "icon-webicon318":"icon-yuandianxiao") + " " + (orderInfo.status >= 3 ? "font-color":"")'>
</view>
</view>
<!-- 拒绝退款 -->
<view class="refund" v-if="orderInfo.refundReason">
<view class="title">
<image src="/static/images/shuoming.png" mode=""></image>
商家拒绝退款
</view>
<view class="con">拒绝原因{{orderInfo.refundReason}}</view>
</view>
<view class="writeOff" v-if="orderInfo.shippingType == 2 && orderInfo.paid">
<view v-if="orderInfo.shippingType == 2 && orderInfo.paid" class="writeOff borRadius14">
<view class="title">核销信息</view>
<view class="grayBg">
<view class="pictrue">
@ -60,7 +66,7 @@
<text class="iconfont icon-shijian"></text>核销时间
</view>
<view class="info">
每日<text class="time">{{orderInfo.systemStore.dayTime}}</text>
每日<text class="time">{{orderInfo.systemStore.dayTime.replace(',','-')}}</text>
</view>
</view>
<view class="item">
@ -71,40 +77,48 @@
</view>
</view>
</view>
<view class="map acea-row row-between-wrapper" v-if="orderInfo.shippingType == 2">
<view v-if="orderInfo.shippingType == 2" class="map acea-row row-between-wrapper borRadius14">
<view>自提地址信息</view>
<view class="place cart-color acea-row row-center-wrapper" @tap="showMaoLocation">
<text class="iconfont icon-weizhi"></text>查看位置
</view>
</view>
<view class='address' v-if="orderInfo.shippingType === 1">
<view v-if="orderInfo.shippingType === 1" class='address borRadius14'>
<view class='name'>{{orderInfo.realName}}<text class='phone'>{{orderInfo.userPhone}}</text></view>
<view>{{orderInfo.userAddress}}</view>
</view>
<view class='address' v-else style="margin-top:0;">
<view class='name' @tap="makePhone">{{orderInfo.systemStore?orderInfo.systemStore.name:''}}<text class='phone'>{{orderInfo.systemStore?orderInfo.systemStore.phone:''}}</text><text
<view v-else class='address' style="margin-top:15rpx;">
<view class='name' @tap="makePhone">{{orderInfo.systemStore?orderInfo.systemStore.name:''}}<text
class='phone'>{{orderInfo.systemStore?orderInfo.systemStore.phone:''}}</text><text
class="iconfont icon-tonghua font-color"></text></view>
<view>{{orderInfo.systemStore?orderInfo.systemStore.detailedAddress:''}}</view>
</view>
<view class='line' v-if="orderInfo.shippingType === 1">
<image src='../../static/images/line.jpg'></image>
</view>
</view>
<orderGoods :evaluate='evaluate' :orderId="order_id" :ids="id" :uniId="uniId" :cartInfo="cartInfo" :jump="true"></orderGoods>
<!-- <div class="goodCall" @click="goGoodCall"> -->
<!-- #ifdef H5 -->
<div class="goodCall" @click="kefuClick">
<orderGoods :evaluate='evaluate' :productType="orderInfo.type" :orderId="order_id" :ids="id" :uniId="uniId" :cartInfo="cartInfo"
:jump="true"></orderGoods>
<!-- #ifndef MP -->
<div class="goodCall borRadius14" @click="kefuClick">
<span class="iconfont icon-kefu"></span><span>联系客服</span>
</div>
<!-- #endif -->
<!-- #ifdef MP -->
<div class="goodCall">
<div class="goodCall borRadius14">
<button open-type='contact' hover-class='none'>
<span class="iconfont icon-kefu"></span><span>联系客服</span>
</button>
</div>
<!-- #endif -->
<view class='wrapper'>
</view>
<view class="pad30">
<view class='nav refund' v-if="orderInfo.refundStatus>0">
<view class="title">
<image src="/static/images/shuoming.png" mode=""></image>
{{orderInfo.refundStatus==1?'商家审核中':orderInfo.refundStatus==2?'商家已退款':'商家拒绝退款'}}
</view>
<view class="con pad30">{{orderInfo.refundStatus==1 ? "您已成功发起退款申请,请耐心等待商家处理;退款前请与商家协商一致,有助于更好的处理售后问题": orderInfo.refundStatus==2? "退款已成功受理,如商家已寄出商品请尽快退回;感谢您的支持": "拒绝原因:" + orderInfo.refundReason}}</view>
</view>
<view class='wrapper borRadius14'>
<view class='item acea-row row-between'>
<view>订单编号</view>
<view class='conter acea-row row-middle row-right'>{{orderInfo.orderId}}
@ -127,15 +141,15 @@
</view>
<view class='item acea-row row-between'>
<view>支付方式</view>
<view class='conter'>{{orderInfo.pstatus.payType}}</view>
<view class='conter'>{{orderInfo.payTypeStr}}</view>
</view>
<view class='item acea-row row-between' v-if="orderInfo.mark">
<view>买家留言</view>
<view class='conter'>{{orderInfo.mark}}</view>
</view>
</view>
<!-- 退款订单详情 -->
<view class='wrapper' v-if="isGoodsReturn">
<!-- 退款订单详情 "-->
<view v-if="isGoodsReturn" class='wrapper borRadius14' >
<view class='item acea-row row-between'>
<view>收货人</view>
<view class='conter'>{{orderInfo.realName}}</view>
@ -149,8 +163,8 @@
<view class='conter'>{{orderInfo.userAddress}}</view>
</view>
</view>
<view v-if="orderInfo.status!=0">
<view class='wrapper' v-if='orderInfo.deliveryType=="express"'>
<view v-if="orderInfo.status>0">
<view class='wrapper borRadius14' v-if='orderInfo.deliveryType=="express"'>
<view class='item acea-row row-between'>
<view>配送方式</view>
<view class='conter'>发货</view>
@ -164,7 +178,7 @@
<view class='conter'>{{orderInfo.deliveryId || ''}}</view>
</view>
</view>
<view class='wrapper' v-else-if='orderInfo.deliveryType=="send"'>
<view class='wrapper borRadius14' v-else-if='orderInfo.deliveryType=="send"'>
<view class='item acea-row row-between'>
<view>配送方式</view>
<view class='conter'>送货</view>
@ -175,20 +189,25 @@
</view>
<view class='item acea-row row-between'>
<view>联系电话</view>
<view class='conter acea-row row-middle row-right'>{{orderInfo.deliveryId || ''}}<text class='copy' @tap='goTel'>拨打</text></view>
<view class='conter acea-row row-middle row-right'>{{orderInfo.deliveryId || ''}}<text
class='copy' @tap='goTel'>拨打</text></view>
</view>
</view>
<view class='wrapper' v-else-if='orderInfo.deliveryType=="fictitious"'>
<view class='wrapper borRadius14' v-else-if='orderInfo.deliveryType=="fictitious"'>
<view class='item acea-row row-between'>
<view>虚拟发货</view>
<view class='conter'>已发货请注意查收</view>
</view>
</view>
</view>
<view class='wrapper'>
<view class='wrapper borRadius14'>
<view class='item acea-row row-between'>
<view>支付金额</view>
<view class='conter'>{{orderInfo.totalPrice}}</view>
<view>商品总价</view>
<view class='conter'>{{orderInfo.proTotalPrice}}</view>
</view>
<view class='item acea-row row-between' v-if="orderInfo.payPostage > 0">
<view>运费</view>
<view class='conter'>{{orderInfo.payPostage}}</view>
</view>
<view class='item acea-row row-between' v-if='orderInfo.couponId'>
<view>优惠券抵扣</view>
@ -198,42 +217,50 @@
<view>积分抵扣</view>
<view class='conter'>-{{orderInfo.deductionPrice}}</view>
</view>
<view class='item acea-row row-between' v-if="orderInfo.payPostage > 0">
<view>运费</view>
<view class='conter'>{{orderInfo.payPostage}}</view>
</view>
<view class='actualPay acea-row row-right'>实付款<text class='money font-color'>{{orderInfo.payPrice}}</text></view>
<view class='actualPay acea-row row-right'>实付款<text
class='money font-color'>{{orderInfo.payPrice}}</text></view>
</view>
<view style='height:120rpx;'></view>
<view class='footer acea-row row-right row-middle' v-if="isGoodsReturn==false || status.type == 9">
<view class="qs-btn" v-if="status.type == 0 || status.type == -9" @click.stop="cancelOrder"></view>
<view class='bnt bg-color' v-if="status.type==0" @tap='pay_open(orderInfo.orderId)'>立即付款</view>
<view class='footer acea-row row-right row-middle' v-if="isGoodsReturn==false">
<view class="qs-btn" v-if="!orderInfo.paid" @click.stop="cancelOrder"></view>
<view class='bnt bg-color' v-if="!orderInfo.paid" @tap='pay_open(orderInfo.orderId)'>立即付款</view>
<!-- #ifdef MP -->
<view @tap="openSubcribe('/pages/users/goods_return/index?orderId='+orderInfo.orderId)" class='bnt cancel'
v-else-if="orderInfo.paid === true && orderInfo.refundStatus === 0">申请退款</view>
<view @tap="openSubcribe('/pages/users/goods_return/index?orderId='+orderInfo.orderId)"
class='bnt cancel' v-else-if="orderInfo.paid === true && orderInfo.refundStatus === 0 && orderInfo.type!==1 && type==='normal'">申请退款
</view>
<!-- #endif -->
<!-- #ifndef MP -->
<navigator hover-class="none" :url="'/pages/users/goods_return/index?orderId='+orderInfo.orderId" class='bnt cancel'
v-else-if="orderInfo.paid === true && orderInfo.refundStatus === 0">申请退款</navigator>
<navigator hover-class="none" :url="'/pages/users/goods_return/index?orderId='+orderInfo.orderId"
class='bnt cancel' v-else-if="orderInfo.paid === true && orderInfo.refundStatus === 0 && orderInfo.type!==1 && type==='normal'">申请退款
</navigator>
<!-- #endif -->
<view class='bnt bg-color' v-if="status.class_status==1" @tap='goJoinPink'>查看拼团</view>
<navigator class='bnt cancel' v-if="orderInfo.deliveryType == 'express' && status.class_status==3 && status.type==2"
hover-class='none' :url="'/pages/users/goods_logistics/index?orderId='+ orderInfo.orderId">查看物流</navigator>
<view class='bnt bg-color' v-if="status.class_status==3" @tap='confirmOrder'>确认收货</view>
<view class='bnt cancel' v-if="status.type==4" @tap='delOrder'>删除订单</view>
<view class='bnt bg-color' v-if="status.class_status==5" @tap='goOrderConfirm'>再次购买</view>
<view class='bnt bg-color' v-if="orderInfo.combinationId > 0" @tap='goJoinPink'>查看拼团</view>
<navigator class='bnt cancel' v-if="orderInfo.deliveryType == 'express' && orderInfo.status >0"
hover-class='none' :url="'/pages/users/goods_logistics/index?orderId='+ orderInfo.orderId">查看物流
</navigator>
<view class='bnt bg-color' v-if="orderInfo.status==1" @tap='confirmOrder'>确认收货</view>
<view class='bnt cancel' v-if="orderInfo.status==3" @tap='delOrder'>删除订单</view>
<view class='bnt bg-color' v-if="orderInfo.status==3 && orderInfo.type!==1" @tap='goOrderConfirm'>再次购买</view>
</view>
</view>
</view>
<home></home>
<!-- #ifdef MP -->
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize>
<!-- <authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize> -->
<!-- #endif -->
<payment :payMode='payMode' :pay_close="pay_close" @onChangeFun='onChangeFun' :order_id="pay_order_id" :totalPrice='totalPrice'></payment>
<payment :payMode='payMode' :pay_close="pay_close" @onChangeFun='onChangeFun' :order_id="pay_order_id"
:totalPrice='totalPrice'></payment>
</view>
</template>
<style scoped lang="scss">
.shuoming{
width: 32rpx;
height: 32rpx;
}
.goodCall {
color: #e93323;
color: $theme-color;
text-align: center;
width: 100%;
height: 86rpx;
@ -255,15 +282,15 @@
justify-content: center;
height: 86rpx;
font-size: 30rpx;
color: #e93323;
color: $theme-color;
}
/* #endif */
}
.order-details .header {
height: 250rpx;
padding: 0 30rpx;
height: 150rpx;
}
.order-details .header.on {
@ -301,11 +328,18 @@
margin-left: 20rpx;
}
.picTxt {
height: 150rpx;
}
.order-details .nav {
background-color: #fff;
font-size: 26rpx;
color: #282828;
padding: 25rpx 0;
padding: 27rpx 0;
width: 100%;
border-radius: 14rpx;
margin: -100rpx auto 0 auto;
}
.order-details .nav .navCon {
@ -313,7 +347,7 @@
}
.order-details .nav .on {
color: #e93323;
color: $theme-color;
}
.order-details .nav .progress {
@ -337,8 +371,8 @@
font-size: 26rpx;
color: #868686;
background-color: #fff;
margin-top: 13rpx;
padding: 35rpx 30rpx;
margin-top: 15rpx;
padding: 30rpx 24rpx;
}
.order-details .address .name {
@ -365,7 +399,7 @@
.order-details .wrapper {
background-color: #fff;
margin-top: 12rpx;
padding: 30rpx;
padding: 30rpx 24rpx;
}
.order-details .wrapper .item {
@ -379,14 +413,14 @@
.order-details .wrapper .item .conter {
color: #868686;
width: 460rpx;
// width: 490rpx;
text-align: right;
}
.order-details .wrapper .item .conter .copy {
font-size: 20rpx;
color: #333;
border-radius: 3rpx;
border-radius: 20rpx;
border: 1rpx solid #666;
padding: 3rpx 15rpx;
margin-left: 24rpx;
@ -415,10 +449,10 @@
}
.order-details .footer .bnt {
width: 176rpx;
height: 60rpx;
width: 158rpx;
height: 54rpx;
text-align: center;
line-height: 60rpx;
line-height: 54rpx;
border-radius: 50rpx;
color: #fff;
font-size: 27rpx;
@ -435,8 +469,8 @@
.order-details .writeOff {
background-color: #fff;
margin-top: 13rpx;
padding-bottom: 30rpx;
margin-top: 15rpx;
padding-bottom: 50rpx;
}
.order-details .writeOff .title {
@ -444,7 +478,7 @@
color: #282828;
height: 87rpx;
border-bottom: 1px solid #f0f0f0;
padding: 0 30rpx;
padding: 0 24rpx;
line-height: 87rpx;
}
@ -531,9 +565,9 @@
color: #282828;
line-height: 86rpx;
border-bottom: 1px solid #f0f0f0;
margin-top: 13rpx;
margin-top: 15rpx;
background-color: #fff;
padding: 0 30rpx;
padding: 0 24rpx;
}
.order-details .map .place {
@ -558,8 +592,8 @@
}
.refund {
padding: 0 30rpx 30rpx;
margin-top: 24rpx;
padding: 0 !important;
margin-top: 15rpx;
background-color: #fff;
.title {
@ -569,6 +603,8 @@
color: #333;
height: 86rpx;
border-bottom: 1px solid #f5f5f5;
font-weight: 400;
padding: 0 24rpx;
image {
width: 32rpx;
@ -578,9 +614,9 @@
}
.con {
padding-top: 25rpx;
font-size: 28rpx;
color: #868686;
font-size: 25rpx;
color: #666666;
padding: 30rpx 24rpx;
}
}
</style>
@ -588,7 +624,6 @@
<script>
import {
getOrderDetail,
orderAgain,
orderTake,
orderDel,
orderCancel,
@ -597,9 +632,6 @@
import {
openOrderRefundSubscribe
} from '@/utils/SubscribeMessage.js';
import {
getUserInfo
} from '@/api/user.js';
import home from '@/components/home';
import payment from '@/components/payment';
import orderGoods from "@/components/orderGoods";
@ -660,10 +692,12 @@
id: 0, //id
uniId: '',
utils: this.$util,
type: 'normal'
};
},
computed: mapGetters(['isLogin', 'chatUrl']),
computed: mapGetters(['isLogin', 'chatUrl', 'userInfo']),
onLoad: function(options) {
options.type == undefined || options.type == null ? this.type = 'normal' : this.type = options.type;
if (!options.order_id && !options.uniId) return this.$util.Tips({
title: '缺少参数'
}, {
@ -675,15 +709,10 @@
onShow() {
if (this.isLogin) {
this.getOrderInfo();
this.getUserInfo();
this.payMode[1].number = this.userInfo.nowMoney;
this.$set(this, 'payMode', this.payMode);
} else {
// #ifdef H5 || APP-PLUS
toLogin();
// #endif
// #ifdef MP
this.isAuto = true;
this.$set(this, 'isShowAuth', true);
// #endif
}
},
onHide: function() {
@ -700,6 +729,7 @@
});
});
// #endif
},
methods: {
kefuClick() {
@ -801,18 +831,6 @@
*/
onLoadFun: function() {
this.getOrderInfo();
this.getUserInfo();
},
/**
* 获取用户信息
*
*/
getUserInfo: function() {
let that = this;
getUserInfo().then(res => {
that.payMode[1].number = res.data.nowMoney;
that.$set(that, 'payMode', that.payMode);
})
},
/**
* 获取订单详细信息
@ -825,22 +843,22 @@
});
getOrderDetail(that.order_id).then(res => {
uni.hideLoading();
let _type = res.data.pstatus.type;
that.$set(that, 'orderInfo', res.data);
that.$set(that, 'evaluate', _type == 3 ? 3 : 0);
that.$set(that, 'evaluate', res.data.status == 2 ? 2 : 0);
that.$set(that, 'system_store', res.data.systemStore);
that.$set(that, 'id', res.data.id);
let cartInfo = res.data.cartInfo,
newCartInfo = [];
cartInfo.forEach((item, index) => {
newCartInfo.push(item.info);
});
that.$set(that, 'cartInfo', newCartInfo);
that.$set(that, 'cartInfo', res.data.orderInfoList);
if (res.data.refundStatus != 0) {
that.isGoodsReturn = true;
};
that.getOrderStatus();
that.markCode(res.data.verifyCode);
if (that.orderInfo.shippingType == 2 && that.orderInfo.paid) that.markCode(res.data
.verifyCode);
if(that.orderInfo.refundStatus>0){
uni.setNavigationBarColor({
frontColor: '#ffffff',
backgroundColor: '#666666'
})
}
}).catch(err => {
uni.hideLoading();
that.$util.Tips({
@ -904,7 +922,8 @@
if (type == 2 && delivery_type == 'express') status.class_status = 2; //
if (type == 2) status.class_status = 3; //
if (type == 4 || type == 0) status.class_status = 4; //
if (!seckill_id && !bargain_id && !combination_id && (type == 3 || type == 4)) status.class_status = 5; //
if (!seckill_id && !bargain_id && !combination_id && (type == 3 || type == 4)) status.class_status =
5; //
this.$set(this, 'status', status);
},
/**
@ -921,16 +940,9 @@
*
*/
goOrderConfirm: function() {
let that = this;
orderAgain(that.orderInfo.orderId).then(res => {
return uni.navigateTo({
url: '/pages/users/order_confirm/index?cartId=' + res.data.cateId + '&again=true&new=true&addAgain=true'
});
}).catch(err => {
return that.$util.Tips({
title: err
});
})
this.$Order.getPreOrder("again",[{
orderNo: this.order_id
}]);
},
confirmOrder: function() {
let that = this;

View File

@ -47,7 +47,7 @@
<button @click="goIndex" class='returnBnt cart-color' formType="submit" hover-class='none' v-else></button>
</view>
<!-- #ifdef MP -->
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize>
<!-- <authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize> -->
<!-- #endif -->
</view>
</template>
@ -88,16 +88,16 @@
};
},
computed: mapGetters(['isLogin']),
// watch:{
// isLogin:{
// handler:function(newV,oldV){
// if(newV){
// this.getOrderPayInfo();
// }
// },
// deep:true
// }
// },
watch:{
isLogin:{
handler:function(newV,oldV){
if(newV){
this.getOrderPayInfo();
}
},
deep:true
}
},
onLoad: function(options) {
if (!options.order_id) return this.$util.Tips({
title: '缺少参数无法查看订单支付状态'
@ -111,13 +111,7 @@
if (this.isLogin) {
this.getOrderPayInfo();
} else {
// #ifdef H5 || APP-PLUS
toLogin();
// #endif
// #ifdef MP
this.isAuto = true;
this.$set(this, 'isShowAuth', true);
// #endif
}
},
methods: {

View File

@ -1,30 +1,27 @@
<template>
<view class="new-users">
<view class="head">
<view class="user-card">
<view class="new-users copy-data" :style="{height:pageHeight}">
<view class="mid" style="flex:1;overflow: hidden;">
<scroll-view scroll-y="true" style="height: 100%;">
<view class="bg"></view>
<view class="head pad30">
<view class="user-card">
<view class="user-info">
<image class="avatar" :src='userInfo.avatar' v-if="userInfo.avatar" @click="goEdit()"></image>
<image class="avatar" :src='userInfo.avatar' v-if="userInfo.avatar && uid"
@click="goEdit()"></image>
<image v-else class="avatar" src="/static/images/f.png" mode="" @click="goEdit()"></image>
<view class="info">
<!-- #ifdef MP -->
<view class="name" v-if="!userInfo.uid" @tap="openAuto">
请点击授权
<view class="name" v-if="!uid" @tap="openAuto">
请点击登录
</view>
<!-- #endif -->
<!-- #ifdef H5 -->
<view class="name" v-if="!userInfo.uid && isWeixin" @tap="openAuto">
请点击授权
</view>
<!-- #endif -->
<view class="name" v-if="userInfo.uid">
<view class="name" v-if="uid">
{{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 class="num" v-if="userInfo.phone" @click="goEdit()">
</view>
<view class="num" v-if="userInfo.phone && uid" @click="goEdit()">
<view class="num-txt">{{userInfo.phone}}</view>
<view class="icon">
<image src="/static/images/edit.png" mode=""></image>
@ -35,24 +32,30 @@
</view>
<view class="num-wrapper">
<view class="num-item" @click="goMenuPage('/pages/users/user_money/index')">
<text class="num">{{userInfo.nowMoney?Number(userInfo.nowMoney).toFixed(2):0}}</text>
<text
class="num">{{userInfo.nowMoney && uid ?Number(userInfo.nowMoney).toFixed(2):0}}</text>
<view class="txt">余额</view>
</view>
<view class="num-item" @click="goMenuPage('/pages/users/user_integral/index')">
<text class="num">{{userInfo.integral || 0}}</text>
<text class="num">{{userInfo.integral && uid ? userInfo.integral: 0}}</text>
<view class="txt">积分</view>
</view>
<view class="num-item" @click="goMenuPage('/pages/users/user_coupon/index')">
<text class="num">{{userInfo.couponCount || 0}}</text>
<text class="num">{{userInfo.couponCount && uid ? userInfo.couponCount : 0}}</text>
<view class="txt">优惠券</view>
</view>
<view class="num-item" @click="goMenuPage('/pages/users/user_goods_collection/index')">
<text class="num">{{userInfo.collectCount && uid ? userInfo.collectCount : 0}}</text>
<view class="txt">收藏</view>
</view>
<view class="sign" @click="goSignIn"></view>
</view>
<!-- <view class="sign" @click="goSignIn"></view> -->
</view>
<view class="order-wrapper">
<view class="order-hd flex">
<view class="left">订单中心</view>
<navigator class="right flex" hover-class="none" url="/pages/users/order_list/index" open-type="navigate">
<navigator class="right flex" hover-class="none" url="/pages/users/order_list/index"
open-type="navigate">
查看全部
<text class="iconfont icon-xiangyou"></text>
</navigator>
@ -70,57 +73,63 @@
</view>
</view>
</view>
<view class="contenBox">
<!-- 轮播 -->
<view class="slider-wrapper" v-if="imgUrls.length>0">
<swiper indicator-dots="true" :autoplay="autoplay" :circular="circular" :interval="interval" :duration="duration"
indicator-color="rgba(255,255,255,0.6)" indicator-active-color="#fff">
<swiper indicator-dots="true" :autoplay="autoplay" :circular="circular" :interval="interval"
:duration="duration" indicator-color="rgba(255,255,255,0.6)" indicator-active-color="#fff">
<block v-for="(item,index) in imgUrls" :key="index">
<swiper-item>
<swiper-item class="borRadius14">
<image :src="item.pic" class="slide-image" @click="navito(item.url)"></image>
</swiper-item>
</block>
</swiper>
</view>
<!-- 会员菜单 -->
<view class="user-menus" style="margin-top: 20rpx;">
<view class="menu-title">我的服务</view>
<view class="list-box">
<block v-for="(item,index) in MyMenus" :key="index">
<navigator class="item" :url="item.url" hover-class="none" v-if="!(item.url =='/pages/service/index' || (item.url =='/pages/users/user_spread_user/index' && !userInfo.isPromoter))">
<view class="left">
<navigator class="item" :url="item.url" hover-class="none"
v-if="!(item.url =='/pages/service/index' || (item.url =='/pages/users/user_spread_user/index' && !userInfo.isPromoter))">
<image :src="item.pic"></image>
<text>{{item.name}}</text>
</view>
<view class="iconfont icon-xiangyou"></view>
</navigator>
</block>
<!-- #ifdef H5 -->
<!-- #ifndef MP -->
<view class="item" @click="kefuClick">
<view class="left">
<image :src="servicePic"></image>
<text>联系客服</text>
</view>
<view class="iconfont icon-xiangyou"></view>
</view>
<!-- #endif -->
<!-- #ifdef MP -->
<button class="item" open-type='contact' hover-class='none'>
<view class="left">
<image :src="servicePic"></image>
<text>联系客服</text>
</view>
<view class="iconfont icon-xiangyou"></view>
</button>
<!-- #endif -->
</view>
<img src="/static/images/support.png" alt="" class='support'>
</view>
<image src="/static/images/support.png" alt="" class='support'>
<view class="uni-p-b-98"></view>
</view>
</scroll-view>
</view>
<!-- #ifdef MP -->
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize>
<!-- <authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize> -->
<!-- #endif -->
</view>
</template>
<script>
let sysHeight = uni.getSystemInfoSync().statusBarHeight + 'px';
import Cache from '@/utils/cache';
import {
getMenuList,
getUserInfo
BACK_URL
} from '@/config/cache';
import {
getMenuList
// setVisit
} from '@/api/user.js';
import {
@ -145,7 +154,7 @@
authorize
// #endif
},
computed: mapGetters(['isLogin']),
computed: mapGetters(['isLogin', 'chatUrl', 'userInfo', 'uid']),
data() {
return {
orderMenu: [{
@ -188,10 +197,16 @@
isAuto: false, //
isShowAuth: false, //
orderStatusNum: {},
userInfo: {},
MyMenus: [],
wechatUrl: [],
servicePic: '',
servicePic: '/static/images/customer.png',
sysHeight: sysHeight,
// #ifdef MP
pageHeight: '100%',
// #endif
// #ifdef H5
pageHeight: app.globalData.windowHeight,
// #endif
// #ifdef H5
isWeixin: Auth.isWeixin()
//#endif
@ -199,33 +214,32 @@
},
onLoad() {
let that = this;
// #ifdef H5
that.$set(that, 'pageHeight', app.globalData.windowHeight);
// #endif
that.$set(that, 'MyMenus', app.globalData.MyMenus);
console.log('user页面',that.isLogin)
// if (that.isLogin == false) {
// // #ifdef H5 || APP-PLUS
// toLogin();
// // #endif
// // #ifdef MP
// this.isAuto = true;
// this.$set(this, 'isShowAuth', true);
// // #endif
// }
if (that.isLogin == false) {
// #ifdef H5
toLogin()
// #endif
}
},
onShow: function() {
let that = this;
// #ifdef H5
uni.getSystemInfo({
success: function(res) {
that.pageHeight = res.windowHeight + 'px'
}
});
// #endif
if (that.isLogin) {
this.getUserInfo();
this.getMyMenus();
// this.setVisit();
this.getOrderData();
this.$store.dispatch('USERINFO');
} else {
// #ifdef H5 || APP-PLUS
toLogin();
// #endif
// #ifdef MP
this.isAuto = true;
this.$set(this, 'isShowAuth', true);
// #endif
}
},
methods: {
@ -239,7 +253,7 @@
window.location.href = 'https://' + e;
},
kefuClick() {
location.href = this.wechatUrl[0].wap_url;
location.href = this.chatUrl;
},
getOrderData() {
let that = this;
@ -268,12 +282,11 @@
},
//
openAuto() {
this.isAuto = true;
this.isShowAuth = true
Cache.set(BACK_URL, '')
toLogin();
},
//
onLoadFun() {
this.getUserInfo();
this.getMyMenus();
// this.setVisit();
this.getOrderData();
@ -292,20 +305,9 @@
//
bindPhone() {
uni.navigateTo({
url: '/pages/users/user_phone/index'
url: '/pages/users/app_login/index'
})
},
/**
* 获取个人用户信息
*/
getUserInfo: function() {
const _app = getApp();
let that = this;
getUserInfo().then(res => {
that.userInfo = res.data;
that.$store.commit("SETUID", res.data.uid);
});
},
/**
*
* 获取个人中心图标
@ -327,21 +329,12 @@
//
goEdit() {
if (this.isLogin == false) {
// #ifdef H5 || APP-PLUS
toLogin();
// #endif
// #ifdef MP
this.isAuto = true;
this.$set(this, 'isShowAuth', true);
// #endif
} else {
uni.navigateTo({
url: '/pages/users/user_info/index'
})
}
// uni.navigateTo({
// url: '/pages/users/user_info/index'
// })
},
//
goSignIn() {
@ -366,37 +359,62 @@
</script>
<style lang="scss" scoped>
.support {
width: 219rpx;
height: 74rpx;
margin: 54rpx auto;
display: block;
page,
body {
height: 100%;
}
.new-users {
.head {
padding-top: 30rpx;
background: #fff;
.user-card {
position: relative;
width: 710rpx;
height: 340rpx;
margin: 0 auto;
padding: 35rpx 28rpx;
background: linear-gradient(90deg, $bg-star 0%, $bg-end 100%);
box-shadow: 0px 10rpx 20rpx 0px rgba(255, 2, 0, 0.2);
border-radius: 24rpx;
.bg {
position: absolute;
left: 0;
top: 0;
width:100%;
height: 100%;
height: 420rpx;
background-image: url('~@/static/images/user_bg.png');
background-repeat: no-repeat;
background-size: 100% 100%;
}
.contenBox {
padding: 0 30rpx;
}
.support {
width: 219rpx;
height: 74rpx;
margin: 54rpx auto;
display: block;
}
.new-users {
display: flex;
flex-direction: column;
height: 100%;
.sys-head {
position: relative;
width: 100%;
background: linear-gradient(90deg, $bg-star1 0%, $bg-end1 100%);
.sys-title {
z-index: 10;
position: relative;
height: 43px;
text-align: center;
line-height: 43px;
font-size: 36rpx;
color: #FFFFFF;
}
}
.head {
background: linear-gradient(360deg, rgba(255, 121, 49, 0) 0%, rgba(248, 74, 29, 0.82) 39%, #E93323 100%);
// padding: 0 30rpx;
.user-card {
position: relative;
width: 100%;
margin: 0 auto;
padding: 35rpx 0 30rpx 0;
.user-info {
z-index: 20;
position: relative;
@ -430,7 +448,6 @@
border-radius: 18px;
font-size: 20rpx;
margin-left: 12rpx;
// margin-top: 2rpx;
image {
width: 27rpx;
@ -460,8 +477,7 @@
display: flex;
align-items: center;
justify-content: space-between;
margin-top: 60rpx;
// padding: 0 47rpx;
margin-top: 30rpx;
color: #fff;
.num-item {
@ -474,7 +490,7 @@
}
.txt {
margin-top: 8rpx;
margin-top: 10rpx;
font-size: 26rpx;
color: rgba(255, 255, 255, 0.6);
}
@ -500,13 +516,24 @@
}
.order-wrapper {
background-color: #fff;
border-radius: 14rpx;
padding: 30rpx 16rpx;
position: relative;
z-index: 11;
.order-hd {
justify-content: space-between;
padding: 0 20rpx 28rpx;
margin-top: 33rpx;
border-bottom: 1px solid #F5F5F5;
font-size: 30rpx;
color: #282828;
margin-bottom: 40rpx;
padding: 0 16rpx;
.left {
color: #282828;
font-size: 30rpx;
font-weight: 600;
}
.right {
align-items: center;
@ -515,22 +542,21 @@
.icon-xiangyou {
margin-left: 5rpx;
margin-top: 6rpx;
font-size: 26rpx;
font-size: 24rpx;
}
}
}
.order-bd {
display: flex;
padding: 0 24rpx;
justify-content: space-between;
padding: 0;
.order-item {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
width: 20%;
height: 160rpx;
.pic {
position: relative;
@ -554,7 +580,7 @@
.slider-wrapper {
margin: 20rpx 0;
height: 130rpx;
height: 138rpx;
swiper,
swiper-item {
@ -563,46 +589,50 @@
image {
width: 100%;
height: 130rpx;
height: 100%;
}
}
.user-menus {
background-color: #fff;
border-radius: 14rpx;
.menu-title {
padding: 30rpx 30rpx 40rpx;
font-size: 30rpx;
color: #282828;
font-weight: 600;
}
.list-box {
display: flex;
flex-wrap: wrap;
padding: 0;
}
.item {
position: relative;
display: flex;
align-items: center;
justify-content: space-between;
height: 90rpx;
padding: 0 30rpx;
.left {
display: flex;
align-items: center;
flex-direction: column;
width: 25%;
margin-bottom: 47rpx;
font-size: 26rpx;
color: #333333;
image {
width: 46rpx;
height: 46rpx;
margin-right: 25rpx;
}
width: 52rpx;
height: 52rpx;
margin-bottom: 18rpx;
}
&::before {
content: ' ';
position: absolute;
right: 0;
bottom: 0;
width: 655rpx;
height: 1px;
background-color: #EEEEEE;
}
&:last-child::before {
display: none;
}
}
button {
font-size: 28rpx;
}

View File

@ -0,0 +1,266 @@
<template>
<view class="appBox">
<div class="shading">
<image :src="logoUrl" v-if="logoUrl" />
<image src="/static/images/logo2.png" v-else />
</div>
<mobileLogin :isUp="isUp" :isShow="isShow" :platform="platform" :isPos="isPos" :appleShow="appleShow" :authKey="authKey" @wechatPhone="wechatPhone"></mobileLogin>
</view>
</template>
<script>
const app = getApp();
import sendVerifyCode from "@/mixins/SendVerifyCode";
import Routine from '@/libs/routine';
import {
loginMobile,
registerVerify,
getCodeApi,
getUserInfo,
phoneSilenceAuth,
phoneWxSilenceAuth
} from "@/api/user";
import {
bindingPhone
} from '@/api/api.js'
import {
getUserPhone
} from '@/api/public';
import mobileLogin from '@/components/login_mobile/index.vue'
export default {
name: 'login_mobile',
data() {
return {
options: '',
keyCode: '',
account: '',
codeNum: '',
isUp: true,
authKey: '',
logoUrl: '',
isShow: false,
isPos: false,
platform: '', //
appleShow: '' //
}
},
components: {
mobileLogin
},
mixins: [sendVerifyCode],
mounted() {
//this.getCode();
},
onLoad: function(options) {
let that = this;
//
uni.getSystemInfo({
success(res) {
that.platform = res.platform;
}
});
const {
code,
state,
scope,
back_url,
appleShow
} = options;
that.options = options
if (options.authKey) that.authKey = options.authKey
if (options.appleShow) that.appleShow = options.appleShow
},
methods: {
wechatPhone() {
this.$Cache.clear('snsapiKey');
if (this.options.back_url) {
let url = uni.getStorageSync('snRouter');
url = url.indexOf('/pages/index/index') != -1 ? '/' : url;
if (url.indexOf('/pages/users/wechat_login/index') !== -1) {
url = '/';
}
if (!url) {
url = '/pages/index/index';
}
this.isUp = false
uni.showToast({
title: '登录成功',
icon: 'none'
})
setTimeout(res => {
location.href = url
}, 800)
} else {
uni.navigateBack()
}
},
//
async code() {
let that = this;
if (!that.account) return that.$util.Tips({
title: '请填写手机号码'
});
if (!/^1(3|4|5|7|8|9|6)\d{9}$/i.test(that.account)) return that.$util.Tips({
title: '请输入正确的手机号码'
});
await registerVerify(that.account).then(res => {
that.$util.Tips({
title: res.msg
});
that.sendCode();
}).catch(err => {
return that.$util.Tips({
title: err
})
})
},
// api
getCode() {
let that = this
getCodeApi().then(res => {
that.keyCode = res.data.key;
}).catch(res => {
that.$util.Tips({
title: res
});
});
},
close() {
this.$emit('close', false)
},
// #ifdef MP
phoneSilenceAuth(code) {
let self = this
phoneSilenceAuth({
code: code,
spid: app.globalData.spid,
spread: app.globalData.code,
phone: this.account,
captcha: this.codeNum
}).then(res => {
this.$store.commit('LOGIN', {
token: res.data.token
});
this.$store.commit("SETUID", res.data.uid);
this.getUserInfo();
}).catch(error => {
self.$util.Tips({
title: error
})
})
},
// #endif
/**
* 获取个人用户信息
*/
getUserInfo: function() {
let that = this;
getUserInfo().then(res => {
uni.hideLoading();
that.userInfo = res.data
that.$store.commit("UPDATE_USERINFO", res.data);
// #ifdef MP
that.$util.Tips({
title: '登录成功',
icon: 'success'
}, {
tab: 3
})
that.close()
// #endif
// #ifdef H5
that.$emit('wechatPhone', true)
// #endif
});
},
}
}
</script>
<style>
page {
height: 100%;
}
</style>
<style lang="scss" scoped>
.appBox {
background-color: #fff;
height: 100%;
display: flex;
flex-direction: column;
justify-content: center;
overflow: hidden;
}
.shading {
display: flex;
align-items: center;
justify-content: center;
width: 100%;
image {
width: 180rpx;
height: 180rpx;
}
}
page {
background-color: #fff !important;
}
.ChangePassword .phone {
font-size: 32rpx;
font-weight: bold;
text-align: center;
margin-top: 55rpx;
}
.ChangePassword .list {
width: 580rpx;
margin: 53rpx auto 0 auto;
}
.ChangePassword .list .item {
width: 100%;
height: 110rpx;
border-bottom: 2rpx solid #f0f0f0;
}
.ChangePassword .list .item input {
width: 100%;
height: 100%;
font-size: 32rpx;
}
.ChangePassword .list .item .placeholder {
color: #b9b9bc;
}
.ChangePassword .list .item input.codeIput {
width: 340rpx;
}
.ChangePassword .list .item .code {
font-size: 32rpx;
background-color: #fff;
}
.ChangePassword .list .item .code.on {
color: #b9b9bc !important;
}
.ChangePassword .confirmBnt {
font-size: 32rpx;
width: 580rpx;
height: 90rpx;
border-radius: 45rpx;
color: #fff;
margin: 92rpx auto 0 auto;
text-align: center;
line-height: 90rpx;
}
</style>

View File

@ -29,11 +29,15 @@
<view class="people font-color">{{item.brokeragePrice}}</view>
</view>
</view>
<view class='noCommodity' v-if="rankList.length == 0 && (page != 1 || active== 0)">
<emptyPage title="暂无排行~"></emptyPage>
</view>
</view>
</view>
<!-- #ifdef MP -->
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize>
<!-- <authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize> -->
<!-- #endif -->
<home></home>
</view>
</template>
@ -45,6 +49,8 @@
import {
toLogin
} from '@/libs/login.js';
import home from '@/components/home';
import emptyPage from '@/components/emptyPage.vue'
import {
mapGetters
} from "vuex";
@ -53,6 +59,8 @@
// #endif
export default {
components: {
emptyPage,
home,
// #ifdef MP
authorize
// #endif
@ -90,13 +98,7 @@
this.getBrokerageRankList();
this.getBrokerageRankNumber(this.type);
} else {
// #ifdef H5 || APP-PLUS
toLogin();
// #endif
// #ifdef MP
this.isAuto = true;
this.$set(this, 'isShowAuth', true);
// #endif
}
},
methods: {
@ -179,7 +181,7 @@
.CommissionRank .wrapper {
width: 710rpx;
background-color: #fff;
border-radius: 20rpx;
border-radius: 14rpx;
margin: -76rpx auto 0 auto;
}
@ -193,7 +195,8 @@
}
.CommissionRank .wrapper .nav .item.font-color {
border-bottom: 4rpx solid #e93323;
border-bottom: 4rpx solid $theme-color;
margin-top: -2rpx;
}
.CommissionRank .wrapper .list {

View File

@ -1,24 +1,27 @@
<template>
<view>
<form @submit="formSubmit" report-submit='true'>
<view class='evaluate-con'>
<view class='goodsStyle acea-row row-between'>
<view class='evaluate-con pad30'>
<view class='goodsStyle acea-row row-between borRadius14'>
<view class='pictrue'>
<image :src='productInfo.image'></image>
</view>
<view class='text acea-row row-between'>
<view>
<view class='name line2'>{{productInfo.storeName}}</view>
<view class='attr line1' v-if="productInfo.sku">{{productInfo.sku}}</view>
</view>
<view class='money'>
<view>{{productInfo.price}}</view>
<view class='num'>x{{cart_num}}</view>
<view>{{productInfo.truePrice}}</view>
<view class='num'>x{{productInfo.cartNum}}</view>
</view>
</view>
</view>
<view class='score'>
<view class='score borRadius14'>
<view class='item acea-row row-middle' v-for="(item,indexw) in scoreList" :key="indexw">
<view>{{item.name}}</view>
<view class='starsList'>
<text @click="stars(indexn, indexw)" v-for="(itemn, indexn) in item.stars" :key="indexn" class='iconfont' :class="item.index >= indexn? 'icon-shitixing font-color':'icon-kongxinxing'"></text>
<text @click="stars(indexn, indexw)" v-for="(itemn, indexn) in item.stars" :key="indexn" class='iconfont' :class="item.index >= indexn? 'icon-shitixing':'icon-kongxinxing'"></text>
</view>
<text class='evaluate'>{{item.index === -1 ? "" : item.index + 1 + "分"}}</text>
</view>
@ -27,7 +30,7 @@
<view class='list acea-row row-middle'>
<view class='pictrue' v-for="(item,index) in picsPath" :key="index">
<image :src='item'></image>
<text class='iconfont icon-guanbi1 font-color' @click='DelPic(index)'></text>
<text class='iconfont icon-guanbi1' @click='DelPic(index)'></text>
</view>
<view class='pictrue acea-row row-center-wrapper row-column' @click='uploadpic' v-if="picsPath.length < 8">
<text class='iconfont icon-icon25201'></text>
@ -40,7 +43,7 @@
</view>
</form>
<!-- #ifdef MP -->
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize>
<!-- <authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize> -->
<!-- #endif -->
</view>
</template>
@ -103,26 +106,19 @@
}
},
onLoad(options) {
if (!options.unique || !options.uni || !options.id) return this.$util.Tips({
if (!options.unique || !options.orderId ) return this.$util.Tips({
title: '缺少参数'
}, {
tab: 3,
url: 1
});
this.unique = options.unique;
this.orderId = options.uni;
this.id = options.id;
this.evaluateId = options.id;
this.unique = Number(options.unique) || 0;
this.orderId = options.orderId || 0;
this.evaluateId = Number(options.id) || 0;
if (this.isLogin) {
this.getOrderProduct();
} else {
// #ifdef H5 || APP-PLUS
toLogin();
// #endif
// #ifdef MP
this.isAuto = true;
this.$set(this, 'isShowAuth', true);
// #endif
}
},
methods: {
@ -140,12 +136,12 @@
getOrderProduct: function() {
let that = this;
orderProduct({
orderId: that.id,
orderId: that.evaluateId,
uni: that.unique
}).then(res => {
that.$set(that, 'productInfo', res.data.productInfo);
that.$set(that, 'cart_num', res.data.cartNum);
that.$set(that, 'productId', res.data.productId);
that.$set(that, 'productInfo', res.data);
// that.$set(that, 'cart_num', res.data.cartNum);
// that.$set(that, 'productId', res.data.productId);
});
},
stars: function(indexn, indexw) {
@ -159,7 +155,7 @@
let that = this,
pic = this.picsPath[index];
that.picsPath.splice(index, 1);
that.$set(that, 'picsPath', that.picsPath);
that.pics.splice(index, 1);
},
/**
@ -196,10 +192,10 @@
value.productScore = product_score;
value.serviceScore = service_score;
value.pics = that.pics.length>0?JSON.stringify(that.pics):'';
value.productId = that.productId;
value.oid = that.evaluateId;
value.productId = that.productInfo.productId;
value.orderNo = that.orderId;
value.unique = that.unique;
value.sku = that.productInfo.attrInfo.suk;
value.sku = that.productInfo.sku;
uni.showLoading({
title: "正在发布评论……"
});
@ -221,16 +217,23 @@
</script>
<style lang="scss" scoped>
.goodsStyle .text .name, .attr{
//width: 496rpx;
}
.icon-shitixing{
color: #FFBB00 !important;
}
.evaluate-con .score {
background-color: #fff;
border-top: 1rpx solid #f5f5f5;
// border-top: 1rpx solid #f5f5f5;
margin-top: 20rpx;
font-size: 28rpx;
color: #282828;
padding: 48rpx 30rpx 65rpx 30rpx;
padding: 46rpx 24rpx;
}
.evaluate-con .score .item~.item {
margin-top: 30rpx;
margin-top: 36rpx;
}
.evaluate-con .score .item .starsList {
@ -252,10 +255,10 @@
}
.evaluate-con .score .textarea {
width: 690rpx;
background-color: #fafafa;
border-radius: 10rpx;
margin-top: 48rpx;
width: 100%;
background-color: #F5F5F5;
border-radius: 14rpx;
margin-top: 55rpx;
}
.evaluate-con .score .textarea textarea {
@ -264,6 +267,7 @@
width: 100%;
box-sizing: border-box;
height: 160rpx;
width: auto !important;
}
.evaluate-con .score .textarea .placeholder {
@ -282,6 +286,7 @@
position: relative;
font-size: 22rpx;
color: #bbb;
border-radius: 14rpx;
}
.evaluate-con .score .textarea .list .pictrue:nth-last-child(1) {
@ -292,7 +297,7 @@
.evaluate-con .score .textarea .list .pictrue image {
width: 100%;
height: 100%;
border-radius: 3rpx;
border-radius: 14rpx;
}
.evaluate-con .score .textarea .list .pictrue .icon-guanbi1 {
@ -310,7 +315,7 @@
.evaluate-con .score .evaluateBnt {
font-size: 30rpx;
color: #fff;
width: 690rpx;
width: 100%;
height: 86rpx;
border-radius: 43rpx;
text-align: center;

View File

@ -1,24 +1,30 @@
<template>
<view>
<view style="height: 100%;">
<view class='evaluate-list'>
<view class='generalComment acea-row row-between-wrapper'>
<view class='acea-row row-middle font-color'>
<view class='evaluate'>评分</view>
<view class='start' :class="'star'+ (replyData.sumCount===0?'3':Math.round(replyData.replyStar/replyData.sumCount))"></view>
<view class='start'
:class="'star'+ (replyData.sumCount===0?'3':Math.round(replyData.replyStar/replyData.sumCount))">
</view>
</view>
<view><text class='font-color'>{{(replyData.replyChance)*100}}%</text>好评率</view>
</view>
<view class='nav acea-row row-middle'>
<view class='item' :class='type==0 ? "bg-color":""' @click='changeType(0)'>全部({{replyData.sumCount}})</view>
<view class='item' :class='type==1 ? "bg-color":""' @click='changeType(1)'>好评({{replyData.goodCount}})</view>
<view class='item' :class='type==2 ? "bg-color":""' @click='changeType(2)'>中评({{replyData.inCount}})</view>
<view class='item' :class='type==3 ? "bg-color":""' @click='changeType(3)'>差评({{replyData.poorCount}})</view>
<view class='item' :class='type==0 ? "bg-color":""' @click='changeType(0)'>全部({{replyData.sumCount}})
</view>
<view class='item' :class='type==1 ? "bg-color":""' @click='changeType(1)'>好评({{replyData.goodCount}})
</view>
<view class='item' :class='type==2 ? "bg-color":""' @click='changeType(2)'>中评({{replyData.inCount}})
</view>
<view class='item' :class='type==3 ? "bg-color":""' @click='changeType(3)'>差评({{replyData.poorCount}})
</view>
</view>
<userEvaluation :reply="reply"></userEvaluation>
</view>
<view class='loadingicon acea-row row-center-wrapper'>
<text class='loading iconfont icon-jiazai' :hidden='loading==false'></text>{{loadTitle}}
</view>
</view>
<view class='noCommodity' v-if="!replyData.sumCount && page > 1">
<view class='pictrue'>
<image src='../static/noEvaluate.png'></image>
@ -130,10 +136,48 @@
</script>
<style lang="scss">
page{background-color:#fff;}
.evaluate-list .generalComment{height:94rpx;padding:0 30rpx;margin-top:1rpx;background-color:#fff;font-size:28rpx;color:#808080;}
.evaluate-list .generalComment .evaluate{margin-right:7rpx;}
.evaluate-list .nav{font-size:24rpx;color:#282828;padding:0 30rpx 32rpx 30rpx;background-color:#fff;border-bottom:1rpx solid #f5f5f5;}
.evaluate-list .nav .item{font-size:24rpx;color:#282828;border-radius:6rpx;height:54rpx;padding:0 20rpx;background-color:#f4f4f4;line-height:54rpx;margin-right:17rpx;}
.evaluate-list .nav .item.bg-color{color:#fff;}
page {
background-color: #fff;
height: 100%;
}
.evaluate-list{
padding: 30rpx 0 0 0;
background-color: #fff;
}
.evaluate-list .generalComment {
padding: 0 30rpx;
margin-top: 1rpx;
background-color: #fff;
font-size: 28rpx;
color: #808080;
}
.evaluate-list .generalComment .evaluate {
margin-right: 7rpx;
color: #333333;
font-size: 28rpx;
}
.evaluate-list .nav {
font-size: 24rpx;
color: #282828;
padding: 30rpx;
background-color: #fff;
border-bottom: 1rpx solid #f5f5f5;
}
.evaluate-list .nav .item {
font-size: 24rpx;
color: #282828;
border-radius: 27rpx;
height: 54rpx;
padding: 0 20rpx;
background-color: #f4f4f4;
line-height: 54rpx;
margin-right: 17rpx;
}
.evaluate-list .nav .item.bg-color {
color: #fff;
}
</style>

View File

@ -12,32 +12,36 @@
<div class="row-right">
<div>
<!-- #ifdef H5 -->
<a class="store-phone" :href="'tel:' + item.phone"><span class="iconfont icon-dadianhua01"></span></a>
<a class="store-phone" :href="'tel:' + item.phone"><span
class="iconfont icon-dadianhua01"></span></a>
<!-- #endif -->
<!-- #ifdef MP || APP-PLUS -->
<view class="store-phone" @click="call(item.phone)"><text class="iconfont icon-dadianhua01"></text></view>
<!-- #ifdef MP -->
<view class="store-phone" @click="call(item.phone)"><text
class="iconfont icon-dadianhua01"></text></view>
<!-- #endif -->
</div>
<!-- <div>
<a class="store-phone" :href="'tel:' + item.phone"><span class="iconfont icon-dadianhua01"></span></a>
</div> -->
<div class="store-distance" @click.stop="showMaoLocation(item)">
<span class="addressTxt" v-if="item.range">{{ item.range }}</span>
<span class="addressTxt" v-if="item.distance">{{ item.distance/1000 }}</span>
<span class="addressTxt" v-else></span>
<span class="iconfont icon-youjian"></span>
</div>
</div>
</div>
<Loading :loaded="loaded" :loading="loading"></Loading>
</div>
<div>
<iframe v-if="locationShow && !isWeixin" ref="geoPage" width="0" height="0" frameborder="0" style="display:none;"
<!-- <iframe v-if="locationShow && !isWeixin" ref="geoPage" width="0" height="0" frameborder="0" style="display:none;"
scrolling="no" :src="
'https://apis.map.qq.com/tools/geolocation?key=' +
mapKey +
'&referer=myapp'
">
</iframe>
</iframe> -->
</div>
</div>
</template>
@ -111,10 +115,23 @@
},
selfLocation() {
let self = this
// #ifdef H5
if (self.$wechat.isWeixin()) {
self.$wechat.location().then(res => {
this.user_latitude = res.latitude;
this.user_longitude = res.longitude;
uni.setStorageSync('user_latitude', res.latitude);
uni.setStorageSync('user_longitude', res.longitude);
self.getList();
})
} else {
// #endif
uni.getLocation({
type: 'wgs84',
success: function(res) {
success: (res) => {
try {
this.user_latitude = res.latitude;
this.user_longitude = res.longitude;
uni.setStorageSync('user_latitude', res.latitude);
uni.setStorageSync('user_longitude', res.longitude);
} catch {}
@ -124,16 +141,34 @@
self.getList();
}
});
// #ifdef H5
}
// #endif
},
showMaoLocation(e) {
let self = this;
// #ifdef H5
if (self.$wechat.isWeixin()) {
self.$wechat.seeLocation({
latitude: Number(e.latitude),
longitude: Number(e.longitude)
}).then(res => {
console.log('success');
})
} else {
// #endif
uni.openLocation({
latitude: Number(e.latitude),
longitude: Number(e.longitude),
name: e.name,
address: `${e.address}-${e.detailedAddress}`,
success: function() {
console.log('success');
Number
}
});
// #ifdef H5
}
// #endif
},
//
checked(e) {
@ -241,9 +276,10 @@
border-radius: 50%;
display: block;
text-align: center;
line-height: 50rpx;
line-height: 48rpx;
background-color: #e83323;
margin-bottom: 22rpx;
text-decoration: none;
}
.store-distance {

View File

@ -3,13 +3,13 @@
<view class='logistics'>
<view class='header acea-row row-between row-top'>
<view class='pictrue'>
<image :src='product.productInfo.image'></image>
<image :src='product.productImg'></image>
</view>
<view class='text acea-row row-between'>
<view class='name line2'>{{product.productInfo.storeName}}</view>
<view class='name line2'>{{product.productName}}</view>
<view class='money'>
<view>{{product.truePrice}}</view>
<view>x{{product.cartNum}}</view>
<view>{{product.price}}</view>
<view>x{{product.payNum}}</view>
</view>
</view>
</view>
@ -40,7 +40,7 @@
<recommend :hostProduct='hostProduct' v-if="hostProduct.length"></recommend>
</view>
<!-- #ifdef MP -->
<authorize :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize>
<!-- <authorize :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize> -->
<!-- #endif -->
</view>
</template>
@ -106,13 +106,7 @@
this.getExpress();
this.get_host_product();
} else {
// #ifdef H5 || APP-PLUS
toLogin();
// #endif
// #ifdef MP
this.isAuto = true;
this.$set(this, 'isShowAuth', true);
// #endif
}
},
onReady: function() {
@ -142,30 +136,11 @@
let that=this;
express(that.orderId).then(function(res){
let result = res.data.express|| {};
that.$set(that,'product',res.data.order.cartInfo[0] || {});
that.$set(that,'product',res.data.order.info[0] || {});
that.$set(that,'orderInfo',res.data.order);
that.$set(that,'expressList',result.list || []);
});
},
/**
* 获取我的推荐
*/
// getGroomList(onloadH) {
// this.loading = true
// if (!this.goodScroll) return
// if (onloadH) {
// this.iSshowH = true
// }
// getGroomList(type, this.params).then(({
// data
// }) => {
// this.iSshowH = false
// this.loading = false
// this.goodScroll = data.list.length >= this.params.limit
// this.params.page++
// this.tempArr = this.tempArr.concat(data.list)
// })
// }
get_host_product: function () {
this.loading = true
if (!this.goodScroll) return
@ -176,7 +151,6 @@
that.goodScroll = res.data.list.length >= that.params.limit
that.params.page++
that.hostProduct = that.hostProduct.concat(res.data.list)
// that.$set(that,'hostProduct',res.data.list);
});
},
},
@ -271,7 +245,7 @@
height: 40rpx;
text-align: center;
line-height: 40rpx;
border-radius: 3rpx;
border-radius: 20rpx;
border: 1rpx solid #999;
}
@ -291,15 +265,15 @@
}
.logistics .logisticsCon .item .circular.on {
background-color: #e93323;
background-color: $theme-color;
}
.logistics .logisticsCon .item .text.on-font {
color: #e93323;
color: $theme-color;
}
.logistics .logisticsCon .item .text .data.on-font {
color: #e93323;
color: $theme-color;
}
.logistics .logisticsCon .item .text {

View File

@ -2,21 +2,17 @@
<view>
<form @submit="subRefund" report-submit='true'>
<view class='apply-return'>
<view class='goodsStyle acea-row row-between' v-for="(item,index) in orderInfo.cartInfo" :key="index">
<view class='pictrue'><image :src='item.info.productInfo.image'></image></view>
<view class='goodsStyle acea-row row-between borRadius14' v-for="(item,index) in orderInfo.orderInfoList" :key="index">
<view class='pictrue'><image :src='item.image'></image></view>
<view class='text acea-row row-between'>
<view class='name line2'>{{item.info.productInfo.storeName}}</view>
<view class='money' v-if="item.info.productInfo.attrInfo">
<view>{{item.info.productInfo.attrInfo.price}}</view>
<view class='num'>x{{item.info.cartNum}}</view>
</view>
<view class='money' v-else>
<view>{{item.info.productInfo.price}}</view>
<view class='num'>x{{item.info.cartNum}}</view>
<view class='name line2'>{{item.storeName}}</view>
<view class='money'>
<view>{{item.price}}</view>
<view class='num'>x{{item.cartNum}}</view>
</view>
</view>
</view>
<view class='list'>
<view class='list borRadius14'>
<view class='item acea-row row-between-wrapper'>
<view>退货件数</view>
<view class='num'>{{orderInfo.totalNum}}</view>
@ -38,7 +34,7 @@
<view>备注说明</view>
<textarea placeholder='填写备注信息100字以内' class='num' name="refund_reason_wap_explain" placeholder-class='100'></textarea>
</view>
<view class='item acea-row row-between'>
<view class='item acea-row row-between' style="border: none;">
<view class='title acea-row row-between-wrapper'>
<view>上传凭证</view>
<view class='tip'>( 最多可上传3张 )</view>
@ -54,17 +50,17 @@
</view>
</view>
</view>
</view>
<button class='returnBnt bg-color' form-type="submit">申请退款</button>
</view>
</view>
</form>
<!-- #ifdef MP -->
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize>
<!-- <authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize> -->
<!-- #endif -->
</view>
</template>
<script>
import { ordeRefundReason, orderRefundVerify, getOrderDetail} from '@/api/order.js';
import { ordeRefundReason, orderRefundVerify, applyRefund} from '@/api/order.js';
import {
toLogin
} from '@/libs/login.js';
@ -111,13 +107,7 @@
this.getOrderInfo();
this.getRefundReason();
} else {
// #ifdef H5 || APP-PLUS
toLogin();
// #endif
// #ifdef MP
this.isAuto = true;
this.$set(this, 'isShowAuth', true);
// #endif
}
},
methods: {
@ -131,7 +121,7 @@
*/
getOrderInfo:function(){
let that=this;
getOrderDetail(that.orderId).then(res=>{
applyRefund(that.orderId).then(res=>{
that.$set(that,'orderInfo',res.data);
});
},
@ -190,22 +180,25 @@
</script>
<style scoped lang="scss">
.apply-return .list{background-color:#fff;margin-top:18rpx;}
.apply-return .list .item{margin-left:30rpx;padding-right:30rpx;min-height:90rpx;border-bottom:1rpx solid #eee;font-size:30rpx;color:#333;}
.apply-return{
padding: 20rpx 30rpx 70rpx 30rpx;
}
.apply-return .list{background-color:#fff;margin-top:18rpx;padding:0 24rpx 70rpx 24rpx;}
.apply-return .list .item{min-height:90rpx;border-bottom:1rpx solid #eee;font-size:30rpx;color:#333;}
.apply-return .list .item .num{color:#282828;width:427rpx;text-align:right;}
.apply-return .list .item .num .picker .reason{width:385rpx;}
.apply-return .list .item .num .picker .iconfont{color:#666;font-size:30rpx;margin-top:2rpx;}
.apply-return .list .item.textarea{padding:30rpx 30rpx 30rpx 0;}
.apply-return .list .item.textarea{padding:24rpx 0;}
.apply-return .list .item textarea{height:100rpx;font-size:30rpx;}
.apply-return .list .item .placeholder{color:#bbb;}
.apply-return .list .item .title{height:95rpx;width:100%;}
.apply-return .list .item .title .tip{font-size:30rpx;color:#bbb;}
.apply-return .list .item .upload{padding-bottom:36rpx;}
.apply-return .list .item .upload .pictrue{margin:22rpx 23rpx 0 0;width:156rpx;height:156rpx;position:relative;font-size:24rpx;color:#bbb;}
.apply-return .list .item .upload .pictrue{border-radius: 14rpx; margin:22rpx 23rpx 0 0;width:156rpx;height:156rpx;position:relative;font-size:24rpx;color:#bbb;}
.apply-return .list .item .upload .pictrue:nth-of-type(4n){margin-right:0;}
.apply-return .list .item .upload .pictrue image{width:100%;height:100%;border-radius:3rpx;}
.apply-return .list .item .upload .pictrue image{width:100%;height:100%;border-radius:14rpx;}
.apply-return .list .item .upload .pictrue .icon-guanbi1{position:absolute;font-size:45rpx;top:-10rpx;right:-10rpx;}
.apply-return .list .item .upload .pictrue .icon-icon25201{color:#bfbfbf;font-size:50rpx;}
.apply-return .list .item .upload .pictrue:nth-last-child(1){border:1rpx solid #ddd;box-sizing:border-box;}
.apply-return .returnBnt{font-size:32rpx;color:#fff;width:690rpx;height:86rpx;border-radius:50rpx;text-align:center;line-height:86rpx;margin:43rpx auto;}
.apply-return .returnBnt{font-size:32rpx;color:#fff;width:100%;height:86rpx;border-radius:50rpx;text-align:center;line-height:86rpx;margin:43rpx auto;}
</style>

View File

@ -0,0 +1,34 @@
<template>
<web-view class="web-view" :webview-styles="webviewStyles" :src="url" :style="{width: windowW + 'px', height: windowH + 'px'}"></web-view>
</template>
<script>
import {
mapGetters
} from "vuex";
export default {
computed: mapGetters(['chatUrl']),
data() {
return {
windowH: 0,
windowW: 0,
webviewStyles: {
progress: {
color: 'transparent'
}
},
url: ''
}
},
onLoad(option) {
this.url = this.chatUrl;
try {
const res = uni.getSystemInfoSync();
this.windowW = res.windowWidth;
this.windowH = res.windowHeight;
} catch (e) {
// error
}
}
}
</script>

View File

@ -1,47 +1,37 @@
<template>
<div class="register absolute">
<div class="login-wrapper">
<div class="shading">
<div class="pictrue acea-row row-center-wrapper">
<image :src="logoUrl" v-if="logoUrl" />
<image src="/static/images/logo2.png" v-else />
</div>
<!-- <image :src="logoUrl"/> -->
<image :src="logoUrl"/>
<!-- <image src="/static/images/logo2.png" v-if="!logoUrl" /> -->
</div>
<div class="whiteBg" v-if="formItem === 1">
<div class="title acea-row row-center-wrapper">
<div class="item" :class="current === index ? 'on' : ''" v-for="(item, index) in navList" @click="navTap(index)"
:key="index">
{{ item }}
</div>
</div>
<div class="list" :hidden="current !== 1">
<div class="list" v-if="current !== 1">
<form @submit.prevent="submit">
<div class="item">
<div class="acea-row row-middle">
<image src="/static/images/phone_1.png"></image>
<input type="text" placeholder="输入手机号码" v-model="account" required />
<image src="/static/images/phone_1.png" style="width: 24rpx; height: 34rpx;"></image>
<input type="text" class="texts" placeholder="输入手机号码" v-model="account" required/>
</div>
</div>
<div class="item">
<div class="acea-row row-middle">
<image src="/static/images/code_2.png"></image>
<input type="password" placeholder="填写登录密码" v-model="password" required />
<image src="/static/images/code_2.png" style="width: 28rpx; height: 32rpx;"></image>
<input type="password" class="texts" placeholder="填写登录密码" v-model="password" required />
</div>
</div>
</form>
<!-- <navigator class="forgetPwd" hover-class="none" url="/pages/users/retrievePassword/index">
<span class="iconfont icon-wenti"></span>忘记密码
</navigator> -->
</div>
<div class="list" :hidden="current !== 0">
<div class="list" v-if="current !== 0 || appLoginStatus || appleLoginStatus">
<div class="item">
<div class="acea-row row-middle">
<image src="/static/images/phone_1.png"></image>
<input type="text" placeholder="输入手机号码" v-model="account" />
<image src="/static/images/phone_1.png" style="width: 24rpx; height: 34rpx;"></image>
<input type="text" class="texts" placeholder="输入手机号码" v-model="account" />
</div>
</div>
<div class="item">
<div class="acea-row row-middle">
<image src="/static/images/code_2.png"></image>
<image src="/static/images/code_2.png" style="width: 28rpx; height: 32rpx;"></image>
<input type="text" placeholder="填写验证码" class="codeIput" v-model="captcha" />
<button class="code" :disabled="disabled" :class="disabled === true ? 'on' : ''" @click="code">
{{ text }}
@ -50,59 +40,19 @@
</div>
<div class="item" v-if="isShowCode">
<div class="acea-row row-middle">
<image src="/static/images/code_2.png"></image>
<image src="/static/images/code_2.png" style="width: 28rpx; height: 32rpx;"></image>
<input type="text" placeholder="填写验证码" class="codeIput" v-model="codeVal" />
<div class="code" @click="again"><img :src="codeUrl" /></div>
</div>
</div>
</div>
<div class="logon" @click="loginMobile" :hidden="current !== 0">登录</div>
<div class="logon" @click="submit" :hidden="current === 0">登录</div>
<div class="tip">
<div :hidden="current !== 1">
没有账号?
<span @click="current = 0" class="font-color-red">快速登录</span>
<div class="logon" @click="loginMobile" v-if="current !== 0"></div>
<div class="logon" @click="submit" v-if="current === 0"></div>
<div class="tips">
<div v-if="current==0" @click="current = 1"></div>
<div v-if="current==1" @click="current = 0"></div>
</div>
</div>
</div>
<!-- <div class="whiteBg" v-else>
<div class="title">注册账号</div>
<div class="list">
<div class="item">
<div class="acea-row row-middle">
<image src="/static/images/phone_1.png"></image>
<input type="text" placeholder="输入手机号码" v-model="account" />
</div>
</div>
<div class="item">
<div class="acea-row row-middle">
<image src="/static/images/code_2.png"></image>
<input type="text" placeholder="填写验证码" class="codeIput" v-model="captcha" />
<button class="code" :disabled="disabled" :class="disabled === true ? 'on' : ''" @click="code">
{{ text }}
</button>
</div>
</div>
<div class="item">
<div class="acea-row row-middle">
<image src="/static/images/code_1.png"></image>
<input type="password" placeholder="填写您的登录密码" v-model="password" />
</div>
</div>
<div class="item" v-if="isShowCode">
<div class="acea-row row-middle">
<image src="/static/images/code_2.png"></image>
<input type="text" placeholder="填写验证码" class="codeIput" v-model="codeVal" />
<div class="code" @click="again"><img :src="codeUrl" /></div>
</div>
</div>
</div>
<div class="logon" @click="register"></div>
<div class="tip">
已有账号?
<span @click="formItem = 1" class="font-color-red">立即登录</span>
</div>
</div> -->
<div class="bottom"></div>
</div>
</template>
@ -126,7 +76,7 @@
validatorDefaultCatch
} from "@/utils/dialog";
import {
getLogo
getLogo, appAuth, appleLogin
} from "@/api/public";
import {
VUE_APP_API_URL
@ -140,7 +90,7 @@
data: function() {
return {
navList: ["快速登录", "账号登录"],
current: 0,
current: 1,
account: "",
password: "",
captcha: "",
@ -150,7 +100,13 @@
keyCode: "",
codeUrl: "",
codeVal: "",
isShowCode: false
isShowCode: false,
platform: '',
appLoginStatus: false, //
appUserInfo: null, //
appleLoginStatus: false, //
appleUserInfo: null,
appleShow: false // ios13
};
},
watch:{
@ -166,7 +122,143 @@
this.getCode();
this.getLogoImage();
},
onLoad() {
let self = this
uni.getSystemInfo({
success: function(res) {
if (res.platform.toLowerCase() == 'ios' && res.system.split(' ')[1] >= 13) {
self.appleShow = true
}
}
});
},
methods: {
//
appleLogin() {
let self = this
this.account = ''
this.captcha = ''
uni.showLoading({
title: '登录中'
})
uni.login({
provider: 'apple',
timeout: 10000,
success(loginRes) {
uni.getUserInfo({
provider: 'apple',
success: function(infoRes) {
self.appleUserInfo = infoRes.userInfo
self.appleLoginApi()
},
fail() {
uni.hideLoading()
uni.showToast({
title: '获取用户信息失败',
icon: 'none',
duration: 2000
})
},
complete() {
uni.hideLoading()
}
});
},
fail(error) {
uni.hideLoading()
console.log(error)
}
})
},
// Api
appleLoginApi() {
let self = this
appleLogin({
openId: self.appleUserInfo.openId,
email: self.appleUserInfo.email == undefined ? '' :self.appleUserInfo.email,
identityToken: self.appleUserInfo.identityToken || ''
}).then((res) => {
this.$store.commit("LOGIN", {
'token': res.data.token
});
this.getUserInfo(res.data);
}).catch(error => {
uni.hideLoading();
uni.showModal({
title: '提示',
content: `错误信息${error}`,
success: function(res) {
if (res.confirm) {
console.log('用户点击确定');
} else if (res.cancel) {
console.log('用户点击取消');
}
}
});
})
},
// App
wxLogin() {
let self = this
this.account = ''
this.captcha = ''
uni.showLoading({
title: '登录中'
})
uni.login({
provider: 'weixin',
success: function(loginRes) {
//
uni.getUserInfo({
provider: 'weixin',
success: function(infoRes) {
uni.hideLoading();
self.appUserInfo = infoRes.userInfo
self.appUserInfo.type = self.platform === 'ios' ? 'iosWx' : 'androidWx'
self.wxLoginGo(self.appUserInfo)
},
fail() {
uni.hideLoading();
uni.showToast({
title: '获取用户信息失败',
icon: 'none',
duration: 2000
})
},
complete() {
uni.hideLoading()
}
});
},
fail() {
uni.hideLoading()
uni.showToast({
title: '登录失败',
icon: 'none',
duration: 2000
})
}
});
},
wxLoginGo(userInfo) {
appAuth(userInfo).then(res => {
if (res.data.type === 'register') {
uni.navigateTo({
url: '/pages/users/app_login/index?authKey='+res.data.key
})
}
if (res.data.type === 'login') {
this.$store.commit("LOGIN", {
'token': res.data.token
});
this.getUserInfo(res.data);
}
}).catch(res => {
that.$util.Tips({
title: res
});
});
},
again() {
this.codeUrl =
VUE_APP_API_URL +
@ -177,20 +269,11 @@
},
getCode() {
let that = this
// getCodeApi()
// .then(res => {
// that.keyCode = res.data.key;
// })
// .catch(res => {
// that.$util.Tips({
// title: res
// });
// });
},
async getLogoImage() {
let that = this;
getLogo().then(res => {
that.logoUrl = res.data.logoUrl;
that.logoUrl = res.data.logoUrl?res.data.logoUrl:'/static/images/logo2.png';
});
},
async loginMobile() {
@ -208,34 +291,17 @@
title: '请输入正确的验证码'
});
loginMobile({
account: that.account,
phone: that.account,
captcha: that.captcha,
spread: that.$Cache.get("spread")
spread_spid: that.$Cache.get("spread")
})
.then(res => {
let data = res.data;
let newTime = Math.round(new Date() / 1000);
that.$store.commit("LOGIN", {
'token': data.token
// 'time': dayjs(data.expiresTime) - newTime
this.$store.commit("LOGIN", {
'token': res.data.token
});
const backUrl = that.$Cache.get(BACK_URL) || "/pages/index/index";
that.$Cache.clear(BACK_URL);
// getUserInfo().then(res => {
that.$store.commit("SETUID", res.data.user.uid);
if (backUrl === '/pages/index/index' || backUrl === '/pages/order_addcart/order_addcart' || backUrl ===
'/pages/user/index') {
uni.switchTab({
url: backUrl
});
} else {
uni.switchTab({
url: '/pages/index/index'
});
}
// })
that.getUserInfo(data);
})
.catch(res => {
that.$util.Tips({
@ -290,21 +356,15 @@
title: '请输入正确的手机号码'
});
if (that.formItem == 2) that.type = "register";
// phone: that.account
// type: that.type,
// key: that.keyCode,
// code: that.codeVal
await registerVerify(that.account)
.then(res => {
that.$util.Tips({title:res.message});
that.sendCode();
})
.catch(res => {
// if (res.data.status === 402) {
// that.codeUrl = `${VUE_APP_API_URL}/sms_captcha?key=${that.keyCode}`;
// that.isShowCode = true;
// }
that.$util.Tips({title:res.message});
.catch(err => {
return that.$util.Tips({
title: err
});
});
},
navTap: function(index) {
@ -329,36 +389,109 @@
.then(({
data
}) => {
// let newTime = Math.round(new Date() / 1000);
that.$store.commit("LOGIN", {
this.$store.commit("LOGIN", {
'token': data.token
// 'time': dayjs(data.expiresTime) - newTime
});
const backUrl = that.$Cache.get(BACK_URL) || "/pages/index/index";
that.$Cache.clear(BACK_URL);
getUserInfo().then(res => {
that.$store.commit("SETUID", res.data.uid);
if (backUrl === '/pages/index/index' || backUrl === '/pages/order_addcart/order_addcart' || backUrl ==='/pages/user/index') {
uni.switchTab({
url: backUrl
});
} else {
uni.switchTab({
url: '/pages/index/index'
});
}
})
that.getUserInfo(data);
})
.catch(e => {
that.$util.Tips({
title: e
});
});
},
getUserInfo(data){
this.$store.commit("SETUID", data.uid);
getUserInfo().then(res => {
this.$store.commit("UPDATE_USERINFO", res.data);
let backUrl = this.$Cache.get(BACK_URL) || "/pages/index/index";
if (backUrl.indexOf('/pages/users/login/index') !== -1) {
backUrl = '/pages/index/index';
}
uni.reLaunch({
url: backUrl
});
})
}
}
};
</script>
<style lang="scss">
<style lang="scss" scoped>
page {
background: #fff;
}
.appLogin {
margin-top: 60rpx;
.hds {
display: flex;
justify-content: center;
align-items: center;
font-size: 24rpx;
color: #B4B4B4;
.line {
width: 68rpx;
height: 1rpx;
background: #CCCCCC;
}
p {
margin: 0 20rpx;
}
}
.btn-wrapper {
display: flex;
align-items: center;
justify-content: center;
margin-top: 30rpx;
.btn {
display: flex;
align-items: center;
justify-content: center;
width: 68rpx;
height: 68rpx;
border-radius: 50%;
}
.apple-btn {
display: flex;
align-items: center;
justify-content: center;
margin-left: 30rpx;
background: #000;
border-radius: 34rpx;
font-size: 40rpx;
.icon-s-pingguo {
color: #fff;
font-size: 40rpx;
}
}
.iconfont {
font-size: 40rpx;
color: #fff;
}
.wx {
margin-right: 30rpx;
background-color: #61C64F;
}
.mima {
background-color: #28B3E9;
}
.yanzheng {
background-color: #F89C23;
}
}
}
.code img {
width: 100%;
height: 100%;
@ -367,6 +500,99 @@
.acea-row.row-middle {
input {
margin-left: 20rpx;
display: block;
}
}
.login-wrapper {
padding: 30rpx;
.shading {
display: flex;
align-items: center;
justify-content: center;
width: 100%;
/* #ifdef APP-VUE */
margin-top: 50rpx;
/* #endif */
/* #ifndef APP-VUE */
margin-top: 200rpx;
/* #endif */
image {
width: 180rpx;
height: 180rpx;
}
}
.whiteBg {
margin-top: 100rpx;
.list {
border-radius: 16rpx;
overflow: hidden;
.item {
border-bottom: 1px solid #F0F0F0;
background: #fff;
.row-middle {
position: relative;
padding: 16rpx 45rpx;
.texts{
flex: 1;
font-size: 28rpx;
height: 80rpx;
line-height: 80rpx;
display: flex;
justify-content: center;
align-items: center;
}
input {
flex: 1;
font-size: 28rpx;
height: 80rpx;
line-height: 80rpx;
display: flex;
justify-content: center;
align-items: center;
}
.code {
position: absolute;
right: 30rpx;
top: 50%;
color: $theme-color;
font-size: 26rpx;
transform: translateY(-50%);
}
}
}
}
.logon {
display: flex;
align-items: center;
justify-content: center;
width: 100%;
height: 86rpx;
margin-top: 80rpx;
background-color: $theme-color;
border-radius: 120rpx;
color: #FFFFFF;
font-size: 30rpx;
}
.tips {
margin: 30rpx;
text-align: center;
color: #999;
}
}
}
</style>

View File

@ -1,17 +1,23 @@
<template>
<view>
<view class='order-submission'>
<view class="allAddress" :style="store_self_mention ? '':'padding-top:10rpx'">
<view class="allAddress" :style="store_self_mention ? '':'padding-top:10rpx;'">
<view class="nav acea-row">
<view class="item font-color" :class="shippingType == 0 ? 'on' : 'on2'" @tap="addressType(0)" v-if='store_self_mention'></view>
<view class="item font-color" :class="shippingType == 1 ? 'on' : 'on2'" @tap="addressType(1)" v-if='store_self_mention'></view>
<view class="item font-color" :class="shippingType == 0 ? 'on' : 'on2'" @tap="addressType(0)"
v-if='store_self_mention'></view>
<view class="item font-color" :class="shippingType == 1 ? 'on' : 'on2'" @tap="addressType(1)"
v-if='store_self_mention'></view>
</view>
<view class='address acea-row row-between-wrapper' @tap='onAddress' v-if='shippingType == 0'>
<view class='address acea-row row-between-wrapper' @tap='onAddress' v-if='shippingType == 0' :style="store_self_mention ? '':'border-top-left-radius: 14rpx;border-top-right-radius: 14rpx;'">
<view class='addressCon' v-if="addressInfo.realName">
<view class='name'>{{addressInfo.realName}}
<text class='phone'>{{addressInfo.phone}}</text>
</view>
<view><text class='default font-color' v-if="addressInfo.isDefault">[]</text>{{addressInfo.province}}{{addressInfo.city}}{{addressInfo.district}}{{addressInfo.detail}}</view>
<view class="acea-row">
<text class='default font-color'
v-if="addressInfo.isDefault">[默认]</text>
<text class="line2">{{addressInfo.province}}{{addressInfo.city}}{{addressInfo.district}}{{addressInfo.detail}}</text>
</view>
</view>
<view class='addressCon' v-else>
<view class='setaddress'>设置收货地址</view>
@ -24,7 +30,8 @@
<view class='name'>{{system_store.name}}
<text class='phone'>{{system_store.phone}}</text>
</view>
<view class="line1"> {{system_store.address}}{{", " + system_store.detailedAddress}}</view>
<view class="line1"> {{system_store.address}}{{", " + system_store.detailedAddress}}
</view>
</view>
<view class='iconfont icon-jiantou'></view>
</block>
@ -36,45 +43,55 @@
<image src='/static/images/line.jpg'></image>
</view>
</view>
<orderGoods :cartInfo="cartInfo"></orderGoods>
<view class='wrapper'>
<view class='item acea-row row-between-wrapper' @tap='couponTap' v-if="!pinkId && !BargainId && !combinationId && !seckillId">
<view class="pad30">
<orderGoods :cartInfo="cartInfo" :orderProNum="orderProNum"></orderGoods>
<view class='wrapper borRadius14'>
<view class='item acea-row row-between-wrapper' @tap='couponTap'
v-if="!orderInfoVo.bargainId && !orderInfoVo.combinationId && !orderInfoVo.seckillId && productType==='normal'">
<view>优惠券</view>
<view class='discount'>{{couponTitle}}
<text class='iconfont icon-jiantou'></text>
</view>
</view>
<view class='item acea-row row-between-wrapper' v-if="!pinkId && !BargainId && !combinationId && !seckillId">
<view class='item acea-row row-between-wrapper'
v-if="!orderInfoVo.bargainId && !orderInfoVo.combinationId && !orderInfoVo.seckillId && productType==='normal'">
<view>积分抵扣</view>
<!-- -->
<view class='discount acea-row row-middle'>
<view> {{useIntegral ? "剩余积分":"当前积分"}}
<text class='num font-color'>{{integral || 0}}</text>
<text class='num font-color'>{{useIntegral ? orderInfoVo.surplusIntegral : orderInfoVo.userIntegral || 0}}</text>
</view>
<checkbox-group @change="ChangeIntegral">
<checkbox :checked='useIntegral ? true : false' />
<checkbox :checked='useIntegral ? true : false' :disabled="orderInfoVo.userIntegral==0 && !useIntegral"/>
</checkbox-group>
</view>
</view>
<view class='item acea-row row-between-wrapper' v-if="priceGroup.vipPrice > 0 && userInfo.vip && !pinkId && !BargainId && !combinationId && !seckillId">
<!-- <view class='item acea-row row-between-wrapper'
v-if="priceGroup.vipPrice > 0 && userInfo.vip && !pinkId && !BargainId && !combinationId && !seckillId">
<view>会员优惠</view>
<view class='discount'>-{{priceGroup.vipPrice}}</view>
</view>
</view> -->
<view class='item acea-row row-between-wrapper' v-if='shippingType==0'>
<view>快递费用</view>
<view class='discount' v-if='parseFloat(priceGroup.storePostage) > 0'>+{{priceGroup.storePostage}}</view>
<view class='discount' v-if='parseFloat(orderInfoVo.freightFee) > 0'>
+{{orderInfoVo.freightFee}}
</view>
<view class='discount' v-else></view>
</view>
<view v-else>
<view class="item acea-row row-between-wrapper">
<view>联系人</view>
<view class="discount textR">
<input type="text" placeholder="请填写您的联系姓名" placeholder-class="placeholder" @blur='realName'></input>
<input type="text" placeholder="请填写您的联系姓名" placeholder-style="color:#ccc;" placeholder-class="placeholder"
@blur='realName'></input>
</view>
</view>
<view class="item acea-row row-between-wrapper">
<view>联系电话</view>
<view class="discount textR">
<input type="text" placeholder="请填写您的联系电话" placeholder-class="placeholder" @blur='phone'></input>
<input type="text" placeholder="请填写您的联系电话" placeholder-style="color:#ccc;" placeholder-class="placeholder"
@blur='phone'></input>
</view>
</view>
</view>
@ -84,81 +101,76 @@
</view> -->
<view class='item' v-if="textareaStatus">
<view>备注信息</view>
<textarea v-if="coupon.coupon===false" placeholder-class='placeholder' @input='bindHideKeyboard' value="" name="mark"
placeholder='请添加备注150字以内'></textarea>
<textarea v-if="coupon.coupon===false" placeholder-class='placeholder' @input='bindHideKeyboard'
value="" name="mark" placeholder='请添加备注150字以内'></textarea>
</view>
</view>
<view class='wrapper'>
<view class='wrapper borRadius14'>
<view class='item'>
<view>支付方式</view>
<view class='list'>
<view class='payItem acea-row row-middle' :class='active==index ?"on":""' @tap='payItem(index)' v-for="(item,index) in cartArr"
:key='index' v-if="item.payStatus==1">
<view class='payItem acea-row row-middle' :class='active==index ?"on":""'
@tap='payItem(index)' v-for="(item,index) in cartArr" :key='index'
v-if="item.payStatus==1">
<view class='name acea-row row-center-wrapper'>
<view class='iconfont animated' :class='(item.icon) + " " + (animated==true&&active==index ?"bounceIn":"")'></view>{{item.name}}
<view class='iconfont animated'
:class='(item.icon) + " " + (animated==true&&active==index ?"bounceIn":"")'>
</view>
{{item.name}}
</view>
<view class='tip'>{{item.title}}</view>
</view>
<!-- #ifdef MP || APP-PLUS -->
<!-- <view class='payItem acea-row row-middle' :class='active==index ?"on":""' @tap='payItem(index)' v-for="(item,index) in cartArr"
:key='index' v-if="item.payStatus==1">
<view class='name acea-row row-center-wrapper'>
<view class='iconfont animated' :class='(item.icon) + " " + (animated==true&&active==index ?"bounceIn":"")'></view>{{item.name}}
</view>
<view class='tip'>{{item.title}}</view>
</view> -->
<!-- #endif -->
</view>
</view>
</view>
<view class='moneyList'>
<view class='moneyList borRadius14'>
<view class='item acea-row row-between-wrapper'>
<view>商品总价</view>
<view class='money'>{{priceGroup.totalPrice}}</view>
<view class='money'>{{orderInfoVo.proTotalFee || 0}}</view>
</view>
<view class='item acea-row row-between-wrapper' v-if="coupon_price > 0">
<view class='item acea-row row-between-wrapper' v-if="orderInfoVo.couponFee > 0">
<view>优惠券抵扣</view>
<view class='money'>-{{coupon_price}}</view>
<view class='money'>-{{orderInfoVo.couponFee}}</view>
</view>
<view class='item acea-row row-between-wrapper' v-if="integral_price > 0">
<view class='item acea-row row-between-wrapper' v-if="orderInfoVo.deductionPrice > 0">
<view>积分抵扣</view>
<view class='money'>-{{integral_price}}</view>
<view class='money'>-{{orderInfoVo.deductionPrice}}</view>
</view>
<view class='item acea-row row-between-wrapper' v-if="priceGroup.storePostage > 0">
<view class='item acea-row row-between-wrapper' v-if="orderInfoVo.freightFee > 0">
<view>运费</view>
<view class='money'>+{{priceGroup.storePostage}}</view>
<view class='money'>+{{orderInfoVo.freightFee}}</view>
</view>
</view>
<view style='height:120rpx;'></view>
</view>
<view class='footer acea-row row-between-wrapper'>
<view>合计:
<text class='font-color'>{{totalPrice || 0}}</text>
<text class='font-color'>{{orderInfoVo.payFee || 0}}</text>
</view>
<view class='settlement' style='z-index:100' @tap="SubOrder"></view>
</view>
</view>
<couponListWindow :coupon='coupon' @ChangCouponsClone="ChangCouponsClone" :openType='openType' :cartId='cartId'
@ChangCoupons="ChangCoupons"></couponListWindow>
<addressWindow ref="addressWindow" @changeTextareaStatus="changeTextareaStatus" :address='address' :pagesUrl="pagesUrl"
@OnChangeAddress="OnChangeAddress" @changeClose="changeClose"></addressWindow>
<couponListWindow :coupon='coupon' @ChangCouponsClone="ChangCouponsClone" :openType='openType' @ChangCoupons="ChangCoupons" :orderShow="orderShow"></couponListWindow>
<addressWindow ref="addressWindow" @changeTextareaStatus="changeTextareaStatus" :address='address'
:pagesUrl="pagesUrl" @OnDefaultAddress="OnDefaultAddress" @OnChangeAddress="OnChangeAddress" @changeClose="changeClose"></addressWindow>
<!-- #ifdef MP -->
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize>
<!-- <authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize> -->
<!-- #endif -->
<home></home>
</view>
</template>
<script>
import {
orderConfirm,
//orderConfirm,
getCouponsOrderPrice,
orderCreate,
postOrderComputed,
orderPay,
wechatOrderPay,
wechatQueryPayResult
wechatQueryPayResult,
loadPreOrderApi
} from '@/api/order.js';
import {
getAddressDefault,
getAddressList,
getAddressDetail
} from '@/api/user.js';
import {
@ -196,6 +208,7 @@
},
data() {
return {
orderShow: 'orderShow', //使tab
textareaStatus: true,
//
cartArr: [{
@ -211,14 +224,14 @@
value: 'yue',
title: '可用余额:',
payStatus: 1,
},
{
"name": "线下支付", //offlinePayStatu1线2offlinePostagetrue
"icon": "icon-yinhangqia",
value: 'offline',
title: '线下支付',
payStatus: 1,
},
}
// {
// "name": "线", //offlinePayStatu1线2offlinePostagetrue
// "icon": "icon-yinhangqia",
// value: 'offline',
// title: '线',
// payStatus: 1,
// },
],
payType: 'weixin', //
openType: 1, // 1=使
@ -229,16 +242,13 @@
statusTile: '立即使用'
}, //
address: {
address: false
address: false,
addressId: 0
}, //
addressInfo: {}, //
pinkId: 0, //id
addressId: 0, //id
couponId: 0, //id
cartId: '', //id
BargainId: 0,
combinationId: 0,
seckillId: 0,
userInfo: {}, //
mark: '', //
couponTitle: '请选择', //
@ -277,57 +287,45 @@
bargain: false, //
combination: false, //
secKill: false, //
orderInfoVo: {},
addressList: [], //
orderProNum: 0,
preOrderNo: '' //
};
},
computed: mapGetters(['isLogin']),
computed: mapGetters(['isLogin', 'systemPlatform', 'productType']),
watch: {
isLogin: {
handler: function(newV, oldV) {
if (newV) {
this.getaddressInfo();
this.getConfirm();
this.getloadPreOrder();
//this.getaddressInfo();
}
},
deep: true
}
},
onLoad: function(options) {
onLoad(options) {
// #ifdef H5
this.payChannel = this.$wechat.isWeixin() ? 'public' : 'weixinh5'
this.payChannel = this.$wechat.isWeixin() ? 'public' : 'weixinh5';
// #endif
// #ifdef MP
this.payChannel = 'routine'
this.payChannel = 'routine';
// #endif
if (!options.cartId) return this.$util.Tips({
title: '请选择要购买的商品'
}, {
tab: 3,
url: 1
});
this.couponId = options.couponId || 0;
this.pinkId = options.pinkId ? parseInt(options.pinkId) : 0;
// if (!options.cartId) return this.$util.Tips({
// title: ''
// }, {
// tab: 3,
// url: 1
// });
this.preOrderNo = options.preOrderNo || 0;
this.addressId = options.addressId || 0;
this.cartId = options.cartId;
this.is_address = options.is_address ? true : false;
this.news = options.new || true;
this.again = options.again || false;
this.addAgain = options.addAgain || false;
this.secKill = options.secKill || false;
this.combination = options.combination || false;
this.bargain = options.bargain || false;
if (this.isLogin) {
this.getaddressInfo();
this.getConfirm();
//
this.$nextTick(function() {})
//this.getaddressInfo();
this.getloadPreOrder();
} else {
// #ifdef H5 || APP-PLUS
toLogin();
// #endif
// #ifdef MP
this.isAuto = true;
this.$set(this, 'isShowAuth', true);
// #endif
}
},
/**
@ -335,12 +333,11 @@
*/
onShow: function() {
let _this = this
// wx.getLaunchOptionsSync
this.textareaStatus = true;
if (this.isLogin && this.toPay == false) {
this.getaddressInfo();
this.$nextTick(function() {
this.$refs.addressWindow.getAddressList();
})
//this.getaddressInfo();
}
uni.$on("handClick", res => {
@ -366,13 +363,34 @@
// this.isClose = true
// },
methods: {
//
getloadPreOrder: function() {
loadPreOrderApi(this.preOrderNo).then(res => {
let orderInfoVo = res.data.orderInfoVo
this.orderInfoVo = orderInfoVo;
this.cartInfo = orderInfoVo.orderDetailList;
this.orderProNum = orderInfoVo.orderProNum;
this.address.addressId = this.addressId ? this.addressId :orderInfoVo.addressId;
this.cartArr[1].title = '可用余额:' + orderInfoVo.userBalance;
this.cartArr[1].payStatus = parseInt(res.data.yuePayStatus) === 1 ? 1 : 2;
this.cartArr[0].payStatus = parseInt(res.data.payWeixinOpen) === 1 ? 1 : 0;
this.store_self_mention = res.data.storeSelfMention == 'true'&& this.productType === 'normal' ? true : false;
//
this.$nextTick(function() {
this.$refs.addressWindow.getAddressList();
})
}).catch(err => {
return this.$util.Tips({
title: err
});
})
},
/**
* 授权回调事件
*
*/
onLoadFun: function() {
this.getaddressInfo();
this.getConfirm();
//this.getaddressInfo();
//
// this.$scope.selectComponent('#address-window').getAddressList();
},
@ -414,23 +432,28 @@
})
}
},
//
computedPrice: function() {
let shippingType = this.shippingType;
postOrderComputed(this.orderKey, {
addressId: this.addressId,
useIntegral: this.useIntegral ? 1 : 0,
postOrderComputed({
addressId: this.address.addressId,
useIntegral: this.useIntegral ? true : false,
couponId: this.couponId,
shippingType: parseInt(shippingType) + 1,
payType: this.payType
preOrderNo: this.preOrderNo
}).then(res => {
let result = res.data.result.result;
if (result) {
this.totalPrice = result.orderId.payPrice;
this.integral_price = result.orderId.deductionPrice;
this.coupon_price = result.orderId.couponPrice;
this.integral = this.useIntegral ? result.orderId.surplusIntegral : this.userInfo.integral;
this.$set(this.priceGroup, 'storePostage', shippingType == 1 ? 0 : result.orderId.payPostage);
}
let data = res.data;
this.orderInfoVo.couponFee = data.couponFee;
//userIntegral surplusIntegral
this.orderInfoVo.userIntegral = data.surplusIntegral;
this.orderInfoVo.deductionPrice = data.deductionPrice;
this.orderInfoVo.freightFee = data.freightFee;
this.orderInfoVo.payFee = data.payFee;
this.orderInfoVo.proTotalFee = data.proTotalFee;
this.orderInfoVo.useIntegral = data.useIntegral;
this.orderInfoVo.usedIntegral = data.usedIntegral;
this.orderInfoVo.surplusIntegral = data.surplusIntegral;
//this.orderInfoVo.userIntegral = data.userIntegral;
}).catch(err => {
return this.$util.Tips({
title: err
@ -501,92 +524,37 @@
this.useIntegral = !this.useIntegral;
this.computedPrice();
},
/**
* 首次进页面展示默认地址
*/
OnDefaultAddress: function(e) {
this.addressInfo = e;
this.address.addressId = e.id;
},
/**
* 选择地址后改变事件
* @param object e
*/
OnChangeAddress: function(e) {
this.addressInfo = e;
this.address.addressId = e.id;
this.textareaStatus = true;
this.addressId = e;
//this.orderInfoVo.addressId = e;
this.address.address = false;
this.getaddressInfo();
//this.getaddressInfo();
this.computedPrice();
},
bindHideKeyboard: function(e) {
this.mark = e.detail.value;
},
/**
* 获取当前订单详细信息
*
*/
getConfirm: function() {
let that = this;
orderConfirm(that.cartId, that.news, this.addAgain, this.secKill, this.combination, this.bargain).then(res => {
that.$set(that, 'userInfo', res.data.userInfo);
that.$set(that, 'integral', res.data.userInfo.integral);
that.$set(that, 'cartInfo', res.data.cartInfo);
that.$set(that, 'integralRatio', res.data.integralRatio);
that.$set(that, 'offlinePostage', res.data.offlinePostage);
that.$set(that, 'orderKey', res.data.orderKey);
that.$set(that, 'priceGroup', res.data.priceGroup);
that.$set(that, 'totalPrice', that.$util.$h.Add(parseFloat(res.data.priceGroup.totalPrice), parseFloat(res.data
.priceGroup.storePostage)));
that.$set(that, 'seckillId', parseInt(res.data.secKillId));
that.$set(that, 'store_self_mention', res.data.storeSelfMention == 'true' ? true : false);
that.cartArr[1].title = '可用余额:' + res.data.userInfo.nowMoney;
that.cartArr[0].payStatus = res.data.payWeixinOpen || 0
that.cartArr[1].payStatus = res.data.yuePayStatus || 0
if (res.data.offlinePayStatus == 1) {
that.cartArr[2].payStatus = 1
} else {
that.cartArr[2].payStatus = 0
}
// that.$set(that, 'cartArr', that.cartArr);
that.$set(that, 'ChangePrice', that.totalPrice);
that.getBargainId();
if (!that.secKill) that.getCouponList();
}).catch(err => {
return this.$util.Tips({
title: err
}, {
tab: 3,
url: 1
});
});
},
/*
* 提取砍价和拼团id
*/
getBargainId: function() {
let that = this;
let cartINfo = that.cartInfo;
let BargainId = 0;
let combinationId = 0;
cartINfo.forEach(function(value, index, cartINfo) {
BargainId = cartINfo[index].bargainId || 0,
combinationId = cartINfo[index].combinationId || 0
})
that.$set(that, 'BargainId', parseInt(BargainId));
that.$set(that, 'combinationId', parseInt(combinationId));
if (that.cartArr.length == 3 && (BargainId || combinationId || that.seckillId)) {
that.cartArr[2].payStatus = 0;
that.$set(that, 'cartArr', that.cartArr);
}
},
/**
* 获取当前金额可用优惠券
*
*/
getCouponList: function() {
let that = this;
let data = {
cartId: this.cartId
}
getCouponsOrderPrice(data).then(res => {
that.$set(that.coupon, 'list', res.data);
that.openType = 1;
getCouponsOrderPrice(this.preOrderNo).then(res => {
this.$set(this.coupon, 'list', res.data);
this.openType = 1;
});
},
/*
@ -627,6 +595,7 @@
},
couponTap: function() {
this.coupon.coupon = true;
if(!this.coupon.list.length)this.getCouponList();
},
car: function() {
let that = this;
@ -636,9 +605,7 @@
let that = this;
that.textareaStatus = false;
that.address.address = true;
that.pagesUrl = '/pages/users/user_address_list/index?cartId=' + this.cartId + '&pinkId=' + this.pinkId +
'&couponId=' + this.couponId + '&secKill=' + this.secKill + '&combination=' + this.combination + '&bargain=' +
this.bargain;
that.pagesUrl = '/pages/users/user_address_list/index?preOrderNo='+ this.preOrderNo;
},
realName: function(e) {
this.contacts = e.detail.value;
@ -648,12 +615,8 @@
},
payment: function(data) {
let that = this;
orderCreate(that.orderKey, data).then(res => {
orderCreate(data).then(res => {
that.getOrderPay(res.data.orderNo, '支付成功');
// if(that.totalPrice===0)return that.$util.Tips({
// title: '',
// icon: 'success'
// });
}).catch(err => {
uni.hideLoading();
@ -667,13 +630,9 @@
let goPages = '/pages/order_pay_status/index?order_id=' + orderNo + '&msg=' + message;
wechatOrderPay({
orderNo: orderNo,
// #ifdef MP
payChannel: 'routine',
// #endif
// #ifdef H5 || APP-PLUS
payChannel: that.$wechat.isWeixin() ? 'public' : 'weixinh5',
// #endif
payType: that.payType
payChannel: that.payChannel,
payType: that.payType,
scene: that.productType==='normal'? 0 :1177 //
}).then(res => {
let jsConfig = res.data.jsConfig;
switch (res.data.payType) {
@ -685,9 +644,13 @@
package: jsConfig.packages,
signType: jsConfig.signType,
paySign: jsConfig.paySign,
ticket: that.productType==='normal'? null : jsConfig.ticket,
success: function(ress) {
uni.hideLoading();
if (that.BargainId || that.combinationId || that.pinkId || that.seckillId)
wechatQueryPayResult(orderNo).then(res => {
uni.hideLoading();
if (that.orderInfoVo.bargainId || that.orderInfoVo.combinationId || that.pinkId || that
.orderInfoVo.seckillId)
return that.$util.Tips({
title: '支付成功',
icon: 'success'
@ -702,6 +665,13 @@
tab: 5,
url: goPages
});
}).cache(err => {
uni.hideLoading();
return that.$util.Tips({
title: err
});
})
},
fail: function(e) {
uni.hideLoading();
@ -715,7 +685,8 @@
complete: function(e) {
uni.hideLoading();
//
if (e.errMsg == 'requestPayment:cancel') return that.$util.Tips({
if (e.errMsg == 'requestPayment:cancel') return that.$util
.Tips({
title: '取消支付'
}, {
tab: 5,
@ -734,6 +705,7 @@
};
that.$wechat.pay(data).then(res => {
if (res.errMsg == 'chooseWXPay:cancel') {
uni.hideLoading();
return that.$util.Tips({
title: '取消支付'
}, {
@ -741,9 +713,8 @@
url: goPages + '&status=2'
});
} else {
wechatQueryPayResult({
orderNo: orderNo
}).then(res => {
wechatQueryPayResult(orderNo).then(res => {
uni.hideLoading();
return that.$util.Tips({
title: '支付成功',
icon: 'success'
@ -752,12 +723,14 @@
url: goPages
});
}).cache(err => {
uni.hideLoading();
return that.$util.Tips({
title: err
});
})
}
}).cache(res => {
uni.hideLoading();
return that.$util.Tips({
title: '取消支付'
}, {
@ -785,7 +758,8 @@
url: goPages + '&status=0'
});
setTimeout(() => {
location.href = jsConfig.mwebUrl + '&redirect_url=' + window.location.protocol + '//' + window.location.host +
location.href = jsConfig.mwebUrl + '&redirect_url=' + window.location
.protocol + '//' + window.location.host +
goPages + '&status=1';
}, 100)
break;
@ -814,7 +788,7 @@
break;
case 'SUCCESS':
uni.hideLoading();
if (that.BargainId || that.combinationId || that.pinkId || that.seckillId)
if (that.orderInfoVo.bargainId || that.orderInfoVo.combinationId || that.pinkId || that.orderInfoVo.seckillId)
return that.$util.Tips({
title: message,
icon: 'success'
@ -833,16 +807,16 @@
case 'WECHAT_PAY':
// #ifdef MP
that.toPay = true;
let packages = 'prepay_id=' + jsConfig.prepayId;
let packagess = 'prepay_id=' + jsConfig.prepayId;
uni.requestPayment({
timeStamp: jsConfig.timeStamp.toString(),
nonceStr: jsConfig.nonceStr,
package: packages,
package: packagess,
signType: jsConfig.signType,
paySign: jsConfig.paySign,
success: function(res) {
uni.hideLoading();
if (that.BargainId || that.combinationId || that.pinkId || that.seckillId)
if (that.orderInfoVo.bargainId || that.orderInfoVo.combinationId || that.pinkId || that.orderInfoVo.seckillId)
return that.$util.Tips({
title: '支付成功',
icon: 'success'
@ -941,7 +915,7 @@
if (!that.payType) return that.$util.Tips({
title: '请选择支付方式'
});
if (!that.addressId && !that.shippingType) return that.$util.Tips({
if (!that.address.addressId && !that.shippingType) return that.$util.Tips({
title: '请选择收货地址'
});
if (that.shippingType == 1) {
@ -967,23 +941,19 @@
data = {
realName: that.contacts,
phone: that.contactsTel,
addressId: that.addressId,
formId: '',
addressId: that.address.addressId,
couponId: that.couponId,
payType: that.payType,
useIntegral: that.useIntegral,
bargainId: that.BargainId,
combinationId: that.combinationId,
pinkId: that.pinkId,
seckillId: that.seckillId,
preOrderNo: that.preOrderNo,
mark: that.mark,
storeId: that.system_store.id || 0,
shippingType: that.$util.$h.Add(that.shippingType, 1),
isNew: that.news,
payChannel: that.payChannel
};
if (data.payType == 'yue' && parseFloat(that.userInfo.nowMoney) < parseFloat(that.totalPrice)) return that.$util
if (data.payType == 'yue' && parseFloat(that.userInfo.nowMoney) < parseFloat(that.totalPrice))
return that.$util
.Tips({
title: '余额不足!'
});
@ -998,13 +968,15 @@
// #ifndef MP
that.payment(data);
// #endif
// that.payment(data);
}
}
}
</script>
<style lang="scss" scoped>
.line2{
width: 504rpx;
}
.textR {
text-align: right;
}
@ -1021,13 +993,13 @@
}
.order-submission .address {
padding: 28rpx 30rpx;
padding: 28rpx;
background-color: #fff;
box-sizing: border-box;
}
.order-submission .address .addressCon {
width: 610rpx;
width: 596rpx;
font-size: 26rpx;
color: #666;
}
@ -1063,21 +1035,21 @@
// background-image: linear-gradient(to bottom, #e93323 0%, #f5f5f5 100%);
// background-image: -webkit-linear-gradient(to bottom, #e93323 0%, #f5f5f5 100%);
// background-image: -moz-linear-gradient(to bottom, #e93323 0%, #f5f5f5 100%);
padding-top: 100rpx;
padding: 100rpx 30rpx 0 30rpx;
}
.order-submission .allAddress .nav {
width: 710rpx;
width: 690rpx;
margin: 0 auto;
}
.order-submission .allAddress .nav .item {
width: 355rpx;
width: 334rpx;
}
.order-submission .allAddress .nav .item.on {
position: relative;
width: 250rpx;
width: 230rpx;
}
.order-submission .allAddress .nav .item.on::before {
@ -1092,7 +1064,7 @@
border-style: none solid solid;
border-color: transparent transparent #fff;
z-index: 2;
border-radius: 7rpx 30rpx 0 0;
border-radius: 14rpx 36rpx 0 0;
text-align: center;
line-height: 80rpx;
}
@ -1100,7 +1072,7 @@
.order-submission .allAddress .nav .item:nth-of-type(2).on::before {
content: "到店自提";
border-width: 0 0 80rpx 20rpx;
border-radius: 30rpx 7rpx 0 0;
border-radius: 36rpx 14rpx 0 0;
}
.order-submission .allAddress .nav .item.on2 {
@ -1114,11 +1086,11 @@
font-size: 28rpx;
display: block;
height: 0;
width: 400rpx;
width: 401rpx;
border-width: 0 0 60rpx 60rpx;
border-style: none solid solid;
border-color: transparent transparent #f7c1bd;
border-radius: 40rpx 6rpx 0 0;
border-radius: 36rpx 14rpx 0 0;
text-align: center;
line-height: 60rpx;
}
@ -1126,17 +1098,17 @@
.order-submission .allAddress .nav .item:nth-of-type(1).on2::before {
content: "快递配送";
border-width: 0 60rpx 60rpx 0;
border-radius: 6rpx 40rpx 0 0;
border-radius: 14rpx 36rpx 0 0;
}
.order-submission .allAddress .address {
width: 710rpx;
height: 150rpx;
width: 690rpx;
max-height: 180rpx;
margin: 0 auto;
}
.order-submission .allAddress .line {
width: 710rpx;
width: 100%;
margin: 0 auto;
}
@ -1146,19 +1118,19 @@
.order-submission .wrapper {
background-color: #fff;
margin-top: 13rpx;
margin-top: 15rpx;
}
.order-submission .wrapper .item {
padding: 27rpx 30rpx;
padding: 27rpx 24rpx;
font-size: 30rpx;
color: #282828;
border-bottom: 1px solid #f0f0f0;
color: #333333;
border-bottom: 1px solid #F5F5F5;
}
.order-submission .wrapper .item .discount {
font-size: 30rpx;
color: #999;
color: #333;
}
.order-submission .wrapper .item .discount .iconfont {
@ -1191,12 +1163,13 @@
.order-submission .wrapper .item textarea {
background-color: #f9f9f9;
width: 690rpx;
width: auto !important;
height: 140rpx;
border-radius: 3rpx;
border-radius: 14rpx;
margin-top: 30rpx;
padding: 25rpx 28rpx;
padding: 15rpx;
box-sizing: border-box;
font-weight: 400;
}
.order-submission .wrapper .item .placeholder {
@ -1209,7 +1182,7 @@
.order-submission .wrapper .item .list .payItem {
border: 1px solid #eee;
border-radius: 6rpx;
border-radius: 14rpx;
height: 86rpx;
width: 100%;
box-sizing: border-box;
@ -1220,7 +1193,7 @@
.order-submission .wrapper .item .list .payItem.on {
border-color: #fc5445;
color: #e93323;
color: $theme-color;
}
.order-submission .wrapper .item .list .payItem .name {
@ -1253,7 +1226,7 @@
}
.order-submission .moneyList {
margin-top: 12rpx;
margin-top: 15rpx;
background-color: #fff;
padding: 30rpx;
}
@ -1268,7 +1241,7 @@
}
.order-submission .moneyList .item .money {
color: #868686;
color: #666666;
}
.order-submission .footer {
@ -1289,7 +1262,7 @@
color: #fff;
width: 240rpx;
height: 70rpx;
background-color: #e93323;
background-color: $theme-color;
border-radius: 50rpx;
text-align: center;
line-height: 70rpx;

View File

@ -36,48 +36,56 @@
</view>
<view class='list'>
<view class='item' v-for="(item,index) in orderList" :key="index">
<view @click='goOrderDetails(item.storeOrder.orderId,item.storeOrder.unique)'>
<view @click='goOrderDetails(item.orderId)'>
<view class='title acea-row row-between-wrapper'>
<view class="acea-row row-middle">
<text class="sign cart-color acea-row row-center-wrapper" v-if="item.storeOrder.bargainId != 0"></text>
<text class="sign cart-color acea-row row-center-wrapper" v-if="item.activityType !== '普通' && item.activityType !== '核销'">{{item.activityType}}</text>
<!-- <text class="sign cart-color acea-row row-center-wrapper" v-if="item.bargainId != 0"></text>
<text class="sign cart-color acea-row row-center-wrapper" v-else-if="item.storeOrder.combinationId != 0">拼团</text>
<text class="sign cart-color acea-row row-center-wrapper" v-else-if="item.storeOrder.seckillId != 0">秒杀</text>
<view>{{item.storeOrder.createTime}}</view>
<text class="sign cart-color acea-row row-center-wrapper" v-else-if="item.storeOrder.seckillId != 0">秒杀</text> -->
<view>{{item.createTime}}</view>
</view>
<view v-if="item.status?item.status.type == 0:0" class='font-color'>待付款</view>
<view class='font-color'>{{item.orderStatus}}</view>
<!-- <view v-if="item.status?item.status.type == 0:0" class='font-color'>待付款</view>
<view v-else-if="item.status?item.status.type == 1:0 && item.storeOrder.shippingType==1" class='font-color'>待发货</view>
<view v-else-if="item.status?item.status.type == 2:0 && item.storeOrder.shippingType==1" class='font-color'>待收货</view>
<view v-else-if="item.status?item.status.type == 3:0 && item.storeOrder.shippingType==1" class='font-color'>待评价</view>
<view v-else-if="item.status?item.status.type == 4:0 && item.storeOrder.shippingType==1" class='font-color'>已完成</view>
<view v-else-if="item.storeOrder.shippingType==2" class='font-color'>待核销</view>
<view v-else-if="item.storeOrder.shippingType==2" class='font-color'>待核销</view> -->
</view>
<view class='item-info acea-row row-between row-top' v-for="(item,index) in item.cartInfo" :key="index">
<view class='item-info acea-row row-between row-top' v-for="(items,index) in item.orderInfoList" :key="index">
<view class='pictrue'>
<image :src='item.info.productInfo.image'></image>
<image :src='items.image'></image>
</view>
<view class='text acea-row row-between'>
<view class='name line2'>{{item.info.productInfo.storeName}}</view>
<view class='name line2'>{{items.storeName}}</view>
<view class='money'>
<view v-if="item.info.productInfo.attrInfo">{{item.info.productInfo.attrInfo.price}}</view>
<view v-else>{{item.info.productInfo.price}}</view>
<view>x{{item.info.cartNum}}</view>
<view>{{items.price}}</view>
<view>x{{items.cartNum}}</view>
</view>
</view>
</view>
<view class='totalPrice'>{{(item.cartInfo?item.cartInfo.length:0) || 0}}件商品总金额
<text class='money font-color'>{{item.storeOrder.payPrice}}</text>
<view class='totalPrice'>{{item.totalNum}}件商品总金额
<text class='money font-color'>{{item.payPrice}}</text>
</view>
</view>
<view class='bottom acea-row row-right row-middle'>
<view class='bnt cancelBnt' v-if="item.status?item.status.type==0:0 || item.status?item.status.type == 9:0" @click='cancelOrder(index,item.storeOrder.id)'>取消订单</view>
<view class='bnt bg-color' v-if="item.status?item.status.type == 0:0" @click='goPay(item.storeOrder.payPrice,item.storeOrder.orderId)'>立即付款</view>
<view class='bnt bg-color' v-else-if="item.status?item.status.type == 1:0 || item.status?item.status.type == 9:0" @click='goOrderDetails(item.storeOrder.orderId,item.storeOrder.unique)'>查看详情</view>
<view class='bnt bg-color' v-else-if="item.status?item.status.type == 2:0 && item.status.deliveryType" @click='goOrderDetails(item.storeOrder.orderId,item.storeOrder.unique)'>查看详情</view>
<view class='bnt bg-color' v-else-if="item.status?item.status.type == 3:0" @click='goOrderDetails(item.storeOrder.orderId,item.storeOrder.unique)'>去评价</view>
<view class='bnt bg-color' v-else-if="item.storeOrder.seckillId < 1 && item.storeOrder.bargainId < 1 && item.storeOrder.combinationId < 1 && item.status?item.status.type == 4:0"
@click='goOrderDetails(item.storeOrder.orderId,item.storeOrder.unique)'>再次购买</view>
<view class='bnt cancelBnt' v-if="item.status?item.status.type == 4:0" @click='delOrder(item.storeOrder.id,index)'>删除订单</view>
<view class='bnt cancelBnt' v-if="!item.paid" @click='cancelOrder(index,item.id)'>取消订单</view>
<view class='bnt bg-color' v-if="!item.paid" @click='goPay(item.payPrice,item.orderId)'>立即付款</view>
<view class='bnt bg-color' v-else-if="item.status== 0 || item.status== 1 || item.status== 3" @click='goOrderDetails(item.orderId)'>查看详情</view>
<view class='bnt bg-color' v-else-if="item.status==2" @click='goOrderDetails(item.orderId)'>去评价</view>
<view class='bnt cancelBnt' v-if="item.status == 3" @click='delOrder(item.id,index)'>删除订单</view>
</view>
<!-- <view class='bottom acea-row row-right row-middle'>
<view class='bnt cancelBnt' v-if="item.status?item.status.type==0:0 || item.status?item.status.type == 9:0" @click='cancelOrder(index,item.id)'>取消订单</view>
<view class='bnt bg-color' v-if="item.status?item.status.type == 0:0" @click='goPay(item.payPrice,item.orderId)'>立即付款</view>
<view class='bnt bg-color' v-else-if="item.status?item.status.type == 1:0 || item.status?item.status.type == 9:0" @click='goOrderDetails(item.orderId)'>查看详情</view>
<view class='bnt bg-color' v-else-if="item.status?item.status.type == 2:0 && item.status.deliveryType" @click='goOrderDetails(item.orderId)'>查看详情</view>
<view class='bnt bg-color' v-else-if="item.status?item.status.type == 3:0" @click='goOrderDetails(item.orderId)'>去评价</view>
<view class='bnt bg-color' v-else-if="item.storeOrder.seckillId < 1 && item.storeOrder.bargainId < 1 && item.storeOrder.combinationId < 1 && item.status?item.status.type == 4:0"
@click='goOrderDetails(item.orderId)'>再次购买</view>
<view class='bnt cancelBnt' v-if="item.status?item.status.type == 4:0" @click='delOrder(item.id,index)'>删除订单</view>
</view> -->
</view>
</view>
<view class='loadingicon acea-row row-center-wrapper' v-if="orderList.length>0">
@ -93,7 +101,7 @@
</view>
</view>
<!-- #ifdef MP -->
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize>
<!-- <authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize> -->
<!-- #endif -->
<home></home>
<payment :payMode='payMode' :pay_close="pay_close" @onChangeFun='onChangeFun' :order_id="pay_order_id" :totalPrice='totalPrice'></payment>
@ -105,12 +113,8 @@
getOrderList,
orderData,
orderCancel,
orderDel,
orderPay
orderDel
} from '@/api/order.js';
import {
getUserInfo
} from '@/api/user.js';
import {
openOrderSubscribe
} from '@/utils/SubscribeMessage.js';
@ -166,27 +170,24 @@
isShowAuth: false //
};
},
computed: mapGetters(['isLogin']),
computed: mapGetters(['isLogin', 'userInfo']),
onShow() {
if (this.isLogin) {
this.loadend = false;
this.page = 1;
this.$set(this, 'orderList', []);
this.getOrderData();
this.getOrderList();
this.getUserInfo();
this.payMode[1].number = this.userInfo.nowMoney;
this.$set(this, 'payMode', this.payMode);
} else {
// #ifdef H5 || APP-PLUS
toLogin();
// #endif
// #ifdef MP
this.isAuto = true;
this.$set(this, 'isShowAuth', true);
// #endif
}
},
methods: {
onLoadFun() {
this.getOrderData();
this.getOrderList();
this.getUserInfo();
},
//
authColse: function(e) {
@ -202,17 +203,6 @@
let value = opt.value != undefined ? opt.value : null;
(action && this[action]) && this[action](value);
},
/**
* 获取用户信息
*
*/
getUserInfo: function() {
let that = this;
getUserInfo().then(res => {
that.payMode[1].number = res.data.nowMoney;
that.$set(that, 'payMode', that.payMode);
});
},
/**
* 关闭支付组件
*
@ -269,7 +259,7 @@
* 打开支付组件
*
*/
goPay: function(pay_price, order_id) {
goPay(pay_price, order_id) {
this.$set(this, 'pay_close', true);
this.$set(this, 'pay_order_id', order_id);
this.$set(this, 'totalPrice', pay_price);
@ -282,8 +272,7 @@
this.loadend = false;
this.page = 1;
this.$set(this, 'orderList', []);
this.pay_close = false;
this.pay_order_id = '';
this.$set(this, 'pay_close', false);
this.getOrderData();
this.getOrderList();
},
@ -293,7 +282,6 @@
*/
pay_fail: function() {
this.pay_close = false;
this.pay_order_id = '';
},
/**
* 去订单详情
@ -346,7 +334,7 @@
page: that.page,
limit: that.limit,
}).then(res => {
let list = res.data || [];
let list = res.data.list || [];
let loadend = list.length < that.limit;
that.orderList = that.$util.SplitArray(list, that.orderList);
that.$set(that, 'orderList', that.orderList);
@ -389,7 +377,7 @@
<style scoped lang="scss">
.my-order .header {
height: 260rpx;
height: 250rpx;
padding: 0 30rpx;
}
@ -424,20 +412,24 @@
background-color: #fff;
width: 690rpx;
height: 140rpx;
border-radius: 6rpx;
margin: -73rpx auto 0 auto;
border-radius: 14rpx;
margin: -60rpx auto 0 auto;
}
.my-order .nav .item {
text-align: center;
font-size: 26rpx;
color: #282828;
padding: 29rpx 0;
padding: 26rpx 0;
}
.my-order .nav .item.on {
// font-weight: bold;
// border-bottom: 5rpx solid #e93323;
/* #ifdef H5 || MP */
font-weight: bold;
border-bottom: 5rpx solid #e93323;
/* #endif */
border-bottom: 5rpx solid $theme-color;
}
.my-order .nav .item .num {
@ -451,13 +443,13 @@
.my-order .list .item {
background-color: #fff;
border-radius: 6rpx;
border-radius: 14rpx;
margin-bottom: 14rpx;
}
.my-order .list .item .title {
height: 84rpx;
padding: 0 30rpx;
padding: 0 24rpx;
border-bottom: 1rpx solid #eee;
font-size: 28rpx;
color: #282828;
@ -465,13 +457,14 @@
.my-order .list .item .title .sign {
font-size: 24rpx;
padding: 0 7rpx;
padding: 0 13rpx;
height: 36rpx;
margin-right: 15rpx;
border-radius: 18rpx;
}
.my-order .list .item .item-info {
padding: 0 30rpx;
padding: 0 24rpx;
margin-top: 22rpx;
}
@ -483,18 +476,17 @@
.my-order .list .item .item-info .pictrue image {
width: 100%;
height: 100%;
border-radius: 6rpx;
border-radius: 14rpx;
}
.my-order .list .item .item-info .text {
width: 486rpx;
width: 500rpx;
font-size: 28rpx;
color: #999;
margin-top: 6rpx;
}
.my-order .list .item .item-info .text .name {
width: 306rpx;
width: 350rpx;
color: #282828;
}

View File

@ -0,0 +1,43 @@
<template>
<view class="content">
<jyf-parser :html="content" ref="article" :tag-style="tagStyle"></jyf-parser>
</view>
</template>
<script>
import parser from "@/components/jyf-parser/jyf-parser";
import {
getUserAgreement,
} from '@/api/user.js';
export default {
components: {
"jyf-parser": parser
},
data() {
return {
tagStyle: {
img: 'width:100%;display:block;',
table: 'width:100%',
video: 'width:100%'
},
content: ``
}
},
mounted() {
getUserAgreement().then(res => {
this.content = res.data.content
}).catch(err => {
that.$util.Tips({
title: err.msg
});
})
}
}
</script>
<style scoped>
.content {
padding: 40rpx 30rpx;
line-height: 2;
}
</style>

View File

@ -2,20 +2,23 @@
<view>
<view class="promoter-list">
<view class='promoterHeader bg-color'>
<view class='headerCon acea-row row-between-wrapper'>
<view class='headerCon acea-row row-between'>
<view>
<view class='name'>推广人数</view>
<view><text class='num'>{{teamCount}}</text></view>
<view><text class='num'>{{peopleData.count}}</text></view>
</view>
<view class='iconfont icon-tuandui'></view>
</view>
</view>
<view class="pad30">
<view class='nav acea-row row-around'>
<view :class="grade == 0 ? 'item on' : 'item'" @click='setType(0)'>一级({{total}})</view>
<view :class="grade == 1 ? 'item on' : 'item'" @click='setType(1)'>二级({{totalLevel}})</view>
<view :class="grade == 0 ? 'item on' : 'item'" @click='setType(0)'>一级({{peopleData.total}})</view>
<view :class="grade == 1 ? 'item on' : 'item'" @click='setType(1)'>二级({{peopleData.totalLevel}})
</view>
</view>
<view class='search acea-row row-between-wrapper'>
<view class='input'><input placeholder='点击搜索会员名称' placeholder-class='placeholder' v-model="keyword" @confirm="submitForm" confirm-type='search' name="search"></input></view>
<view class='input'><input placeholder='点击搜索会员名称' placeholder-class='placeholder' v-model="keyword"
@confirm="submitForm" confirm-type='search' name="search"></input></view>
<button class='iconfont icon-sousuo2' @click="submitForm"></button>
</view>
<view class='list'>
@ -29,7 +32,8 @@
<view class="sortItem" @click='setSort("childCount","DESC")' v-else>
<image src='/static/images/sort2.png'></image>
</view>
<view class="sortItem" @click='setSort("numberCount","ASC")' v-if="sort == 'numberCountDESC'">
<view class="sortItem" @click='setSort("numberCount","ASC")' v-if="sort == 'numberCountDESC'">
金额排序
<image src='/static/images/sort1.png'></image>
</view>
<view class="sortItem" @click='setSort("numberCount")' v-else-if="sort == 'numberCountASC'">金额排序
@ -56,20 +60,26 @@
</view>
<view class='text'>
<view class='name line1'>{{item.nickname}}</view>
<view>加入时间: {{item.time}}</view>
<view>加入时间: {{item.time.split(' ')[0]}}</view>
</view>
</view>
<view class="right">
<view><text class='num font-color'>{{item.childCount ? item.childCount : 0}}</text></view>
<view><text class='num font-color'>{{item.childCount ? item.childCount : 0}}</text>
</view>
<view><text class="num">{{item.orderCount ? item.orderCount : 0}}</text></view>
<view><text class="num">{{item.numberCount ? item.numberCount : 0}}</text></view>
</view>
</view>
</block>
<Loading :loaded="status" :loading="loadingList"></Loading>
<block v-if="recordList.length == 0 && isShow">
<emptyPage title="暂无推广人数~"></emptyPage>
</block>
</view>
</view>
</view>
<!-- #ifdef MP -->
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize>
<!-- <authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize> -->
<!-- #endif -->
<home></home>
</view>
@ -77,7 +87,8 @@
<script>
import {
spreadPeople
spreadPeople,
spreadPeoCount
} from '@/api/user.js';
import {
toLogin
@ -85,12 +96,16 @@
import {
mapGetters
} from "vuex";
import emptyPage from '@/components/emptyPage.vue'
import Loading from "@/components/Loading";
// #ifdef MP
import authorize from '@/components/Authorize';
// #endif
import home from '@/components/home';
export default {
components: {
Loading,
emptyPage,
// #ifdef MP
authorize,
// #endif
@ -98,9 +113,6 @@
},
data() {
return {
total: 0,
totalLevel: 0,
teamCount: 0,
page: 1,
limit: 20,
keyword: '',
@ -109,7 +121,10 @@
sortKey: '',
grade: 0,
status: false,
loadingList: false,
recordList: [],
peopleData: {},
isShow: false,
isAuto: false, //
isShowAuth: false //
};
@ -118,14 +133,9 @@
onLoad() {
if (this.isLogin) {
this.userSpreadNewList();
this.spreadPeoCount();
} else {
// #ifdef H5 || APP-PLUS
toLogin();
// #endif
// #ifdef MP
this.isAuto = true;
this.$set(this, 'isShowAuth', true);
// #endif
}
},
onShow: function() {
@ -170,10 +180,16 @@
this.sort = '';
this.isAsc = '';
this.status = false;
this.loadingList = false;
this.$set(this, 'recordList', []);
this.userSpreadNewList();
}
},
spreadPeoCount() {
spreadPeoCount().then(res => {
this.peopleData = res.data;
});
},
userSpreadNewList: function() {
let that = this;
let page = that.page;
@ -185,6 +201,7 @@
let grade = that.grade;
let recordList = that.recordList;
let recordListNew = [];
if (that.loadingList) return;
if (status == true) return;
spreadPeople({
page: page,
@ -194,15 +211,14 @@
sortKey: sortKey,
isAsc: isAsc
}).then(res => {
let recordListData = res.data.spreadPeopleList?res.data.spreadPeopleList:[];
let recordListData = res.data.list ? res.data.list : [];
let len = recordListData.length;
recordListNew = recordList.concat(recordListData);
that.total = res.data.total;
that.totalLevel = res.data.totalLevel;
that.teamCount = res.data.count;
that.status = limit > len;
that.page = page + 1;
that.$set(that, 'recordList', recordListNew || []);
that.loadingList = false;
if(that.recordList.length===0) that.isShow = true;
});
}
},
@ -220,23 +236,28 @@
font-size: 28rpx;
color: #282828;
border-bottom: 1rpx solid #eee;
border-top-left-radius: 14rpx;
border-top-right-radius: 14rpx;
margin-top: -30rpx;
}
.promoter-list .nav .item.on {
border-bottom: 5rpx solid #e93323;
color: #e93323;
border-bottom: 5rpx solid $theme-color;
color: $theme-color;
}
.promoter-list .search {
width: 100%;
background-color: #fff;
height: 86rpx;
padding-left: 30rpx;
height: 100rpx;
padding: 0 24rpx;
box-sizing: border-box;
border-bottom-left-radius: 14rpx;
border-bottom-right-radius: 14rpx;
}
.promoter-list .search .input {
width: 610rpx;
width: 592rpx;
height: 60rpx;
border-radius: 50rpx;
background-color: #f5f5f5;
@ -265,15 +286,14 @@
}
.promoter-list .search .iconfont {
font-size: 45rpx;
font-size: 32rpx;
color: #515151;
width: 110rpx;
height: 60rpx;
line-height: 60rpx;
}
.promoter-list .list {
margin-top: 12rpx;
margin-top: 20rpx;
}
.promoter-list .list .sortNav {
@ -282,6 +302,8 @@
border-bottom: 1rpx solid #eee;
color: #333;
font-size: 28rpx;
border-top-left-radius: 14rpx;
border-top-right-radius: 14rpx;
}
.promoter-list .list .sortNav .sortItem {
@ -300,15 +322,11 @@
background-color: #fff;
border-bottom: 1rpx solid #eee;
height: 152rpx;
padding: 0 30rpx 0 20rpx;
padding: 0 24rpx;
font-size: 24rpx;
color: #666;
}
.promoter-list .list .item .picTxt {
width: 440rpx;
}
.promoter-list .list .item .picTxt .pictrue {
width: 106rpx;
height: 106rpx;
@ -325,9 +343,10 @@
}
.promoter-list .list .item .picTxt .text {
width: 304rpx;
// width: 304rpx;
font-size: 24rpx;
color: #666;
margin-left: 14rpx;
}
.promoter-list .list .item .picTxt .text .name {
@ -337,7 +356,6 @@
}
.promoter-list .list .item .right {
width: 240rpx;
text-align: right;
font-size: 22rpx;
color: #333;

View File

@ -10,7 +10,7 @@
<view class='iconfont icon-2'></view>
</view>
</view>
<view class='list' v-if="recordList.length>0">
<view class='list pad30' v-if="recordList.length>0">
<block v-for="(item,index) in recordList" :key="index">
<view class='item'>
<view class='title acea-row row-column row-center'>
@ -19,7 +19,7 @@
</view>
<view class='listn'>
<block v-for="(child,indexn) in item.child" :key="indexn">
<view class='itenm'>
<view class='itenm borRadius14'>
<view class='top acea-row row-between-wrapper'>
<view class='pictxt acea-row row-between-wrapper'>
<view class='pictrue'>
@ -46,7 +46,7 @@
</view>
</view>
<!-- #ifdef MP -->
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize>
<!-- <authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize> -->
<!-- #endif -->
<home></home>
</view>
@ -92,13 +92,7 @@
if (this.isLogin) {
this.getRecordOrderList();
} else {
// #ifdef H5 || APP-PLUS
toLogin();
// #endif
// #ifdef MP
this.isAuto = true;
this.$set(this, 'isShowAuth', true);
// #endif
}
},
methods: {
@ -160,7 +154,6 @@
<style scoped lang="scss">
.promoter-order .list .item .title {
height: 133rpx;
padding: 0 30rpx;
font-size: 26rpx;
color: #999;
}
@ -176,12 +169,11 @@
}
.promoter-order .list .item .listn .itenm~.itenm {
margin-top: 12rpx;
margin-top: 20rpx;
}
.promoter-order .list .item .listn .itenm .top {
margin-left: 30rpx;
padding-right: 30rpx;
padding: 0 24rpx;
border-bottom: 1rpx solid #eee;
height: 100rpx;
}
@ -215,7 +207,7 @@
}
.promoter-order .list .item .listn .itenm .bottom {
padding: 20rpx 30rpx;
padding: 20rpx 24rpx;
font-size: 28rpx;
color: #666;
line-height: 1.6;

View File

@ -48,7 +48,7 @@
</view>
</view>
<!-- #ifdef MP -->
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize>
<!-- <authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize> -->
<!-- #endif -->
<home></home>
</view>
@ -107,13 +107,7 @@
if (this.isLogin) {
this.getRanklist();
} else {
// #ifdef H5 || APP-PLUS
toLogin();
// #endif
// #ifdef MP
this.isAuto = true;
this.$set(this, 'isShowAuth', true);
// #endif
}
},
// onShow: function () {

View File

@ -1,23 +1,25 @@
<template>
<view>
<form @submit="formSubmit" report-submit='true'>
<view class='addAddress'>
<view class='list'>
<view class='item acea-row row-between-wrapper'>
<view class='addAddress pad30'>
<view class='list borRadius14'>
<view class='item acea-row row-between-wrapper' style="border: none;">
<view class='name'>姓名</view>
<input type='text' placeholder='请输入姓名' name='realName' :value="userAddress.realName" placeholder-class='placeholder'></input>
<input type='text' placeholder='请输入姓名' placeholder-style="color:#ccc;" name='realName' :value="userAddress.realName"
placeholder-class='placeholder'></input>
</view>
<view class='item acea-row row-between-wrapper'>
<view class='name'>联系电话</view>
<input type='text' placeholder='请输入联系电话' name="phone" :value='userAddress.phone' placeholder-class='placeholder'></input>
<input type='text' placeholder='请输入联系电话' placeholder-style="color:#ccc;" name="phone" :value='userAddress.phone'
placeholder-class='placeholder'></input>
</view>
<view class='item acea-row row-between-wrapper'>
<view class='name'>所在地区</view>
<view class="address">
<picker mode="multiSelector" @change="bindRegionChange" @columnchange="bindMultiPickerColumnChange" :value="valueRegion"
:range="multiArray">
<picker mode="multiSelector" @change="bindRegionChange"
@columnchange="bindMultiPickerColumnChange" :value="valueRegion" :range="multiArray">
<view class='acea-row'>
<view class="picker">{{region[0]}}{{region[1]}}{{region[2]}}</view>
<view class="picker line1">{{region[0]}}{{region[1]}}{{region[2]}}</view>
<view class='iconfont icon-dizhi font-color'></view>
</view>
</picker>
@ -25,12 +27,14 @@
</view>
<view class='item acea-row row-between-wrapper'>
<view class='name'>详细地址</view>
<input type='text' placeholder='请填写具体地址' name='detail' placeholder-class='placeholder' :value='userAddress.detail'></input>
<input type='text' placeholder='请填写具体地址' placeholder-style="color:#ccc;" name='detail' placeholder-class='placeholder'
:value='userAddress.detail'></input>
</view>
</view>
<view class='default acea-row row-middle'>
<view class='default acea-row row-middle borRadius14'>
<checkbox-group @change='ChangeIsDefault'>
<checkbox :checked="userAddress.isDefault" />设置为默认地址</checkbox-group>
<checkbox :checked="userAddress.isDefault" />设置为默认地址
</checkbox-group>
</view>
<button class='keepBnt bg-color' form-type="submit">立即保存</button>
@ -43,7 +47,7 @@
</view>
</form>
<!-- #ifdef MP -->
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize>
<!-- <authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize> -->
<!-- #endif -->
<home></home>
</view>
@ -115,13 +119,14 @@
},
onLoad(options) {
if (this.isLogin) {
this.cartId = options.cartId || '';
this.pinkId = options.pinkId || 0;
this.couponId = options.couponId || 0;
this.preOrderNo = options.preOrderNo || 0;
// this.cartId = options.cartId || '';
// 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;
// this.secKill = options.secKill || false;
// this.combination = options.combination || false;
// this.bargain = options.bargain || false;
uni.setNavigationBarTitle({
title: options.id ? '修改地址' : '添加地址'
})
@ -131,13 +136,7 @@
// this.initialize();
// }
} else {
// #ifdef H5 || APP-PLUS
toLogin();
// #endif
// #ifdef MP
this.isAuto = true;
this.$set(this, 'isShowAuth', true);
// #endif
}
},
methods: {
@ -286,9 +285,23 @@
that.pinkId = '';
that.couponId = '';
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
.id) + '&pinkId=' + pinkId + '&couponId=' + couponId + '&secKill=' + that.secKill + '&combination=' + that.combination + '&bargain=' + that.bargain
.id) +
'&pinkId=' +
pinkId +
'&couponId=' +
couponId +
'&secKill=' + that
.secKill +
'&combination=' +
that.combination +
'&bargain=' + that
.bargain
});
} else {
uni.navigateBack({
@ -307,7 +320,8 @@
});
},
fail: function(res) {
if (res.errMsg == 'chooseAddress:cancel') return that.$util.Tips({
if (res.errMsg == 'chooseAddress:cancel') return that.$util
.Tips({
title: '取消选择'
});
},
@ -361,9 +375,13 @@
that.pinkId = '';
that.couponId = '';
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
.id) + '&pinkId=' + pinkId + '&couponId=' + couponId + '&secKill=' + that.secKill + '&combination=' + that.combination + '&bargain=' + that.bargain
.id) + '&pinkId=' + pinkId + '&couponId=' +
couponId + '&secKill=' + that.secKill +
'&combination=' + that.combination + '&bargain=' +
that.bargain
});
} else {
uni.navigateTo({
@ -436,16 +454,12 @@
icon: 'success'
});
setTimeout(function() {
if (that.cartId) {
let cartId = that.cartId;
let pinkId = that.pinkId;
let couponId = that.couponId;
that.cartId = '';
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 + '&secKill=' + that.secKill + '&combination=' + that.combination + '&bargain=' + that.bargain
});
if (that.preOrderNo>0) {
uni.redirectTo({
url: '/pages/users/order_confirm/index?preOrderNo=' + that
.preOrderNo + '&addressId=' + (that.id ? that.id : res.data
.id)
})
} else {
// #ifdef H5
return history.back();
@ -455,7 +469,29 @@
delta: 1,
})
// #endif
}
// if (that.cartId) {
// let cartId = that.cartId;
// let pinkId = that.pinkId;
// let couponId = that.couponId;
// that.cartId = '';
// 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 + '&secKill=' + that.secKill + '&combination=' + that.combination + '&bargain=' + that.bargain
// });
// } else {
// // #ifdef H5
// return history.back();
// // #endif
// // #ifndef H5
// return uni.navigateBack({
// delta: 1,
// })
// // #endif
// }
}, 1000);
}).catch(err => {
return that.$util.Tips({
@ -471,40 +507,42 @@
</script>
<style scoped lang="scss">
.addAddress {
padding-top: 20rpx;
}
.addAddress .list {
background-color: #fff;
padding: 0 24rpx;
}
.addAddress .list .item {
padding: 30rpx;
border-top: 1rpx solid #eee;
height: 90rpx;
line-height: 90rpx;
}
.addAddress .list .item .name {
width: 195rpx;
// width: 195rpx;
font-size: 30rpx;
color: #333;
}
.addAddress .list .item .address {
// width: 412rpx;
flex: 1;
margin-left: 20rpx;
margin-left: 50rpx;
}
.addAddress .list .item input {
width: 475rpx;
font-size: 30rpx;
font-weight: 400;
}
.addAddress .list .item .placeholder {
color: #ccc;
}
.addAddress .list .item picker {
width: 475rpx;
}
.addAddress .list .item picker .picker {
width: 410rpx;
font-size: 30rpx;
@ -531,7 +569,7 @@
border-radius: 50rpx;
text-align: center;
line-height: 86rpx;
margin: 50rpx auto;
margin: 80rpx auto 24rpx auto;
font-size: 32rpx;
color: #fff;
}
@ -544,7 +582,7 @@
line-height: 86rpx;
margin: 0 auto;
font-size: 32rpx;
color: #fe960f;
border: 1px solid #fe960f;
color: #E93323 ;
border: 1px solid #E93323;
}
</style>

View File

@ -1,11 +1,11 @@
<template>
<view>
<view class='address-management' :class='addressList.length < 1 && page > 1 ? "fff":""'>
<view class='line'>
<image src='../../../static/images/line.jpg' v-if="addressList.length"></image>
</view>
<view class='address-management' :class='addressList.length < 1 && page > 1 ? "fff":""'>
<radio-group class="radio-group" @change="radioChange" v-if="addressList.length">
<view class='item' v-for="(item,index) in addressList" :key="index">
<view class='item borRadius14' v-for="(item,index) in addressList" :key="index">
<view class='address' @click='goOrder(item.id)'>
<view class='consignee'>收货人{{item.realName}}<text class='phone'>{{item.phone}}</text></view>
<view>收货地址{{item.province}}{{item.city}}{{item.district}}{{item.detail}}</view>
@ -37,22 +37,19 @@
</view>
</view>
<view style='height:120rpx;'></view>
</view>
<view class='footer acea-row row-between-wrapper'>
<!-- #ifdef APP-PLUS -->
<view class='addressBnt bg-color on' @click='addAddress'><text class='iconfont icon-tianjiadizhi'></text>添加新地址</view>
<!-- #endif -->
<!-- #ifdef MP-->
<view class='addressBnt bg-color' @click='addAddress'><text class='iconfont icon-tianjiadizhi'></text>添加新地址</view>
<view class='addressBnt wxbnt' @click='getWxAddress'><text class='iconfont icon-weixin2'></text>导入微信地址</view>
<!-- #endif -->
<!-- #ifdef H5-->
<view class='addressBnt bg-color' :class="this.$wechat.isWeixin()?'':'on'" @click='addAddress'><text class='iconfont icon-tianjiadizhi'></text>添加新地址</view>
<view class='addressBnt wxbnt' @click='getAddress' v-if="this.$wechat.isWeixin()"><text class='iconfont icon-weixin2'></text>导入微信地址</view>
<view v-if="this.$wechat.isWeixin()" class='addressBnt wxbnt' @click='getAddress'><text class='iconfont icon-weixin2'></text>导入微信地址</view>
<!-- #endif -->
</view>
</view>
<!-- #ifdef MP -->
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize>
<!-- <authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize> -->
<!-- #endif -->
<home></home>
</view>
@ -114,21 +111,15 @@
},
onLoad(options) {
if (this.isLogin) {
this.cartId = options.cartId || '';
this.pinkId = options.pinkId || 0;
this.couponId = options.couponId || 0;
this.secKill = options.secKill || false;
this.combination = options.combination || false;
this.bargain = options.bargain || false;
this.preOrderNo = options.preOrderNo || 0;
// this.pinkId = options.pinkId || 0;
// this.couponId = options.couponId || 0;
// this.secKill = options.secKill || false;
// this.combination = options.combination || false;
// this.bargain = options.bargain || false;
this.getAddressList(true);
} else {
// #ifdef H5 || APP-PLUS
toLogin();
// #endif
// #ifdef MP
this.isAuto = true;
this.$set(this, 'isShowAuth', true);
// #endif
}
},
onShow: function() {
@ -353,23 +344,13 @@
this.pinkId = '';
this.couponId = '';
uni.navigateTo({
url: '/pages/users/user_address/index?cartId=' + cartId + '&pinkId=' + pinkId + '&couponId=' + couponId + '&secKill=' + this.secKill + '&combination=' + this.combination + '&bargain=' + this.bargain
url: '/pages/users/user_address/index?preOrderNo=' + this.preOrderNo
})
},
goOrder: function(id) {
let cartId = '';
let pinkId = '';
let couponId = '';
if (this.cartId && id) {
cartId = this.cartId;
pinkId = this.pinkId;
couponId = this.couponId;
this.cartId = '';
this.pinkId = '';
this.couponId = '';
if(this.preOrderNo){
uni.redirectTo({
url: '/pages/users/order_confirm/index?is_address=1&cartId=' + cartId + '&addressId=' + id + '&pinkId=' +
pinkId + '&couponId=' + couponId + '&secKill=' + this.secKill + '&combination=' + this.combination + '&bargain=' + this.bargain
url: '/pages/users/order_confirm/index?is_address=1&preOrderNo=' + this.preOrderNo + '&addressId=' + id
})
}
}
@ -380,31 +361,32 @@
}
</script>
<style>
<style lang="scss" scoped>
.address-management{
padding: 20rpx 30rpx;
}
.address-management.fff {
background-color: #fff;
height: 1300rpx
}
.address-management .line {
.line {
width: 100%;
height: 3rpx;
}
.address-management .line image {
image {
width: 100%;
height: 100%;
display: block;
}
}
.address-management .item {
background-color: #fff;
padding: 0 30rpx;
margin-bottom: 12rpx;
padding: 0 20rpx;
margin-bottom: 20rpx;
}
.address-management .item .address {
padding: 30rpx 0;
padding: 35rpx 0;
border-bottom: 1rpx solid #eee;
font-size: 28rpx;
color: #282828;
@ -438,11 +420,11 @@
}
.address-management .item .operation .iconfont.icon-shanchu {
margin-left: 40rpx;
margin-left: 35rpx;
font-size: 38rpx;
}
.address-management .footer {
.footer {
position: fixed;
width: 100%;
background-color: #fff;
@ -452,7 +434,7 @@
box-sizing: border-box;
}
.address-management .footer .addressBnt {
.footer .addressBnt {
width: 330rpx;
height: 76rpx;
border-radius: 50rpx;
@ -462,18 +444,18 @@
color: #fff;
}
.address-management .footer .addressBnt.on {
.footer .addressBnt.on {
width: 690rpx;
margin: 0 auto;
}
.address-management .footer .addressBnt .iconfont {
.footer .addressBnt .iconfont {
font-size: 35rpx;
margin-right: 8rpx;
vertical-align: -1rpx;
}
.address-management .footer .addressBnt.wxbnt {
.footer .addressBnt.wxbnt {
background-color: #fe960f;
}
</style>

View File

@ -3,14 +3,14 @@
<view class='bill-details'>
<view class='nav acea-row'>
<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 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">
<view class='list pad30' v-for="(item,index) in userBillList" :key="index">
<view class='item'>
<view class='data'>{{item.date}}</view>
<view class='listn'>
<view class='listn borRadius14'>
<view class='itemn acea-row row-between-wrapper' v-for="(vo,indexn) in item.list" :key="indexn">
<view>
<view class='name line1'>{{vo.title}}</view>
@ -31,7 +31,7 @@
</view>
</view>
<!-- #ifdef MP -->
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize>
<!-- <authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize> -->
<!-- #endif -->
<home></home>
</view>
@ -78,13 +78,7 @@
if (this.isLogin) {
this.getUserBillList();
} else {
// #ifdef H5 || APP-PLUS
toLogin();
// #endif
// #ifdef MP
this.isAuto = true;
this.$set(this, 'isShowAuth', true);
// #endif
}
},
/**
@ -154,6 +148,9 @@
</script>
<style scoped lang='scss'>
.sign-record{
}
.bill-details .nav {
background-color: #fff;
height: 90rpx;
@ -169,7 +166,7 @@
}
.bill-details .nav .item.on {
color: #e93323;
border-bottom: 3rpx solid #e93323;
color: $theme-color;
border-bottom: 3rpx solid $theme-color;
}
</style>

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