This commit is contained in:
2025-02-19 10:05:27 +08:00
parent c85477a45b
commit cdc8a3ed8d
494 changed files with 48626 additions and 7248 deletions

View File

@@ -10,8 +10,8 @@
"sizes": "分辨率192x192",
"src": "图片路径"
}],
"versionName": "1.0.20",
"versionCode": 1020,
"versionName": "1.0.21",
"versionCode": 1021,
"app-plus": {
"nvueCompiler": "weex",
"compatible": {

View File

@@ -34,7 +34,34 @@
"popGesture": "none"
}
}
},{
},
{
"path": "pages/user/cateList",
"style": {
"navigationBarTitleText": "分类列表",
"enablePullDownRefresh": false, // 禁止下拉刷新,
"app-plus": {
"bounce": "none",
"titleNView": false,
"popGesture": "none"
}
}
},
{
"path": "pages/user/curriculumDetail",
"style": {
"navigationBarTitleText": "课程详情",
"enablePullDownRefresh": false, // 禁止下拉刷新,
"app-plus": {
"bounce": "none",
"titleNView": false,
"popGesture": "none"
}
}
},
{
"path" : "pages/mine/wallet/couponList",
"style" :
{

View File

@@ -53,10 +53,10 @@
<div @tap="renderScript.emitDispose" ref="videoContent6" v-show="false">
监听第一次初始播放时长,开始进行接口存储时间
</div>
<!-- v-if="platform != 'ios'" -->
<!-- 全屏按钮 start -->
<!-- 注意主要用于安卓端因为ios手机会被劫持 -->
<div class="fullScreenButton-container" v-if="platform != 'ios'">
<div class="fullScreenButton-container">
<div
:class="`prism-fullscreen-btn ${isFullScreen ? 'fullscreen' : ''}`"
@tap="renderScript.changeVideoScreen"
@@ -299,12 +299,12 @@ export default {
x: 10,
y: 7,
},
{
name: "fullScreenButton",
align: "tr",
x: 10,
y: 12,
},
// {
// name: "fullScreenButton",
// align: "tr",
// x: 5,
// y: 12,
// },
{
name: "prism-speed-selector",
align: "tr",
@@ -444,7 +444,7 @@ export default {
},
];
if (this.platform != "ios") {
// if (this.platform != "ios") {
var fullScreenButtonComponent = Aliplayer.Component({
init: function (status, toAddress) {
this.fullScreenStatus = status;
@@ -468,7 +468,7 @@ export default {
];
}
// }
//设置播放基本配置
var playerOptions = {
@@ -563,26 +563,37 @@ export default {
ownerInstance.callMethod("handleEnd");
},
//调用 screenChange + 设置全屏
changeVideoScreen(event, ownerInstance) {
var status = this.player.fullscreenService.getIsFullScreen();
ownerInstance.callMethod("screenChange", {
status: status,
primary: status ? "portrait" : "landscape",
});
var that = this;
// this.$emit('changeScreenLoading',true)
var status = this.player.fullscreenService.getIsFullScreen();
console.log('this.$platform--------', this.platform);
if (this.platform != 'ios') { // 改变按钮形态
ownerInstance.callMethod('screenChange', {
status: status,
primary: status ? 'portrait' : 'landscape'
})
}
if (status) {
if (this.platform != 'ios') {
console.log('恢复竖版');
setTimeout(() => {
plus.screen.lockOrientation("portrait-primary"); //锁死屏幕方向为竖屏
this.player.fullscreenService.cancelFullScreen();
}, 100);
}
} else {
this.player.fullscreenService.requestFullScreen();
if (this.platform != 'ios') {
setTimeout(() => {
plus.screen.lockOrientation("landscape-primary");
}, 100);
} else {
console.log('不要旋转, 使用原生全屏');
}
if (status) {
setTimeout(() => {
plus.screen.lockOrientation("portrait-primary"); //锁死屏幕方向为竖屏
this.player.fullscreenService.cancelFullScreen();
}, 100);
} else {
this.player.fullscreenService.requestFullScreen();
setTimeout(() => {
plus.screen.lockOrientation("landscape-primary");
}, 100);
}
},
}
},
//调用 changeVideoData 切换播放源
changeVideoData(event, ownerInstance) {

View File

@@ -59,6 +59,7 @@
</template>
<view v-else style="height: 200px"> </view>
</view>
</view>
</template>

View File

@@ -389,6 +389,7 @@
</view>
</view>
</view>
<!-- &&this.options.type != 'visitor' -->
<view class="goods_nav_box" v-if="!this.$store.state.loadingShow">
<uni-goods-nav :fill="true" :options="buyOptions" :button-group="customButtonGroup1"
@click="onHandleClickBuy" @buttonClick="onHandleClickBuy1" />
@@ -738,10 +739,10 @@
if (this.options.type == "visitor") {
console.log("this.options.type at line 1090:", this.options.type);
uni.showModal({
content: "登陆后可购买本商品",
confirmText: "去登录",
cancelText: "再逛逛",
confirmColor: '#018f89', //确定按钮颜色
content: "客官请先登录哦~",
confirmText: "去登录",
cancelText: "再逛逛",
confirmColor: "#018f89", //确定按钮颜色
success(res) {
if (res.confirm) {
uni.navigateTo({

View File

@@ -1,7 +1,4 @@
<template><page-meta
:page-font-size="$baseFontSize() + 'px'"
:root-font-size="$baseFontSize() + 'px'"
></page-meta>
<template><page-meta :page-font-size="$baseFontSize() + 'px'" :root-font-size="$baseFontSize() + 'px'"></page-meta>
<view style="
height: 100vh;
padding: 0 0;
@@ -257,8 +254,8 @@
<view class="text" style="line-height: 40rpx">{{
userMes.jf ? userMes.jf : 0
}}</view>
</view>
<view
class="chong_list_item"
@@ -277,13 +274,8 @@
}}</view>
</view>
</view>
<!-- v-if="iosHide" -->
<!-- <view v-if="iosHide" class="chong_list_item">
<b>{{ userMes.conponsCount }}</b>
优惠券
</view> -->
<!-- v-if="$platform!='ios'" -->
<!-- <b class="chong_btn" @click="onPageJump('../sdkDemo/pay')"> </b> -->
<view class="chong_list_item" style="
display: flex;
@@ -291,7 +283,7 @@
margin-right: 0;
justify-content: center;
">
<view class="chong_btn" v-if="iosHide"
<view class="chong_btn"
@click="onPageJump('/pages/mine/wallet/recharge/index')"> </view>
</view>
</view>
@@ -473,12 +465,11 @@
isAndorid: true,
platform: null, // 设备系统
pageList: [
{
name: "我的订单",
url: "/pages/bookShop/orderList?type=mine",
pageList: [{
name: "我的订单",
url: "/pages/bookShop/orderList?type=mine",
type: "switchTab",
type: "switchTab",
},
// {
// name: "购物车",
@@ -538,7 +529,8 @@
// 隐藏原生的tabbar
// uni.hideTabBar();
this.getBookList();
this.getData();await this.getUserCouponList();
this.getData();
await this.getUserCouponList();
},
async onTabItemTap() {
this.getBookList();
@@ -551,32 +543,32 @@
methods: {
...mapMutations(["setUserInfo"]),
async getUserCouponList() {
await this.$http
.request({
url: "common/coupon/getCouponHistoryList",
method: "POST", // POST、GET、PUT、DELETE具体说明查看官方文档
data: {
page: 1,
limit: 10,
getType: "", //获取类型 0 后台赠送 1 主动获取
status: "0", //使用状态 0 未使用 1 已使用 2 已过期
userInfo: "", //用户信息
userId: this.userInfo.id,
},
header: {
//默认 无 说明:请求头
"Content-Type": "application/json",
},
})
.then(async (res) => {
if (res.code != 0) return this.$commonJS.showToast(res.errMsg);
this.userCouponNum = res.couponList.total;
})
.catch((e) => {
console.log(e);
this.$commonJS.showToast(e.errMsg);
});
},
await this.$http
.request({
url: "common/coupon/getCouponHistoryList",
method: "POST", // POST、GET、PUT、DELETE具体说明查看官方文档
data: {
page: 1,
limit: 10,
getType: "", //获取类型 0 后台赠送 1 主动获取
status: "0", //使用状态 0 未使用 1 已使用 2 已过期
userInfo: "", //用户信息
userId: this.userInfo.id,
},
header: {
//默认 无 说明:请求头
"Content-Type": "application/json",
},
})
.then(async (res) => {
if (res.code != 0) return this.$commonJS.showToast(res.errMsg);
this.userCouponNum = res.couponList.total;
})
.catch((e) => {
console.log(e);
this.$commonJS.showToast(e.errMsg);
});
},
getBookList(flag, refreshflag) {
this.isLoadingHide = false;
var that = this;

View File

@@ -31,7 +31,7 @@
activeColor="cadetblue"
style="float: left;"
v-model="fontSizeBlod"
size="14"
size="16"
@change="asyncChange"
></u-switch>
<text style="margin-left: 5px;font-size: 14px !important;float: left;color: cadetblue;font-weight: bold;">最大</text>
@@ -40,7 +40,8 @@
</template>
</list>
</view>
<view class="button_box">
<!-- v-if="iosHide" -->
<view class="button_box" >
<u-button
shape="square"
type=""

View File

@@ -3,7 +3,7 @@
:root-font-size="$baseFontSize() + 'px'"
></page-meta>
<view>
{{ iosHide }}
<!-- 公共组件-每个页面必须引入 -->
<public-module></public-module>
<z-nav-bar

View File

@@ -381,7 +381,7 @@
productId: result.payment.productid.slice(1), // 产品id
orderId: result.payment.username, // 系统订单号
receiptData: result.transactionReceipt, // 苹果返回收据
// isSandBox: true, //测试数据
// sandBox: true, //测试数据
// body: that.stepsCj.priceTypeId // 充值类型id
};
console.log("提交给后台的数据", data);

783
pages/user/cateList.vue Normal file
View File

@@ -0,0 +1,783 @@
<template><page-meta
:page-font-size="$baseFontSize() + 'px'"
:root-font-size="$baseFontSize() + 'px'"
></page-meta>
<view class="container commonPageBox" style="background-color: #fbf9f7">
<!-- 公共组件-每个页面必须引入 -->
<public-module></public-module>
<z-nav-bar :title="options.navTitle" bgColor="#5F8F7F" fontColor="#fff"></z-nav-bar>
<view class="contentBox commonPageContentBox" :style="`height: calc(100vh - ${
(50 + statusBarHeight)
}px) !important;`">
<common-list :isNoIcon="true" noDataIcon="data" :isCondition="true" :isLoadingHide="isLoadingHide"
@lower="onReachBottom1" :pagination="pagination" :dataList="dataList" @hancleClick="gotoDetail"
label="title">
<template slot="labelSlot" slot-scope="slotProps">
<view class="feng">
<image v-if="slotProps.row.image" :src="slotProps.row.image" mode="aspectFit"
class="book_image"></image>
<view v-else style="
color: #c0c4cc;
font-size: 22rpx;
line-height: 160rpx;
text-align: center;
">暂无封面图</view>
</view>
<view class="cate_right">
<view class="related_courses_name hidden1"
:style="`${slotProps.row.buy ? 'color:#43A181' : ''}`">{{ slotProps.row.title }}</view>
</view>
<!-- <text v-if="slotProps.row.conditions!='03'">试听</text> -->
</template>
</common-list>
</view>
</view>
</template>
<script>
import list from "@/pages/component/commonComponents/list";
import $http from "@/config/requestConfig.js";
import {
mapState
} from "vuex";
export default {
components: {
list,
},
data() {
return {
isLoadingHide: false,
playData: {},
options: {},
searchValue: "",
pagination: {
// 请求参数
page: 1, //页码
limit: 20, //每页显示
total: 0, //总条数
},
twoCateList: [], // 二级分类标题
titleList: [], // 方剂标题
curOneCateIndex: 0, // 当前选中的一级分类
curTwoCateIndex: 0, // 当前选中的二级分类
searchList: [], // 搜索结果数组
showSearchList: false,
userMes: {}, // 用户信息
searchDisable: false, // 搜索不可用
limitShow: false,
limitTitle: "提示",
limitContent: "",
scrollViewHeight: 0,
dataList: [],
urlList: {
list: "/visitor/getCourseBySociologyId",
},
};
},
async onPullDownRefresh() {
console.log('下拉刷新')
this.pagination.page = 1;
this.dataList = []
await this.getData();
setTimeout(() => {
uni.stopPullDownRefresh();
console.log('下拉刷新已停止');
}, 50);
},
onLoad(options) {
console.log(options, "989");
this.options = options;
this.getUserInfo();
this.getData();
},
onHide() {
// this.showSearchList = false
// this.searchList = []
},
computed: {
...mapState(["userInfo"]),
},
methods: {
onReachBottom1() {
// 上拉加载
// 当列表数量不大于或等于总数量,则再次调用接口请求数据
if (this.dataList.length >= this.pagination.total) return;
this.pagination.page++;
this.getData();
},
// 检查是有权限使用搜索功能
checkDisable() {
console.log("点击了");
},
// 显示无权限弹窗
// showNoRights() {
// let that = this
// uni.showModal({
// content: "",
// confirmText: '好的',
// showCancel: false,
// success: function(res) {
// if (res.confirm) {
// // console.log('用户点击确定');
// that.clear()
// }
// }
// })
// },
// 获取用户详情
getUserInfo() {
// 用户详情
if (this.userInfo.id != undefined) {
this.$http.post("book/user/info/" + this.userInfo.id).then((res) => {
this.userMes = res.user;
this.getCateList();
console.log(this.userMes, "呼呼");
});
}
},
// 详情
gotoDetail(v) {
console.log(v);
uni.navigateTo({
// url: '../bookShop/commodityDetail?id=' + item.id
url: `/pages/user/curriculumDetail?navTitle=${v.title}&title=${v.title}&id=${v.id}`,
});
},
getData() {
this.isLoadingHide = false;
this.$http
.request({
url: this.urlList.list,
method: "POST",
data: {
sociologyId: Number(this.options.id), //分类id
// ...this.pagination,
},
header: {
//默认 无 说明:请求头
"Content-Type": "application/json",
},
})
.then((res) => {
console.log("res at line 289:", res);
// this.pagination.total = res.courses.total;
// if (res.courses.total == 0) {
this.isLoadingHide = true;
// }
this.dataList = [...this.dataList, ...res.courseList];
});
},
// 获取名称
getTitles(dictType) {
console.log("dictType", dictType);
if (this.curOneCateIndex == 0) {
if (dictType == 2) {
uni.navigateTo({
url: "./zhuanzhuchuban",
});
return;
}
$http
.request({
url: "book/generalArticle/articleByPage",
method: "POST",
data: {
// loadAnimate: 'none', // 请求加载动画
type: dictType == 1 ? "1" : "2",
limit: 1000,
current: 1,
},
header: {
//默认 无 说明:请求头
"Content-Type": "application/json",
},
})
.then((res) => {
console.log(res, "内容获取成功");
if (res.code == 0 && res.result && res.result.records.length > 0) {
this.titleList = res.result.records;
} else {
this.titleList = [];
}
})
.catch((e) => {
this.titleList = [];
console.log(e);
});
}
if (this.curOneCateIndex == 1) {
$http
.request({
url: "book/medicaldes/inheritListByPage",
method: "POST",
data: {
// loadAnimate: 'none', // 请求加载动画
dictType: dictType,
limit: 1000,
current: 1,
},
header: {
//默认 无 说明:请求头
"Content-Type": "application/json",
},
})
.then((res) => {
console.log(res, "内容获取成功");
if (res.code == 0 && res.result.records.length > 0) {
this.titleList = res.result.records;
for (let i = 0; i < this.titleList.length; i++) {
this.titleList[i].imageslist = [];
this.titleList[i].imageslist = this.titleList[i].img.split(";");
}
} else {
this.titleList = [];
}
})
.catch((e) => {
this.titleList = [];
console.log(e);
});
}
if (this.curOneCateIndex == 2) {
$http
.request({
url: "book/medicaldes/lightListByType?type=" + dictType,
method: "POST",
data: {
// loadAnimate: 'none', // 请求加载动画
limit: 1000,
page: 1,
},
header: {
//默认 无 说明:请求头
"Content-Type": "application/json",
},
})
.then((res) => {
console.log(res, "内容获取成功");
if (res.code == 0 && res.result.length > 0) {
this.titleList = res.result;
} else {
this.titleList = [];
}
})
.catch((e) => {
this.titleList = [];
console.log(e);
});
}
if (this.curOneCateIndex == 3) {
$http
.request({
url: "book/medicaldes/recordByType?type=" + dictType,
method: "POST",
data: {
// loadAnimate: 'none', // 请求加载动画
limit: 1000,
page: 1,
},
header: {
//默认 无 说明:请求头
"Content-Type": "application/json",
},
})
.then((res) => {
console.log(res, "内容获取成功");
if (res.code == 0 && res.result.length > 0) {
this.titleList = res.result;
} else {
this.titleList = [];
}
})
.catch((e) => {
this.titleList = [];
console.log(e);
});
}
},
setTwoCateIndex(item, index) {
let dictType = item.dictType;
this.curTwoCateIndex = index;
this.getTitles(dictType);
},
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;
this.searchValue = "";
this.searchList = [];
this.showSearchList = false;
// 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;
$http
.request({
url: "book/medicaldes/typeList?label=" + type,
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.result.length >= 0) {
this.twoCateList = res.result;
if (this.curOneCateIndex == 0) {
this.twoCateList = [{
dictType: "1",
dictValue: "学术思想",
},
{
dictType: "2",
dictValue: "出版专著",
},
{
dictType: "3",
dictValue: "学术平台",
},
];
}
if (this.curOneCateIndex == 2) {
this.twoCateList = [{
dictType: "1",
dictValue: "吴门之歌",
},
{
dictType: "2",
dictValue: "巴山夜语",
},
{
dictType: "3",
dictValue: "吴门之徽",
},
];
}
if (this.curOneCateIndex == 3) {
this.twoCateList = [{
dictType: "1",
dictValue: "学术贡献",
},
{
dictType: "2",
dictValue: "抗疫纪实",
},
{
dictType: "3",
dictValue: "吴门公益",
},
];
}
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")
.boundingClientRect(function(rect) {
console.log(rect.height, "22222");
var height = 42 + rect.height + 20;
that.scrollViewHeight = height;
console.log(that.scrollViewHeight, "111111");
that.$forceUpdate();
console.log("元素高度2", height);
})
.exec();
});
} else {
this.twoCateList = [];
this.titleList = [];
}
})
.catch((e) => {
this.twoCateList = [];
this.titleList = [];
console.log(e);
});
},
transformData(inputData) {
const result = {};
inputData.forEach((item) => {
const {
letter
} = item;
if (!result[letter]) {
result[letter] = [];
}
result[letter].push(item);
});
// 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);
uni.previewImage({
urls: [url],
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
plus.key.hideSoftKeybord();
// #endif
},
};
</script>
<style lang="scss" scoped>
.u-grid-list {
// height: 40rpx;
}
.searchList {
.item {
font-size: 28rpx;
padding: 20rpx;
border-bottom: 1px solid #dadbde;
}
}
.scroll-view_H {
background-color: #fff;
white-space: nowrap;
padding: 10rpx;
}
.scroll-Y {
height: 100%;
}
.scroll-view_H {
white-space: nowrap;
width: 100%;
}
.scroll-view-item {
// height: 300rpx;
// line-height: 300rpx;
// text-align: center;
// font-size: 36rpx;
}
.scroll-view-item_H {
display: inline-block;
width: 100%;
// height: 300rpx;
// line-height: 300rpx;
// text-align: center;
// font-size: 36rpx;
}
.titleList {
height: 100%;
}
.titleList2 {
height: calc(100% - 170rpx);
}
.commonPageContentBox {
// min-height: 100% !important;
}
.related_courses_name {
width: 100%;
// display: inline-block;
// float: left;
line-height: 60rpx;
// width: calc(100% - 90rpx) !important;
// padding-left: 20rpx;
font-weight: 700;
.aui-text-danger {
display: inline-block;
float: right;
}
}
.book_image {
width: 100%;
height: 100%;
float: left;
}
/deep/.list_item {
border-radius: 20rpx;
margin-bottom: 40rpx;
background: rgba(255, 255, 255, 0.85) !important;
box-shadow: 0px 0px 3px 0px rgba(0, 82, 79, 0.2) !important;
.rightArrow {
margin-top: 0rpx !important;
}
.titleItem {
display: flex;
align-items: center;
}
}
// /deep/.list_item :nth-child(2n-1) {
// background: rgba(255, 255, 255, 0.85) !important;
// }
.feng {
background-color: #f5f5f5;
margin: 0rpx 22rpx 0 0;
height: 160rpx !important;
width: 240rpx !important;
float: left;
border-radius: 14rpx;
// border: 1rpx solid #e9e9e9;
}
.cate_right {
width: calc(100% - 260rpx);
float: right;
}
.commonPageBox {
background-image: #edf6f5ad !important;
}
/deep/.uni-scroll-view-content {
box-sizing: border-box !important;
padding: 20rpx !important;
}
.curriculum_tag {
width: auto !important;
padding: 0 20rpx;
font-size: 24rpx;
// height: 40rpx;
text-align: center;
display: inline-block;
background-color: #43a181;
border: 1rpx solid #43a181;
border-radius: 4rpx;
color: #fff;
}
.curriculum_tag_info_box {
width: 100%;
margin-top: 1cqi;
display: flex;
align-items: center;
// justify-content: space-between;
}
.price_box {
display: flex;
align-items: center;
margin-top: 0rpx;
// justify-content: space-between;
}
/deep/.scroll-view-item:nth-child(2n-1) {
background-color: rgba(255, 255, 255, 0.85) !important;
}
</style>

File diff suppressed because it is too large Load Diff

View File

@@ -99,7 +99,7 @@
<text v-if="type == 1000" @click="onPageJump('/pages/user/login/forget')">忘记密码</text>
</view>
</view>
<view class="youKeL" style="margin-bottom: 40rpx" v-if="isAndorid">
<view class="youKeL" style="margin-bottom: 40rpx" v-if="$platform=='ios'">
<view @click="onPageJump('/pages/user/visitor')">免登陆体验</view>
</view>

View File

@@ -8,8 +8,16 @@
<view v-if="selected == 1">
<view class="header_box"></view>
<view class="main_content_box">
<view class="cate_box" v-if="cateList.length>0">
<view class="cate_item_box" v-for="(v, i) in cateList" @click="handleClickCate(v)">
<view class="cate_item_border">
<image :src="v.icon" mode="aspectFill" style="width: 49rpx; height: 49rpx"></image>
</view>
<view class="cate_item_name">{{ v.title }}</view>
</view>
</view>
<view class="flash_sale_box notice_box">
<view class="flash_sale_top">
<image
@@ -35,7 +43,7 @@
</view> -->
</view>
</view>
<view class="flash_sale_box">
<view class="flash_sale_top">
<image
@@ -77,7 +85,7 @@
</view>
</view>
<!-- <view class="learning_box listening_box bottomBox">
<view class="item_img" @click="handleGoApp">
<image src="@/static/tab/bottom1.png" mode="aspectFill"></image>
@@ -236,17 +244,17 @@ export default {
// url: "",
imgUrl: require("@/static/icon/homePage/kcjg.png"),
},
{
name: "我的课程",
url: "/pages/curriculum/order/index/index",
// url: "",
imgUrl: require("@/static/icon/homePage/wdkc.png"),
},
{
name: "吴门之光",
url: "/pages/medicaldes/medicaldes",
imgUrl: require("@/static/icon/homePage/wmzg.png"),
},
// {
// name: "我的课程",
// url: "/pages/curriculum/order/index/index",
// // url: "",
// imgUrl: require("@/static/icon/homePage/wdkc.png"),
// },
// {
// name: "吴门之光",
// url: "/pages/medicaldes/medicaldes",
// imgUrl: require("@/static/icon/homePage/wmzg.png"),
// },
],
urlList: {
@@ -671,20 +679,7 @@ export default {
},
handleClickCurriculum(v) {
uni.showModal({
content: "客官请先登录哦~",
confirmText: "去登录",
cancelText: "再逛逛",
confirmColor: "#018f89", //确定按钮颜色
success(res) {
if (res.confirm) {
uni.navigateTo({
url: "/pages/user/login/login",
});
}
},
});
return;
console.log(v);
if (v.url) {
uni.navigateTo({
@@ -696,22 +691,9 @@ export default {
},
handleClickCate(v) {
console.log(v);
uni.showModal({
content: "客官请先登录哦~",
confirmText: "去登录",
cancelText: "再逛逛",
confirmColor: "#018f89", //确定按钮颜色
success(res) {
if (res.confirm) {
uni.navigateTo({
url: "/pages/user/login/login",
});
}
},
});
return;
uni.navigateTo({
url: `/pages/curriculum/cate/index?navTitle=${v.title}&title=${v.title}&id=${v.id}`,
url: `/pages/user/cateList?navTitle=${v.title}&title=${v.title}&id=${v.id}`,
});
},
@@ -923,19 +905,19 @@ function calcTimer(timer) {
width: 100%;
display: flex;
overflow: hidden;
height: 254rpx;
height: 314rpx;
.flash_sale_content_item {
display: inline-block;
width: 165rpx;
width: 48%;
margin-right: 12rpx;
overflow: hidden;
}
.book_image {
width: 165rpx;
height: 192rpx;
width: 100%;
height: 252rpx;
border-radius: 10rpx;
background-color: #f5f5f5;
}

30
unpackage/cache/appleConfig.ini vendored Normal file
View File

@@ -0,0 +1,30 @@
[appleAppid]
appleAppid=com.cn.zmzm
[iosStyle]
iosStyle=common
[universalLinks]
universalLinks=https://verification.nuttyreading.com/uni-universallinks/__UNI__5D0ED80/
spaceid=mp-3614b80b-2d75-4462-a481-4998f8187274
[universalLinks_qq]
universalLinks_qq=
spaceid_qq=
[universalLinks_weibo]
universalLinks_weibo=
spaceid_weibo=
[appstore]
appstore=c1408422ea58718504a3a5e3ffdaf5c4
[iphone]
app%402x=e4af7a9066915cc1ba0f7dd5a1efb955
app%403x=0ed18a904463bc421504baeef476a5cf
notification%402x=8fd9c86f311cb7420162203f9e27956a
notification%403x=455f0c4c51d103f0c846afe25142c98a
settings%402x=c297e416276baac946379f92037b3267
settings%403x=c7f31d68744f3a1ed62020574193852b
spotlight%402x=d7d5455f35f7639843c49df79c67a808
spotlight%403x=e4af7a9066915cc1ba0f7dd5a1efb955

3
unpackage/cache/certdataios vendored Normal file
View File

@@ -0,0 +1,3 @@
iosProfile=D:/0--------------------xulu/账号和密码文件/众妙之门证书/ios证书/正式/zmzm.mobileprovision
ioscertFile=D:/0--------------------xulu/账号和密码文件/众妙之门证书/ios证书/正式/zmzm.p12
ioscertPassword=P6xOym+SWUfbZ+PLLipVwA==

View File

@@ -0,0 +1,11 @@
{
"applinks" : {
"apps" : [],
"details" : [
{
"appID" : "84LKB8J47D.com.cn.zmzm",
"paths" : [ "*", "/uni-universallinks/__UNI__5D0ED80/*" ]
}
]
}
}

View File

@@ -0,0 +1 @@
{"dir":"/Users/seaman/srv/bdserver.dcloud.net.cn/service/storage/app/package/IOS/queue/29e03860-e9ec-11ef-92f7-f1fa00891103/wgtRoot/__UNI__5D0ED80/"}

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 210 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 762 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

View File

@@ -0,0 +1,678 @@
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8" />
<script>
var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') || CSS.supports('top: constant(a)'))
document.write('<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' + (coverSupport ? ', viewport-fit=cover' : '') + '" />')
</script>
<title></title>
<style>
html,
body {
margin: 0;
padding: 0;
position: absolute;
left: 0;
top: 0;
right: 0;
bottom: 0;
background: #ffffff;
}
* {
margin: 0;
padding: 0;
}
button,
input,
input[type=button],
input[type=reset],
input[type=search],
input[type=submit],
select {
outline: none;
-webkit-tap-highlight-color: transparent;
-webkit-appearance: none;
font-family: inherit;
border: none;
}
.hide {
display: none;
}
.search-wrap {
position: absolute;
left: 0;
right: 0;
top: 0;
padding: 8px 60px 8px 15px;
background-color: #fff;
border-bottom: 1px solid #d3d3d3;
z-index: 100;
}
.search-wrap.init-status {
padding-right: 15px;
}
.search-wrap .search-bar {
display: block;
height: 30px;
background-color: #ebebeb;
padding-left: 10px;
padding-right: 10px;
color: #b4b4b4;
font-size: 15px;
line-height: 31px;
border-radius: 5px;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.search-wrap .cancel,
.search-wrap .submit {
position: absolute;
top: 0;
right: 0;
width: 55px;
height: 46px;
line-height: 46px;
text-align: center;
font-size: 16px;
color: #0079ff;
background-color: #fff;
}
.search-wrap .clear-input {
top: 11px;
right: 60px;
width: 34px;
height: 26px;
line-height: 26px;
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAAPFBMVEUAAACZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZlr8OySAAAAE3RSTlMANO/H574Jw5g/soF2LxKbQCgmvcJ4rgAAAKFJREFUOMu9k1sSgyAMRcNLwbfe/e+1HZLa0DKTP8+PztwTDRDoWa4lRSCm5erGZcTNWP7iIaMhD22+BfwQtqae89bQ39jRYVf9ocu3U+5/cp4D7yZeCwkrKo7Y8O8XVFYRZilkgx+VWYQEZagcSYQIZagcUQRAGZwLpmD+wmzSXKa5UdZWW4d10E1Gh2wPjD1y9tBqSlDlB/U4PxfnpEd5AeZAIGebfob2AAAAAElFTkSuQmCC) no-repeat center center;
background-color: #ededed;
background-size: 18px 18px;
position: absolute;
padding: 0;
border: 0;
font-size: 14px;
border-radius: 4px;
text-align: center;
z-index: 2;
}
.search-wrap.init-status .cancel,
.search-wrap.init-status .clear-input,
.search-wrap.init-status .submit {
display: none;
}
.search-wrap .search-bar .keyword {
display: block;
width: 100%;
padding-top: 6px;
padding-bottom: 6px;
border: 0;
font-size: 14px;
line-height: 18px;
background: 0 0;
}
.search-wrap.init-status .search-bar .keyword {
text-align: left;
}
.search-wrap .search-bar .keyword::-webkit-input-placeholder {
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKAAAAAgCAMAAACioYPHAAAAaVBMVEUAAACAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICxWbJ4AAAAInRSTlMAv39AEB/f758wYFDQj3CvDPflh9qpJBYEyEc3sn1om1t4LqRQpwAABAhJREFUWMPtlumS0zAQhD26TzvXsiwsC/T7PySK5Fi+Q2Cpoij6R2w5lvSpPTNS86+Jc1kbLbfrb7WxXT4U44Y1jK/1tI3cmPnwzYTT6dK1chcQCLVB2ABk8GtdXW1IKLHWk9Ct452PuOlJ7gLexk1shGYLcGFPfbujLs0Aut+z6vMJuJw/2Q+8JeD4tg0YyizCE0gQGs+TvCjIRIZlEW43RAvAmJx8ENAfofwQBQScNwEJZQ4gdDI1kNXHJ6AoSyFQFoAFYGLYAzTspki29++I10NT9QVo9wEZ2r4h82XPh0cBAw3qRzkovH6cJiFg7wDy2vgtQPsTPc9Qh9mjJ7yswUXGFBgzloEvHYyR3USjD2XcNWn7lLJyBCi8UbgPeNDLmvB8XLMARKRBpDhDEl2npBqDBLpJ0aAAluftxQZARYDSPwH4DZcly1d8vRODnPtrw3LOw/xLO7Ba2fM9d9fXeLpcO7MYAN21dtSnMzPvzS1IzVrOfoJ6IAZngBHKiTFg7So86xSArgVNF0WYqu4IL2tV/wAcfhFQ0A3JRzEHtABULgFLwEVA9TdqNWM15CZgmzwKVAKyXIpxlKm04gU0Ako2kvExQvR5dX8SUBJc7NhVCv12MbzLCZ0ocahB/m6ZIboPGPBpyfEREBuAWrdbg0qNKkoY7wL4hO8rmzNOq3xOwyRyMR1UDL7TtRZ6pqFcalr/HoBva0X5jKflQ9kqACspx6ZHRsp4+TX3DoDPwOe94l35rigB2UimFe/loEfRIJzKeKUR4OaAYgwoQJtlpv5l8PJxYeBleFQVOjks1NfqUddiXQdow3nLskwA3ATQEauAjnQ1P4BPVSuxPOI8L9Np0qXEtBqXV1qYuoFUBUrqGNPaVsCogbYCCmgzmE803/QSex34y4TvuIzAZahQntohDHNIYi3ndrKj8v5oL/yVrnOi/zMbZJsdCTY5AL7KevoHcPpwF1AE7ZrY81Wx7sZgcyw6eUVXAEIrapJIxqYVIBdNx/NWFEvkmTrq2xFH458THT9rwIRKuASshAhzPkmA6Rm8wlDBg4py/cBCUZSYprSkkjkKmTOMj82WkHTUSLr45jkTbgPWmHPTk66GkQODYEMFkmOPx50kIPocyb+2hEVm0pOVfI4XJJ2efMrfQrgP6Agwk/3MKSg+MclWE6ssgpc9nlMwJdW6UcYZuOKqFtP9TcrDcGS9rBIKjTywT2ggmZ1X0dsCgyhmX1EQ9CIVIkYikZkLioQuF9XUMNyQvEDNFs+INFQOkiRTGFwAyjix2Cc6otHHMWZlbM+yPOclxYd9QYGXTrIsTza7hGFmH6BMqSKdq+bbGMo0ohqUUvkR8VtJ8fKBXvJly2Cx3882//UX6QfMclqph21gcgAAAABJRU5ErkJggg==);
background-repeat: no-repeat;
background-position: left center;
background-size: 80px 16px;
color: gray
}
.search-wrap.init-status .search-bar .keyword::-webkit-input-placeholder {
background-position: center center;
}
.suggestion-wrap {
position: absolute;
top: 46px;
bottom: 0;
z-index: 7;
width: 100%;
background: #f6f6f6;
overflow: scroll;
-webkit-overflow-scrolling: touch;
}
.map-wrap {
height: 220px;
position: relative;
top: 46px;
width: 100%;
}
.list-wrap {
width: 100%;
position: absolute;
background-color: #fff;
z-index: 1;
bottom: 0;
left: 0;
overflow: hidden;
border-top: 1px solid #d3d3d3;
overflow-y: scroll;
padding-bottom: 0;
padding-bottom: constant(safe-area-inset-bottom);
padding-bottom: env(safe-area-inset-bottom);
-webkit-overflow-scrolling: touch;
}
.poi-list ul {
list-style: none;
width: 100%;
text-align: left;
padding: 0 0 65px;
}
.suggestion-wrap li,
.active-pos,
.poi-list li {
position: relative;
display: block;
padding-left: 15px;
border: none;
height: 58px;
padding-top: 6px;
margin: 0;
}
.poi-list li * {
pointer-events: none;
}
.poi-list li p,
.active-pos div p {
padding-bottom: 10px;
border-bottom: 1px solid #d3d3d3;
}
.poi-title {
font-size: 14px;
line-height: 27px;
color: #333;
font-weight: 400;
display: block;
width: 92%;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
}
.poi-address {
font-size: 12px;
color: gray;
height: 20px;
line-height: 20px;
margin: 0;
width: 92%;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
display: block;
}
.poi-city,
.poi-latlng {
line-height: 22px;
display: none;
}
.no-more-results,
.no-results {
color: gray;
padding: 20px 0;
line-height: 24px;
text-align: center;
}
.no-more-results p,
.no-results p {
padding: 0;
margin: 0;
}
.list-wrap i {
width: 16px;
height: 16px;
display: none;
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAAaVBMVEUAAAAAef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef84EEEWAAAAInRSTlMA+QQY6izG8NO6TphC3JReWSMoDLOfgXajf29lZEs7Hcep1l5DEAAAAPxJREFUOMuFU9cSgyAQBDSUgCVgSS/8/0cGc8E5FQdeOGaXud0rBB9mzdFYRtKnGDkVkktB+VgkYE27poCw6aheUxpxPqHn6SyaRe66NKsfpqyRll6+Njlfsp/jS1WkRFeXf/QUh6Stg3iCAHndMX6VPxltlaiMNdPXqp1iftviR+qHcN34ZJm6FO4/4XY0FOeuknhpp0jdCamHJA7GhjqQ2n2ctCpofPw8K+22OHm8I+HjvXIYj4SYYvSBwTAeU0SROjA6hnEQCTYjg2McbEKhZgbGoVC41HqJQ6lxs1iP8blZuN3WrdudG5jcyGWHNj/2+cXJr15+ebPr/wWbNBG/n/A0GgAAAABJRU5ErkJggg==) no-repeat right center;
background-size: 16px 16px;
position: absolute;
right: 15px;
top: 50%;
margin-top: -8px;
}
.list-wrap i.active {
right: 30px;
display: inline-block;
}
</style>
</head>
<body>
<div class="search-wrap init-status">
<div class="search-bar">
<form name="poi-search" id="poiSearch" onsubmit="return false;">
<input type="search" class="keyword" id="searchword" placeholder=" ">
<button type="reset" class="clear-input hide"></button>
<button type="submit" class="submit hide">搜索</button>
</form>
<a class="cancel">取消</a>
</div>
</div>
<div class="suggestion-wrap hide">
<div class="poi-list">
<ul>
</ul>
</div>
<div class="no-results hide">
<p>对不起,没有搜索到相关数据!</p>
</div>
<div class="no-more-results hide">
<p>亲,没有更多了~</p>
</div>
</div>
<div id="map" class="map-wrap"></div>
<div class="list-wrap">
<div class="active-pos">
</div>
<div class="poi-list">
<ul>
</ul>
<div class="no-results hide">
<p>对不起,没有搜索到相关数据!</p>
</div>
</div>
</div>
<script>
var loc;
var serviceWebview;
var back = function (cancel) {
if (cancel) {
plus.webview.postMessageToUniNView({
type: 'chooseLocation',
args: {
errMsg: 'cancel'
}
}, '__uniapp__service');
}
var webview = plus.webview.currentWebview()
if (webview.__uniapp_statusbar_style === 'dark') {
plus.navigator.setStatusBarStyle('dark')
}
webview.close('auto');
};
window.__chooseLocationConfirm__ = function () {
if (!loc) {
plus.nativeUI.alert('您尚未选择位置!');
return;
}
plus.webview.postMessageToUniNView({
type: 'chooseLocation',
args: loc
}, '__uniapp__service');
back();
}
var searchWrapElem = document.querySelector('.search-wrap');
var searchWordElem = document.getElementById('searchword');
var resetElem = document.querySelector('[type="reset"]');
var cancelElem = document.querySelector('.cancel');
var suggestionWrapElem = document.querySelector('.suggestion-wrap');
var mapElem = document.getElementById('map');
var listWrapElem = document.querySelector('.list-wrap');
var suggestionPoiListElem = suggestionWrapElem.querySelector('.poi-list ul');
var suggestionPoiNoResultsElem = suggestionWrapElem.querySelector('.no-results');
var suggestionPoiNoMoreResultsElem = suggestionWrapElem.querySelector(
'.no-more-results');
var activePosElem = document.querySelector('.active-pos');
var nearbyPoiListElem = listWrapElem.querySelector('.poi-list ul');
var nearbyPoiNoResultsElem = listWrapElem.querySelector('.no-results');
listWrapElem.style.top = mapElem.offsetHeight + 47 + 'px';
var debounce = function (func, wait, immediate) {
var timeout, result;
return function () {
var context = this,
args = arguments,
later, callNow;
later = function () {
timeout = null;
if (!immediate) {
result = func.apply(context, args);
}
};
callNow = immediate && !timeout;
clearTimeout(timeout);
timeout = setTimeout(later, wait);
if (callNow) {
result = func.apply(context, args);
}
return result;
};
};
var plusReady = function (callback) {
if (window.plus) {
callback()
} else {
document.addEventListener('plusready', callback)
}
}
var ZOOM = 13
window.__chooseLocation__ = function (params) {
if (params && params.keyword) {
searchWordElem.value = params.keyword;
}
plusReady(function () {
serviceWebview = plus.webview.getWebviewById('__W2A_CONTEXT_') ||
plus.webview
.getLaunchWebview();
plus.key.addEventListener('backbutton', function () {
back(true);
});
var nativeMarker = false;
var nativeMap = new plus.maps.Map('map', {
zoom: ZOOM
});
var centerPoint = false
var reverseGeocode = debounce(function (point) {
plus.maps.Map.reverseGeocode(point, {}, function (res) {
activePosElem.innerHTML =
'<div data-name="' + (res.address || '') +
'" data-address="' + (res.address || '') +
'" data-lat="' + res.coord.getLat() +
'" data-lng="' + res.coord.getLng() +
'"><h2 class="poi-title">地图位置</h2><p><span class="poi-address">' +
(res.address ||
'') +
'</span><span class="poi-latlng">' +
res.coord
.getLat() +
',' + res.coord.getLng() +
'</span><i></i></p></div>';
}, function (err) {
console.log(err);
});
searchNearbyPoi.poiSearchNearBy(searchWordElem.value || '', point, 1000);
}, 10)
nativeMap.getUserLocation(function (state, point) { //获取当前用户坐标
if (state === 0) {
nativeMarker = new plus.maps.Marker(point);
nativeMarker.setIcon('__uniappmarker@3x.png');
nativeMap.addOverlay(nativeMarker);
//centerPoint = point;
nativeMap.showUserLocation(true);
if (plus.os.name !== 'Android') {
nativeMap.setCenter(point);
}
// reverseGeocode(centerPoint);
} else {
console.log('获取用户坐标失败');
}
});
nativeMap.onstatuschanged = function (evt) { //切换坐标中心
// if (!centerPoint) {
// return;
// }
if (centerPoint && evt.center) {
if (centerPoint.latitude === evt.center.latitude &&
centerPoint.longitude === evt.center.longitude) {
return;
}
}
centerPoint = evt.center
if (nativeMarker) {
nativeMarker.setPoint(centerPoint);
}
reverseGeocode(centerPoint);
};
var searchPoi = new plus.maps.Search(nativeMap);
var searchNearbyPoi = new plus.maps.Search(nativeMap);
var showMap = function (centerPoint) {
nativeMap.show();
if (centerPoint) {
if (nativeMarker) {
nativeMarker.setPoint(centerPoint);
}
nativeMap.setCenter(centerPoint);
// setTimeout(function() {
// nativeMap.setZoom(ZOOM);
// }, 150);
// reverseGeocode(centerPoint);
}
searchWordElem.value = '';
cancelElem.className = 'cancel hide';
searchWrapElem.className = 'search-wrap init-status';
suggestionWrapElem.className = 'suggestion-wrap hide';
resetSuggestionPoiList();
}
var resetSuggestionPoiList = function () {
suggestionPoiListElem.innerHTML = '';
suggestionPoiNoResultsElem.className = 'no-results hide';
suggestionPoiNoMoreResultsElem.className =
'no-more-results hide';
}
var showSuggestionPoiList = function () {
nativeMap.hide();
resetSuggestionPoiList();
}
var showSuggestionPoiNoResults = function () {
suggestionPoiListElem.innerHTML = '';
suggestionPoiNoResultsElem.className = 'no-results';
suggestionPoiNoMoreResultsElem.className =
'no-more-results hide';
}
var renderPoiResults = function (poiList) {
var html = [];
for (var i = 0; i < poiList.length; i++) {
var poi = poiList[i];
if (poi.point) {
html.push('<li data-name="' + (poi.name || '') +
'" data-address="' + (poi.address || '') +
'" data-lat="' + poi.point.getLat() +
'" data-lng="' + poi.point.getLng() +
'"><p><span class="poi-title">' + poi.name +
'</span><span class="poi-address">' + (poi.address ||
'') +
'</span><span class="poi-latlng">' + poi.point
.getLat() +
',' + poi.point.getLng() +
'</span><span class="poi-city">' + poi.city +
'</span></p><i></i></li>');
}
}
return html.join('');
}
var showNearbyPoiNoResults = function () {
nearbyPoiListElem.innerHTML = '';
nearbyPoiNoResultsElem.className = 'no-results';
}
var showNearbyPoiResults = function (poiList) {
var html = renderPoiResults(poiList);
if (html) {
nearbyPoiListElem.innerHTML = html;
nearbyPoiNoResultsElem.className = 'no-results hide';
} else {
showNearbyPoiNoResults();
}
}
var showSuggestionPoiResults = function (poiList) {
var html = renderPoiResults(poiList);
if (html) {
suggestionPoiListElem.innerHTML = html;
suggestionPoiNoResultsElem.className =
'no-results hide';
suggestionPoiNoMoreResultsElem.className =
'no-more-results';
} else {
showSuggestionPoiNoResults();
}
}
searchPoi.onPoiSearchComplete = function (state, res) {
if (state === 0) {
if (res.poiList.length) {
showSuggestionPoiResults(res.poiList);
} else {
showSuggestionPoiNoResults();
}
} else {
showSuggestionPoiNoResults();
}
};
searchNearbyPoi.onPoiSearchComplete = function (state, res) {
if (state === 0) {
if (res.poiList.length) {
showNearbyPoiResults(res.poiList);
} else {
showNearbyPoiNoResults();
}
} else {
showNearbyPoiNoResults();
}
};
var getSuggestion = debounce(function (q) {
if (q.trim()) {
searchPoi.poiSearchNearBy(q, centerPoint, 50000)
} else { }
}, 10);
suggestionPoiListElem.addEventListener('click', function (evt) {
var target = evt.target;
for (; target && target !== suggestionPoiListElem; target =
target.parentNode) {
if (target && target.tagName === 'LI') {
var laglng = target.querySelector('.poi-latlng')
.innerText
.split(',');
centerPoint = new plus.maps.Point(Number(laglng[1]), Number(laglng[
0]));
showMap(centerPoint);
reverseGeocode(centerPoint);
break;
}
}
});
searchWordElem.addEventListener('click', function () {
searchWrapElem.className = 'search-wrap';
suggestionWrapElem.className = 'suggestion-wrap';
cancelElem.className = 'cancel';
showSuggestionPoiList();
});
var oldHasValue = false;
var setInputState = function (hasValue) {
if (hasValue !== oldHasValue) {
if (hasValue) {
resetElem.className = 'clear-input'
} else {
resetElem.className = 'clear-input hide'
}
oldHasValue = hasValue;
}
}
searchWordElem.addEventListener('input', function () {
var value = this.value.replace(/^\s+|\s+$/g, '');
setInputState(!!value);
getSuggestion(value);
});
resetElem.addEventListener('click', function (e) {
setInputState(false);
setTimeout(function () {
searchWordElem.focus();
}, 0);
});
cancelElem.addEventListener('click', function () {
showMap();
});
listWrapElem.addEventListener('click', function (e) {
var target = e.target;
for (; target && target !== listWrapElem; target =
target.parentNode) {
if (target.className === 'active-pos' || target.tagName ===
'LI') {
var lastActiveElem = listWrapElem.querySelector(
'i.active');
if (lastActiveElem) {
lastActiveElem.className = '';
}
if (target.className === 'active-pos') {
target = target.children[0]
}
target.querySelector('i').className = 'active';
loc = {
poiname: target.getAttribute('data-name'),
poiaddress: target.getAttribute(
'data-address'),
latlng: {
lat: target.getAttribute(
'data-lat'),
lng: target.getAttribute(
'data-lng'),
}
}
if (nativeMarker) {
nativeMarker.setPoint(new plus.maps.Point(
loc.latlng.lng, loc.latlng.lat));
}
break;
}
}
})
});
};
</script>
</body>
</html>

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,284 @@
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8" />
<script>
var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') || CSS.supports('top: constant(a)'))
document.write('<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' + (coverSupport ? ', viewport-fit=cover' : '') + '" />')
</script>
<title></title>
<style>
html,
body,
.container {
margin: 0;
padding: 0;
position: absolute;
left: 0;
top: 0;
right: 0;
bottom: 0;
background: #ffffff;
}
#map {
position: absolute;
left: 0;
top: 0;
right: 0;
bottom: 80px;
bottom: calc(80px + constant(safe-area-inset-bottom));
bottom: calc(80px + env(safe-area-inset-bottom));
}
#poi {
position: absolute;
left: 0;
right: 0;
bottom: 0;
bottom: constant(safe-area-inset-bottom);
bottom: env(safe-area-inset-bottom);
height: 80px;
background: #FFFFFF;
}
.poi-info {
width: 100%;
padding: 23px 16px 23px 18px;
box-sizing: border-box;
background: #FFFFFF;
}
.poi-name {
font-size: 17px;
line-height: 17px;
color: #111111;
display: block;
margin-right: 70px;
word-wrap: break-word;
}
.poi-addr {
font-size: 13px;
line-height: 13px;
color: #666666;
display: block;
margin-top: 4px;
margin-right: 70px;
word-wrap: break-word;
}
.poi-nav {
display: block;
position: absolute;
top: 10px;
right: 16px;
width: 60px;
height: 60px;
border-radius: 60px;
overflow: hidden;
}
.poi-nav i,
.poi-nav span {
position: absolute;
top: 0;
width: 100%;
height: 100%;
display: inline-block;
border-radius: 60px;
}
.poi-nav i {
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHgAAAB4CAMAAAAOusbgAAACnVBMVEUAAAA9avA+avA9avA/bPE8afA+avM9afA9avA9au9Ac/I+bPQ9avA8a/E8au8+avY9avA9avBAgP88avA9au9AbfFAgP89avA9avBJbf89au88afA8ae88afA8ae9AbO88afA/avE9ae88avBHcfFCcfY+a/H///89afE8afA8avA9afA8afA9a/E9afA9avA8avA8avA9ae////88ae8/a+/+/v77/P5Cbu9jh/I9au9Te/CIo/XY4fuasfbH1PpJc/Dl6/xHce9Cbe9Eb+9FcO/3+f5SevC0xfjh6PygtvdLdPD4+f7e5fytwPj9/f7y9f1agPG6yvlsjvNIcvC8y/lXfvFNdvBZf/HR3PtBbe+DoPTT3fvg5/xWffGyxPh/nPTo7f32+P65yfnBz/n6+/6xw/i+zfmwwvj5+v6Np/WetPdPd/BMdfBOd/BdgvGkufdGce9ghfKnu/deg/F4l/NqjPKAnfS3x/lAbO+KpfVPePBmifKqvviZsPait/fS3PtUe/F6mfT8/f7s8P2Xr/bX4PuWrvbI1fqdtPfq7/3t8f3E0vqCn/RRefCzxPjK1vpwkfPP2vtVfPHR2/tDbu+BnvTr8P3G0/qLpvXW3/uOqPXL1/rf5vyht/eDn/Rzk/OPqfWQqfXZ4vuGovX19/67y/nm7Pymuvc+au9hhfKluvfU3vt3lvO3yPlpjPJykvN2lfNQePB7mfSsv/ju8v18mvTO2fvv8/22x/nr7/2cs/aMpvXn7P3D0fp+nPR5mPTE0frj6fyftfdcgfFfhPHN2Prx9P1ihvJ2lvO/zvm9zPl0lPOHo/VsjvKovPeQqvX09v6TrPZ1lfOUrfZnivKVrfbM2PrAzvmuwfi1xvjC0Pri6fzz9v59m/T8d63OAAAAM3RSTlMA7GNUSf4p38bFFC3nN7Id75oI/eI4BIv7B9Kl9fnCQLs1ossSG2sBS/p7rJlYuLmYrcSkuUTkAAAGJElEQVR4XsWbVXvbShBAJbumJE0abp0mbdI23KS9M4YgM0ORmZmZmZkZLjMzMzPDb7m2NvJnx8p6pVjd86J18nA+raSFmVlBNXGRxtyMApvdIqamiha7rSAj1xgZJ+iLOTPPEo8KxFvyMs06SSMMKVFIJSrFEBFu6zBjdA4ykBNtHBZGbfq4IcjMkHHpYdKOGIkqGTkiDNpBNtSAbdAAtYNHoUZGDRa0MzrWhJoxxY7WqM0yiDggREOWFm9MGg6YtBj13mwRw4CYrVKblGzCsGBKTlLjHWPFsGEdw+41J2AYSWCePRJFDCtiIuNYNRzDzHCmcWzsUAw7Q8cy3C/xhtsc8p4T1fbz7TUXmXo7xHM2i6iSb2Hus8iAaKZ+vwmoXgzwYQnLV0X5npOsqEkM9QcdGBJr/2NYMmoUA9zswZAk9zsvmLSJCc+txBCYspW9MSIORAyd7xQjHVFxlsxKQ+1iwrUipJOmtDIw4IDF0PFKNVIxKKyvWDu68vbEQ2+5OnxAAAc2Iw0xeB0Wi0zsnb8f6NyYghRig9axJmSguHkhhGRh8zTKm9131cu0fq6uAAY6tyGFUX3mJGTAXQYMvLkSqQTOUzZk4GsGbdsmDMEjAfsyZGAbEFrbz253FMuUgh/zDjOM2f47Opb9YO1xIqjY3u93vKABGRgp+EhHBnYRQWMx9iN+/EVkI90nzkcG2iTBMw5UFi+85UZG8mXvMJb9/iQi2IHK4s+6kJkhcrTCyD4mlyn//fglVINRIEQjA29L4t1K4o72CaiKaOKNyEEGlkjibQriQ0WokpwIFfNhtyQOnnteXkaZ/umzY4pWsXZSJHHUwxdHeb1mfPhiNHvEmTzEmR7xeB7iPI/YwkNsEYS4eB7i+DghEnmIMVIw8hEbhVw+4lwhg484QyjkIy4UrHzEVsHOR2wXLHzEFkHkIxaFVD7iVG5i5q4u2ujlpfB1tQW5YBHsyAW7YEMu2IQC5EKBkIFcyBBykQu5ghG5YGRZ+qzasmUV+uFYhzJfrrmKmohkWexNAfAPmk17b+kHcns9fIQ+znf2ZSVlsSdY1IonnIP9pUjY4f+vWdCXyZTlrZBHCeQRugC6epuSYOt8gIO4eo6Hza2waI6XvUTcs8FDBVR4L99QxHnULcwmCOIplGiEN1YsB3+mS2Ji6oZulH9StjBmDeInZ3+K12fKuODyzI3E9HyXhytwxXt5gSI2U7epdUWEfQD7eptuDKbLCatVPuMosjFnerkUOLq8mAQp2lAWz3vUgwtc3ku9JKZszA0qxa894WEZ4kaAI5WILa1QTsTsz9ggB19UiWeDh6mIeM8F7xZhObhKVIpzIqjhpi0ze6kCqJLbpxHn7Nx5RhJjz6uwdNkBaEefuPyehzIo814+7lccTQ+wvQ4KnJEU04kYG8oAoH6V2gHESA8p/lwq0Q7QXOrjToAY3XsA7tcgYfJjhLkwt7dVTQ8p0oOoe4jk7NNICBAf7gCAG7XoQ37GNMYxhY3fJ4HTdU54ECSumQ8w9SjADHJnjl4mwkS5SQsb0wPllcdgsdRYBPWfBIpr71YBLK7BcoD7LYhYAsGUUALl9NTAYmidJDUuNkGb21+863MAkPq/GeDmCnbxCJZkyF3w9fAXLliChOLZ0LT1N3B+tU6elafWITom9XICTshNhb62saR/TjrhNBIcpxrB+R1pLgCAc5O/X40yP9Sxv1yDQie8HGuc8OPVn3YvWnChqRO8NEk5tFuwtLwKqn75taFyba17Wk1ddcupLqy8RyADiMxa5YQXPcW3AvyY9/i1iv2wHBF7OuABVl6AAI7hFFDifFCKjyWpeeT3PxrXl18/eaeoQXqv/oS/EHHD5QrvlHzp73/+dYJMN5bMUGI7JanJnsZt+Y8MjbNQZqu7du0ELzXIhDiakrjWEwMlVa8naVmU4gQdEWMo5Rg6YsqmFKDoSTKt5EZHrEnUIiPdSBjDUFalA6KZoZBMB4Yn8iqd41UsyKs8kldBKK8SWF5Fv7zKnHkVdvMvZedfvM//uAL/Axr8j6TwP4RDSM9Xc+woP53TQStOR8v0wZw5XvfDdPTjg4VW+figtVDb8cH/AZ+Eg+9jqX0NAAAAAElFTkSuQmCC) no-repeat;
background-size: 100%;
}
</style>
</head>
<body>
<div id="container" class="container">
<div id="map"></div>
<div id="poi">
<div class="poi-info">
<span class="poi-name"></span>
<span class="poi-addr"></span>
<div class="poi-nav">
<i></i>
<span></span>
</div>
</div>
</div>
</div>
<script>
var loc;
var serviceWebview;
var back = function() {
var webview = plus.webview.currentWebview()
if (webview.__uniapp_statusbar_style === 'light') {
plus.navigator.setStatusBarStyle('light')
}
webview.close('auto');
};
var isIos = !!navigator.userAgent.match(/iPhone|iPad|iPod/i);
document.addEventListener('plusready', function() {
serviceWebview = plus.webview.getWebviewById('__W2A_CONTEXT_') || plus.webview.getLaunchWebview();
plus.key.addEventListener('backbutton', back);
})
/**
* 调用系统第三方程序进行导航
*/
function openSysMap(lat, lng, title) {
/**
* 网页版地图源
*/
var mapsSourceWeb = [
{
title: '腾讯地图网页版',
getUrl: function() {
var url
url = 'https://apis.map.qq.com/uri/v1/routeplan?type=drive' + '&to=' +
encodeURIComponent(title) + '&tocoord=' + encodeURIComponent(lat + ',' + lng) +
'&referer=APP'
return url
}
}
]
/**
* APP版地图源
*/
var mapsSource = [
{
title: '高德地图',
pname: 'com.autonavi.minimap',
action: !isIos ? 'amapuri://' : 'iosamap://',
getUrl: function() {
var url
if (!isIos) {
url = 'amapuri://route/plan/'
} else {
url = 'iosamap://path'
}
url += '?sourceApplication=APP&dname=' + encodeURIComponent(title) + '&dlat=' + lat +
'&dlon=' + lng + '&dev=0'
return url
}
},
{
title: '百度地图',
pname: 'com.baidu.BaiduMap',
action: 'baidumap://',
getUrl: function() {
var url = 'baidumap://map/direction?destination=' + encodeURIComponent('latlng:' + lat +
',' + lng + '|name:' + title) + '&mode=driving&src=APP&coord_type=gcj02'
return url
}
},
{
title: '腾讯地图',
pname: 'com.tencent.map',
action: 'qqmap://',
getUrl: function() {
var url
url = 'qqmap://map/routeplan?type=drive' + (isIos ? ('&from=' + encodeURIComponent(
'我的位置')) : '') + '&to=' + encodeURIComponent(title) + '&tocoord=' +
encodeURIComponent(lat + ',' + lng) + '&referer=APP'
return url
}
}
]
var maps = []
mapsSource.forEach(function(mapsSource) {
var installed = plus.runtime.isApplicationExist({
pname: mapsSource.pname,
action: mapsSource.action,
})
if (installed) {
maps.push(mapsSource)
}
})
if (isIos) {
maps.unshift({
title: 'Apple 地图',
getUrl: function() {
var url
url = 'https://maps.apple.com/?daddr=' + encodeURIComponent(title) + '&sll=' +
encodeURIComponent(lat + ',' + lng)
return url
}
})
}
if (maps.length === 0) {
maps = maps.concat(mapsSourceWeb)
}
plus.nativeUI.actionSheet({
title: '导航方式',
cancel: '取消',
buttons: maps,
}, function(res) {
var index = res.index
var map
if (index > 0) {
map = maps[index - 1]
plus.runtime.openURL(map.getUrl(), function() { }, map.pname)
}
})
}
var ZOOM = 13
window.__openLocation__ = function(params) {
var mapElem = document.getElementById('map');
var poiNameElem = document.querySelector('.poi-name');
var poiAddrElem = document.querySelector('.poi-addr');
var poiNavElem = document.querySelector('.poi-nav');
var latitude = params.latitude;
var longitude = params.longitude;
var scale = params.scale;
var name = params.name;
var address = params.address;
var point = new plus.maps.Point(longitude, latitude);
var map = plus.maps.create('map', {
center: point,
zoom: scale || ZOOM,
top: 0,
left: 0,
width: mapElem.offsetWidth,
height: mapElem.offsetHeight
});
var marker = new plus.maps.Marker(point);
marker.setIcon('__uniappmarker@3x.png');
if (name) {
poiNameElem.innerText = name;
// marker.setLabel(name);
}
if (address) {
poiAddrElem.innerText = address;
// var bubble = new plus.maps.Bubble(address);
// marker.setBubble(bubble);
}
map.addOverlay(marker);
plus.webview.currentWebview().append(map);
var userPoint = false
map.getUserLocation(function(state, point) {
if (state) {
plus.nativeUI.toast('定位失败!');
} else {
userPoint = point;
}
})
poiNavElem.addEventListener('click', function() {
openSysMap(latitude, longitude, name)
});
}
</script>
</body>
</html>

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

View File

@@ -0,0 +1,149 @@
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8" />
<script>
var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') ||
CSS.supports(
'top: constant(a)'))
document.write(
'<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' +
(coverSupport ? ', viewport-fit=cover' : '') + '" />')
</script>
<title>Scan code</title>
<style>
html,
body,
.container {
margin: 0;
padding: 0;
position: absolute;
left: 0;
top: 0;
right: 0;
bottom: 0;
background: #000000;
}
</style>
</head>
<body>
<div id="scan" class="container">
</div>
<script>
var scan;
var lightImg;
var lightView;
var back = function(cancel) {
if (cancel) {
plus.webview.postMessageToUniNView({
type: 'scanCode',
args: {
errMsg: 'cancel'
}
}, '__uniapp__service');
}
lightImg && lightImg.clear();
lightView && lightView.clear();
scan && scan.close();
var webview = plus.webview.currentWebview();
if (webview.__uniapp_dark) {
plus.navigator.setStatusBarStyle('dark');
}
webview.close('auto');
}
/**
* 绘制照亮开关
*/
function drawLight() {
var offImg =
'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAABjklEQVRoQ+1ZbVHEQAx9TwE4ABTcOQAknANQAKcAUAAOAAXgAHAACsDCKQiTmbYDzJZtNt2bFrJ/m6+Xl2yyU2LmhzOPH/8PgIjcADirxNyapNoffMwMiMgzgMPBHmyCLySPLCoBwJKtAbJbYaBmD1yRvBwAtBMxl5DF+DZkiwCIyBLAzsgBbki+Wm2WAlCaL6zOMvKnJO+sNksB7ALQbO1ZHfbIv5FUVs2nCIB6EZETALdmj2mFY5I6X8ynGEADQllYmL1+VzBfnV/VvQB0aj45ARyQ/Ci14QLQsOBZLe5JaikWnzEA7AN4L4hgA2Dpyb76dANwsOCq/TZhASAYKGie0a7R1lDPI0ebtF0NUi+4yfdAtxr3PEMnD6BbD0QkNfACQO05EAwMuaBqDrIVycdmTpwDuP4R0OR7QFftVRP0g+49cwOQq4DJMxAAchmofY3m/EcJBQOZbTRKKJeBKKEoIePvpFRJ1VzmciUccyCa+C81cerBkuuB7sGTE/zt+yhN7AnAqxsAvBn06n8CkyPwMZKwm+UAAAAASUVORK5CYII=';
var onImg =
'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAB4klEQVRoQ+1ZQU7CUBCdaWVBLFETqUtxB7iQG4hH4AZ4AvUE4gnkBuoJ9AbiDXAhZadby4IQICaS9psqJBVLy5/fkhKHbefPzPvzZv6bgLDmP1zz/OH/ARjZpSYAniVSORQXRt5qyviWrsDQLrUQ8FgmyLK2AsRTzrSqy9p7dgxA5raibFdSgSR7QAi4yu11GlFA/d+lKSTjfBW2JAAj+7Cio7MVZ4KO0AeG+dKW9UkCMHwvNxDhUjZYuL17apjdW1mfJACiX9gef2bbgLgvG3CB/bNhdioUXyQAXqCRXawDaDeUoPNnBLonuXy3RfFFBvADouxx9ogSeHaGMjpjm0LDXrGKQntUAaBn3IPsTveN6kOpAl5QNWkh7gzTqlOTJ0mJ+WAf/WLBmWivskkIEIONjKio3H4sAKhVUOX+7MKUKcQAZLk3Z88VWEQhr0kRYCoN/m5wqe8BvzQOkuDpB+CTB0EPHgOYNnNiTewXaFyBkFGbWAVQE7XNXevhW7X2Sucg8NqfR+p7AADaesateUk7E+0eAH4tLOsAIPSNZQBJT6EoicMV4Ar4OEJZK5lCTCGmkPy/MUGjOTEtxO9A1A1wE3MTp6iJgxaWKAr7F54o27DvsUwhlQRUzzIA1RtUPf8FRKRYQOI+9hQAAAAASUVORK5CYII=';
var webview = plus.webview.currentWebview();
var en = webview.__uniapp_locale && webview.__uniapp_locale.indexOf('zh') < 0
var onText = en ? '' : '轻触照亮';
var offText = en ? '' : '轻触关闭';
var on = false;
var viewWidth = 48;
var fontSize = 10;
var imgWidth = 26;
function changeType() {
lightView.reset();
lightImg.loadBase64Data(on ? onImg : offImg, function() {
lightView.drawBitmap(lightImg, {}, {
top: 0,
left: (viewWidth - imgWidth) / 2 + 'px',
width: imgWidth + 'px',
height: imgWidth + 'px'
});
});
lightView.drawText(on ? offText : onText, {
top: imgWidth + 'px',
left: '0px',
width: '100%',
height: (fontSize + 2) + 'px'
}, {
color: '#ffffff',
size: fontSize + 'px'
});
scan.setFlash(on);
on = !on;
}
lightImg = new plus.nativeObj.Bitmap('lightImg');
lightView = new plus.nativeObj.View('lightView', {
width: viewWidth + 'px',
height: viewWidth + 'px',
top: window.innerHeight / 2 + 50 + 'px',
left: (window.innerWidth - viewWidth) / 2 + 'px',
position: 'static'
});
lightView.addEventListener('click', function() {
changeType();
});
plus.webview.currentWebview().append(lightView);
changeType();
}
document.addEventListener('plusready', function() {
var serviceWebview = plus.webview.getWebviewById('__W2A_CONTEXT_') || plus.webview.getLaunchWebview();
plus.key.addEventListener('backbutton', function() {
back(true);
});
setTimeout(function() {
var webview = plus.webview.currentWebview();
scan = new plus.barcode.Barcode('scan', webview.__uniapp_scan_type, {
frameColor: '#118CE9',
scanbarColor: '#118CE9'
}, webview.__uniapp_auto_decode_char_set);
scan.onmarked = function(type, code, file, charSet) {
var res = {
type: type,
code: code,
charSet: charSet
};
back()
plus.webview.postMessageToUniNView({
type: 'scanCode',
args: res
}, '__uniapp__service');
};
scan.onerror = function(error) {
back()
plus.webview.postMessageToUniNView({
type: 'scanCode',
args: {
errMsg: error.message + ' error code:' + error.code
}
}, '__uniapp__service');
};
scan.start();
drawLight();
}, 500)
})
</script>
</body>
</html>

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

View File

@@ -0,0 +1,25 @@
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8" />
<script>
var __UniViewStartTime__ = Date.now();
var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') ||
CSS.supports('top: constant(a)'))
document.write(
'<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' +
(coverSupport ? ', viewport-fit=cover' : '') + '" />')
</script>
<title>View</title>
<link rel="stylesheet" href="view.css" />
</head>
<body>
<div id="app"></div>
<script src="__uniappes6.js"></script>
<script src="view.umd.min.js"></script>
<script src="app-view.js"></script>
</body>
</html>

View File

@@ -0,0 +1,22 @@
{
"version" : "1",
"prompt" : "template",
"title" : "服务协议和隐私政策",
"message" : "尊敬的用户,感谢您信任并使用众妙之门!<br/> <br/> 众妙之门非常重视您的隐私保护和个人信息保护,在您使用众妙之门提供的产品或服务前,请您务必审慎阅读、充分理解“用户协议”和“隐私政策”各条款,包括但不限于:为了更好的向您提供服务,我们需要收集您的设备标识、操作日志等信息用于分析、优化应用性能。<br/>  您可阅读<a href='https://zmzm.taihumed.com/agreement.html'> 《用户协议》 </a>和<a href='https://zmzm.taihumed.com/privacy.html'>《隐私政策》 </a> 的全部条款,众妙之门可能会收集您的相关使用信息、个人信息。未经授权,众妙之门不会向任何第三方提供您的信息。如果您同意,请点击下面按钮开始接受我们的服务。",
"buttonAccept" : "同意并接受",
"buttonRefuse" : "暂不同意",
"hrefLoader" : "system",
"backToExit" : "false",
"second" : {
"title" : "确认提示",
"message" : "进入应用前,您需先同意<a href='https://zmzm.taihumed.com/agreement.html'> 《用户协议》 </a>和 <a href='https://zmzm.taihumed.com/privacy.html'>《隐私政策》 </a>,否则将退出应用。 ",
"buttonAccept" : "同意并继续",
"buttonRefuse" : "退出应用"
},
"disagreeMode" : {
"support" : false,
"loadNativePlugins" : false,
"visitorEntry" : false,
"showAlways" : false
}
}

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1 @@
(function(e){function r(r){for(var n,l,i=r[0],p=r[1],a=r[2],c=0,s=[];c<i.length;c++)l=i[c],Object.prototype.hasOwnProperty.call(o,l)&&o[l]&&s.push(o[l][0]),o[l]=0;for(n in p)Object.prototype.hasOwnProperty.call(p,n)&&(e[n]=p[n]);f&&f(r);while(s.length)s.shift()();return u.push.apply(u,a||[]),t()}function t(){for(var e,r=0;r<u.length;r++){for(var t=u[r],n=!0,i=1;i<t.length;i++){var p=t[i];0!==o[p]&&(n=!1)}n&&(u.splice(r--,1),e=l(l.s=t[0]))}return e}var n={},o={"app-config":0},u=[];function l(r){if(n[r])return n[r].exports;var t=n[r]={i:r,l:!1,exports:{}};return e[r].call(t.exports,t,t.exports,l),t.l=!0,t.exports}l.m=e,l.c=n,l.d=function(e,r,t){l.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:t})},l.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},l.t=function(e,r){if(1&r&&(e=l(e)),8&r)return e;if(4&r&&"object"===typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(l.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var n in e)l.d(t,n,function(r){return e[r]}.bind(null,n));return t},l.n=function(e){var r=e&&e.__esModule?function(){return e["default"]}:function(){return e};return l.d(r,"a",r),r},l.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},l.p="/";var i=this["webpackJsonp"]=this["webpackJsonp"]||[],p=i.push.bind(i);i.push=r,i=i.slice();for(var a=0;a<i.length;a++)r(i[a]);var f=p;t()})([]);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

View File

@@ -0,0 +1,88 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>本地网页</title>
<style type="text/css">
.btn {
display: block;
margin: 20px auto;
padding: 5px;
background-color: #007aff;
border: 0;
color: #ffffff;
height: 40px;
width: 200px;
}
.btn-red {
background-color: #dd524d;
}
.btn-yellow {
background-color: #f0ad4e;
}
.desc {
padding: 10px;
color: #999999;
}
</style>
</head>
<body>
<p class="desc">web-view 组件加载本地 html 示例,仅在 App 环境下生效。点击下列按钮,跳转至其它页面。</p>
<div class="btn-list">
<button class="btn" type="button" data-action="navigateTo">navigateTo</button>
<button class="btn" type="button" data-action="redirectTo">redirectTo</button>
<button class="btn" type="button" data-action="navigateBack">navigateBack</button>
<button class="btn" type="button" data-action="reLaunch">reLaunch</button>
<button class="btn" type="button" data-action="switchTab">switchTab</button>
</div>
<p class="desc">网页向应用发送消息。注意:小程序端应用会在此页面后退时接收到消息。</p>
<div class="btn-list">
<button class="btn btn-red" type="button" id="postMessage">postMessage</button>
</div>
<!-- uni 的 SDK -->
<script type="text/javascript" src="https://unpkg.com/@dcloudio/uni-webview-js@0.0.1/index.js"></script>
<script type="text/javascript">
document.addEventListener('UniAppJSBridgeReady', function() {
document.querySelector('.btn-list').addEventListener('click', function(evt) {
var target = evt.target;
if (target.tagName === 'BUTTON') {
var action = target.getAttribute('data-action');
switch (action) {
case 'switchTab':
uni.switchTab({
url: '/pages/tabBar/API/API'
});
break;
case 'reLaunch':
uni.reLaunch({
url: '/pages/tabBar/API/API'
});
break;
case 'navigateBack':
uni.navigateBack({
delta: 1
});
break;
default:
uni[action]({
url: '/pages/component/button/button'
});
break;
}
}
});
document.querySelector("#postMessage").addEventListener('click', function() {
uni.postMessage({
data: {
action: 'message'
}
});
})
});
</script>
</body>
</html>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1 @@
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1 @@
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1 @@
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1 @@
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1 @@
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1 @@
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */

Binary file not shown.

After

Width:  |  Height:  |  Size: 774 B

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 274 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 986 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 251 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 398 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 67 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 88 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 255 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 343 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 907 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 856 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 797 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Some files were not shown because too many files have changed in this diff Show More