This commit is contained in:
lym
2026-03-18 17:27:43 +08:00
parent 4a5d7353ed
commit c076cf32b0
34 changed files with 480 additions and 264 deletions

4
app.js
View File

@@ -178,7 +178,7 @@ App({
}, },
globalData:{ globalData:{
userInfo:null, userInfo:null,
apiurl:"http://localhost:8080",//http://localhost:24382 //https://g.hnyhua.cn apiurl:"https://vip.agqyjs.com",//"http://localhost:8080",//http://localhost:24382 //https://vip.agqyjs.com
IFRefreshCart:0, IFRefreshCart:0,
IFRefreshsell:0, IFRefreshsell:0,
IFRefreshsell0:0, IFRefreshsell0:0,
@@ -226,7 +226,7 @@ App({
"pagePath": "/pages/business/index", "pagePath": "/pages/business/index",
"iconPath": "/images/footer-icon-005.png", "iconPath": "/images/footer-icon-005.png",
"selectedIconPath": "/images/footer-icon-005-active.png", "selectedIconPath": "/images/footer-icon-005-active.png",
"text": "门店" "text": "健康驿站"
}, },
{ {
"pagePath": "/pages/my/index", "pagePath": "/pages/my/index",

View File

@@ -99,7 +99,7 @@
"pagePath": "pages/business/index", "pagePath": "pages/business/index",
"iconPath": "images/footer-icon-005.png", "iconPath": "images/footer-icon-005.png",
"selectedIconPath": "images/footer-icon-005-active.png", "selectedIconPath": "images/footer-icon-005-active.png",
"text": "门店" "text": "健康驿站"
}, },
{ {
"pagePath": "pages/my/index", "pagePath": "pages/my/index",

View File

@@ -68,11 +68,24 @@ Page( {
var userId = wx.getStorageSync("userId") var userId = wx.getStorageSync("userId")
var LoginId = wx.getStorageSync("LoginId") var LoginId = wx.getStorageSync("LoginId")
var userInfodata = wx.getStorageSync("userInfo") var userInfodata = wx.getStorageSync("userInfo")
if(userId&&LoginId){
var userInfo = JSON.parse(userInfodata) if(!userId || !LoginId){
that.setData({ wx.showModal({
uid:userInfo.id title: "提示",
}) content: "请先登录后再申请",
showCancel: false,
success: function() {
wx.navigateBack({})
}
})
return
}
if(userId && LoginId && userInfodata){
var userInfo = JSON.parse(userInfodata)
that.setData({
uid:userInfo.id
})
} }
wx.request({ wx.request({
url: app.globalData.apiurl + "/xapiajax.ashx", url: app.globalData.apiurl + "/xapiajax.ashx",
@@ -235,6 +248,11 @@ wx.getLocation({
sectionHidden0:true, sectionHidden0:true,
savebutton:"提交" savebutton:"提交"
}) })
wx.showToast({
title: "地图标注已保存",
icon: "success",
duration: 1500
})
},insection:function(e) { },insection:function(e) {
},onsjimage:function(e) { },onsjimage:function(e) {
@@ -643,14 +661,24 @@ wx.getLocation({
}, 2000); }, 2000);
}else{ }else{
that.setData({ that.setData({
savebutton:"保存" savebutton:"提交"
}) })
wx.showToast({ wx.showToast({
title: res.data.msg, title: res.data.msg,
icon: "none", icon: "none",
duration: 3000 duration: 3000
}) })
} }
},
fail: function(err) {
that.setData({
savebutton:"提交"
})
wx.showToast({
title: "网络请求失败,请重试",
icon: "none",
duration: 3000
})
} }
}) })
} }

View File

@@ -1,3 +1,3 @@
{ {
"navigationBarTitleText": "申请线上供应链" "navigationBarTitleText": "申请健康驿站"
} }

View File

@@ -1,5 +1,8 @@
<view class="container"> <view class="container">
<form bindsubmit='saveaddress' wx:if="{{uid>68}}"> <view wx:if="{{uid<=0}}" class="nodata" style="padding-top: 50%;">
<text>请先登录后再申请</text>
</view>
<form bindsubmit='saveaddress' wx:if="{{uid>0}}">
<view class="myaddress-box"> <view class="myaddress-box">
<view class="frombody"> <view class="frombody">

View File

