Commit 681a6788 authored by 罗超's avatar 罗超

修改部分样式

Signed-off-by: 罗超's avatar罗超 <alex9012@vip.qq.com>
parent 5992ad52
<template>
<view @click="close" class="mask">
<view @click.stop="onClick" class="content">
<text class="text">点击蒙层关闭</text>
</view>
</view>
</template>
<script>
export default {
data() {
return {
}
},
methods: {
onClick(e) {
uni.showToast({
title: "点击蒙层关闭"
})
// #ifdef APP-NVUE
e.stopPropagation()
// #endif
},
close() {
uni.navigateBack()
}
}
}
</script>
<style>
page {
background: transparent;
}
.mask {
position: fixed;
left: 0;
top: 0;
right: 0;
bottom: 0;
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
justify-content: center;
align-items: center;
background-color: rgba(0, 0, 0, 0.4);
}
.content {
width: 200px;
height: 200px;
background-color: #007AFF;
}
.text {
/* #ifndef APP-NVUE */
display: block;
/* #endif */
line-height: 200px;
text-align: center;
color: #FFFFFF;
}
</style>
<template>
<view :style="st"></view>
<view :style="{'background':block.background,'height':block.height+'px'}"></view>
</template>
<script>
......@@ -7,11 +7,11 @@ export default {
props:['block'],
data() {
return {
st:''
st:{}
}
},
created() {
this.st=`background:${this.block.background};height:${this.block.height}rpx`
this.st={'background':this.block.background,'height':this.block.height+'rpx'}
},
}
</script>
......
......@@ -16,7 +16,7 @@
<image
:src="getIconLink(c.icon)"
mode="widthFix"
style="width: 88rpx; height: 88rpx;"
style="width: 64rpx; height: 64rpx;"
/>
<text :style="{'color':navs.color}">{{ c.name }}</text>
</u-grid-item>
......
<template>
<view
class="ad-box"
:style="{ height: ad.height == 'auto' ? 'auto' : ad.height + 'rpx' }"
:style="{ height: ad.height == 'auto' ? 'auto' : ad.height + 'rpx',margin:marginStyle }"
>
<view
class="ad-chi"
......@@ -10,7 +10,7 @@
:style="[item.formatStyle]"
@click="clickHandler(item.link[0].new_link_url)"
>
<img :src="item.pic_url" mode="widthFix"/>
<img :src="item.pic_url" style="margin-bottom:-4px" mode="widthFix"/>
</view>
</view>
</template>
......@@ -20,7 +20,8 @@ export default {
props: ["ad"],
data() {
return {
adtemp:[]
adtemp:[],
marginStyle:""
}
},
created() {
......@@ -38,6 +39,7 @@ export default {
if (this.ad.height == "auto") {
x.formatStyle.position = "unset";
}
this.marginStyle=`${this.ad.top??0}px ${this.ad.right??0}px ${this.ad.bottom??0}px ${this.ad.left??0}px `
this.adtemp.push(x)
});
},
......
......@@ -20,6 +20,7 @@
:text-color="styleStr.textColor"
:radius="styleStr.radius"
:show-action="false"
:margin="marginStyle"
></u-search>
</view>
</template>
......@@ -33,6 +34,7 @@ export default {
formatStyle: "",
postionStyle: "",
bg: "",
marginStyle:""
};
},
created() {
......@@ -44,6 +46,7 @@ export default {
} else {
this.bg = this.styleStr.background;
}
this.marginStyle=`${this.styleStr.top??0}px ${this.styleStr.right??0}px ${this.styleStr.bottom??0}px ${this.styleStr.left??0}px `
console.log(this.styleStr.bg);
// if (this.styleStr.p) {
// let p = this.styleStr.p;
......@@ -64,5 +67,7 @@ export default {
<style>
.search-box {
padding: 5px;
position: relative;
z-index: 2;
}
</style>
......@@ -18,7 +18,7 @@
</swiper-item>
</block>
</swiper> -->
<view :style="{marginTop:swipers.topAndBottom+'px',marginBottom:swipers.topAndBottom+'px',marginLeft:swipers.leftAndRight+'px',marginRight:swipers.leftAndRight+'px'}">
<view :style="{marginTop:swipers.topAndBottom+'px',marginBottom:(swipers.topAndBottom<0?0:swipers.topAndBottom)+'px',marginLeft:swipers.leftAndRight+'px',marginRight:swipers.leftAndRight+'px'}">
<u-swiper
:list="banners"
:effect3d="swipers.style == 2"
......
......@@ -4,7 +4,6 @@ import api from './plugin/api'
import uiconfig from './plugin/uiconfig'
import uView from "uview-ui";
import utils from './plugin/utils'
Vue.use(api)
Vue.use(uView)
Vue.config.productionTip = false
......
<template>
<view class="u-search">
<view class="u-search" :style="{'margin':margin}">
<view
class="u-content"
:style="{
......@@ -76,6 +76,10 @@ export default {
type: String,
default: '#000'
},
margin:{
type: String,
default: '0'
},
// 搜索框背景色,默认值#f2f2f2
bgColor: {
type: String,
......
export default {
install(Vue, options) {
Vue.prototype.host = "https://wx.weibaoge.cn/web/index.php?_mall_id=1285"
// Vue.prototype.host2 = "http://192.168.0.110:8200"
// Vue.prototype.host2 = "https://mallApi.oytour.com"
// Vue.prototype.host2 = "http://192.168.2.16:8088"
Vue.prototype.host2 = "http://192.168.2.65"
Vue.prototype.request = function(param, success, failed) {
//网络请求
uni.request({
url: this.host + "&r=" + param.data.r,
method: param.method || "GET",
header: param.header || {
'content-type': "application/json"
},
data: param.data,
success: res => {
if (res.data.code != 0 && res.data.msg != "商品未上架") {
}
typeof success == "function" && success(res.data);
},
fail: (e) => {
console.log("网络请求fail:" + JSON.stringify(e));
uni.showModal({
content: "" + res.errMsg
});
typeof failed == "function" && failed(res.data);
}
});
}
Vue.prototype.request2 = function(param, success, failed) {
Vue.prototype.host = "https://wx.weibaoge.cn/web/index.php?_mall_id=1285"
// Vue.prototype.host2 = "http://192.168.0.110:8200"
Vue.prototype.host2 = "https://mallApi.oytour.com"
// Vue.prototype.host2 = "http://192.168.2.16:8088"
//Vue.prototype.host2 = "http://192.168.2.65"
Vue.prototype.request = function(param, success, failed) {
//网络请求
uni.request({
url: this.host2 + param.url,
method: param.method || "Post",
url: this.host + "&r=" + param.data.r,
method: param.method || "GET",
header: param.header || {
'content-type': "application/json"
},
data: {
MallBaseId: 1,
TenantId: 1,
OpenId: this.GetOpenId().OpenId,
UserId: this.GetOpenId().UserId,
MiniAppId: this.GetMiniAppId(),
msg: param.data,
token: this.GetOpenId().token
},
success: res => {
if(res.data.resultCode == 10000){
let u = uni.getStorageSync("mall_UserInfo");
if(u){
this.getLogin_t(u)
typeof failed == "function" && failed(res.data);
}
}else if(res.data.resultCode != 1) {
if(res.data.couponResultCode==0){
}else{
uni.showToast({
title: res.data.message,
icon: "none",
});
}
typeof failed == "function" && failed(res.data);
}
else{
typeof success == "function" && success(res.data);
data: param.data,
success: res => {
if (res.data.code != 0 && res.data.msg != "商品未上架") {
}
typeof success == "function" && success(res.data);
},
fail: (e) => {
console.log("网络请求fail:" + JSON.stringify(e));
......@@ -82,34 +28,86 @@ export default {
typeof failed == "function" && failed(res.data);
}
});
}
// token失效再次登录接口
Vue.prototype.getLogin_t = function(obj) {
let pid = uni.getStorageSync("pid")?uni.getStorageSync("pid").pid:0;
this.request2(
{
url: '/api/AppletLogin/Login',
data: {
Source: 1,
OpenId: obj.OpenId,
Name: obj.Name,
Photo: obj.Photo,
Moblie: '',
SuperiorId: pid
}
},
res => {
if (res.resultCode == 1) {
uni.setStorageSync('mall_UserInfo', res.data);
uni.removeStorageSync('pid');
}
}
);
}
// 获取小程序APPID
}
Vue.prototype.request2 = function(param, success, failed) {
//网络请求
uni.request({
url: this.host2 + param.url,
method: param.method || "Post",
header: param.header || {
'content-type': "application/json"
},
data: {
MallBaseId: 1,
TenantId: 1,
OpenId: this.GetOpenId().OpenId,
UserId: this.GetOpenId().UserId,
MiniAppId: this.GetMiniAppId(),
msg: param.data,
token: this.GetOpenId().token
},
success: res => {
if (res.data.resultCode == 10000) {
let u = uni.getStorageSync("mall_UserInfo");
if (u) {
this.getLogin_t(u)
typeof failed == "function" && failed(res.data);
}
} else if (res.data.resultCode != 1) {
if (res.data.couponResultCode == 0) {
} else {
uni.showToast({
title: res.data.message,
icon: "none",
});
}
typeof failed == "function" && failed(res.data);
} else {
typeof success == "function" && success(res.data);
}
},
fail: (e) => {
console.log("网络请求fail:" + JSON.stringify(e));
uni.showModal({
content: "" + res.errMsg
});
typeof failed == "function" && failed(res.data);
}
});
}
// token失效再次登录接口
Vue.prototype.getLogin_t = function(obj) {
let pid = uni.getStorageSync("pid") ? uni.getStorageSync("pid").pid : 0;
this.request2({
url: '/api/AppletLogin/Login',
data: {
Source: 1,
OpenId: obj.OpenId,
Name: obj.Name,
Photo: obj.Photo,
Moblie: '',
SuperiorId: pid
}
},
res => {
if (res.resultCode == 1) {
uni.setStorageSync('mall_UserInfo', res.data);
uni.removeStorageSync('pid');
}
}
);
}
// 获取小程序APPID
Vue.prototype.GetMiniAppId = function() {
return 'wxacd9f8cc3480d29e'
// return 'wxcf0727a7c78b501e' //旅小友
// return 'wxcf0727a7c78b501e' //旅小友
}
//获取OpenId
Vue.prototype.GetOpenId = function() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment