Browse Source

Merge branch 'master' of http://8.134.10.79:3000/Leadfyy.co/ec.uniapp-master

# Conflicts:
#	pages/business/order/list.vue
#	pages/order/cashier/cashier.vue
#	pages/order/confirm/confirm.vue
#	pages/order/pointconfirm/confirm.vue
master
Enzo 4 years ago
parent
commit
1c22dd5261
  1. 2
      components/lf-adModal/lf-adModal.vue
  2. 3
      components/lf-payPassword/lf-payPassword.vue
  3. 4
      components/lf-shopGoodsCard/lf-shopGoodsCard.vue
  4. 2
      pages/aboutpay/confirmcash.vue
  5. 6
      pages/business/center/center.vue
  6. 11
      pages/business/login/login.vue
  7. 4
      pages/business/order/list.vue
  8. 7
      pages/business/payment/wait.vue
  9. 2
      pages/index/activity/hot.vue
  10. 7
      pages/index/category/category.vue
  11. 11
      pages/index/openScreenAd/openScreenAd.vue
  12. 11
      pages/order/cashier/cashier.vue
  13. 4
      pages/order/confirm/confirm.vue
  14. 32
      pages/order/index/onlineorder.vue
  15. 26
      pages/order/newdetail/newdetail.vue
  16. 3
      pages/order/pointconfirm/confirm.vue
  17. 65
      pages/shop/goodsdetail.vue
  18. 72
      pages/store/cart/cart.vue

2
components/lf-adModal/lf-adModal.vue

