|
@@ -98,7 +98,7 @@
|
|
|
|
|
|
|
|
<movable-area class="movableArea">
|
|
<movable-area class="movableArea">
|
|
|
<movable-view class="movableView" direction="all" x="630rpx" y="700rpx">
|
|
<movable-view class="movableView" direction="all" x="630rpx" y="700rpx">
|
|
|
- <view class="img-IHg" @click="$utils.jumpJoinVip()">
|
|
|
|
|
|
|
+ <view class="img-IHg" @click="goJoin()">
|
|
|
<image style="width: 64rpx; height: 58rpx; " src="/static/icon/vip.png" mode=""></image>
|
|
<image style="width: 64rpx; height: 58rpx; " src="/static/icon/vip.png" mode=""></image>
|
|
|
</view>
|
|
</view>
|
|
|
</movable-view>
|
|
</movable-view>
|
|
@@ -126,14 +126,6 @@
|
|
|
<!-- 酒店推荐图片 -->
|
|
<!-- 酒店推荐图片 -->
|
|
|
<view class="home-hotel-img">
|
|
<view class="home-hotel-img">
|
|
|
<view class="home-hotel-img-content">
|
|
<view class="home-hotel-img-content">
|
|
|
- <!-- <view @click="produceDetail(item.id)" class="home-hotel-img-content-item" v-for="(item,index) in goodsList" :key="index"
|
|
|
|
|
- :style="{marginTop:item.marginTop || 0 }">
|
|
|
|
|
- <image class="home-hotel-img-content-item-img"
|
|
|
|
|
- :class="item.short?'home-hotel-img-content-item-img': 'homel-hotel-img-content-item-img-long' "
|
|
|
|
|
- :src="item.cover_img" mode=""></image>
|
|
|
|
|
- <view class="text">
|
|
|
|
|
- <text class="text-top">{{item.name}}</text>
|
|
|
|
|
- </view> -->
|
|
|
|
|
<view class="home-hotel-img-content-item" v-for="(item,index) in goodsList" :key="index"
|
|
<view class="home-hotel-img-content-item" v-for="(item,index) in goodsList" :key="index"
|
|
|
:style="{marginTop:item.marginTop || 0 }"
|
|
:style="{marginTop:item.marginTop || 0 }"
|
|
|
@click="goToProduct(item.id)">
|
|
@click="goToProduct(item.id)">
|
|
@@ -323,6 +315,9 @@
|
|
|
onLoad() {
|
|
onLoad() {
|
|
|
this.getGoodsList()
|
|
this.getGoodsList()
|
|
|
this.getAllSet()
|
|
this.getAllSet()
|
|
|
|
|
+
|
|
|
|
|
+ //用户访问
|
|
|
|
|
+ this.getUserVisits()
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
// **************** Data ***************//
|
|
// **************** Data ***************//
|
|
@@ -521,51 +516,27 @@
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
- //跳转方法
|
|
|
|
|
- jumpHAppID(id, urls) {
|
|
|
|
|
- if (id == 1) {
|
|
|
|
|
- const url = urls; // 跳转的外链
|
|
|
|
|
- const navtitle = 'H5'; // 这个标题是你自己可以设置的
|
|
|
|
|
- uni.navigateTo({
|
|
|
|
|
- // 跳转到webview页面
|
|
|
|
|
- url: `/pages/webview/webview?url=${url}&nav=${navtitle}`,
|
|
|
|
|
- success: () => {
|
|
|
|
|
- console.log('成功')
|
|
|
|
|
- },
|
|
|
|
|
- fail: (e) => {
|
|
|
|
|
- console.log(e, "失败")
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
- } else if (id == 2) {
|
|
|
|
|
- let obj = JSON.parse(urls);
|
|
|
|
|
- wx.navigateToMiniProgram({
|
|
|
|
|
- appId: `${obj.appid}`, //appid
|
|
|
|
|
- path: `${obj.path}`, //path
|
|
|
|
|
- extraData: { //参数
|
|
|
|
|
- foo: 'bar'
|
|
|
|
|
- },
|
|
|
|
|
- // envVersion: 'develop', //开发版develop 开发版 trial 体验版 release 正式版
|
|
|
|
|
- success(res) {
|
|
|
|
|
- console.log('成功')
|
|
|
|
|
- // 打开成功
|
|
|
|
|
- },
|
|
|
|
|
- fail(e) {
|
|
|
|
|
- console.log(e, '失败')
|
|
|
|
|
- }
|
|
|
|
|
- })
|
|
|
|
|
- } else if (id == 3) {
|
|
|
|
|
- uni.redirectTo({
|
|
|
|
|
- url: urls,
|
|
|
|
|
- fail:(err)=>{
|
|
|
|
|
- uni.reLaunch({
|
|
|
|
|
- url: urls
|
|
|
|
|
- })
|
|
|
|
|
- }
|
|
|
|
|
- })
|
|
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ //获取当前页面路径
|
|
|
|
|
+ getPageUrl() {
|
|
|
|
|
+ const pages = getCurrentPages();
|
|
|
|
|
+ console.log(pages,'--------->pages')
|
|
|
|
|
+ if(pages.length==1){
|
|
|
|
|
+ const currentPage = pages[0];
|
|
|
|
|
+ let pageUrl = `/${currentPage.route}`;
|
|
|
|
|
+ return pageUrl
|
|
|
|
|
+ console.log('当前页面url:', pageUrl);
|
|
|
|
|
+ }else{
|
|
|
|
|
+ const currentPage = pages[pages.length - 1];
|
|
|
|
|
+ let pageUrl = `/${currentPage.route}`;
|
|
|
|
|
+ return pageUrl
|
|
|
|
|
+ console.log('当前页面url:', pageUrl);
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
// 跳转其他小程序
|
|
// 跳转其他小程序
|
|
|
goJoin() {
|
|
goJoin() {
|
|
|
|
|
+ let _this = this
|
|
|
wx.navigateToMiniProgram({
|
|
wx.navigateToMiniProgram({
|
|
|
appId: 'wx255b58f0992b3c53', //appid
|
|
appId: 'wx255b58f0992b3c53', //appid
|
|
|
path: 'newUIMain/enrollment/enrollment', //path
|
|
path: 'newUIMain/enrollment/enrollment', //path
|
|
@@ -574,7 +545,21 @@
|
|
|
},
|
|
},
|
|
|
// envVersion: 'develop', //开发版develop 开发版 trial 体验版 release 正式版
|
|
// envVersion: 'develop', //开发版develop 开发版 trial 体验版 release 正式版
|
|
|
success(res) {
|
|
success(res) {
|
|
|
- console.log('成功')
|
|
|
|
|
|
|
+ let page = _this.getPageUrl()
|
|
|
|
|
+ let user_id = ''
|
|
|
|
|
+ if (_this.admin != null) {
|
|
|
|
|
+ user_id = _this.admin.id
|
|
|
|
|
+ } else {
|
|
|
|
|
+ user_id = 0
|
|
|
|
|
+ }
|
|
|
|
|
+ console.log('成功', page)
|
|
|
|
|
+ _this.$api.my.userMemberAdd({
|
|
|
|
|
+ user_id,
|
|
|
|
|
+ page,
|
|
|
|
|
+ }).then(res => {
|
|
|
|
|
+ console.log(res.data);
|
|
|
|
|
+ })
|
|
|
|
|
+
|
|
|
// 打开成功
|
|
// 打开成功
|
|
|
},
|
|
},
|
|
|
fail(e) {
|
|
fail(e) {
|
|
@@ -582,43 +567,61 @@
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
- // 跳转到h5页面
|
|
|
|
|
- goH5() {
|
|
|
|
|
- let inset = this.advertisInset[0].jump_type
|
|
|
|
|
- let inserPath = this.advertisInset[0].jump_config
|
|
|
|
|
- //跳转h5
|
|
|
|
|
- if (inset == 1) {
|
|
|
|
|
- const url = inserPath; // 跳转的外链
|
|
|
|
|
- const navtitle = 'H5'; // 这个标题是你自己可以设置的
|
|
|
|
|
- uni.navigateTo({
|
|
|
|
|
- // 跳转到webview页面
|
|
|
|
|
- url: `/pages/webview/webview?url=${url}&nav=${navtitle}`,
|
|
|
|
|
- success: () => {
|
|
|
|
|
- console.log('成功')
|
|
|
|
|
- },
|
|
|
|
|
- fail: (e) => {
|
|
|
|
|
- console.log(e, "失败")
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
- } else if (inset == 2) {
|
|
|
|
|
- let obj = JSON.parse(inserPath);
|
|
|
|
|
- wx.navigateToMiniProgram({
|
|
|
|
|
- appId: `${obj.appid}`, //appid
|
|
|
|
|
- path: `${obj.path}`, //path
|
|
|
|
|
- extraData: { //参数
|
|
|
|
|
- foo: 'bar'
|
|
|
|
|
- },
|
|
|
|
|
- // envVersion: 'develop', //开发版develop 开发版 trial 体验版 release 正式版
|
|
|
|
|
- success(res) {
|
|
|
|
|
- console.log('成功')
|
|
|
|
|
- // 打开成功
|
|
|
|
|
- },
|
|
|
|
|
- fail(e) {
|
|
|
|
|
- console.log(e, '失败')
|
|
|
|
|
- }
|
|
|
|
|
- })
|
|
|
|
|
- }
|
|
|
|
|
|
|
+
|
|
|
|
|
+ //用户访问
|
|
|
|
|
+ getUserVisits(){
|
|
|
|
|
+ this.$api.my.userVisits({
|
|
|
|
|
+ page:'/pages/index/index'
|
|
|
|
|
+ }).then(res=>{
|
|
|
|
|
+ console.log(res.data);
|
|
|
|
|
+ })
|
|
|
},
|
|
},
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ //跳转方法
|
|
|
|
|
+ // jumpHAppID(id, urls) {
|
|
|
|
|
+ // if (id == 1) {
|
|
|
|
|
+ // const url = urls; // 跳转的外链
|
|
|
|
|
+ // const navtitle = 'H5'; // 这个标题是你自己可以设置的
|
|
|
|
|
+ // uni.navigateTo({
|
|
|
|
|
+ // // 跳转到webview页面
|
|
|
|
|
+ // url: `/pages/webview/webview?url=${url}&nav=${navtitle}`,
|
|
|
|
|
+ // success: () => {
|
|
|
|
|
+ // console.log('成功')
|
|
|
|
|
+ // },
|
|
|
|
|
+ // fail: (e) => {
|
|
|
|
|
+ // console.log(e, "失败")
|
|
|
|
|
+ // }
|
|
|
|
|
+ // });
|
|
|
|
|
+ // } else if (id == 2) {
|
|
|
|
|
+ // let obj = JSON.parse(urls);
|
|
|
|
|
+ // wx.navigateToMiniProgram({
|
|
|
|
|
+ // appId: `${obj.appid}`, //appid
|
|
|
|
|
+ // path: `${obj.path}`, //path
|
|
|
|
|
+ // extraData: { //参数
|
|
|
|
|
+ // foo: 'bar'
|
|
|
|
|
+ // },
|
|
|
|
|
+ // // envVersion: 'develop', //开发版develop 开发版 trial 体验版 release 正式版
|
|
|
|
|
+ // success(res) {
|
|
|
|
|
+ // console.log('成功')
|
|
|
|
|
+ // // 打开成功
|
|
|
|
|
+ // },
|
|
|
|
|
+ // fail(e) {
|
|
|
|
|
+ // console.log(e, '失败')
|
|
|
|
|
+ // }
|
|
|
|
|
+ // })
|
|
|
|
|
+ // } else if (id == 3) {
|
|
|
|
|
+ // uni.redirectTo({
|
|
|
|
|
+ // url: urls,
|
|
|
|
|
+ // fail:(err)=>{
|
|
|
|
|
+ // uni.reLaunch({
|
|
|
|
|
+ // url: urls
|
|
|
|
|
+ // })
|
|
|
|
|
+ // }
|
|
|
|
|
+ // })
|
|
|
|
|
+ // }
|
|
|
|
|
+ // },
|
|
|
goToProduct(id){
|
|
goToProduct(id){
|
|
|
uni.navigateTo({
|
|
uni.navigateTo({
|
|
|
url:`/pages/goods/goods-detail/index?id=${id}&type=1`
|
|
url:`/pages/goods/goods-detail/index?id=${id}&type=1`
|