Browse Source

H5适配

dev_delivery
jiazhipeng 6 days ago
parent
commit
d975257dfe
  1. 133
      components/addressAdd.vue
  2. 385
      components/cartData.vue
  3. 4
      components/commentList.vue
  4. 2
      manifest.json
  5. 9
      package-lock.json
  6. 5
      package.json
  7. 4
      pages/index/index.vue
  8. 408
      pages/login/phoneLogin.vue
  9. 16
      pages/map/map.vue
  10. 50
      static/js/CommonFunction.js
  11. 3
      subPackages/pointsMall/order.vue
  12. 6
      subPackages/search/shopResult.vue
  13. 2
      subPackages/techan/cartOrder.vue
  14. 11
      subPackages/techan/detail.vue
  15. 16
      subPackages/techan/index.vue
  16. 3
      subPackages/techan/order.vue
  17. 2
      subPackages/user/travelerList.vue

133
components/addressAdd.vue

@ -1,5 +1,5 @@
<template>
<view class="bg">
<view class="addressadd-bg">
<view class="list-forms">
<view class="list-item">
<view class="list-item-title">姓名</view>
@ -325,73 +325,74 @@
</script>
<style scoped>
.bg {
.addressadd-bg {
width: 100%;
height: 100%;
.list-forms {
display: flex;
flex-direction: column;
box-sizing: content-box
}
.list-item {
display: flex;
border-bottom: 1rpx solid #D8D8D8;
padding: 30rpx 0;
height: 60rpx;
align-items: center;
box-sizing: content-box
}
.list-item-title {
width: 150rpx;
font-size: 31rpx;
margin-right: 20rpx;
}
.list-item-input {
flex: 1;
}
.list-item-input input {
width: 100%;
height: 100%;
padding: 0;
margin: 0;
border: 0;
background-color: transparent;
line-height: 31rpx;
font-size: 31rpx;
}
.list-item-input input::placeholder {
font-size: 26rpx;
}
.list-item-switch {
display: flex;
flex: 1;
justify-content: flex-end;
}
.list-item-btn {
display: flex;
justify-content: center;
margin-top: 20rpx;
}
.list-item-post {
display: flex;
color: #FFFFFF;
font-size: 36rpx;
width: 697rpx;
height: 73rpx;
background: linear-gradient(90deg, #F84A56, #FF9834);
border-radius: 37rpx;
justify-content: center;
align-items: center;
margin-top: 725rpx;
}
}
.list-forms {
display: flex;
flex-direction: column;
box-sizing: content-box
}
.list-item {
display: flex;
border-bottom: 1rpx solid #D8D8D8;
padding: 30rpx 0;
height: 60rpx;
align-items: center;
box-sizing: content-box
}
.list-item-title {
width: 150rpx;
font-size: 31rpx;
margin-right: 20rpx;
}
.list-item-input {
flex: 1;
}
.list-item-input input {
width: 100%;
height: 100%;
padding: 0;
margin: 0;
border: 0;
background-color: transparent;
line-height: 31rpx;
font-size: 31rpx;
}
.list-item-input input::placeholder {
font-size: 26rpx;
}
.list-item-switch {
display: flex;
flex: 1;
justify-content: flex-end;
}
.list-item-btn {
display: flex;
justify-content: center;
margin-top: 20rpx;
}
.list-item-post {
display: flex;
color: #FFFFFF;
font-size: 36rpx;
width: 697rpx;
height: 73rpx;
background: linear-gradient(90deg, #F84A56, #FF9834);
border-radius: 37rpx;
justify-content: center;
align-items: center;
margin-top: 725rpx;
}
</style>

385
components/cartData.vue

@ -1,5 +1,5 @@
<template>
<view class="bg">
<view class="cartData-bg">
<uni-popup ref="popup" type="bottom" border-radius="10px 10px 0 0"
:safe-area="true" @change="popChange">
@ -340,218 +340,219 @@
*{
box-sizing: border-box;
}
.bg{
.cartData-bg{
width: 100%;
height: 100%;
}
.cart-container{
display: flex;
flex-direction: column;
background-color: white;
height: 933rpx;
border-radius: 20rpx 20rpx 0rpx 0rpx;
display: flex;
flex-direction: column;
position: absolute;
width: 100%;
bottom: 0;
z-index: 20;
.header-container{
display: flex;
align-items: center;
justify-content: space-between;
padding: 40rpx 26rpx;
.select-area{
font-family: PingFang SC;
font-weight: bold;
font-size: 37rpx;
color: #000000;
}
.delete-area{
font-family: PingFang SC;
font-weight: bold;
font-size: 27rpx;
color: #999999;
image{
width: 26rpx;
height: 26rpx;
}
}
}
}
.content-container{
flex: 1;
height: 10rpx;
overflow-y: auto;
padding:0 0rpx 0rpx;
.content-item{
padding: 24rpx 26rpx;
// margin-bottom: 48rpx;
}
.commodity {
display: flex;
.add-num-area{
display: flex;
justify-content: space-between;
align-items: center;
width: 160rpx;
image{
width: 49rpx;
height: 49rpx;
}
}
.goods-text-area{
.cart-container{
display: flex;
flex-direction: column;
justify-content: space-between;
}
.commodity-price{
font-weight: 500;
font-size: 24rpx;
color: #F84A56;
background-color: white;
height: 933rpx;
border-radius: 20rpx 20rpx 0rpx 0rpx;
display: flex;
align-items: baseline;
}
.commodity-info{
font-family: PingFangSC;
font-weight: 500;
font-size: 32rpx;
color: #2C2C2C;
}
// align-items: center;
.img {
width: 217rpx;
height: 179rpx;
border-radius: 13rpx;
flex-shrink: 0;
flex-direction: column;
position: absolute;
width: 100%;
bottom: 0;
z-index: 20;
.header-container{
display: flex;
align-items: center;
justify-content: space-between;
padding: 40rpx 26rpx;
.select-area{
font-family: PingFang SC;
font-weight: bold;
font-size: 37rpx;
color: #000000;
}
.delete-area{
font-family: PingFang SC;
font-weight: bold;
font-size: 27rpx;
color: #999999;
image{
width: 26rpx;
height: 26rpx;
}
}
}
}
.title {
.content-container{
flex: 1;
margin-left: 20rpx;
font-size: 32rpx;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #000000;
.price-list {
height: 10rpx;
overflow-y: auto;
padding:0 0rpx 0rpx;
.content-item{
padding: 24rpx 26rpx;
// margin-bottom: 48rpx;
}
.commodity {
display: flex;
margin-top: 18rpx;
align-items: center;
.price-r {
font-size: 32rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #fc5109;
&:before {
content: '¥';
display: inline-block;
color: #fc5109;
font-size: 24rpx;
.add-num-area{
display: flex;
justify-content: space-between;
align-items: center;
width: 160rpx;
image{
width: 49rpx;
height: 49rpx;
}
}
.price-g {
.goods-text-area{
display: flex;
flex-direction: column;
justify-content: space-between;
}
.commodity-price{
font-weight: 500;
font-size: 24rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #b5bcc9;
text-decoration: line-through;
margin-left: 10rpx;
color: #F84A56;
display: flex;
align-items: baseline;
}
.commodity-info{
font-family: PingFangSC;
font-weight: 500;
font-size: 32rpx;
color: #2C2C2C;
}
// align-items: center;
.img {
width: 217rpx;
height: 179rpx;
border-radius: 13rpx;
flex-shrink: 0;
}
.title {
flex: 1;
margin-left: 20rpx;
font-size: 32rpx;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #000000;
.price-list {
display: flex;
margin-top: 18rpx;
align-items: center;
.price-r {
font-size: 32rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #fc5109;
&:before {
content: '¥';
display: inline-block;
color: #fc5109;
font-size: 24rpx;
}
}
.price-g {
font-size: 24rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #b5bcc9;
text-decoration: line-through;
margin-left: 10rpx;
}
}
}
.num-box {
display: flex;
align-items: center;
margin-left: 20rpx;
width: 160rpx;
justify-content: space-between;
.num {
text-align: center;
width: 50rpx;
}
.ctrl {
width: 46rpx;
height: 46rpx;
}
}
}
}
.num-box {
display: flex;
align-items: center;
margin-left: 20rpx;
width: 160rpx;
justify-content: space-between;
.num {
text-align: center;
width: 50rpx;
.select-cycle{
width: 40rpx;
height: 40rpx;
border-radius: 50%;
border: 1px solid #999999;
image{
width: 100%;
height: 100%;
}
.ctrl {
width: 46rpx;
height: 46rpx;
}
.select-cycle.selected {
border: none;
image{
width: 40rpx;
height: 40rpx;
border-radius: 50%;
}
}
}
}
.select-cycle{
width: 40rpx;
height: 40rpx;
border-radius: 50%;
border: 1px solid #999999;
image{
.ctrl {
width: 47rpx;
height: 47rpx;
background: #6A8A2D;
border-radius: 50%;
font-family: PingFang SC;
font-weight: 400;
font-size: 34rpx;
color: #FFFFFF;
line-height: 47rpx;
text-align: center;
}
.ctrl.disabled{
background: #E8E8E8;
color: #999999;
}
.off-cover{
position: absolute;
top: 0;
left: 0;
right: 0;
width: 100%;
height: 100%;
}
}
.select-cycle.selected {
border: none;
image{
width: 40rpx;
height: 40rpx;
border-radius: 50%;
}
}
.ctrl {
width: 47rpx;
height: 47rpx;
background: #6A8A2D;
border-radius: 50%;
font-family: PingFang SC;
font-weight: 400;
font-size: 34rpx;
color: #FFFFFF;
line-height: 47rpx;
text-align: center;
}
.ctrl.disabled{
background: #E8E8E8;
color: #999999;
}
.off-cover{
position: absolute;
top: 0;
left: 0;
right: 0;
width: 100%;
height: 100%;
background: rgba(0,0,0,0.3);
font-weight: 400;
font-size: 27rpx;
color: #FFFFFF;
display: flex;
align-items: center;
justify-content: center;
.off-btn{
width: 67rpx;
height: 67rpx;
background: #FFFFFF;
border-radius: 50%;
background: rgba(0,0,0,0.3);
font-weight: 400;
font-size: 27rpx;
color: #000000;
text-align: center;
line-height: 67rpx;
margin-left: 18rpx;
color: #FFFFFF;
display: flex;
align-items: center;
justify-content: center;
.off-btn{
width: 67rpx;
height: 67rpx;
background: #FFFFFF;
border-radius: 50%;
font-weight: 400;
font-size: 27rpx;
color: #000000;
text-align: center;
line-height: 67rpx;
margin-left: 18rpx;
}
}
}
</style>

4
components/commentList.vue

@ -1,5 +1,5 @@
<template>
<view class="bg">
<view class="comment-bg">
<view class="header" >
<view>买家评价</view>
<view style="font-weight: 500;font-size: 27rpx;color: #999999;" @click="goCommentList()">
@ -74,7 +74,7 @@
</script>
<style scoped lang="scss">
.bg{
.comment-bg{
background: #FFFFFF;
width: 100%;

2
manifest.json

@ -97,7 +97,7 @@
"disableHostCheck" : true,
"proxy" : {
"/api" : {
"target" : "https://api.cloud.sz-trip.com/", //
"target" : "https://swsz.api.js-dyyj.com/", //
"changeOrigin" : true, //
"secure" : true, // https
"pathRewrite" : {

9
package-lock.json

@ -1,7 +1,14 @@
{
"requires": true,
"name": "flavoroftimesz",
"version": "1.0.0",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
"jweixin-module": {
"version": "1.6.0",
"resolved": "https://registry.npmmirror.com/jweixin-module/-/jweixin-module-1.6.0.tgz",
"integrity": "sha512-dGk9cf+ipipHmtzYmKZs5B2toX+p4hLyllGLF6xuC8t+B05oYxd8fYoaRz0T30U2n3RUv8a4iwvjhA+OcYz52w=="
},
"mobile-calendar-simple": {
"version": "2.4.0",
"resolved": "https://registry.npmmirror.com/mobile-calendar-simple/-/mobile-calendar-simple-2.4.0.tgz",

5
package.json

@ -4,8 +4,9 @@
"description": "",
"main": "main.js",
"dependencies": {
"ydui-district": "^1.1.0",
"mobile-calendar-simple": "^2.4.0"
"jweixin-module": "^1.6.0",
"mobile-calendar-simple": "^2.4.0",
"ydui-district": "^1.1.0"
},
"devDependencies": {},
"scripts": {

4
pages/index/index.vue

@ -158,6 +158,10 @@
this.sendRequest()
this.getHeadImg(2378).then(res => {this.CKMap = res})
this.getAlertAdv()
// #ifdef H5
this.jWeixinInit()
// #endif
},
methods: {
initSHFlag () {

408
pages/login/phoneLogin.vue

@ -1,190 +1,278 @@
<template>
<view style="padding-top: 88rpx;">
<view class="login-tip">时味苏州PHoneLogin 申请获得</view>
<view class="login-tip2">以下权限</view>
<view class="login-tip-box">
<text>获得你的公开信息昵称头像地区及性别</text>
<view class="bg">
<view class="form-box">
<view class="form-item">
<image src="https://m.cloud.sz-trip.com/static/images/Login/newMobile.png" alt=""></image>
<input type="number" v-model="form.phone" placeholder="请输入手机号" />
</view>
<view class="form-item">
<image src="https://m.cloud.sz-trip.com/static/images/Login/newCaptcha.png" alt=""></image>
<input type="text" v-model="form.captcha" placeholder="请输入图形验证码" />
<image :src="captchaUrl" @click="refreshCaptcha()" alt="" style="width: 200rpx;height: 50rpx;"
class="captcha">
</view>
<view class="form-item">
<image src="https://m.cloud.sz-trip.com/static/images/Login/newMobilecode.png" alt=""></image>
<input type="number" v-model="form.code" placeholder="请输入验证码" />
<view @click="handleGetCode()" class="getCode">{{ codeText }}</view>
</view>
</view>
<view class="btn-box">
<button bindtap="cancel" type="default" @click="redirectIndex">取消</button>
<button type="primary" @click="getUserInfo">同意</button>
</view>
<view class="flex-center article-box">
<radio-group @change="toggleAgreement">
<radio value="1" :checked="isAgreed" style="transform:scale(0.7)"></radio>
</radio-group>
<view>同意<text @click="gotoInfo(9)">用户服务协议</text><text @click="gotoInfo(12)">隐私政策</text></view>
<view @click="handleLogin()" class="submit">登录</view>
<view class="flex-center" style="margin-top: 30rpx;">
<radio-group @change="toggleAgreement">
<radio value="1" :checked="isAgreed" style="transform:scale(0.7)"></radio>
</radio-group>
<view>同意<text @click="gotoInfo(9)">用户服务协议</text><text @click="gotoInfo(12)">隐私政策</text></view>
</view>
</view>
<uni-popup ref="popup" type="bottom" background-color="#fff">
<button type="default" open-type="getPhoneNumber" @getphonenumber="handlePhoneNumber" style="width: 100%;height: 12vh;line-height: 12vh;">点击授权手机号</button>
</uni-popup>
</view>
</template>
<script>
export default {
name: "login",
data() {
return {
isAgreed: false,
openid: ''
};
form: {
phone: "",
code: "",
captcha: "", //
},
//
codeText: "获取验证码",
codeDisabled: false,
countdown: 60,
//
captchaUrl: "", //
captchaId: "",
//
rememberPhone: false,
//
submitting: false,
smsCodeId: "",
checked: false,
isAgreed: false,
}
},
onLoad(options) {
onReady() {
this.refreshCaptcha();
},
methods: {
//
handlePhoneNumber(e) {
if (e.detail.errMsg === "getPhoneNumber:ok") { //
this.$refs.popup.close();
this.Post({
code: e.detail.code,
encryptedData: e.detail.encryptedData,
iv: e.detail.iv,
openid: this.openid
}, '/api/uservice/user/bindPhoneNumber')
.then(res => {
this.$store.commit('changeUserInfo', res.data);
this.navigateBasedOnPath();
})
.catch(error => {
console.error('绑定手机号失败:', error);
uni.showToast({
title: '绑定手机号失败,请稍后重试',
icon: 'none'
});
});
} else {
console.error('获取手机号失败:', e.detail.errMsg);
uni.showToast({
title: '获取手机号失败,请稍后重试',
icon: 'none'
});
}
},
//
gotoInfo(id) {
uni.navigateTo({
url: '/subPackages/user/privacyInfo?id=' + id
});
},
//
toggleAgreement() {
this.isAgreed = !this.isAgreed;
},
//
redirectIndex() {
uni.switchTab({
url: '/pages/index/index',
});
},
//
getUserInfo() {
if (!this.isAgreed) {
uni.showToast({
title: '请先勾选同意《用户服务协议》、《隐私政策》',
icon: 'none'
});
return;
}
let data = {
avatar: "https://jdsz.obs.cn-east-3.myhuaweicloud.com:443/backend/upload/202509281759047643d42d0a25de93f030757727b6a74a999c2f5f0426.png",
birthday: "2020-02-05",
createtime: 1760087570,
email: "",
expires_in: 2592000,
expiretime: 1762679570,
from_source: "WECHAT",
fullname: "",
gender: 1,
id: 6069705,
id_number: "",
isBindMobile: 1,
is_enterprise: 2,
mobile: "19941952818",
name_verification: "UNCERTFIED",
nickname: "abc",
score: 106,
token: "c04a0d8e-b2dd-4a47-a2e8-0a7652520bad",
user_id: 6069705,
username: "",
uuid: "3c6f7d59-5c27-42ad-902b-89043fc4b4f8",
//
refreshCaptcha() {
this.Post({}, "/api/uservice/user/getCaptchaImg").then((res) => {
if (res) {
this.captchaUrl = res.data.code;
this.captchaId = res.data.id;
}
this.$store.commit('changeUserInfo', data);
},
//
navigateBasedOnPath() {
if (this.$store.state.user.toPath.includes('user/user')) {
uni.switchTab({
url: this.$store.state.user.toPath
});
} else {
uni.navigateBack({});
}
}
},
};
});
},
//
toggleAgreement() {
this.isAgreed = !this.isAgreed;
},
//
resetForm() {
this.form.code = "";
this.form.captcha = ""; //
//
this.refreshCaptcha();
},
//
handleGetCode() {
//
if (!this.form.phone) {
this.$message.warning("请先输入手机号码");
return;
}
if (!this.form.captcha) {
this.$message.warning("请先输入图形验证码");
return;
}
this.Post(
{
mobile: this.form.phone,
captchaCode: this.form.captcha,
captchaCodeId: this.captchaId,
},
"/api/uservice/user/getMobileCodeForLogin"
).then((res) => {
console.log(res);
if (res.code == 1) {
this.codeDisabled = true;
this.smsCodeId = res.data.id;
this.codeText = `重新发送(${this.countdown}s)`;
const timer = setInterval(() => {
this.countdown--;
this.codeText = `重新发送(${this.countdown}s)`;
if (this.countdown <= 0) {
clearInterval(timer);
this.codeText = "获取验证码";
this.codeDisabled = false;
this.countdown = 60;
}
}, 1000);
}
});
},
//
handleLogin() {
if (!this.form.phone) {
uni.showToast({
title:"请输入手机号码",
icon:"none"
})
return;
}
if (!this.form.captcha) {
uni.showToast({
title:"请输入图形验证码",
icon:"none"
})
return;
}
if (!this.form.code) {
uni.showToast({
title:"请输入短信校验码",
icon:"none"
})
return;
}
if (!this.isAgreed) {
uni.showToast({
title:"请先勾选同意《用户服务协议》、《隐私政策》",
icon:"none"
})
return;
}
this.submitting = true;
this.Post(
{
mobile: this.form.phone,
smsCodeId: this.smsCodeId,
smsCode: this.form.code,
fromSource: "mini"
},"/api/uservice/user/loginByMobileCode").then((res) => {
this.submitting = false;
if (res.code == 1) {
this.$store.commit('changeUserInfo', res.data);
this.navigateBasedOnPath();
}
});
},
}
}
</script>
<style>
.login-tip {
font-size: 28rpx;
margin: 0 60rpx;
margin-top: 40rpx;
<style scoped lang="scss">
.bg {
/* background: #FFFFFF; */
padding-bottom: 120rpx;
position: relative;
background-image: url("https://m.cloud.sz-trip.com/static/images/Login/newTopBg.png");
background-size: 100% 100%;
padding-top: 240rpx;
min-height: 100vh;
}
.login-tip2 {
font-size: 44rpx;
margin: 0rpx 60rpx;
margin-top: 20rpx;
font-weight: 400;
.form-box {
margin: 0 auto;
padding: 0 50rpx;
.form-item {
padding: 20rpx 0;
display: flex;
align-items: center;
position: relative;
background: #fff;
border-radius: 25px;
height: 80rpx;
margin-bottom: 50rpx;
padding-left: 30rpx;
&>image {
width: 50rpx;
height: 50rpx;
vertical-align: middle;
}
input {
border: none;
padding-left: 20rpx;
font-size: 32rpx;
font-weight: 500;
color: #ABABAB;
}
.captcha {
position: absolute;
right: 50rpx;
top: 0;
bottom: 0;
margin: auto;
}
.getCode {
position: absolute;
right: 50rpx;
font-size: 28rpx;
font-weight: 400;
color: #0B898E;
height: 50rpx;
line-height: 50rpx;
border: 1px solid #0B898E;
border-radius: 30rpx;
padding: 0 20rpx;
text-align: center;
top: 0;
bottom: 0;
margin: auto;
}
}
}
.login-tip-box {
display: flex;
align-items: flex-start;
margin: 0 60rpx;
font-size: 28rpx;
margin-top: 40rpx;
line-height: 40rpx;
}
.login-tip-box .icon-gou1 {
line-height: 80rpx;
margin-top: -20rpx;
margin-right: 30rpx;
color: #666;
.submit {
font-size: 36rpx;
font-weight: 500;
color: #FFFFFF;
text-align: center;
height: 60rpx;
line-height: 60rpx;
background: #0B898E;
border-radius: 50rpx;
margin: 0 auto;
width: 600rpx;
margin-top: .6rem;
}
.btn-box {
display: flex;
position: absolute;
bottom: 100rpx;
left: 0;
right: 0;
input::placeholder {
color: #ABABAB;
}
.btn-box button {
width: 400rpx;
.yuan {
width: .37rem;
height: .37rem;
flex-shrink: 0;
}
.article-box {
position: absolute;
left: 0;
right: 0;
justify-content: center;
font-size: 24rpx;
color: #1aad19;
bottom: 40rpx;
font-weight: 400;
font-size: 27rpx;
color: #00B200;
margin-top: 30rpx;
display: flex;
align-items: center;
.iconfont {
margin-right: 10rpx;
font-size: 26rpx;
}
text {
border-bottom: 1px solid;
}
}
.article-box .iconfont {
margin-right: 10rpx;
font-size: 26rpx;
}
.article-box text {
border-bottom: 1px solid;
}
</style>
</style>

16
pages/map/map.vue

@ -19,17 +19,29 @@
},
onShow() {
let inMap = this.$store.state.user.inMap
let inMap = false
// #ifdef MP-WEIXIN
inMap = this.$store.state.user.inMap
// #endif
// #ifdef H5
inMap = uni.getStorageSync("changeInMap")
// #endif
if (inMap) {
uni.switchTab({
url:"/pages/index/index",
success: () => {
this.$store.commit("changeInMap",false);
uni.setStorageSync("changeInMap",false)
}
})
} else {
uni.navigateTo({
url:"/subPackages/webPage/webPage?url=https://www.hwh5.cn/hwcm/lRCqyP0p"
url:"/subPackages/webPage/webPage?url=https://www.hwh5.cn/hwcm/lRCqyP0p",
success: () => {
uni.setStorageSync("changeInMap",true)
}
})
}
},

50
static/js/CommonFunction.js

@ -1,6 +1,5 @@
// 获取路径参数
import Vue from "vue";
// 全局变量 切换测试/正式
Vue.prototype.envPropObj = 1 ? {
// 测试环境
@ -24,16 +23,28 @@ Vue.prototype.envPropObj = 1 ? {
Vue.prototype.formateRichText = str => {
if (!str) return "";
var reg = new RegExp("<img", "g");
// #ifdef MP-WEIXIN
str = str.replace(reg, "<img class='sz-xcx-fwb-img' width='100%'")
reg = new RegExp("<IMG", "g");
str = str.replace(reg, "<img class='sz-xcx-fwb-img' width='100%'")
reg = new RegExp("&nbsp;", "g");
// #endif
// #ifdef H5
str = str.replace(reg, "<img class='sz-xcx-fwb-img' style='font-size:0;line-height:0' width='100%'")
reg = new RegExp("<IMG", "g");
str = str.replace(reg, "<img class='sz-xcx-fwb-img' style='font-size:0;line-height:0' width='100%'")
reg = new RegExp("&nbsp;", "g");
// #endif
str = str.replace(reg, '<span style="width: 8rpx;display: inline-block;"></span>')
reg = new RegExp("section", "g");
str = str.replace(reg, 'div');
reg = new RegExp("↵", "g");
str = str.replace(reg, '<br />');
let startStr = `<div style="font-size:0">`
str = `<div style="font-size:0">` + str + `</div>`
return str;
@ -414,4 +425,39 @@ Vue.prototype.getDeliveryMethodStr=(str, obj={"1":"邮寄","2":"自提", "3":"
return arr
}
return []
}
}
// H5
// #ifdef H5
let jWeixin = require('jweixin-module')
Vue.prototype.jWeixinInit = function () {
if (window.navigator.userAgent.toLowerCase().match(/MicroMessenger/i) == "micromessenger") {
this.Post({web_url: encodeURIComponent(window.location.href)}, "/api/wx/jsSdk").then(res=>{
if (res && res.data && res.data.jssdk) {
let jssdk = res.data.jssdk
jWeixin.config({
debug: false,
appId: jssdk.appId,
timestamp: jssdk.timestamp,
nonceStr: jssdk.nonceStr,
signature: jssdk.signature,
jsApiList: ['getLocation',
'openLocation',
'updateTimelineShareData',
'updateAppMessageShareData',
'hideMenuItems',
'showMenuItems',
'hideAllNonBaseMenuItem'
],
openTagList: ['wx-open-launch-weapp']
});
}
})
}
}
// #endif

3
subPackages/pointsMall/order.vue

@ -202,12 +202,15 @@
<!-- 邮寄 -->
<view class="people-popup" v-if="selectInfo&&selectInfo.user_select_type == 1">
<view class="button" @click="changeAddressAddPopup('open','',{})">添加收货地址</view>
<!-- #ifdef MP-WEIXIN -->
<view style="display: flex;justify-content: center;padding-top: 20rpx;">
<view class="wx-address" @click="getWXAddress()">
<image class="wx-icon" src="https://static.ticket.sz-trip.com/uploads/20250916/3402d54588c3f0470bf05ac754f76cf0.png"></image>
<text style="padding-left: 8rpx;">获取微信地址</text>
</view>
</view>
<!-- #endif -->
<view class="popup-list" v-if="addressList.length > 0">
<view :class="['popup-item',selectInfo.contacts.id==item.id?'active':'']" v-for="(item, index) in addressList" :key="index" @click="seldThisAddress(item)">

6
subPackages/search/shopResult.vue

@ -153,6 +153,9 @@
padding-left: 10rpx;
padding-right: 120px;
background: #fff;
// #ifdef H5
padding-right: 20rpx;
// #endif
.input-model{
flex: 1;
@ -174,6 +177,9 @@
font-weight: 400;
font-size: 24rpx;
color: #030000;
// #ifdef H5
width: 500rpx;
// #endif
}
.search-btn{
font-weight: 500;

2
subPackages/techan/cartOrder.vue

@ -121,12 +121,14 @@
<view class="people-popup">
<view class="button" @click="changeAddressAddPopup('open','',{})">添加收货地址</view>
<!-- #ifdef MP-WEIXIN -->
<view style="display: flex;justify-content: center;padding-top: 20rpx;">
<view class="wx-address" @click="getWXAddress()">
<image class="wx-icon" src="https://static.ticket.sz-trip.com/uploads/20250916/3402d54588c3f0470bf05ac754f76cf0.png"></image>
<text style="padding-left: 8rpx;">获取微信地址</text>
</view>
</view>
<!-- #endif -->
<view class="popup-list" v-if="addressList.length > 0">
<view :class="['popup-item',selectInfo.contacts.id==item.id?'active':'']" v-for="(item, index) in addressList" :key="index" @click="seldThisAddress(item)">
<view class="item-top flex-between">

11
subPackages/techan/detail.vue

@ -38,7 +38,10 @@
<text class="present-price">{{ info.price / 100 }}</text>
/
</view>
<view>已售{{info.sales_number || 0}}</view>
<view >
<text v-if="supplierInfo" style="padding-right: 8rpx;">全店满{{supplierInfo.sill_money}}包邮 |</text>
<text>已售{{info.sales_number || 0}}</text>
</view>
</view>
<view class="title text-overflowRows">{{ info.title }}</view>
<view class="title text-overflowRows" style="font-weight: 500;font-size: 24rpx;color: #999999;">{{ info.subtitle }}</view>
@ -964,6 +967,8 @@
}
.scroll-all-box {
background-color: #fff;
.scroll-menus {
padding: 0 40rpx;
display: flex;
@ -973,7 +978,6 @@
color: #333;
height: 84rpx;
padding-bottom: 12rpx;
.scroll-menu-item {
position: relative;
line-height: 84rpx;
@ -1007,6 +1011,9 @@
right: 0;
background: white;
z-index: 1;
// #ifdef H5
top: 86rpx;
// #endif
}
}
.select-cycle{

16
subPackages/techan/index.vue

@ -159,7 +159,8 @@
<!-- 购物车 -->
<view class="btn-bottom" >
<cartDataVue ref="cartDataVueRef" :paramData="paramData" @changeParamData="changeParamData" style="width: 100%;height: 100%;">
<template class="btn-list" slot="content">
<template slot="content">
<view class="btn-list">
<view class="left-box">
<uni-badge class="uni-badge-left-margin" :text="paramData.num" absolute="rightTop" :offset="[5, 5]" size="small"
:custom-style="{background:'#D90F01',color:'#ffffff',border:'1px solid #ffffff'}">
@ -178,6 +179,7 @@
<view class="btn-buy" @click="goCartOrder">
去下单
</view>
</view>
</template>
</cartDataVue>
</view>
@ -656,6 +658,9 @@
padding-left: 10rpx;
padding-right: 120px;
background: #EDF5DC;
// #ifdef H5
padding-right: 20rpx;
// #endif
.input-model{
flex: 1;
@ -677,6 +682,9 @@
font-weight: 400;
font-size: 24rpx;
color: #030000;
// #ifdef H5
width: 500rpx;
// #endif
}
.search-btn{
font-weight: 500;
@ -746,6 +754,12 @@
}
}
}
// #ifdef H5
::v-deep .uni-scroll-view-content{
display: flex;
}
// #endif
}
.more-btn{
position: absolute;

3
subPackages/techan/order.vue

@ -194,13 +194,14 @@
<!-- 邮寄 -->
<view class="people-popup" v-if="selectInfo&&selectInfo.user_select_type == 1">
<view class="button" @click="changeAddressAddPopup('open','',{})">添加收货地址</view>
<!-- #ifdef MP-WEIXIN -->
<view style="display: flex;justify-content: center;padding-top: 20rpx;">
<view class="wx-address" @click="getWXAddress()">
<image class="wx-icon" src="https://static.ticket.sz-trip.com/uploads/20250916/3402d54588c3f0470bf05ac754f76cf0.png"></image>
<text style="padding-left: 8rpx;">获取微信地址</text>
</view>
</view>
<!-- #endif -->
<view class="popup-list" v-if="addressList.length > 0">
<view :class="['popup-item',selectInfo.contacts.id==item.id?'active':'']" v-for="(item, index) in addressList" :key="index" @click="seldThisAddress(item)">
<view class="item-top flex-between">

2
subPackages/user/travelerList.vue

@ -127,11 +127,13 @@
<view class="flex-between" v-if="showType==1" style="width: 660rpx;margin: 0 auto;">
<navigator :url="'/subPackages/user/myAddressAdd'" class="btn" style="width: 300rpx;">添加收货地址</navigator>
<!-- #ifdef MP-WEIXIN -->
<view class="btn" @click="getWXAddress()"
style="width: 300rpx;display: flex;align-items: center;justify-content: center;">
<image class="wx-icon" src="https://static.ticket.sz-trip.com/uploads/20250916/3402d54588c3f0470bf05ac754f76cf0.png"></image>
<text style="padding-left: 8rpx;">获取微信地址</text>
</view>
<!-- #endif -->
</view>
<navigator v-if="showType==0" :url="'/subPackages/user/myContactsAdd'" class="btn">添加联系人</navigator>

Loading…
Cancel
Save