@ -58,6 +58,7 @@
left: 0;
top: 0;
z-index: 99;
background-color: rgba(0,0,0,0.5);
.box{
width: 600rpx;
height: max-content;
@ -67,6 +68,7 @@
.img{
width: 100%;
height: 100%;
border-radius: 5rpx;
}
}
.close{

3
components/lf-payPassword/lf-payPassword.vue

@ -62,6 +62,9 @@
},
inputVal(event){
this.code = event;
if(this.code.length >= 6){
this.comfirm();
}
},
comfirm(){
if(this.code.length < 6){

4
components/lf-shopGoodsCard/lf-shopGoodsCard.vue

@ -14,12 +14,12 @@
<view>{{ item.associate.sell_price }}</view>
</view>
</view>
<view class="goods-item" @click="$url('/pages/shop/specialList')">
<!-- <view class="goods-item" @click="$url('/pages/shop/specialList')">
<view class="more-box">
<text>查看更多</text>
<text class="lf-iconfont icon--2 lf-text-vertical"></text>
</view>
</view>
</view> -->
</view>
</scroll-view>
</view>

2
pages/aboutpay/confirmcash.vue

@ -20,7 +20,7 @@
</view>
</template>
</countdown-timer> -->
<countdown-time minute="5" second="0" :showDay="false" :showHour="false">
<countdown-time minute="2" second="0" :showDay="false" :showHour="false" color="#FF9D9D" splitorColor="#FF9D9D">
</countdown-time>
</view>

6
pages/business/center/center.vue

@ -7,7 +7,7 @@
<view class="bg-right"></view>
<view class="head-content">
<view class="lf-flex">
<image class="head-img" mode="widthFix" :src="detail.brand.logo"></image>
<image class="head-img" :src="detail.brand.logo"></image>
<view class="head-title lf-line-3">{{ detail.brand.name }}</view>
</view>
<view class="lf-flex">
@ -102,11 +102,11 @@
</view>
<view class="lf-flex lf-m-t-50">
<view class="item" :style="{width: 100 / 3 +'%'}" @click="$url('/pages/business/activity/add')">
<view class="lf-iconfont icon-bianji lf-font-60"></view>
<view class="lf-iconfont icon-a-Group21 lf-font-60 lf-color-333"></view>
<view>新增活动</view>
</view>
<view class="item" :style="{width: 100 / 3 +'%'}" @click="$url('/pages/business/activity/list')">
<view class="lf-iconfont icon-fabujilu lf-font-60"></view>
<view class="lf-iconfont icon-a-Group16 lf-font-60 lf-color-333"></view>
<view>活动列表</view>
</view>
</view>

11
pages/business/login/login.vue

@ -3,7 +3,8 @@
<lf-nav title="商家登录" :showIcon="true" bgColor="#fff"></lf-nav>
<view class="head">
<view class="head-content">
<image class="logo"></image>
<image class="logo" :src="avatar" v-if="avatar"></image>
<image class="logo" src="../../../static/images/login.png" v-else></image>
<view class="title">欢迎来到金诚优选</view>
</view>
</view>
@ -36,11 +37,15 @@
data(){
return {
phone: '',
password: ''
password: '',
avatar: ''
}
},
onLoad(){
let userInfo = this.$cookieStorage.get('user_info');
if(this.$isRight(userInfo)){
this.avatar = userInfo.avatar;
}
},
methods: {
next(){

4
pages/business/order/list.vue

@ -22,7 +22,7 @@
<view class="lf-row-between" style="line-height: 1;">
<text class="lf-font-24 lf-color-777">{{ item.count }}{{ item.items[0].item_meta.specs_text }}</text>
<!-- <text class="lf-font-32 lf-font-bold" style="color: #F63434;" v-if="item.payment != null">¥{{ item.payment.amount_yuan }}</text> -->
<text class="lf-font-32 lf-font-bold" style="color: #F63434;">¥{{ item.items[0].unit_price }}</text>
<text class="lf-font-32 lf-font-bold" style="color: #F63434;">¥{{ item.payment.amount_yuan || item.total }}</text>
</view>
</view>
</view>
@ -190,7 +190,7 @@
let method_id = this.columns[this.select_index].id;
let express_no = this.expressNum;
let order_no = this.click_order_no;
this.$http.get({
this.$http.post({
api: 'api/supplier/order/send',
data: {
distribution_id: 0,

7
pages/business/payment/wait.vue

@ -3,11 +3,18 @@
<lf-nav title="等待用户支付" :showIcon="true" bgColor="#fff"></lf-nav>
<view style="height: 50rpx;"></view>
<lf-nocontent src="/static/images/empty.png" text="等待用户支付…"></lf-nocontent>
<view class="lf-row-center" style="margin-top: -100rpx;">
<countdown-time minute="2" second="0" :showDay="false" :showHour="false" color="#FF9D9D" splitorColor="#FF9D9D"></countdown-time>
</view>
</view>
</template>
<script>
import countdownTime from '@/components/uni-countdown/uni-countdown.vue';
export default {
components: {
countdownTime
},
data(){
return {
user_id: 0,

2
pages/index/activity/hot.vue

@ -11,7 +11,7 @@
<view class="scroll-content">
<view class="card" v-for="(item, index) in tab.list" :key="index" @click="goDetails(item.id)">
<view class="cover">
<image class="img" :src="item.image" mode="widthFix"></image>
<image class="img" :src="item.image" mode="aspectFill"></image>
</view>
<view class="info">
<view class="title">{{item.name}}</view>

7
pages/index/category/category.vue

@ -21,7 +21,7 @@
<scroll-view @scroll="rightScroll" class="right_view" scroll-y :style="{ height: autoHeight }" :scroll-into-view="'left_' + right_selectIndex" scroll-with-animation>
<block v-for="(item, index) in dataArr" :key="index">
<view :ref="'left_' + index" class="right_item " :id="'left_' + index">
<text class="right_item_title ">{{ item.name }}</text>
<text class="right_item_title" :style="{color: left_selectIndex == index ? '#15716E' : '#555555'}">{{ item.name }}</text>
<view class="right_item_view">
<view class="item" v-for="(c_item, c_index) in item.sub_category" :key="c_index" @click="rightTap(c_item)">
<image :src="c_item.image" :style="{ width: '100%', height: subItemW + 'px', background: '#999999' }"></image>
@ -366,7 +366,7 @@
<style lang="scss" scoped>
.fixed-right{
position: fixed;
right: 32rpx;
right: 62rpx;
bottom: 400rpx;
width: max-content;
height: max-content;
@ -490,7 +490,8 @@
line-height: 49px;
font-size: 28rpx;
font-weight: bold;
color: #15716E;
color: #555555;
// color: #15716E;
}
.right_item_view {
display: grid;

11
pages/index/openScreenAd/openScreenAd.vue

@ -1,8 +1,9 @@
<template>
<view class="content">
<lf-nav bgColor="transparent" :spreadOut="false" @changeHeight="e => head_height = e"></lf-nav>
<block v-if="$isRight(full)">
<image class="img" :src="full.image" mode="widthFix" @click="clickAd"></image>
<view class="tips" @click="next">跳过 {{ num }}s</view>
<image class="img" :src="full.image" @click="clickAd"></image>
<view class="tips" @click="next" :style="{top: 'calc('+ head_height +'px + 10rpx)'}">跳过 {{ num }}s</view>
</block>
</view>
</template>
@ -13,7 +14,8 @@
return {
num: 5,
timer: null,
full: {}
full: {},
head_height: 0
}
},
onLoad(){
@ -79,7 +81,8 @@
.tips{
position: absolute;
right: 32rpx;
top: 132rpx;
// top: 132rpx;
// top: 10vh;
width: 144rpx;
height: 55rpx;
background-color: rgba(0,0,0,0.5);

11
pages/order/cashier/cashier.vue

@ -20,9 +20,7 @@
</view>
</template>
</countdown-timer> -->
<countdown-time minute="5" second="0" :showDay="false" :showHour="false" color="#FF9D9D"
splitorColor="#FF9D9D">
<countdown-time :minute="last_pay_time[2]" :second="last_pay_time[3]" :showDay="false" :showHour="false" color="#FF9D9D" splitorColor="#FF9D9D">
</countdown-time>
</view>
</view>
@ -76,15 +74,20 @@
balance_sum: 0,
show_pw: false,
user_pw: '',
clickContinue: true
clickContinue: true,
last_pay_time: []
}
},
onLoad(options) {
this.token = this.$cookieStorage.get('user_token');
this.last_pay_time = this.$cookieStorage.get('last_pay_time') || [0,0,29,58];
this.amount = options.amount;
this.order_no = options.order_no;
this.getBalanceSum();
},
onUnload(){
this.$cookieStorage.clear('last_pay_time');
},
methods: {
//
getBalanceSum() {

4
pages/order/confirm/confirm.vue

@ -336,8 +336,9 @@
order_no: this.order_detail.order.order_no,
pick_self: this.mode, // 0 1
address_id: this.address.id,
note: this.value
note: this.value,
}
// TODO id
if(this.coupon_index != null){
par.coupon_id = this.order_detail.coupons[this.coupon_index].id;
@ -355,6 +356,7 @@
let url = '/pages/order/cashier/cashier';
url += '?amount='+ this.totalPrice;
url += '&order_no='+ order.order_no;
this.$cookieStorage.set('last_pay_time', order.last_pay_time);
this.$url(url, {type: 'redirect'});
this.clickContinue = true;
}else{

32
pages/order/index/onlineorder.vue

@ -12,7 +12,7 @@
<view class="lf-p-30 lf-flex lf-w-100 lf-bg-white lf-m-b-30">
<!-- <u-icon name="search" class="search-icon"></u-icon>
<input class="rom-search" type="text" placeholder="请输入商品名称" /> -->
<u-search placeholder="请输入商品名称" bg-color="#F4F8F8" :show-action="false" style="width: 100%;"></u-search>
<u-search placeholder="请输入商品名称" bg-color="#F4F8F8" :show-action="false" style="width: 100%;" @search="onSearch"></u-search>
</view>
<swiper :style="{height: autoHeight, width: '750rpx'}" :current="current" @change="swiperChange">
<swiper-item v-for="(tabItem, tabIndex) in tab_list" :key="tabIndex">
@ -149,6 +149,7 @@
isPage: true
}
],
restore_obj: [],
list: [],
current: 0,
windowHeight: 0,
@ -157,7 +158,8 @@
scrollH: '',
nav_height: '',
isRefresher: false,
page: 1
page: 1,
criteria: '' //
}
},
computed: {
@ -171,6 +173,7 @@
onLoad(options){
let info = uni.getSystemInfoSync();
this.scrollH = info.screenHeight;
this.restore_obj = JSON.parse(JSON.stringify(this.tab_list));
if(typeof options.current != 'undefined'){
this.current = Number(options.current) || 0;
this.getData()
@ -179,6 +182,13 @@
}
},
methods: {
//
onSearch(value){
console.log("value", value)
this.criteria = value;
this.tab_list = JSON.parse(JSON.stringify(this.restore_obj));
this.getData();
},
goDetails(type,id) {
if(type==0) {
this.$url('/pages/order/newdetail/newdetail?pick_type=0&order_id='+id)
@ -246,15 +256,21 @@
getData(options ={}) {
let tab_item = this.tab_list[this.current];
console.log('=====adada===',tab_item)
let par = {
status: tab_item.type,
page: tab_item.page,
type: 0,
channel: ''
}
if(this.criteria){
par.criteria = this.criteria;
}
this.$http
.get({
api: 'api/order/list',
data:{
status: tab_item.type,
page: tab_item.page,
type: 0,
channel: ''
},
data: par,
header: {
Authorization: this.$cookieStorage.get('user_token')
},

26
pages/order/newdetail/newdetail.vue

@ -183,7 +183,7 @@
</view>
<view class="lf-flex">
<view class="btn-gray lf-m-r-20" @click="cancelOrder">取消订单</view>
<view class="btn-red" @click="$url('/pages/order/cashier/cashier?amount='+ order_details.total_yuan+'&order_no='+order_details.order_no)">立即付款</view>
<view class="btn-red" @click="toPay">立即付款</view>
</view>
@ -195,7 +195,7 @@
</view>
<view class="lf-flex">
<view style="width: 220rpx;"></view>
<view class="btn-confirm">
<view class="btn-confirm" @click="confirmReceiving">
确认收货
</view>
</view>
@ -274,6 +274,28 @@
}
},
methods: {
//
toPay(){
let order_details = this.order_details;
this.$cookieStorage.set('last_pay_time', order_details.last_pay_time);
this.$url('/pages/order/cashier/cashier?amount='+ order_details.total_yuan+'&order_no='+order_details.order_no)
},
//
confirmReceiving(){
this.$http.post({
api: 'api/shopping/order/received',
data: {
order_no: this.order_no
},
header: {
Authorization: this.$cookieStorage.get('user_token')
}
}).then(res => {
this.$msg(res.data.message).then(() => {
this.getOrderDetails();
})
})
},
searchLogistics() {
this.$http.get({
api: 'api/express/query',

3
pages/order/pointconfirm/confirm.vue

@ -285,7 +285,7 @@
note: this.value
},
header: {
Authorization: this.token
Authorization: this.token,
}
}).then(res => {
if(res.data.code == 200 || res.data.code == true){
@ -295,6 +295,7 @@
let url = '/pages/order/cashier/cashier';
url += '?amount='+ order.payable_freight_yuan;
url += '&order_no='+ order.order_no;
this.$cookieStorage.set('last_pay_time', order.last_pay_time);
this.$url(url, {type: 'redirect'});
this.clickContinue = true;
}else {

65
pages/shop/goodsdetail.vue

@ -628,28 +628,34 @@
}
}).then(res => {
console.log("===---", res);
let meta = res.data.meta;
let goods_detail = res.data.data;
this.goods_detail = goods_detail;
this.pictures = [res.data.data.img];
this.is_collect = Boolean(res.data.data.is_collect) || false;
let type = 'mail';
if(this.$isRight(goods_detail.is_largess)){
type = 'point';
}
if(this.$isRight(meta.seckill)){
type = 'seckill';
this.seckill = meta.seckill;
let currentDate = this.$shared.recordTime();
this.time = new Date(meta.seckill.ends_at).getTime() - new Date(currentDate).getTime()
}
if(type != 'point'){
this.getBrandDetail(goods_detail.brand_id);
}
if(this.$isRight(meta.discounts)){
this.coupons = meta.discounts.coupons;
if(res.data.status){
let meta = res.data.meta;
let goods_detail = res.data.data;
this.goods_detail = goods_detail;
this.pictures = [res.data.data.img];
this.is_collect = Boolean(res.data.data.is_collect) || false;
let type = 'mail';
if(this.$isRight(goods_detail.is_largess)){
type = 'point';
}
if(this.$isRight(meta.seckill)){
type = 'seckill';
this.seckill = meta.seckill;
let currentDate = this.$shared.recordTime();
this.time = new Date(meta.seckill.ends_at).getTime() - new Date(currentDate).getTime()
}
if(type != 'point'){
this.getBrandDetail(goods_detail.brand_id);
}
if(this.$isRight(meta.discounts)){
this.coupons = meta.discounts.coupons;
}
this.type = type;
}else{
this.$msg(res.data.message || '网络繁忙请稍后再试').then(() => {
this.$toBack();
})
}
this.type = type;
}).catch(err => {
console.log("====", err);
})
@ -1077,7 +1083,8 @@
margin-bottom: 20rpx;
}
.spec-item{
width: 142rpx;
min-width: 122rpx;
max-width: max-content;
height: 64rpx;
border-radius: 33rpx;
border: 2rpx solid #555555;
@ -1087,12 +1094,14 @@
justify-content: center;
align-items: center;
margin-right: 20rpx;
&:nth-child(4n){
margin-right: 0rpx;
}
&:nth-child(n+5){
margin-top: 20rpx;
}
margin-bottom: 20rpx;
padding: 0 20rpx;
// &:nth-child(4n){
// margin-right: 0rpx;
// }
// &:nth-child(n+5){
// margin-top: 20rpx;
// }
}
.spec-active{
border: none;

72
pages/store/cart/cart.vue

@ -24,12 +24,29 @@
<u-checkbox shape="circle" active-color="#15716E" @change="goodsCheckChange($event, s_index, g_index)" v-model="g_item.checked"></u-checkbox>
</u-checkbox-group>
<view class="lf-m-t-30" style="display: flex;">
<image class="content-img" :src="g_item.img" mode="widthFix" @click="$url('/pages/shop/goodsdetail?id='+ g_item.com_id)"></image>
<image class="content-img" :src="g_item.img" @click="$url('/pages/shop/goodsdetail?id='+ g_item.com_id)"></image>
<view class="lf-m-l-15 content-info">
<view class="lf-color-333 lf-font-26 lf-line-2" style="max-width: 480rpx;">{{g_item.name}}</view>
<view class="lf-font-24 lf-color-777 lf-m-t-14 lf-row-between">
<view class="lf-color-333 lf-font-26 lf-line-2" style="max-width: 480rpx;">
<text>{{g_item.name}}</text>
<text class="lf-m-l-10">{{g_item.color ? g_item.color+' ' : ''}}</text>
<text>{{g_item.size ? g_item.size : ''}}</text>
</view>
<!-- <view class="lf-font-24 lf-color-777 lf-m-t-14">
<view>{{g_item.qty ? g_item.qty+'件;' : ''}}{{g_item.color ? g_item.color+';' : ''}}{{g_item.size ? g_item.size : ''}}</view>
<view class="lf-font-32 lf-color-price">{{ g_item.price }}</view>
</view> -->
<view class="lf-row-between">
<view class="lf-font-32 lf-color-price" style="line-height: 1;">{{ g_item.price }}</view>
<view class="lf-flex">
<view class="num-btn" @click="changeNum('less', s_index, g_index)">
<text class="lf-iconfont icon-jian1 lf-font-30"></text>
</view>
<view>
<input class="input" :value="g_item.qty" :disabled="true" />
</view>
<view class="num-btn lf-text-right" @click="changeNum('add', s_index, g_index)">
<text class="lf-iconfont icon-jia lf-font-30"></text>
</view>
</view>
</view>
</view>
</view>
@ -114,6 +131,40 @@
this.getCartList();
},
methods: {
//
changeNum(type, parentIndex, childIndex){
let goodsItem = this.list[parentIndex].goods[childIndex];
if(type == 'add'){
if(goodsItem.qty < 10){
goodsItem.qty++;
}else{
return;
}
}else if(type == 'less'){
if(goodsItem.qty > 1){
goodsItem.qty--;
}else{
return;
}
}
let __raw_id = goodsItem.__raw_id;
this.$http.ajax({
api: 'api/shopping/cart/'+ __raw_id,
method: 'PUT',
header: {
Authorization: this.token
},
data: {
attributes: {
qty: goodsItem.qty
}
}
}).then(res => {
if(!res.data.status){
this.$msg('购物车更新失败', {icon: 'error'});
}
})
},
getCartList(){
this.$http.get({
api: 'api/cart',
@ -274,6 +325,9 @@
}
.content-info{
width: 410rpx;
display: flex;
flex-direction: column;
justify-content: space-between;
}
.online-card {
width: 686rpx;
@ -288,4 +342,14 @@
margin-bottom: 150rpx;
}
}
.num-btn{
width: 36rpx;
}
.input{
width: 40rpx;
height: 45rpx;
border-radius: 2rpx;
background-color: #F3F8F7;
text-align: center;
}
</style>
Loading…
Cancel
Save