Enzo 4 years ago
parent
commit
6a4005f829
  1. 2
      components/lf-shopGoodsCard/lf-shopGoodsCard.vue
  2. 8
      pages/business/activity/list.vue
  3. 36
      pages/business/balance/balance.vue
  4. 2
      pages/business/withdrawal/withdrawal.vue
  5. 85
      pages/shop/goodsdetail.vue
  6. 34
      pages/store/cart/cart.vue
  7. 2
      pages/user/my/center.vue
  8. 16
      pages/user/my/vipinfo.vue

2
components/lf-shopGoodsCard/lf-shopGoodsCard.vue

@ -11,7 +11,7 @@
<image class="goods-img" :src="item.associate.img"></image>
<view class="goods-info">
<view class="lf-line-1">{{ item.associate.name }}</view>
<view>{{ item.associate.min_price }}</view>
<view>{{ item.associate.sell_price }}</view>
</view>
</view>
<view class="goods-item" @click="$url('/pages/shop/specialList')">

8
pages/business/activity/list.vue

@ -2,7 +2,7 @@
<view>
<lf-nav title="活动列表" :showIcon="true" bgColor="#fff" @changeHeight="e => nav_height = e"></lf-nav>
<view v-if="tab_list.length">
<u-tabs :list="tab_list" active-color="#15716E" inactive-color='#777777' :is-scroll="true" :current="tab_current" @change="tabChange"></u-tabs>
<u-tabs :list="tab_list" active-color="#0E2F9E" inactive-color='#777777' :is-scroll="true" :current="tab_current" @change="tabChange"></u-tabs>
</view>
<swiper :style="{height: autoHeight}" :current="tab_current" @change="swiperChange">
<swiper-item v-for="(tab, tabIndex) in tab_list" :key="tabIndex">
@ -263,7 +263,7 @@
}
.theme-1{
background-color: #15716E;
background-color: #0E2F9E;
}
.theme-2{
background-color: #1789E4;
@ -280,7 +280,7 @@
border-bottom: 1rpx solid rgba(0, 0, 0, 0.1);
}
/deep/.u-scroll-box .u-tab-bar {
background-color: #15716E!important;
background-color: #0E2F9E!important;
width: 80rpx!important;
position: absolute;
left: 0;
@ -288,7 +288,7 @@
}
/deep/.special_tab .u-tabs .u-scroll-box .u-tab-bar {
background-color: #15716E!important;
background-color: #0E2F9E!important;
width: 56rpx!important;
position: absolute;
height: 5rpx!important;

36
pages/business/balance/balance.vue

@ -35,7 +35,10 @@
<view class="item" v-for="(item, index) in tabItem.list" :key="index">
<view class="lf-row-between">
<text class="lf-font-36 lf-color-black lf-font-bold" style="width: 70%;" v-if="item.type == 'charge'">+{{ item.balance }}</text>
<text class="lf-font-36 lf-font-bold" style="color: #F63434; width: 70%;" v-else>{{ item.balance }}</text>
<text class="lf-font-36 lf-font-bold" style="width: 70%;" v-else>
<text v-if="current == 1" :style="{color: showStateColor(item.state), 'font-size': '22rpx'}">[{{ item.state }}]</text>
<text style="color: #F63434;">{{ item.balance }}</text>
</text>
<text class="lf-font-24 lf-color-555">{{ item.note }}</text>
</view>
<view class="lf-row-between lf-m-t-20">
@ -66,17 +69,46 @@
isPage: true,
list: []
}],
balance: 0
balance: 0,
show_count: 0
}
},
computed: {
getDay(){
return this.$shared.recordTime(new Date(), '-', 'date');
},
showStateColor(){
return function(val){
if(val == '提现中'){
return '#999999'
}else if(val == '已到账'){
return '#0D2E9A'
}else{
return '#87aebf'
}
}
}
},
onLoad(){
this.getBalance();
},
onShow(){
this.show_count++;
if(this.show_count > 1){
this.tab_list = [{
name: '余额明细',
page: 1,
isPage: true,
list: []
},{
name: '提现明细',
page: 1,
isPage: true,
list: []
}];
this.getBalance();
}
},
methods: {
//
dateChange(event){

2
pages/business/withdrawal/withdrawal.vue

@ -210,7 +210,7 @@
this.alipay_account = '';
}
this.money = '';
this.$msg('提现成功', {icon: 'success'});
this.$msg('提现成功', {icon: 'success', duration: 2500});
this.getApplyInfo();
}
uni.hideLoading();