@@ -2,6 +2,7 @@ var WxParse = null;
var app = getApp() var app = getApp()
var that=null var that=null
var aid=0 var aid=0
var ParentID = 0
Page( { Page( {
data: { data: {
loadingHidden:false, loadingHidden:false,
@@ -13,7 +14,8 @@ Page( {
onLoad: function(options) { onLoad: function(options) {
that = this that = this
WxParse = require('../../wxParse/wxParse.js') WxParse = require('../../wxParse/wxParse.js')
aid=options.id aid=options.id?options.id:0
ParentID =options.ParentID
that.rdata();//第一次加载数据 that.rdata();//第一次加载数据
}, rdata: function () { }, rdata: function () {
@@ -21,7 +23,8 @@ Page( {
url: app.globalData.apiurl + "/xapiajax.ashx", url: app.globalData.apiurl + "/xapiajax.ashx",
data: { data: {
action:"getnewdetail", action:"getnewdetail",
id:aid id:aid,
ParentID:ParentID
}, },
method:"GET", method:"GET",
dataType:"json", dataType:"json",

View File

@@ -31,9 +31,9 @@ Page( {
if (userId && userInfodata) { if (userId && userInfodata) {
const userInfo = JSON.parse(userInfodata); const userInfo = JSON.parse(userInfodata);
if (userInfo.bdshEnable == 1) { if (userInfo.bdshEnable == 1) {
sel = 3; // 在特殊权限菜单中,"门店"选项不存在,"我的"选项索引为3 sel = 3; // 在特殊权限菜单中,"健康驿站"选项不存在,"我的"选项索引为3
} else { } else {
sel = 3; // 在普通菜单中,"门店"选项索引为3 sel = 3; // 在普通菜单中,"健康驿站"选项索引为3
} }
} }
@@ -166,22 +166,38 @@ Page( {
} }
} }
}) })
},onsearch:function() { },
var keyword=that.data.keyword.replace(/\s+/g, ""); // 获取输入的关键字
if(keyword!=""){ getkeyword: function(e) {
that.setData({
keyword: e.detail.value
});
},
// 清空搜索
clearSearch: function() {
that.setData({
keyword: ""
});
that.clearCache();
that.getlist(0);
},
onsearch: function() {
var keyword = that.data.keyword.replace(/\s+/g, "");
if (keyword != "") {
that.setData({ that.setData({
keyword:keyword keyword: keyword
}) });
that.clearCache();//清本页缓存 that.clearCache();
that.getlist(0);//第一次加载数据 that.getlist(0);
}else{ } else {
wx.showToast({ wx.showToast({
title: "关键字不能为空", title: "关键字不能为空",
icon: "none", icon: "none",
duration: 3000 duration: 3000
}) });
} }
},swiperchange0:function(e) { },
swiperchange0: function(e) {
},closeserver:function(e) { },closeserver:function(e) {
that.setData({ that.setData({

View File

@@ -1,3 +1,3 @@
{ {
"navigationBarTitleText": "门店" "navigationBarTitleText": "健康驿站"
} }

View File

@@ -4,11 +4,14 @@
<!--<view class="searchbox2"> <!--<view class="searchbox2">
<view class="logobox"><image src="../../images/logo2.png" /></view> <view class="logobox"><image src="../../images/logo2.png" /></view>
</view>--> </view>-->
<view class="searchbox"> <view class="searchbox">
<view class="icobox" bindtap="onsearch"><image src="../../images/searchto1.png" /></view> <view class="icobox" bindtap="onsearch"><image src="../../images/searchto1.png" /></view>
<view class="inpubox"> <view class="inpubox">
<input type="text" placeholder="{{qkeyword}}" confirm-type="search" focus="{{getfocus}}" bindinput="getkeyword" bindconfirm="onsearch" placeholder-style="color:#bbb;" /> <input type="text" value="{{keyword}}" placeholder="{{qkeyword}}" confirm-type="search" focus="{{getfocus}}" bindinput="getkeyword" bindconfirm="onsearch" placeholder-style="color:#bbb;" />
</view> </view>
<view class="clearicobox" wx:if="{{keyword}}" bindtap="clearSearch">
<image src="../../images/close.png" />
</view>
<view class="searchicobox" bindtap="onsearch">搜索</view> <view class="searchicobox" bindtap="onsearch">搜索</view>
@@ -28,7 +31,7 @@
<view class="business_item" wx:for="{{business}}" bindtap="onview" data-id="{{item._id}}"> <view class="business_item" wx:for="{{business}}" bindtap="onview" data-id="{{item._id}}">
<view class="business_item_top"> <view class="business_item_top">
<view class="ub item_image"> <view class="ub item_image">
<image wx:if="{{item.showpic==0}}" src="{{item.image}}" /> <image wx:if="{{item.showpic==0 || item.showpic=='0'}}" src="{{item.image}}" />
</view> </view>
<view class="ub-f1 item_info"> <view class="ub-f1 item_info">
<view class="item_title">{{item.name}}</view> <view class="item_title">{{item.name}}</view>

View File

@@ -32,6 +32,8 @@ page{
.searchbox .icobox image{width: 1.5em; height:1.5em; margin-top: 0.4em; margin-left: 0.6em;} .searchbox .icobox image{width: 1.5em; height:1.5em; margin-top: 0.4em; margin-left: 0.6em;}
.searchbox .icobox0{margin:0; margin-left:0.5em; margin-top:0.2em; width:1.8em;height:1.8em; box-sizing:border-box;z-index: 101;border-radius:50%;} .searchbox .icobox0{margin:0; margin-left:0.5em; margin-top:0.2em; width:1.8em;height:1.8em; box-sizing:border-box;z-index: 101;border-radius:50%;}
.searchbox .icobox0 image{width: 1.5em; height:1.5em; margin-top: 0.1em; margin-left: 0.1em;} .searchbox .icobox0 image{width: 1.5em; height:1.5em; margin-top: 0.1em; margin-left: 0.1em;}
.searchbox .clearicobox{margin:0; margin-right:-2.3em; width:2.2em;height:2.2em;box-sizing:border-box;z-index: 101;display: flex;align-items: center;justify-content: center;}
.searchbox .clearicobox image{width: 1.2em; height:1.2em;}
.searchbox .searchicobox{margin:0; margin-left:0em; width:3em;height:2.2em; line-height: 2.2em; box-sizing:border-box;z-index: 102;background:linear-gradient(to right, #6BA3F0, #8BBDF5); border:1px solid #6BA3F0; border-left:0; color:#fff; text-align: center; border-radius:0 0.5em 0.5em 0;} .searchbox .searchicobox{margin:0; margin-left:0em; width:3em;height:2.2em; line-height: 2.2em; box-sizing:border-box;z-index: 102;background:linear-gradient(to right, #6BA3F0, #8BBDF5); border:1px solid #6BA3F0; border-left:0; color:#fff; text-align: center; border-radius:0 0.5em 0.5em 0;}
.swiper{ .swiper{

66
pages/business0/index.js Normal file
View File

@@ -0,0 +1,66 @@
// pages/business0/index.js
Page({
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})

View File

@@ -0,0 +1,3 @@
{
"usingComponents": {}
}

View File

@@ -0,0 +1,2 @@
<!--pages/business0/index.wxml-->
<text>pages/business0/index.wxml</text>

View File

@@ -0,0 +1 @@
/* pages/business0/index.wxss */

View File

@@ -73,7 +73,8 @@ Page({
sharetitle:"", sharetitle:"",
checked:0, checked:0,
vipqx:0, vipqx:0,
loadingHidden:false loadingHidden:false,
fromHot:0
}, },
onLoad: function(options) { onLoad: function(options) {
@@ -88,6 +89,12 @@ Page({
} }
if(options.fromHot){
that.setData({
fromHot:options.fromHot
})
}
that.rdata(0) that.rdata(0)
},onPullDownRefresh: function () { },onPullDownRefresh: function () {

View File

@@ -110,7 +110,7 @@
<view class="selguige_box" wx:for="{{selguiges}}"> <view class="selguige_box" wx:for="{{selguiges}}">
<view class="selguige_item {{(item.selectednum>0?'hover':'')}}" data-id="{{index}}"> <view class="selguige_item {{(item.selectednum>0?'hover':'')}}" data-id="{{index}}">
<view class="select_name">{{item.gg}}<view>兑换券:{{(ttype==6 && addtype==0)?item.jg2:item.jg}}</view><!--<view>金豆:{{item.jg0}}</view>--></view> <view class="select_name">{{item.gg}}<view>{{fromHot==1?'会员价:':'兑换券:'}}{{(ttype==6 && addtype==0)?item.jg2:item.jg}}</view><!--<view>金豆:{{item.jg0}}</view>--></view>
<view class="select_colors" wx:if='{{item.colors!=""}}' bindtap="showcolor" data-id="{{index}}"> <view class="select_colors" wx:if='{{item.colors!=""}}' bindtap="showcolor" data-id="{{index}}">
<view>{{item.selectedcolor==""?"选择颜色":item.selectedcolor}}</view> <view>{{item.selectedcolor==""?"选择颜色":item.selectedcolor}}</view>
</view> </view>

View File

@@ -144,23 +144,23 @@ page{
.shopping_container .spell_list .title text{ .shopping_container .spell_list .title text{
color:#ff0000; color:#ff0000;
} }
.shopping_container .oldprice{ .shopping_container .oldprice{
background:linear-gradient(to right, #6BA3F0, #8BBDF5); background:linear-gradient(to right, #FF6B35, #FF4E50);
margin-right: 0.5em; margin-right: 0.5em;
text-align:center; text-align:center;
line-height:2.5em; line-height:2.5em;
color:#fff; color:#fff;
padding:5px; padding:5px;
border-radius:3px; border-radius:3px;
} }
.shopping_container .oldprice text{ .shopping_container .oldprice text{
text-decoration:line-through; text-decoration:line-through;
} }
.shopping_container .currentprice{ .shopping_container .currentprice{
background:linear-gradient(to right, #6BA3F0, #8BBDF5); background:linear-gradient(to right, #FF6B35, #FF4E50);
text-align:center; text-align:center;
line-height:2.5em; line-height:2.5em;
color:#fff; color:#fff;
padding:5px; padding:5px;
border-radius:3px; border-radius:3px;
} }

View File

@@ -144,23 +144,23 @@ page{
.shopping_container .spell_list .title text{ .shopping_container .spell_list .title text{
color:#ff0000; color:#ff0000;
} }
.shopping_container .oldprice{ .shopping_container .oldprice{
background:linear-gradient(to right, #6BA3F0, #8BBDF5); background:linear-gradient(to right, #FF6B35, #FF4E50);
margin-right: 0.5em; margin-right: 0.5em;
text-align:center; text-align:center;
line-height:2.5em; line-height:2.5em;
color:#fff; color:#fff;
padding:5px; padding:5px;
border-radius:3px; border-radius:3px;
} }
.shopping_container .oldprice text{ .shopping_container .oldprice text{
text-decoration:line-through; text-decoration:line-through;
} }
.shopping_container .currentprice{ .shopping_container .currentprice{
background:linear-gradient(to right, #6BA3F0, #8BBDF5); background:linear-gradient(to right, #FF6B35, #FF4E50);
text-align:center; text-align:center;
line-height:2.5em; line-height:2.5em;
color:#fff; color:#fff;
padding:5px; padding:5px;
border-radius:3px; border-radius:3px;
} }

View File

@@ -1,4 +1,4 @@
var WxParse = null; var WxParse = null;
//获取应用实例 //获取应用实例
var app = getApp() var app = getApp()
var sopenFrame = null var sopenFrame = null
@@ -200,7 +200,7 @@ Page({
}) })
} }
that.getIconList(); that.getIconList();
that.rdata(0); that.rdata(0);
sopenFrame = setInterval(function () { sopenFrame = setInterval(function () {
if (app.globalData.IFRefreshindex == 1) { if (app.globalData.IFRefreshindex == 1) {
@@ -826,7 +826,7 @@ Page({
gotodetail: function (e) { gotodetail: function (e) {
var id = e.currentTarget.dataset.id var id = e.currentTarget.dataset.id
wx.navigateTo({ wx.navigateTo({
url: "../details/index?id=" + id url: "../details/index?id=" + id + "&fromHot=1"
}) })
}, },
gotoPointDetail: function (e) { gotoPointDetail: function (e) {
@@ -1149,31 +1149,35 @@ Page({
var userId = wx.getStorageSync("userId") var userId = wx.getStorageSync("userId")
var LoginId = wx.getStorageSync("LoginId") var LoginId = wx.getStorageSync("LoginId")
var userInfodata = wx.getStorageSync("userInfo") var userInfodata = wx.getStorageSync("userInfo")
if (userId && LoginId && userInfodata) { if (userId && LoginId && userInfodata) {
wx.request({ wx.navigateTo({
url: app.globalData.apiurl + "/api/api.ashx?action=index_about_id", url: "../articledetail/index?ParentID=7"
data: {}, })
method: "POST", // wx.request({
dataType: "json", // url: app.globalData.apiurl + "/api/api.ashx?action=index_about_id",
header: { // data: {},
"content-type": "application/x-www-form-urlencoded" // method: "POST",
}, // dataType: "json",
success(res) { // header: {
if (res.data.status == 1) { // "content-type": "application/x-www-form-urlencoded"
wx.navigateTo({ // },
url: "../articledetail/index?id="+res.data.about_id // success(res) {
}) // if (res.data.status == 1) {
} // wx.navigateTo({
else // url: "../articledetail/index?id="+res.data.about_id
{ // })
wx.showToast({ // }
title: res.data.msg, // else
icon: "none", // {
duration: 3000 // wx.showToast({
}) // title: res.data.msg,
} // icon: "none",
} // duration: 3000
}) // })
// }
// }
// })
} }
else { else {

View File

@@ -38,7 +38,7 @@
</view> </view>
</view> </view>
</view> </view>
<view class="notice_box"> <view class="notice_box" wx:if="{{IFCS==2}}" >
<view class="notice_title"> <view class="notice_title">
<image src="../../images/notice.png"></image><text>最新公告</text> <image src="../../images/notice.png"></image><text>最新公告</text>
</view> </view>
@@ -54,7 +54,7 @@
</view> </view>
<!-- IFCS==1 -->
<view class="mydata_box0" wx:if="{{IFCS==1}}"> <view class="mydata_box0" wx:if="{{IFCS==1}}">
<view class="mydata_box0_bo"> <view class="mydata_box0_bo">
@@ -121,15 +121,15 @@
<block wx:for="{{products}}" wx:for-item="cell" wx:for-index="index0"> <block wx:for="{{products}}" wx:for-item="cell" wx:for-index="index0">
<view class='block {{products.length > 1 ? "block0" : ""}} {{products.length > 1 && index0 % 2 == 0 ? "l" : ""}} {{products.length > 1 && index0 % 2 == 1 ? "r" : ""}}' bindtap="gotodetail" data-id="{{cell._id}}"> <view class='block {{products.length > 1 ? "block0" : ""}} {{products.length > 1 && index0 % 2 == 0 ? "l" : ""}} {{products.length > 1 && index0 % 2 == 1 ? "r" : ""}}' bindtap="gotodetail" data-id="{{cell._id}}">
<view class='choice_item'> <view class='choice_item'>
<view class='choice_item_image'> <image src="{{cell.image}}"/>
<image src="{{cell.image}}" /> <view class="title">{{cell.name}}</view>
</view> <view class="je">
<view class='choice_item_font'> <view class="jeto">
<view class="title">{{cell.name}}</view> <view>零售价: </view>
<view class="price">零售价:¥{{cell.scje}}</view> <view class="scje">¥{{cell.scje}}</view>
<view class="price">会员价:¥{{cell.hyje}}</view> </view>
<view wx:if="{{products.length == 1}}" class="right_button"> <view class="jeto jeto0">
<view>立即购买</view> <view class="viphyj">会员价:<text>¥{{cell.hyje}}</text></view>
</view> </view>
</view> </view>
</view> </view>
@@ -138,7 +138,7 @@
</view> </view>
</view> </view>
</view> </view>
<view class="container_box_to" style="margin-bottom: 6em;"> <view class="container_box_to" style="margin-bottom: 6em;" wx:if="{{IFCS==2}}" >
<view class="choice_text"> <view class="choice_text">
<view class="line_flag"></view> <view class="line_flag"></view>
<text>兑换商城</text> <text>兑换商城</text>
@@ -153,15 +153,11 @@
<block wx:for="{{products0}}" wx:for-item="cell" wx:for-index="index0"> <block wx:for="{{products0}}" wx:for-item="cell" wx:for-index="index0">
<view class='block {{products0.length > 1 ? "block0" : ""}} {{products0.length > 1 && index0 % 2 == 0 ? "l" : ""}} {{products0.length > 1 && index0 % 2 == 1 ? "r" : ""}}' bindtap="gotoPointDetail" data-id="{{cell._id}}"> <view class='block {{products0.length > 1 ? "block0" : ""}} {{products0.length > 1 && index0 % 2 == 0 ? "l" : ""}} {{products0.length > 1 && index0 % 2 == 1 ? "r" : ""}}' bindtap="gotoPointDetail" data-id="{{cell._id}}">
<view class='choice_item'> <view class='choice_item'>
<view class='choice_item_image'> <image src="{{cell.image}}"/>
<image src="{{cell.image}}" /> <view class="title">{{cell.name}}</view>
</view> <view class="je">
<view class='choice_item_font'> <view class="jeto jeto0">
<view class="title">{{cell.name}}</view> <view class="viphyj">兑换券:<text>{{cell.hyje}}</text></view>
<view class="price" style="display:none;">零售价:¥{{cell.scje}}</view>
<view class="price">兑换券:{{cell.hyje}}</view>
<view wx:if="{{products0.length == 1}}" class="right_button">
<view>立即购买</view>
</view> </view>
</view> </view>
</view> </view>

View File

@@ -556,6 +556,7 @@ width: 50%;
padding: 0.5em; padding: 0.5em;
text-align: center; text-align: center;
overflow: hidden; overflow: hidden;
box-sizing: border-box;
} }
.choice_box .choice_list .block.block0.l{ .choice_box .choice_list .block.block0.l{
padding-right: 0.25em; padding-right: 0.25em;
@@ -565,11 +566,9 @@ padding-left: 0.25em;
} }
.choice_box .choice_list .block .choice_item{ .choice_box .choice_list .block .choice_item{
float: left; float: left;
display: flex;
flex-direction: row;
margin-top: 0.8em;
width: 100%; width: 100%;
padding:0; padding:0;
border:1px solid #f1f1f1;
background-color: #fff; background-color: #fff;
border-radius:0.5em; border-radius:0.5em;
box-sizing: border-box; box-sizing: border-box;
@@ -578,29 +577,27 @@ overflow: hidden;
.choice_box .choice_list .block.block0 .choice_item{ .choice_box .choice_list .block.block0 .choice_item{
display:block; display:block;
} }
.choice_box .choice_list .block .choice_item .choice_item_image{
width:10em;
padding: 0.8em;
box-sizing: border-box;
}
.choice_box .choice_list .block .choice_item .choice_item_font{
flex-grow: 1;
display:flex;
flex-direction: column;
margin-top: 0.8em;
}
.choice_box .choice_list .block .choice_item .choice_item_image image{
width:100%;
height:9em;
border-radius:0.5em;
}
.choice_box .choice_list .block.block0 image { .choice_box .choice_list .block.block0 image {
width: 100%; width: 100%;
height:46vw; height:46vw;
} }
/* 单行商品布局优化 */
.choice_box .choice_list .block:not(.block0) {
width: 100%;
padding: 0.5em;
box-sizing: border-box;
}
.choice_box .choice_list .block:not(.block0) .choice_item {
display: block;
}
.choice_box .choice_list .block:not(.block0) image {
width: 100%;
height: 80vw;
max-height: 480px;
object-fit: cover;
}
.choice_box .choice_list .title { .choice_box .choice_list .title {
float: left; float: left;
padding:0 0.5em; padding:0 0.5em;
@@ -661,17 +658,35 @@ box-sizing: border-box;
.choice_box .choice_list .je .jeto{ .choice_box .choice_list .je .jeto{
display: flex; display: flex;
flex-direction:row; flex-direction:row;
margin-top: 0.8em; color: #FF6B35;
background: linear-gradient(to right, #FF6B35, #FF4E50); }
padding: 0.4em 0.4em; .choice_box .choice_list .je .jeto.jeto0{
color:#fff;
border-radius:0.5em; }
box-sizing: border-box; .choice_box .choice_list .je .jeto .viphyj{
display: flex;
flex-direction:row;
margin-top: 0.2em;
font-weight: 600;
}
.choice_box .choice_list .je .jeto .viphyj image{
width:1.2em;
height:1.2em;
margin-top: 0.1em;
margin-right: 0.2em;
}
.choice_box .choice_list .je .jeto .viphyj view{
height:1.5em;
line-height: 1.5em;
} }
.choice_box .choice_list .je .jeto .scje{ .choice_box .choice_list .je .jeto .scje{
text-decoration:line-through; text-decoration:line-through;
} }
.choice_box .choice_list .je .jeto .hyje{
line-height:1.4em;
margin-top: 0.2em;
}
.choice_box .choice_list .block.block0 .title{ .choice_box .choice_list .block.block0 .title{
@@ -679,18 +694,30 @@ text-decoration:line-through;
overflow: hidden; overflow: hidden;
white-space: nowrap; white-space: nowrap;
text-overflow: ellipsis; text-overflow: ellipsis;
} }
.choice_box .choice_list .block.block0 .je { .choice_box .choice_list .block.block0 .je {
float: left; float: left;
width:100%; width:100%;
display: block; display: block;
text-align: center; text-align: left;
}
.choice_box .choice_list .block.block0 .je .jeto {
justify-content: flex-start;
margin-top: 0;
}
.choice_box .choice_list .block.block0 .je .jeto .viphyj {
justify-content: flex-start;
align-items: center;
margin-top: 0.2em;
font-weight: 600;
}
.choice_box .choice_list .block.block0 .je .jeto .viphyj text {
font-weight: bold;
margin-left: 0.2em;
} }
.choice_box .choice_list .block.block0 .je .jeto .hyje{ .choice_box .choice_list .block.block0 .je .jeto .hyje{
margin-top: 0.15em; margin-top: 0.15em;
} }

View File

@@ -1,5 +1,5 @@
page{ page{
background: #ccc; background: linear-gradient(to bottom, #E8F4FC, #F5FAFF);
} }
.container { .container {
position: relative; position: relative;
@@ -93,7 +93,7 @@ page{
display: flex; display: flex;
flex-direction:row; flex-direction:row;
margin-top: 0.8em; margin-top: 0.8em;
background-color: #00B050; background: linear-gradient(to right, #FF6B35, #FF4E50);
padding: 0.4em 0.4em; padding: 0.4em 0.4em;
color:#fff; color:#fff;
border-radius:0.5em; border-radius:0.5em;

View File

@@ -125,20 +125,20 @@ Page({
url: '../myfavorite/index', url: '../myfavorite/index',
text: '我的收藏' text: '我的收藏'
}, { }, {
icon: '../../images/iconfont-kefu.png', icon: '../../images/my_ico12.png',
url: '../mykf/index', url: '../mykf/index',
text: '联系客服' text: '联系客服'
}, { }, {
icon: '../../images/iconfont-set.png', icon: '../../images/my_ico13.png',
url: '../myto/index', url: '../myto/index',
text: '个人设置' text: '个人设置'
}]; }];
if (userInfo.id > 68 && userInfo.bdshEnable == 0) { if (userInfo.id > 68 && userInfo.bdshEnable == 0) {
userlist = [ userlist = [
{ {
icon: '../../images/iconfont-online.png', icon: '../../images/my_ico1.png',
url: (userInfo.sjuLevel0 == 2 ? '../mybusiness0/index' : (userInfo.sjuLevel0 == 1 ? '' : '../appbusiness0/index')), url: (userInfo.sjuLevel0 == 2 ? '../mybusiness0/index' : (userInfo.sjuLevel0 == 1 ? '' : '../appbusiness0/index')),
text: (userInfo.sjuLevel0 == 2 ? '事业部管理' : (userInfo.sjuLevel0 == 1 ? '申请线上供应链正在审核中...' : '申请门店')) text: (userInfo.sjuLevel0 == 2 ? '事业部管理' : (userInfo.sjuLevel0 == 1 ? '申请线上供应链正在审核中...' : '申请健康驿站'))
}, },
{ {
icon: '../../images/my_ico3.png', icon: '../../images/my_ico3.png',
@@ -157,11 +157,11 @@ Page({
url: '../myfavorite/index', url: '../myfavorite/index',
text: '我的收藏' text: '我的收藏'
}, { }, {
icon: '../../images/iconfont-kefu.png', icon: '../../images/my_ico12.png',
url: '../mykf/index', url: '../mykf/index',
text: '联系客服' text: '联系客服'
}, { }, {
icon: '../../images/iconfont-set.png', icon: '../../images/my_ico13.png',
url: '../myto/index', url: '../myto/index',
text: '个人设置' text: '个人设置'
} }
@@ -175,7 +175,7 @@ Page({
}, },
/* /*
{ {
icon: '../../images/iconfont-online.png', icon: '../../images/my_ico1.png',
url:(userInfo.sjuLevel0==2?'../mybusiness0/index':(userInfo.sjuLevel0==1?'正在审核中,请等待审核再来':'../appbusiness0/index')), url:(userInfo.sjuLevel0==2?'../mybusiness0/index':(userInfo.sjuLevel0==1?'正在审核中,请等待审核再来':'../appbusiness0/index')),
text: (userInfo.sjuLevel0==2?'事业部管理':(userInfo.sjuLevel0==1?'申请线上供应链正在审核中...':'申请线上供应链(事业部)')) text: (userInfo.sjuLevel0==2?'事业部管理':(userInfo.sjuLevel0==1?'申请线上供应链正在审核中...':'申请线上供应链(事业部)'))
}, },
@@ -197,11 +197,11 @@ Page({
url: '../myfavorite/index', url: '../myfavorite/index',
text: '我的收藏' text: '我的收藏'
}, { }, {
icon: '../../images/iconfont-kefu.png', icon: '../../images/my_ico12.png',
url: '../mykf/index', url: '../mykf/index',
text: '联系客服' text: '联系客服'
}, { }, {
icon: '../../images/iconfont-set.png', icon: '../../images/my_ico13.png',
url: '../myto/index', url: '../myto/index',
text: '个人设置' text: '个人设置'
} }

View File

@@ -42,9 +42,9 @@
</view> </view>
</view> </view>
<view> <!-- <view>
<button wx:if='{{NCName!="您还没有登录,请先登录!"}}' class="signin-btn" bindtap="onSignIn">{{isSignToday ? "已签到":"立即签到"}}</button> <button wx:if='{{NCName!="您还没有登录,请先登录!"}}' class="signin-btn" bindtap="onSignIn">{{isSignToday ? "已签到":"立即签到"}}</button>
</view> </view> -->
</view> </view>
</view> </view>

View File

@@ -1,5 +1,5 @@
page{ page{
background: #ccc; background: linear-gradient(to bottom, #E8F4FC, #F5FAFF);
} }
.container { .container {
position: relative; position: relative;
@@ -21,7 +21,7 @@ page{
.myorder-item view.cz_box{ margin-top: 0.5em;} .myorder-item view.cz_box{ margin-top: 0.5em;}
.myorder-item view.Total{color:#ff4d00;} .myorder-item view.Total{color:#ff4d00;}
.myorder-item view.cz_box text{float: left; display: block;width:auto;} .myorder-item view.cz_box text{float: left; display: block;width:auto;}
.myorder-item view.cz_box view{float: left; display: block;width:auto; margin-right:0.5em; padding:0 0.5em; height:2.5em; line-height: 2.5em; background:linear-gradient(to right,#00B050,#00B050); color:#fff; border-radius:0.2em; box-sizing: border-box; overflow: hidden;} .myorder-item view.cz_box view{float: left; display: block;width:auto; margin-right:0.5em; padding:0 0.5em; height:2.5em; line-height: 2.5em; background:linear-gradient(to right, #6BA3F0, #8BBDF5); color:#fff; border-radius:0.2em; box-sizing: border-box; overflow: hidden;}
.myorder-item view.products{ margin-top: 1em;} .myorder-item view.products{ margin-top: 1em;}
.myorder-item view.products image{width:4em;height:4em; vertical-align: middle;} .myorder-item view.products image{width:4em;height:4em; vertical-align: middle;}
.myorder-item view.products text{margin-left: 1em;} .myorder-item view.products text{margin-left: 1em;}
@@ -46,7 +46,7 @@ page{
.Hidden_box_to .frombody .pay_box view image{width:1.4em;height:1.4em;} .Hidden_box_to .frombody .pay_box view image{width:1.4em;height:1.4em;}
.Hidden_box_to .frombody .pay_box view view{flex-grow: 1;line-height:100%;height:100%; border:0;} .Hidden_box_to .frombody .pay_box view view{flex-grow: 1;line-height:100%;height:100%; border:0;}
.Hidden_box_to view.button{margin:1em 0; border: 0;} .Hidden_box_to view.button{margin:1em 0; border: 0;}
.Hidden_box_to view.button button{width:100%;padding:0 1em; height:2em; line-height: 2em; background:linear-gradient(to right,#00B050,#00B050); color:#fff; border-radius:0.2em;} .Hidden_box_to view.button button{width:100%;padding:0 1em; height:2em; line-height: 2em; background:linear-gradient(to right, #6BA3F0, #8BBDF5); color:#fff; border-radius:0.2em;}
.nodata{padding-top:1em; text-align: center; line-height: 1.5em; color:#939393;} .nodata{padding-top:1em; text-align: center; line-height: 1.5em; color:#939393;}

View File

@@ -1,55 +1 @@
page{
background: #ccc;
}
.container {
position: relative;
width: 100%;
height: 100%;
font-size: 14px;
color: #000;
}
.myorder-menu{display: flex;flex-direction: row;align-items: center;justify-content: center;width:100%; background-color: #fff;}
.myorder-menu view{width:25%; height:2.5em; line-height: 2.5em; text-align: center; border:1px solid #f1f1f1; border-left:0;border-top: 0;}
.myorder-menu view.hover{border-bottom:1px solid #ff4d00;}
.myorder-box{display: flex;flex-direction: column;align-items: center;justify-content: center;width:100%;padding:0.8em; box-sizing: border-box;}
.myorder-item{width:100%;display: flex;flex-direction: column; align-items: center;justify-content: center;box-sizing: border-box; padding:0.8em; margin:0.8em 0; margin-top: 0; line-height: 2.5em; background-color:#fff;border-radius:0.5em;}
.myorder-item view{width:100%;display: flex;flex-direction: row; align-items: center;justify-content:left;color: #939393;}
.myorder-item view text{color: #000;}
.myorder-item view text.Totalprice{ margin-left: 1em;}
.myorder-item view.cz_box{ margin-top: 0.5em;}
.myorder-item view.Total{color:#ff4d00;}
.myorder-item view.cz_box text{float: left; display: block;width:auto;}
.myorder-item view.cz_box view{float: left; display: block;width:auto; margin-right:0.5em; padding:0 0.5em; height:2.5em; line-height: 2.5em; background:linear-gradient(to right,#00B050,#00B050); color:#fff; border-radius:0.2em; box-sizing: border-box; overflow: hidden;}
.myorder-item view.products{ margin-top: 1em;}
.myorder-item view.products image{width:4em;height:4em; vertical-align: middle;}
.myorder-item view.products text{margin-left: 1em;}
.Hidden_box{ position: fixed;display: flex;align-items: center; justify-content: center; top:0; left:0; width:100%;height:100vh; background:rgba(0, 0, 0, 0.5);}
.Hidden_box_to{position: relative; padding: 8px; width:98%;height:auto; background-color: #fff; box-sizing: border-box; border-radius:0.5em;}
.Hidden_box_to.addcart_box{ position: absolute; bottom:0; width:100%;border-radius:0.5em 0.5em 0 0;}
.Hidden_box_to .Hidden_box_title{width:100%;height:2.5em; line-height: 2.5em; text-align: left; padding-left:1em; box-sizing: border-box;border-bottom:1px solid #f1f1f1;}
.Hidden_box_to .close{position: absolute; right:0.5em; top:0.5em; width:1.5em; height:1.5em; padding:0.15em; background-color:#fff;border:1px solid #f1f1f1;border-radius:50%;box-sizing:border-box;}
.Hidden_box_to .close image{float:left;width:100%;height:100%; position: relative;}
.Hidden_box_to .title{width:100%;height:2.5em;}
.Hidden_box_to .frombody{display: flex;flex-direction: column;flex: 1; max-height: 24em; align-items: center;justify-content: center;overflow: hidden; overflow-y: auto; -webkit-overflow-scrolling: touch;}
.Hidden_box_to .frombody image{width: 100%;}
.Hidden_box_to .frombody view{display: flex; flex-direction: row; width: 100%;margin: 0.8em 0;}
.Hidden_box_to .frombody view text{width: 7em; margin-top:0.4em;}
.Hidden_box_to .frombody view input{width:100%;height: 2em; border:1px #dfdfdf solid; background-color: #f1f1f1; border-radius:0.4em;padding:0 0.2em;box-sizing: border-box;}
.pay_box{margin-top: 1em;}
.pay_box text{display: block; float:left; width:10%; height:2.5em;}
.pay_box text.pay_type{width:auto;line-height:2.5em;}
.pay_box view{float:left; padding:0 0.2em; margin-right:0.2em; display: flex; align-items: center; justify-content: center;line-height:2em; border:1px solid #f1f1f1; box-sizing: border-box;border-radius:0.5em;}
.pay_box view.hover{border:1px solid #ff4d00;}
.pay_box view image{width:1.4em;height:1.4em;}
.Hidden_box_to view.button{margin:1em 0; border: 0;}
.Hidden_box_to view.button button{width:100%;padding:0 1em; height:2em; line-height: 2em; background:linear-gradient(to right,#00B050,#00B050); color:#fff; border-radius:0.2em;}
.nodata{padding-top:1em; text-align: center; line-height: 1.5em; color:#939393;}
.nodata image {
width: 80px;
height: 80px;
}

View File

@@ -1,6 +1,6 @@
/**index.wxss**/ /**index.wxss**/
page{ page{
background: #ccc; background: linear-gradient(to bottom, #E8F4FC, #F5FAFF);
} }
.container { .container {
position: relative; position: relative;
@@ -79,10 +79,10 @@ page{
} }
.Hidden_box_to .yqm-box{position:fixed; bottom:2.8em; left:0; display: flex; flex-direction: row; text-align: center;z-index: 1000000; width:100%; background-color: #fff; padding:0.5em; box-sizing: border-box;align-items: center; justify-content: center; } .Hidden_box_to .yqm-box{position:fixed; bottom:2.8em; left:0; display: flex; flex-direction: row; text-align: center;z-index: 1000000; width:100%; background-color: #fff; padding:0.5em; box-sizing: border-box;align-items: center; justify-content: center; }
.Hidden_box_to .yqm-box view{width:60%;text-align: right;} .Hidden_box_to .yqm-box view{width:60%;text-align: right;}
.Hidden_box_to .yqm-box button{margin-left:0.5em; padding:0; width:5em;height:2em;line-height:2em;background:linear-gradient(to right,#00B050,#00B050); text-align: center; color:#fff;border-radius:0.5em; font-size: 0.85em; .Hidden_box_to .yqm-box button{margin-left:0.5em; padding:0; width:5em;height:2em;line-height:2em;background:linear-gradient(to right, #6BA3F0, #8BBDF5); text-align: center; color:#fff;border-radius:0.5em; font-size: 0.85em;
} }
.Hidden_box_to .savebutton{position:fixed; bottom:0em; left:0; display: flex; flex-direction: row; text-align: center;z-index: 1000000; width:100%; background-color: #fff; padding:0.5em; box-sizing: border-box;} .Hidden_box_to .savebutton{position:fixed; bottom:0em; left:0; display: flex; flex-direction: row; text-align: center;z-index: 1000000; width:100%; background-color: #fff; padding:0.5em; box-sizing: border-box;}
.Hidden_box_to .savebutton button{margin:0 auto; margin-top:0.2em; padding:0; display: block; width:10em;height:2em;line-height:2em;background:linear-gradient(to right,#00B050,#00B050); text-align: center; color:#fff;border-radius:0.5em; font-size: 0.85em; .Hidden_box_to .savebutton button{margin:0 auto; margin-top:0.2em; padding:0; display: block; width:10em;height:2em;line-height:2em;background:linear-gradient(to right, #6BA3F0, #8BBDF5); text-align: center; color:#fff;border-radius:0.5em; font-size: 0.85em;
} }
.Hidden_box_to .savebutton button.register{width:9em; margin-left:0.5em;} .Hidden_box_to .savebutton button.register{width:9em; margin-left:0.5em;}
.Hidden_box_to .savebutton button.copy{width:8em; margin-left:0.5em;} .Hidden_box_to .savebutton button.copy{width:8em; margin-left:0.5em;}

View File

@@ -1,6 +1,6 @@
/**index.wxss**/ /**index.wxss**/
page{ page{
background: #ccc; background: linear-gradient(to bottom, #E8F4FC, #F5FAFF);
} }
.container { .container {
position: relative; position: relative;
@@ -10,12 +10,12 @@ page{
color: #000; color: #000;
} }
.userinfo { .userinfo {
display: flex; display: flex;
flex-direction: row; flex-direction: row;
padding: 50rpx 0; padding: 50rpx 0;
align-items: center; align-items: center;
background: linear-gradient(to bottom,#fe3882,#ff3047); background: linear-gradient(to bottom, #96C6F5, #B8DAF8);
} }
.userinfo-avatar { .userinfo-avatar {
@@ -82,7 +82,7 @@ page{
align-items: center; align-items: center;
width: 100%; width: 100%;
height:3em; height:3em;
background-color: #f52c32; background: linear-gradient(to right, #6BA3F0, #8BBDF5);
} }
.mydata_box view{ .mydata_box view{
margin-top:0.5em; margin-top:0.5em;
@@ -118,7 +118,7 @@ page{
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
color: #d4237a; color: #6BA3F0;
box-sizing: border-box; box-sizing: border-box;
} }
.mydata_box0 view.umoney1{ .mydata_box0 view.umoney1{
@@ -178,7 +178,7 @@ page{
background-size: 100% 100%; background-size: 100% 100%;
} }
.logoutbutton{width: 100%; margin-top: 0em; padding:0.8em; box-sizing: border-box;} .logoutbutton{width: 100%; margin-top: 0em; padding:0.8em; box-sizing: border-box;}
.logoutbutton button{width:100%;height:2.5em; line-height: 2.5em; background:linear-gradient(to right,#00B050,#00B050); color:#fff; border-radius:0.5em;} .logoutbutton button{width:100%;height:2.5em; line-height: 2.5em; background:linear-gradient(to right, #6BA3F0, #8BBDF5); color:#fff; border-radius:0.5em;}
.Hidden_box{ position: fixed;display: flex;align-items: center; justify-content: center; top:0; left:0; width:100%;height:100vh; background:rgba(0, 0, 0, 0.5);} .Hidden_box{ position: fixed;display: flex;align-items: center; justify-content: center; top:0; left:0; width:100%;height:100vh; background:rgba(0, 0, 0, 0.5);}
.Hidden_box_to{position: relative; padding: 8px; width:90%;height:auto; background-color: #fff; box-sizing: border-box; border-radius:0.5em;} .Hidden_box_to{position: relative; padding: 8px; width:90%;height:auto; background-color: #fff; box-sizing: border-box; border-radius:0.5em;}

View File

@@ -73,7 +73,7 @@ Page({
"pagePath": "/pages/business/index", "pagePath": "/pages/business/index",
"iconPath": "/images/footer-icon-005.png", "iconPath": "/images/footer-icon-005.png",
"selectedIconPath": "/images/footer-icon-005-active.png", "selectedIconPath": "/images/footer-icon-005-active.png",
"text": "门店" "text": "健康驿站"
}, },
{ {

View File

@@ -1,6 +1,6 @@
/**index.wxss**/ /**index.wxss**/
page{ page{
background: #ccc; background: linear-gradient(to bottom, #E8F4FC, #F5FAFF);
} }
.container { .container {
position: relative; position: relative;
@@ -34,11 +34,11 @@ page{
.login-box .frombody view.area image{position: absolute; top:1.1em; right:0; width:1.2em;height:1.2em;} .login-box .frombody view.area image{position: absolute; top:1.1em; right:0; width:1.2em;height:1.2em;}
.login-box .frombody view.readbox{display:block; text-align: left;width:100%;line-height:1.5em; font-size:1.2em; font-weight: 800;} .login-box .frombody view.readbox{display:block; text-align: left;width:100%;line-height:1.5em; font-size:1.2em; font-weight: 800;}
.login-box .frombody view.readbox view{margin:0;padding:0; display: inline; } .login-box .frombody view.readbox view{margin:0;padding:0; display: inline; }
.login-box .frombody view.readbox view.red{color: #00B050;} .login-box .frombody view.readbox view.red{color: #6BA3F0;}
.login-box .frombody view.readbox view.and{color:#000;} .login-box .frombody view.readbox view.and{color:#000;}
.login-box .frombody view.readbox view image{width:1.4em;height:1.4em;} .login-box .frombody view.readbox view image{width:1.4em;height:1.4em;}
.login-box .frombody view.button{border: 0;} .login-box .frombody view.button{border: 0;}
.login-box .frombody view.button button{width:100%;height:2.5em; line-height: 2.5em; background:linear-gradient(to right,#00B050,#00B050); color:#fff; border-radius:0.5em;} .login-box .frombody view.button button{width:100%;height:2.5em; line-height: 2.5em; background:linear-gradient(to right, #6BA3F0, #8BBDF5); color:#fff; border-radius:0.5em;}
.login-box .frombody view .picker_hx{color:#939393;line-height:2.5em;} .login-box .frombody view .picker_hx{color:#939393;line-height:2.5em;}
.login-box .frombody view .picker_hx view{ float:left; position: relative; display: block; border:0;min-width:14em; padding:0 1em; box-sizing: border-box;border:1px solid #dfdfdf;border-radius:0.3em;height:2.5em;line-height:2.5em;} .login-box .frombody view .picker_hx view{ float:left; position: relative; display: block; border:0;min-width:14em; padding:0 1em; box-sizing: border-box;border:1px solid #dfdfdf;border-radius:0.3em;height:2.5em;line-height:2.5em;}
.login-box .frombody view .picker_hx image{position: absolute; top:0.6em;right:0.6em; width:1.2em;height:1.2em;} .login-box .frombody view .picker_hx image{position: absolute; top:0.6em;right:0.6em; width:1.2em;height:1.2em;}

View File

@@ -1,4 +1,4 @@
var WxParse = null; var WxParse = null;
//获取应用实例 //获取应用实例
var app = getApp() var app = getApp()
var sopenFrame=null; var sopenFrame=null;
@@ -43,6 +43,71 @@ Page({
that=this; that=this;
WxParse = require('../../wxParse/wxParse.js'); WxParse = require('../../wxParse/wxParse.js');
// ============================================
// 【测试数据配置区域 - 开始】
// 用途用于本地测试swiper组件渲染效果
// 使用方法:将 useTestData 设为 true 启用测试数据,设为 false 恢复正式数据
// 注意:测试完成后请将 useTestData 设为 false 或删除测试代码块
// ============================================
var useTestData = false; // 切换开关true=使用测试数据false=使用后端数据
if (useTestData) {
// 虚拟测试数据 - 用于验证swiper组件渲染效果
var testData = {
ifxn: 1, // 控制wx:if条件显示
indicatorDots0: true, // 显示指示点
vertical0: false, // 水平轮播
autoplay: true, // 自动播放
interval0: 3000, // 轮播间隔3秒
duration: 500, // 动画时长0.5秒
loadingHidden: true, // 隐藏loading
// images1数组包含3个swiper-item每个item包含4个cell
images1: [
{
datas: [
{ id: '1', label: '手机数码', img: 'https://picsum.photos/200/200?random=1' },
{ id: '2', label: '电脑办公', img: 'https://picsum.photos/200/200?random=2' },
{ id: '3', label: '家用电器', img: 'https://picsum.photos/200/200?random=3' },
{ id: '4', label: '服饰鞋包', img: 'https://picsum.photos/200/200?random=4' }
]
},
// {
// datas: [
// { id: '5', label: '美妆护肤', img: 'https://picsum.photos/200/200?random=5' },
// { id: '6', label: '食品生鲜', img: 'https://picsum.photos/200/200?random=6' },
// { id: '7', label: '家居家装', img: 'https://picsum.photos/200/200?random=7' },
// { id: '8', label: '运动户外', img: 'https://picsum.photos/200/200?random=8' }
// ]
// },
// {
// datas: [
// { id: '9', label: '图书音像', img: 'https://picsum.photos/200/200?random=9' },
// { id: '10', label: '母婴用品', img: 'https://picsum.photos/200/200?random=10' },
// { id: '11', label: '汽车用品', img: 'https://picsum.photos/200/200?random=11' },
// { id: '12', label: '玩具乐器', img: 'https://picsum.photos/200/200?random=12' }
// ]
// }
],
// 其他必要数据
images: [
{ url: '1', img: 'https://picsum.photos/750/300?random=101' },
{ url: '2', img: 'https://picsum.photos/750/300?random=102' },
{ url: '3', img: 'https://picsum.photos/750/300?random=103' }
],
Products: [],
Products0: []
};
that.setData(testData);
console.log('【测试模式】已加载虚拟测试数据');
// 测试数据模式下不调用后端接口,防止数据被覆盖
return;
}
// ============================================
// 【测试数据配置区域 - 结束】
// ============================================
/*var shopdata = wx.getStorageSync('shopdata') /*var shopdata = wx.getStorageSync('shopdata')
if(shopdata){ if(shopdata){
var resshopdata=JSON.parse(shopdata); var resshopdata=JSON.parse(shopdata);
@@ -124,21 +189,41 @@ clearCache:function(){
success (res) { success (res) {
if(res.data.status==1){ if(res.data.status==1){
wx.setStorageSync('shopdata', JSON.stringify(res.data)) wx.setStorageSync('shopdata', JSON.stringify(res.data))
// 转换 pic1 数据格式:将扁平数组包装为包含 datas 的嵌套结构
var pic1Data = res.data.pic1 || []
var formattedImages1 = []
if (pic1Data.length > 0) {
// 每8个一组进行分组双行显示每行4个分类
var groupSize = 8
for (var i = 0; i < pic1Data.length; i += groupSize) {
formattedImages1.push({
datas: pic1Data.slice(i, i + groupSize)
})
}
}
that.setData({ that.setData({
images: res.data.pic, images: res.data.pic || [],
images1: res.data.pic1, images1: formattedImages1,
Products:res.data.products, Products:res.data.products || [],
Products0:res.data.products0, Products0:res.data.products0 || [],
loadingHidden:true loadingHidden:true
}) })
if(res.data.ifxn==1){
if(res.data.userInfo.ifxn==0){
that.setData({ that.setData({
ifxn:1 ifxn:1
}) })
} }
// if(res.data.userInfo && res.data.userInfo.ifxn==0){
// that.setData({
// ifxn:1
// })
// }
// that.setData({
// ifxn:1
// })
if(t==1){ if(t==1){
//隐藏loading 提示框 //隐藏loading 提示框
wx.hideLoading(); wx.hideLoading();

View File

@@ -1,7 +1,7 @@
<!--index.wxml--> <!--index.wxml-->
<import src="../../wxParse/wxParse.wxml"/> <import src="../../wxParse/wxParse.wxml"/>
<view class="container"> <view class="container">
<view> <view>
<swiper class="swiper_box" indicator-dots="{{indicatorDots}}" vertical="{{vertical}}" circular="true" <swiper class="swiper_box" indicator-dots="{{indicatorDots}}" vertical="{{vertical}}" circular="true"
autoplay="{{autoplay}}" interval="{{interval}}" duration="{{duration}}" bindchange="swiperchange"> autoplay="{{autoplay}}" interval="{{interval}}" duration="{{duration}}" bindchange="swiperchange">
<block wx:for="{{images}}" wx:key="index"> <block wx:for="{{images}}" wx:key="index">
@@ -10,24 +10,29 @@
</swiper-item> </swiper-item>
</block> </block>
</swiper> </swiper>
</view> </view>
<view class="mydata_box0" wx:if="{{ifxn==1}}"> <view class="mydata_box0" wx:if="{{ifxn==1}}">
<view> <view class="category-grid">
<swiper class="swiper_box0" indicator-dots="{{indicatorDots0}}" vertical="{{vertical0}}" circular="true" <view class="category-group" wx:for="{{images1}}" wx:for-item="groupItem" wx:for-index="groupIndex">
autoplay="{{autoplay}}" interval="{{interval0}}" duration="{{duration}}" bindchange="swiperchange0"> <view class="category-row">
<swiper-item wx:for="{{images1}}"> <view class="category-item" wx:for="{{groupItem.datas}}" wx:for-item="cell" wx:for-index="cellIndex" wx:if="{{cellIndex < 4}}" bindtap="onnav" data-id='{{cell.id+"&title="+cell.label}}'>
<view wx:for="{{item.datas}}" wx:for-item="cell" wx:for-index="index0" bindtap="onnav" data-id='{{cell.id+"&title="+cell.label}}'> <image src='{{cell.img}}'></image>
<image src='{{cell.img}}'></image> <text>{{cell.label}}</text>
<text>{{cell.label}}</text> </view>
</view> </view>
</swiper-item> <view class="category-row" wx:if="{{groupItem.datas.length > 4}}">
</swiper> <view class="category-item" wx:for="{{groupItem.datas}}" wx:for-item="cell" wx:for-index="cellIndex" wx:if="{{cellIndex >= 4}}" bindtap="onnav" data-id='{{cell.id+"&title="+cell.label}}'>
<image src='{{cell.img}}'></image>
<text>{{cell.label}}</text>
</view>
</view>
</view>
</view> </view>
</view> </view>
<view class="choice_text"> <view class="choice_text">
<view class="line_flag"></view> <view class="line_flag"></view>
<text>热门商品</text> <text>优选商品</text>
<view class="more"></view> <view class="more"></view>
</view> </view>
<view class="choice_box"> <view class="choice_box">

View File

@@ -164,47 +164,66 @@ swiper-item image {
box-sizing: border-box; box-sizing: border-box;
z-index: 10; z-index: 10;
} }
.mydata_box0 view{ .mydata_box0 .category-grid{
display:block; display: flex;
float:left; flex-direction: column;
width: 100%; width: 100%;
padding: 0.4em 0; padding: 0.3em 0;
padding-bottom: 0.4em;
border-radius:0.5em; border-radius:0.5em;
background-color:#fff; background-color:#fff;
box-sizing: border-box; box-sizing: border-box;
} }
.mydata_box0 view .swiper_box0 { .mydata_box0 .category-group {
display:block; display: flex;
float:left; flex-direction: column;
width: 100%; width: 100%;
height:11em; }
} .mydata_box0 .category-row {
.mydata_box0 .swiper_box0 .wx-swiper-dots{bottom: 0em;} display: flex;
.mydata_box0 view view{ flex-direction: row;
float: left; width: 100%;
justify-content: flex-start;
padding: 0.1em 0;
}
.mydata_box0 .category-group .category-row:first-child {
padding-top: 0.15em;
}
.mydata_box0 .category-group .category-row:last-child {
padding-bottom: 0.15em;
}
.mydata_box0 .category-item {
display: flex; display: flex;
width: 25%;
height: 6em;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
width: 25%;
height: 5.5em;
box-sizing: border-box; box-sizing: border-box;
font-size:0.9em; font-size:0.9em;
transition: transform 0.15s ease;
} }
.mydata_box0 .category-item:active {
.mydata_box0 view view image{ transform: scale(0.96);
width: 3em; }
.mydata_box0 .category-item image{
width: 3em;
height: 3em; height: 3em;
padding:0; padding:0;
background-color: #f5f5f5; background-color: #f0f0f0;
border-radius:0.4em; border-radius:0.5em;
overflow: hidden; overflow: hidden;
box-sizing: border-box; box-sizing: border-box;
object-fit: cover;
} }
.mydata_box0 view view text{ .mydata_box0 .category-item text{
margin-top: 0.4em; margin-top: 0.35em;
font-size: 0.85em;
color: #444;
text-align: center;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
width: 92%;
} }
.text{ .text{

View File

@@ -70,7 +70,7 @@ Page( {
"pagePath": "/pages/business/index", "pagePath": "/pages/business/index",
"iconPath": "/images/footer-icon-005.png", "iconPath": "/images/footer-icon-005.png",
"selectedIconPath": "/images/footer-icon-005-active.png", "selectedIconPath": "/images/footer-icon-005-active.png",
"text": "门店" "text": "健康驿站"
}, },
{ {