@ -1,6 +1,7 @@ |
|||
{ |
|||
"dependencies": { |
|||
"base-64": "^1.0.0", |
|||
"crypto-js": "^4.1.1" |
|||
"crypto-js": "^4.1.1", |
|||
"vuex": "^4.0.2" |
|||
} |
|||
} |
|||
|
|||
@ -0,0 +1,83 @@ |
|||
<template> |
|||
<view> |
|||
<view class="address_foot"> |
|||
<button @click="deleteuserinfo()">Delete account</button> |
|||
</view> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
import {defaultRequest} from '../../api/index.js' |
|||
export default { |
|||
data(){ |
|||
return { |
|||
delete:{ |
|||
_action:'unregistuser', |
|||
username:'', |
|||
password:'' |
|||
} |
|||
} |
|||
}, |
|||
methods:{ |
|||
getuserinfo(){ |
|||
let data={_action:'getinfo'} |
|||
defaultRequest(data).then(res =>{ |
|||
console.log(res) |
|||
}) |
|||
}, |
|||
deleteuserinfo(){ |
|||
|
|||
uni.showModal({ |
|||
title: 'Confirm Delet?', |
|||
content: 'All the data of the account will disappear, including the balance of money, historical orders, etc. will disappear', |
|||
cancelText: "cancel", // 取消按钮的文字 |
|||
confirmText: "confirm", // 确认按钮的文字 |
|||
showCancel: true, // 是否显示取消按钮,默认为 true |
|||
confirmColor: '#f55850', |
|||
cancelColor: '#39B54A', |
|||
success: (res) => { |
|||
if(res.confirm) { |
|||
console.log('comfirm') //点击确定之后执行的代码 |
|||
defaultRequest(this.delete).then(res =>{ |
|||
if(res.error == 0){ |
|||
uni.showToast({ |
|||
icon:'none', |
|||
title:'ok to delete!' |
|||
}) |
|||
} |
|||
}) |
|||
} else { |
|||
console.log('cancel') //点击取消之后执行的代码 |
|||
} |
|||
} |
|||
}) |
|||
|
|||
|
|||
} |
|||
}, |
|||
onShow() { |
|||
let user = uni.getStorageInfoSync('user_info') |
|||
console.log(user) |
|||
this.getuserinfo() |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss" scoped> |
|||
.address_foot{ |
|||
padding: 42rpx 24rpx; |
|||
|
|||
border-top: #E2E2E2 solid 1px; |
|||
position: fixed; |
|||
bottom: 0; |
|||
width: 100%; |
|||
box-sizing: border-box; |
|||
button{ |
|||
color: white; |
|||
background-color: #000000 !important; |
|||
font-size: 26.67rpx; |
|||
font-weight: bold; |
|||
margin: 0; |
|||
} |
|||
} |
|||
</style> |
|||
@ -0,0 +1,12 @@ |
|||
<template> |
|||
<view> |
|||
|
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
|
|||
</script> |
|||
|
|||
<style> |
|||
</style> |
|||
@ -0,0 +1,8 @@ |
|||
<template> |
|||
</template> |
|||
|
|||
<script> |
|||
</script> |
|||
|
|||
<style> |
|||
</style> |
|||
@ -0,0 +1,156 @@ |
|||
<template> |
|||
<view> |
|||
<view class="body"> |
|||
<view class="font"> |
|||
<uni-icons type="arrow-left" size="30" @click="back"></uni-icons> |
|||
<text style="margin-left: 30rpx;color: #0b0b0b;">Ship to</text> |
|||
</view> |
|||
<text class="color_b">Popular Countries/Regions</text> |
|||
<view class="address" v-for="(item2,index2) in popularlist" :key="item2.name" > |
|||
<text>{{ item2.name}}</text> |
|||
<radio class="Radio"v-model="item2.name" :checked="current==item2.name"@click="Active(item2,index2)"></radio> |
|||
</view> |
|||
<view v-for ="(item,index) in list " :key="index"> |
|||
<text class="color_red">{{ item.title}}</text> |
|||
<view class="address" v-for="(item1,index1) in item.sur_name" :key="item1.name" > |
|||
<text>{{ item1.name}}</text> |
|||
<radio class="Radio"v-model="item1.name" :checked="current==item1.name"@click="Active(item1,index1)"></radio> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
import {defaultRequest,defaultRequest2} from '../../api/index.js' |
|||
export default { |
|||
data() { |
|||
return { |
|||
citys:[], |
|||
current:'', |
|||
list:[], |
|||
popularlist:[ |
|||
{ |
|||
name:'India' |
|||
}, |
|||
{ |
|||
name:'United States of America' |
|||
}, |
|||
{ |
|||
name:'Turkey' |
|||
}, |
|||
{ |
|||
name:'United Kingdom' |
|||
}, |
|||
{ |
|||
name:'China' |
|||
}, |
|||
] |
|||
|
|||
|
|||
} |
|||
}, |
|||
async onLoad() { |
|||
await this.getaddress() |
|||
|
|||
}, |
|||
methods: { |
|||
getaddress(){ |
|||
let data ={ |
|||
_action:'getregions', |
|||
parent_region_id:0 |
|||
} |
|||
defaultRequest(data).then( res => { |
|||
console.log(res,'p') |
|||
if(res.error==0){ |
|||
this.citys = res.data |
|||
} |
|||
let citys =[] |
|||
for(let i of this.citys){ |
|||
citys.push({ |
|||
sort:i.region_name.substring(0, 1), |
|||
name:i.region_name |
|||
}) |
|||
} |
|||
var moth = [], |
|||
flag = 0, |
|||
list = citys; |
|||
var sortlist = { |
|||
title: '', |
|||
sur_name: '' |
|||
} |
|||
for (var i = 0; i < list.length; i++) { |
|||
var az = ''; |
|||
for (var j = 0; j < moth.length; j++) { |
|||
if (moth[j].title == list[i]['sort']) { |
|||
flag = 1; |
|||
az = j; |
|||
break; |
|||
} |
|||
} |
|||
if (flag == 1) { |
|||
var ab = moth[az]; |
|||
ab.sur_name.push(list[i]); |
|||
flag = 0; |
|||
|
|||
} else if (flag == 0) { |
|||
sortlist = {}; |
|||
sortlist.title = list[i]['sort']; |
|||
sortlist.sur_name = new Array(); |
|||
sortlist.sur_name.push(list[i]); |
|||
moth.push(sortlist); |
|||
} |
|||
} |
|||
this.list = moth |
|||
console.log(moth,'pppp'); |
|||
|
|||
}) |
|||
|
|||
}, |
|||
Active(item,index){ |
|||
this.current = item.name |
|||
console.log(item.name,'fff') |
|||
uni.setStorageSync('country',item.name) |
|||
uni.navigateTo({ |
|||
url:'../account/myProfile?address='+item.name |
|||
}) |
|||
}, |
|||
back() |
|||
{ |
|||
uni.navigateBack({ |
|||
delta:1 |
|||
}) |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style> |
|||
.body{ |
|||
margin: 80rpx 0 5rpx 5rpx; |
|||
background-color: #fff; |
|||
padding: 0 10rpx; |
|||
|
|||
} |
|||
.font{ |
|||
display: flex; |
|||
height: 50rpx; |
|||
line-height: 50rpx; |
|||
text-align: center; |
|||
margin: 30rpx 0; |
|||
font-size: 20px; |
|||
font-weight: bold; |
|||
} |
|||
.address{ |
|||
margin-top: 6rpx; |
|||
height: 20rpx; |
|||
align-items: center; |
|||
background-color: #fff; |
|||
} |
|||
.color_red{ |
|||
color: #ff5f15; |
|||
} |
|||
.color_b{ |
|||
color: #6b6b6b; |
|||
} |
|||
</style> |
|||
@ -0,0 +1,450 @@ |
|||
<template> |
|||
<view class="u-wrap"> |
|||
<view class="search"> |
|||
<view class="status_bar"></view> |
|||
<view class="search1"> |
|||
<navigator url="/pages/index/search"> |
|||
<view class="navigation_seach"> |
|||
<image src="../../static/img/seach.png" mode=""></image> |
|||
<text>search</text> |
|||
</view> |
|||
</navigator> |
|||
<view class="navigation_title_right"> |
|||
<navigator url="/pages/account/wishlist"> |
|||
<image src="../../static/img/like_white.png" mode=""></image> |
|||
</navigator> |
|||
<navigator url="/pages/shippingCart/index" open-type="switchTab"> |
|||
<uni-badge :text="sum" type="error" absolute="rightTop"> |
|||
<image src="../../static/img/shop_cart1.png" mode=""></image> |
|||
</uni-badge> |
|||
</navigator> |
|||
</view> |
|||
</view> |
|||
|
|||
</view> |
|||
<view class="u-menu-wrap"> |
|||
<scroll-view scroll-y scroll-with-animation class="u-tab-view menu-scroll-view category_left" :scroll-top="scrollTop" |
|||
:scroll-into-view="itemId"> |
|||
<view v-for="(item,index) in categoryList" :key="item.cat_name" class="u-tab-item" :class="[current == index ? 'u-tab-item-active' : '']" |
|||
@tap.stop="swichMenu(index)"> |
|||
<text class="u-line-1">{{item.cat_name}}</text> |
|||
</view> |
|||
</scroll-view> |
|||
<scroll-view :scroll-top="scrollRightTop" scroll-y scroll-with-animation class="right-box" @scroll="rightScroll"> |
|||
<view class="page-view"> |
|||
<view class="class-item" :id="'item' + index" v-for="(item , index) in categoryList" :key="item.cat_name"> |
|||
<view class="item-title"> |
|||
<text>{{item.cat_name}}</text> |
|||
</view> |
|||
<view class="good_content"> |
|||
<view class="good_item" v-for="(item1, index1) in item.subcategories" :key="index1"> |
|||
<view @click="toDetial(item1.first_goods_thumb)"> |
|||
<view class="good_item_img"><image :src="item1.first_goods_thumb" alt=""></view> |
|||
</view> |
|||
<text>{{item1.cat_name}}</text> |
|||
|
|||
</view> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
</scroll-view> |
|||
</view> |
|||
</view> |
|||
</template> |
|||
<script> |
|||
import {defaultRequest,defaultRequest4} from '../../api/index.js' |
|||
export default { |
|||
data() { |
|||
return { |
|||
scrollTop: 0, //tab标题的滚动条位置 |
|||
oldScrollTop: 0, |
|||
current: 0, // 预设当前项的值 |
|||
menuHeight: 0, // 左边菜单的高度 |
|||
menuItemHeight: 0, // 左边菜单item的高度 |
|||
itemId: '', // 栏目右边scroll-view用于滚动的id |
|||
tabbar: [], |
|||
menuItemPos: [], |
|||
arr: [], |
|||
scrollRightTop: 0, // 右边栏目scroll-view的滚动条高度 |
|||
timer: null, // 定时器 |
|||
categoryList:[], |
|||
sum:0, |
|||
|
|||
homeIndex: 0 |
|||
} |
|||
}, |
|||
onShow() { |
|||
this.sum =0 |
|||
this.getList() |
|||
this.getCartNum() |
|||
|
|||
uni.showTabBar() |
|||
}, |
|||
onLoad() { |
|||
this.getList() |
|||
this.getCartNum() |
|||
}, |
|||
onReady() { |
|||
this.getMenuItemTop() |
|||
}, |
|||
onBackPress(options) { |
|||
this.backButtonPress++; |
|||
if (this.backButtonPress > 1) { |
|||
plus.runtime.quit(); |
|||
} else { |
|||
plus.nativeUI.toast('Click again to exit'); |
|||
} |
|||
setTimeout(function() { |
|||
this.backButtonPress = 0; |
|||
}, 1000); |
|||
return true; |
|||
}, |
|||
|
|||
methods: { |
|||
|
|||
|
|||
// 点击左边的栏目切换 |
|||
async swichMenu(index) { |
|||
if(this.arr.length == 0) { |
|||
await this.getMenuItemTop(); |
|||
} |
|||
if ( this.current === index) return; |
|||
console.log(index,'现在的index') |
|||
// this.scrollRightTop = this.oldScrollTop; |
|||
this.scrollRightTop = this.arr[index]; |
|||
// this.$nextTick(function(){ |
|||
// this.scrollRightTop = this.arr[index]; |
|||
this.current = index; |
|||
// this.leftMenuStatus(index); |
|||
|
|||
// }) |
|||
}, |
|||
getCartNum(){ |
|||
let data={_action:'getcartgoods'} |
|||
defaultRequest(data).then(res=>{ |
|||
console.info(res) |
|||
if(res.error==0){ |
|||
this.sum = res.data.goods_list.length |
|||
console.log(this.sum,'////') |
|||
// uni.setStorageSync('cartSum',this.sum) |
|||
} |
|||
}) |
|||
}, |
|||
goPets(id,name){ |
|||
uni.navigateTo({ |
|||
url:"productList?typethree="+id+'&type=0'+'&title='+name |
|||
}) |
|||
}, |
|||
getList(){ |
|||
let data={_action:'getcategorytree'} |
|||
defaultRequest(data).then(res=>{ |
|||
console.info(res) |
|||
if(res.error==0){ |
|||
this.categoryList=res.data |
|||
console.log(res.data,'////') |
|||
this.categoryIndex=res.data[0].cat_id |
|||
} |
|||
}) |
|||
}, |
|||
// 获取一个目标元素的高度 |
|||
getElRect(elClass, dataVal) { |
|||
new Promise((resolve, reject) => { |
|||
const query = uni.createSelectorQuery().in(this); |
|||
query.select('.' + elClass).fields({ |
|||
size: true |
|||
}, res => { |
|||
// 如果节点尚未生成,res值为null,循环调用执行 |
|||
if (!res) { |
|||
setTimeout(() => { |
|||
this.getElRect(elClass); |
|||
}, 10); |
|||
return; |
|||
} |
|||
this[dataVal] = res.height; |
|||
resolve(); |
|||
}).exec(); |
|||
}) |
|||
}, |
|||
// 观测元素相交状态 |
|||
async observer() { |
|||
this.tabbar.map((val, index) => { |
|||
let observer = uni.createIntersectionObserver(this); |
|||
// 检测右边scroll-view的id为itemxx的元素与right-box的相交状态 |
|||
// 如果跟.right-box底部相交,就动态设置左边栏目的活动状态 |
|||
observer.relativeTo('.right-box', { |
|||
top: 0 |
|||
}).observe('#item' + index, res => { |
|||
|
|||
if (res.intersectionRatio > 0) { |
|||
let id = res.id.substring(4); |
|||
this.leftMenuStatus(id); |
|||
} |
|||
}) |
|||
}) |
|||
}, |
|||
// 设置左边菜单的滚动状态 |
|||
async leftMenuStatus(index) { |
|||
|
|||
|
|||
// console.log(index,'index') |
|||
if (index == this.current) return; |
|||
this.current = index |
|||
// 如果为0,意味着尚未初始化 |
|||
if (this.menuHeight == 0 || this.menuItemHeight == 0) { |
|||
await this.getElRect('menu-scroll-view', 'menuHeight'); |
|||
await this.getElRect('u-tab-item', 'menuItemHeight'); |
|||
|
|||
} |
|||
// 将菜单活动item垂直居中 |
|||
this.scrollTop = index * this.menuItemHeight + this.menuItemHeight / 2 - this.menuHeight / 2; |
|||
}, |
|||
// 获取右边菜单每个item到顶部的距离 |
|||
getMenuItemTop() { |
|||
new Promise(resolve => { |
|||
let selectorQuery = uni.createSelectorQuery(); |
|||
selectorQuery.selectAll('.class-item').boundingClientRect((rects) => { |
|||
// 如果节点尚未生成,rects值为[](因为用selectAll,所以返回的是数组),循环调用执行 |
|||
if(!rects.length) { |
|||
setTimeout(() => { |
|||
this.getMenuItemTop(); |
|||
}, 10); |
|||
return ; |
|||
} |
|||
rects.forEach((rect) => { |
|||
// 这里减去rects[0].top,是因为第一项顶部可能不是贴到导航栏(比如有个搜索框的情况) |
|||
this.arr.push(rect.top - rects[0].top); |
|||
resolve(); |
|||
}) |
|||
}).exec() |
|||
}) |
|||
}, |
|||
// 右边菜单滚动 |
|||
async rightScroll(e) { |
|||
this.oldScrollTop = e.detail.scrollTop; |
|||
if(this.arr.length == 0) { |
|||
await this.getMenuItemTop(); |
|||
} |
|||
|
|||
if(this.timer) return ; |
|||
if(!this.menuHeight) { |
|||
await this.getElRect('menu-scroll-view', 'menuHeight'); |
|||
} |
|||
setTimeout(() => { // 节流 |
|||
this.timer = null; |
|||
// scrollHeight为右边菜单垂直中点位置 |
|||
let scrollHeight = e.detail.scrollTop + this.menuHeight / 2; |
|||
for (let i = 0; i < this.arr.length; i++) { |
|||
let height1 = this.arr[i]; |
|||
let height2 = this.arr[i + 1]; |
|||
|
|||
// 如果不存在height2,意味着数据循环已经到了最后一个,设置左边菜单为最后一项即可 |
|||
if (!height2 || scrollHeight > height1 && scrollHeight < height2) { |
|||
// this.leftMenuStatus(i); |
|||
return ; |
|||
} |
|||
|
|||
} |
|||
}, 10) |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss" scoped> |
|||
.u-wrap { |
|||
height: calc(100vh); |
|||
/* #ifdef H5 */ |
|||
height: calc(100vh - var(--window-top)); |
|||
/* #endif */ |
|||
display: flex; |
|||
flex-direction: column; |
|||
} |
|||
.search{ |
|||
width: 100%; |
|||
background-color:#000000; |
|||
box-sizing: border-box; |
|||
padding: 33.33rpx 26.67rpx; |
|||
|
|||
position: fixed; |
|||
top: 0; |
|||
z-index: 99; |
|||
border-bottom: 1px solid #F5F6FA; |
|||
|
|||
.search1{ |
|||
display: flex; |
|||
align-items: center; |
|||
justify-content: space-between; |
|||
|
|||
.navigation_seach{ |
|||
width: 546.67rpx; |
|||
background-color: #F5F6FA; |
|||
border-radius: 6.67rpx; |
|||
height: 66.67rpx; |
|||
display: flex; |
|||
align-items: center; |
|||
color: #8F9094; |
|||
font-size: 26.67rpx; |
|||
padding-left: 22rpx; |
|||
box-sizing: border-box; |
|||
|
|||
image{ |
|||
width: 29.33rpx; |
|||
height: 29.33rpx; |
|||
margin-right: 22rpx; |
|||
} |
|||
} |
|||
.navigation_title_right{ |
|||
display: flex; |
|||
align-items: center; |
|||
|
|||
image{ |
|||
width: 44rpx; |
|||
height: 44rpx; |
|||
} |
|||
>uni-navigator:first-child{ |
|||
margin-right: 32.67rpx; |
|||
} |
|||
} |
|||
|
|||
} |
|||
|
|||
} |
|||
|
|||
.u-menu-wrap { |
|||
flex: 1; |
|||
height: 100%; |
|||
display: flex; |
|||
overflow: hidden; |
|||
margin-top: 120rpx; |
|||
} |
|||
.category_left{ |
|||
height: 100%; |
|||
background-color: #F5F6FA; |
|||
width: 197.33rpx; |
|||
|
|||
} |
|||
|
|||
.u-tab-view { |
|||
width: 200rpx; |
|||
height: 100%; |
|||
} |
|||
|
|||
.u-tab-item { |
|||
width: 197.33rpx; |
|||
padding: 0 18rpx; |
|||
height: 94rpx; |
|||
font-size: 26.67rpx; |
|||
font-weight: 600; |
|||
box-sizing: border-box; |
|||
font-family: PingFang SC; |
|||
|
|||
display: flex; |
|||
align-items: center; |
|||
word-wrap: break-word; |
|||
word-break: break-all; |
|||
} |
|||
|
|||
.u-tab-item-active { |
|||
position: relative; |
|||
font-size: 26rpx; |
|||
font-weight: 600; |
|||
background-color: black; |
|||
color: white; |
|||
} |
|||
|
|||
.u-tab-item-active::before { |
|||
content: ""; |
|||
position: absolute; |
|||
|
|||
height: 32rpx; |
|||
left: 0; |
|||
top: 39rpx; |
|||
} |
|||
|
|||
.u-tab-view { |
|||
height: 100%; |
|||
} |
|||
|
|||
.right-box { |
|||
background-color: rgb(250, 250, 250); |
|||
} |
|||
|
|||
.page-view { |
|||
padding: 16rpx; |
|||
} |
|||
|
|||
.class-item { |
|||
margin-bottom: 30rpx; |
|||
background-color: #fff; |
|||
padding: 16rpx; |
|||
border-radius: 8rpx; |
|||
} |
|||
|
|||
.class-item:last-child { |
|||
min-height: 100vh; |
|||
} |
|||
|
|||
.item-title { |
|||
font-size: 26rpx; |
|||
font-weight: bold; |
|||
} |
|||
|
|||
.item-menu-name { |
|||
font-weight: normal; |
|||
font-size: 24rpx; |
|||
|
|||
} |
|||
|
|||
.item-container { |
|||
display: flex; |
|||
flex-wrap: wrap; |
|||
} |
|||
|
|||
.thumb-box { |
|||
// width: 33.333333%; |
|||
width: 100%; |
|||
display: flex; |
|||
align-items: center; |
|||
justify-content: center; |
|||
flex-direction: column; |
|||
margin-top: 20rpx; |
|||
} |
|||
|
|||
.item-menu-image { |
|||
width: 120rpx; |
|||
height: 120rpx; |
|||
} |
|||
.good_content{ |
|||
display: flex; |
|||
flex-wrap: wrap; |
|||
|
|||
.good_item{ |
|||
font-size: 22.67rpx; |
|||
text-align: center; |
|||
margin-right: 25.33rpx; |
|||
margin-bottom: 51.33rpx; |
|||
|
|||
.good_item_img{ |
|||
display: block; |
|||
background-color: #999999; |
|||
width: 146.67rpx; |
|||
height: 146.67rpx; |
|||
margin-bottom: 22rpx; |
|||
|
|||
} |
|||
} |
|||
.good_item:nth-child(3n+3){ |
|||
margin-right: 0; |
|||
} |
|||
} |
|||
.good_item_img{ |
|||
height: 100rpx; |
|||
width: 100rpx; |
|||
|
|||
image{ |
|||
height: 100%; |
|||
width: 100%; |
|||
} |
|||
} |
|||
|
|||
</style> |
|||
@ -0,0 +1,30 @@ |
|||
<template> |
|||
<view> |
|||
<web-view :webview-styles="webviewStyles" :src="src"></web-view> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
export default { |
|||
data() { |
|||
return { |
|||
webviewStyles: { |
|||
progress: { |
|||
color: '#FF3333' |
|||
} |
|||
}, |
|||
src:'' |
|||
} |
|||
}, |
|||
onLoad(e) { |
|||
this.src = e.src |
|||
}, |
|||
methods:{ |
|||
|
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style> |
|||
|
|||
</style> |
|||
@ -0,0 +1,139 @@ |
|||
<template> |
|||
<view class="body"> |
|||
<uni-nav-bar left-icon="left" @clickLeft="back()" :title="title" /> |
|||
<view v-for="(item,index) in list " :key="item.zone_id"> |
|||
<view v-for="(item1,index1) in item.blocks " :key="item1.block_pic"> |
|||
<view class="ONEPIC" v-if="item.zone_code=='ONEPIC' && item.zone_status=='NORMAL'" :style="{height:(item.zone_code=='ONEPIC')?item.zone_column+'rpx':'200rpx'}"> |
|||
<!-- class="discount page_padding" --> |
|||
<image :src="item1.block_pic" mode="" @click="imgTo()" ></image> |
|||
</view> |
|||
<view class="TWOPIC" v-if="item.zone_code =='TWOPIC'"> |
|||
<image :src="item1.block_pic"></image> |
|||
</view> |
|||
<!-- TWOPIC --> |
|||
<view class="TWOPIC" :style="{height:(item.zone_code=='TWOPIC')?item.zone_column+'rpx':'200rpx'}" v-if="item.zone_code=='TWOPIC' && item.zone_status=='NORMAL'"> |
|||
<image :src="item1.block_pic" @click="imgTo(item1)"mode="" v-for="(item1,index1) in item.blocks" :key="item1.block_id"></image> |
|||
</view> |
|||
<!-- THREEPIC --> |
|||
<view class="THREEPIC":style="{height:(item.zone_code=='THREEPIC')?item.zone_column+'rpx':'200rpx'}" v-if="item.zone_code=='THREEPIC' && item.zone_status=='NORMAL'"> |
|||
<image :src="item1.block_pic" @click="imgTo(item1)" mode="" v-for="(item1,index1) in item.blocks" :key="item1.block_id"></image> |
|||
</view> |
|||
<!-- FOURPIC --> |
|||
<view class="FOURPIC":style="{height:(item.zone_code=='FOURPIC')?item.zone_column+'rpx':'200rpx'}" v-if="item.zone_code=='FOURPIC' && item.zone_status=='NORMAL'"> |
|||
<image :src="item1.block_pic" mode="" @click="imgTo(item1)" v-for="(item1,index1) in item.blocks" :key="item1.block_id"></image> |
|||
</view> |
|||
<!-- FIVEPIC --> |
|||
<view class="FIVEPIC" :style="{height:(item.zone_code=='FIVEPIC')?item.zone_column+'rpx':'200rpx'}" v-if="item.zone_code=='FIVEPIC' && item.zone_status=='NORMAL'"> |
|||
<image :src="item1.block_pic" mode="" @click="imgTo(item1)" v-for="(item1,index1) in item.blocks" :key="item1.block_id"></image> |
|||
</view> |
|||
<!-- SIXPIC --> |
|||
<view class="SIXPIC":style="{height:(item.zone_code=='SIXPIC')?item.zone_column+'rpx':'200rpx'}" v-if="item.zone_code=='SIXPIC' && item.zone_status=='NORMAL'"> |
|||
<image :src="item1.block_pic" mode="" @click="imgTo(item1)" v-for="(item1,index1) in item.blocks" :key="item1.block_id"></image> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
</template> |
|||
<script> |
|||
import {defaultRequest,defaultRequest4} from '../../api/index.js' |
|||
export default { |
|||
data() { |
|||
return { |
|||
list:[], |
|||
data: { |
|||
_action:'getpagedata', |
|||
pagecode:'' |
|||
}, |
|||
title:'' |
|||
} |
|||
}, |
|||
onLoad(e) { |
|||
console.log(e) |
|||
this.title = e.title |
|||
this.data.pagecode = e.id |
|||
this.getpage() |
|||
}, |
|||
methods: { |
|||
getpage(){ |
|||
|
|||
let imglist |
|||
defaultRequest(this.data).then( res =>{ |
|||
if(res.error ==0){ |
|||
|
|||
console.log(res,'数据') |
|||
this.list= res.data.zones |
|||
console.log(this.list) |
|||
this.list.map( item =>{ |
|||
console.log(item,'item') |
|||
}) |
|||
} |
|||
}) |
|||
}, |
|||
back(){ |
|||
uni.navigateBack({ |
|||
delta:1 |
|||
}) |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss" scoped> |
|||
page{ |
|||
background-color: aliceblue; |
|||
margin: 20rpx; |
|||
} |
|||
.ONEPIC{ |
|||
width: 100%; |
|||
height: 480rpx; |
|||
margin-top: -1rpx; |
|||
|
|||
image{ |
|||
height: 100%; |
|||
width: 100%; |
|||
} |
|||
} |
|||
.TWOPIC{ |
|||
width: 100%; |
|||
display: flex; |
|||
image{ |
|||
width: 50%; |
|||
} |
|||
} |
|||
.THREEPIC{ |
|||
width: 100%; |
|||
display: flex; |
|||
margin: 0; |
|||
justify-content: space-between; |
|||
image{ |
|||
width: 100%; |
|||
} |
|||
} |
|||
.FOURPIC{ |
|||
width: 100%; |
|||
display: flex; |
|||
justify-content: space-between; |
|||
image{ |
|||
width: 100%; |
|||
} |
|||
} |
|||
.FIVEPIC{ |
|||
width: 100%; |
|||
display: flex; |
|||
justify-content: space-between; |
|||
image{ |
|||
width: 100%; |
|||
} |
|||
} |
|||
.SIXPIC{ |
|||
width: 100%; |
|||
display: flex; |
|||
justify-content: space-between; |
|||
image{ |
|||
width: 100%; |
|||
} |
|||
} |
|||
.body{ |
|||
padding-top: 50.33rpx; |
|||
} |
|||
</style> |
|||
|
After Width: | Height: | Size: 3.9 KiB |
|
After Width: | Height: | Size: 3.8 KiB |
|
After Width: | Height: | Size: 1012 B |
|
After Width: | Height: | Size: 2.9 KiB |
|
After Width: | Height: | Size: 8.3 KiB |
|
After Width: | Height: | Size: 4.3 KiB |
|
After Width: | Height: | Size: 4.5 KiB |
|
After Width: | Height: | Size: 6.4 KiB |
|
After Width: | Height: | Size: 30 KiB |
|
After Width: | Height: | Size: 18 KiB |
|
After Width: | Height: | Size: 20 KiB |
|
After Width: | Height: | Size: 966 KiB |
|
After Width: | Height: | Size: 8.9 KiB |
|
After Width: | Height: | Size: 10 KiB |
|
After Width: | Height: | Size: 17 KiB |
|
After Width: | Height: | Size: 7.6 KiB |
|
After Width: | Height: | Size: 7.6 KiB |
|
After Width: | Height: | Size: 3.6 KiB |
|
After Width: | Height: | Size: 3.3 KiB |
|
After Width: | Height: | Size: 6.8 KiB |
|
After Width: | Height: | Size: 2.2 KiB |
|
After Width: | Height: | Size: 2.0 KiB |
|
After Width: | Height: | Size: 2.2 KiB |
|
After Width: | Height: | Size: 1.1 MiB |
@ -0,0 +1,25 @@ |
|||
import Vue from 'vue' |
|||
import Vuex from 'vuex' |
|||
Vue.use(Vuex) |
|||
const store = new Vuex.Store({ |
|||
state(){ |
|||
return{ |
|||
count: 0, |
|||
goodslist:[] |
|||
} |
|||
}, |
|||
mutations: { |
|||
addSave(state, data) { |
|||
let str = []; |
|||
str.push(data); |
|||
console.log(data) |
|||
state.goodslist.push(str) |
|||
}, |
|||
increment (state) { |
|||
state.count++ |
|||
console.log(store.state.count) // -> 1
|
|||
} |
|||
}, |
|||
actions: {} |
|||
}) |
|||
export default store |
|||
|
After Width: | Height: | Size: 44 KiB |
|
After Width: | Height: | Size: 44 KiB |
|
After Width: | Height: | Size: 5.7 KiB |
|
After Width: | Height: | Size: 2.0 KiB |
@ -0,0 +1,25 @@ |
|||
<!DOCTYPE html> |
|||
<html lang="zh-CN"> |
|||
|
|||
<head> |
|||
<meta charset="UTF-8" /> |
|||
<script> |
|||
var __UniViewStartTime__ = Date.now(); |
|||
var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') || |
|||
CSS.supports('top: constant(a)')) |
|||
document.write( |
|||
'<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' + |
|||
(coverSupport ? ', viewport-fit=cover' : '') + '" />') |
|||
</script> |
|||
<title>View</title> |
|||
<link rel="stylesheet" href="view.css" /> |
|||
</head> |
|||
|
|||
<body> |
|||
<div id="app"></div> |
|||
<script src="__uniappes6.js"></script> |
|||
<script src="view.umd.min.js"></script> |
|||
<script src="app-view.js"></script> |
|||
</body> |
|||
|
|||
</html> |
|||
@ -0,0 +1,3 @@ |
|||
{ |
|||
"prompt" : "none" |
|||
} |
|||
@ -0,0 +1,8 @@ |
|||
|
|||
var isReady=false;var onReadyCallbacks=[]; |
|||
var isServiceReady=false;var onServiceReadyCallbacks=[]; |
|||
var __uniConfig = {"pages":["pages/index/index","pages/index/search","pages/index/address","pages/category/index","pages/account/index","pages/account/myProfile","pages/account/settings","pages/account/changeImg","pages/account/wishlist","pages/account/favorites","pages/account/message","pages/account/new","pages/login/index","pages/login/verifyEmail","pages/login/changePwd","pages/account/myOrders","pages/order/confirmation","pages/account/myCoupons","pages/index/pickUpCentre","pages/order/paySuccess","pages/account/address","pages/account/addAddress","pages/account/pointsDetails","pages/order/details","pages/order/logisticsDetails","pages/order/refund","pages/order/refundDetails","pages/category/productList","pages/shippingCart/index","pages/productDetails/index","pages/productDetails/goodsReview","pages/account/myReview","pages/productDetails/review","pages/index/flashSale"],"window":{"navigationBarTextStyle":"black","navigationBarTitleText":"DOPE PLUS","navigationBarBackgroundColor":"#F8F8F8","backgroundColor":"#F8F8F8"},"tabBar":{"borderStyle":"black","backgroundColor":"#FFFFFF","color":"#999999","selectedColor":"#000000","height":"60px","midButton":{"width":"80px","height":"70px","iconWidth":"60px","iconPath":"static/img/tabbar_img.png"},"list":[{"pagePath":"pages/index/index","iconPath":"static/img/home.png","selectedIconPath":"static/img/home1.png","text":"Home"},{"pagePath":"pages/category/index","iconPath":"static/img/Category.png","selectedIconPath":"static/img/Category1.png","text":"Category"},{"pagePath":"pages/shippingCart/index","iconPath":"static/img/Cart.png","selectedIconPath":"static/img/cart1.png","text":"Cart"},{"pagePath":"pages/account/index","iconPath":"static/img/Account.png","selectedIconPath":"static/img/Account1.png","text":"Account"}]},"nvueCompiler":"uni-app","nvueStyleCompiler":"uni-app","renderer":"auto","splashscreen":{"alwaysShowBeforeRender":true,"autoclose":false},"appname":"DOPE PLUS","compilerVersion":"3.4.18","entryPagePath":"pages/index/index","networkTimeout":{"request":60000,"connectSocket":60000,"uploadFile":60000,"downloadFile":60000}}; |
|||
var __uniRoutes = [{"path":"/pages/index/index","meta":{"isQuit":true,"isTabBar":true},"window":{"navigationBarTitleText":"uni-app","titleNView":false}},{"path":"/pages/index/search","meta":{},"window":{"titleNView":false}},{"path":"/pages/index/address","meta":{},"window":{"navigationBarTitleText":"Address","navigationBarBackgroundColor":"#FFFFFF"}},{"path":"/pages/category/index","meta":{"isQuit":true,"isTabBar":true},"window":{"titleNView":false}},{"path":"/pages/account/index","meta":{"isQuit":true,"isTabBar":true},"window":{"titleNView":false}},{"path":"/pages/account/myProfile","meta":{},"window":{"navigationBarTitleText":"My Profile","navigationBarBackgroundColor":"#FFFFFF"}},{"path":"/pages/account/settings","meta":{},"window":{"navigationBarTitleText":"Settings","navigationBarBackgroundColor":"#FFFFFF"}},{"path":"/pages/account/changeImg","meta":{},"window":{"navigationStyle":"custom","enablePullDownRefresh":false}},{"path":"/pages/account/wishlist","meta":{},"window":{"titleNView":false}},{"path":"/pages/account/favorites","meta":{},"window":{"titleNView":false}},{"path":"/pages/account/message","meta":{},"window":{"titleNView":false}},{"path":"/pages/account/new","meta":{},"window":{"navigationBarTitleText":"nothing","navigationBarBackgroundColor":"#FFFFFF"}},{"path":"/pages/login/index","meta":{},"window":{"titleNView":false}},{"path":"/pages/login/verifyEmail","meta":{},"window":{"navigationBarTitleText":"Verify Email Address","navigationBarBackgroundColor":"#FFFFFF"}},{"path":"/pages/login/changePwd","meta":{},"window":{"navigationBarTitleText":"Change Password","navigationBarBackgroundColor":"#FFFFFF"}},{"path":"/pages/account/myOrders","meta":{},"window":{"navigationBarTitleText":"My orders","navigationBarBackgroundColor":"#FFFFFF"}},{"path":"/pages/order/confirmation","meta":{},"window":{"navigationBarTitleText":"0rder Confirmation","navigationBarBackgroundColor":"#FFFFFF"}},{"path":"/pages/account/myCoupons","meta":{},"window":{"titleNView":false}},{"path":"/pages/index/pickUpCentre","meta":{},"window":{"titleNView":false}},{"path":"/pages/order/paySuccess","meta":{},"window":{"navigationBarTitleText":"Pay success","navigationBarBackgroundColor":"#FFFFFF","enablePullDownRefresh":true}},{"path":"/pages/account/address","meta":{},"window":{"navigationBarTitleText":"Shipping Address","navigationBarBackgroundColor":"#FFFFFF"}},{"path":"/pages/account/addAddress","meta":{},"window":{"navigationBarTitleText":"Shipping Address","navigationBarBackgroundColor":"#FFFFFF"}},{"path":"/pages/account/pointsDetails","meta":{},"window":{"titleNView":false,"enablePullDownRefresh":true}},{"path":"/pages/order/details","meta":{},"window":{"navigationBarTitleText":"Order details","navigationBarBackgroundColor":"#FFFFFF"}},{"path":"/pages/order/logisticsDetails","meta":{},"window":{"navigationBarTitleText":"Logistics details","navigationBarBackgroundColor":"#FFFFFF"}},{"path":"/pages/order/refund","meta":{},"window":{"navigationBarTitleText":"Refund","navigationBarBackgroundColor":"#FFFFFF"}},{"path":"/pages/order/refundDetails","meta":{},"window":{"navigationBarTitleText":"Refund Details","navigationBarBackgroundColor":"#FFFFFF"}},{"path":"/pages/category/productList","meta":{},"window":{"titleNView":false,"enablePullDownRefresh":true}},{"path":"/pages/shippingCart/index","meta":{"isQuit":true,"isTabBar":true},"window":{"titleNView":false}},{"path":"/pages/productDetails/index","meta":{},"window":{"titleNView":false}},{"path":"/pages/productDetails/goodsReview","meta":{},"window":{"navigationBarTitleText":"Review","navigationBarBackgroundColor":"#FFFFFF"}},{"path":"/pages/account/myReview","meta":{},"window":{"navigationBarTitleText":"My Review","navigationBarBackgroundColor":"#FFFFFF"}},{"path":"/pages/productDetails/review","meta":{},"window":{"titleNView":false}},{"path":"/pages/index/flashSale","meta":{},"window":{"titleNView":false}}]; |
|||
__uniConfig.onReady=function(callback){if(__uniConfig.ready){callback()}else{onReadyCallbacks.push(callback)}};Object.defineProperty(__uniConfig,"ready",{get:function(){return isReady},set:function(val){isReady=val;if(!isReady){return}const callbacks=onReadyCallbacks.slice(0);onReadyCallbacks.length=0;callbacks.forEach(function(callback){callback()})}}); |
|||
__uniConfig.onServiceReady=function(callback){if(__uniConfig.serviceReady){callback()}else{onServiceReadyCallbacks.push(callback)}};Object.defineProperty(__uniConfig,"serviceReady",{get:function(){return isServiceReady},set:function(val){isServiceReady=val;if(!isServiceReady){return}const callbacks=onServiceReadyCallbacks.slice(0);onServiceReadyCallbacks.length=0;callbacks.forEach(function(callback){callback()})}}); |
|||
service.register("uni-app-config",{create(a,b,c){if(!__uniConfig.viewport){var d=b.weex.config.env.scale,e=b.weex.config.env.deviceWidth,f=Math.ceil(e/d);Object.assign(__uniConfig,{viewport:f,defaultFontSize:Math.round(f/20)})}return{instance:{__uniConfig:__uniConfig,__uniRoutes:__uniRoutes,global:void 0,window:void 0,document:void 0,frames:void 0,self:void 0,location:void 0,navigator:void 0,localStorage:void 0,history:void 0,Caches:void 0,screen:void 0,alert:void 0,confirm:void 0,prompt:void 0,fetch:void 0,XMLHttpRequest:void 0,WebSocket:void 0,webkit:void 0,print:void 0}}}}); |
|||
@ -0,0 +1 @@ |
|||
(function(e){function r(r){for(var n,l,i=r[0],p=r[1],a=r[2],c=0,s=[];c<i.length;c++)l=i[c],Object.prototype.hasOwnProperty.call(o,l)&&o[l]&&s.push(o[l][0]),o[l]=0;for(n in p)Object.prototype.hasOwnProperty.call(p,n)&&(e[n]=p[n]);f&&f(r);while(s.length)s.shift()();return u.push.apply(u,a||[]),t()}function t(){for(var e,r=0;r<u.length;r++){for(var t=u[r],n=!0,i=1;i<t.length;i++){var p=t[i];0!==o[p]&&(n=!1)}n&&(u.splice(r--,1),e=l(l.s=t[0]))}return e}var n={},o={"app-config":0},u=[];function l(r){if(n[r])return n[r].exports;var t=n[r]={i:r,l:!1,exports:{}};return e[r].call(t.exports,t,t.exports,l),t.l=!0,t.exports}l.m=e,l.c=n,l.d=function(e,r,t){l.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:t})},l.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},l.t=function(e,r){if(1&r&&(e=l(e)),8&r)return e;if(4&r&&"object"===typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(l.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var n in e)l.d(t,n,function(r){return e[r]}.bind(null,n));return t},l.n=function(e){var r=e&&e.__esModule?function(){return e["default"]}:function(){return e};return l.d(r,"a",r),r},l.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},l.p="/";var i=this["webpackJsonp"]=this["webpackJsonp"]||[],p=i.push.bind(i);i.push=r,i=i.slice();for(var a=0;a<i.length;a++)r(i[a]);var f=p;t()})([]); |
|||
@ -0,0 +1 @@ |
|||
{"@platforms":["android","iPhone","iPad"],"id":"__UNI__C0E0831","name":"DOPE PLUS","version":{"name":"1.0.0","code":"100"},"description":"","launch_path":"__uniappview.html","developer":{"name":"","email":"","url":""},"permissions":{"Payment":{},"UniNView":{"description":"UniNView原生渲染"}},"plus":{"useragent":{"value":"uni-app","concatenate":true},"splashscreen":{"target":"id:1","autoclose":true,"waiting":true,"delay":0},"popGesture":"close","launchwebview":{"id":"1","kernel":"WKWebview"},"statusbar":{"immersed":"supportedDevice","style":"dark","background":"#F8F8F8"},"usingComponents":true,"nvueStyleCompiler":"uni-app","compilerVersion":3,"uniStatistics":{"enable":false},"allowsInlineMediaPlayback":true,"safearea":{"background":"#FFFFFF","bottom":{"offset":"auto"}},"uni-app":{"compilerVersion":"3.4.18","control":"uni-v3","nvueCompiler":"uni-app","renderer":"auto","nvue":{"flex-direction":"column"},"nvueLaunchMode":"normal"},"tabBar":{"borderStyle":"rgba(0,0,0,0.4)","backgroundColor":"#FFFFFF","color":"#999999","selectedColor":"#000000","height":"60px","midButton":{"width":"80px","height":"70px","iconWidth":"60px","iconPath":"static/img/tabbar_img.png"},"list":[{"pagePath":"pages/index/index","iconPath":"static/img/home.png","selectedIconPath":"static/img/home1.png","text":"Home"},{"pagePath":"pages/category/index","iconPath":"static/img/Category.png","selectedIconPath":"static/img/Category1.png","text":"Category"},{"pagePath":"pages/shippingCart/index","iconPath":"static/img/Cart.png","selectedIconPath":"static/img/cart1.png","text":"Cart"},{"pagePath":"pages/account/index","iconPath":"static/img/Account.png","selectedIconPath":"static/img/Account1.png","text":"Account"}],"child":["lauchwebview"],"selected":0},"launch_path":"__uniappview.html"}} |
|||
|
After Width: | Height: | Size: 38 KiB |
|
After Width: | Height: | Size: 355 B |
|
After Width: | Height: | Size: 3.7 KiB |
|
After Width: | Height: | Size: 3.1 KiB |
|
After Width: | Height: | Size: 3.2 KiB |
|
After Width: | Height: | Size: 1.6 KiB |
|
After Width: | Height: | Size: 1.6 KiB |
|
After Width: | Height: | Size: 4.5 KiB |
|
After Width: | Height: | Size: 4.6 KiB |
|
After Width: | Height: | Size: 2.8 KiB |
|
After Width: | Height: | Size: 3.8 KiB |
|
After Width: | Height: | Size: 2.5 KiB |
|
After Width: | Height: | Size: 2.6 KiB |
|
After Width: | Height: | Size: 1.0 KiB |
|
After Width: | Height: | Size: 1.0 KiB |
|
After Width: | Height: | Size: 3.2 KiB |
|
After Width: | Height: | Size: 1.3 KiB |