85
pages/shop/goodsdetail.vue

@ -397,43 +397,60 @@
let goods_detail = this.goods_detail;
let specs = this.goods_stock.specs;
let stores = this.goods_stock.stores;
let par = {};
let s_id_1 = 1;
let s_id_2 = 2;
for(let i in specs){
if(specs[i].label_key == 'size'){
s_id_1 = 1;
if(this.$isRight(specs)){
let s_id_1 = 1;
let s_id_2 = 2;
for(let i in specs){
if(specs[i].label_key == 'size'){
s_id_1 = 1;
}
if(specs[i].label_key == 'color'){
s_id_2 = 2;
}
}
if(specs[i].label_key == 'color'){
s_id_2 = 2;
let spec_current_1 = specs[s_id_1].spec_current;
let spec_current_2 = specs[s_id_2].spec_current;
let id_1 = specs[s_id_1].list[spec_current_1].id;
let id_2 = specs[s_id_2].list[spec_current_2].id;
if(id_1 > id_2){
let id_3 = id_2;
id_2 = id_1;
id_1 = id_3;
}
par = {
attributes: {
color: specs[s_id_2].list[specs[s_id_2].spec_current].value,
com_id: goods_detail.id,
img: goods_detail.img,
size: specs[s_id_1].list[specs[s_id_1].spec_current].value,
sku: goods_detail.goods_no +'-'+ specs[s_id_1].list[specs[s_id_1].spec_current].value
},
id: stores[id_1 +'-'+ id_2].id,
product_id: stores[id_1 +'-'+ id_2].id,
price: stores[id_1 +'-'+ id_2].price,
store_count: stores[id_1 +'-'+ id_2].store,
market_price: goods_detail.market_price,
name: goods_detail.name,
qty: this.goods_num
}
}else{
par = {
attributes: {
com_id: goods_detail.id,
img: goods_detail.img
},
id: goods_detail.id,
product_id: goods_detail.id,
price: goods_detail.sell_price,
store_count: goods_detail.store_nums,
market_price: goods_detail.market_price,
name: goods_detail.name,
qty: this.goods_num
}
}
let spec_current_1 = specs[s_id_1].spec_current;
let spec_current_2 = specs[s_id_2].spec_current;
let id_1 = specs[s_id_1].list[spec_current_1].id;
let id_2 = specs[s_id_2].list[spec_current_2].id;
if(id_1 > id_2){
let id_3 = id_2;
id_2 = id_1;
id_1 = id_3;
}
let par = {
attributes: {
color: specs[s_id_2].list[specs[s_id_2].spec_current].value,
com_id: goods_detail.id,
img: goods_detail.img,
size: specs[s_id_1].list[specs[s_id_1].spec_current].value,
sku: goods_detail.goods_no +'-'+ specs[s_id_1].list[specs[s_id_1].spec_current].value
},
id: stores[id_1 +'-'+ id_2].id,
product_id: stores[id_1 +'-'+ id_2].id,
price: stores[id_1 +'-'+ id_2].price,
store_count: stores[id_1 +'-'+ id_2].store,
market_price: goods_detail.market_price,
name: goods_detail.name,
qty: this.goods_num
}
uni.showLoading({

34
pages/store/cart/cart.vue

@ -4,7 +4,7 @@
<view style="height: 1rpx;"></view>
<view>
<view v-for="(s_item, s_index) in list" :key="s_index" class="online-card">
<view class="lf-m-b-20" @click="$url('/pages/shop/shopdetail')">
<view class="lf-m-b-20" @click="$url('/pages/shop/shopdetail?id='+ s_item.id)">
<text class="lf-iconfont icon-Group- lf-font-28"></text>
<text class="lf-color-black lf-font-28 lf-font-bold lf-m-l-10">{{ s_item.name }}</text>
<text class="lf-iconfont icon-xiangyou lf-font-24 lf-m-l-10"></text>
@ -18,7 +18,7 @@
</view>
<!-- 单个商品信息增加滑动删除 -->
<view v-for="(g_item, g_index) in s_item.goods" :key="g_index">
<lf-swipe-action :options="options" :index="g_index" :show="show" @button="onButton($event, s_index)">
<lf-swipe-action :options="options" :index="g_index" :show="show" @button="onButton($event, s_index, g_index)">
<view class="lf-row-between">
<u-checkbox-group>
<u-checkbox shape="circle" active-color="#15716E" @change="goodsCheckChange($event, s_index, g_index)" v-model="g_item.checked"></u-checkbox>
@ -28,7 +28,7 @@
<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>{{g_item.qty}};{{g_item.color}};{{g_item.size}}</view>
<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>
@ -128,7 +128,8 @@
list.push({
name: data[i].name,
full_minus: '',
goods: goods
goods: goods,
id: data[i].id
})
}
this.list = list;
@ -183,14 +184,33 @@
}
},
//
onButton(event, parentIndex){
console.log("event", event, parentIndex);
onButton(event, parentIndex, childIndex){
if(event.buttonIndex == 0){
let __raw_id = this.list[parentIndex].goods[childIndex].__raw_id;
uni.showModal({
title: '温馨提示',
content: '确定移除该商品吗?',
success: result => {
if(result.confirm){
this.$http.ajax({
api: 'api/shopping/cart/'+ __raw_id,
method: 'DELETE',
header: {
Authorization: this.token
}
}).then(res => {
if(res.data.code == 200){
this.$msg('删除成功', {icon: 'success'}).then(() => {
this.list[parentIndex].goods.splice(childIndex, 1);
if(this.list[parentIndex].goods.length <= 0){
this.list.splice(parentIndex, 1);
}
})
}else{
this.$msg('删除失败', {icon: 'error'});
}
})
}
}
})
}

2
pages/user/my/center.vue

@ -37,7 +37,7 @@
</view>
</view>
<view class="center-card">
<view class="center-card" v-if="$isRight(centerInfo.userLevel)">
<view class="lf-p-30 lf-row-between lf-w-100" @click="$url('/pages/user/member/service')">
<view class="lf-flex-column">
<view class="lf-font-bold" style="color: #15716E;">

16
pages/user/my/vipinfo.vue

@ -14,7 +14,7 @@
</view>
</view>
</view>
<view class="lf-p-l-32 lf-p-r-32">
<!-- <view class="lf-p-l-32 lf-p-r-32">
<view class="set-tag lf-border-bottom">
<view class="lf-font-28 lf-color-black">
国籍
@ -23,7 +23,7 @@
<input type="text" class="edit-input" v-model="info.native_place" placeholder="请输入你的国籍" />
</view>
</view>
</view>
</view> -->
<view class="lf-p-l-32 lf-p-r-32">
<view class="set-tag lf-border-bottom">
<view class="lf-font-28 lf-color-black">
@ -74,7 +74,7 @@
</view>
</view>
</view>
<view class="lf-p-l-32 lf-p-r-32">
<!-- <view class="lf-p-l-32 lf-p-r-32">
<view class="set-tag lf-border-bottom">
<view class="lf-font-28 lf-color-black">
家庭地址
@ -83,8 +83,8 @@
<input type="text" class="edit-input" v-model="info.home_address" placeholder="请输入您的家庭地址" />
</view>
</view>
</view>
<view class="lf-p-l-32 lf-p-r-32">
</view> -->
<!-- <view class="lf-p-l-32 lf-p-r-32">
<view class="set-tag lf-border-bottom">
<view class="lf-font-28 lf-color-black">
学历
@ -93,7 +93,7 @@
<input type="text" class="edit-input" v-model="info.education" placeholder="请输入您的学历" />
</view>
</view>
</view>
</view> -->
<view class="lf-font-26 lf-color-999 lf-p-30 lf-row-center">
温馨提示身份证号出生日期不支持线上修改如需修改请前往服务台办理
@ -140,14 +140,14 @@
info.name = detail.name;
info.sex = detail.sex;
info.birthday = detail.birthday;
info.native_place = detail.country;
// info.native_place = detail.country;
if(detail.province && detail.city && detail.area){
let address = [detail.province, detail.city, detail.area];
info.address = address;
}
info.address_detail = detail.postal_address;
info.home_address = detail.home_address;
// info.home_address = detail.home_address;
// todo ... id_number

Loading…
Cancel
Save