Merge remote-tracking branch 'remotes/old/zmj' into old
This commit is contained in:
commit
c883775f4d
@ -28,7 +28,8 @@
|
||||
<view class='bottom flex'>
|
||||
<text class='item' @click='close'>随便逛逛</text>
|
||||
<!-- #ifdef MP -->
|
||||
<button class="item grant" hover-class="none" @tap="getUserProfile"><text class="text">去授权</text></button>
|
||||
<button class="item grant" hover-class="none" @tap="getUserProfile"><text
|
||||
class="text">去授权</text></button>
|
||||
<!-- #endif -->
|
||||
<!-- #ifdef APP-PLUS -->
|
||||
<button class="item grant" @tap="toWecahtAuth">
|
||||
@ -55,12 +56,22 @@
|
||||
getLogo,
|
||||
commonAuth
|
||||
} from '../api/public';
|
||||
import { LOGO_URL, USER_INFO, EXPIRES_TIME } from '../config/cache';
|
||||
import { mapGetters } from 'vuex';
|
||||
import {
|
||||
LOGO_URL,
|
||||
USER_INFO,
|
||||
EXPIRES_TIME
|
||||
} from '../config/cache';
|
||||
import {
|
||||
mapGetters
|
||||
} from 'vuex';
|
||||
import Routine from '../libs/routine';
|
||||
import { configMap } from '@/utils/index';
|
||||
import {
|
||||
configMap
|
||||
} from '@/utils/index';
|
||||
import Auth from '../libs/wechat';
|
||||
import { toLogin } from '../libs/login';
|
||||
import {
|
||||
toLogin
|
||||
} from '../libs/login';
|
||||
// #ifdef MP
|
||||
import editUserModal from '@/components/eidtUserModal/index.vue'
|
||||
// #endif
|
||||
@ -198,7 +209,10 @@
|
||||
if (res.data.status == 200) {
|
||||
let time = res.data.result.expires_time - Cache.time();
|
||||
self.$store.commit('UPDATE_USERINFO', res.data.result.user);
|
||||
self.$store.commit('LOGIN', { token: res.data.result.token, time: time });
|
||||
self.$store.commit('LOGIN', {
|
||||
token: res.data.result.token,
|
||||
time: time
|
||||
});
|
||||
self.$store.commit('SETUID', res.data.result.user.uid);
|
||||
Cache.set(EXPIRES_TIME, res.data.result.expires_time, time);
|
||||
Cache.set(USER_INFO, res.data.result.user, time);
|
||||
|
@ -256,6 +256,71 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
|
||||
<!-- 多规格购物车 -->
|
||||
<view class="" style="z-index: 9999;">
|
||||
<u-popup :show="showcartpop" @close="closecartpop" @open="opencartpop">
|
||||
<view class="sku">
|
||||
<view class="sku_head">
|
||||
<view class="sku_head_l">
|
||||
<u--image :showLoading="true" src="/static/images/BG.png" width="200.09rpx"
|
||||
height="200.09rpx"></u--image>
|
||||
</view>
|
||||
<view class="sku_head_r">
|
||||
<view class="sku_goods_tit">
|
||||
fsdfsdfsdfffffffff
|
||||
</view>
|
||||
<view class="">
|
||||
<view class="sku_goods_price">
|
||||
79.00
|
||||
</view>
|
||||
<view class="sku_goods_num">
|
||||
库存:999
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
<view class="sku_size">
|
||||
<view class="">
|
||||
尺码
|
||||
</view>
|
||||
<view class="">
|
||||
<text>大号</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="sku_num">
|
||||
<view class="">
|
||||
数量
|
||||
</view>
|
||||
<view class="">
|
||||
<u-number-box v-model="skuNumber" @change="valChange"></u-number-box>
|
||||
</view>
|
||||
</view>
|
||||
<view class="skuaddcart">
|
||||
|
||||
加入购物车
|
||||
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</u-popup>
|
||||
</view>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse">
|
||||
</authorize>
|
||||
<view class="" :style="`height:${appInfo.bottom}px;background-color:white`">
|
||||
</view>
|
||||
</view>
|
||||
@ -285,17 +350,26 @@
|
||||
import {
|
||||
postCartAdd,
|
||||
} from '@/api/store.js';
|
||||
import authorize from '@/components/Authorize';
|
||||
import {
|
||||
mapGetters
|
||||
} from "vuex";
|
||||
export default {
|
||||
components: {
|
||||
authorize,
|
||||
},
|
||||
data() {
|
||||
let src = 'https://lihai001.oss-cn-chengdu.aliyuncs.com/public/kk/luzhou/static4/13';
|
||||
return {
|
||||
skuNumber: 0,
|
||||
showcartpop: false,
|
||||
trnList: [],
|
||||
act_cart: false,
|
||||
appInfo: {},
|
||||
pocls: "",
|
||||
type: "",
|
||||
act_swiper: "",
|
||||
current: 1,
|
||||
current: 3,
|
||||
goodsNum: 0,
|
||||
goodsList: [],
|
||||
isEmpty: false,
|
||||
@ -316,6 +390,7 @@
|
||||
page_num: 1,
|
||||
act_img: "",
|
||||
cartTagInfo: {},
|
||||
isAuto: false,
|
||||
actList: [{
|
||||
tit: '综合',
|
||||
act: "",
|
||||
@ -332,9 +407,14 @@
|
||||
}],
|
||||
status: "loadmore",
|
||||
flag: false,
|
||||
isShowAuth: false, //是否隐藏授权
|
||||
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters(['isLogin', 'viewColor', 'uid']),
|
||||
},
|
||||
// ...mapGetters(['isLogin', 'viewColor', 'uid']),
|
||||
onLoad(e) {
|
||||
// this.cartFn()
|
||||
this.appInfo = this.$appInfo.safeAreaInsets
|
||||
@ -434,6 +514,23 @@
|
||||
|
||||
// },
|
||||
methods: {
|
||||
valChange(e) {
|
||||
this.valChange = e
|
||||
},
|
||||
closecartpop() {
|
||||
this.showcartpop = false
|
||||
},
|
||||
opencartpop() {
|
||||
this.showcartpop = true
|
||||
},
|
||||
// 授权关闭
|
||||
authColse: function(e) {
|
||||
this.isShowAuth = e;
|
||||
},
|
||||
|
||||
onLoadFun() {
|
||||
this.isShowAuth = false;
|
||||
},
|
||||
clickSwiperFn(i) {
|
||||
// console.log(i)
|
||||
this.current = i
|
||||
@ -528,6 +625,14 @@
|
||||
|
||||
},
|
||||
addcart(item, i) {
|
||||
// this.showcartpop = true
|
||||
// return
|
||||
// console.log(this.isLogin)
|
||||
if (!this.isLogin) {
|
||||
this.isAuto = true;
|
||||
this.isShowAuth = true
|
||||
return
|
||||
}
|
||||
|
||||
let data = {
|
||||
cart_num: 1,
|
||||
@ -635,6 +740,39 @@
|
||||
}
|
||||
}
|
||||
|
||||
.sku {
|
||||
padding: 20rpx;
|
||||
|
||||
.sku_head {
|
||||
display: flex;
|
||||
|
||||
.sku_head_r {
|
||||
margin-left: 20rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
// justify-content;
|
||||
}
|
||||
|
||||
.sku_num {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.skuaddcart {
|
||||
width: 50vw;
|
||||
background-color: #FEAB00;
|
||||
margin: 0 auto;
|
||||
height: 80rpx;
|
||||
line-height: 80rpx;
|
||||
text-align: center;
|
||||
color: white;
|
||||
border-radius: 80rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.flags {
|
||||
background-color: red;
|
||||
z-index: 99999999;
|
||||
@ -958,7 +1096,7 @@
|
||||
|
||||
.card {
|
||||
width: 720rpx;
|
||||
z-index: 999999;
|
||||
z-index: 99;
|
||||
// margin:auto;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
|
@ -319,6 +319,8 @@
|
||||
},
|
||||
onLoad(options) {
|
||||
// uni.hideTabBar()
|
||||
// console.log(this.isLogin, "sdfsdkfhjsdhgfsdf")
|
||||
// return
|
||||
this.id = options.id;
|
||||
this.type = options.gtype
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user