Browse Source

H5适配

dev_delivery
jiazhipeng 7 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> <template>
<view class="bg"> <view class="addressadd-bg">
<view class="list-forms"> <view class="list-forms">
<view class="list-item"> <view class="list-item">
<view class="list-item-title">姓名</view> <view class="list-item-title">姓名</view>
@ -325,73 +325,74 @@
</script> </script>
<style scoped> <style scoped>
.bg { .addressadd-bg {
width: 100%; width: 100%;
height: 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> </style>

385
components/cartData.vue

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

4
components/commentList.vue

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

2
manifest.json

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

9
package-lock.json

@ -1,7 +1,14 @@
{ {
"requires": true, "name": "flavoroftimesz",
"version": "1.0.0",
"lockfileVersion": 1, "lockfileVersion": 1,
"requires": true,
"dependencies": { "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": { "mobile-calendar-simple": {
"version": "2.4.0", "version": "2.4.0",
"resolved": "https://registry.npmmirror.com/mobile-calendar-simple/-/mobile-calendar-simple-2.4.0.tgz", "resolved": "https://registry.npmmirror.com/mobile-calendar-simple/-/mobile-calendar-simple-2.4.0.tgz",

5
package.json

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

4
pages/index/index.vue

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

408
pages/login/phoneLogin.vue

@ -1,190 +1,278 @@
<template> <template>
<view style="padding-top: 88rpx;"> <view class="bg">
<view class="login-tip">时味苏州PHoneLogin 申请获得</view> <view class="form-box">
<view class="login-tip2">以下权限</view> <view class="form-item">
<view class="login-tip-box"> <image src="https://m.cloud.sz-trip.com/static/images/Login/newMobile.png" alt=""></image>
<text>获得你的公开信息昵称头像地区及性别</text> <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>
<view class="btn-box"> <view @click="handleLogin()" class="submit">登录</view>
<button bindtap="cancel" type="default" @click="redirectIndex">取消</button> <view class="flex-center" style="margin-top: 30rpx;">
<button type="primary" @click="getUserInfo">同意</button> <radio-group @change="toggleAgreement">
</view> <radio value="1" :checked="isAgreed" style="transform:scale(0.7)"></radio>
<view class="flex-center article-box"> </radio-group>
<radio-group @change="toggleAgreement"> <view>同意<text @click="gotoInfo(9)">用户服务协议</text><text @click="gotoInfo(12)">隐私政策</text></view>
<radio value="1" :checked="isAgreed" style="transform:scale(0.7)"></radio> </view>
</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> </view>
</template> </template>
<script> <script>
export default { export default {
name: "login",
data() { data() {
return { return {
isAgreed: false, form: {
openid: '' 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: { methods: {
// //
handlePhoneNumber(e) { refreshCaptcha() {
if (e.detail.errMsg === "getPhoneNumber:ok") { // this.Post({}, "/api/uservice/user/getCaptchaImg").then((res) => {
this.$refs.popup.close(); if (res) {
this.Post({ this.captchaUrl = res.data.code;
code: e.detail.code, this.captchaId = res.data.id;
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",
} }
this.$store.commit('changeUserInfo', data); });
}, },
// //
navigateBasedOnPath() { toggleAgreement() {
if (this.$store.state.user.toPath.includes('user/user')) { this.isAgreed = !this.isAgreed;
uni.switchTab({ },
url: this.$store.state.user.toPath //
}); resetForm() {
} else { this.form.code = "";
uni.navigateBack({}); 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> </script>
<style> <style scoped lang="scss">
.login-tip { .bg {
font-size: 28rpx; /* background: #FFFFFF; */
margin: 0 60rpx; padding-bottom: 120rpx;
margin-top: 40rpx; 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;
} }
.form-box {
.login-tip2 { margin: 0 auto;
font-size: 44rpx; padding: 0 50rpx;
margin: 0rpx 60rpx; .form-item {
margin-top: 20rpx; padding: 20rpx 0;
font-weight: 400; 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 { .submit {
line-height: 80rpx; font-size: 36rpx;
margin-top: -20rpx; font-weight: 500;
margin-right: 30rpx; color: #FFFFFF;
color: #666; 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; input::placeholder {
position: absolute; color: #ABABAB;
bottom: 100rpx;
left: 0;
right: 0;
} }
.btn-box button { .yuan {
width: 400rpx; width: .37rem;
height: .37rem;
flex-shrink: 0;
} }
.article-box { .article-box {
position: absolute; font-weight: 400;
left: 0; font-size: 27rpx;
right: 0; color: #00B200;
justify-content: center; margin-top: 30rpx;
font-size: 24rpx; display: flex;
color: #1aad19; align-items: center;
bottom: 40rpx; .iconfont {
margin-right: 10rpx;
font-size: 26rpx;
}
text {
border-bottom: 1px solid;
}
} }
.article-box .iconfont {
margin-right: 10rpx;
font-size: 26rpx;
}
.article-box text { </style>
border-bottom: 1px solid;
}
</style>

16
pages/map/map.vue

@ -19,17 +19,29 @@
}, },
onShow() { 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) { if (inMap) {
uni.switchTab({ uni.switchTab({
url:"/pages/index/index", url:"/pages/index/index",
success: () => { success: () => {
this.$store.commit("changeInMap",false); this.$store.commit("changeInMap",false);
uni.setStorageSync("changeInMap",false)
} }
}) })
} else { } else {
uni.navigateTo({ 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"; import Vue from "vue";
// 全局变量 切换测试/正式 // 全局变量 切换测试/正式
Vue.prototype.envPropObj = 1 ? { Vue.prototype.envPropObj = 1 ? {
// 测试环境 // 测试环境
@ -24,16 +23,28 @@ Vue.prototype.envPropObj = 1 ? {
Vue.prototype.formateRichText = str => { Vue.prototype.formateRichText = str => {
if (!str) return ""; if (!str) return "";
var reg = new RegExp("<img", "g"); var reg = new RegExp("<img", "g");
// #ifdef MP-WEIXIN
str = str.replace(reg, "<img class='sz-xcx-fwb-img' width='100%'") str = str.replace(reg, "<img class='sz-xcx-fwb-img' width='100%'")
reg = new RegExp("<IMG", "g"); reg = new RegExp("<IMG", "g");
str = str.replace(reg, "<img class='sz-xcx-fwb-img' width='100%'") str = str.replace(reg, "<img class='sz-xcx-fwb-img' width='100%'")
reg = new RegExp("&nbsp;", "g"); 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>') str = str.replace(reg, '<span style="width: 8rpx;display: inline-block;"></span>')
reg = new RegExp("section", "g"); reg = new RegExp("section", "g");
str = str.replace(reg, 'div'); str = str.replace(reg, 'div');
reg = new RegExp("↵", "g"); reg = new RegExp("↵", "g");
str = str.replace(reg, '<br />'); str = str.replace(reg, '<br />');
let startStr = `<div style="font-size:0">`
str = `<div style="font-size:0">` + str + `</div>` str = `<div style="font-size:0">` + str + `</div>`
return str; return str;
@ -414,4 +425,39 @@ Vue.prototype.getDeliveryMethodStr=(str, obj={"1":"邮寄","2":"自提", "3":"
return arr return arr
} }
return [] 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="people-popup" v-if="selectInfo&&selectInfo.user_select_type == 1">
<view class="button" @click="changeAddressAddPopup('open','',{})">添加收货地址</view> <view class="button" @click="changeAddressAddPopup('open','',{})">添加收货地址</view>
<!-- #ifdef MP-WEIXIN -->
<view style="display: flex;justify-content: center;padding-top: 20rpx;"> <view style="display: flex;justify-content: center;padding-top: 20rpx;">
<view class="wx-address" @click="getWXAddress()"> <view class="wx-address" @click="getWXAddress()">
<image class="wx-icon" src="https://static.ticket.sz-trip.com/uploads/20250916/3402d54588c3f0470bf05ac754f76cf0.png"></image> <image class="wx-icon" src="https://static.ticket.sz-trip.com/uploads/20250916/3402d54588c3f0470bf05ac754f76cf0.png"></image>
<text style="padding-left: 8rpx;">获取微信地址</text> <text style="padding-left: 8rpx;">获取微信地址</text>
</view> </view>
</view> </view>
<!-- #endif -->
<view class="popup-list" v-if="addressList.length > 0"> <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="['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-left: 10rpx;
padding-right: 120px; padding-right: 120px;
background: #fff; background: #fff;
// #ifdef H5
padding-right: 20rpx;
// #endif
.input-model{ .input-model{
flex: 1; flex: 1;
@ -174,6 +177,9 @@
font-weight: 400; font-weight: 400;
font-size: 24rpx; font-size: 24rpx;
color: #030000; color: #030000;
// #ifdef H5
width: 500rpx;
// #endif
} }
.search-btn{ .search-btn{
font-weight: 500; font-weight: 500;

2
subPackages/techan/cartOrder.vue

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

11
subPackages/techan/detail.vue

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

16
subPackages/techan/index.vue

@ -159,7 +159,8 @@
<!-- 购物车 --> <!-- 购物车 -->
<view class="btn-bottom" > <view class="btn-bottom" >
<cartDataVue ref="cartDataVueRef" :paramData="paramData" @changeParamData="changeParamData" style="width: 100%;height: 100%;"> <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"> <view class="left-box">
<uni-badge class="uni-badge-left-margin" :text="paramData.num" absolute="rightTop" :offset="[5, 5]" size="small" <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'}"> :custom-style="{background:'#D90F01',color:'#ffffff',border:'1px solid #ffffff'}">
@ -178,6 +179,7 @@
<view class="btn-buy" @click="goCartOrder"> <view class="btn-buy" @click="goCartOrder">
去下单 去下单
</view> </view>
</view>
</template> </template>
</cartDataVue> </cartDataVue>
</view> </view>
@ -656,6 +658,9 @@
padding-left: 10rpx; padding-left: 10rpx;
padding-right: 120px; padding-right: 120px;
background: #EDF5DC; background: #EDF5DC;
// #ifdef H5
padding-right: 20rpx;
// #endif
.input-model{ .input-model{
flex: 1; flex: 1;
@ -677,6 +682,9 @@
font-weight: 400; font-weight: 400;
font-size: 24rpx; font-size: 24rpx;
color: #030000; color: #030000;
// #ifdef H5
width: 500rpx;
// #endif
} }
.search-btn{ .search-btn{
font-weight: 500; font-weight: 500;
@ -746,6 +754,12 @@
} }
} }
} }
// #ifdef H5
::v-deep .uni-scroll-view-content{
display: flex;
}
// #endif
} }
.more-btn{ .more-btn{
position: absolute; 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="people-popup" v-if="selectInfo&&selectInfo.user_select_type == 1">
<view class="button" @click="changeAddressAddPopup('open','',{})">添加收货地址</view> <view class="button" @click="changeAddressAddPopup('open','',{})">添加收货地址</view>
<!-- #ifdef MP-WEIXIN -->
<view style="display: flex;justify-content: center;padding-top: 20rpx;"> <view style="display: flex;justify-content: center;padding-top: 20rpx;">
<view class="wx-address" @click="getWXAddress()"> <view class="wx-address" @click="getWXAddress()">
<image class="wx-icon" src="https://static.ticket.sz-trip.com/uploads/20250916/3402d54588c3f0470bf05ac754f76cf0.png"></image> <image class="wx-icon" src="https://static.ticket.sz-trip.com/uploads/20250916/3402d54588c3f0470bf05ac754f76cf0.png"></image>
<text style="padding-left: 8rpx;">获取微信地址</text> <text style="padding-left: 8rpx;">获取微信地址</text>
</view> </view>
</view> </view>
<!-- #endif -->
<view class="popup-list" v-if="addressList.length > 0"> <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="['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"> <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;"> <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> <navigator :url="'/subPackages/user/myAddressAdd'" class="btn" style="width: 300rpx;">添加收货地址</navigator>
<!-- #ifdef MP-WEIXIN -->
<view class="btn" @click="getWXAddress()" <view class="btn" @click="getWXAddress()"
style="width: 300rpx;display: flex;align-items: center;justify-content: center;"> 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> <image class="wx-icon" src="https://static.ticket.sz-trip.com/uploads/20250916/3402d54588c3f0470bf05ac754f76cf0.png"></image>
<text style="padding-left: 8rpx;">获取微信地址</text> <text style="padding-left: 8rpx;">获取微信地址</text>
</view> </view>
<!-- #endif -->
</view> </view>
<navigator v-if="showType==0" :url="'/subPackages/user/myContactsAdd'" class="btn">添加联系人</navigator> <navigator v-if="showType==0" :url="'/subPackages/user/myContactsAdd'" class="btn">添加联系人</navigator>

Loading…
Cancel
Save