信息变更
parent
5b13b21314
commit
6ca01232dd
|
@ -1,8 +1,8 @@
|
|||
<template>
|
||||
<view>
|
||||
<view style="height: 56px;font-size: 10px;border-top: 1rpx solid #FFFFFF;background-color: #FFFFFF;
|
||||
position: fixed;bottom: 0;left: 0;right: 0;display: flex;justify-content: space-around;align-items: center;">
|
||||
<view @tap="choosefoot(index)" v-for="(item,index) in tabArr" :key="index" style="display: flex;justify-content: center;flex-direction: column;align-items: center;">
|
||||
position: fixed;bottom: 0;left: 0;right: 0;display: flex;justify-content: space-around;align-items: center;z-index: 10;">
|
||||
<view v-if="user_type=='personal' && index!=2" :style="{width:(user_type=='personal')?'33.3%':'25%'}" @tap="choosefoot(index)" v-for="(item,index) in tabArr" :key="index" style="display: flex;justify-content: center;flex-direction: column;align-items: center;">
|
||||
<image v-if="current==index" :src="item.selectedIconPath" style="width: 22px;height: 22px;"></image>
|
||||
<image v-else :src="item.iconPath" style="width: 22px;height: 22px;"></image>
|
||||
<view :class="current==index?'footactive':'footmo'" style="margin-top: 4px;">{{item.text}}</view>
|
||||
|
@ -13,6 +13,12 @@
|
|||
<script>
|
||||
export default {
|
||||
name:'footTab',
|
||||
props:{
|
||||
current:{
|
||||
type:Number,
|
||||
default:0
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
tabArr:[
|
||||
|
@ -41,12 +47,17 @@
|
|||
'text': '我的'
|
||||
},
|
||||
],
|
||||
current:0
|
||||
// current:0
|
||||
user_type:uni.getStorageSync('user_type')
|
||||
};
|
||||
},
|
||||
methods:{
|
||||
choosefoot(index){
|
||||
this.current = index
|
||||
if(index==0) uni.reLaunch({url:'/pages/tabbar/homePage/homePage'})
|
||||
if(index==1) uni.reLaunch({url:'/pages/tabbar/product/product'})
|
||||
if(index==2) uni.reLaunch({url:'/pages/tabbar/shoppingCart/shoppingCart'})
|
||||
if(index==3) uni.reLaunch({url:'/pages/tabbar/my/my'})
|
||||
// this.current = index
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -88,15 +88,15 @@
|
|||
})
|
||||
}
|
||||
if(this.whereCome==2){
|
||||
uni.switchTab({url:'/pages/tabbar/homePage/homePage'})
|
||||
uni.reLaunch({url:'/pages/tabbar/homePage/homePage'})
|
||||
return
|
||||
}
|
||||
if(this.whereCome==1){
|
||||
uni.switchTab({url:'/pages/tabbar/my/my'})
|
||||
uni.reLaunch({url:'/pages/tabbar/my/my'})
|
||||
return
|
||||
}
|
||||
if(this.whereCome==3){
|
||||
uni.switchTab({url:'/pages/tabbar/product/product'})
|
||||
uni.reLaunch({url:'/pages/tabbar/product/product'})
|
||||
return
|
||||
}
|
||||
uni.navigateBack({delta:1})
|
||||
|
|
|
@ -48,6 +48,8 @@
|
|||
this.$requst.post('order/shopping-cart-add',{sku_id:id,num:1}).then(res=>{
|
||||
if(res.code==0){
|
||||
this.$toolAll.tools.showToast('添加购物车成功(*^▽^*)')
|
||||
} else {
|
||||
this.$toolAll.tools.showToast(res.msg)
|
||||
}
|
||||
},error=>{})
|
||||
}
|
||||
|
|
2
main.js
2
main.js
|
@ -2,6 +2,8 @@ import Vue from 'vue'
|
|||
import App from './App'
|
||||
import statusNav from './components/status-nav.vue';//引入状态栏组件
|
||||
Vue.component('status-nav',statusNav)//挂载状态栏组件
|
||||
import footTab from './components/footTab.vue';//引入底部导航组件
|
||||
Vue.component('foot-tab',footTab)//挂载底部导航组件
|
||||
const newwidth = uni.getSystemInfoSync().screenWidth//获取屏幕宽度
|
||||
Vue.prototype.$newwidth = newwidth//挂载屏幕宽度
|
||||
const statusH = uni.getSystemInfoSync().statusBarHeight//获取状态栏高
|
||||
|
|
70
pages.json
70
pages.json
|
@ -156,40 +156,40 @@
|
|||
"navigationBarBackgroundColor": "#f5f5f5",//导航栏背景色
|
||||
"backgroundColor": "#f5f5f5",//窗口背景色
|
||||
"navigationStyle":"custom"//去掉所有原生导航栏
|
||||
},
|
||||
"tabBar": {
|
||||
// "height":"56px",//底部tab高度
|
||||
// "fontSize":"10px",//字体大小
|
||||
// "iconWidth":"22px",//图标宽高等比缩放
|
||||
// "spacing":"4px",//图标和文字距离
|
||||
"borderStyle": "white",//线条颜色
|
||||
"backgroundColor": "#FFFFFF",//背景颜色
|
||||
"color": "#aaaeb7",//默认字体颜色
|
||||
"selectedColor": "#214995",//选中字体颜色
|
||||
"list": [{
|
||||
"pagePath": "pages/tabbar/homePage/homePage",
|
||||
"iconPath": "static/img/tabbar/pagem.png",
|
||||
"selectedIconPath": "static/img/tabbar/pageh.png",
|
||||
"text": "首页"
|
||||
},
|
||||
{
|
||||
"pagePath": "pages/tabbar/product/product",
|
||||
"iconPath": "static/img/tabbar/productm.png",
|
||||
"selectedIconPath": "static/img/tabbar/product.png",
|
||||
"text": "产品"
|
||||
},
|
||||
{
|
||||
"pagePath": "pages/tabbar/shoppingCart/shoppingCart",
|
||||
"iconPath": "static/img/tabbar/chem.png",
|
||||
"selectedIconPath": "static/img/tabbar/chem.png",
|
||||
"text": "购物车"
|
||||
},
|
||||
{
|
||||
"pagePath": "pages/tabbar/my/my",
|
||||
"iconPath": "static/img/tabbar/mym.png",
|
||||
"selectedIconPath": "static/img/tabbar/my.png",
|
||||
"text": "我的"
|
||||
}
|
||||
]
|
||||
}
|
||||
// "tabBar": {
|
||||
// // "height":"56px",//底部tab高度
|
||||
// // "fontSize":"10px",//字体大小
|
||||
// // "iconWidth":"22px",//图标宽高等比缩放
|
||||
// // "spacing":"4px",//图标和文字距离
|
||||
// "borderStyle": "white",//线条颜色
|
||||
// "backgroundColor": "#FFFFFF",//背景颜色
|
||||
// "color": "#aaaeb7",//默认字体颜色
|
||||
// "selectedColor": "#214995",//选中字体颜色
|
||||
// "list": [{
|
||||
// "pagePath": "pages/tabbar/homePage/homePage",
|
||||
// "iconPath": "static/img/tabbar/pagem.png",
|
||||
// "selectedIconPath": "static/img/tabbar/pageh.png",
|
||||
// "text": "首页"
|
||||
// },
|
||||
// {
|
||||
// "pagePath": "pages/tabbar/product/product",
|
||||
// "iconPath": "static/img/tabbar/productm.png",
|
||||
// "selectedIconPath": "static/img/tabbar/product.png",
|
||||
// "text": "产品"
|
||||
// },
|
||||
// {
|
||||
// "pagePath": "pages/tabbar/shoppingCart/shoppingCart",
|
||||
// "iconPath": "static/img/tabbar/chem.png",
|
||||
// "selectedIconPath": "static/img/tabbar/chem.png",
|
||||
// "text": "购物车"
|
||||
// },
|
||||
// {
|
||||
// "pagePath": "pages/tabbar/my/my",
|
||||
// "iconPath": "static/img/tabbar/mym.png",
|
||||
// "selectedIconPath": "static/img/tabbar/my.png",
|
||||
// "text": "我的"
|
||||
// }
|
||||
// ]
|
||||
// }
|
||||
}
|
||||
|
|
|
@ -77,7 +77,7 @@
|
|||
</view> -->
|
||||
</view>
|
||||
<!-- 分类列表 -->
|
||||
<view class="width100">
|
||||
<view class="width100 padding-x120">
|
||||
<!-- 分类 -->
|
||||
<scroll-view scroll-x="true" style="height: 80rpx;">
|
||||
<view class="disba margin20 catebox">
|
||||
|
@ -95,6 +95,7 @@
|
|||
<backTop :showTop="showTop" @backTop="backTop"></backTop>
|
||||
<!-- <footTab></footTab> -->
|
||||
</view>
|
||||
<foot-tab></foot-tab>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
|
@ -157,8 +158,29 @@
|
|||
e.scrollTop > 360 ? this.showTop = true : this.showTop = false
|
||||
},
|
||||
onShow() {
|
||||
this.$toolAll.tools.guoq()
|
||||
uni.showTabBar()
|
||||
uni.login({
|
||||
provider: 'weixin',
|
||||
success: (res)=> {
|
||||
if (res.code) {
|
||||
var params = {code:res.code}
|
||||
this.$requst.post('user/wxAppletsLogin',params).then(res=>{
|
||||
if(res.code==0){
|
||||
if(res.data.token!=''){
|
||||
uni.setStorageSync('token',res.data.token)//缓存token
|
||||
uni.setStorageSync('openid',res.data.openid)//缓存Openid
|
||||
uni.setStorageSync('expire',res.data.expire)//缓存失效时间(时间戳格式)
|
||||
uni.setStorageSync('is_active',res.data.is_active)//是否第一次授权
|
||||
uni.setStorageSync('user_type',res.data.user_type)//权限
|
||||
this.checkList()//商品列表查询事件
|
||||
}
|
||||
} else {
|
||||
this.$toolAll.tools.showToast(res.msg)
|
||||
}
|
||||
},error=>{})
|
||||
}
|
||||
},
|
||||
});
|
||||
},
|
||||
onLoad(options) {
|
||||
const query = wx.createSelectorQuery().in(this)
|
||||
|
@ -184,14 +206,6 @@
|
|||
this.requestGao()//查询公告
|
||||
this.reMen()//查询热门产品
|
||||
this.shaiEv()//查询商品分类
|
||||
let timer = setInterval(()=>{
|
||||
console.log(uni.getStorageSync('user_type'));
|
||||
if(uni.getStorageSync('user_type')!=''){
|
||||
this.checkList()//商品列表查询事件
|
||||
clearInterval(timer)
|
||||
}
|
||||
},1000)
|
||||
|
||||
},
|
||||
methods: {
|
||||
shaiEv(){//商品分类查询事件
|
||||
|
|
|
@ -168,6 +168,7 @@
|
|||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<foot-tab :current="3"></foot-tab>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
|
@ -249,12 +250,34 @@
|
|||
uni.navigateTo({url:'/pages/login/login'})
|
||||
},1500)
|
||||
} else {
|
||||
// 查询收藏数量
|
||||
this.checkCollection()
|
||||
this.userInfo()//调用获取用户信息事件
|
||||
this.isGui = false
|
||||
this.isInput = false
|
||||
this.inputVal = ''
|
||||
uni.login({
|
||||
provider: 'weixin',
|
||||
success: (res)=> {
|
||||
if (res.code) {
|
||||
var params = {code:res.code}
|
||||
this.$requst.post('user/wxAppletsLogin',params).then(res=>{
|
||||
if(res.code==0){
|
||||
if(res.data.token!=''){
|
||||
this.user_type = res.data.user_type//权限
|
||||
uni.setStorageSync('token',res.data.token)//缓存token
|
||||
uni.setStorageSync('openid',res.data.openid)//缓存Openid
|
||||
uni.setStorageSync('expire',res.data.expire)//缓存失效时间(时间戳格式)
|
||||
uni.setStorageSync('is_active',res.data.is_active)//是否第一次授权
|
||||
uni.setStorageSync('user_type',res.data.user_type)//权限
|
||||
}
|
||||
} else {
|
||||
this.$toolAll.tools.showToast(res.msg)
|
||||
}
|
||||
},error=>{})
|
||||
}
|
||||
},
|
||||
});
|
||||
// 查询收藏数量
|
||||
this.checkCollection()
|
||||
this.userInfo()//调用获取用户信息事件
|
||||
}
|
||||
if(this.user_type=='personal'){
|
||||
this.useArr = [
|
||||
|
|
|
@ -1,84 +1,87 @@
|
|||
<template>
|
||||
<view v-if="pageShow">
|
||||
<!-- 使用标题栏 -->
|
||||
<status-nav @inputConfirm="inputConfirm" :statusBackg="true" :statusInput="true" :whereCome="whereCome*1" :backgroudColor="'#ffffff'" :tabcolor="'#ffffff'"></status-nav>
|
||||
<!-- 导航 -->
|
||||
<view class="disaa color33 bacb zIn1 ptab" :style="{top:statusHNH+'px'}">
|
||||
<view :class="current==0?'bold':''" @tap="choose(0)">综合推荐</view>
|
||||
<view :class="current==1?'bold':''" @tap="choose(1)">销量</view>
|
||||
<view :class="current==2?'bold':''" @tap="choose(2)" class="disac">
|
||||
<view>价格</view>
|
||||
<view class=" margin-z10">
|
||||
<view v-if="showJian" class="discc">
|
||||
<image class="ascedesc" src="/static/img/product/ascendingOrder.png"></image>
|
||||
<image class="ascedesc" style="transform: rotateZ(180deg);" src="/static/img/product/ascendingOrder.png"></image>
|
||||
<view>
|
||||
<view v-if="pageShow">
|
||||
<!-- 使用标题栏 -->
|
||||
<status-nav @inputConfirm="inputConfirm" :statusBackg="true" :statusInput="true" :whereCome="whereCome*1" :backgroudColor="'#ffffff'" :tabcolor="'#ffffff'"></status-nav>
|
||||
<!-- 导航 -->
|
||||
<view class="disaa color33 bacb zIn1 ptab" :style="{top:statusHNH+'px'}">
|
||||
<view :class="current==0?'bold':''" @tap="choose(0)">综合推荐</view>
|
||||
<view :class="current==1?'bold':''" @tap="choose(1)">销量</view>
|
||||
<view :class="current==2?'bold':''" @tap="choose(2)" class="disac">
|
||||
<view>价格</view>
|
||||
<view class=" margin-z10">
|
||||
<view v-if="showJian" class="discc">
|
||||
<image class="ascedesc" src="/static/img/product/ascendingOrder.png"></image>
|
||||
<image class="ascedesc" style="transform: rotateZ(180deg);" src="/static/img/product/ascendingOrder.png"></image>
|
||||
</view>
|
||||
<view v-else class="discc">
|
||||
<image v-if="!isasce" @tap.stop="asecedescEvent(0)" class="ascedesc" src="/static/img/product/ascendingOrder.png"></image>
|
||||
<image v-else class="ascedesc" style="transform: rotateZ(180deg);" src="/static/img/product/descendingOrder.png"></image>
|
||||
<image v-if="isasce" @tap.stop="asecedescEvent(1)" class="ascedesc" style="transform: rotateZ(180deg);" src="/static/img/product/ascendingOrder.png"></image>
|
||||
<image v-else class="ascedesc" src="/static/img/product/descendingOrder.png"></image>
|
||||
</view>
|
||||
</view>
|
||||
<view v-else class="discc">
|
||||
<image v-if="!isasce" @tap.stop="asecedescEvent(0)" class="ascedesc" src="/static/img/product/ascendingOrder.png"></image>
|
||||
<image v-else class="ascedesc" style="transform: rotateZ(180deg);" src="/static/img/product/descendingOrder.png"></image>
|
||||
<image v-if="isasce" @tap.stop="asecedescEvent(1)" class="ascedesc" style="transform: rotateZ(180deg);" src="/static/img/product/ascendingOrder.png"></image>
|
||||
<image v-else class="ascedesc" src="/static/img/product/descendingOrder.png"></image>
|
||||
</view>
|
||||
<view :class="chooseShai?'catebold':''" @tap="chooseShaiEv" class="disac">
|
||||
<view>筛选</view>
|
||||
<!-- 筛选图标 -->
|
||||
<image v-if="chooseShai" style="width: 22rpx;height: 22rpx;" src="/static/img/product/screen_02.png"></image>
|
||||
<image v-else style="width: 22rpx;height: 22rpx;" src="/static/img/product/screen.png"></image>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 列表 -->
|
||||
<view class="padding20 bacb plist" v-if="productList.length!=0" :style="{marginTop:(statusHNH+42)+'px'}">
|
||||
<view @tap="goDetail(item.spu_id)" class="disba padding-x30 padding-s20 borbot margin-s10" v-for="(item,index) in productList" :key="index">
|
||||
<image class="proimg flexs radius10" :src="item.src"></image>
|
||||
<view class="padding-sx20 padding-z20 width100">
|
||||
<view class="clips2 fon28">{{item.title}}</view>
|
||||
<view class="fon24 color9 margin-sx10 clips1">{{item.content}}</view>
|
||||
<view class="dis flw">
|
||||
<label class="colorf6 fon24 radius16 pro margin-y10" v-for="(itemc,indexc) in item.cate" :key="indexc">{{itemc.name}}</label>
|
||||
</view>
|
||||
<view class="disba margin-s20">
|
||||
<view class="colorf6 fon24 bold">¥<text class="fon28">{{item.price}}</text>.0</view>
|
||||
<!-- 加入购物车图片 -->
|
||||
<image v-if="user_type!='personal'" @tap.stop="addGou(item.id)" class="progc" src="/static/img/public/gouwcar.png"></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view :class="chooseShai?'catebold':''" @tap="chooseShaiEv" class="disac">
|
||||
<view>筛选</view>
|
||||
<!-- 筛选图标 -->
|
||||
<image v-if="chooseShai" style="width: 22rpx;height: 22rpx;" src="/static/img/product/screen_02.png"></image>
|
||||
<image v-else style="width: 22rpx;height: 22rpx;" src="/static/img/product/screen.png"></image>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 列表 -->
|
||||
<view class="padding20 bacb plist" v-if="productList.length!=0" :style="{marginTop:(statusHNH+42)+'px'}">
|
||||
<view @tap="goDetail(item.spu_id)" class="disba padding-x30 padding-s20 borbot margin-s10" v-for="(item,index) in productList" :key="index">
|
||||
<image class="proimg flexs radius10" :src="item.src"></image>
|
||||
<view class="padding-sx20 padding-z20 width100">
|
||||
<view class="clips2 fon28">{{item.title}}</view>
|
||||
<view class="fon24 color9 margin-sx10 clips1">{{item.content}}</view>
|
||||
<view class="dis flw">
|
||||
<label class="colorf6 fon24 radius16 pro margin-y10" v-for="(itemc,indexc) in item.cate" :key="indexc">{{itemc.name}}</label>
|
||||
</view>
|
||||
<view class="disba margin-s20">
|
||||
<view class="colorf6 fon24 bold">¥<text class="fon28">{{item.price}}</text>.0</view>
|
||||
<!-- 加入购物车图片 -->
|
||||
<image v-if="user_type!='personal'" @tap.stop="addGou(item.id)" class="progc" src="/static/img/public/gouwcar.png"></image>
|
||||
</view>
|
||||
<view v-if="productList.length==0" class="zanwu">暂无相关产品</view>
|
||||
<!-- 筛选弹框 -->
|
||||
<view v-if="yin" :class="isShai?'fadeInRight':chuout+' '+xiao" class="pchoose animated" :style="{top:(statusHNH+32)+'px'}">
|
||||
<view class="padding-sx20" style="display: flex;background-color: rgba(0,0,0,.3);flex-direction: row-reverse;">
|
||||
<!-- 筛选弹框,关闭图片 -->
|
||||
<image @tap="closeCate" class="margin-y20" style="width: 28rpx;height: 28rpx;" src="/static/img/product/pclose.png" mode=""></image>
|
||||
</view>
|
||||
<view class="dis" style="height: 100%;">
|
||||
<scroll-view v-if="shaiArrt.length!=0" scroll-y style="background-color: #FFFFFF;height: 100%;">
|
||||
<view>
|
||||
<view @tap="checkShait(item.id,indexs)"
|
||||
:class="shaiCurrentt==indexs?'dangShait colorb':'xbort color6'"
|
||||
class="fon24 disac shaiEnd" v-for="(item,indexs) in shaiArrt"
|
||||
:key="indexs" style="padding: 30rpx;">
|
||||
<view class="flexs ">{{item.name}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
<scroll-view scroll-y style="background-color: #f5f5f5;height: 100%;">
|
||||
<view>
|
||||
<view @tap="checkShai(item.id,indexs)"
|
||||
:class="shaiCurrent==indexs?'dangShai':''"
|
||||
class="fon24 disac shaiEnd" v-for="(item,indexs) in shaiArr"
|
||||
:key="indexs" style="padding: 30rpx;">
|
||||
<view class="flexs">{{item.name}}</view>
|
||||
<!-- 筛选弹框,右侧图片 -->
|
||||
<image v-if="shaiCurrent==indexs" class="posia" style="right: 0;width: 4rpx;height: 49rpx;" src="/static/img/product/pyxian.png" mode=""></image>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</view>
|
||||
<backTop :showTop="showTop" @backTop="backTop"></backTop>
|
||||
</view>
|
||||
<view v-if="productList.length==0" class="zanwu">暂无相关产品</view>
|
||||
<!-- 筛选弹框 -->
|
||||
<view v-if="yin" :class="isShai?'fadeInRight':chuout+' '+xiao" class="pchoose animated" :style="{top:(statusHNH+32)+'px'}">
|
||||
<view class="padding-sx20" style="display: flex;background-color: rgba(0,0,0,.3);flex-direction: row-reverse;">
|
||||
<!-- 筛选弹框,关闭图片 -->
|
||||
<image @tap="closeCate" class="margin-y20" style="width: 28rpx;height: 28rpx;" src="/static/img/product/pclose.png" mode=""></image>
|
||||
</view>
|
||||
<view class="dis" style="height: 100%;">
|
||||
<scroll-view v-if="shaiArrt.length!=0" scroll-y style="background-color: #FFFFFF;height: 100%;">
|
||||
<view>
|
||||
<view @tap="checkShait(item.id,indexs)"
|
||||
:class="shaiCurrentt==indexs?'dangShait colorb':'xbort color6'"
|
||||
class="fon24 disac shaiEnd" v-for="(item,indexs) in shaiArrt"
|
||||
:key="indexs" style="padding: 30rpx;">
|
||||
<view class="flexs ">{{item.name}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
<scroll-view scroll-y style="background-color: #f5f5f5;height: 100%;">
|
||||
<view>
|
||||
<view @tap="checkShai(item.id,indexs)"
|
||||
:class="shaiCurrent==indexs?'dangShai':''"
|
||||
class="fon24 disac shaiEnd" v-for="(item,indexs) in shaiArr"
|
||||
:key="indexs" style="padding: 30rpx;">
|
||||
<view class="flexs">{{item.name}}</view>
|
||||
<!-- 筛选弹框,右侧图片 -->
|
||||
<image v-if="shaiCurrent==indexs" class="posia" style="right: 0;width: 4rpx;height: 49rpx;" src="/static/img/product/pyxian.png" mode=""></image>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</view>
|
||||
<backTop :showTop="showTop" @backTop="backTop"></backTop>
|
||||
<foot-tab :current="1"></foot-tab>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
<!-- 现价、原价 -->
|
||||
<view v-if="user_type!='personal'">
|
||||
<view class="colorf78 fon24 bold">¥<text class="fon36">{{proDetailTwo.cur_price/100}}</text>.00</view>
|
||||
<view class="color9 fon24 dis">原价<text style="text-decoration: line-through;">¥{{proDetailTwo.price/100}}.00</text></view>
|
||||
<view class="color9 fon24 dis" v-if="proDetailTwo.cur_price!=proDetailTwo.price">原价<text style="text-decoration: line-through;">¥{{proDetailTwo.price/100}}.00</text></view>
|
||||
</view>
|
||||
<view v-if="user_type=='personal'" class="colorf78 fon24 bold">¥<text class="fon36">{{proDetailTwo.price/100}}</text>.00</view>
|
||||
<!-- 收藏 -->
|
||||
|
|
|
@ -104,6 +104,27 @@
|
|||
this.imgSrc = ''
|
||||
this.isChoose = true
|
||||
this.$toolAll.tools.setTime('','',2000)
|
||||
uni.login({
|
||||
provider: 'weixin',
|
||||
success: (res)=> {
|
||||
if (res.code) {
|
||||
var params = {code:res.code}
|
||||
this.$requst.post('user/wxAppletsLogin',params).then(res=>{
|
||||
if(res.code==0){
|
||||
if(res.data.token!=''){
|
||||
uni.setStorageSync('token',res.data.token)//缓存token
|
||||
uni.setStorageSync('openid',res.data.openid)//缓存Openid
|
||||
uni.setStorageSync('expire',res.data.expire)//缓存失效时间(时间戳格式)
|
||||
uni.setStorageSync('is_active',res.data.is_active)//是否第一次授权
|
||||
uni.setStorageSync('user_type',res.data.user_type)//权限
|
||||
}
|
||||
} else {
|
||||
this.$toolAll.tools.showToast(res.msg)
|
||||
}
|
||||
},error=>{})
|
||||
}
|
||||
},
|
||||
});
|
||||
}
|
||||
},error=>{})
|
||||
}
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -48,38 +48,6 @@
|
|||
"backgroundColor": "#f5f5f5",
|
||||
"navigationStyle": "custom"
|
||||
},
|
||||
"tabBar": {
|
||||
"borderStyle": "white",
|
||||
"backgroundColor": "#FFFFFF",
|
||||
"color": "#aaaeb7",
|
||||
"selectedColor": "#214995",
|
||||
"list": [
|
||||
{
|
||||
"pagePath": "pages/tabbar/homePage/homePage",
|
||||
"iconPath": "static/img/tabbar/pagem.png",
|
||||
"selectedIconPath": "static/img/tabbar/pageh.png",
|
||||
"text": "首页"
|
||||
},
|
||||
{
|
||||
"pagePath": "pages/tabbar/product/product",
|
||||
"iconPath": "static/img/tabbar/productm.png",
|
||||
"selectedIconPath": "static/img/tabbar/product.png",
|
||||
"text": "产品"
|
||||
},
|
||||
{
|
||||
"pagePath": "pages/tabbar/shoppingCart/shoppingCart",
|
||||
"iconPath": "static/img/tabbar/chem.png",
|
||||
"selectedIconPath": "static/img/tabbar/chem.png",
|
||||
"text": "购物车"
|
||||
},
|
||||
{
|
||||
"pagePath": "pages/tabbar/my/my",
|
||||
"iconPath": "static/img/tabbar/mym.png",
|
||||
"selectedIconPath": "static/img/tabbar/my.png",
|
||||
"text": "我的"
|
||||
}
|
||||
]
|
||||
},
|
||||
"preloadRule": {
|
||||
"pages/tabbar/homePage/homePage": {
|
||||
"network": "all",
|
||||
|
@ -94,6 +62,7 @@
|
|||
}
|
||||
},
|
||||
"usingComponents": {
|
||||
"status-nav": "/components/status-nav"
|
||||
"status-nav": "/components/status-nav",
|
||||
"foot-tab": "/components/footTab"
|
||||
}
|
||||
}
|
|
@ -17,20 +17,22 @@ var _App = _interopRequireDefault(__webpack_require__(/*! ./App */ 5));
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
var _tools = _interopRequireDefault(__webpack_require__(/*! @/jsFile/tools.js */ 8));
|
||||
|
||||
|
||||
var _requst = _interopRequireDefault(__webpack_require__(/*! @/jsFile/requst.js */ 12));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}function ownKeys(object, enumerableOnly) {var keys = Object.keys(object);if (Object.getOwnPropertySymbols) {var symbols = Object.getOwnPropertySymbols(object);if (enumerableOnly) symbols = symbols.filter(function (sym) {return Object.getOwnPropertyDescriptor(object, sym).enumerable;});keys.push.apply(keys, symbols);}return keys;}function _objectSpread(target) {for (var i = 1; i < arguments.length; i++) {var source = arguments[i] != null ? arguments[i] : {};if (i % 2) {ownKeys(Object(source), true).forEach(function (key) {_defineProperty(target, key, source[key]);});} else if (Object.getOwnPropertyDescriptors) {Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));} else {ownKeys(Object(source)).forEach(function (key) {Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));});}}return target;}function _defineProperty(obj, key, value) {if (key in obj) {Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true });} else {obj[key] = value;}return obj;}var statusNav = function statusNav() {__webpack_require__.e(/*! require.ensure | components/status-nav */ "components/status-nav").then((function () {return resolve(__webpack_require__(/*! ./components/status-nav.vue */ 203));}).bind(null, __webpack_require__)).catch(__webpack_require__.oe);}; //引入状态栏组件
|
||||
_vue.default.component('status-nav', statusNav); //挂载状态栏组件
|
||||
var footTab = function footTab() {__webpack_require__.e(/*! require.ensure | components/footTab */ "components/footTab").then((function () {return resolve(__webpack_require__(/*! ./components/footTab.vue */ 225));}).bind(null, __webpack_require__)).catch(__webpack_require__.oe);}; //引入底部导航组件
|
||||
_vue.default.component('foot-tab', footTab); //挂载底部导航组件
|
||||
var newwidth = uni.getSystemInfoSync().screenWidth; //获取屏幕宽度
|
||||
_vue.default.prototype.$newwidth = newwidth; //挂载屏幕宽度
|
||||
var statusH = uni.getSystemInfoSync().statusBarHeight; //获取状态栏高
|
||||
_vue.default.prototype.$statusH = statusH; //挂载状态栏高
|
||||
// 常用工具
|
||||
_vue.default.prototype.$toolAll = _tools.default; // 响应数据
|
||||
_vue.default.prototype.$requst = _requst.default;_vue.default.prototype.$http = 'https://dengrui.scdxtc.cn';_vue.default.config.productionTip = false;
|
||||
_App.default.mpType = 'app';
|
||||
|
||||
_vue.default.prototype.$requst = _requst.default;_vue.default.prototype.$http = 'https://dengrui.scdxtc.cn';_vue.default.config.productionTip = false;_App.default.mpType = 'app';
|
||||
var app = new _vue.default(_objectSpread({},
|
||||
_App.default));
|
||||
|
||||
|
|
|
@ -109,7 +109,7 @@
|
|||
/******/ if(installedCssChunks[chunkId]) promises.push(installedCssChunks[chunkId]);
|
||||
/******/ else if(installedCssChunks[chunkId] !== 0 && cssChunks[chunkId]) {
|
||||
/******/ promises.push(installedCssChunks[chunkId] = new Promise(function(resolve, reject) {
|
||||
/******/ var href = "" + ({"components/status-nav":"components/status-nav","components/backTop":"components/backTop","components/footTab":"components/footTab","components/lw-notice/lw-notice":"components/lw-notice/lw-notice","components/twocoluList":"components/twocoluList","components/bottomkf":"components/bottomkf","components/evaluateList":"components/evaluateList","components/successpopu":"components/successpopu","components/rate":"components/rate","components/city/city":"components/city/city","components/li-switch":"components/li-switch","components/lw-notice/iconFont":"components/lw-notice/iconFont"}[chunkId]||chunkId) + ".wxss";
|
||||
/******/ var href = "" + ({"components/footTab":"components/footTab","components/status-nav":"components/status-nav","components/backTop":"components/backTop","components/lw-notice/lw-notice":"components/lw-notice/lw-notice","components/twocoluList":"components/twocoluList","components/bottomkf":"components/bottomkf","components/evaluateList":"components/evaluateList","components/successpopu":"components/successpopu","components/rate":"components/rate","components/city/city":"components/city/city","components/li-switch":"components/li-switch","components/lw-notice/iconFont":"components/lw-notice/iconFont"}[chunkId]||chunkId) + ".wxss";
|
||||
/******/ var fullhref = __webpack_require__.p + href;
|
||||
/******/ var existingLinkTags = document.getElementsByTagName("link");
|
||||
/******/ for(var i = 0; i < existingLinkTags.length; i++) {
|
||||
|
|
|
@ -876,7 +876,7 @@ function initData(vueOptions, context) {
|
|||
try {
|
||||
data = data.call(context); // 支持 Vue.prototype 上挂的数据
|
||||
} catch (e) {
|
||||
if (Object({"NODE_ENV":"development","VUE_APP_NAME":"dengrui","VUE_APP_PLATFORM":"mp-weixin","BASE_URL":"/"}).VUE_APP_DEBUG) {
|
||||
if (Object({"VUE_APP_NAME":"dengrui","VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG) {
|
||||
console.warn('根据 Vue 的 data 函数初始化小程序 data 失败,请尽量确保 data 函数中不访问 vm 对象,否则可能影响首次数据渲染速度。', data);
|
||||
}
|
||||
}
|
||||
|
@ -8283,7 +8283,7 @@ function type(obj) {
|
|||
|
||||
function flushCallbacks$1(vm) {
|
||||
if (vm.__next_tick_callbacks && vm.__next_tick_callbacks.length) {
|
||||
if (Object({"NODE_ENV":"development","VUE_APP_NAME":"dengrui","VUE_APP_PLATFORM":"mp-weixin","BASE_URL":"/"}).VUE_APP_DEBUG) {
|
||||
if (Object({"VUE_APP_NAME":"dengrui","VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG) {
|
||||
var mpInstance = vm.$scope;
|
||||
console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + vm._uid +
|
||||
']:flushCallbacks[' + vm.__next_tick_callbacks.length + ']');
|
||||
|
@ -8304,14 +8304,14 @@ function nextTick$1(vm, cb) {
|
|||
//1.nextTick 之前 已 setData 且 setData 还未回调完成
|
||||
//2.nextTick 之前存在 render watcher
|
||||
if (!vm.__next_tick_pending && !hasRenderWatcher(vm)) {
|
||||
if(Object({"NODE_ENV":"development","VUE_APP_NAME":"dengrui","VUE_APP_PLATFORM":"mp-weixin","BASE_URL":"/"}).VUE_APP_DEBUG){
|
||||
if(Object({"VUE_APP_NAME":"dengrui","VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG){
|
||||
var mpInstance = vm.$scope;
|
||||
console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + vm._uid +
|
||||
']:nextVueTick');
|
||||
}
|
||||
return nextTick(cb, vm)
|
||||
}else{
|
||||
if(Object({"NODE_ENV":"development","VUE_APP_NAME":"dengrui","VUE_APP_PLATFORM":"mp-weixin","BASE_URL":"/"}).VUE_APP_DEBUG){
|
||||
if(Object({"VUE_APP_NAME":"dengrui","VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG){
|
||||
var mpInstance$1 = vm.$scope;
|
||||
console.log('[' + (+new Date) + '][' + (mpInstance$1.is || mpInstance$1.route) + '][' + vm._uid +
|
||||
']:nextMPTick');
|
||||
|
@ -8397,7 +8397,7 @@ var patch = function(oldVnode, vnode) {
|
|||
});
|
||||
var diffData = this.$shouldDiffData === false ? data : diff(data, mpData);
|
||||
if (Object.keys(diffData).length) {
|
||||
if (Object({"NODE_ENV":"development","VUE_APP_NAME":"dengrui","VUE_APP_PLATFORM":"mp-weixin","BASE_URL":"/"}).VUE_APP_DEBUG) {
|
||||
if (Object({"VUE_APP_NAME":"dengrui","VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG) {
|
||||
console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + this._uid +
|
||||
']差量更新',
|
||||
JSON.stringify(diffData));
|
||||
|
|
|
@ -114,7 +114,7 @@ __webpack_require__.r(__webpack_exports__);
|
|||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0; //
|
||||
/* WEBPACK VAR INJECTION */(function(uni) {Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0; //
|
||||
//
|
||||
//
|
||||
//
|
||||
|
@ -129,6 +129,12 @@ Object.defineProperty(exports, "__esModule", { value: true });exports.default =
|
|||
var _default =
|
||||
{
|
||||
name: 'footTab',
|
||||
props: {
|
||||
current: {
|
||||
type: Number,
|
||||
default: 0 } },
|
||||
|
||||
|
||||
data: function data() {
|
||||
return {
|
||||
tabArr: [
|
||||
|
@ -157,13 +163,19 @@ var _default =
|
|||
'text': '我的' }],
|
||||
|
||||
|
||||
current: 0 };
|
||||
// current:0
|
||||
user_type: uni.getStorageSync('user_type') };
|
||||
|
||||
},
|
||||
methods: {
|
||||
choosefoot: function choosefoot(index) {
|
||||
this.current = index;
|
||||
if (index == 0) uni.reLaunch({ url: '/pages/tabbar/homePage/homePage' });
|
||||
if (index == 1) uni.reLaunch({ url: '/pages/tabbar/product/product' });
|
||||
if (index == 2) uni.reLaunch({ url: '/pages/tabbar/shoppingCart/shoppingCart' });
|
||||
if (index == 3) uni.reLaunch({ url: '/pages/tabbar/my/my' });
|
||||
// this.current = index
|
||||
} } };exports.default = _default;
|
||||
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 1)["default"]))
|
||||
|
||||
/***/ }),
|
||||
|
||||
|
|
|
@ -1 +1 @@
|
|||
<view><view style="height:56px;font-size:10px;border-top:1rpx solid #FFFFFF;background-color:#FFFFFF;position:fixed;bottom:0;left:0;right:0;display:flex;justify-content:space-around;align-items:center;"><block wx:for="{{tabArr}}" wx:for-item="item" wx:for-index="index" wx:key="index"><view data-event-opts="{{[['tap',[['choosefoot',[index]]]]]}}" style="display:flex;justify-content:center;flex-direction:column;align-items:center;" bindtap="__e"><block wx:if="{{current==index}}"><image style="width:22px;height:22px;" src="{{item.selectedIconPath}}"></image></block><block wx:else><image style="width:22px;height:22px;" src="{{item.iconPath}}"></image></block><view class="{{[current==index?'footactive':'footmo']}}" style="margin-top:4px;">{{item.text}}</view></view></block></view></view>
|
||||
<view><view style="height:56px;font-size:10px;border-top:1rpx solid #FFFFFF;background-color:#FFFFFF;position:fixed;bottom:0;left:0;right:0;display:flex;justify-content:space-around;align-items:center;z-index:10;"><block wx:for="{{tabArr}}" wx:for-item="item" wx:for-index="index" wx:key="index"><block wx:if="{{user_type=='personal'&&index!=2}}"><view data-event-opts="{{[['tap',[['choosefoot',[index]]]]]}}" style="{{'display:flex;justify-content:center;flex-direction:column;align-items:center;'+('width:'+(user_type=='personal'?'33.3%':'25%')+';')}}" bindtap="__e"><block wx:if="{{current==index}}"><image style="width:22px;height:22px;" src="{{item.selectedIconPath}}"></image></block><block wx:else><image style="width:22px;height:22px;" src="{{item.iconPath}}"></image></block><view class="{{[current==index?'footactive':'footmo']}}" style="margin-top:4px;">{{item.text}}</view></view></block></block></view></view>
|
|
@ -202,15 +202,15 @@ var _default =
|
|||
|
||||
}
|
||||
if (this.whereCome == 2) {
|
||||
uni.switchTab({ url: '/pages/tabbar/homePage/homePage' });
|
||||
uni.reLaunch({ url: '/pages/tabbar/homePage/homePage' });
|
||||
return;
|
||||
}
|
||||
if (this.whereCome == 1) {
|
||||
uni.switchTab({ url: '/pages/tabbar/my/my' });
|
||||
uni.reLaunch({ url: '/pages/tabbar/my/my' });
|
||||
return;
|
||||
}
|
||||
if (this.whereCome == 3) {
|
||||
uni.switchTab({ url: '/pages/tabbar/product/product' });
|
||||
uni.reLaunch({ url: '/pages/tabbar/product/product' });
|
||||
return;
|
||||
}
|
||||
uni.navigateBack({ delta: 1 });
|
||||
|
|
|
@ -162,6 +162,8 @@ var _default2 =
|
|||
this.$requst.post('order/shopping-cart-add', { sku_id: id, num: 1 }).then(function (res) {
|
||||
if (res.code == 0) {
|
||||
_this.$toolAll.tools.showToast('添加购物车成功(*^▽^*)');
|
||||
} else {
|
||||
_this.$toolAll.tools.showToast(res.msg);
|
||||
}
|
||||
}, function (error) {});
|
||||
}
|
||||
|
|
|
@ -239,6 +239,7 @@ __webpack_require__.r(__webpack_exports__);
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
{
|
||||
|
@ -294,16 +295,37 @@ __webpack_require__.r(__webpack_exports__);
|
|||
onPageScroll: function onPageScroll(e) {
|
||||
e.scrollTop > 360 ? this.showTop = true : this.showTop = false;
|
||||
},
|
||||
onShow: function onShow() {
|
||||
this.$toolAll.tools.guoq();
|
||||
onShow: function onShow() {var _this2 = this;
|
||||
uni.showTabBar();
|
||||
uni.login({
|
||||
provider: 'weixin',
|
||||
success: function success(res) {
|
||||
if (res.code) {
|
||||
var params = { code: res.code };
|
||||
_this2.$requst.post('user/wxAppletsLogin', params).then(function (res) {
|
||||
if (res.code == 0) {
|
||||
if (res.data.token != '') {
|
||||
uni.setStorageSync('token', res.data.token); //缓存token
|
||||
uni.setStorageSync('openid', res.data.openid); //缓存Openid
|
||||
uni.setStorageSync('expire', res.data.expire); //缓存失效时间(时间戳格式)
|
||||
uni.setStorageSync('is_active', res.data.is_active); //是否第一次授权
|
||||
uni.setStorageSync('user_type', res.data.user_type); //权限
|
||||
_this2.checkList(); //商品列表查询事件
|
||||
}
|
||||
} else {
|
||||
_this2.$toolAll.tools.showToast(res.msg);
|
||||
}
|
||||
}, function (error) {});
|
||||
}
|
||||
} });
|
||||
|
||||
},
|
||||
onLoad: function onLoad(options) {var _this2 = this;
|
||||
onLoad: function onLoad(options) {var _this3 = this;
|
||||
var query = wx.createSelectorQuery().in(this);
|
||||
query.select('.statusHNH').boundingClientRect(function (rect) {
|
||||
// console.log('rect.height',rect)
|
||||
uni.setStorageSync('statusHNH', rect.height);
|
||||
_this2.statusHNH = rect.height;
|
||||
_this3.statusHNH = rect.height;
|
||||
}).exec();
|
||||
var _this = this;
|
||||
// 微信扫码后会自动编码,所以需要解码
|
||||
|
@ -322,17 +344,9 @@ __webpack_require__.r(__webpack_exports__);
|
|||
this.requestGao(); //查询公告
|
||||
this.reMen(); //查询热门产品
|
||||
this.shaiEv(); //查询商品分类
|
||||
var timer = setInterval(function () {
|
||||
console.log(uni.getStorageSync('user_type'));
|
||||
if (uni.getStorageSync('user_type') != '') {
|
||||
_this2.checkList(); //商品列表查询事件
|
||||
clearInterval(timer);
|
||||
}
|
||||
}, 1000);
|
||||
|
||||
},
|
||||
methods: {
|
||||
shaiEv: function shaiEv() {var _this3 = this; //商品分类查询事件
|
||||
shaiEv: function shaiEv() {var _this4 = this; //商品分类查询事件
|
||||
this.$requst.post('product/spu/category').then(function (res) {
|
||||
// console.log('筛选',res);
|
||||
if (res.data.length != 0) {
|
||||
|
@ -343,27 +357,27 @@ __webpack_require__.r(__webpack_exports__);
|
|||
pid: item.pid,
|
||||
hasChildren: item.hasChildren };
|
||||
|
||||
_this3.cateList.push(obj);
|
||||
_this4.cateList.push(obj);
|
||||
});
|
||||
}
|
||||
}, function (error) {});
|
||||
},
|
||||
bannerEv: function bannerEv() {var _this4 = this; // 查询轮播图片事件
|
||||
bannerEv: function bannerEv() {var _this5 = this; // 查询轮播图片事件
|
||||
var paramsBanner = {
|
||||
position: 'home_banner' };
|
||||
|
||||
this.$requst.post('slide/index', paramsBanner).then(function (res) {
|
||||
// console.log('轮播图===>',res);
|
||||
if (res.data.length != 0) {
|
||||
_this4.pageShow = true;
|
||||
_this5.pageShow = true;
|
||||
res.data.forEach(function (item) {
|
||||
var obj = {
|
||||
src: _this4.$http + item.src,
|
||||
src: _this5.$http + item.src,
|
||||
alt: item.alt,
|
||||
link: item.link,
|
||||
time: item.time };
|
||||
|
||||
_this4.bannerList.push(obj);
|
||||
_this5.bannerList.push(obj);
|
||||
});
|
||||
}
|
||||
}, function (error) {});
|
||||
|
@ -373,7 +387,7 @@ __webpack_require__.r(__webpack_exports__);
|
|||
url: urlre });
|
||||
|
||||
},
|
||||
reMen: function reMen() {var _this5 = this; //查询热门
|
||||
reMen: function reMen() {var _this6 = this; //查询热门
|
||||
this.$requst.post('slide/index', { position: 'home_promote' }).then(function (res) {
|
||||
// console.log('热门===>',res);
|
||||
if (res.data.length != 0) {
|
||||
|
@ -382,10 +396,10 @@ __webpack_require__.r(__webpack_exports__);
|
|||
alt: item.alt,
|
||||
desc: item.desc,
|
||||
link: item.link,
|
||||
src: _this5.$http + item.src,
|
||||
src: _this6.$http + item.src,
|
||||
time: item.time };
|
||||
|
||||
_this5.zanReArrImg.push(zanObj);
|
||||
_this6.zanReArrImg.push(zanObj);
|
||||
// let obj = {
|
||||
// src:this.$http+item.src,
|
||||
// title:item.alt,
|
||||
|
@ -398,7 +412,7 @@ __webpack_require__.r(__webpack_exports__);
|
|||
}
|
||||
}, function (error) {});
|
||||
},
|
||||
requestGao: function requestGao() {var _this6 = this; //查询公告列表
|
||||
requestGao: function requestGao() {var _this7 = this; //查询公告列表
|
||||
var paramsGao = {
|
||||
size: 0 };
|
||||
|
||||
|
@ -406,9 +420,9 @@ __webpack_require__.r(__webpack_exports__);
|
|||
// console.log(res);
|
||||
if (res.data.list.length != 0) {
|
||||
res.data.list.forEach(function (item) {
|
||||
_this6.advanceListTwo.push(item.title);
|
||||
_this7.advanceListTwo.push(item.title);
|
||||
});
|
||||
_this6.advanceListInfo = res.data.list;
|
||||
_this7.advanceListInfo = res.data.list;
|
||||
}
|
||||
}, function (error) {});
|
||||
},
|
||||
|
@ -426,7 +440,7 @@ __webpack_require__.r(__webpack_exports__);
|
|||
this.isZanw = true;
|
||||
this.checkList();
|
||||
},
|
||||
checkList: function checkList() {var _this7 = this;
|
||||
checkList: function checkList() {var _this8 = this;
|
||||
var paramCate = {
|
||||
category_id: this.cid,
|
||||
page: this.page,
|
||||
|
@ -436,22 +450,22 @@ __webpack_require__.r(__webpack_exports__);
|
|||
};
|
||||
this.$requst.post('product/spu/list', paramCate).then(function (res) {
|
||||
// console.log('产品',res);
|
||||
if (_this7.page == 1) _this7.dataList = [];
|
||||
if (_this8.page == 1) _this8.dataList = [];
|
||||
if (res.data.list.length != 0) {
|
||||
_this7.total = res.data.total;
|
||||
_this8.total = res.data.total;
|
||||
// this.cid = res.data.list[0].cid//获取分类ID,以便加载更多使用
|
||||
_this7.zanList = res.data.list;
|
||||
_this8.zanList = res.data.list;
|
||||
res.data.list.forEach(function (item) {
|
||||
var cateObj = {
|
||||
id: item.main_sku.id, //商品ID
|
||||
spu_id: item.id,
|
||||
src: _this7.$http + item.main_sku.main_image, //商品图片
|
||||
src: _this8.$http + item.main_sku.main_image, //商品图片
|
||||
title: item.name, //商品名称
|
||||
content: item.sub_title, //商品标题
|
||||
cate: item.tag_list, //标签列表
|
||||
price: item.main_sku.cur_price / 100 //商品原价
|
||||
};
|
||||
_this7.dataList.push(cateObj);
|
||||
_this8.dataList.push(cateObj);
|
||||
});
|
||||
} else {
|
||||
// this.$toolAll.tools.showToast('没找到相关产品o(╥﹏╥)o')
|
||||
|
|
|
@ -1 +1 @@
|
|||
<view><view class="posir"><image class="posia" style="width:100%;" src="/static/img/pageh/headb.png"></image><view class="posi-tzy zIn5 statusHNH" style="background:url(https://s3.jpg.cm/2021/07/22/I6PtxL.png) fixed top;background-size:100%;"><view style="{{'height:'+(statusBarHeight+'px')+';'}}"></view><view class="padding-z20 disac width100 navBarH" style="{{'background:'+(backgroudColor)+';'}}"><view class="tab-title titlec" style="color:#ffffff;">登锐商城</view></view></view><view class="margin-zy20 disba" style="{{'padding-top:'+(statusHNH+'px')+';'}}"><view class="searchRadius disac ptwo-input-box"><image class="searcht margin-z20" src="/static/img/pageh/sousuo.png"></image><input class="margin-z10 fon26 colorh width100" disabled="{{true}}" placeholder="搜索的内容" placeholder-class="searchpla" type="text" data-event-opts="{{[['tap',[['inputFocus',['$event']]]]]}}" bindtap="__e"/></view></view><view class="margin20"><view class="radius10"><swiper class="banner-box" indicator-color="#f9f9f9" indicator-active-color="#1c4593" indicator-dots="{{true}}" easing-function="easeOutCubic" autoplay="{{true}}" interval="{{3000}}" circular="{{true}}" duration="{{1000}}"><block wx:for="{{bannerList}}" wx:for-item="item" wx:for-index="index" wx:key="index"><block wx:if="{{bannerList.length!=0}}"><swiper-item><view class="swiper-item"><image class="width100 banner-box radius10" src="{{item.src}}" mode="aspectFill"></image></view></swiper-item></block></block></swiper></view><view class="margin-sx20 disac zIn4" style="position:relative;"><view class="disac flexs"><image class="gimg" src="/static/img/pageh/gonggao.png" mode></image><view class="fon26 gtitle margin-z10"><view class="_i">小程序公告:</view></view></view><view class="disba width100"><view class="fon24 color6 margin-zy20 width100"><lw-notice vue-id="732ddc22-1" list="{{advanceListTwo}}" data-event-opts="{{[['^dangGao',[['dangGao']]]]}}" bind:dangGao="__e" bind:__l="__l"></lw-notice></view><view data-event-opts="{{[['tap',[['goNotices',['$event']]]]]}}" class="fon24 color9 margin-y20 flexs" bindtap="__e">更多</view></view></view></view><view class="discc width100 textc" style="background:url(https://s3.jpg.cm/2021/07/22/I6P1IW.png) no-repeat;background-size:100% 100%;"><view class="fon36 colorb bold margin-s40 disbcac"><image class="reba" src="/static/img/pageh/rebefore.png"></image><view class="margin-zy20">厂家送红包 购100送70</view><image class="reba" src="/static/img/pageh/reaffter.png"></image></view><view class="fon24 colorb margin-sx20 discc"><view class="zIn1">红包可提现,也可分次购货</view><view class="tiao"></view></view><view class="fon24 margin-x20" style="color:rgba(255,255,255,.7);">商城产品低于市场价70%,红包可选择长期分红更划算</view><block wx:for="{{zanReArrImg}}" wx:for-item="itemre" wx:for-index="indexre" wx:key="indexre"><view class="reboxre margin-zy20 margin-x20" style="width:94%;"><image class="radius10" style="width:100%;height:342rpx;" mode="aspectFill" src="{{itemre.src}}" data-event-opts="{{[['tap',[['goReDetail',['$0'],[[['zanReArrImg','',indexre,'link']]]]]]]}}" bindtap="__e"></image></view></block></view><view class="width100"><scroll-view style="height:80rpx;" scroll-x="true"><view class="disba margin20 catebox"><block wx:for="{{cateList}}" wx:for-item="item" wx:for-index="index" wx:key="index"><view data-event-opts="{{[['tap',[['chooseCate',['$0',index],[[['cateList','',index,'id']]]]]]]}}" class="{{['disac','flexs',current==index?'pactive':'pmo']}}" bindtap="__e">{{item.name}}<view class="pxian"></view></view></block></view></scroll-view><block wx:if="{{dataList.length!=0}}"><twocolu-list vue-id="732ddc22-2" dataList="{{dataList}}" bind:__l="__l"></twocolu-list></block><block wx:if="{{gisok}}"><view class="margin-sx26 textc color9 fon26">{{gcontent}}</view></block></view><back-top vue-id="732ddc22-3" showTop="{{showTop}}" data-event-opts="{{[['^backTop',[['backTop']]]]}}" bind:backTop="__e" bind:__l="__l"></back-top></view></view>
|
||||
<view><view class="posir"><image class="posia" style="width:100%;" src="/static/img/pageh/headb.png"></image><view class="posi-tzy zIn5 statusHNH" style="background:url(https://s3.jpg.cm/2021/07/22/I6PtxL.png) fixed top;background-size:100%;"><view style="{{'height:'+(statusBarHeight+'px')+';'}}"></view><view class="padding-z20 disac width100 navBarH" style="{{'background:'+(backgroudColor)+';'}}"><view class="tab-title titlec" style="color:#ffffff;">登锐商城</view></view></view><view class="margin-zy20 disba" style="{{'padding-top:'+(statusHNH+'px')+';'}}"><view class="searchRadius disac ptwo-input-box"><image class="searcht margin-z20" src="/static/img/pageh/sousuo.png"></image><input class="margin-z10 fon26 colorh width100" disabled="{{true}}" placeholder="搜索的内容" placeholder-class="searchpla" type="text" data-event-opts="{{[['tap',[['inputFocus',['$event']]]]]}}" bindtap="__e"/></view></view><view class="margin20"><view class="radius10"><swiper class="banner-box" indicator-color="#f9f9f9" indicator-active-color="#1c4593" indicator-dots="{{true}}" easing-function="easeOutCubic" autoplay="{{true}}" interval="{{3000}}" circular="{{true}}" duration="{{1000}}"><block wx:for="{{bannerList}}" wx:for-item="item" wx:for-index="index" wx:key="index"><block wx:if="{{bannerList.length!=0}}"><swiper-item><view class="swiper-item"><image class="width100 banner-box radius10" src="{{item.src}}" mode="aspectFill"></image></view></swiper-item></block></block></swiper></view><view class="margin-sx20 disac zIn4" style="position:relative;"><view class="disac flexs"><image class="gimg" src="/static/img/pageh/gonggao.png" mode></image><view class="fon26 gtitle margin-z10"><view class="_i">小程序公告:</view></view></view><view class="disba width100"><view class="fon24 color6 margin-zy20 width100"><lw-notice vue-id="732ddc22-1" list="{{advanceListTwo}}" data-event-opts="{{[['^dangGao',[['dangGao']]]]}}" bind:dangGao="__e" bind:__l="__l"></lw-notice></view><view data-event-opts="{{[['tap',[['goNotices',['$event']]]]]}}" class="fon24 color9 margin-y20 flexs" bindtap="__e">更多</view></view></view></view><view class="discc width100 textc" style="background:url(https://s3.jpg.cm/2021/07/22/I6P1IW.png) no-repeat;background-size:100% 100%;"><view class="fon36 colorb bold margin-s40 disbcac"><image class="reba" src="/static/img/pageh/rebefore.png"></image><view class="margin-zy20">厂家送红包 购100送70</view><image class="reba" src="/static/img/pageh/reaffter.png"></image></view><view class="fon24 colorb margin-sx20 discc"><view class="zIn1">红包可提现,也可分次购货</view><view class="tiao"></view></view><view class="fon24 margin-x20" style="color:rgba(255,255,255,.7);">商城产品低于市场价70%,红包可选择长期分红更划算</view><block wx:for="{{zanReArrImg}}" wx:for-item="itemre" wx:for-index="indexre" wx:key="indexre"><view class="reboxre margin-zy20 margin-x20" style="width:94%;"><image class="radius10" style="width:100%;height:342rpx;" mode="aspectFill" src="{{itemre.src}}" data-event-opts="{{[['tap',[['goReDetail',['$0'],[[['zanReArrImg','',indexre,'link']]]]]]]}}" bindtap="__e"></image></view></block></view><view class="width100 padding-x120"><scroll-view style="height:80rpx;" scroll-x="true"><view class="disba margin20 catebox"><block wx:for="{{cateList}}" wx:for-item="item" wx:for-index="index" wx:key="index"><view data-event-opts="{{[['tap',[['chooseCate',['$0',index],[[['cateList','',index,'id']]]]]]]}}" class="{{['disac','flexs',current==index?'pactive':'pmo']}}" bindtap="__e">{{item.name}}<view class="pxian"></view></view></block></view></scroll-view><block wx:if="{{dataList.length!=0}}"><twocolu-list vue-id="732ddc22-2" dataList="{{dataList}}" bind:__l="__l"></twocolu-list></block><block wx:if="{{gisok}}"><view class="margin-sx26 textc color9 fon26">{{gcontent}}</view></block></view><back-top vue-id="732ddc22-3" showTop="{{showTop}}" data-event-opts="{{[['^backTop',[['backTop']]]]}}" bind:backTop="__e" bind:__l="__l"></back-top></view><foot-tab vue-id="732ddc22-4" bind:__l="__l"></foot-tab></view>
|
|
@ -308,6 +308,7 @@ __webpack_require__.r(__webpack_exports__);
|
|||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
|
||||
var QRCode = __webpack_require__(/*! ../../../jsFile/qrcode.js */ 51).default;var _default =
|
||||
{
|
||||
|
@ -379,19 +380,41 @@ var QRCode = __webpack_require__(/*! ../../../jsFile/qrcode.js */ 51).default;va
|
|||
|
||||
this.QR = qrcode;
|
||||
},
|
||||
onShow: function onShow() {
|
||||
onShow: function onShow() {var _this2 = this;
|
||||
if (uni.getStorageSync('is_active') == 0) {
|
||||
this.$toolAll.tools.showToast('您目前是游客,请授权登录');
|
||||
setTimeout(function () {
|
||||
uni.navigateTo({ url: '/pages/login/login' });
|
||||
}, 1500);
|
||||
} else {
|
||||
// 查询收藏数量
|
||||
this.checkCollection();
|
||||
this.userInfo(); //调用获取用户信息事件
|
||||
this.isGui = false;
|
||||
this.isInput = false;
|
||||
this.inputVal = '';
|
||||
uni.login({
|
||||
provider: 'weixin',
|
||||
success: function success(res) {
|
||||
if (res.code) {
|
||||
var params = { code: res.code };
|
||||
_this2.$requst.post('user/wxAppletsLogin', params).then(function (res) {
|
||||
if (res.code == 0) {
|
||||
if (res.data.token != '') {
|
||||
_this2.user_type = res.data.user_type; //权限
|
||||
uni.setStorageSync('token', res.data.token); //缓存token
|
||||
uni.setStorageSync('openid', res.data.openid); //缓存Openid
|
||||
uni.setStorageSync('expire', res.data.expire); //缓存失效时间(时间戳格式)
|
||||
uni.setStorageSync('is_active', res.data.is_active); //是否第一次授权
|
||||
uni.setStorageSync('user_type', res.data.user_type); //权限
|
||||
}
|
||||
} else {
|
||||
_this2.$toolAll.tools.showToast(res.msg);
|
||||
}
|
||||
}, function (error) {});
|
||||
}
|
||||
} });
|
||||
|
||||
// 查询收藏数量
|
||||
this.checkCollection();
|
||||
this.userInfo(); //调用获取用户信息事件
|
||||
}
|
||||
if (this.user_type == 'personal') {
|
||||
this.useArr = [
|
||||
|
@ -414,7 +437,7 @@ var QRCode = __webpack_require__(/*! ../../../jsFile/qrcode.js */ 51).default;va
|
|||
closeT: function closeT() {//关闭分红收益转化弹框
|
||||
this.tankClose();
|
||||
},
|
||||
submit: function submit() {var _this2 = this; //分红收益转化确认事件
|
||||
submit: function submit() {var _this3 = this; //分红收益转化确认事件
|
||||
if (uni.getStorageSync('sm').name == '' || uni.getStorageSync('sm').phone) {
|
||||
this.$toolAll.tools.showToast('请前往个人资料完善信息');
|
||||
} else if (this.inputVal == 0) {
|
||||
|
@ -426,9 +449,9 @@ var QRCode = __webpack_require__(/*! ../../../jsFile/qrcode.js */ 51).default;va
|
|||
} else {
|
||||
this.$requst.post('user/bonus-to-balance', { amount: this.inputVal * 100 }).then(function (res) {
|
||||
if (res.code == 0) {
|
||||
_this2.$toolAll.tools.showToast('转换成功,可在可提现查看');
|
||||
_this2.shouArr[1].price = _this2.inputVal;
|
||||
_this2.tankClose();
|
||||
_this3.$toolAll.tools.showToast('转换成功,可在可提现查看');
|
||||
_this3.shouArr[1].price = _this3.inputVal;
|
||||
_this3.tankClose();
|
||||
}
|
||||
}, function (error) {});
|
||||
}
|
||||
|
@ -445,16 +468,16 @@ var QRCode = __webpack_require__(/*! ../../../jsFile/qrcode.js */ 51).default;va
|
|||
}, 1000);
|
||||
},
|
||||
// 查询提现规则
|
||||
checkTG: function checkTG() {var _this3 = this;
|
||||
checkTG: function checkTG() {var _this4 = this;
|
||||
this.$requst.post('user/withdraw-rule').then(function (res) {
|
||||
// console.log(res);
|
||||
if (res.code == 0) {
|
||||
_this3.drawRule = res.data;
|
||||
_this4.drawRule = res.data;
|
||||
}
|
||||
}, function (error) {});
|
||||
},
|
||||
// 个人邀请码的logo图事件
|
||||
logoEv: function logoEv() {var _this4 = this;
|
||||
logoEv: function logoEv() {var _this5 = this;
|
||||
// this.$requst.post('user/qrcode').then(res=>{
|
||||
// if(res.code==0){
|
||||
// this.logoImg = res.data.qrcode
|
||||
|
@ -462,7 +485,7 @@ var QRCode = __webpack_require__(/*! ../../../jsFile/qrcode.js */ 51).default;va
|
|||
// },error=>{})
|
||||
this.$requst.post('user/qrcode-original').then(function (res) {
|
||||
if (res.code == 0) {
|
||||
_this4.logoImg = res.data.qrcode;
|
||||
_this5.logoImg = res.data.qrcode;
|
||||
}
|
||||
}, function (error) {});
|
||||
},
|
||||
|
@ -554,43 +577,43 @@ var QRCode = __webpack_require__(/*! ../../../jsFile/qrcode.js */ 51).default;va
|
|||
// });
|
||||
// }
|
||||
},
|
||||
checkCollection: function checkCollection() {var _this5 = this;
|
||||
checkCollection: function checkCollection() {var _this6 = this;
|
||||
this.$requst.post('user/collection', {
|
||||
page: 1,
|
||||
size: 200 }).
|
||||
then(function (res) {
|
||||
// console.log('获取收藏总数:',res);
|
||||
if (res.code == 0) {
|
||||
_this5.allCollection = res.data.length;
|
||||
_this6.allCollection = res.data.length;
|
||||
}
|
||||
}, function (error) {});
|
||||
},
|
||||
userInfo: function userInfo() {var _this6 = this; //查询用户信息
|
||||
userInfo: function userInfo() {var _this7 = this; //查询用户信息
|
||||
this.$requst.post('user/info').then(function (res) {
|
||||
// console.log('信息=====>', res);
|
||||
if (res.code == 0) {
|
||||
var info = res.data;
|
||||
_this6.name = info.nickname;
|
||||
_this6.headImg = info.headimgurl;
|
||||
_this7.name = info.nickname;
|
||||
_this7.headImg = info.headimgurl;
|
||||
uni.setStorageSync('sm', { name: info.username, phone: info.mobile });
|
||||
_this6.share_img = _this6.$http + info.share_img;
|
||||
_this6.share_title = info.share_title;
|
||||
_this6.qrtext = info.invite_url;
|
||||
_this7.share_img = _this7.$http + info.share_img;
|
||||
_this7.share_title = info.share_title;
|
||||
_this7.qrtext = info.invite_url;
|
||||
// this.qrtext = '/pages/login/login?invite_code='+info.invite_code
|
||||
_this6.invite_code = info.invite_code;
|
||||
_this7.invite_code = info.invite_code;
|
||||
// this.logoImg = info.headimgurl
|
||||
// console.log(this.logoImg,this.qrtext);
|
||||
info.bonus == 0 ? _this6.shouArr[0].price = '0.00' : _this6.shouArr[0].price = (info.bonus / 100).toFixed(2); //分红收益
|
||||
info.bonus_balance == 0 ? _this6.shouArr[1].price = '0.00' : _this6.shouArr[1].price = (info.bonus_balance / 100).toFixed(2); //分红可提现
|
||||
info.withdraw_bonus == 0 ? _this6.shouArr[2].price = '0.00' : _this6.shouArr[2].price = (info.withdraw_bonus / 100).toFixed(2); //分红提现中
|
||||
info.commission_balance == 0 ? _this6.tiArr[0].price = '0.00' : _this6.tiArr[0].price = (info.commission_balance / 100).toFixed(2); //直卖收益
|
||||
info.withdraw_sale == 0 ? _this6.tiArr[1].price = '0.00' : _this6.tiArr[1].price = (info.withdraw_sale / 100).toFixed(2); //直卖提现中
|
||||
info.bonus == 0 ? _this7.shouArr[0].price = '0.00' : _this7.shouArr[0].price = (info.bonus / 100).toFixed(2); //分红收益
|
||||
info.bonus_balance == 0 ? _this7.shouArr[1].price = '0.00' : _this7.shouArr[1].price = (info.bonus_balance / 100).toFixed(2); //分红可提现
|
||||
info.withdraw_bonus == 0 ? _this7.shouArr[2].price = '0.00' : _this7.shouArr[2].price = (info.withdraw_bonus / 100).toFixed(2); //分红提现中
|
||||
info.commission_balance == 0 ? _this7.tiArr[0].price = '0.00' : _this7.tiArr[0].price = (info.commission_balance / 100).toFixed(2); //直卖收益
|
||||
info.withdraw_sale == 0 ? _this7.tiArr[1].price = '0.00' : _this7.tiArr[1].price = (info.withdraw_sale / 100).toFixed(2); //直卖提现中
|
||||
if (info.mobile != '') {
|
||||
// 隐藏手机号中间四位
|
||||
_this6.phone = "".concat(info.mobile.substr(0, 3), "****").concat(info.mobile.substr(7));
|
||||
_this7.phone = "".concat(info.mobile.substr(0, 3), "****").concat(info.mobile.substr(7));
|
||||
}
|
||||
uni.setStorageSync('userInfoObj', info);
|
||||
_this6.logoEv();
|
||||
_this7.logoEv();
|
||||
}
|
||||
}, function (error) {});
|
||||
},
|
||||
|
@ -614,7 +637,7 @@ var QRCode = __webpack_require__(/*! ../../../jsFile/qrcode.js */ 51).default;va
|
|||
// });
|
||||
// }
|
||||
},
|
||||
scan: function scan() {var _this7 = this;
|
||||
scan: function scan() {var _this8 = this;
|
||||
wx.scanCode({ // 微信扫码 调起客户端扫码界面进行扫码
|
||||
complete: function complete(res) {}, //接口调用结束的回调函数(调用成功、失败都会执行)
|
||||
fail: function fail(res) {}, //接口调用失败的回调函数
|
||||
|
@ -623,7 +646,7 @@ var QRCode = __webpack_require__(/*! ../../../jsFile/qrcode.js */ 51).default;va
|
|||
success: function success(result) {// 接口调用成功的回调函数
|
||||
// console.log(result);
|
||||
wx.navigateTo({ //navigateTo:页面跳转 保留当前页面(页面隐藏,并未销毁,节省性能),跳转到应用内的某个页面。但是不能跳到 tabbar 页面 ,小程序使用页面跳转方法的时候 不能添加文件扩展名,否则会没有反应
|
||||
url: '/pages/login/login?invite_code=' + _this7.invite_code });
|
||||
url: '/pages/login/login?invite_code=' + _this8.invite_code });
|
||||
|
||||
wx.setStorage({ // 设置微信本地存储数据
|
||||
data: result,
|
||||
|
@ -646,12 +669,12 @@ var QRCode = __webpack_require__(/*! ../../../jsFile/qrcode.js */ 51).default;va
|
|||
// }
|
||||
// })
|
||||
},
|
||||
requestAndroidPermission: function requestAndroidPermission(permisionID) {var _this8 = this;return _asyncToGenerator( /*#__PURE__*/_regenerator.default.mark(function _callee() {var result, strStatus;return _regenerator.default.wrap(function _callee$(_context) {while (1) {switch (_context.prev = _context.next) {case 0:_context.next = 2;return (
|
||||
requestAndroidPermission: function requestAndroidPermission(permisionID) {var _this9 = this;return _asyncToGenerator( /*#__PURE__*/_regenerator.default.mark(function _callee() {var result, strStatus;return _regenerator.default.wrap(function _callee$(_context) {while (1) {switch (_context.prev = _context.next) {case 0:_context.next = 2;return (
|
||||
permision.requestAndroidPermission(permisionID));case 2:result = _context.sent;
|
||||
|
||||
if (result == 1) {
|
||||
strStatus = '已获得授权';
|
||||
_this8.savePic();
|
||||
_this9.savePic();
|
||||
} else if (result == 0) {
|
||||
strStatus = '未获得授权';
|
||||
} else {
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -212,6 +212,9 @@ __webpack_require__.r(__webpack_exports__);
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1 +1 @@
|
|||
<view class="padding-x120"><status-nav vue-id="4df589b9-1" statusBackw="{{true}}" whereCome="{{whereCome*1}}" statusTitle="{{true}}" title-val="{{titleVal}}" tabcolor="#ffffff" bind:__l="__l"></status-nav><block wx:if="{{pageShow}}"><view><view class="bacb padding-x20" style="{{'padding-top:'+(statusHNH+10+'px')+';'}}"><image style="height:682rpx;width:100%;margin-top:20rpx;" src="{{zhuImg}}" mode="aspectFit"></image><view class="margin20"><view class="disba"><block wx:if="{{user_type!='personal'}}"><view><view class="colorf78 fon24 bold">¥<text class="fon36">{{proDetailTwo.cur_price/100}}</text>.00</view><view class="color9 fon24 dis">原价<text style="text-decoration:line-through;">{{"¥"+proDetailTwo.price/100+".00"}}</text></view></view></block><block wx:if="{{user_type=='personal'}}"><view class="colorf78 fon24 bold">¥<text class="fon36">{{proDetailTwo.price/100}}</text>.00</view></block><view data-event-opts="{{[['tap',[['collection',['$0'],['proDetail.id']]]]]}}" class="discc" bindtap="__e"><block wx:if="{{isCollection}}"><image style="width:40rpx;height:38rpx;" src="/static/img/public/shouc.png" mode></image></block><block wx:else><image class="animated bounceIn" style="width:40rpx;height:38rpx;" src="/static/img/public/shoucactive.png" mode></image></block><view class="fon24 color9 margin-s10">收藏</view></view></view><view class="color33 fon32 margin-sx16 clips2">{{proDetail.name}}</view><view class="fon24 color9">{{proDetail.sub_title}}</view></view></view><block wx:if="{{user_type!='personal'}}"><view class="margin-s20 bacb"><view class="disba padding-sx20 padding-zy20"><view class="fon32 bold">{{"商品评价("+evalTotal+")"}}</view><view class="disac"><view data-event-opts="{{[['tap',[['checkAllp',['$0'],['proDetail.id']]]]]}}" class="fon26 color9 margin-y10" bindtap="__e">查看全部</view><image style="width:12rpx;height:22rpx;" src="/static/img/my/youj.png" mode></image></view></view><evaluate-list vue-id="4df589b9-2" eval-arr="{{evalArr}}" isEval="{{true}}" isShow="{{false}}" len="{{2}}" bind:__l="__l"></evaluate-list></view></block><view class="disbcac padding-sx40"><view class="gouwcxian "></view><image class="margin-zy20 margin-s10 gouwchh" src="/static/img/gouwc/heh.png" mode></image><view class="bold fon32">商品详情</view><view class="gouwcxian margin-z20"></view></view><view class="padding20 bacb"><view class="fon32 bold margin-sx10" style="color:#353535;">规格与包装</view><view class="disba fon24 color6 flw"><block wx:if="{{proDetail.brand_name!=''}}"><view class="disac margin-x10" style="width:50%;"><view class="flexs" style="width:32%;"><text>品牌</text></view><view class="flexs clips1">{{":\t"+proDetail.brand_name+''}}</view></view></block><view class="disac margin-x10" style="width:50%;"><view class="flexs" style="width:32%;">商品编号</view><view class="clips1">{{":\t"+proDetailTwo.coding}}</view></view><view class="disac margin-x10" style="width:50%;"><view class="flexs" style="width:32%;">商品名称</view><view class="clips1">{{":\t"+proDetail.name}}</view></view><view class="disac margin-x10" style="width:50%;"><view class="flexs" style="width:32%;">类别</view><view class="flexs clips1">{{":\t"+proDetail.category_name}}</view></view><block wx:for="{{proDetailTwo.own_spec}}" wx:for-item="itemspec" wx:for-index="indexspec" wx:key="indexspec"><block><view class="disac margin-x10" style="width:50%;"><view class="flexs" style="width:32%;">{{itemspec.name}}</view><view class="flexs clips1">{{":"+itemspec.value+itemspec.unit}}</view></view></block></block></view><view class="margin-s20"><rich-text nodes="{{detailCon}}"></rich-text></view></view><view class="disbcac padding-sx40"><view class="gouwcxian "></view><image class="margin-zy20 margin-s10 gouwchh" src="/static/img/gouwc/heh.png" mode></image><view class="bold fon32">猜你喜欢</view><view class="gouwcxian margin-z20"></view></view><twocolu-list vue-id="4df589b9-3" dataList="{{dataList}}" data-event-opts="{{[['^addChe',[['addChe']]]]}}" bind:addChe="__e" bind:__l="__l"></twocolu-list><block wx:if="{{showShare}}"><button style="border:none;" data-name="shareBtn" open-type="share" plain="true"><image class="zIn5 share animated pulse infinite" src="/static/img/product/share.png" mode></image></button></block><bottomkf vue-id="4df589b9-4" detail="{{proDetail}}" sku_img="{{sku_img}}" data-event-opts="{{[['^diaoq',[['proDetailEv']]]]}}" bind:diaoq="__e" bind:__l="__l"></bottomkf><back-top vue-id="4df589b9-5" showTop="{{showTop}}" data-event-opts="{{[['^backTop',[['backTop']]]]}}" bind:backTop="__e" bind:__l="__l"></back-top></view></block><block wx:if="{{xiaj}}"><view class="zanwu">该商品已下架,将自动返回</view></block></view>
|
||||
<view class="padding-x120"><status-nav vue-id="4df589b9-1" statusBackw="{{true}}" whereCome="{{whereCome*1}}" statusTitle="{{true}}" title-val="{{titleVal}}" tabcolor="#ffffff" bind:__l="__l"></status-nav><block wx:if="{{pageShow}}"><view><view class="bacb padding-x20" style="{{'padding-top:'+(statusHNH+10+'px')+';'}}"><image style="height:682rpx;width:100%;margin-top:20rpx;" src="{{zhuImg}}" mode="aspectFit"></image><view class="margin20"><view class="disba"><block wx:if="{{user_type!='personal'}}"><view><view class="colorf78 fon24 bold">¥<text class="fon36">{{proDetailTwo.cur_price/100}}</text>.00</view><block wx:if="{{proDetailTwo.cur_price!=proDetailTwo.price}}"><view class="color9 fon24 dis">原价<text style="text-decoration:line-through;">{{"¥"+proDetailTwo.price/100+".00"}}</text></view></block></view></block><block wx:if="{{user_type=='personal'}}"><view class="colorf78 fon24 bold">¥<text class="fon36">{{proDetailTwo.price/100}}</text>.00</view></block><view data-event-opts="{{[['tap',[['collection',['$0'],['proDetail.id']]]]]}}" class="discc" bindtap="__e"><block wx:if="{{isCollection}}"><image style="width:40rpx;height:38rpx;" src="/static/img/public/shouc.png" mode></image></block><block wx:else><image class="animated bounceIn" style="width:40rpx;height:38rpx;" src="/static/img/public/shoucactive.png" mode></image></block><view class="fon24 color9 margin-s10">收藏</view></view></view><view class="color33 fon32 margin-sx16 clips2">{{proDetail.name}}</view><view class="fon24 color9">{{proDetail.sub_title}}</view></view></view><block wx:if="{{user_type!='personal'}}"><view class="margin-s20 bacb"><view class="disba padding-sx20 padding-zy20"><view class="fon32 bold">{{"商品评价("+evalTotal+")"}}</view><view class="disac"><view data-event-opts="{{[['tap',[['checkAllp',['$0'],['proDetail.id']]]]]}}" class="fon26 color9 margin-y10" bindtap="__e">查看全部</view><image style="width:12rpx;height:22rpx;" src="/static/img/my/youj.png" mode></image></view></view><evaluate-list vue-id="4df589b9-2" eval-arr="{{evalArr}}" isEval="{{true}}" isShow="{{false}}" len="{{2}}" bind:__l="__l"></evaluate-list></view></block><view class="disbcac padding-sx40"><view class="gouwcxian "></view><image class="margin-zy20 margin-s10 gouwchh" src="/static/img/gouwc/heh.png" mode></image><view class="bold fon32">商品详情</view><view class="gouwcxian margin-z20"></view></view><view class="padding20 bacb"><view class="fon32 bold margin-sx10" style="color:#353535;">规格与包装</view><view class="disba fon24 color6 flw"><block wx:if="{{proDetail.brand_name!=''}}"><view class="disac margin-x10" style="width:50%;"><view class="flexs" style="width:32%;"><text>品牌</text></view><view class="flexs clips1">{{":\t"+proDetail.brand_name+''}}</view></view></block><view class="disac margin-x10" style="width:50%;"><view class="flexs" style="width:32%;">商品编号</view><view class="clips1">{{":\t"+proDetailTwo.coding}}</view></view><view class="disac margin-x10" style="width:50%;"><view class="flexs" style="width:32%;">商品名称</view><view class="clips1">{{":\t"+proDetail.name}}</view></view><view class="disac margin-x10" style="width:50%;"><view class="flexs" style="width:32%;">类别</view><view class="flexs clips1">{{":\t"+proDetail.category_name}}</view></view><block wx:for="{{proDetailTwo.own_spec}}" wx:for-item="itemspec" wx:for-index="indexspec" wx:key="indexspec"><block><view class="disac margin-x10" style="width:50%;"><view class="flexs" style="width:32%;">{{itemspec.name}}</view><view class="flexs clips1">{{":"+itemspec.value+itemspec.unit}}</view></view></block></block></view><view class="margin-s20"><rich-text nodes="{{detailCon}}"></rich-text></view></view><view class="disbcac padding-sx40"><view class="gouwcxian "></view><image class="margin-zy20 margin-s10 gouwchh" src="/static/img/gouwc/heh.png" mode></image><view class="bold fon32">猜你喜欢</view><view class="gouwcxian margin-z20"></view></view><twocolu-list vue-id="4df589b9-3" dataList="{{dataList}}" data-event-opts="{{[['^addChe',[['addChe']]]]}}" bind:addChe="__e" bind:__l="__l"></twocolu-list><block wx:if="{{showShare}}"><button style="border:none;" data-name="shareBtn" open-type="share" plain="true"><image class="zIn5 share animated pulse infinite" src="/static/img/product/share.png" mode></image></button></block><bottomkf vue-id="4df589b9-4" detail="{{proDetail}}" sku_img="{{sku_img}}" data-event-opts="{{[['^diaoq',[['proDetailEv']]]]}}" bind:diaoq="__e" bind:__l="__l"></bottomkf><back-top vue-id="4df589b9-5" showTop="{{showTop}}" data-event-opts="{{[['^backTop',[['backTop']]]]}}" bind:backTop="__e" bind:__l="__l"></back-top></view></block><block wx:if="{{xiaj}}"><view class="zanwu">该商品已下架,将自动返回</view></block></view>
|
|
@ -234,6 +234,27 @@ var _default =
|
|||
_this2.imgSrc = '';
|
||||
_this2.isChoose = true;
|
||||
_this2.$toolAll.tools.setTime('', '', 2000);
|
||||
uni.login({
|
||||
provider: 'weixin',
|
||||
success: function success(res) {
|
||||
if (res.code) {
|
||||
var params = { code: res.code };
|
||||
_this2.$requst.post('user/wxAppletsLogin', params).then(function (res) {
|
||||
if (res.code == 0) {
|
||||
if (res.data.token != '') {
|
||||
uni.setStorageSync('token', res.data.token); //缓存token
|
||||
uni.setStorageSync('openid', res.data.openid); //缓存Openid
|
||||
uni.setStorageSync('expire', res.data.expire); //缓存失效时间(时间戳格式)
|
||||
uni.setStorageSync('is_active', res.data.is_active); //是否第一次授权
|
||||
uni.setStorageSync('user_type', res.data.user_type); //权限
|
||||
}
|
||||
} else {
|
||||
_this2.$toolAll.tools.showToast(res.msg);
|
||||
}
|
||||
}, function (error) {});
|
||||
}
|
||||
} });
|
||||
|
||||
}
|
||||
}, function (error) {});
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue