This commit is contained in:
@fawn-nine
2024-08-02 15:08:43 +08:00
parent 3904f02c55
commit 7ee7b52c93
7 changed files with 2277 additions and 2531 deletions

View File

@@ -26,7 +26,7 @@
onLaunch: function(e) {
// 检测自动更新
// #ifdef APP-PLUS
updata();
// updata();
// #endif
uni.getSystemInfo({

View File

@@ -452,6 +452,7 @@
fatherIndex: null,
supportFlag: false,
selectGoodsData: {},
buyOptions: [
// {
// icon: 'chat',
@@ -665,10 +666,6 @@
onHandleClickBuy(e) {
console.log("this.selectGoodsData at line 589:", this.selectGoodsData);
// if (e.index == 0) {
// this.handleClickClose();
// }
// if (e.index == 0) {
var mynavData = JSON.stringify({
goods: [this.selectGoodsData],
typeId: 0,
@@ -710,15 +707,6 @@
this.getCourseDescriptionData();
// this.$commonJS.showToast("");
}
// if (res.productList.length > 0) {
// this.goodsList = res.productList;
// this.selectGoodsData = this.goodsList[0];
// this.$refs.commonSelectGoods.open();
// this.show = true;
// } else {
// this.$commonJS.showToast("此课程暂无购买方式");
// }
this.$forceUpdate();
});
} else {
@@ -745,7 +733,7 @@
}
this.$forceUpdate();
});
})
}
},
getUserInfo() {

File diff suppressed because it is too large Load Diff

View File

@@ -38,31 +38,6 @@
>退出登录</u-button
>
</view>
<!-- <view class="set_box" style="margin-top:20rpx">
<list :dataList="otherList" @hancleClick="handleClickRightContent" label="title">
<template slot="rightSlot" slot-scope="slotProps">
<text class="fdButtonBox aui-text-success">{{ slotProps.row.content }}</text>
<view>
</view>
</template>
</list>
</view> -->
</view>
<u-modal
@@ -73,10 +48,19 @@
@confirm="signOut"
>
</u-modal>
<u-popup key="1" v-if="showCodeImg" :show="showCodeImg" :round="10" @close="closePup">
<view class="box6">
<text style="color: #999; margin-bottom: 20rpx;">点击图片后长按图片保存到手机或使用微信扫描二维码添加客服企业微信</text>
<image @click="previewImage('/static/qiyeWx.jpg')" src="/static/qiyeWx.jpg" mode="widthFix" style="width: 100px; height: 100px; margin: 0 auto;"></image>
</view>
</u-popup>
</view>
</template>
<script>
// #ifdef APP-PLUS
import updata from "@/uni_modules/uni-upgrade-center-app/utils/check-update";
// #endif
import list from "@/pages/component/commonComponents/list";
import $http from "@/config/requestConfig.js";
@@ -92,7 +76,7 @@ export default {
playData: {},
options: {},
searchValue: "",
showCodeImg:false,
twoCateList: [], // 二级分类标题
titleList: [], // 方剂标题
curOneCateIndex: 0, // 当前选中的一级分类
@@ -117,11 +101,15 @@ export default {
type: "email",
},
{
title: "微信",
content: "yilujiankangkefu",
title: "企业微信",
content: "",
type: "wxNumber",
},
{
title: "版本检测",
content: "",
type: "checkVersion",
},
// {
// "title": "清楚缓存",
@@ -161,6 +149,9 @@ export default {
},
methods: {
...mapMutations(["setUserInfo"]),
closePup(){
this.showCodeImg = false
},
signOut() {
this.signShow = false;
this.setUserInfo({ token: null });
@@ -217,7 +208,11 @@ export default {
this.$commonJS.handleCopy(row.content, row.title);
break;
case "wxNumber":
this.$commonJS.handleCopy(row.content, row.title);
this.showCodeImg = true
// this.$commonJS.handleCopy(row.content, row.title);
break;
case "checkVersion":
this.getNewVersion()
break;
case "pageJump":
uni.navigateTo({
@@ -228,25 +223,7 @@ export default {
//
}
},
// 检查是有权限使用搜索功能
checkDisable() {
console.log("点击了");
},
// 显示无权限弹窗
// showNoRights() {
// let that = this
// uni.showModal({
// content: "",
// confirmText: '好的',
// showCancel: false,
// success: function(res) {
// if (res.confirm) {
// // console.log('用户点击确定');
// that.clear()
// }
// }
// })
// },
// 获取用户详情
getUserInfo() {
// 用户详情
@@ -258,6 +235,19 @@ export default {
});
}
},
// 版本检测
async getNewVersion(){
// #ifdef APP-PLUS
var info = await updata();
console.log('info',JSON.stringify(info))
if(info.result.code == 0){
uni.showToast({
title:info.result.message,
icon:'none'
})
}
// #endif
},
// 详情
gotoDetail(v) {
console.log(v);
@@ -402,27 +392,6 @@ export default {
async setOneCateIndex(item, index) {
console.log(index, 99999);
var that = this;
// if(this.userMes.tgdzPower == 0){
// let that = this
// uni.showModal({
// content: "购买 针灸六经法要上册和下册 后方可使用此功能",
// confirmText: '好的',
// showCancel: false,
// success: function(res) {
// if (res.confirm) {
// // console.log('用户点击确定');
// }
// }
// })
// return
// }
// if(item.title == "时辰取穴"){
// uni.navigateTo({
// url: "../timeAcupoint/timeAcupoint"
// })
// return
// }
let type = item.type;
this.curOneCateIndex = index;
this.curTwoCateIndex = 0;
@@ -432,15 +401,6 @@ export default {
// if (index != 2) {
await this.getTowCateList(type);
// uni.createSelectorQuery().select('.oneCateList').boundingClientRect(function (rect) {
// var height = rect.height
// console.log('元素高度:',);
// }).exec();
// } else {
// this.getJFList(dictType)
// }
},
async getTowCateList(type) {
var that = this;
@@ -450,11 +410,8 @@ export default {
method: "POST", // POST、GET、PUT、DELETE具体说明查看官方文档
data: {
loadAnimate: "none", // 请求加载动画
// 'categoryId': id
},
// header: { //默认 无 说明:请求头
// 'Content-Type': 'application/json'
// },
})
.then((res) => {
console.log(res, "二级分类获取成功");
@@ -511,15 +468,6 @@ export default {
this.getTitles(this.twoCateList[0].dictType);
this.$nextTick(async () => {
// await uni.createSelectorQuery().select('.uni-tabbar').boundingClientRect(function (rect) {
// console.log(rect.height, '3333')
// // var height = 42 + rect.height + 10;
// // that.scrollViewHeight = height;
// // console.log(that.scrollViewHeight, '111111')
// // that.$forceUpdate()
// // console.log('元素高度2', height);
// }).exec();
await uni
.createSelectorQuery()
.select(".cateList")
@@ -557,156 +505,31 @@ export default {
// const finalResult = Object.keys(result).map(key => ({ [key]: result[key] }));
return result;
},
// getJFList(id) {
// $http.request({
// url: "book/prescript/prescriptListForJF",
// method: "POST", // POST、GET、PUT、DELETE具体说明查看官方文档
// data: {
// loadAnimate: 'none', // 请求加载动画
// 'categoryId': id
// },
// header: { //默认 无 说明:请求头
// 'Content-Type': 'application/json'
// },
// }).then(res => {
// if (res.code == 0 && res.list.length > 0) {
// this.twoCateList = []
// this.titleList = this.transformData(res.list)
// console.log('JF经方', this.titleList)
// } else {
// this.twoCateList = []
// this.titleList = []
// }
// }).catch(e => {
// this.twoCateList = []
// this.titleList = []
// console.log(e)
// })
// },
getCateList(id) {
id ? "" : (id = 0);
this.twoCateList = [];
this.curTwoCateIndex = 0;
// 0为获取顶级分类其他为搜索下级分类目前的逻辑顶级是写死的所以可能只会涉及到搜索第二级
// $http.request({
// url: "book/prescript/prescriptCategoryList",
// method: "POST", // POST、GET、PUT、DELETE具体说明查看官方文档
// data: {
// loadAnimate: 'none', // 请求加载动画
// 'categoryId': id
// },
// header: { //默认 无 说明:请求头
// 'Content-Type': 'application/json'
// },
// }).then(res => {
// console.log(res, '脉穴分类获取成功')
// if (res.code == 0 && res.list.length > 0) {
// this.oneCateList = res.list
this.getTowCateList(this.oneCateList[0].type);
// } else {
// this.oneCateList = []
// }
// }).catch(e => {
// this.oneCateList = []
// console.log(e)
// })
},
// 放大图片
previewImage(url) {
console.log(url);
this.showCodeImg = false
uni.previewImage({
urls: [url],
longPressActions: {
itemList: ["很抱歉,暂不支持保存图片到本地"],
success: function (res) {
// console.log(res,'+++++')
},
},
// longPressActions: {
// itemList: ["很抱歉,暂不支持保存图片到本地"],
// success: function (res) {
// // console.log(res,'+++++')
// },
// },
});
},
// getSearch() {
// $http.request({
// url: "book/prescript/searchPrescript",
// method: "POST", // POST、GET、PUT、DELETE具体说明查看官方文档
// data: {
// loadAnimate: 'none', // 请求加载动画
// 'keywords': this.searchValue,
// type: this.curOneCateIndex + 1
// },
// header: { //默认 无 说明:请求头
// 'Content-Type': 'application/json'
// },
// }).then(res => {
// console.log(res, '搜索结果')
// if (res.code == 0 && res.list.length >= 0) {
// this.showSearchList = true
// this.searchList = res.list
// } else {
// this.searchList = []
// }
// }).catch(e => {
// // this.titleList = []
// this.searchList = []
// console.log(e)
// })
// },
// search(res) {
// console.log(res, 'res')
// // uni.showToast({
// // title: '搜索:' + res,
// // icon: 'none'
// // })
// if (res == '') {
// this.showSearchList = false
// this.searchList = []
// } else {
// this.getSearch()
// }
// },
// input(res) {
// console.log('----input:', res)
// if (res == '') {
// this.searchList = []
// } else {
// this.getSearch()
// }
// },
// clear(res) {
// console.log('----clear:', res)
// // uni.showToast({
// // title: 'clear事件清除值为',
// // icon: 'none'
// // })
// this.searchValue = ''
// this.showSearchList = false
// },
// blur(res) {
// // console.log('----blur:', res)
// // if (res == '') {
// // this.showSearchList = false
// // this.searchList = []
// // } else {
// // this.getSearch()
// // }
// },
// focus(e) {
// console.log('----focus:')
// // uni.showToast({
// // title: 'focus事件输出值为' + e.value,
// // icon: 'none'
// // })
// // 等于1 就是有权限
// // this.showSearchList = true
// },
// cancel(res) {
// uni.showToast({
// title: '点击取消,输入值为:' + res.value,
// icon: 'none'
// })
// }
},
onBackPress() {
// #ifdef APP-PLUS
@@ -719,6 +542,79 @@ export default {
<style lang="scss" scoped>
@import "@/style/common.scss";
.box6 {
padding: 20rpx;
text-align: center;
.title {
font-size: 28rpx;
margin: 10px 0;
}
.list {
padding: 0 10px;
padding-bottom: 20rpx;
.item {
font-size: 26rpx;
color: #333;
margin-bottom: 10rpx;
padding-top:20rpx ;
padding-bottom:20rpx ;
line-height:40rpx;
border-radius: 50rpx;
border: 1px solid #eee;
}
.item.active {
color: $themeColor;
border: 1px solid $themeColor;
}
.item:last-child {
// border-bottom: none
}
}
.tbn {
justify-content: center;
}
.buybtn { padding: 0 20rpx;
background-color: #00d8df;
margin: 0;
margin-right: 20rpx;
text {
color: #fff;
}
}
.saveBtnss {
align-items: center;
justify-content: center;
height: 80rpx;
// width: 46%;
overflow: hidden;
border-radius: 50rpx;
text {
padding-left: 10rpx;
font-size: 28rpx;
}
}
.gouwuche {
border: 1px solid #666;
padding-right: 20rpx;
text {
// color: #fff;
}
}
}
.u-grid-list {
// height: 40rpx;
}

View File

@@ -6,6 +6,9 @@
<view class="icon_hua">
<image src="../../static/homeLogo.png" mode="aspectFit" class="icon_hua_1"></image>
</view>
<view class="hehan">
<image src="../../static/icon/hehan.png" mode="aspectFit" class="icon_hua_1"></image>
</view>
<view class="topSearch_box">
<image src="../../static/search.png" mode="aspectFit"
@click="onPageJump('/pages/peanut/searchFor')"></image>
@@ -1058,11 +1061,11 @@
}
.childrenBox {
// background-color: #e4eefa !important;
border:1px solid #e4eefa;
background-color: #e4eefa !important;
// border:1px solid #e4eefa;
border-radius: 6rpx !important;
// @include mshadow(10px, 1);
background-color: #fff;
@include mshadow(10px, 1);
// background-color: #fff;
justify-content: center;
box-shadow: none !important;
// border-radius: 0 !important;

BIN
static/icon/hehan.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

BIN
static/qiyeWx.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB