图片调整
This commit is contained in:
17
App.vue
17
App.vue
@@ -18,6 +18,7 @@ export default {
|
||||
};
|
||||
},
|
||||
onLaunch: function() {
|
||||
uni.setStorageSync("isJump", null);
|
||||
// 禁止横屏
|
||||
// #ifdef APP-PLUS
|
||||
plus.screen.lockOrientation("portrait-primary");
|
||||
@@ -32,6 +33,22 @@ export default {
|
||||
},
|
||||
});
|
||||
|
||||
if (
|
||||
uni.getStorageSync("guidePages") != 2 ||
|
||||
!uni.getStorageSync("guidePages")
|
||||
) {
|
||||
plus.navigator.closeSplashscreen();
|
||||
} else {
|
||||
uni.switchTab({
|
||||
url: "/pages/home/index",
|
||||
success: function () {
|
||||
plus.navigator.closeSplashscreen();
|
||||
let page = getCurrentPages()[0];
|
||||
page.$vm.requestAll();
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
//取出缓存数据
|
||||
store.commit("setCacheData");
|
||||
// #ifdef MP-WEIXIN
|
||||
|
||||
2
main.js
2
main.js
@@ -26,6 +26,8 @@ Vue.prototype.judgeLogin = judgeLogin;
|
||||
Vue.prototype.isShowHtml = store.state.loadingShow;
|
||||
|
||||
Vue.prototype.$baseUrl = "https://api.nuttyreading.com/"
|
||||
//Vue.prototype.$baseUrl = 'http://192.168.110.100:9200/pb/'
|
||||
|
||||
//判断手机型号
|
||||
uni.getSystemInfo({
|
||||
success: function (res) {
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
"name" : "心灵空间",
|
||||
"appid" : "__UNI__BBBDFD2",
|
||||
"description" : "心灵空间",
|
||||
"versionName" : "1.0.23",
|
||||
"versionCode" : 1023,
|
||||
"versionName" : "1.0.24",
|
||||
"versionCode" : 1024,
|
||||
"transformPx" : false,
|
||||
/* 5+App特有相关 */
|
||||
"app-plus" : {
|
||||
|
||||
22
pages.json
22
pages.json
@@ -34,6 +34,17 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/visitor/taihu",
|
||||
"style": {
|
||||
"navigationBarTitleText": "太湖公益",
|
||||
"app-plus": {
|
||||
"bounce": "none",
|
||||
"titleNView": false,
|
||||
"popGesture": "none"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/visitor/mine",
|
||||
"style": {
|
||||
@@ -78,6 +89,17 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/visitor/taihuDetail",
|
||||
"style": {
|
||||
"navigationBarTitleText": "消息详情",
|
||||
"app-plus": {
|
||||
"bounce": "none",
|
||||
"titleNView": false,
|
||||
"popGesture": "none"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/user/forget",
|
||||
"style": {
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
<view class="list_block" v-if="!statusXLCP" :style="labelsList.length>0&&childrenList.length==0?`marginTop: ${45 + statusBarHeight}px;`:''">
|
||||
<view class="list_item" v-if="list.length>0" v-for="(item,index) in list" :key="index" @click.stop="goToDetail(item)">
|
||||
<view class="list_item_image">
|
||||
<image v-if="item.image" :src="item.image" mode="aspectFit"></image>
|
||||
<image v-if="item.squareImage" :src="item.squareImage"></image>
|
||||
<text class="image_null" v-else>暂无封面图</text>
|
||||
</view>
|
||||
<view class="list_item_right">
|
||||
@@ -460,7 +460,7 @@ export default {
|
||||
}
|
||||
.list_item_image,.image_null{
|
||||
width: 250rpx;
|
||||
height: 220rpx;
|
||||
height: 250rpx;
|
||||
background-color: rgba(125, 193, 240, 0.1);
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
@@ -469,6 +469,7 @@ export default {
|
||||
}
|
||||
.list_item_image image{
|
||||
width: 100%;
|
||||
height: 250rpx;
|
||||
}
|
||||
.list_item_right{
|
||||
margin-left: 30rpx;
|
||||
|
||||
@@ -88,7 +88,7 @@
|
||||
</image>
|
||||
<u-icon v-if="v.icon" name="map-fill" color="#018F89" size="20"
|
||||
style="display: inline-block"></u-icon>
|
||||
<template v-if="v.type == 3">
|
||||
<template v-if="v.type == 3&&$platform=='android'">
|
||||
<text style="color: #aaa; margin-left: 10rpx">
|
||||
(全部积分:{{ initData.user.jf }})</text>
|
||||
</template>
|
||||
@@ -107,7 +107,7 @@
|
||||
<text>
|
||||
¥{{ isShowAddress ? freightNum.toFixed(2) : Number(0).toFixed(2) }}</text>
|
||||
</template>
|
||||
<template v-if="v.type == 3">
|
||||
<template v-if="v.type == 3&&$platform=='android'">
|
||||
<text style="color: #fe6035"> -¥{{ jfNumberShow }}</text>
|
||||
</template>
|
||||
<template v-if="v.type == 5">
|
||||
@@ -119,7 +119,7 @@
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="bottom jf_box" v-if="v.type == 3">
|
||||
<view class="bottom jf_box" v-if="v.type == 3&&$platform=='android'">
|
||||
<view class="jf_box">
|
||||
<text style="color: #7dc1f0; font-weight: 600">可用积分({{ jfNumberMax }}分)</text>
|
||||
<view class="jf_input">
|
||||
@@ -217,7 +217,7 @@
|
||||
<text class="price">合计:
|
||||
<text class="total" v-if="actualPayment==0">{{jfNumber}}积分</text>
|
||||
<text class="totacl" v-else>
|
||||
¥{{actualPayment}}
|
||||
<span style=" color: red;">¥{{actualPayment}}</span>
|
||||
<text style="margin: 0 4rpx;" v-if="actualPayment>0&&jfNumber>0">
|
||||
+
|
||||
</text>
|
||||
@@ -660,7 +660,7 @@ import parse from "../../uni_modules/uview-ui/libs/config/props/parse";
|
||||
this.initData = res.data;
|
||||
|
||||
this.isShowAddress = res.data.is_course ? false : true;
|
||||
if (!this.isShowAddress) {
|
||||
if (!this.isShowAddress&&this.$platform=='android') {
|
||||
this.priceBreakdownList.push({
|
||||
text: "积分",
|
||||
imgUrl: require("@/static/icon/jifen.png"),
|
||||
|
||||
@@ -112,7 +112,7 @@
|
||||
<view class="learning_box_list">
|
||||
<view class="learning_item" @click="goCourseDescription(item)"
|
||||
v-for="(item, index) in flashSaleList">
|
||||
<image class="book_image" :src="item.image" mode="aspectFit"></image>
|
||||
<image class="book_image" :src="item.image"></image>
|
||||
<view class="book_name">{{ item.title }}</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -629,7 +629,7 @@ export default {
|
||||
background-color: rgba(125, 193, 240, 0.15);
|
||||
display: block;
|
||||
width: 100% !important;
|
||||
height: 180rpx;
|
||||
height: 220rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -93,7 +93,7 @@
|
||||
<view class="text" style="line-height: 40rpx">{{userMes.jf ? userMes.jf : 0}}</view>
|
||||
</view>
|
||||
|
||||
<view class="chong_list_item" style="
|
||||
<view class="chong_list_item" v-if="$platform=='android'" style="
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-direction: column;
|
||||
|
||||
@@ -135,7 +135,7 @@
|
||||
<text class="price">合计:
|
||||
<text class="total" v-if="actualPayment==0">{{jfNumber}}积分</text>
|
||||
<text class="total" v-else>
|
||||
¥{{actualPayment}}
|
||||
<span style=" color: red;">¥{{actualPayment}}</span>
|
||||
<text style="margin: 0 4rpx" v-if="actualPayment > 0 && jfNumber > 0"> + </text>
|
||||
|
||||
<text v-if="jfNumber > 0">{{ jfNumber }} 积分</text>
|
||||
|
||||
@@ -453,10 +453,6 @@ export default {
|
||||
this.submitClickNum = 0
|
||||
res.userInfo.token = res.token.token;
|
||||
await this.setUserInfo(res.userInfo);
|
||||
console.log(
|
||||
"res.userInfo哈哈红红火火恍恍惚惚 at line 593:",
|
||||
res.token
|
||||
);
|
||||
uni.setStorageSync("token", res.token.token);
|
||||
uni.showToast({
|
||||
title: "登录成功",
|
||||
|
||||
@@ -54,23 +54,22 @@
|
||||
|
||||
<view class="footer_box">
|
||||
<view class="footer_item">
|
||||
<view class="footer_nav_item" @click="selected=1">
|
||||
<image v-if="selected == 1" class="footer_item_image"
|
||||
<view class="footer_nav_item">
|
||||
<image class="footer_item_image"
|
||||
src="/static/tab/home_active.png" mode="aspectFit"></image>
|
||||
<image v-else class="footer_item_image" src="/static/tab/home.png" mode="aspectFit">
|
||||
</image>
|
||||
<text class="footer_item_text"
|
||||
:class="[selected == 1 ? 'footer_item_text_active' : '']">首页</text>
|
||||
<text class="footer_item_text footer_item_text_active">首页</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="footer_item" @click="toTaihu()">
|
||||
<view class="footer_nav_item">
|
||||
<image class="footer_item_image" src="/static/tab/thgy.png" mode="aspectFit"></image>
|
||||
<text class="footer_item_text">太湖公益</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="footer_item" @click="toMine()">
|
||||
<view class="footer_nav_item" @click="selected=4">
|
||||
<image v-if="selected == 4" class="footer_item_image"
|
||||
src="/static/tab/mine_active.png" mode="aspectFit"></image>
|
||||
<image v-else class="footer_item_image" src="/static/tab/mine.png" mode="aspectFit">
|
||||
</image>
|
||||
<text class="footer_item_text"
|
||||
:class="[selected == 4 ? 'footer_item_text_active' : '']">我的</text>
|
||||
<view class="footer_nav_item">
|
||||
<image class="footer_item_image" src="/static/tab/mine.png" mode="aspectFit"></image>
|
||||
<text class="footer_item_text">我的</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -81,7 +80,6 @@
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
selected : 1,
|
||||
cateList: [],
|
||||
seckillLst: [], //秒杀列表
|
||||
flashSaleList: [], //欢迎试听
|
||||
@@ -184,6 +182,12 @@ export default {
|
||||
url: `/pages/visitor/detail?navTitle=${item.title}&title=${item.title}&id=${item.id}`,
|
||||
});
|
||||
},
|
||||
//太湖公益
|
||||
toTaihu(){
|
||||
uni.navigateTo({
|
||||
url: '/pages/visitor/taihu'
|
||||
})
|
||||
},
|
||||
//我的
|
||||
toMine(){
|
||||
uni.navigateTo({
|
||||
|
||||
@@ -26,23 +26,22 @@
|
||||
|
||||
<view class="footer_box">
|
||||
<view class="footer_item" @click="toHome()">
|
||||
<view class="footer_nav_item" @click="selected=1">
|
||||
<image v-if="selected == 1" class="footer_item_image"
|
||||
src="/static/tab/home_active.png" mode="aspectFit"></image>
|
||||
<image v-else class="footer_item_image" src="/static/tab/home.png" mode="aspectFit">
|
||||
</image>
|
||||
<text class="footer_item_text"
|
||||
:class="[selected == 1 ? 'footer_item_text_active' : '']">首页</text>
|
||||
<view class="footer_nav_item">
|
||||
<image class="footer_item_image" src="/static/tab/home.png" mode="aspectFit"></image>
|
||||
<text class="footer_item_text">首页</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="footer_item" @click="toMine()">
|
||||
<view class="footer_nav_item" @click="selected=4">
|
||||
<image v-if="selected == 4" class="footer_item_image"
|
||||
<view class="footer_item" @click="toTaihu()">
|
||||
<view class="footer_nav_item" @click="selected=2">
|
||||
<image class="footer_item_image" src="/static/tab/thgy.png" mode="aspectFit"></image>
|
||||
<text class="footer_item_text">太湖公益</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="footer_item">
|
||||
<view class="footer_nav_item">
|
||||
<image class="footer_item_image"
|
||||
src="/static/tab/mine_active.png" mode="aspectFit"></image>
|
||||
<image v-else class="footer_item_image" src="/static/tab/mine.png" mode="aspectFit">
|
||||
</image>
|
||||
<text class="footer_item_text"
|
||||
:class="[selected == 4 ? 'footer_item_text_active' : '']">我的</text>
|
||||
<text class="footer_item_text footer_item_text_active">我的</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -53,7 +52,6 @@
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
selected : 4,
|
||||
pageList: [
|
||||
{
|
||||
name: "关于我们",
|
||||
@@ -73,6 +71,12 @@ export default {
|
||||
url: '/pages/visitor/index'
|
||||
})
|
||||
},
|
||||
//太湖公益
|
||||
toTaihu(){
|
||||
uni.navigateTo({
|
||||
url: '/pages/visitor/taihu'
|
||||
})
|
||||
},
|
||||
//跳转设置
|
||||
goSetting() {
|
||||
uni.navigateTo({
|
||||
|
||||
538
pages/visitor/taihu.vue
Normal file
538
pages/visitor/taihu.vue
Normal file
@@ -0,0 +1,538 @@
|
||||
<template>
|
||||
<view class="commonPageBox" style="">
|
||||
<view class="header_box">
|
||||
<view class="header_bg" :style="`margin-top:${statusBarHeight * 2}rpx`">
|
||||
<text class="PM_font" style="color: #d93737;">太湖公益</text>
|
||||
</view>
|
||||
</view>
|
||||
<view
|
||||
class="main_content_box"
|
||||
:style="`height:calc(100vh - ${(120 + statusBarHeight) * 2}rpx)`"
|
||||
>
|
||||
<view class="curriculum_box cate_box">
|
||||
<view
|
||||
:style="`background-image: url('${
|
||||
currentCate == i ? v.activeImage : v.image
|
||||
}');color:${currentCate == i ? '#fff' : '#7dc1f0'} !important;`"
|
||||
class="curriculum_item_box icon_bg"
|
||||
v-for="(v, i) in curriculumList"
|
||||
@click="handleClickCurriculum(v, i)"
|
||||
>
|
||||
<view
|
||||
class="curriculum_item_name"
|
||||
style="margin-left: 100rpx"
|
||||
:style="`;color:${currentCate == i ? '#fff' : v.color} !important;`"
|
||||
>{{ v.name }}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="flash_sale_box" v-if="currentCate == 0">
|
||||
<view class="flash_sale_content">
|
||||
<scroll-view
|
||||
scroll-y="true"
|
||||
class="scroll-Y"
|
||||
style="height: 100%;width: 100%;"
|
||||
>
|
||||
<view
|
||||
class="scroll-view-item flash_sale_content_item"
|
||||
v-for="(v, i) in goodsList"
|
||||
@click="goGoodsDetail(v)"
|
||||
>
|
||||
<image class="book_image" :src="v.productImages" mode="aspectFit"></image>
|
||||
<view class="book_content">
|
||||
<view class="book_name">{{ v.productName }}</view>
|
||||
<view class="bottom">
|
||||
<view class="book_price">
|
||||
<view class="book_price_current">
|
||||
<text class="price_icon">¥</text>
|
||||
<text class="price">{{ v.activityPrice > 0 ? v.activityPrice : v.price }}</text>
|
||||
</view>
|
||||
<view class="book_price_old" v-if="v.activityPrice > 0">原价:{{ v.price }}</view>
|
||||
</view>
|
||||
<view class="sumSales">已售:{{ v.sumSales }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="flash_sale_box" v-if="currentCate == 1">
|
||||
<view class="flash_sale_content">
|
||||
<common-list
|
||||
style="height: 100%;width: 100%;"
|
||||
noDataIcon="data"
|
||||
:isCondition="true"
|
||||
:dataList="noticeList"
|
||||
@hancleClick="gotoDetail"
|
||||
label="title"
|
||||
>
|
||||
<template slot="labelSlot" slot-scope="slotProps">
|
||||
<view class="related_courses_name hidden1">{{ slotProps.row.title }}</view>
|
||||
</template>
|
||||
</common-list>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="footer_box" @click.stop="toHome()">
|
||||
<view class="footer_item">
|
||||
<view class="footer_nav_item">
|
||||
<image class="footer_item_image" src="/static/tab/home.png" mode="aspectFit"></image>
|
||||
<text class="footer_item_text">首页</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="footer_item" @click.stop="toTaihu()">
|
||||
<view class="footer_nav_item">
|
||||
<image class="footer_item_image" src="/static/tab/thgy_active.png" mode="aspectFit"></image>
|
||||
<text class="footer_item_text footer_item_text_active">太湖公益</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="footer_item" @click.stop="toMine()">
|
||||
<view class="footer_nav_item">
|
||||
<image class="footer_item_image" src="/static/tab/mine.png" mode="aspectFit"></image>
|
||||
<text class="footer_item_text">我的</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
currentCate: 0, //tab
|
||||
goodsList: [],
|
||||
noticeList: [],
|
||||
curriculumList: [
|
||||
{
|
||||
name: "太湖商品",
|
||||
url: "/pages/courseInformation/index/index",
|
||||
color: "#d93737",
|
||||
image: require("@/static/icon/taihuicon2.png"),
|
||||
activeImage: require("@/static/icon/taihuicon2_active.png"),
|
||||
},
|
||||
{
|
||||
name: "太湖之光",
|
||||
url: "/pages/curriculum/index/index",
|
||||
color: "#7dc1f0",
|
||||
image: require("@/static/icon/taihuicon1.png"),
|
||||
activeImage: require("@/static/icon/taihuicon1_active.png"),
|
||||
}
|
||||
],
|
||||
|
||||
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
this.getGoodsList();
|
||||
},
|
||||
methods: {
|
||||
//获取数据
|
||||
async getGoodsList() {
|
||||
this.$http.request({
|
||||
url: 'visitor/getTaihuWelfareProductList',
|
||||
method: "POST",
|
||||
data: {
|
||||
limit: 10,
|
||||
page: 1
|
||||
},
|
||||
header: {
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
})
|
||||
.then(async (res)=> {
|
||||
if(res.page.records&&res.page.records.length>0){
|
||||
this.goodsList = res.page.records;
|
||||
}
|
||||
});
|
||||
},
|
||||
//点击tab
|
||||
async handleClickCurriculum(v, index) {
|
||||
this.currentCate = index;
|
||||
if (index == 0) {
|
||||
this.goodsList = [];
|
||||
await this.getGoodsList();
|
||||
}
|
||||
if (index == 1) {
|
||||
this.noticeList = [];
|
||||
await this.getArticle();
|
||||
}
|
||||
this.$forceUpdate();
|
||||
},
|
||||
//获取数据
|
||||
async getArticle() {
|
||||
this.$http
|
||||
.request({
|
||||
url: 'visitor/getTaihuWelfareArticleList',
|
||||
method: "POST",
|
||||
data: {
|
||||
limit: 10,
|
||||
page: 1
|
||||
},
|
||||
header: {
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
})
|
||||
.then(async (res) => {
|
||||
if (res.code == 0 && res.page && res.page.records.length > 0) {
|
||||
this.noticeList = this.noticeList.concat(res.page.records);
|
||||
this.$forceUpdate();
|
||||
}
|
||||
})
|
||||
.catch((e) => {
|
||||
console.log(e);
|
||||
});
|
||||
},
|
||||
//商品信息
|
||||
goGoodsDetail(v) {
|
||||
uni.navigateTo({
|
||||
url: `/pages/visitor/goods?isMiaosha=0&id=${v.productId}`,
|
||||
});
|
||||
},
|
||||
//文章详情
|
||||
gotoDetail(data) {
|
||||
uni.navigateTo({
|
||||
url: `/pages/visitor/taihuDetail?id=${data.id}&type=taihu`,
|
||||
});
|
||||
},
|
||||
|
||||
//首页
|
||||
toHome(){
|
||||
uni.navigateTo({
|
||||
url: '/pages/visitor/index'
|
||||
})
|
||||
},
|
||||
//太湖公益
|
||||
toTaihu(){
|
||||
uni.navigateTo({
|
||||
url: '/pages/visitor/taihu'
|
||||
})
|
||||
},
|
||||
//我的
|
||||
toMine(){
|
||||
uni.navigateTo({
|
||||
url: '/pages/visitor/mine'
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import "@/static/mixin.scss";
|
||||
.header_box {
|
||||
width: 100%;
|
||||
height: 260rpx;
|
||||
|
||||
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
overflow: hidden;
|
||||
|
||||
color: #fff;
|
||||
font-size: 80rpx;
|
||||
line-height: 260rpx;
|
||||
}
|
||||
.cate_box {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 0 !important;
|
||||
padding-top: 40rpx;
|
||||
|
||||
.icon_bg {
|
||||
width: 48%;
|
||||
height: 80rpx;
|
||||
line-height: 80rpx;
|
||||
|
||||
background-repeat: no-repeat;
|
||||
|
||||
background-size: 100% 100%;
|
||||
|
||||
color: #018f89;
|
||||
font-size: 48rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.main_content_box {
|
||||
width: 100%;
|
||||
margin-top: 0rpx;
|
||||
background-color: rgba(255, 255, 255, 0.65);
|
||||
padding: 27rpx;
|
||||
// padding-top: 0rpx;
|
||||
box-sizing: border-box;
|
||||
// padding-top: 75rpx;
|
||||
|
||||
.curriculum_box {
|
||||
width: 100%;
|
||||
// height: 198rpx;
|
||||
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-around;
|
||||
padding: 0px 37rpx 17rpx;
|
||||
box-sizing: border-box;
|
||||
|
||||
.curriculum_item_box {
|
||||
height: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.curriculum_item_img {
|
||||
width: 39rpx;
|
||||
height: 38rpx;
|
||||
float: left;
|
||||
}
|
||||
|
||||
.curriculum_item_name {
|
||||
margin-top: -10rpx;
|
||||
font-family: MicrosoftYaHei;
|
||||
font-weight: bold;
|
||||
font-size: 30rpx;
|
||||
color: #001b73;
|
||||
margin-left: 21rpx;
|
||||
// line-height: 46rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.flash_sale_box {
|
||||
height: calc(100% - 100rpx);
|
||||
// animation: example1 1s ease-out 0s backwards;
|
||||
width: 100%;
|
||||
margin-top: 33rpx;
|
||||
margin-bottom: 10rpx;
|
||||
|
||||
.flash_sale_top {
|
||||
width: 100%;
|
||||
height: 61rpx;
|
||||
background: #b7e0e2;
|
||||
box-shadow: 0rpx 0rpx 6rpx 0rpx #e9dccc;
|
||||
border-radius: 7rpx;
|
||||
padding: 3rpx 18rpx 3rpx 10rpx;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 21rpx;
|
||||
|
||||
.miaoShaIcon {
|
||||
margin-right: 16rpx;
|
||||
}
|
||||
|
||||
.miaoShaTitle {
|
||||
margin-right: 25rpx;
|
||||
|
||||
font-family: PangMenZhengDaoBiaoTiTiMianFeiBan;
|
||||
font-weight: normal;
|
||||
font-size: 35rpx;
|
||||
color: #018f89;
|
||||
line-height: 46rpx;
|
||||
}
|
||||
|
||||
.miaoShaContent {
|
||||
width: calc(100% - 172rpx);
|
||||
margin-top: 1rpx;
|
||||
font-family: Microsoft YaHei;
|
||||
font-weight: 600;
|
||||
font-size: 21rpx;
|
||||
color: #018f89;
|
||||
// line-height: 45rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.flash_sale_content {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
overflow: hidden;
|
||||
height: 100%;
|
||||
|
||||
.flash_sale_content_item {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
width: 48%;
|
||||
background-color: #fff;
|
||||
float: left;
|
||||
border-radius: 10rpx;
|
||||
margin-right: 4%;
|
||||
overflow: hidden;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
.active_price {
|
||||
position: absolute;
|
||||
top: 0rpx;
|
||||
right: 0rpx;
|
||||
width: 70rpx;
|
||||
height: 72rpx;
|
||||
background-repeat: no-repeat;
|
||||
line-height: 50rpx;
|
||||
background-size: 100% 100%;
|
||||
background-image: url("@/static/icon/taihuactiveprice.png");
|
||||
|
||||
color: #fff;
|
||||
font-size: 20rpx;
|
||||
font-weight: bold;
|
||||
text-align: center;
|
||||
// margin-top: -10rpx;
|
||||
// box-shadow: 0 0 30px 0 rgb(255, 255, 255);
|
||||
}
|
||||
.flash_sale_content_item:nth-child(2n) {
|
||||
margin-right: 0;
|
||||
}
|
||||
.book_image {
|
||||
width: 100%;
|
||||
height: 192rpx;
|
||||
// border-radius: 10rpx;
|
||||
background-color: #e9e9e9;
|
||||
}
|
||||
.book_content {
|
||||
padding: 20rpx 15rpx 10rpx;
|
||||
}
|
||||
.book_name {
|
||||
font-family: MicrosoftYaHei;
|
||||
font-weight: 600;
|
||||
font-size: 24rpx;
|
||||
line-height: 24rpx;
|
||||
height: 50rpx;
|
||||
color: #020001;
|
||||
// text-align: center;
|
||||
// margin-top: 18rpx;
|
||||
letter-spacing: 1rpx;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.scroll-X {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.commonPageBox {
|
||||
background-size: 100% 100%;
|
||||
background-repeat: no-repeat;
|
||||
background-image: url("@/static/icon/taihubg.png");
|
||||
}
|
||||
|
||||
.noticeIcon {
|
||||
width: 20rpx;
|
||||
}
|
||||
|
||||
.u-notice-bar {
|
||||
background-color: transparent !important;
|
||||
}
|
||||
|
||||
.bottomBox {
|
||||
width: 100%;
|
||||
height: 200rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
|
||||
.item_img {
|
||||
width: 48% !important;
|
||||
height: 100%;
|
||||
|
||||
image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
.book_price {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.book_price_current {
|
||||
color: #ff5b36;
|
||||
font-weight: bold;
|
||||
.price_icon {
|
||||
font-size: 22rpx;
|
||||
}
|
||||
}
|
||||
.book_price_old {
|
||||
color: #9c9a9b;
|
||||
font-size: 20rpx;
|
||||
margin-left: 10rpx;
|
||||
// margin-top: -4rpx;
|
||||
font-weight: normal;
|
||||
text-decoration: line-through;
|
||||
}
|
||||
.sumSales {
|
||||
color: #6c6c6c;
|
||||
font-size: 20rpx;
|
||||
|
||||
font-weight: normal;
|
||||
}
|
||||
.bottom {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
/deep/.list_item {
|
||||
background-color: #fff;
|
||||
display: flex;
|
||||
align-items: center !important;
|
||||
border-bottom: none;
|
||||
padding: 10rpx 0 !important;
|
||||
padding-right: 10rpx !important;
|
||||
margin-bottom: 10rpx;
|
||||
border-radius: 10rpx;
|
||||
padding-left: 20rpx !important;
|
||||
font-size: 24rpx;
|
||||
font-weight: bold;
|
||||
color: #020001;
|
||||
.rightArrow {
|
||||
width: 28rpx;
|
||||
height: 28rpx;
|
||||
}
|
||||
.titleItem {
|
||||
}
|
||||
}
|
||||
/deep/.scroll-view-item:nth-child(2n-1) {
|
||||
// background-color: #B7E0E2 !important;
|
||||
background-color: #fff !important;
|
||||
}
|
||||
.footer_box {
|
||||
height: 90rpx;
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
box-sizing: content-box;
|
||||
background: #fff;
|
||||
padding-top: 5rpx;
|
||||
}
|
||||
.footer_item {
|
||||
position: relative;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.footer_nav_item {
|
||||
/* #ifndef APP-NVUE */
|
||||
display: flex;
|
||||
/* #endif */
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
height: 100%;
|
||||
}
|
||||
.footer_item_text {
|
||||
font-size: 12px;
|
||||
color: #333;
|
||||
margin-top: 4rpx;
|
||||
}
|
||||
|
||||
.footer_item_text_active {
|
||||
color: #7dc1f0 !important;
|
||||
}
|
||||
|
||||
.footer_item_image {
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
}
|
||||
</style>
|
||||
169
pages/visitor/taihuDetail.vue
Normal file
169
pages/visitor/taihuDetail.vue
Normal file
@@ -0,0 +1,169 @@
|
||||
<template>
|
||||
<view class="container_zg">
|
||||
<z-nav-bar :title="prescriptDetail.title"></z-nav-bar>
|
||||
<view class="contentBox" v-if="prescriptDetail.type == 0">
|
||||
<view class="content">
|
||||
<view class="item title-center">
|
||||
{{ prescriptDetail.title }}
|
||||
</view>
|
||||
<rich-text
|
||||
v-if="prescriptDetail.content"
|
||||
class="item"
|
||||
:nodes="formatRichText(prescriptDetail.content)"
|
||||
></rich-text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="fullscreen-webview" v-else>
|
||||
<web-view :src="prescriptDetail.url"> </web-view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import $http from "@/config/requestConfig.js";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
options: {},
|
||||
playData: {},
|
||||
prescriptDetail: {
|
||||
images: [],
|
||||
},
|
||||
id: null,
|
||||
indicatorDots: true,
|
||||
autoplay: true,
|
||||
interval: 5000,
|
||||
duration: 500,
|
||||
};
|
||||
},
|
||||
onLoad(options) {
|
||||
this.id = options.id;
|
||||
this.options = options;
|
||||
},
|
||||
onShow() {
|
||||
this.getDetail();
|
||||
},
|
||||
methods: {
|
||||
formatRichText(html) {
|
||||
//控制图片大小
|
||||
let newContent = html.replace(/<img[^>]*>/gi, function (match, capture) {
|
||||
match = match
|
||||
.replace(/style="[^"]+"/gi, "")
|
||||
.replace(/style='[^']+'/gi, "");
|
||||
match = match
|
||||
.replace(/width="[^"]+"/gi, "")
|
||||
.replace(/width='[^']+'/gi, "");
|
||||
match = match
|
||||
.replace(/height="[^"]+"/gi, "")
|
||||
.replace(/height='[^']+'/gi, "");
|
||||
return match;
|
||||
});
|
||||
newContent = newContent.replace(
|
||||
/style="[^"]+"/gi,
|
||||
function (match, capture) {
|
||||
match = match
|
||||
.replace(/width:[^;]+;/gi, "max-width:100%;")
|
||||
.replace(/width:[^;]+;/gi, "max-width:100%;");
|
||||
return match;
|
||||
}
|
||||
);
|
||||
newContent = newContent.replace(/<br[^>]*\/>/gi, "");
|
||||
newContent = newContent.replace(
|
||||
/\<img/gi,
|
||||
'<img style="max-width:100%;height:auto;display:inline-block;margin:10rpx auto;"'
|
||||
);
|
||||
return newContent;
|
||||
},
|
||||
//详情
|
||||
getDetail() {
|
||||
$http
|
||||
.request({
|
||||
url: 'visitor/getTaihuWelfareArticleDetail',
|
||||
method: "POST",
|
||||
data: {id: this.options.id,},
|
||||
header: {
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
})
|
||||
.then((res) => {
|
||||
if (res.code == 0) {
|
||||
this.prescriptDetail = res.result;
|
||||
if (
|
||||
this.prescriptDetail.content &&
|
||||
this.prescriptDetail.contentType == 1
|
||||
) {
|
||||
this.prescriptDetail.content = res.result.content;
|
||||
}
|
||||
|
||||
}
|
||||
})
|
||||
.catch((e) => {
|
||||
console.log(e);
|
||||
});
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.contentBox {
|
||||
padding-bottom: 20rpx;
|
||||
}
|
||||
.contentBoxwebwiew {
|
||||
height: 100%;
|
||||
}
|
||||
.fullscreen-webview {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
}
|
||||
|
||||
.mb-10 {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.content {
|
||||
font-size: 28rpx;
|
||||
}
|
||||
|
||||
.swiper-item {
|
||||
image {
|
||||
margin: 0 auto;
|
||||
height: 250rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.uni-margin-wrap {
|
||||
margin-bottom: 20rpx;
|
||||
padding-top: 20rpx;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.container_zg {
|
||||
padding: 20rpx;
|
||||
background: #fff;
|
||||
|
||||
.item {
|
||||
padding: 10rpx 20rpx;
|
||||
padding-bottom: 20rpx;
|
||||
line-height: 46rpx;
|
||||
}
|
||||
.title-center {
|
||||
text-align: center;
|
||||
font-size: 32rpx;
|
||||
font-weight: 700 !important;
|
||||
}
|
||||
}
|
||||
|
||||
.flexbox {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
/deep/ .uni-section-header__decoration.line {
|
||||
background-color: #18bc37;
|
||||
}
|
||||
</style>
|
||||
@@ -243,16 +243,16 @@ export default {
|
||||
if (results && results.length > 0) {
|
||||
results.map((item, index) => {
|
||||
// "0"为正在支付;"1"为支付成功;"2"为支付失败;"3"为支付已恢复。
|
||||
if (item.transactionState == '1') {
|
||||
// 已经支付,但是没有走逻辑的内购订单 就发给后台做验证
|
||||
that.iapCheck('未完成订单的验证', item, index)
|
||||
// that.finishTransaction(item)
|
||||
} else if (item.transactionState != '1' || item.transactionState != '0') {
|
||||
// 不是正在支付订单,也不是已经支付订单就关闭掉
|
||||
// 其他状态的内购订单
|
||||
that.finishTransaction(item)
|
||||
}
|
||||
})
|
||||
// if (item.transactionState == '1') {
|
||||
// // 已经支付,但是没有走逻辑的内购订单 就发给后台做验证
|
||||
// that.iapCheck('未完成订单的验证', item, index)
|
||||
// // that.finishTransaction(item)
|
||||
// } else if (item.transactionState != '1' || item.transactionState != '0') {
|
||||
// // 不是正在支付订单,也不是已经支付订单就关闭掉
|
||||
// // 其他状态的内购订单
|
||||
// }
|
||||
that.finishTransaction(item);
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
@@ -263,7 +263,8 @@ export default {
|
||||
})
|
||||
this.iapChannel = await this.getProvider()
|
||||
if (this.iapChannel) {
|
||||
this.requestOrder();
|
||||
await this.restoreComplateRequest();
|
||||
await this.requestOrder();
|
||||
} else {
|
||||
uni.hideLoading()
|
||||
uni.showToast({
|
||||
@@ -328,7 +329,7 @@ export default {
|
||||
};
|
||||
$http
|
||||
.request({
|
||||
url: "/Ipa/veri",
|
||||
url: "Ipa/veri",
|
||||
method: "POST",
|
||||
data,
|
||||
header: {
|
||||
@@ -344,7 +345,7 @@ export default {
|
||||
icon: 'success'
|
||||
})
|
||||
// 服务器验证票据有效后在客户端关闭订单 (iapChannel.finishTransaction)
|
||||
that.finishTransaction(result);
|
||||
//that.finishTransaction(result);
|
||||
}
|
||||
})
|
||||
.catch((e) => {
|
||||
@@ -359,6 +360,7 @@ export default {
|
||||
}
|
||||
},
|
||||
});
|
||||
//that.finishTransaction(result);
|
||||
}, )
|
||||
},
|
||||
getDevName() {
|
||||
|
||||
Reference in New Issue
Block a user