This commit is contained in:
2024-10-16 09:37:54 +08:00
parent 0ba0738ef9
commit 4e4c60aa24
25 changed files with 12038 additions and 12255 deletions

View File

@@ -1,29 +1,31 @@
<template>
<view class="goods_nav">
<!-- 公共组件-每个页面必须引入 -->
<view class="goods_nav">
<!-- 公共组件-每个页面必须引入 -->
<view class="left">
<view v-for="(v,i) in iconList" class="icon_item" v-if="iconList.length>0">
<u-icon :name="v.icon" :color="v.infoColor" size="22" v-if="v.iconType" style="margin:0 auto" @click="clickIcon(v)"
></u-icon>
<uni-icons :type="v.icon" size="22" :color="v.infoColor" style="margin:0 auto" v-else> </uni-icons>
<view :style="`color:${v.infoColor};`">{{ v.text }}</view>
</view>
<slot name="leftSlot"></slot>
<view class="left">
<view v-for="(v,i) in iconList" class="icon_item" v-if="iconList.length>0">
<u-icon :name="v.icon" :color="v.infoColor" size="22" v-if="v.iconType" style="margin:0 auto"
@click="clickIcon(v)"></u-icon>
</view>
<view class="right">
<view class="button" v-for="(v,i) in customButton" :style="`background:${v.backgroundColor} !important;color:${v.color};width:${v.width}`" @click="submit(v)">
{{ v.text }}
</view>
<uni-icons :type="v.icon" size="22" :color="v.infoColor" style="margin:0 auto" v-else> </uni-icons>
<view :style="`color:${v.infoColor};`">{{ v.text }}</view>
</view>
<slot name="leftSlot"></slot>
</view>
</view>
<view class="right">
<!-- <view>{{ detailInfo.content }}</view> -->
</view>
<view class="button" v-for="(v,i) in customButton"
:style="`background:${v.backgroundColor} !important;color:${v.color};width:${v.width}`"
@click="submit(v)">
{{ v.text }}
</view>
</view>
<slot name="bottomSlot"></slot>
<!-- <view>{{ detailInfo.content }}</view> -->
</view>
@@ -32,220 +34,219 @@
</template>
<script>
import $http from '@/config/requestConfig.js';
import {
mapState
} from 'vuex';
export default {
props: ['iconList', 'customButton'],
components: {
import $http from '@/config/requestConfig.js';
import {
mapState
} from 'vuex';
export default {
props: ['iconList','customButton'],
components: {
},
data() {
return {
},
data() {
return {
}
},
onLoad(options) {
}
},
onLoad(options) {
},
onHide() {
},
onHide() {
},
computed: {
...mapState(['userInfo']),
},
methods: {
},
computed: {
...mapState(['userInfo']),
},
methods: {
submit(v){
this.$emit('submit',v)
},
clickIcon(v){
this.$emit('clickIcon',v)
},
showPreview(e) {
console.log('e at line 56:', e)
let conimg = e.target.dataset.nodes;
let imgs = conimg.match(/<img[^>]+>/g);//选择节点中的img
console.log('imgs at line 59:', imgs)
let imgList = [];
//遍历img标签的src里面的内容放在定义的数组imgList中
for (var j = 0; j < imgs.length; j++) {
imgs[j].replace(/<img[^>]*src=['"]([^'"]+)[^>]*>/gi, function (match, capture) {
imgList.push(capture)
submit(v) {
this.$emit('submit', v)
},
clickIcon(v) {
this.$emit('clickIcon', v)
},
showPreview(e) {
console.log('e at line 56:', e)
let conimg = e.target.dataset.nodes;
let imgs = conimg.match(/<img[^>]+>/g); //选择节点中的img
console.log('imgs at line 59:', imgs)
let imgList = [];
//遍历img标签的src里面的内容放在定义的数组imgList中
for (var j = 0; j < imgs.length; j++) {
imgs[j].replace(/<img[^>]*src=['"]([^'"]+)[^>]*>/gi, function(match, capture) {
imgList.push(capture)
})
}
console.log('imgList.push at line 64:', imgList)
})
}
console.log('imgList.push at line 64:', imgList)
//最后一步就是所有图片放在预览的方法previewImage中就可以了
// uni.previewImage({
// current: imgList,
// urls: imgList,
// })
uni.previewImage({
urls: imgList,
longPressActions: {
itemList: ['很抱歉,暂不支持保存图片到本地'],
success: function (res) {
// console.log(res,'+++++')
}
}
});
//最后一步就是所有图片放在预览的方法previewImage中就可以了
// uni.previewImage({
// current: imgList,
// urls: imgList,
// })
uni.previewImage({
urls: imgList,
longPressActions: {
itemList: ['很抱歉,暂不支持保存图片到本地'],
success: function(res) {
// console.log(res,'+++++')
}
}
});
},
},
// 放大图片
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.currentCateIndex + 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.dataList = []
// 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()
// }
// 放大图片
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.currentCateIndex + 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.dataList = []
// 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
// },
// 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
},
// },
// cancel(res) {
// uni.showToast({
// title: '点击取消,输入值为:' + res.value,
// icon: 'none'
// })
// }
},
onBackPress() {
// #ifdef APP-PLUS
plus.key.hideSoftKeybord();
// #endif
},
}
}
</script>
<style lang="scss" scoped>
.goods_nav {
background-color: #fff;
width: 100%;
padding: 20rpx 20rpx 20rpx 30rpx;
overflow: hidden;
display: flex;
align-items: center;
justify-content: space-between;
.goods_nav {
background-color: #fff;
width: 100%;
padding: 20rpx 20rpx 20rpx 30rpx;
overflow: hidden;
display: flex;
align-items: center;
justify-content: space-between;
.left{
height: 100%;
float: left;
display: flex;
align-items: center;
}
.left {
height: 100%;
float: left;
display: flex;
align-items: center;
}
}
.richDetail {
width: 100%;
height: 100%;
}
}
.button{
float: right;
width: 240rpx;
border-radius: 100rpx;
line-height: 70rpx;
text-align: center;
margin-left: 20rpx;
background: linear-gradient(90deg, rgb(254, 96, 53), rgb(239, 18, 36));
color: rgb(255, 255, 255);
}
.richDetail {
width: 100%;
height: 100%;
}
.icon_item{
display: flex;
justify-content:center;
flex-direction: column;
}
.button {
float: right;
width: 240rpx;
border-radius: 100rpx;
line-height: 70rpx;
text-align: center;
margin-left: 20rpx;
background: linear-gradient(90deg, rgb(254, 96, 53), rgb(239, 18, 36));
color: rgb(255, 255, 255);
}
.icon_item {
display: flex;
justify-content: center;
flex-direction: column;
}
</style>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -20,7 +20,7 @@
</view>
<view class="input_box">
<uni-forms-item label="" name="account" label-width="0">
<text class="input_tit"><i>*</i>吴门医述账号:</text>
<text class="input_tit"><i>*</i>众秒之门账号:</text>
<view class="in">
<input placeholder-style="font-size:26rpx" type="text" v-model="form.account"
placeholder="请输入手机号/邮箱" />
@@ -53,7 +53,7 @@
<view class="input_box">
<uni-forms-item label="" name="contactInformation" label-width="0">
<text class="input_tit"><i>*</i>联系电话:</text>
{{reversedMessage}}
{{reversedMessage}}
<view class="in">
<input type="number" placeholder-style="font-size:26rpx" @input="telInput"
v-model="form.contactInformation" placeholder="请输入与您联系的手机号" />
@@ -99,7 +99,7 @@
},
telError: false,
relationError: false,
relationErrorPattern:false,
relationErrorPattern: false,
rules: {
account: {
rules: [{
@@ -208,14 +208,14 @@
// console.log('键盘输入',e);
this.telError = false
},
async checkPermision(){
var result = await permission.premissionCheck("CAMERA_EXTERNAL_STORAGE")
if (result != 1) {
return false
}
async checkPermision() {
var result = await permission.premissionCheck("CAMERA_EXTERNAL_STORAGE")
if (result != 1) {
return false
}
},
async addPic(e) {
console.log("添加图片");
async addPic(e) {
console.log("添加图片");
let that = this;
for (var i = 0; i < e.file.length; i++) {
//console.log(i,e.file[i].url)
@@ -228,7 +228,7 @@
success: (res) => {
that.fileList1.push({
url: JSON.parse(res.data).url,
});
});
console.log(that.fileList1, "that.uploadPicLIst");
},
fail: (error) => {
@@ -241,7 +241,7 @@
this.fileList1.splice(event.index, 1)
},
onSubmit() {
this.$refs.form.validate().then(res => {
this.$refs.form.validate().then(res => {
if (this.form.type == 3) {
if (this.form.relation == '') {
this.relationError = true
@@ -286,20 +286,20 @@
success: (res) => {
this.fileList1 = []
// this.$nextTick(() => {
uni.navigateBack({
delta: 1
});
uni.navigateBack({
delta: 1
});
// })
}
});
}).catch(e => {
// console.log('表单错误信息:', err);
uni.showToast({
title: '提交失败',
icon: 'error'
})
});
// console.log('表单错误信息:', err);
uni.showToast({
title: '提交失败',
icon: 'error'
})
});
}).catch(err => {
console.log('表单错误信息:', err);
uni.showToast({
@@ -325,12 +325,15 @@
</script>
<style lang="scss" scoped>
@import '@/style/mixin.scss';
::v-deep .uni-forms-item{
::v-deep .uni-forms-item {
margin-bottom: 26rpx !important;
}
.input_tit{
.input_tit {
font-weight: bold;
}
.page {
background-color: #ffffff;
padding: 0 65rpx;

View File

@@ -0,0 +1,140 @@
<template>
<view>
<z-nav-bar :title="yszcText.title" bgColor="#fff" fontColor="#333"></z-nav-bar>
<view class="tanchu">
<!-- <view class="dp_title" v-html="yszcText.title"></view> -->
<view class="dp_content" v-html="yszcText.content"></view>
<!-- <yhxyPage></yhxyPage> -->
</view>
</view>
</template>
<script>
export default {
data() {
return {
options: {},
yszcText: {
title: "",
content: "",
},
};
},
//第一次加载
onLoad(options) {
this.options = options;
this.getSettlement(105);
},
onReady() {},
//方法
methods: {
async getSettlement(id, type) {
console.log('id at line 57:', id)
//隐私策略
var data = await this.$commonJS.getAgreement(id);
if (data.content) {
data.content = data.content.replace(
/<h5>/g,
'<view style="font-weight: bold;font-size: 32rpx;margin-top: 20rpx;margin-bottom: 20rpx;">'
);
data.content = data.content.replace(/<\/h5>/g, "</view>");
}
this.yszcText = data
},
},
};
</script>
<style lang="scss" scoped>
.tanchu {
padding: 40rpx 30rpx 40rpx 30rpx;
position: relative;
}
.popup_box {
width: 600upx;
border-radius: 10rpx;
.popup_title {
display: flex;
justify-content: center;
height: 88upx;
line-height: 88upx;
view {
align-items: center;
font-size: 30upx;
display: flex;
image {
width: 50upx;
height: 50upx;
margin: 0 20rpx 0 0;
}
}
}
.popup_content {
padding: 30rpx 40rpx;
}
.popup_footer {
display: flex;
justify-content: center;
view {
width: 45%;
flex-shrink: 0;
text-align: center;
font-size: 28upx;
color: #999;
line-height: 70upx;
margin: 0 0 30rpx 0;
}
}
}
.dp_title {
font-size: 36rpx;
margin-bottom: 10rpx;
color: #555;
text-align: center;
font-weight: bold;
}
.dp_content {
max-height: 98%;
overflow-y: scroll;
font-size: 28rpx;
color: #555;
line-height: 45rpx;
.dp_con1 {
font-weight: bold;
font-size: 32rpx;
margin-top: 20rpx;
margin-bottom: 20rpx;
}
// .dp_con2 {
// font-size: 30rpx;
// margin-top: 10rpx;
// margin-bottom: 10rpx;
// }
}
</style>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -249,82 +249,82 @@
uni.requestPayment({
provider: 'appleiap',
orderInfo: orderInfo,
success: (res) => {
success: (res) => {
that.iapCheck(res);
resolve(res);
resolve(res);
},
fail: (err) => {
uni.hideLoading()
// console.log('其他支付错误', err);
that.restoreComplateRequest()
if (err.code == 2) {
uni.showToast({
that.restoreComplateRequest()
if (err.code == 2) {
uni.showToast({
title: '取消支付,内购订单即将关闭',
icon: 'none'
})
} else {
uni.showToast({
title: '支付失败,内购订单即将关闭',
icon: 'none'
})
icon: 'none'
})
} else {
uni.showToast({
title: '支付失败,内购订单即将关闭',
icon: 'none'
})
}
reject(err);
}
reject(err);
}
});
})
},
// 查询未关闭iap订单
async restoreComplateRequest() {
let that = this
console.log('检测未完成订单')
console.log('检测未完成订单')
// if (!that.checking) {
// that.checking = true
// that.checking = true
// console.log(this.iapChannel, 'this.iapChannel1')
await this.iapChannel.restoreCompletedTransactions({
manualFinishTransaction: true
}, function(results) {
// console.log(that.checking)
// results 格式为数组存放恢复的IAP商品交易信息对象 IAPTransaction通用需将返回的支付凭证传给后端进行二次认证
that.ComplateRequestArr = results
console.log('未完成订单数组共有:=》',that.ComplateRequestArr.length )
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)
}
})
}
// console.log(that.checking)
// results 格式为数组存放恢复的IAP商品交易信息对象 IAPTransaction通用需将返回的支付凭证传给后端进行二次认证
that.ComplateRequestArr = results
console.log('未完成订单数组共有:=》', that.ComplateRequestArr.length)
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)
}
})
}
});
// }
// }
},
async iphonepay() {
const that = this;
uni.showLoading({
title:"检测支付环境"
title: "检测支付环境"
})
console.log("检测支付环境...");
this.iapChannel = await this.getProvider()
console.log('that.iapChannel',this.iapChannel);
if(this.iapChannel){
console.log('that.iapChannel', this.iapChannel);
if (this.iapChannel) {
this.requestOrder();
}else{
} else {
uni.hideLoading()
uni.showToast({
title:'不支持内购支付',
icon:'none'
title: '不支持内购支付',
icon: 'none'
})
console.log("获取iap支付通道失败" + e.message, that.iapChannel);
}
console.log("获取iap支付通道失败" + e.message, that.iapChannel);
}
},
requestOrder() {
uni.showLoading({
@@ -367,15 +367,15 @@
uni.showLoading({
title: "正在支付",
mask: true,
});
});
let orderInfo = {
productid: id,
username: that.orderSn, // 用户标识/订单标识
quantity:1,
manualFinishTransaction: true, // 3.5.1+ 支持,设置此参数后需要开发者主动关闭订单,参见下面的关闭订单方法 finishTransaction()
}
productid: id,
username: that.orderSn, // 用户标识/订单标识
quantity: 1,
manualFinishTransaction: true, // 3.5.1+ 支持,设置此参数后需要开发者主动关闭订单,参见下面的关闭订单方法 finishTransaction()
}
this.transaction = await this.requestPayment(orderInfo)
console.log('支付后的that.transaction',this.transaction);
console.log('支付后的that.transaction', this.transaction);
},
iapCheck(result) {
let that = this;
@@ -639,7 +639,7 @@
});
} else {
uni.showToast({
title: "请勾选 已阅读会员服务协议",
title: "请勾选 已阅读增值服务协议",
icon: "none",
});
return false;

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff