本地添加达人
This commit is contained in:
parent
47ce5602e7
commit
57daf0f0f8
16
App.vue
16
App.vue
@ -259,12 +259,12 @@ body {
|
|||||||
|
|
||||||
transition-duration: 300ms;
|
transition-duration: 300ms;
|
||||||
}
|
}
|
||||||
uni-page-body,
|
// uni-page-body,
|
||||||
html,
|
// html,
|
||||||
body,
|
// body,
|
||||||
page {
|
// page {
|
||||||
width: 100% !important;
|
// width: 100% !important;
|
||||||
height: 100% !important;
|
// height: 100% !important;
|
||||||
overflow: hidden;
|
// overflow: hidden;
|
||||||
}
|
// }
|
||||||
</style>
|
</style>
|
||||||
|
11
api/home.js
11
api/home.js
@ -12,6 +12,17 @@ export function getAdvertisement() {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 像后端传递经纬度
|
||||||
|
*/
|
||||||
|
export function postAdvertisementjw(data) {
|
||||||
|
return http.request({
|
||||||
|
url: "/member/address/location",
|
||||||
|
method: Method.POST,
|
||||||
|
header: { "content-type": "application/x-www-form-urlencoded" },
|
||||||
|
data
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -13,7 +13,7 @@ import {http, Method} from '@/utils/request.js';
|
|||||||
*/
|
*/
|
||||||
export function getStoreList(params) {
|
export function getStoreList(params) {
|
||||||
return http.request({
|
return http.request({
|
||||||
url: '/store',
|
url: '/store/store',
|
||||||
method: Method.GET,
|
method: Method.GET,
|
||||||
params,
|
params,
|
||||||
});
|
});
|
||||||
|
@ -7,7 +7,7 @@ export default {
|
|||||||
shareLink: "https://m-b2b2c.pickmall.cn", //分享地址,也就是在h5中默认的复制地址
|
shareLink: "https://m-b2b2c.pickmall.cn", //分享地址,也就是在h5中默认的复制地址
|
||||||
appid: "wx6f10f29075dc1b0b", //小程序唯一凭证,即 AppID,可在「微信公众平台 - 设置 - 开发设置」页中获得。(需要已经成为开发者,且帐号没有异常状态)
|
appid: "wx6f10f29075dc1b0b", //小程序唯一凭证,即 AppID,可在「微信公众平台 - 设置 - 开发设置」页中获得。(需要已经成为开发者,且帐号没有异常状态)
|
||||||
appSecret: "6dfbe0c72380dce5d49d65b3c91059b1", //可在 manifest.json 查看
|
appSecret: "6dfbe0c72380dce5d49d65b3c91059b1", //可在 manifest.json 查看
|
||||||
aMapKey: "d649892b3937a5ad20b76dacb2bcb5bd", //在高德中申请web端key
|
aMapKey: "AOHBZ-VCEL3-XX73N-O623U-FMTP6-ASBTD", //在腾讯的中申请web端key
|
||||||
scanAuthNavigation:['https://m-b2b2c.pickmall.cn/'], //扫码认证跳转域名配置 会根据此处配置的路由进行跳转
|
scanAuthNavigation:['https://m-b2b2c.pickmall.cn/'], //扫码认证跳转域名配置 会根据此处配置的路由进行跳转
|
||||||
iosAppId:"id1564638363", //AppStore的应用地址id 具体在分享->拷贝链接中查看
|
iosAppId:"id1564638363", //AppStore的应用地址id 具体在分享->拷贝链接中查看
|
||||||
logo:"https://lilishop-oss.oss-cn-beijing.aliyuncs.com/4c864e133c2944efad1f7282ac8a3b9e.png", //logo地址
|
logo:"https://lilishop-oss.oss-cn-beijing.aliyuncs.com/4c864e133c2944efad1f7282ac8a3b9e.png", //logo地址
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
"navigationBarTitleText": "商城",
|
"navigationBarTitleText": "商城",
|
||||||
"navigationStyle": "custom", // 隐藏系统导航栏
|
"navigationStyle": "custom", // 隐藏系统导航栏
|
||||||
"navigationBarTextStyle": "black",
|
"navigationBarTextStyle": "black",
|
||||||
"enablePullDownRefresh":true
|
"enablePullDownRefresh": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -1084,7 +1084,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"pagePath": "pages/tabbar/home/index",
|
"pagePath": "pages/tabbar/home/index",
|
||||||
"text": "商城"
|
"text": "本地"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"pagePath": "pages/tabbar/im/index",
|
"pagePath": "pages/tabbar/im/index",
|
||||||
|
@ -63,6 +63,7 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
tostorePage(val) {
|
tostorePage(val) {
|
||||||
|
console.log(val);
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: "../product/shopPage?id=" + val.storeId,
|
url: "../product/shopPage?id=" + val.storeId,
|
||||||
});
|
});
|
||||||
|
@ -7,21 +7,22 @@
|
|||||||
<div class="wrapper" v-if="storeList.length!=0">
|
<div class="wrapper" v-if="storeList.length!=0">
|
||||||
<div class="store-item" @click="handleClickStore(item)" v-for="(item,index) in storeList" :key="index">
|
<div class="store-item" @click="handleClickStore(item)" v-for="(item,index) in storeList" :key="index">
|
||||||
<div>
|
<div>
|
||||||
<u-image shape="circle" width="100" height="100" :src="item.storeLogo">
|
<u-image shape="square" width="100" height="100" :src="item.storeLogo">
|
||||||
</u-image>
|
</u-image>
|
||||||
</div>
|
</div>
|
||||||
<div class="store-msg">
|
<div class="store-msg">
|
||||||
<div class="store-name">
|
<div class="store-name">
|
||||||
{{item.storeName}}
|
<div> {{item.storeName}}</div>
|
||||||
|
<div class="typeof" >{{item.selfOperated?'自营':'非自营'}}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="goods-num">
|
<div class="goods-num">
|
||||||
商品 {{item.goodsNum}}
|
商品 {{item.goodsNum}} <span class="line">|</span> <span class="store-collection">收藏 {{item.collectionNum}}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex store-distance">
|
<div class="flex store-distance">
|
||||||
<div>
|
<div>
|
||||||
<span class="store-score">{{item.serviceScore | unitPrice}}</span>
|
<template v-for="i in 5">
|
||||||
<span class="line">|</span>
|
<u-icon :name="i <= item.serviceScore ? 'star-fill' : 'star'" color="#FF0000" size="30"></u-icon>
|
||||||
<span class="store-collection">收藏 {{item.collectionNum}}</span>
|
</template>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -113,11 +114,19 @@ export default {
|
|||||||
padding: 24rpx;
|
padding: 24rpx;
|
||||||
}
|
}
|
||||||
.store-msg {
|
.store-msg {
|
||||||
|
width: 100%;
|
||||||
margin-left: 20rpx;
|
margin-left: 20rpx;
|
||||||
}
|
}
|
||||||
.store-name {
|
.store-name {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
font-size: 30rpx;
|
font-size: 35rpx;
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
.typeof{
|
||||||
|
border: 1px solid red;
|
||||||
|
color: red;
|
||||||
|
font-size: 30rpx;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.goods-num,
|
.goods-num,
|
||||||
.store-collection {
|
.store-collection {
|
||||||
|
@ -1,7 +1,9 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="wrapper">
|
<div class="wrapper">
|
||||||
<!-- 楼层装修组件 -->
|
<!-- 楼层装修组件 -->
|
||||||
<tpl ref="tpl" />
|
<!-- <div v-for="i in 200">{{i}}</div> -->
|
||||||
|
<tpl ref="tpl" />
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
@ -15,19 +17,20 @@ export default {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
onPullDownRefresh() {
|
|
||||||
this.$refs.tpl.init();
|
|
||||||
|
|
||||||
uni.stopPullDownRefresh();
|
|
||||||
},
|
|
||||||
components: {
|
components: {
|
||||||
tpl,
|
tpl,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
onPullDownRefresh() {
|
||||||
|
console.log("下拉刷新");
|
||||||
|
this.$refs.tpl.init();
|
||||||
|
uni.stopPullDownRefresh();
|
||||||
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.wrapper{
|
.wrapper{
|
||||||
height: 100%;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
103
pages/tabbar/home/template/Talent.vue
Normal file
103
pages/tabbar/home/template/Talent.vue
Normal file
@ -0,0 +1,103 @@
|
|||||||
|
<template>
|
||||||
|
<div class="layout">
|
||||||
|
<div class="con_view">
|
||||||
|
<div class="-item-tilte">
|
||||||
|
<img class="image-mode" style="height: 150px" :src="model.imgs" />
|
||||||
|
<span> {{ model.name }}</span>
|
||||||
|
</div>
|
||||||
|
<div class="sea" @click="clickSwiper">更多></div>
|
||||||
|
</div>
|
||||||
|
<!-- <div>自己代码编辑</div> -->
|
||||||
|
<div class="menu-list" style="overflow-x: auto; white-space: nowrap; scrollbar-width: none; -ms-overflow-style: none;">
|
||||||
|
<div class="menu-item" v-for="(item, index) in res.list" :key="index">
|
||||||
|
<div>
|
||||||
|
<img class="menu-img" :src="item.img" alt="" @click="tostorePage(item)" />
|
||||||
|
</div>
|
||||||
|
<!-- <div class="menu-title">{{ item.title }}</div> -->
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import { modelNavigateTo } from "./tpl";
|
||||||
|
export default {
|
||||||
|
title: "达人店",
|
||||||
|
props: ["res","model"],
|
||||||
|
watch: {
|
||||||
|
res: {
|
||||||
|
handler(newValue, oldValue) {
|
||||||
|
this.$set(this, "res", newValue);
|
||||||
|
},
|
||||||
|
deep: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
//跳转个人店铺
|
||||||
|
tostorePage(val) {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: "/pages/product/shopPage?id=" + val.url.id,
|
||||||
|
});
|
||||||
|
},
|
||||||
|
//跳转店铺
|
||||||
|
clickSwiper(index) {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: "/pages/product/shopList",
|
||||||
|
});
|
||||||
|
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
@import "./tpl.scss";
|
||||||
|
.carousel,
|
||||||
|
.image-mode {
|
||||||
|
width: 30px;
|
||||||
|
height: 30px !important;
|
||||||
|
}
|
||||||
|
.layout{
|
||||||
|
background: url('@/static/tanback.png') no-repeat;
|
||||||
|
background-size: 100% 100%;
|
||||||
|
}
|
||||||
|
.con_view {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
}
|
||||||
|
.-item-tilte {
|
||||||
|
display: flex;
|
||||||
|
& > span {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
padding: 10px;
|
||||||
|
font-weight: 800;
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.sea {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
padding: 10px;
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
.menu-list {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
// flex-wrap: wrap;
|
||||||
|
|
||||||
|
> .menu-item {
|
||||||
|
text-align: center;
|
||||||
|
width: 200px;
|
||||||
|
margin: 10px 10px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.menu-img {
|
||||||
|
width: 60px;
|
||||||
|
height: 60px;
|
||||||
|
}
|
||||||
|
.menu-title {
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
|
.menu-list::-webkit-scrollbar {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
</style>
|
20
pages/tabbar/home/template/tpl_activity.vue
Normal file
20
pages/tabbar/home/template/tpl_activity.vue
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
<template>
|
||||||
|
<div class="layout">
|
||||||
|
<img :src="res.list[0].img" alt="">
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
title: "活动",
|
||||||
|
props: ["res"],
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
@import "./tpl.scss";
|
||||||
|
.layout{
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
@ -1,38 +1,259 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="layout">
|
<div class="layout">
|
||||||
<div class="search" @click="handleSearch">
|
<div class="addres" @click="showPicker" style="white-space: nowrap; overflow: hidden; text-overflow: ellipsis;">
|
||||||
<u-icon name="search"></u-icon>
|
{{ cityOrCounty == "" ? "请选择" : cityOrCounty }}
|
||||||
{{ res.list[0].title }}
|
|
||||||
</div>
|
</div>
|
||||||
|
<div class="search">{{ res.list[0].title }}</div>
|
||||||
|
<div class="shop" @click="toshop"></div>
|
||||||
|
<m-city
|
||||||
|
:provinceData="list"
|
||||||
|
headTitle="区域选择"
|
||||||
|
ref="cityPicker"
|
||||||
|
@funcValue="getpickerParentValue"
|
||||||
|
pickerSize="3"
|
||||||
|
>
|
||||||
|
</m-city>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
|
import config from "@/config/config";
|
||||||
|
import { postAdvertisementjw } from "@/api/home.js";
|
||||||
|
import gkcity from "@/components/m-city/m-city.vue";
|
||||||
|
import { Icon } from "uview-ui";
|
||||||
export default {
|
export default {
|
||||||
title:"搜索栏",
|
components: {
|
||||||
|
"m-city": gkcity,
|
||||||
|
Icon,
|
||||||
|
},
|
||||||
|
title: "搜索栏",
|
||||||
props: ["res"],
|
props: ["res"],
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
location: null,
|
||||||
|
// 确保默认值正确读取
|
||||||
|
cityOrCounty: uni.getStorageSync("cityOrCounty") || "",
|
||||||
|
form: {},
|
||||||
|
list: [
|
||||||
|
{
|
||||||
|
id: "",
|
||||||
|
localName: "请选择",
|
||||||
|
children: [],
|
||||||
|
},
|
||||||
|
],
|
||||||
|
// 添加本地存储的经纬度
|
||||||
|
storedLat: uni.getStorageSync("latitude") || null,
|
||||||
|
storedLon: uni.getStorageSync("longitude") || null,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
// 页面加载时,若本地有存储数据就使用
|
||||||
|
if (this.storedLat && this.storedLon) {
|
||||||
|
this.form.lat = this.storedLat;
|
||||||
|
this.form.lon = this.storedLon;
|
||||||
|
this.getAdvertisementByLocation();
|
||||||
|
}
|
||||||
|
// 确保地区名称也被读取
|
||||||
|
this.cityOrCounty = uni.getStorageSync("cityOrCounty") || "";
|
||||||
|
// this.getLocation();
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
toshop() {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: "/pages/tabbar/cart/cartList",
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 三级地址联动回调
|
||||||
|
async getpickerParentValue(e) {
|
||||||
|
// 将需要绑定的地址设置为空,并赋值
|
||||||
|
this.form.consigneeAddressIdPath = [];
|
||||||
|
this.form.consigneeAddressPath = [];
|
||||||
|
let name = "";
|
||||||
|
|
||||||
|
e.forEach((item, index) => {
|
||||||
|
if (item.id) {
|
||||||
|
// 遍历数据
|
||||||
|
this.form.consigneeAddressIdPath.push(item.id);
|
||||||
|
this.form.consigneeAddressPath.push(item.localName);
|
||||||
|
name += item.localName;
|
||||||
|
this.form.___path = name;
|
||||||
|
}
|
||||||
|
if (index == e.length - 1) {
|
||||||
|
//如果是最后一个
|
||||||
|
let _town = item.children.filter((_child) => {
|
||||||
|
return _child.id == item.id;
|
||||||
|
});
|
||||||
|
|
||||||
|
this.form.lat = _town[0].center.split(",")[1];
|
||||||
|
this.form.lon = _town[0].center.split(",")[0];
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
const jwobj = {
|
||||||
|
longitude: Number(this.form.lon),
|
||||||
|
latitude: Number(this.form.lat),
|
||||||
|
};
|
||||||
|
|
||||||
|
const { data } = await postAdvertisementjw(jwobj);
|
||||||
|
if (data.success) {
|
||||||
|
// 确保保存的城市名称正确
|
||||||
|
this.cityOrCounty = this.form.consigneeAddressPath[2];
|
||||||
|
uni.setStorageSync("cityOrCounty", this.cityOrCounty);
|
||||||
|
// 存储经纬度
|
||||||
|
uni.setStorageSync("longitude", this.form.lon);
|
||||||
|
uni.setStorageSync("latitude", this.form.lat);
|
||||||
|
// 更新本地存储的经纬度
|
||||||
|
this.storedLat = this.form.lat;
|
||||||
|
this.storedLon = this.form.lon;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 根据经纬度获取广告信息
|
||||||
|
async getAdvertisementByLocation() {
|
||||||
|
const jwobj = {
|
||||||
|
longitude: Number(this.storedLon),
|
||||||
|
latitude: Number(this.storedLat),
|
||||||
|
};
|
||||||
|
const { data } = await postAdvertisementjw(jwobj);
|
||||||
|
if (data.success) {
|
||||||
|
// 更新页面内容
|
||||||
|
}
|
||||||
|
},
|
||||||
|
showPicker() {
|
||||||
|
this.$refs.cityPicker.show();
|
||||||
|
},
|
||||||
handleSearch() {
|
handleSearch() {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: "/pages/navigation/search/searchPage",
|
url: "/pages/navigation/search/searchPage",
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
// async getLocation() {
|
||||||
|
// const permision = await import("@/js_sdk/wa-permission/permission.js");
|
||||||
|
// // #ifdef APP-PLUS
|
||||||
|
// if (plus.os.name == "iOS") {
|
||||||
|
// if (permision.judgeIosPermissionLocation()) {
|
||||||
|
// this.getLocationInfo();
|
||||||
|
// } else {
|
||||||
|
// this.refuseLocation();
|
||||||
|
// }
|
||||||
|
// } else {
|
||||||
|
// const result = await permision.requestAndroidPermission(
|
||||||
|
// "android.permission.ACCESS_FINE_LOCATION"
|
||||||
|
// );
|
||||||
|
// if (result == 1) {
|
||||||
|
// this.getLocationInfo();
|
||||||
|
// } else {
|
||||||
|
// this.refuseLocation();
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// // #endif
|
||||||
|
// // #ifndef APP-PLUS
|
||||||
|
// this.getLocationInfo();
|
||||||
|
// // #endif
|
||||||
|
// },
|
||||||
|
// getLocationInfo() {
|
||||||
|
// uni.getLocation({
|
||||||
|
// type: "wgs84",
|
||||||
|
// success: async (resss) => {
|
||||||
|
// this.location = resss;
|
||||||
|
// console.log("当前位置:", resss);
|
||||||
|
// const jwobj = {
|
||||||
|
// latitude: resss.latitude,
|
||||||
|
// longitude: resss.longitude,
|
||||||
|
// };
|
||||||
|
// const { data } = await postAdvertisementjw(jwobj);
|
||||||
|
// if (data.success) {
|
||||||
|
// uni.request({
|
||||||
|
// url: `https://apis.map.qq.com/ws/geocoder/v1/?location=${resss.latitude},${resss.longitude}&key=${config.aMapKey}`,
|
||||||
|
// success: (res) => {
|
||||||
|
// console.log("腾讯地图API接口返回信息", res);
|
||||||
|
// this.cityOrCounty = res.data.result.address_component.district || res.data.result.address_component.city;
|
||||||
|
// uni.setStorageSync('cityOrCounty', this.cityOrCounty);
|
||||||
|
// // 存储经纬度
|
||||||
|
// uni.setStorageSync('longitude', resss.longitude);
|
||||||
|
// uni.setStorageSync('latitude', resss.latitude);
|
||||||
|
// // 更新本地存储的经纬度
|
||||||
|
// this.storedLat = resss.latitude;
|
||||||
|
// this.storedLon = resss.longitude;
|
||||||
|
// },
|
||||||
|
// fail: (error) => {
|
||||||
|
// uni.showToast({
|
||||||
|
// title: "获取位置信息失败222腾讯",
|
||||||
|
// icon: "none"
|
||||||
|
// });
|
||||||
|
// }
|
||||||
|
// });
|
||||||
|
// }
|
||||||
|
// },
|
||||||
|
// fail: (err) => {
|
||||||
|
// console.error("获取位置失败:", err);
|
||||||
|
// },
|
||||||
|
// });
|
||||||
|
// },
|
||||||
|
// refuseLocation() {
|
||||||
|
// uni.showModal({
|
||||||
|
// title: "温馨提示",
|
||||||
|
// content: "您已拒绝定位,请开启",
|
||||||
|
// confirmText: "去设置",
|
||||||
|
// success(res) {
|
||||||
|
// if (res.confirm) {
|
||||||
|
// //打开授权设置
|
||||||
|
// // #ifndef MP-WEIXIN
|
||||||
|
// uni.getSystemInfo({
|
||||||
|
// success(res) {
|
||||||
|
// if (res.platform == "ios") {
|
||||||
|
// //IOS
|
||||||
|
// plus.runtime.openURL("app-settings://");
|
||||||
|
// } else if (res.platform == "android") {
|
||||||
|
// //安卓
|
||||||
|
// let main = plus.android.runtimeMainActivity();
|
||||||
|
// let Intent = plus.android.importClass(
|
||||||
|
// "android.content.Intent"
|
||||||
|
// );
|
||||||
|
// let mIntent = new Intent("android.settings.ACTION_SETTINGS");
|
||||||
|
// main.startActivity(mIntent);
|
||||||
|
// }
|
||||||
|
// },
|
||||||
|
// });
|
||||||
|
// // #endif
|
||||||
|
// }
|
||||||
|
// },
|
||||||
|
// });
|
||||||
|
// },
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
@import "./tpl.scss";
|
@import "./tpl.scss";
|
||||||
|
|
||||||
.search {
|
.search {
|
||||||
height: 64rpx;
|
width: 68%;
|
||||||
border-radius: 10rpx;
|
height: 32px;
|
||||||
|
border-radius: 5px;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
background: #ededed;
|
background: #ededed;
|
||||||
}
|
}
|
||||||
|
|
||||||
.layout {
|
.layout {
|
||||||
background: #fff;
|
background: #fff;
|
||||||
padding: 0 16rpx;
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
}
|
||||||
|
.addres {
|
||||||
|
// width: 15%;
|
||||||
|
height: 32px;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
.layout {
|
||||||
|
background: #fff;
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
}
|
||||||
|
.shop {
|
||||||
|
width: 10%;
|
||||||
|
height: 32px;
|
||||||
|
display: flex;
|
||||||
|
background: url("@/static/shop.png") no-repeat;
|
||||||
|
background-size: 100% 100%;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -18,14 +18,17 @@
|
|||||||
<leftTwoRightOne v-if="item.type == 'leftTwoRightOne'" :res="item.options" />
|
<leftTwoRightOne v-if="item.type == 'leftTwoRightOne'" :res="item.options" />
|
||||||
<topOneBottomTwo v-if="item.type == 'topOneBottomTwo'" :res="item.options" />
|
<topOneBottomTwo v-if="item.type == 'topOneBottomTwo'" :res="item.options" />
|
||||||
<topTwoBottomOne v-if="item.type == 'topTwoBottomOne'" :res="item.options" />
|
<topTwoBottomOne v-if="item.type == 'topTwoBottomOne'" :res="item.options" />
|
||||||
<flexThree v-if="item.type == 'flexThree'" :res="item.options" />
|
|
||||||
|
|
||||||
|
<flexThree v-if="item.type == 'flexThree'" :res="item.options" />
|
||||||
<flexFive v-if="item.type == 'flexFive'" :res="item.options" />
|
<flexFive v-if="item.type == 'flexFive'" :res="item.options" />
|
||||||
<flexFour v-if="item.type == 'flexFour'" :res="item.options" />
|
<flexFour v-if="item.type == 'flexFour'" :res="item.options" />
|
||||||
<flexTwo v-if="item.type == 'flexTwo'" :res="item.options" />
|
<flexTwo v-if="item.type == 'flexTwo'" :res="item.options" />
|
||||||
<textPicture v-if="item.type == 'textPicture'" :res="item.options" />
|
<textPicture v-if="item.type == 'textPicture'" :res="item.options" />
|
||||||
<menuLayout v-if="item.type == 'menu'" :res="item.options" />
|
<menuLayout v-if="item.type == 'menu'" :res="item.options" />
|
||||||
<flexOne v-if="item.type == 'flexOne'" :res="item.options" />
|
<flexOne v-if="item.type == 'flexOne'" :res="item.options" />
|
||||||
|
<activity v-if="item.type == 'activity'" :res="item.options" />
|
||||||
|
<Talent v-if="item.type == 'talent'" :res="item.options" :model="item" />
|
||||||
<goods v-if="item.type == 'goods'" :res="item.options" />
|
<goods v-if="item.type == 'goods'" :res="item.options" />
|
||||||
|
|
||||||
<group v-if="item.type == 'group'" :res="item.options" />
|
<group v-if="item.type == 'group'" :res="item.options" />
|
||||||
@ -56,6 +59,8 @@ import tpl_menu from "@/pages/tabbar/home/template/tpl_menu"; //五列菜单模
|
|||||||
import tpl_search from "@/pages/tabbar/home/template/tpl_search"; //搜索栏
|
import tpl_search from "@/pages/tabbar/home/template/tpl_search"; //搜索栏
|
||||||
import tpl_group from "@/pages/tabbar/home/template/tpl_group"; //
|
import tpl_group from "@/pages/tabbar/home/template/tpl_group"; //
|
||||||
import tpl_goods from "@/pages/tabbar/home/template/tpl_goods"; //商品分类以及分类中的商品
|
import tpl_goods from "@/pages/tabbar/home/template/tpl_goods"; //商品分类以及分类中的商品
|
||||||
|
import Talent from "@/pages/tabbar/home/template/Talent"; //达人店
|
||||||
|
import tpl_activity from "@/pages/tabbar/home/template/tpl_activity"; //活动
|
||||||
// 结束引用组件
|
// 结束引用组件
|
||||||
import { getFloorData } from "@/api/home"; //获取楼层装修接口
|
import { getFloorData } from "@/api/home"; //获取楼层装修接口
|
||||||
import permision from "@/js_sdk/wa-permission/permission.js"; //权限工具类
|
import permision from "@/js_sdk/wa-permission/permission.js"; //权限工具类
|
||||||
@ -90,6 +95,8 @@ export default {
|
|||||||
flexOne: tpl_flex_one,
|
flexOne: tpl_flex_one,
|
||||||
goods: tpl_goods,
|
goods: tpl_goods,
|
||||||
group: tpl_group,
|
group: tpl_group,
|
||||||
|
Talent,
|
||||||
|
activity: tpl_activity,
|
||||||
// spike: tpl_spike,
|
// spike: tpl_spike,
|
||||||
// joinGroup: tpl_join_group,
|
// joinGroup: tpl_join_group,
|
||||||
// integral: tpl_integral,
|
// integral: tpl_integral,
|
||||||
@ -102,7 +109,7 @@ export default {
|
|||||||
uni.showShareMenu({ withShareTicket: true });
|
uni.showShareMenu({ withShareTicket: true });
|
||||||
// #endif
|
// #endif
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
/**
|
/**
|
||||||
* 实例化首页数据楼层
|
* 实例化首页数据楼层
|
||||||
@ -112,6 +119,7 @@ export default {
|
|||||||
getFloorData().then((res) => {
|
getFloorData().then((res) => {
|
||||||
if (res.data.success) {
|
if (res.data.success) {
|
||||||
this.pageData = JSON.parse(res.data.result.pageData);
|
this.pageData = JSON.parse(res.data.result.pageData);
|
||||||
|
console.log(this.pageData.list);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@ -128,7 +136,6 @@ export default {
|
|||||||
uni.scanCode({
|
uni.scanCode({
|
||||||
success: function (res) {
|
success: function (res) {
|
||||||
let path = encodeURIComponent(res.result);
|
let path = encodeURIComponent(res.result);
|
||||||
|
|
||||||
// WX_CODE 为小程序码
|
// WX_CODE 为小程序码
|
||||||
if (res.scanType == "WX_CODE") {
|
if (res.scanType == "WX_CODE") {
|
||||||
console.log(res)
|
console.log(res)
|
||||||
@ -208,14 +215,14 @@ export default {
|
|||||||
this.seacnCode();
|
this.seacnCode();
|
||||||
// #endif
|
// #endif
|
||||||
},
|
},
|
||||||
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
.wrapper{
|
.wrapper{
|
||||||
height: auto;
|
height: 100%;
|
||||||
overflow-y: auto; /* 当内容超出时显示垂直滚动条 */
|
|
||||||
}
|
}
|
||||||
.navbar-right {
|
.navbar-right {
|
||||||
padding: 0 16rpx 0 0;
|
padding: 0 16rpx 0 0;
|
||||||
|
BIN
static/shop.png
Normal file
BIN
static/shop.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.4 KiB |
BIN
static/tabbar/bei.png
Normal file
BIN
static/tabbar/bei.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 496 KiB |
BIN
static/tabbar/shop.png
Normal file
BIN
static/tabbar/shop.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.4 KiB |
BIN
static/tanback.png
Normal file
BIN
static/tanback.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 97 KiB |
Loading…
x
Reference in New Issue
Block a user