界面优化修改
This commit is contained in:
parent
37f3c8e9b2
commit
7346d21317
2
App.vue
2
App.vue
@ -254,7 +254,7 @@
|
|||||||
uni.onNetworkStatusChange(function(res) {
|
uni.onNetworkStatusChange(function(res) {
|
||||||
|
|
||||||
if (res.isConnected) {
|
if (res.isConnected) {
|
||||||
|
|
||||||
uni.reLaunch({
|
uni.reLaunch({
|
||||||
url: '/pages/index/index'
|
url: '/pages/index/index'
|
||||||
})
|
})
|
||||||
|
15
api/requesta.js
Normal file
15
api/requesta.js
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
import request from "@/utils/requesta.js";
|
||||||
|
|
||||||
|
export function getCityCloundShop(data) {
|
||||||
|
return request.get("city/get_cloud_shop", data);
|
||||||
|
}
|
||||||
|
export function cloudWarehouse(data) {
|
||||||
|
return request.get("store/product/cloudWarehouse", data);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 供销市场标签
|
||||||
|
* @returns {*}
|
||||||
|
*/
|
||||||
|
export function supMenuApi(data) {
|
||||||
|
return request.get('intention/v2/cate', data);
|
||||||
|
}
|
@ -1,351 +1,365 @@
|
|||||||
<template>
|
<template>
|
||||||
<view>
|
<view>
|
||||||
<view class='mask' v-if='isShowAuth && code' @click='close'></view>
|
<view class='mask' v-if='isShowAuth && code' @click='close'></view>
|
||||||
<view class='Popup' v-if='isShowAuth && code' :style="'top:'+top+'px;'">
|
<view class='Popup' v-if='isShowAuth && code' :style="'top:'+top+'px;'">
|
||||||
<!-- <view class="logo-auth">
|
<!-- <view class="logo-auth">
|
||||||
<image class="image" :src='routine_logo' mode="aspectFit"></image>
|
<image class="image" :src='routine_logo' mode="aspectFit"></image>
|
||||||
</view> -->
|
</view> -->
|
||||||
<!--#ifdef H5-->
|
<!--#ifdef H5-->
|
||||||
<text v-if="isWeixin" class='title'>授权提醒</text>
|
<text v-if="isWeixin" class='title'>授权提醒</text>
|
||||||
<text v-else class='title'>{{title}}</text>
|
<text v-else class='title'>{{title}}</text>
|
||||||
<!--#endif-->
|
<!--#endif-->
|
||||||
<!--#ifdef APP-PLUS-->
|
<!--#ifdef APP-PLUS-->
|
||||||
<text class='title'>用户登录</text>
|
<text class='title'>用户登录</text>
|
||||||
<!--#endif-->
|
<!--#endif-->
|
||||||
<!--#ifdef MP-->
|
<!--#ifdef MP-->
|
||||||
<text class='title'>{{title}}</text>
|
<text class='title'>{{title}}</text>
|
||||||
<!--#endif-->
|
<!--#endif-->
|
||||||
<!--#ifdef H5-->
|
<!--#ifdef H5-->
|
||||||
<text v-if="isWeixin" class='tip'>请授权头像等信息,以便为您提供更好的服务!</text>
|
<text v-if="isWeixin" class='tip'>请授权头像等信息,以便为您提供更好的服务!</text>
|
||||||
<text v-else class='tip'>{{info}}</text>
|
<text v-else class='tip'>{{info}}</text>
|
||||||
<!--#endif-->
|
<!--#endif-->
|
||||||
<!--#ifdef APP-PLUS-->
|
<!--#ifdef APP-PLUS-->
|
||||||
<text class='tip'>请登录,将为您提供更好的服务!</text>
|
<text class='tip'>请登录,将为您提供更好的服务!</text>
|
||||||
<!--#endif-->
|
<!--#endif-->
|
||||||
<!--#ifdef MP-->
|
<!--#ifdef MP-->
|
||||||
<text class='tip'>{{info}}</text>
|
<text class='tip'>{{info}}</text>
|
||||||
<!--#endif-->
|
<!--#endif-->
|
||||||
<view class='bottom flex'>
|
<view class='bottom flex'>
|
||||||
<text class='item' @click='close'>随便逛逛</text>
|
<text class='item' @click='close'>随便逛逛</text>
|
||||||
<!-- #ifdef MP -->
|
<!-- #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
|
||||||
<!-- #endif -->
|
class="text">去授权</text></button>
|
||||||
<!-- #ifdef APP-PLUS -->
|
<!-- #endif -->
|
||||||
<button class="item grant" @tap="toWecahtAuth">
|
<!-- #ifdef APP-PLUS -->
|
||||||
<text class="text">去登录</text>
|
<button class="item grant" @tap="toWecahtAuth">
|
||||||
</button>
|
<text class="text">去登录</text>
|
||||||
<!-- #endif -->
|
</button>
|
||||||
<!-- #ifdef H5 -->
|
<!-- #endif -->
|
||||||
<button class="item grant" @tap="toWecahtAuth">
|
<!-- #ifdef H5 -->
|
||||||
<text v-if="isWeixin" class="text">去授权</text>
|
<button class="item grant" @tap="toWecahtAuth">
|
||||||
<text v-else class="text">去登录</text>
|
<text v-if="isWeixin" class="text">去授权</text>
|
||||||
</button>
|
<text v-else class="text">去登录</text>
|
||||||
<!-- #endif -->
|
</button>
|
||||||
</view>
|
<!-- #endif -->
|
||||||
</view>
|
</view>
|
||||||
<!-- #ifdef MP -->
|
</view>
|
||||||
<editUserModal :isShow="editModal" @closeEdit="closeEdit" @editSuccess="editSuccess"></editUserModal>
|
<!-- #ifdef MP -->
|
||||||
<!-- #endif -->
|
<editUserModal :isShow="editModal" @closeEdit="closeEdit" @editSuccess="editSuccess"></editUserModal>
|
||||||
</view>
|
<!-- #endif -->
|
||||||
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
const app = getApp();
|
const app = getApp();
|
||||||
import Cache from '../utils/cache';
|
import Cache from '../utils/cache';
|
||||||
import {
|
import {
|
||||||
getLogo,
|
getLogo,
|
||||||
commonAuth
|
commonAuth
|
||||||
} from '../api/public';
|
} from '../api/public';
|
||||||
import { LOGO_URL, USER_INFO, EXPIRES_TIME } from '../config/cache';
|
import {
|
||||||
import { mapGetters } from 'vuex';
|
LOGO_URL,
|
||||||
import Routine from '../libs/routine';
|
USER_INFO,
|
||||||
import { configMap } from '@/utils/index';
|
EXPIRES_TIME
|
||||||
import Auth from '../libs/wechat';
|
} from '../config/cache';
|
||||||
import { toLogin } from '../libs/login';
|
import {
|
||||||
// #ifdef MP
|
mapGetters
|
||||||
import editUserModal from '@/components/eidtUserModal/index.vue'
|
} from 'vuex';
|
||||||
// #endif
|
import Routine from '../libs/routine';
|
||||||
export default {
|
import {
|
||||||
name: 'Authorize',
|
configMap
|
||||||
props: {
|
} from '@/utils/index';
|
||||||
isAuto: {
|
import Auth from '../libs/wechat';
|
||||||
type: Boolean,
|
import {
|
||||||
default: true
|
toLogin
|
||||||
},
|
} from '../libs/login';
|
||||||
isGoIndex: {
|
// #ifdef MP
|
||||||
type: Boolean,
|
import editUserModal from '@/components/eidtUserModal/index.vue'
|
||||||
default: true
|
// #endif
|
||||||
},
|
export default {
|
||||||
isShowAuth: {
|
name: 'Authorize',
|
||||||
type: Boolean,
|
props: {
|
||||||
default: false
|
isAuto: {
|
||||||
}
|
type: Boolean,
|
||||||
},
|
default: true
|
||||||
components: {
|
},
|
||||||
// #ifdef MP
|
isGoIndex: {
|
||||||
editUserModal
|
type: Boolean,
|
||||||
// #endif
|
default: true
|
||||||
},
|
},
|
||||||
data() {
|
isShowAuth: {
|
||||||
return {
|
type: Boolean,
|
||||||
title: '用户登录',
|
default: false
|
||||||
info: '请登录,将为您提供更好的服务!',
|
}
|
||||||
//#ifdef H5
|
},
|
||||||
isWeixin: this.$wechat.isWeixin(),
|
components: {
|
||||||
//#endif
|
// #ifdef MP
|
||||||
//#ifdef MP
|
editUserModal
|
||||||
title: '授权提醒',
|
// #endif
|
||||||
info: '请授权头像等信息,以便为您提供更好的服务!',
|
},
|
||||||
//#endif
|
data() {
|
||||||
canUseGetUserProfile: false,
|
return {
|
||||||
code: null,
|
title: '用户登录',
|
||||||
top: 0,
|
info: '请登录,将为您提供更好的服务!',
|
||||||
mp_is_new: this.$Cache.get('MP_VERSION_ISNEW') || false,
|
//#ifdef H5
|
||||||
editModal: false, // 编辑头像信息
|
isWeixin: this.$wechat.isWeixin(),
|
||||||
}
|
//#endif
|
||||||
},
|
//#ifdef MP
|
||||||
computed: {
|
title: '授权提醒',
|
||||||
...mapGetters(['isLogin', 'userInfo', 'viewColor']),
|
info: '请授权头像等信息,以便为您提供更好的服务!',
|
||||||
...configMap(['routine_logo'])
|
//#endif
|
||||||
},
|
canUseGetUserProfile: false,
|
||||||
watch: {
|
code: null,
|
||||||
isLogin(n) {
|
top: 0,
|
||||||
n === true && this.$emit('onLoadFun', this.userInfo);
|
mp_is_new: this.$Cache.get('MP_VERSION_ISNEW') || false,
|
||||||
},
|
editModal: false, // 编辑头像信息
|
||||||
isShowAuth(n) {
|
}
|
||||||
this.getCode(this.isShowAuth)
|
},
|
||||||
}
|
computed: {
|
||||||
},
|
...mapGetters(['isLogin', 'userInfo', 'viewColor']),
|
||||||
created() {
|
...configMap(['routine_logo'])
|
||||||
// console.log('title' + this.title)
|
},
|
||||||
this.top = uni.getSystemInfoSync().windowHeight / 2 - 70
|
watch: {
|
||||||
if (wx.getUserProfile) {
|
isLogin(n) {
|
||||||
this.canUseGetUserProfile = true
|
n === true && this.$emit('onLoadFun', this.userInfo);
|
||||||
}
|
},
|
||||||
this.setAuthStatus();
|
isShowAuth(n) {
|
||||||
this.getCode(this.isShowAuth)
|
this.getCode(this.isShowAuth)
|
||||||
},
|
}
|
||||||
methods: {
|
},
|
||||||
// #ifdef MP
|
created() {
|
||||||
editSuccess() {
|
// console.log('title' + this.title)
|
||||||
this.editModal = false
|
this.top = uni.getSystemInfoSync().windowHeight / 2 - 70
|
||||||
this.$emit('onLoadFun', this.userInfo);
|
if (wx.getUserProfile) {
|
||||||
},
|
this.canUseGetUserProfile = true
|
||||||
closeEdit() {
|
}
|
||||||
this.editModal = false
|
this.setAuthStatus();
|
||||||
},
|
this.getCode(this.isShowAuth)
|
||||||
// #endif
|
},
|
||||||
setAuthStatus() {
|
methods: {
|
||||||
//#ifdef MP
|
// #ifdef MP
|
||||||
Routine.authorize().then(res => {
|
editSuccess() {
|
||||||
if (res.islogin === false)
|
this.editModal = false
|
||||||
this.$emit('onLoadFun', this.userInfo);
|
this.$emit('onLoadFun', this.userInfo);
|
||||||
}).catch(res => {
|
},
|
||||||
if (this.isAuto)
|
closeEdit() {
|
||||||
this.$emit('authColse', true);
|
this.editModal = false
|
||||||
})
|
},
|
||||||
//#endif
|
// #endif
|
||||||
},
|
setAuthStatus() {
|
||||||
getCode(n) {
|
//#ifdef MP
|
||||||
// #ifdef MP
|
Routine.authorize().then(res => {
|
||||||
if (n) {
|
if (res.islogin === false)
|
||||||
uni.showLoading({
|
this.$emit('onLoadFun', this.userInfo);
|
||||||
title: '正在登录中'
|
}).catch(res => {
|
||||||
});
|
if (this.isAuto)
|
||||||
Routine.getCode().then(code => {
|
this.$emit('authColse', true);
|
||||||
uni.hideLoading();
|
})
|
||||||
this.code = code;
|
//#endif
|
||||||
}).catch(e => {
|
},
|
||||||
uni.hideLoading();
|
getCode(n) {
|
||||||
uni.showToast({
|
// #ifdef MP
|
||||||
title: '登录失败',
|
if (n) {
|
||||||
duration: 2000
|
uni.showLoading({
|
||||||
});
|
title: '正在登录中'
|
||||||
})
|
});
|
||||||
} else {
|
Routine.getCode().then(code => {
|
||||||
this.code = null;
|
uni.hideLoading();
|
||||||
}
|
this.code = code;
|
||||||
// #endif
|
}).catch(e => {
|
||||||
// #ifndef MP
|
uni.hideLoading();
|
||||||
if (n) {
|
uni.showToast({
|
||||||
this.code = 1;
|
title: '登录失败',
|
||||||
}
|
duration: 2000
|
||||||
// #endif
|
});
|
||||||
},
|
})
|
||||||
toWecahtAuth() {
|
} else {
|
||||||
toLogin(true);
|
this.code = null;
|
||||||
},
|
}
|
||||||
getUserProfile() {
|
// #endif
|
||||||
// console.log(11);
|
// #ifndef MP
|
||||||
toLogin(true);
|
if (n) {
|
||||||
uni.navigateTo({
|
this.code = 1;
|
||||||
url: '/pages/users/login/login_copy'
|
}
|
||||||
})
|
// #endif
|
||||||
// console.log(22);
|
},
|
||||||
return
|
toWecahtAuth() {
|
||||||
let self = this;
|
toLogin(true);
|
||||||
Routine.getUserProfile()
|
},
|
||||||
.then(res => {
|
getUserProfile() {
|
||||||
let userInfo = res.userInfo;
|
// console.log(11);
|
||||||
userInfo.code = this.code;
|
toLogin(true);
|
||||||
userInfo.spread = app.globalData.spid; //获取推广人ID
|
uni.navigateTo({
|
||||||
userInfo.spread_code = app.globalData.code; //获取推广人分享二维码ID
|
url: '/pages/users/login/login_copy'
|
||||||
commonAuth({
|
})
|
||||||
auth: {
|
// console.log(22);
|
||||||
type: 'routine',
|
return
|
||||||
auth: userInfo
|
let self = this;
|
||||||
}
|
Routine.getUserProfile()
|
||||||
}).then(res => {
|
.then(res => {
|
||||||
if (res.data.status == 200) {
|
let userInfo = res.userInfo;
|
||||||
let time = res.data.result.expires_time - Cache.time();
|
userInfo.code = this.code;
|
||||||
self.$store.commit('UPDATE_USERINFO', res.data.result.user);
|
userInfo.spread = app.globalData.spid; //获取推广人ID
|
||||||
self.$store.commit('LOGIN', { token: res.data.result.token, time: time });
|
userInfo.spread_code = app.globalData.code; //获取推广人分享二维码ID
|
||||||
self.$store.commit('SETUID', res.data.result.user.uid);
|
commonAuth({
|
||||||
Cache.set(EXPIRES_TIME, res.data.result.expires_time, time);
|
auth: {
|
||||||
Cache.set(USER_INFO, res.data.result.user, time);
|
type: 'routine',
|
||||||
this.$emit('onLoadFun', res.data.result.user);
|
auth: userInfo
|
||||||
if (res.data.result.user.isNew && this.mp_is_new) {
|
}
|
||||||
this.editModal = true;
|
}).then(res => {
|
||||||
}
|
if (res.data.status == 200) {
|
||||||
} else {
|
let time = res.data.result.expires_time - Cache.time();
|
||||||
uni.setStorageSync('auth_token', res.data.result.key);
|
self.$store.commit('UPDATE_USERINFO', res.data.result.user);
|
||||||
return uni.navigateTo({
|
self.$store.commit('LOGIN', {
|
||||||
url: '/pages/users/login/login_copy'
|
token: res.data.result.token,
|
||||||
})
|
time: time
|
||||||
}
|
});
|
||||||
}).catch(res => {
|
self.$store.commit('SETUID', res.data.result.user.uid);
|
||||||
uni.hideLoading();
|
Cache.set(EXPIRES_TIME, res.data.result.expires_time, time);
|
||||||
uni.showToast({
|
Cache.set(USER_INFO, res.data.result.user, time);
|
||||||
title: res.message,
|
this.$emit('onLoadFun', res.data.result.user);
|
||||||
icon: 'none',
|
if (res.data.result.user.isNew && this.mp_is_new) {
|
||||||
duration: 2000,
|
this.editModal = true;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
uni.setStorageSync('auth_token', res.data.result.key);
|
||||||
|
return uni.navigateTo({
|
||||||
|
url: '/pages/users/login/login_copy'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}).catch(res => {
|
||||||
|
uni.hideLoading();
|
||||||
|
uni.showToast({
|
||||||
|
title: res.message,
|
||||||
|
icon: 'none',
|
||||||
|
duration: 2000,
|
||||||
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
.catch(res => {
|
.catch(res => {
|
||||||
uni.hideLoading();
|
uni.hideLoading();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
close() {
|
close() {
|
||||||
let pages = getCurrentPages(),
|
let pages = getCurrentPages(),
|
||||||
currPage = pages[pages.length - 1];
|
currPage = pages[pages.length - 1];
|
||||||
this.$emit('authColse', false);
|
this.$emit('authColse', false);
|
||||||
if (this.isGoIndex) {
|
if (this.isGoIndex) {
|
||||||
uni.switchTab({
|
uni.switchTab({
|
||||||
url: '/pages/index/index'
|
url: '/pages/index/index'
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
this.$emit('authColse', false);
|
this.$emit('authColse', false);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang='scss'>
|
<style scoped lang='scss'>
|
||||||
.Popup {
|
.Popup {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
width: 500rpx;
|
width: 500rpx;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
position: fixed;
|
position: fixed;
|
||||||
top: 500rpx;
|
top: 500rpx;
|
||||||
left: 125rpx;
|
left: 125rpx;
|
||||||
z-index: 1000;
|
z-index: 1000;
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
.Popup {
|
.Popup {
|
||||||
.logo-auth {
|
.logo-auth {
|
||||||
z-index: -1;
|
z-index: -1;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: 50%;
|
left: 50%;
|
||||||
top: 0%;
|
top: 0%;
|
||||||
transform: translate(-50%, -50%);
|
transform: translate(-50%, -50%);
|
||||||
width: 150rpx;
|
width: 150rpx;
|
||||||
height: 150rpx;
|
height: 150rpx;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
border: 8rpx solid #fff;
|
border: 8rpx solid #fff;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
background: #fff;
|
background: #fff;
|
||||||
}
|
}
|
||||||
|
|
||||||
.image {
|
.image {
|
||||||
height: 42rpx;
|
height: 42rpx;
|
||||||
margin-top: -54rpx;
|
margin-top: -54rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.Popup .title {
|
.Popup .title {
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
color: #000;
|
color: #000;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
margin-top: 30rpx;
|
margin-top: 30rpx;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
width: 500rpx;
|
width: 500rpx;
|
||||||
display: flex;
|
display: flex;
|
||||||
}
|
}
|
||||||
|
|
||||||
.Popup .tip {
|
.Popup .tip {
|
||||||
font-size: 22rpx;
|
font-size: 22rpx;
|
||||||
color: #555;
|
color: #555;
|
||||||
padding: 0 24rpx;
|
padding: 0 24rpx;
|
||||||
margin-top: 25rpx;
|
margin-top: 25rpx;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.Popup .bottom .item {
|
.Popup .bottom .item {
|
||||||
width: 250rpx;
|
width: 250rpx;
|
||||||
height: 80rpx;
|
height: 80rpx;
|
||||||
background-color: #eeeeee;
|
background-color: #eeeeee;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
line-height: 80rpx;
|
line-height: 80rpx;
|
||||||
margin-top: 54rpx;
|
margin-top: 54rpx;
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
color: #666;
|
color: #666;
|
||||||
|
|
||||||
.text {
|
.text {
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
color: #666;
|
color: #666;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.Popup .bottom .item.on {
|
.Popup .bottom .item.on {
|
||||||
width: 500rpx;
|
width: 500rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.flex {
|
.flex {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
}
|
}
|
||||||
|
|
||||||
.Popup .bottom .item.grant {
|
.Popup .bottom .item.grant {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
background-color: #E93323;
|
background-color: #E93323;
|
||||||
/* background-color: var(--view-theme); */
|
/* background-color: var(--view-theme); */
|
||||||
border-radius: 0;
|
border-radius: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
|
|
||||||
.text {
|
.text {
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.mask {
|
.mask {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
top: 0;
|
top: 0;
|
||||||
right: 0;
|
right: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
background-color: rgba(0, 0, 0, 0.65);
|
background-color: rgba(0, 0, 0, 0.65);
|
||||||
z-index: 99;
|
z-index: 99;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
@ -18,28 +18,33 @@
|
|||||||
<view class="price">¥<text>{{item.spu && item.spu.price}}</text></view>
|
<view class="price">¥<text>{{item.spu && item.spu.price}}</text></view>
|
||||||
<view class="buy-btn">立即购买</view>
|
<view class="buy-btn">立即购买</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class='mask' style="height: 100vh;" catchtouchmove="true" :hidden='popup.show==false' @tap="closePopup">
|
||||||
</view>
|
</view>
|
||||||
<view class='mask' catchtouchmove="true" :hidden='popup.show==false' @tap="closePopup"></view>
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { goShopDetail } from '@/libs/order.js'
|
import {
|
||||||
import { mapGetters } from "vuex";
|
goShopDetail
|
||||||
|
} from '@/libs/order.js'
|
||||||
|
import {
|
||||||
|
mapGetters
|
||||||
|
} from "vuex";
|
||||||
export default {
|
export default {
|
||||||
computed:{
|
computed: {
|
||||||
...mapGetters(['viewColor']),
|
...mapGetters(['viewColor']),
|
||||||
},
|
},
|
||||||
props:{
|
props: {
|
||||||
list: {
|
list: {
|
||||||
type: Array,
|
type: Array,
|
||||||
default: []
|
default: []
|
||||||
@ -50,9 +55,9 @@
|
|||||||
isHome: {
|
isHome: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false
|
default: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
popup: {
|
popup: {
|
||||||
show: false
|
show: false
|
||||||
@ -63,11 +68,12 @@
|
|||||||
// 点击关闭按钮
|
// 点击关闭按钮
|
||||||
closePopup() {
|
closePopup() {
|
||||||
this.$set(this.popup, 'show', false);
|
this.$set(this.popup, 'show', false);
|
||||||
|
this.$emit("closes")
|
||||||
},
|
},
|
||||||
showPopup() {
|
showPopup() {
|
||||||
this.$set(this.popup, 'show', true);
|
this.$set(this.popup, 'show', true);
|
||||||
},
|
},
|
||||||
goDetail(item){
|
goDetail(item) {
|
||||||
if (item.product_type === 1) {
|
if (item.product_type === 1) {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: `/pages/activity/goods_seckill_details/index?id=${item.product_id}&time=${item.stop_time}&spid=${this.uid}`
|
url: `/pages/activity/goods_seckill_details/index?id=${item.product_id}&time=${item.stop_time}&spid=${this.uid}`
|
||||||
@ -79,130 +85,150 @@
|
|||||||
} else if (item.product_type === 0) {
|
} else if (item.product_type === 0) {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: `/pages/goods_details/index?id=${item.product_id}&spid=${this.uid}`
|
url: `/pages/goods_details/index?id=${item.product_id}&spid=${this.uid}`
|
||||||
})
|
})
|
||||||
}else if (item.product_type === 4) {
|
} else if (item.product_type === 4) {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: `/pages/activity/combination_details/index?id=${item.activity_id}&spid=${this.uid}`
|
url: `/pages/activity/combination_details/index?id=${item.activity_id}&spid=${this.uid}`
|
||||||
})
|
})
|
||||||
}else if (item.product_type === 40) {
|
} else if (item.product_type === 40) {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: `/pages/activity/combination_status/index?id=${item.activity_id}&spid=${this.uid}`
|
url: `/pages/activity/combination_status/index?id=${item.activity_id}&spid=${this.uid}`
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.container{
|
.container {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
left: 0;
|
left: 0;
|
||||||
background-color: #ffffff;
|
background-color: #ffffff;
|
||||||
z-index: 77;
|
z-index: 77;
|
||||||
border-radius: 16rpx 16rpx 0 0;
|
border-radius: 16rpx 16rpx 0 0;
|
||||||
transform: translate3d(0, 100%, 0);
|
transform: translate3d(0, 100%, 0);
|
||||||
transition: all .3s cubic-bezier(.25, .5, .5, .9);
|
transition: all .3s cubic-bezier(.25, .5, .5, .9);
|
||||||
max-height: 1000rpx;
|
max-height: 1000rpx;
|
||||||
&.on {
|
|
||||||
transform: translate3d(0, 0, 0);
|
&.on {
|
||||||
}
|
transform: translate3d(0, 0, 0);
|
||||||
.header{
|
|
||||||
position: relative;
|
|
||||||
padding: 40rpx 30rpx;
|
|
||||||
.title{
|
|
||||||
color: #282828;
|
|
||||||
font-size: 30rpx;
|
|
||||||
}
|
}
|
||||||
.iconfont{
|
|
||||||
color: #8A8A8A;
|
.header {
|
||||||
font-size: 28rpx;
|
position: relative;
|
||||||
position: absolute;
|
padding: 40rpx 30rpx;
|
||||||
top: 0;
|
|
||||||
right: 0;
|
.title {
|
||||||
}
|
color: #282828;
|
||||||
.icon-guanbi5 {
|
font-size: 30rpx;
|
||||||
right: 20rpx;
|
}
|
||||||
color: #8a8a8a;
|
|
||||||
font-size: 30rpx;
|
.iconfont {
|
||||||
line-height: 30rpx;
|
color: #8A8A8A;
|
||||||
top: 20rpx;
|
font-size: 28rpx;
|
||||||
background-color: transparent;
|
position: absolute;
|
||||||
font-weight: normal;
|
top: 0;
|
||||||
}
|
right: 0;
|
||||||
}
|
}
|
||||||
scroll-view{
|
|
||||||
max-height: 800rpx;
|
.icon-guanbi5 {
|
||||||
}
|
right: 20rpx;
|
||||||
.main_count{
|
color: #8a8a8a;
|
||||||
padding: 0 30rpx 30rpx;
|
font-size: 30rpx;
|
||||||
max-height: 800rpx;
|
line-height: 30rpx;
|
||||||
overflow-y: scroll;
|
top: 20rpx;
|
||||||
/* #ifndef MP */
|
background-color: transparent;
|
||||||
&.mb90{
|
font-weight: normal;
|
||||||
margin-bottom: 90rpx;
|
|
||||||
}
|
|
||||||
/* #endif */
|
|
||||||
.list{
|
|
||||||
margin-bottom: 40rpx;
|
|
||||||
height: auto;
|
|
||||||
flex-direction: row;
|
|
||||||
&:last-child{
|
|
||||||
margin-bottom: 0;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.pro_list{
|
|
||||||
display: flex;
|
scroll-view {
|
||||||
flex-direction: row;
|
max-height: 800rpx;
|
||||||
.picture,.image,uni-image{
|
}
|
||||||
width: 200rpx;
|
|
||||||
height: 200rpx;
|
.main_count {
|
||||||
border-radius: 16rpx;
|
padding: 0 30rpx 30rpx;
|
||||||
|
max-height: 800rpx;
|
||||||
|
overflow-y: scroll;
|
||||||
|
|
||||||
|
/* #ifndef MP */
|
||||||
|
&.mb90 {
|
||||||
|
margin-bottom: 90rpx;
|
||||||
}
|
}
|
||||||
.info{
|
|
||||||
margin-left: 30rpx;
|
/* #endif */
|
||||||
position: relative;
|
.list {
|
||||||
.bottom{
|
margin-bottom: 40rpx;
|
||||||
display: flex;
|
height: auto;
|
||||||
justify-content: space-between;
|
flex-direction: row;
|
||||||
align-items: center;
|
|
||||||
width: 460rpx;
|
&:last-child {
|
||||||
position: absolute;
|
margin-bottom: 0;
|
||||||
left: 0;
|
|
||||||
bottom: 10rpx;
|
|
||||||
flex-direction: row;
|
|
||||||
}
|
}
|
||||||
.name{
|
}
|
||||||
color: #282828;
|
|
||||||
font-size: 30rpx;
|
.pro_list {
|
||||||
line-height: 45rpx;
|
display: flex;
|
||||||
display: -webkit-box;
|
flex-direction: row;
|
||||||
width: 460rpx;
|
|
||||||
|
.picture,
|
||||||
|
.image,
|
||||||
|
uni-image {
|
||||||
|
width: 200rpx;
|
||||||
|
height: 200rpx;
|
||||||
|
border-radius: 16rpx;
|
||||||
}
|
}
|
||||||
.price{
|
|
||||||
color: var(--view-priceColor);
|
.info {
|
||||||
font-size: 26rpx;
|
margin-left: 30rpx;
|
||||||
font-weight: bold;
|
position: relative;
|
||||||
flex-direction: row;
|
|
||||||
align-items: flex-end;
|
.bottom {
|
||||||
text{
|
display: flex;
|
||||||
font-size: 34rpx;
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
width: 460rpx;
|
||||||
|
position: absolute;
|
||||||
|
left: 0;
|
||||||
|
bottom: 10rpx;
|
||||||
|
flex-direction: row;
|
||||||
|
}
|
||||||
|
|
||||||
|
.name {
|
||||||
|
color: #282828;
|
||||||
|
font-size: 30rpx;
|
||||||
|
line-height: 45rpx;
|
||||||
|
display: -webkit-box;
|
||||||
|
width: 460rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.price {
|
||||||
|
color: var(--view-priceColor);
|
||||||
|
font-size: 26rpx;
|
||||||
|
font-weight: bold;
|
||||||
|
flex-direction: row;
|
||||||
|
align-items: flex-end;
|
||||||
|
|
||||||
|
text {
|
||||||
|
font-size: 34rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.buy-btn {
|
||||||
|
color: #fff;
|
||||||
|
background: var(--view-theme);
|
||||||
|
border-radius: 28.04rpx 28.04rpx 28.04rpx 28.04rpx;
|
||||||
|
width: 154.21rpx;
|
||||||
|
height: 57.83rpx;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
font-size: 22rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.buy-btn{
|
|
||||||
color: #fff;
|
|
||||||
background: var(--view-theme);
|
|
||||||
border-radius: 26rpx;
|
|
||||||
width: 140rpx;
|
|
||||||
height: 48rpx;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
font-size: 22rpx;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
</style>
|
||||||
</style>
|
|
@ -1,8 +1,8 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class='product-bg'>
|
<view class='product-bg'>
|
||||||
<swiper :indicator-dots="indicatorDots" indicator-active-color="#e93323" :circular="circular"
|
<swiper :indicator-dots="indicatorDots" indicator-active-color="#e93323" :circular="circular"
|
||||||
:interval="interval" :duration="duration">
|
:interval="interval" :duration="duration">
|
||||||
|
|
||||||
<block v-for="(item,index) in imgUrls" :key='index'>
|
<block v-for="(item,index) in imgUrls" :key='index'>
|
||||||
<swiper-item>
|
<swiper-item>
|
||||||
<image :src="item" class="slide-image" mode="aspectFit" />
|
<image :src="item" class="slide-image" mode="aspectFit" />
|
||||||
@ -12,7 +12,7 @@
|
|||||||
</swiper-item>
|
</swiper-item>
|
||||||
</block>
|
</block>
|
||||||
</swiper>
|
</swiper>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -56,8 +56,7 @@
|
|||||||
videoContext: ''
|
videoContext: ''
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {},
|
||||||
},
|
|
||||||
watch: {
|
watch: {
|
||||||
|
|
||||||
},
|
},
|
||||||
@ -83,7 +82,7 @@
|
|||||||
// #ifdef APP-PLUS
|
// #ifdef APP-PLUS
|
||||||
this.isPlay = false
|
this.isPlay = false
|
||||||
this.videoContext = uni.createVideoContext('myVideo', this);
|
this.videoContext = uni.createVideoContext('myVideo', this);
|
||||||
this.$nextTick(()=>{
|
this.$nextTick(() => {
|
||||||
this.videoContext.play();
|
this.videoContext.play();
|
||||||
})
|
})
|
||||||
// #endif
|
// #endif
|
||||||
@ -102,13 +101,15 @@
|
|||||||
height: 710rpx;
|
height: 710rpx;
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
.product-bg swiper {
|
.product-bg swiper {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
.product-bg .slide-image {
|
.product-bg .slide-image {
|
||||||
width: 100%;
|
width: 100vw;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
border-radius: 16rpx;
|
border-radius: 16rpx;
|
||||||
}
|
}
|
||||||
@ -166,4 +167,4 @@
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
@ -142,10 +142,12 @@
|
|||||||
this.$emit('change', e)
|
this.$emit('change', e)
|
||||||
this.street = e.value[1].name
|
this.street = e.value[1].name
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$bus.$emit('value-updated',e.value[1].name + ',' +e.value[1].code);
|
this.$bus.$emit('value-updated', e.value[1].name + ',' + e.value[1].code);
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
changeHandler(e) {
|
changeHandler(e) {
|
||||||
const {
|
const {
|
||||||
|
353
components/zbpSwiperb.vue
Normal file
353
components/zbpSwiperb.vue
Normal file
@ -0,0 +1,353 @@
|
|||||||
|
<template>
|
||||||
|
<view class="zbp-head-wrapper">
|
||||||
|
<view class="color-lump"></view>
|
||||||
|
<view class="bg-img">
|
||||||
|
<img :src="bgColor" alt="">
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="site-box flex_a_c_j_sb" style="padding-top: var(--status-bar-height)">
|
||||||
|
|
||||||
|
<view class="place_wrapper flex_a_c" @click="selectLocation">
|
||||||
|
<view class="iconfont icon-weizhi"></view>
|
||||||
|
<view class="town_name">{{street}}</view>
|
||||||
|
</view>
|
||||||
|
<view class="" style="display: flex;">
|
||||||
|
<navigator url="/pages/chat/customer_list/index?type=0" hover-class="none">
|
||||||
|
<view class="iconfont icon-xiaoxi" style="color:#fff;margin-right: 20rpx;"></view>
|
||||||
|
</navigator>
|
||||||
|
<navigator url="/pages/columnGoods/goods_search/index" hover-class="none">
|
||||||
|
<view class="iconfont icon-sousuo" style="font-size: 39rpx;color: white;"></view>
|
||||||
|
</navigator>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
<!-- 搜索栏 -->
|
||||||
|
<!-- <navigator url="/pages/columnGoods/goods_search/index" hover-class="none" class="search_content flex_a_c_j_sb">
|
||||||
|
<view class="flex_a_c">
|
||||||
|
<view class="iconfont icon-sousuo" style="font-size: 39rpx;"></view>
|
||||||
|
<input type="text" v-model="keyword" placeholder="搜索产品或店铺" placeholder-style="font-size: 30rpx;"
|
||||||
|
disabled>
|
||||||
|
</view>
|
||||||
|
<button class="search_btn">搜索</button>
|
||||||
|
</navigator> -->
|
||||||
|
<!-- 轮播图 -->
|
||||||
|
<view class="supply_chains-head">
|
||||||
|
<swiper class="swiper " @change="swiperChange" :indicator-dots="swiper.indicatorDots"
|
||||||
|
:autoplay="swiper.autoplay" :interval="swiper.interval" :duration="swiper.duration"
|
||||||
|
indicator-active-color="#fff">
|
||||||
|
<block v-for="(item,index) in swiper['url']" :key="index">
|
||||||
|
<swiper-item class="swi_item" @click="swiperClick(item)">
|
||||||
|
<!-- <u--image :showLoading="true" :src="item.img" width="750rpx" height="259rpx" mode="aspectFit">
|
||||||
|
</u--image> -->
|
||||||
|
<u--image :showLoading="true" :src="item.img" width="750rpx" height="600rpx">
|
||||||
|
</u--image>
|
||||||
|
</swiper-item>
|
||||||
|
</block>
|
||||||
|
</swiper>
|
||||||
|
</view>
|
||||||
|
<u-picker :defaultIndex="defaInd" :show="showPicker" ref="uPicker" :columns="columnData" @confirm="confirm"
|
||||||
|
@cancel="showPicker = false" @change="changeHandler" keyName="name"></u-picker>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import {
|
||||||
|
getArea,
|
||||||
|
getStreet
|
||||||
|
} from '@/api/article.js';
|
||||||
|
import {
|
||||||
|
getIndexData,
|
||||||
|
getDiy
|
||||||
|
} from '@/api/api.js'
|
||||||
|
import {
|
||||||
|
getGeocoder
|
||||||
|
} from '@/api/store.js';
|
||||||
|
import {
|
||||||
|
mapGetters
|
||||||
|
} from 'vuex'
|
||||||
|
import {
|
||||||
|
Toast
|
||||||
|
} from '../libs/uniApi';
|
||||||
|
import Cache from '@/utils/cache';
|
||||||
|
export default {
|
||||||
|
props: {
|
||||||
|
isSelectPlace: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
|
location_Arr: {
|
||||||
|
type: Object,
|
||||||
|
default: () => ({})
|
||||||
|
},
|
||||||
|
town: {
|
||||||
|
type: String,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
|
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
defaInd: [0, 0],
|
||||||
|
street: '',
|
||||||
|
|
||||||
|
showPicker: false,
|
||||||
|
styleConfig: [],
|
||||||
|
columnData: [],
|
||||||
|
homeCombData: [],
|
||||||
|
keyword: '',
|
||||||
|
bgColor: '',
|
||||||
|
swiper: {
|
||||||
|
url: [{
|
||||||
|
img: ''
|
||||||
|
}],
|
||||||
|
indicatorDots: true, // 显示面板指示点
|
||||||
|
vertical: false, // 滑动方向是否为纵向
|
||||||
|
autoplay: true, // 是否自动切换
|
||||||
|
interval: 2000, // 自动切换时间间隔
|
||||||
|
duration: 400 // 滑动动画时长
|
||||||
|
},
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
street(nval, val) {
|
||||||
|
this.street = nval
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
created() {
|
||||||
|
|
||||||
|
this.getBanner()
|
||||||
|
this.Area()
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
mounted() {
|
||||||
|
this.$bus.$on('value-updated', (newValue) => {
|
||||||
|
// 更新组件的值
|
||||||
|
this.street = newValue.split(',')[0]
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
methods: {
|
||||||
|
swiperClick(item) {
|
||||||
|
const url = item.info[1].value
|
||||||
|
uni.navigateTo({
|
||||||
|
url: url
|
||||||
|
})
|
||||||
|
},
|
||||||
|
selectLocation() {
|
||||||
|
this.isSelectPlace ? this.showPicker = true : ''
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
confirm(e) {
|
||||||
|
|
||||||
|
this.showPicker = false
|
||||||
|
this.$emit('selectPlce', e)
|
||||||
|
this.$emit('change', e)
|
||||||
|
this.street = e.value[1].name
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$bus.$emit('value-updated', e.value[1].name + ',' + e.value[1].code);
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
},
|
||||||
|
changeHandler(e) {
|
||||||
|
const {
|
||||||
|
columnIndex,
|
||||||
|
value,
|
||||||
|
values,
|
||||||
|
index,
|
||||||
|
picker = this.$refs.uPicker
|
||||||
|
} = e;
|
||||||
|
if (columnIndex === 0) {
|
||||||
|
getStreet({
|
||||||
|
area_code: value[0]['code']
|
||||||
|
}).then(res => {
|
||||||
|
picker.setColumnValues(1, res.data);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
Area() {
|
||||||
|
getArea({
|
||||||
|
city_code: 510500
|
||||||
|
}).then(res => {
|
||||||
|
this.$refs.uPicker.setColumnValues(0, res.data);
|
||||||
|
this.Street(res.data[0]['code']);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
Street(code) {
|
||||||
|
getStreet({
|
||||||
|
area_code: code
|
||||||
|
}).then(res => {
|
||||||
|
this.$refs.uPicker.setColumnValues(1, res.data);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
swiperChange(e) {
|
||||||
|
let {
|
||||||
|
current,
|
||||||
|
source
|
||||||
|
} = e.detail;
|
||||||
|
if (source === 'autoplay' || source === 'touch') {
|
||||||
|
this.bgColor = this.swiper.url[e.detail.current]['img']
|
||||||
|
this.$emit('kkchange', this.bgColor)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
// 对象转数组
|
||||||
|
objToArr(data) {
|
||||||
|
let obj = Object.keys(data).sort();
|
||||||
|
let m = obj.map(key => data[key]);
|
||||||
|
return m;
|
||||||
|
},
|
||||||
|
async getBanner(id) {
|
||||||
|
let that = this;
|
||||||
|
const {
|
||||||
|
data
|
||||||
|
} = await getDiy({
|
||||||
|
id: 0
|
||||||
|
})
|
||||||
|
that.styleConfig = that.objToArr(data.value);
|
||||||
|
/* 循环数组得到数据*/
|
||||||
|
that.styleConfig.forEach((item, index, arr) => {
|
||||||
|
if (item.name == 'headerSerch' || item.name == 'homeComb') {
|
||||||
|
if (item.name == 'homeComb') {
|
||||||
|
that.swiper.url = item.swiperConfig.list
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
this.bgColor = this.swiper.url[0].img
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.zbp-head-wrapper {
|
||||||
|
position: relative;
|
||||||
|
// padding-top: 78.95rpx;
|
||||||
|
overflow: hidden;
|
||||||
|
// background-color: green;
|
||||||
|
height: 600rpx;
|
||||||
|
|
||||||
|
// .color-lump {
|
||||||
|
// z-index: 1;
|
||||||
|
// position: absolute;
|
||||||
|
// bottom: -86px;
|
||||||
|
// left: 50%;
|
||||||
|
// transform: translate(-50%, 0);
|
||||||
|
// width: 102%;
|
||||||
|
// height: 133px;
|
||||||
|
// border-radius: 30px 30px 0 0;
|
||||||
|
// background-color: #fff;
|
||||||
|
// }
|
||||||
|
|
||||||
|
.bg-img {
|
||||||
|
position: absolute;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
top: 0;
|
||||||
|
/* #ifdef MP || APP-PLUS */
|
||||||
|
z-index: -1;
|
||||||
|
/* #endif */
|
||||||
|
/* #ifdef H5 */
|
||||||
|
z-index: 0;
|
||||||
|
/* #endif */
|
||||||
|
z-index: 0;
|
||||||
|
filter: blur(0);
|
||||||
|
overflow: hidden;
|
||||||
|
|
||||||
|
img {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
filter: blur(30rpx);
|
||||||
|
transform: scale(1.5);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.site-box {
|
||||||
|
margin: 0 auto;
|
||||||
|
width: 750rpx;
|
||||||
|
height: 66.67rpx;
|
||||||
|
margin-top: 30rpx;
|
||||||
|
// margin-bottom: 26.32rpx;
|
||||||
|
position: absolute;
|
||||||
|
z-index: 9999;
|
||||||
|
padding-right: 20rpx;
|
||||||
|
|
||||||
|
|
||||||
|
// 位置
|
||||||
|
.place_wrapper {
|
||||||
|
margin-left: 20rpx;
|
||||||
|
color: #fff;
|
||||||
|
margin-right: 24.56rpx;
|
||||||
|
font-size: 30rpx;
|
||||||
|
|
||||||
|
.town_name {
|
||||||
|
margin-left: 21rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.iconfont {
|
||||||
|
font-size: 35.09rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.my-main {
|
||||||
|
transition: background-color .5s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.search_content {
|
||||||
|
margin: 0 auto;
|
||||||
|
width: 724rpx;
|
||||||
|
height: 74rpx;
|
||||||
|
padding: 2px 2px 2px 21.05rpx;
|
||||||
|
border-radius: 175rpx;
|
||||||
|
background: #fff;
|
||||||
|
margin-bottom: 21rpx;
|
||||||
|
position: relative;
|
||||||
|
box-sizing: border-box;
|
||||||
|
|
||||||
|
.icon-sousuo {
|
||||||
|
font-size: 26.32rpx;
|
||||||
|
font-weight: bold;
|
||||||
|
color: #c8c7c6;
|
||||||
|
margin-right: 17.54rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.search_btn {
|
||||||
|
color: #fff;
|
||||||
|
width: 105.26rpx;
|
||||||
|
height: 52.63rpx;
|
||||||
|
line-height: 52.63rpx;
|
||||||
|
background: #f84221;
|
||||||
|
border-radius: 100px;
|
||||||
|
font-size: 28.07rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.supply_chains-head {
|
||||||
|
// margin-bottom: 17.54rpx;
|
||||||
|
position: relative;
|
||||||
|
z-index: 2;
|
||||||
|
|
||||||
|
.swiper {
|
||||||
|
width: 750rpx;
|
||||||
|
height: 600rpx;
|
||||||
|
margin: 0 auto;
|
||||||
|
// border-radius: 20rpx 20rpx 20rpx 20rpx;
|
||||||
|
overflow: hidden;
|
||||||
|
|
||||||
|
.swi_item {
|
||||||
|
width: 750rpx;
|
||||||
|
height: 600rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
@ -252,9 +252,7 @@
|
|||||||
mounted() {
|
mounted() {
|
||||||
this.getUserInfo()
|
this.getUserInfo()
|
||||||
|
|
||||||
uni.onNetworkStatusChange((res) => {
|
|
||||||
console.log(res, res.networkType)
|
|
||||||
});
|
|
||||||
this.selfLocation()
|
this.selfLocation()
|
||||||
// #ifdef H5
|
// #ifdef H5
|
||||||
// 监听页面滚动事件
|
// 监听页面滚动事件
|
||||||
|
@ -177,7 +177,6 @@
|
|||||||
height="400.09rpx"></u--image>
|
height="400.09rpx"></u--image>
|
||||||
<view class="" style="text-align: center;">
|
<view class="" style="text-align: center;">
|
||||||
暂无商品
|
暂无商品
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -244,17 +243,84 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="empty" style="" v-else>
|
<view class="empty" style="" v-else>
|
||||||
<view style="height: var(--status-bar-height);"></view>
|
<view style="height: var(--status-bar-height);"></view>
|
||||||
|
<view style="padding: 10rpx;">
|
||||||
|
<u--image :showLoading="true" src="/static/images/LHYC/PFH.png" width="50.82rpx" height="50.82rpx"
|
||||||
|
@click='goBack'></u--image>
|
||||||
|
</view>
|
||||||
<view class="info">
|
<view class="info">
|
||||||
|
|
||||||
<u--image :showLoading="true" src="/static/images/noCart.png" width="400.09rpx"
|
<u--image :showLoading="true" src="/static/images/noCart.png" width="400.09rpx"
|
||||||
height="400.09rpx"></u--image>
|
height="400.09rpx"></u--image>
|
||||||
<view class="" style="text-align: center;">
|
<view class="" style="text-align: center;">
|
||||||
暂无商家
|
当前区域暂无云仓
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</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 class="" :style="`height:${appInfo.bottom}px;background-color:white`">
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -266,7 +332,7 @@
|
|||||||
import {
|
import {
|
||||||
cloudWarehouse,
|
cloudWarehouse,
|
||||||
getCityCloundShop
|
getCityCloundShop
|
||||||
} from '@/api/api.js'
|
} from '@/api/requesta.js'
|
||||||
import {
|
import {
|
||||||
Toast
|
Toast
|
||||||
} from '@/libs/uniApi';
|
} from '@/libs/uniApi';
|
||||||
@ -284,17 +350,26 @@
|
|||||||
import {
|
import {
|
||||||
postCartAdd,
|
postCartAdd,
|
||||||
} from '@/api/store.js';
|
} from '@/api/store.js';
|
||||||
|
import authorize from '@/components/Authorize';
|
||||||
|
import {
|
||||||
|
mapGetters
|
||||||
|
} from "vuex";
|
||||||
export default {
|
export default {
|
||||||
|
components: {
|
||||||
|
authorize,
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
let src = 'https://lihai001.oss-cn-chengdu.aliyuncs.com/public/kk/luzhou/static4/13';
|
let src = 'https://lihai001.oss-cn-chengdu.aliyuncs.com/public/kk/luzhou/static4/13';
|
||||||
return {
|
return {
|
||||||
|
skuNumber: 0,
|
||||||
|
showcartpop: false,
|
||||||
trnList: [],
|
trnList: [],
|
||||||
act_cart: false,
|
act_cart: false,
|
||||||
appInfo: {},
|
appInfo: {},
|
||||||
pocls: "",
|
pocls: "",
|
||||||
type: "",
|
type: "",
|
||||||
act_swiper: "",
|
act_swiper: "",
|
||||||
current: 1,
|
current: 3,
|
||||||
goodsNum: 0,
|
goodsNum: 0,
|
||||||
goodsList: [],
|
goodsList: [],
|
||||||
isEmpty: false,
|
isEmpty: false,
|
||||||
@ -315,6 +390,7 @@
|
|||||||
page_num: 1,
|
page_num: 1,
|
||||||
act_img: "",
|
act_img: "",
|
||||||
cartTagInfo: {},
|
cartTagInfo: {},
|
||||||
|
isAuto: false,
|
||||||
actList: [{
|
actList: [{
|
||||||
tit: '综合',
|
tit: '综合',
|
||||||
act: "",
|
act: "",
|
||||||
@ -331,11 +407,16 @@
|
|||||||
}],
|
}],
|
||||||
status: "loadmore",
|
status: "loadmore",
|
||||||
flag: false,
|
flag: false,
|
||||||
|
isShowAuth: false, //是否隐藏授权
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
computed: {
|
||||||
|
...mapGetters(['isLogin', 'viewColor', 'uid']),
|
||||||
|
},
|
||||||
|
// ...mapGetters(['isLogin', 'viewColor', 'uid']),
|
||||||
onLoad(e) {
|
onLoad(e) {
|
||||||
this.cartFn()
|
// this.cartFn()
|
||||||
this.appInfo = this.$appInfo.safeAreaInsets
|
this.appInfo = this.$appInfo.safeAreaInsets
|
||||||
this.winHeight = this.$appInfo.windowHeight
|
this.winHeight = this.$appInfo.windowHeight
|
||||||
this.street_code = e.street
|
this.street_code = e.street
|
||||||
@ -346,6 +427,7 @@
|
|||||||
onShow() {
|
onShow() {
|
||||||
this.cartFn()
|
this.cartFn()
|
||||||
},
|
},
|
||||||
|
|
||||||
// 分页
|
// 分页
|
||||||
onReachBottom() {
|
onReachBottom() {
|
||||||
if (this.flag || !this.goodsList.length) return
|
if (this.flag || !this.goodsList.length) return
|
||||||
@ -364,6 +446,12 @@
|
|||||||
if (res.data.list[0].product_id == this.goodsList[0].product_id) {
|
if (res.data.list[0].product_id == this.goodsList[0].product_id) {
|
||||||
this.status = "nomore"
|
this.status = "nomore"
|
||||||
this.flag = false
|
this.flag = false
|
||||||
|
} else {
|
||||||
|
if (res.data.list.length == 0) {
|
||||||
|
this.status = "nomore"
|
||||||
|
return
|
||||||
|
}
|
||||||
|
this.goodsList = this.goodsList.concat(res.data.list)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
// this.getList().then(res => {
|
// this.getList().then(res => {
|
||||||
@ -427,6 +515,23 @@
|
|||||||
|
|
||||||
// },
|
// },
|
||||||
methods: {
|
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) {
|
clickSwiperFn(i) {
|
||||||
// console.log(i)
|
// console.log(i)
|
||||||
this.current = i
|
this.current = i
|
||||||
@ -521,6 +626,14 @@
|
|||||||
|
|
||||||
},
|
},
|
||||||
addcart(item, i) {
|
addcart(item, i) {
|
||||||
|
// this.showcartpop = true
|
||||||
|
// return
|
||||||
|
// console.log(this.isLogin)
|
||||||
|
if (!this.isLogin) {
|
||||||
|
this.isAuto = true;
|
||||||
|
this.isShowAuth = true
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
let data = {
|
let data = {
|
||||||
cart_num: 1,
|
cart_num: 1,
|
||||||
@ -628,6 +741,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 {
|
.flags {
|
||||||
background-color: red;
|
background-color: red;
|
||||||
z-index: 99999999;
|
z-index: 99999999;
|
||||||
@ -951,7 +1097,7 @@
|
|||||||
|
|
||||||
.card {
|
.card {
|
||||||
width: 720rpx;
|
width: 720rpx;
|
||||||
z-index: 999999;
|
z-index: 99;
|
||||||
// margin:auto;
|
// margin:auto;
|
||||||
left: 50%;
|
left: 50%;
|
||||||
transform: translateX(-50%);
|
transform: translateX(-50%);
|
||||||
|
@ -37,7 +37,7 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="content">
|
<view class="content">
|
||||||
<view style="background-color: red;height: 10px">
|
<view style="background-color: red;height: 10px">
|
||||||
asdasd
|
|
||||||
</view>
|
</view>
|
||||||
<view class="hot_serch">
|
<view class="hot_serch">
|
||||||
<text>热搜:</text> <text @click="hotSerchFn('小张副食')">小张副食</text> <text
|
<text>热搜:</text> <text @click="hotSerchFn('小张副食')">小张副食</text> <text
|
||||||
@ -283,8 +283,10 @@
|
|||||||
import {
|
import {
|
||||||
storeMerchantList,
|
storeMerchantList,
|
||||||
getGeocoder,
|
getGeocoder,
|
||||||
supMenuApi
|
|
||||||
} from '@/api/store.js';
|
} from '@/api/store.js';
|
||||||
|
import {
|
||||||
|
supMenuApi
|
||||||
|
} from '@/api/requesta.js';
|
||||||
import recommend from './component/recommend';
|
import recommend from './component/recommend';
|
||||||
import rightSlider from './component/rightSlider';
|
import rightSlider from './component/rightSlider';
|
||||||
import {
|
import {
|
||||||
|
@ -274,9 +274,12 @@
|
|||||||
import {
|
import {
|
||||||
storeMerchantList,
|
storeMerchantList,
|
||||||
getGeocoder,
|
getGeocoder,
|
||||||
supMenuApi,
|
|
||||||
supAgoodsApi
|
supAgoodsApi
|
||||||
} from '@/api/store.js';
|
} from '@/api/store.js';
|
||||||
|
import {
|
||||||
|
supMenuApi,
|
||||||
|
} from '@/api/requesta.js';
|
||||||
import recommend from './component/recommend';
|
import recommend from './component/recommend';
|
||||||
import rightSlider from './component/rightSlider';
|
import rightSlider from './component/rightSlider';
|
||||||
import {
|
import {
|
||||||
|
@ -3,8 +3,8 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<view v-if="followDetail != null && followDetail" class="main" @click.stop="showManage = false"
|
<view v-if="followDetail != null && followDetail" class="main" :class="{off_scoll:flag}"
|
||||||
style="padding-top: var(--status-bar-height);;">
|
@click.stop="showManage = false" style="padding-top: var(--status-bar-height);;">
|
||||||
<view v-if="followDetail.status != 1" class="approval_status">
|
<view v-if="followDetail.status != 1" class="approval_status">
|
||||||
<view class="status_count" :class="followDetail.status == 0 ? 'status1' : 'status0'">
|
<view class="status_count" :class="followDetail.status == 0 ? 'status1' : 'status0'">
|
||||||
<view class="status_title">
|
<view class="status_title">
|
||||||
@ -202,7 +202,8 @@
|
|||||||
<text>暂无评论,快去抢沙发吧~</text>
|
<text>暂无评论,快去抢沙发吧~</text>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view v-if="followDetail.status == 1 && followDetail.relevance.length<=0" class="release_bar acea-row">
|
<view v-if="followDetail.status == 1 && followDetail.relevance.length<=0"
|
||||||
|
class="release_bar acea-row">
|
||||||
<view class="input_count" :class="{input_reply:content}">
|
<view class="input_count" :class="{input_reply:content}">
|
||||||
<form @submit="submitComment">
|
<form @submit="submitComment">
|
||||||
<input type="text" :placeholder="placeholder"
|
<input type="text" :placeholder="placeholder"
|
||||||
@ -220,21 +221,22 @@
|
|||||||
:class="followDetail.relevance_id ? 'icon-shoucang1' : 'icon-dianzan'"></text>
|
:class="followDetail.relevance_id ? 'icon-shoucang1' : 'icon-dianzan'"></text>
|
||||||
<text>{{followDetail.count_start}}</text>
|
<text>{{followDetail.count_start}}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="item acea-row" @click="FToggle">
|
<view class="item acea-row" @click="FToggle">
|
||||||
<text class="iconfont icon-pinglun"></text>
|
<text class="iconfont icon-pinglun"></text>
|
||||||
<text>{{replyData.all}}</text>
|
<text>{{replyData.all}}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view v-if="followDetail.status == 1&& followDetail.relevance.length>0" class="release_bar acea-row">
|
<view v-if="followDetail.status == 1&& followDetail.relevance.length>0"
|
||||||
|
class="release_bar acea-row">
|
||||||
|
|
||||||
<view class="shopp" @click="openMore(followDetail)" style="margin-top: 10rpx">
|
<view class="shopp" @click="openMore(followDetail)" style="margin-top: 10rpx">
|
||||||
<view class="shopp-img">
|
<view class="shopp-img">
|
||||||
<image src="@/static/images/shopp.png" mode=""></image>
|
<image src="@/static/images/shopp.png" mode=""></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="shopp-txt">
|
<view class="shopp-txt">
|
||||||
商品 (2)
|
商品 ({{followDetail.relevance.length}})
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
@ -265,8 +267,8 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- 他提到的宝贝弹窗 -->
|
<!-- 他提到的宝贝弹窗 -->
|
||||||
<mentioned ref="mentioned" v-if="followDetail" @close="close" :list="followDetail.relevance"
|
<mentioned ref="mentioned" v-if="followDetail" @close="close" @closes="flag=false"
|
||||||
:uid="followDetail.uid"></mentioned>
|
:list="followDetail.relevance" :uid="followDetail.uid"></mentioned>
|
||||||
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize>
|
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize>
|
||||||
<!-- 绑定手机号 -->
|
<!-- 绑定手机号 -->
|
||||||
<uni-popup ref="bindmobile" type="bottom">
|
<uni-popup ref="bindmobile" type="bottom">
|
||||||
@ -275,10 +277,15 @@
|
|||||||
|
|
||||||
<uni-popup ref="bindmobile1" type="bottom">
|
<uni-popup ref="bindmobile1" type="bottom">
|
||||||
<view class="" style="background-color: #fff;height: 154rpx ;">
|
<view class="" style="background-color: #fff;height: 154rpx ;">
|
||||||
<view class="input_count1" :class="{input_reply:content}" >
|
<view class="input_count1" :class="{input_reply:content}">
|
||||||
<form @submit="submitComment">
|
<form @submit="submitComment">
|
||||||
<input type="text" class="count1" :placeholder="placeholder" placeholder-style="color: #999999; font-size: 26rpx;"
|
<view class="" style="display: flex;padding: 0 20rpx;box-sizing: border-box;">
|
||||||
v-model="content" :focus="focus" @confirm.stop="submitComment()" cursorSpacing={20}>
|
<input type="text" class="count1" :placeholder="placeholder"
|
||||||
|
placeholder-style="color: #999999; font-size: 26rpx;" v-model="content" :focus="focus"
|
||||||
|
@confirm.stop="submitComment()" cursorSpacing={20}>
|
||||||
|
<button class="send1" @click.stop="submitComment">发送</button>
|
||||||
|
</view>
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -336,6 +343,7 @@
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
flag: false,
|
||||||
open_grass: openPlantGrass,
|
open_grass: openPlantGrass,
|
||||||
followDetail: null,
|
followDetail: null,
|
||||||
commList: [], //评论列表
|
commList: [], //评论列表
|
||||||
@ -400,7 +408,7 @@
|
|||||||
},
|
},
|
||||||
FToggle() {
|
FToggle() {
|
||||||
this.$refs.bindmobile1.open()
|
this.$refs.bindmobile1.open()
|
||||||
|
|
||||||
},
|
},
|
||||||
// 后退
|
// 后退
|
||||||
returns() {
|
returns() {
|
||||||
@ -712,10 +720,12 @@
|
|||||||
/*查看提到的宝贝*/
|
/*查看提到的宝贝*/
|
||||||
openMore(item) {
|
openMore(item) {
|
||||||
this.$refs.mentioned.showPopup()
|
this.$refs.mentioned.showPopup()
|
||||||
|
this.flag = true
|
||||||
},
|
},
|
||||||
close() {
|
close() {
|
||||||
this.$refs.mentioned.closePopup()
|
this.$refs.mentioned.closePopup()
|
||||||
this.$refs.bindmobile.close()
|
this.$refs.bindmobile.close()
|
||||||
|
this.flag = false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onReachBottom() {
|
onReachBottom() {
|
||||||
@ -1280,28 +1290,30 @@
|
|||||||
font-size: 32rpx;
|
font-size: 32rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.input_count1{
|
|
||||||
|
.input_count1 {
|
||||||
height: 70rpx;
|
|
||||||
padding-top: 15rpx;
|
|
||||||
|
|
||||||
|
|
||||||
/deep/.count1{
|
|
||||||
padding-left: 20rpx;
|
|
||||||
width: 617rpx;
|
|
||||||
height: 70rpx;
|
height: 70rpx;
|
||||||
background: #F4F4F4;
|
padding-top: 15rpx;
|
||||||
margin: 0 auto;
|
|
||||||
|
|
||||||
border-radius: 35px 35px 35px 35px;
|
/deep/.count1 {
|
||||||
|
padding-left: 20rpx;
|
||||||
|
width: 617rpx;
|
||||||
|
height: 70rpx;
|
||||||
|
background: #F4F4F4;
|
||||||
|
margin: 0 auto;
|
||||||
|
|
||||||
|
border-radius: 35px 35px 35px 35px;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
|
||||||
.release_bar {
|
.release_bar {
|
||||||
align-items: center;
|
align-items: center;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
background: #ffffff;
|
background: #ffffff;
|
||||||
|
|
||||||
padding: 15rpx 20rpx;
|
padding: 15rpx 20rpx;
|
||||||
position: fixed;
|
position: fixed;
|
||||||
left: 0;
|
left: 0;
|
||||||
@ -1403,4 +1415,24 @@
|
|||||||
font-size: 26rpx;
|
font-size: 26rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.send1 {
|
||||||
|
font-size: 26rpx;
|
||||||
|
color: #ffffff;
|
||||||
|
// padding: 12rpx 45rpx;
|
||||||
|
background-image: linear-gradient(126deg, var(--view-bntColor21) 0%, var(--view-bntColor22) 100%);
|
||||||
|
border-radius: 30rpx;
|
||||||
|
text-align: center;
|
||||||
|
width: 150rpx;
|
||||||
|
line-height: 70rpx;
|
||||||
|
margin-left: 20rpx;
|
||||||
|
|
||||||
|
// height: ;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 禁止滚动
|
||||||
|
.off_scoll {
|
||||||
|
height: 100vh;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
@ -102,6 +102,19 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="item">
|
||||||
|
<view class="uni-list">
|
||||||
|
<view class="uni-list-cell">
|
||||||
|
<view class="uni-list-cell-db acea-row row-middle">
|
||||||
|
<text class="item-name businessBox">社会信用代码</text>
|
||||||
|
<input type="text" maxlength="30" placeholder="请输入社会信用代码"
|
||||||
|
v-model="merchantData.social_credit_code" @input="validateBtn"
|
||||||
|
placeholder-class='placeholder' />
|
||||||
|
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
<!-- <view class="item">
|
<!-- <view class="item">
|
||||||
<view class="acea-row row-middle">
|
<view class="acea-row row-middle">
|
||||||
<text class="item-name">是否农贸市场</text>
|
<text class="item-name">是否农贸市场</text>
|
||||||
@ -230,7 +243,8 @@
|
|||||||
enterprise_name: "",
|
enterprise_name: "",
|
||||||
user_name: "",
|
user_name: "",
|
||||||
phone: "",
|
phone: "",
|
||||||
classification: ''
|
classification: '',
|
||||||
|
social_credit_code: '',
|
||||||
},
|
},
|
||||||
validate: false,
|
validate: false,
|
||||||
successful: false,
|
successful: false,
|
||||||
@ -374,6 +388,7 @@
|
|||||||
this.merchantData.enterprise_name = resData.mer_name
|
this.merchantData.enterprise_name = resData.mer_name
|
||||||
this.merchantData.user_name = resData.name
|
this.merchantData.user_name = resData.name
|
||||||
this.merchantData.phone = resData.phone
|
this.merchantData.phone = resData.phone
|
||||||
|
this.merchantData.social_credit_code=resData.social_credit_code
|
||||||
this.merchantData.classification = resData.merchant_category_id
|
this.merchantData.classification = resData.merchant_category_id
|
||||||
this.merchantData.mer_type = resData.mer_type_id
|
this.merchantData.mer_type = resData.mer_type_id
|
||||||
this.area_id=resData.area_id
|
this.area_id=resData.area_id
|
||||||
@ -594,6 +609,7 @@
|
|||||||
mer_name: that.merchantData.enterprise_name,
|
mer_name: that.merchantData.enterprise_name,
|
||||||
name: that.merchantData.user_name,
|
name: that.merchantData.user_name,
|
||||||
code: that.merchantData.yanzhengma,
|
code: that.merchantData.yanzhengma,
|
||||||
|
social_credit_code: that.merchantData.social_credit_code,
|
||||||
merchant_category_id: that.merchantData.classification,
|
merchant_category_id: that.merchantData.classification,
|
||||||
mer_type_id: that.merchantData.mer_type,
|
mer_type_id: that.merchantData.mer_type,
|
||||||
mer_storeType:this.mer_storeType,
|
mer_storeType:this.mer_storeType,
|
||||||
@ -666,6 +682,9 @@
|
|||||||
if (!value.enterprise_name) return that.$util.Tips({
|
if (!value.enterprise_name) return that.$util.Tips({
|
||||||
title: '请输入企业名称'
|
title: '请输入企业名称'
|
||||||
});
|
});
|
||||||
|
if (!value.social_credit_code) return that.$util.Tips({
|
||||||
|
title: '请输入统一社会信用代码'
|
||||||
|
});
|
||||||
if (!value.user_name) return that.$util.Tips({
|
if (!value.user_name) return that.$util.Tips({
|
||||||
title: '请输入姓名'
|
title: '请输入姓名'
|
||||||
});
|
});
|
||||||
|
@ -319,6 +319,8 @@
|
|||||||
},
|
},
|
||||||
onLoad(options) {
|
onLoad(options) {
|
||||||
// uni.hideTabBar()
|
// uni.hideTabBar()
|
||||||
|
// console.log(this.isLogin, "sdfsdkfhjsdhgfsdf")
|
||||||
|
// return
|
||||||
this.id = options.id;
|
this.id = options.id;
|
||||||
this.type = options.gtype
|
this.type = options.gtype
|
||||||
|
|
||||||
@ -617,7 +619,7 @@
|
|||||||
this.formData.product_info = []
|
this.formData.product_info = []
|
||||||
}
|
}
|
||||||
this.productList = []
|
this.productList = []
|
||||||
this.price = 0;
|
this.price = 0;
|
||||||
if (data.length > 0) {
|
if (data.length > 0) {
|
||||||
this.productList = data;
|
this.productList = data;
|
||||||
for (let i in data) {
|
for (let i in data) {
|
||||||
|
@ -117,7 +117,7 @@ const actions = {
|
|||||||
} else {
|
} else {
|
||||||
apptype = 1
|
apptype = 1
|
||||||
}
|
}
|
||||||
|
console.log(os)
|
||||||
Appversion({
|
Appversion({
|
||||||
version: os.appWgtVersion,
|
version: os.appWgtVersion,
|
||||||
type: apptype
|
type: apptype
|
||||||
|
76
utils/requesta.js
Normal file
76
utils/requesta.js
Normal file
@ -0,0 +1,76 @@
|
|||||||
|
// +----------------------------------------------------------------------
|
||||||
|
// | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
|
||||||
|
// +----------------------------------------------------------------------
|
||||||
|
// | Copyright (c) 2016~2021 https://www.crmeb.com All rights reserved.
|
||||||
|
// +----------------------------------------------------------------------
|
||||||
|
// | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
|
||||||
|
// +----------------------------------------------------------------------
|
||||||
|
// | Author: CRMEB Team <admin@crmeb.com>
|
||||||
|
// +----------------------------------------------------------------------
|
||||||
|
import {
|
||||||
|
HTTP_REQUEST_URL,
|
||||||
|
HEADER,
|
||||||
|
TOKENNAME
|
||||||
|
} from '@/config/app';
|
||||||
|
import {
|
||||||
|
checkLogin
|
||||||
|
} from '../libs/login';
|
||||||
|
import store from '../store';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 发送请求
|
||||||
|
*/
|
||||||
|
function baseRequest(url, method, data, {
|
||||||
|
noAuth = false,
|
||||||
|
noVerify = false
|
||||||
|
}) {
|
||||||
|
let Url = HTTP_REQUEST_URL,
|
||||||
|
header = HEADER;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if (store.state.app.token) header[TOKENNAME] = 'Bearer ' + store.state.app.token;
|
||||||
|
|
||||||
|
return new Promise((reslove, reject) => {
|
||||||
|
uni.request({
|
||||||
|
url: Url + '/api/' + url,
|
||||||
|
method: method || 'GET',
|
||||||
|
header: header,
|
||||||
|
data: data || {},
|
||||||
|
success: (res) => {
|
||||||
|
// #ifdef APP-PLUS
|
||||||
|
// console.log('app', Url + '/api/' + url, res.data);
|
||||||
|
// #endif
|
||||||
|
if (noVerify)
|
||||||
|
reslove(res.data, res);
|
||||||
|
else if (res.data.status == 200)
|
||||||
|
reslove(res.data, res);
|
||||||
|
else if ([410000, 410001, 410002, 40000].indexOf(res.data.status) !== -1) {
|
||||||
|
|
||||||
|
reject(res.data);
|
||||||
|
} else if (res.data.status == 501) {
|
||||||
|
uni.reLaunch({
|
||||||
|
url: '/pages/error/index'
|
||||||
|
})
|
||||||
|
reject(res.data);
|
||||||
|
} else
|
||||||
|
reject(res.data.message || '系统错误');
|
||||||
|
},
|
||||||
|
fail: (message) => {
|
||||||
|
reject('请求失败');
|
||||||
|
}
|
||||||
|
})
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
const request = {};
|
||||||
|
|
||||||
|
['options', 'get', 'post', 'put', 'head', 'delete', 'trace', 'connect'].forEach((method) => {
|
||||||
|
request[method] = (api, data, opt) => baseRequest(api, method, data, opt || {})
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
export default request;
|
Loading…
x
Reference in New Issue
Block a user