Feat(页面):页面埋点配置
This commit is contained in:
@@ -14,7 +14,7 @@ export const pageListenMixins = {
|
||||
this.pageViewDateTime = getCurrDateTime()
|
||||
this.pageToWatchShowCount(this.pageKeyId)
|
||||
},
|
||||
onHide() {
|
||||
onUnload() {
|
||||
this.pageToHideHandle()
|
||||
},
|
||||
methods: {
|
||||
|
||||
@@ -130,7 +130,7 @@ export default {
|
||||
// this.videoContext = uni.createVideoContext('myVideo');
|
||||
// this.videoContext.requestFullScreen();
|
||||
|
||||
this.$yrouter.push('/pages/VideoPlayBackList/VideoPlayBackDetail?videoUrl='+video.video);
|
||||
this.$yrouter.push('/pages/VideoPlayBackList/VideoPlayBackDetail?videoUrl='+video.video + '&id=' + video.id);
|
||||
},
|
||||
liveClick:function(video){
|
||||
var liveAppId = this.$WX_LIVE_APPID;
|
||||
|
||||
@@ -4,16 +4,18 @@
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
import uniPopup from '@/components/uni-popup/uni-popup.vue';
|
||||
import uniPopup from '@/components/uni-popup/uni-popup.vue'
|
||||
import { pageListenMixins } from '@/mixins/pageListenMixins'
|
||||
export default {
|
||||
|
||||
components:{
|
||||
uniPopup
|
||||
},
|
||||
mixins: [pageListenMixins],
|
||||
data() {
|
||||
return {
|
||||
curPlayVideoUrl:'',
|
||||
isVideoPopupShow:false
|
||||
isVideoPopupShow:false,
|
||||
pageKeyId: ''
|
||||
}
|
||||
},
|
||||
onReady: function(res) {
|
||||
@@ -21,10 +23,9 @@ export default {
|
||||
this.videoContext.requestFullScreen();
|
||||
},
|
||||
onLoad:function(e){
|
||||
|
||||
this.curPlayVideoUrl = e.videoUrl;
|
||||
//this.$refs.popup.open();
|
||||
|
||||
this.curPlayVideoUrl = e.videoUrl
|
||||
const id = options.id
|
||||
this.pageKeyId = `findVideo_videoId_${id}`
|
||||
},
|
||||
methods: {
|
||||
videoErrorCallback: function(e) {
|
||||
|
||||
@@ -32,71 +32,69 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {getStoreVideoType, getArticleList} from "@/api/public";
|
||||
import {getVideoList} from "@/api/user";
|
||||
import {getStoreVideoType, getArticleList} from '@/api/public'
|
||||
import {getVideoList} from '@/api/user'
|
||||
import { pageListenMixins } from '@/mixins/pageListenMixins'
|
||||
|
||||
export default {
|
||||
mixins: [pageListenMixins],
|
||||
data() {
|
||||
return {
|
||||
webUrl: this.$VUE_APP_RESOURCES_URL,
|
||||
typeList: [{"label": "全部", "value": ""}],
|
||||
type: "",
|
||||
typeList: [{'label': '全部', 'value': ''}],
|
||||
type: '',
|
||||
page: 1,
|
||||
limit: 10,
|
||||
keyword: "",
|
||||
keyword: '',
|
||||
list: [],
|
||||
isWait: false
|
||||
isWait: false,
|
||||
pageKeyId: Object.freeze('findVideoList')
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
this.getType();
|
||||
this.fetchList();
|
||||
this.getType()
|
||||
this.fetchList()
|
||||
},
|
||||
onReachBottom() {
|
||||
this.page++;
|
||||
this.fetchList();
|
||||
this.page++
|
||||
this.fetchList()
|
||||
},
|
||||
methods: {
|
||||
getType() {
|
||||
getStoreVideoType().then(({data}) => {
|
||||
if (data.length > 0) {
|
||||
data.forEach(item => {
|
||||
this.typeList.push(item);
|
||||
this.typeList.push(item)
|
||||
})
|
||||
}
|
||||
});
|
||||
})
|
||||
},
|
||||
|
||||
changeType(item) {
|
||||
this.type = item.value;
|
||||
this.page = 1;
|
||||
this.list = [];
|
||||
this.fetchList();
|
||||
this.type = item.value
|
||||
this.page = 1
|
||||
this.list = []
|
||||
this.fetchList()
|
||||
},
|
||||
|
||||
fetchList() {
|
||||
if (this.isWait) return;
|
||||
this.isWait = true;
|
||||
|
||||
let params = {
|
||||
if (this.isWait) return
|
||||
this.isWait = true
|
||||
const params = {
|
||||
type: this.type,
|
||||
page: this.page,
|
||||
limit: this.limit
|
||||
};
|
||||
|
||||
}
|
||||
getVideoList(params).then(res => {
|
||||
if (res.status === 200) {
|
||||
for (let i = 0; i < res.data.length; i++) {
|
||||
res.data[i].hide = true;
|
||||
res.data[i].hide = true
|
||||
this.list.push(res.data[i])
|
||||
}
|
||||
}
|
||||
this.isWait = false;
|
||||
});
|
||||
this.isWait = false
|
||||
})
|
||||
},
|
||||
|
||||
goDetail(item) {
|
||||
this.$yrouter.push("/pages/VideoPlayBackList/VideoPlayBackDetail?videoUrl=" + item.video);
|
||||
this.$yrouter.push("/pages/VideoPlayBackList/VideoPlayBackDetail?videoUrl=" + item.video + '&id=' + item.id)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+7
-1
@@ -225,10 +225,12 @@ import {
|
||||
cartGoodChangeAttr
|
||||
} from '@/api/store'
|
||||
import CheckboxIcon from '@/components/CheckboxIcon.vue'
|
||||
import { pageListenMixins } from '@/mixins/pageListenMixins'
|
||||
export default {
|
||||
components: {
|
||||
CheckboxIcon
|
||||
},
|
||||
mixins: [pageListenMixins],
|
||||
data() {
|
||||
return {
|
||||
statusBarHeight: uni.getSystemInfoSync().statusBarHeight,
|
||||
@@ -241,7 +243,8 @@ export default {
|
||||
productAttr: [],
|
||||
productValueArr: []
|
||||
},
|
||||
showAttr: false
|
||||
showAttr: false,
|
||||
pageKeyId: Object.freeze('landmarkGoodsIndex')
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@@ -274,6 +277,9 @@ export default {
|
||||
this.closeAttr()
|
||||
this.getCart()
|
||||
},
|
||||
onHide() {
|
||||
this.pageToHideHandle()
|
||||
},
|
||||
methods: {
|
||||
async getCart() {
|
||||
const res = await getCartGroup()
|
||||
|
||||
@@ -141,28 +141,27 @@ import MescrollMixins from '@/mixins/mescroll-mixins.js'
|
||||
import {fetchCity} from '@/api/wenwan'
|
||||
import MescrollBody from '@/components/mescroll-uni/mescroll-body.vue'
|
||||
import {getCurAddress, getLocation} from '@/utils/common.js'
|
||||
import { pageListenMixins } from '@/mixins/pageListenMixins'
|
||||
|
||||
export default {
|
||||
name: 'ChoseCity',
|
||||
components: {
|
||||
MescrollBody
|
||||
},
|
||||
props: {},
|
||||
mixins: [
|
||||
MescrollMixins({
|
||||
getPageData(mescroll) {
|
||||
// 此时mescroll会携带page的参数:
|
||||
// let pageNum = mescroll.num; // 页码, 默认从1开始
|
||||
// let pageSize = mescroll.size; // 页长, 默认每页10条
|
||||
mescroll.endSuccess(10)
|
||||
}
|
||||
})
|
||||
}),
|
||||
pageListenMixins
|
||||
],
|
||||
data() {
|
||||
return {
|
||||
webUrl: this.$VUE_APP_RESOURCES_URL,
|
||||
upOption: {
|
||||
noMoreSize: 10, //如果列表已无数据,可设置列表的总数量要大于半页才显示无更多数据;避免列表数据过少(比如只有一条数据),显示无更多数据会不好看; 默认5
|
||||
// 如果列表已无数据,可设置列表的总数量要大于半页才显示无更多数据;避免列表数据过少(比如只有一条数据),显示无更多数据会不好看; 默认5
|
||||
noMoreSize: 10,
|
||||
auto: false,
|
||||
empty: {
|
||||
tip: '暂无城市'
|
||||
@@ -176,14 +175,38 @@ export default {
|
||||
listCity: [],
|
||||
navActive: 0,
|
||||
keyword: '',
|
||||
// 0、特产;1、文玩;2、七彩云上;3、特色礼品;4、康养食材;5、千县名品;6、景点门票
|
||||
type: null,
|
||||
location: '',
|
||||
banner: {},
|
||||
recommendInfo: null // 推荐信息
|
||||
// 推荐信息
|
||||
recommendInfo: null,
|
||||
pageKeyId: ''
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
this.type = Number(options.type)
|
||||
const type = Number(options.type)
|
||||
this.type = type
|
||||
switch(type) {
|
||||
case 0:
|
||||
this.pageKeyId = 'goodsIndex'
|
||||
break
|
||||
case 1:
|
||||
this.pageKeyId = 'wenwanIndex'
|
||||
break
|
||||
case 3:
|
||||
this.pageKeyId = 'customizedGiftIndex'
|
||||
break
|
||||
case 4:
|
||||
this.pageKeyId = 'wellnessFoodIndex'
|
||||
break
|
||||
case 5:
|
||||
this.pageKeyId = 'countyFamousIndex'
|
||||
break
|
||||
default:
|
||||
this.pageKeyId = ''
|
||||
break
|
||||
}
|
||||
this.location = options.city
|
||||
if (this.location === undefined) {
|
||||
this.getMapData()
|
||||
|
||||
@@ -79,10 +79,12 @@
|
||||
import { getHotelList, getHotelTypeList } from "@/api/inn.js"
|
||||
import { getCurAddress, getLocation } from "@/utils/common"
|
||||
import FunHotelItem from './components/HotelItem'
|
||||
import { pageListenMixins } from '@/mixins/pageListenMixins'
|
||||
export default {
|
||||
components: {
|
||||
FunHotelItem
|
||||
},
|
||||
mixins: [pageListenMixins],
|
||||
data() {
|
||||
return {
|
||||
webUrl: this.$VUE_APP_RESOURCES_URL,
|
||||
@@ -92,7 +94,8 @@ export default {
|
||||
typeIndex: 0,
|
||||
cityName: '',
|
||||
hotelList: [],
|
||||
isLoad: false
|
||||
isLoad: false,
|
||||
pageKeyId: Object.freeze('findFunIndex')
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@@ -132,7 +135,7 @@ export default {
|
||||
},
|
||||
goInnDetail(item) {
|
||||
uni.navigateTo({
|
||||
url: `/pagesInn/inn/innHome?id=${item.id}`
|
||||
url: `/pagesInn/inn/innHome?id=${item.id}&from=fun`
|
||||
})
|
||||
},
|
||||
async getMapData() {
|
||||
|
||||
@@ -415,6 +415,9 @@ export default {
|
||||
// this.getBastList()
|
||||
// }
|
||||
},
|
||||
onHide() {
|
||||
this.pageToHideHandle()
|
||||
},
|
||||
onShareAppMessage() {
|
||||
return {
|
||||
title: '探寻有趣有味的生活方式',
|
||||
|
||||
+11
-3
@@ -26,7 +26,7 @@
|
||||
:key="index"
|
||||
class="item"
|
||||
:style="{'left':item.gx+'rpx','top':item.gy+'rpx'}"
|
||||
@click="$global.navToGoods(item.productId)"
|
||||
@click="goGoods(item.productId)"
|
||||
>
|
||||
<view class="round">
|
||||
<view class="line" :class="'line-'+directionClass[item.labelDirection]"></view>
|
||||
@@ -48,7 +48,7 @@
|
||||
</view>
|
||||
|
||||
<view class="main-box" v-if="mapData.recommended.storeImage"
|
||||
@click="$global.navToGoods(mapData.recommended.productId)">
|
||||
@click="goGoods(mapData.recommended.productId)">
|
||||
<image class="bg-main" :src="mapData.recommended.storeImage" mode="scaleToFill"/>
|
||||
<view class="box-mask flex flex-col jc-end">
|
||||
<view class="one-t bold">{{ mapData.recommended.title }}</view>
|
||||
@@ -57,7 +57,7 @@
|
||||
</view>
|
||||
|
||||
<view class="list-box flex flex-wrap">
|
||||
<view class="item" v-for="item in goods" :key="item.id" @click="$global.navToGoods(item.productId)">
|
||||
<view class="item" v-for="item in goods" :key="item.id" @click="goGoods(item.productId)">
|
||||
<image :src="item.storeImage" mode="scaleToFill"/>
|
||||
<view class="content flex flex-col jc-between">
|
||||
<view class="more-t bold">{{ item.title }}</view>
|
||||
@@ -110,6 +110,9 @@ export default {
|
||||
onLoad() {
|
||||
this.getNavList();
|
||||
},
|
||||
onHide() {
|
||||
this.pageToHideHandle()
|
||||
},
|
||||
onReachBottom() {
|
||||
this.page++;
|
||||
this.fetchGoods();
|
||||
@@ -159,6 +162,11 @@ export default {
|
||||
this.goods.push(data[i]);
|
||||
}
|
||||
})
|
||||
},
|
||||
goGoods(id) {
|
||||
uni.navigateTo({
|
||||
url: `/pages/shop/GoodsCon/index?id=${id}&from=landmark`
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -44,23 +44,25 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
import {
|
||||
orderDetail,
|
||||
getRefundReason,
|
||||
postOrderRefund
|
||||
} from "@/api/order";
|
||||
import {
|
||||
} from "@/api/order";
|
||||
import {
|
||||
trim
|
||||
} from "@/utils";
|
||||
import {
|
||||
} from "@/utils";
|
||||
import {
|
||||
VUE_APP_API_URL
|
||||
} from "@/config";
|
||||
} from "@/config";
|
||||
import { pageListenMixins } from '@/mixins/pageListenMixins'
|
||||
|
||||
export default {
|
||||
export default {
|
||||
name: "goodsReturn",
|
||||
components: {
|
||||
// VueCoreImageUpload
|
||||
},
|
||||
mixins: [pageListenMixins],
|
||||
data() {
|
||||
return {
|
||||
url: `${VUE_APP_API_URL}/upload/image`,
|
||||
@@ -71,7 +73,8 @@
|
||||
orderInfo: {},
|
||||
reasonList: [],
|
||||
reason: "",
|
||||
refundReasonWapExplain: ""
|
||||
refundReasonWapExplain: "",
|
||||
pageKeyId: Object.freeze('userOrderRefundApply')
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
@@ -136,7 +139,7 @@
|
||||
this.getOrderDetail();
|
||||
this.getRefundReason();
|
||||
}
|
||||
};
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
.apply-return .list .item .inp {
|
||||
|
||||
@@ -145,9 +145,11 @@ import {cancelOrderHandle, payOrderHandle, takeOrderHandle} from "@/libs/order";
|
||||
import Loading from "@/components/Loading";
|
||||
import Payment from "@/components/Payment";
|
||||
import {mapGetters} from "vuex";
|
||||
import { pageListenMixins } from '@/mixins/pageListenMixins'
|
||||
|
||||
export default {
|
||||
name: "MyOrder",
|
||||
mixins: [pageListenMixins],
|
||||
data() {
|
||||
return {
|
||||
webUrl: this.$VUE_APP_RESOURCES_URL,
|
||||
@@ -172,6 +174,7 @@ export default {
|
||||
|
||||
showExtend: false,
|
||||
delayId: null,
|
||||
pageKeyId: Object.freeze('userOrderIndex')
|
||||
};
|
||||
},
|
||||
components: {
|
||||
|
||||
@@ -265,6 +265,7 @@ import DataFormat from "@/components/DataFormat";
|
||||
import {copyClipboard} from "@/utils";
|
||||
import {mapGetters} from "vuex";
|
||||
import {cancelOrderHandle, delOrderHandle, payOrderHandle, takeOrderHandle, yuePayOrderHandle} from "@/libs/order";
|
||||
import { pageListenMixins } from '@/mixins/pageListenMixins'
|
||||
|
||||
const STATUS = [
|
||||
"待付款",
|
||||
@@ -288,7 +289,7 @@ export default {
|
||||
DataFormat,
|
||||
passkeyborad
|
||||
},
|
||||
props: {},
|
||||
mixins: [pageListenMixins],
|
||||
data: function () {
|
||||
return {
|
||||
isShowPayPwdPop: false,
|
||||
@@ -308,7 +309,8 @@ export default {
|
||||
mapKay: "",
|
||||
mapShow: false,
|
||||
payPassword: null,
|
||||
webUrl: this.$VUE_APP_RESOURCES_URL
|
||||
webUrl: this.$VUE_APP_RESOURCES_URL,
|
||||
pageKeyId: Object.freeze('userOrderInfo')
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
|
||||
@@ -256,6 +256,7 @@ import {isNullOrEmpty, isWeixin} from "@/utils";
|
||||
import blPaymentPasswordInput from '@/components/blPaymentPasswordInput.vue';
|
||||
import uniPopup from '@/components/uni-popup/uni-popup.vue';
|
||||
import CouponsPopup from "@/components/CouponsPopup.vue"
|
||||
import { pageListenMixins } from '@/mixins/pageListenMixins'
|
||||
|
||||
const NAME = "OrderSubmission",
|
||||
_isWeixin = isWeixin();
|
||||
@@ -269,6 +270,7 @@ export default {
|
||||
passkeyborad,
|
||||
CouponsPopup
|
||||
},
|
||||
mixins: [pageListenMixins],
|
||||
props: {},
|
||||
data: function () {
|
||||
return {
|
||||
@@ -317,7 +319,8 @@ export default {
|
||||
// 订单是否可以使用积分
|
||||
canUsePoints: false,
|
||||
// 订单最大可使用积分数量
|
||||
maxPoints: 0
|
||||
maxPoints: 0,
|
||||
pageKeyId: Object.freeze('orderConfirm')
|
||||
};
|
||||
},
|
||||
computed: mapGetters(["userInfo", "storeItems"]),
|
||||
|
||||
@@ -48,12 +48,14 @@
|
||||
<script>
|
||||
import {getOrderList} from "@/api/order";
|
||||
import Loading from "@/components/Loading";
|
||||
import { pageListenMixins } from '@/mixins/pageListenMixins'
|
||||
|
||||
export default {
|
||||
name: "ReturnList",
|
||||
components: {
|
||||
Loading
|
||||
},
|
||||
mixins: [pageListenMixins],
|
||||
data() {
|
||||
return {
|
||||
webUrl: this.$VUE_APP_RESOURCES_URL,
|
||||
@@ -61,7 +63,8 @@ export default {
|
||||
page: 1,
|
||||
limit: 20,
|
||||
loading: false,
|
||||
loaded: false
|
||||
loaded: false,
|
||||
pageKeyId: Object.freeze('userOrderRefundList')
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
|
||||
@@ -125,9 +125,10 @@ import {
|
||||
getUserPointInfo,
|
||||
getUserPointBill
|
||||
} from '@/api/user'
|
||||
import { pageListenMixins } from '@/mixins/pageListenMixins'
|
||||
export default {
|
||||
name: 'UserPoints',
|
||||
props: {},
|
||||
mixins: [pageListenMixins],
|
||||
data: function() {
|
||||
return {
|
||||
webUrl: this.$VUE_APP_RESOURCES_URL,
|
||||
@@ -145,7 +146,8 @@ export default {
|
||||
totalUsedPoints: 0, // 累计使用积分
|
||||
pointsRule: ''
|
||||
},
|
||||
show: false
|
||||
show: false,
|
||||
pageKeyId: Object.freeze('userPointsBill')
|
||||
}
|
||||
},
|
||||
created() {
|
||||
|
||||
@@ -251,8 +251,10 @@ import {
|
||||
} from "@/api/user"
|
||||
import {isWeixin} from "@/utils"
|
||||
import cookie from "@/utils/store/cookie"
|
||||
import { pageListenMixins } from '@/mixins/pageListenMixins'
|
||||
export default {
|
||||
name: 'UserPage',
|
||||
mixins: [pageListenMixins],
|
||||
data() {
|
||||
return {
|
||||
statusBarHeight: uni.getSystemInfoSync().statusBarHeight,
|
||||
@@ -330,7 +332,8 @@ export default {
|
||||
}
|
||||
],
|
||||
bannerBgUrl: '',
|
||||
userCenterBannerUrl: ''
|
||||
userCenterBannerUrl: '',
|
||||
pageKeyId: Object.freeze('userIndex')
|
||||
}
|
||||
},
|
||||
computed: mapGetters(['userInfo']),
|
||||
|
||||
@@ -30,12 +30,13 @@
|
||||
<script>
|
||||
import { getCommissionInfo } from "@/api/user";
|
||||
import Loading from "@/components/Loading";
|
||||
import { pageListenMixins } from '@/mixins/pageListenMixins'
|
||||
export default {
|
||||
name: "UserBill",
|
||||
components: {
|
||||
Loading
|
||||
},
|
||||
props: {},
|
||||
mixins: [pageListenMixins],
|
||||
data: function() {
|
||||
return {
|
||||
types: 0,
|
||||
@@ -45,7 +46,8 @@ export default {
|
||||
},
|
||||
list: [],
|
||||
loaded: false,
|
||||
loading: false
|
||||
loading: false,
|
||||
pageKeyId: Object.freeze('userBalanceBill')
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
|
||||
@@ -55,13 +55,14 @@ import attrs, {chs_extphone, required} from "@/utils/validate";
|
||||
import {validatorDefaultCatch} from "@/utils/dialog";
|
||||
// import { openAddress } from "@/libs/wechat";
|
||||
import {isWeixin} from "@/utils";
|
||||
import { pageListenMixins } from '@/mixins/pageListenMixins'
|
||||
|
||||
export default {
|
||||
name: "AddAddress",
|
||||
components: {
|
||||
CitySelect
|
||||
},
|
||||
computed: {},
|
||||
mixins: [pageListenMixins],
|
||||
data() {
|
||||
return {
|
||||
district: [],
|
||||
@@ -69,7 +70,8 @@ export default {
|
||||
userAddress: {isDefault: 0},
|
||||
address: {},
|
||||
isWechat: isWeixin(),
|
||||
addressText: ""
|
||||
addressText: "",
|
||||
pageKeyId: Object.freeze('userAddressEdit')
|
||||
};
|
||||
},
|
||||
mounted: function () {
|
||||
|
||||
@@ -81,11 +81,13 @@
|
||||
import {getAddressDefaultSet, getAddressList, getAddressRemove} from "@/api/user";
|
||||
import Loading from "@/components/Loading";
|
||||
import {isWeixin} from "@/utils";
|
||||
import { pageListenMixins } from '@/mixins/pageListenMixins'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
Loading
|
||||
},
|
||||
mixins: [pageListenMixins],
|
||||
data() {
|
||||
return {
|
||||
webUrl: this.$VUE_APP_RESOURCES_URL,
|
||||
@@ -96,7 +98,8 @@ export default {
|
||||
loadTitle: "",
|
||||
loading: false,
|
||||
loadend: false,
|
||||
isWechat: isWeixin()
|
||||
isWechat: isWeixin(),
|
||||
pageKeyId: Object.freeze('userAddressIndex')
|
||||
};
|
||||
},
|
||||
mounted: function () {
|
||||
|
||||
@@ -41,13 +41,14 @@
|
||||
<script>
|
||||
import { getCommissionInfo, getSpreadInfo } from "@/api/user";
|
||||
import Loading from "@/components/Loading";
|
||||
import { pageListenMixins } from '@/mixins/pageListenMixins'
|
||||
|
||||
export default {
|
||||
name: "CommissionDetails",
|
||||
components: {
|
||||
Loading
|
||||
},
|
||||
props: {},
|
||||
mixins: [pageListenMixins],
|
||||
data: function() {
|
||||
return {
|
||||
info: [],
|
||||
@@ -58,7 +59,8 @@ export default {
|
||||
},
|
||||
types: 9,//3,
|
||||
loaded: false,
|
||||
loading: false
|
||||
loading: false,
|
||||
pageKeyId: Object.freeze('userSpreadBill')
|
||||
};
|
||||
},
|
||||
mounted: function() {
|
||||
|
||||
@@ -126,13 +126,14 @@
|
||||
<script>
|
||||
import {getSpreadUser} from "@/api/user";
|
||||
import Loading from "@/components/Loading";
|
||||
import { pageListenMixins } from '@/mixins/pageListenMixins'
|
||||
|
||||
export default {
|
||||
name: "PromoterList",
|
||||
components: {
|
||||
Loading
|
||||
},
|
||||
props: {},
|
||||
mixins: [pageListenMixins],
|
||||
data: function () {
|
||||
return {
|
||||
fixedState: false,
|
||||
@@ -153,7 +154,8 @@ export default {
|
||||
loadTitle: "",
|
||||
first: "",
|
||||
second: "",
|
||||
webUrl: this.$VUE_APP_RESOURCES_URL
|
||||
webUrl: this.$VUE_APP_RESOURCES_URL,
|
||||
pageKeyId: Object.freeze('userSpreadStat')
|
||||
};
|
||||
},
|
||||
mounted: function () {
|
||||
|
||||
@@ -62,12 +62,13 @@
|
||||
<script>
|
||||
import { getSpreadOrder, getUserSpreadRule } from "@/api/user";
|
||||
import Loading from "@/components/Loading";
|
||||
import { pageListenMixins } from '@/mixins/pageListenMixins'
|
||||
export default {
|
||||
name: "PromoterOrder",
|
||||
components: {
|
||||
Loading
|
||||
},
|
||||
props: {},
|
||||
mixins: [pageListenMixins],
|
||||
data: function() {
|
||||
return {
|
||||
list: [],
|
||||
@@ -79,7 +80,8 @@ export default {
|
||||
loading: false,
|
||||
loadTitle: '',
|
||||
count: '',
|
||||
ruleText: ''
|
||||
ruleText: '',
|
||||
pageKeyId: Object.freeze('userSpreadOrder')
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
||||
@@ -100,11 +100,11 @@
|
||||
|
||||
|
||||
import { getSpreadInfo } from "@/api/user";
|
||||
import { pageListenMixins } from '@/mixins/pageListenMixins'
|
||||
|
||||
export default {
|
||||
name: "UserPromotion",
|
||||
components: {},
|
||||
props: {},
|
||||
mixins: [pageListenMixins],
|
||||
data: function() {
|
||||
return {
|
||||
Info: {
|
||||
@@ -112,7 +112,8 @@ export default {
|
||||
extractCount: 0,
|
||||
commissionCount: 0
|
||||
},
|
||||
webUrl:this.$VUE_APP_RESOURCES_URL
|
||||
webUrl:this.$VUE_APP_RESOURCES_URL,
|
||||
pageKeyId: Object.freeze('userSpreadIndex')
|
||||
};
|
||||
},
|
||||
mounted: function() {
|
||||
|
||||
@@ -37,14 +37,17 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {getLogs, takePrize} from "@/api/lottery";
|
||||
import {getLogs, takePrize} from '@/api/lottery'
|
||||
import { pageListenMixins } from '@/mixins/pageListenMixins'
|
||||
export default {
|
||||
mixins: [pageListenMixins],
|
||||
data() {
|
||||
return {
|
||||
webUrl: this.$VUE_APP_RESOURCES_URL,
|
||||
loading: false,
|
||||
page: 1,
|
||||
list: []
|
||||
list: [],
|
||||
pageKeyId: Object.freeze('lotteryRecords')
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
@@ -98,15 +101,15 @@ export default {
|
||||
confirmText: '查看订单',
|
||||
success: function (res) {
|
||||
if (res.confirm) {
|
||||
console.log('用户点击确定');
|
||||
console.log('用户点击确定')
|
||||
uni.navigateTo({
|
||||
url: '/pages/order/MyOrder/index'
|
||||
})
|
||||
} else if (res.cancel) {
|
||||
console.log('用户点击取消');
|
||||
console.log('用户点击取消')
|
||||
}
|
||||
}
|
||||
});
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -82,9 +82,11 @@
|
||||
<script>
|
||||
import { getDetail, getPrize, takePrize, getLotteryShareInfo } from '@/api/lottery'
|
||||
import gbroMarquee from '../components/gbro-marquee/marquee.vue'
|
||||
import { pageListenMixins } from '@/mixins/pageListenMixins'
|
||||
|
||||
export default {
|
||||
components: { gbroMarquee },
|
||||
mixins: [pageListenMixins],
|
||||
data() {
|
||||
return {
|
||||
ready: false,
|
||||
@@ -114,7 +116,8 @@ export default {
|
||||
back_color: "red", //背景色
|
||||
},
|
||||
imgData: [],
|
||||
shareAppImg: ''
|
||||
shareAppImg: '',
|
||||
pageKeyId: Object.freeze('lotteryIndex')
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
|
||||
@@ -3,15 +3,19 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { pageListenMixins } from '@/mixins/pageListenMixins'
|
||||
export default {
|
||||
name: "pdf",
|
||||
mixins: [pageListenMixins],
|
||||
name: 'PdfView',
|
||||
data() {
|
||||
return {
|
||||
pdfPath: ""
|
||||
pdfPath: '',
|
||||
pageKeyId: ''
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
this.pdfPath = options.path;
|
||||
this.pageKeyId = `investmentInfo_id_${options.id}`
|
||||
this.pdfPath = options.path
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -17,24 +17,26 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {getImages, getShopData} from "@/api/join";
|
||||
|
||||
import {getImages, getShopData} from '@/api/join'
|
||||
import { pageListenMixins } from '@/mixins/pageListenMixins'
|
||||
export default {
|
||||
name: "pkgJoinIndex",
|
||||
name: 'PkgJoinIndex',
|
||||
mixins: [pageListenMixins],
|
||||
data() {
|
||||
return {
|
||||
webUrl: this.$VUE_APP_RESOURCES_URL,
|
||||
partnerId: "",
|
||||
partnerType: "",
|
||||
partnerId: '',
|
||||
partnerType: '',
|
||||
hotelId: null,
|
||||
hasHotel: null,
|
||||
hasSupplier: null,
|
||||
hasWholesaler: null,
|
||||
images: null
|
||||
images: null,
|
||||
pageKeyId: Object.freeze('merchantApplyIndex')
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
this.partnerId = options.partnerId || "";
|
||||
this.partnerId = options.partnerId || ''
|
||||
getImages().then(({data}) => this.images = data);
|
||||
getShopData(this.partnerId).then(({data}) => {
|
||||
this.partnerType = data.partnerType;
|
||||
|
||||
@@ -310,6 +310,7 @@
|
||||
|
||||
<script>
|
||||
import CitySelect from "@/components/CitySelect"
|
||||
import { pageListenMixins } from '@/mixins/pageListenMixins'
|
||||
import {
|
||||
getShopData,
|
||||
getShopInfo,
|
||||
@@ -332,6 +333,7 @@ export default {
|
||||
components: {
|
||||
CitySelect
|
||||
},
|
||||
mixins: [pageListenMixins],
|
||||
data() {
|
||||
return {
|
||||
partnerId: null,
|
||||
@@ -441,7 +443,8 @@ export default {
|
||||
reviewStatus: null,
|
||||
stateTitle: '',
|
||||
stateType: 'primary',
|
||||
isPass: false
|
||||
isPass: false,
|
||||
pageKeyId: Object.freeze('merchantApplyHotel')
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
|
||||
@@ -430,12 +430,14 @@ import {
|
||||
uploadImage,
|
||||
chooseVideoToUpload
|
||||
} from "@/utils"
|
||||
import { pageListenMixins } from '@/mixins/pageListenMixins'
|
||||
|
||||
export default {
|
||||
name: "pkgJoinSupplier",
|
||||
name: "PkgJoinSupplier",
|
||||
components: {
|
||||
CitySelect
|
||||
},
|
||||
mixins: [pageListenMixins],
|
||||
data() {
|
||||
return {
|
||||
partnerId: "",
|
||||
@@ -614,15 +616,23 @@ export default {
|
||||
reviewStatus: null,
|
||||
stateTitle: "",
|
||||
stateType: "primary",
|
||||
isPass: false
|
||||
isPass: false,
|
||||
pageKeyId: ''
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
this.partnerId = options.partnerId || "";
|
||||
this.formSupplier.subType = options.type;
|
||||
this.infoTitle = options.type === "goods_supplier" ? "特产" : "文玩";
|
||||
this.partnerId = options.partnerId || ''
|
||||
const type = options.type
|
||||
this.formSupplier.subType = type
|
||||
if (type === 'goods_supplier') {
|
||||
this.infoTitle = '特产'
|
||||
this.pageKeyId = 'merchantApplyGoodsSupplier'
|
||||
} else {
|
||||
this.infoTitle = '文玩'
|
||||
this.pageKeyId = 'merchantApplyWenwanSupplier'
|
||||
}
|
||||
uni.setNavigationBarTitle({
|
||||
title: this.infoTitle + "供应商入驻"
|
||||
title: this.infoTitle + '供应商入驻'
|
||||
})
|
||||
this.init();
|
||||
},
|
||||
|
||||
@@ -156,12 +156,14 @@ import CitySelect from "@/components/CitySelect";
|
||||
import {getShopData, getWholesaler, removeApply, saveWholesaler} from "@/api/join";
|
||||
import {getCity, registerVerify} from "@/api/user";
|
||||
import {chooseImage} from "@/utils";
|
||||
import { pageListenMixins } from '@/mixins/pageListenMixins'
|
||||
|
||||
export default {
|
||||
name: "pkgJoinWholesaler",
|
||||
components: {
|
||||
CitySelect
|
||||
},
|
||||
mixins: [pageListenMixins],
|
||||
data() {
|
||||
return {
|
||||
tips: "",
|
||||
@@ -233,7 +235,8 @@ export default {
|
||||
reviewStatus: null,
|
||||
stateTitle: "",
|
||||
stateType: "primary",
|
||||
isPass: false
|
||||
isPass: false,
|
||||
pageKeyId: Object.freeze('merchantApplyWholesaler')
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
<image class="title" :src="webUrl+'/20230220023931078168.png'" mode="scaleToFill"/>
|
||||
|
||||
<view class="item flex" :style="{'backgroundImage':`url(${webUrl}/20230224102624521679.png)`}"
|
||||
v-for="(item,index) in products" :key="index" @click="$global.navToGoods(item.id)">
|
||||
v-for="(item,index) in products" :key="index" @click="goGoods(item.id)">
|
||||
<image class="cover flex-0" style="margin-right: 20rpx" :src="item.image"
|
||||
mode="scaleToFill" v-if="index%2===0"/>
|
||||
|
||||
@@ -42,24 +42,35 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {getStoryDetail} from "@/api/product";
|
||||
|
||||
import {getStoryDetail} from '@/api/product'
|
||||
import { pageListenMixins } from '@/mixins/pageListenMixins'
|
||||
export default {
|
||||
name: "famousHot",
|
||||
name: 'FamousHot',
|
||||
mixins: [pageListenMixins],
|
||||
data() {
|
||||
return {
|
||||
webUrl: this.$VUE_APP_RESOURCES_URL,
|
||||
products: [],
|
||||
id: null,
|
||||
story: null
|
||||
story: null,
|
||||
pageKeyId: ''
|
||||
}
|
||||
},
|
||||
onLoad(option) {
|
||||
this.id = option.id;
|
||||
const id = option.id
|
||||
this.id = option.id
|
||||
this.pageKeyId = `countyFamousContent_id_${id}`
|
||||
getStoryDetail(this.id).then(({data}) => {
|
||||
this.story = data;
|
||||
this.products = data.products;
|
||||
this.story = data
|
||||
this.products = data.products
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
goGoods(id) {
|
||||
uni.navigateTo({
|
||||
url: `/pages/shop/GoodsCon/index?id=${id}&from=famous`
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -39,29 +39,32 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {countyFamous} from "@/api/product";
|
||||
import {getProducts} from "@/api/store";
|
||||
import {famousShareImage} from "@/api/share";
|
||||
import {mapGetters} from "vuex";
|
||||
import cookie from "@/utils/store/cookie";
|
||||
import {userBindParent} from "@/api/user";
|
||||
import {getUrlParam} from "@/utils/common.js";
|
||||
import {countyFamous} from '@/api/product'
|
||||
import {getProducts} from '@/api/store'
|
||||
import {famousShareImage} from '@/api/share'
|
||||
import {mapGetters} from 'vuex'
|
||||
import cookie from '@/utils/store/cookie'
|
||||
import {userBindParent} from '@/api/user'
|
||||
import {getUrlParam} from '@/utils/common.js'
|
||||
import { pageListenMixins } from '@/mixins/pageListenMixins'
|
||||
|
||||
export default {
|
||||
name: "famousList",
|
||||
name: 'FamousList',
|
||||
mixins: [pageListenMixins],
|
||||
data() {
|
||||
return {
|
||||
webUrl: this.$VUE_APP_RESOURCES_URL,
|
||||
keyword: "",
|
||||
keyword: '',
|
||||
page: 1,
|
||||
bannerList: [],
|
||||
dataList: [],
|
||||
navList: [],
|
||||
navIndex: 0,
|
||||
partnerId: null
|
||||
partnerId: null,
|
||||
pageKeyId: Object.freeze('countyFamousIndex')
|
||||
}
|
||||
},
|
||||
computed: mapGetters(["userInfo", "isLogin"]),
|
||||
computed: mapGetters(['userInfo', 'isLogin']),
|
||||
onShareAppMessage() {
|
||||
return new Promise(async (resolve, reject) => {
|
||||
const {status, data} = await famousShareImage();
|
||||
@@ -81,11 +84,11 @@ export default {
|
||||
let obj = uni.getEnterOptionsSync();
|
||||
if (options.scene != null || obj.query.scene != null) {
|
||||
let query = options ? decodeURIComponent(options.scene) : decodeURIComponent(obj.query.scene);
|
||||
this.partnerId = getUrlParam(query, "partnerId") || null;
|
||||
this.partnerId = getUrlParam(query, 'partnerId') || null;
|
||||
}
|
||||
}
|
||||
if (this.partnerId) {
|
||||
cookie.set("spread", this.partnerId);
|
||||
cookie.set('spread', this.partnerId);
|
||||
userBindParent({spread: parseInt(this.partnerId)});
|
||||
}
|
||||
|
||||
@@ -132,7 +135,7 @@ export default {
|
||||
},
|
||||
goStory() {
|
||||
uni.navigateTo({
|
||||
url: "/pkg_product/views/famousStory"
|
||||
url: '/pkg_product/views/famousStory'
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,39 +6,42 @@
|
||||
|
||||
<script>
|
||||
import {getStoryList} from "@/api/product";
|
||||
import { pageListenMixins } from '@/mixins/pageListenMixins'
|
||||
|
||||
export default {
|
||||
name: "famousStory",
|
||||
mixins: [pageListenMixins],
|
||||
data() {
|
||||
return {
|
||||
page: 1, // 当前页
|
||||
pages: 1, // 总页数
|
||||
list: []
|
||||
list: [],
|
||||
pageKeyId: Object.freeze('countyFamousContentList')
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
this.fetchData();
|
||||
this.fetchData()
|
||||
},
|
||||
onReachBottom() {
|
||||
if (this.page < this.pages) {
|
||||
this.page++;
|
||||
this.fetchData();
|
||||
this.page++
|
||||
this.fetchData()
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
fetchData() {
|
||||
getStoryList(this.page).then(({data}) => {
|
||||
this.pages = data.pages;
|
||||
this.pages = data.pages
|
||||
if (data.records.length > 0) {
|
||||
for (let i = 0; i < data.records.length; i++) {
|
||||
this.list.push(data.records[i]);
|
||||
this.list.push(data.records[i])
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
goHot(item) {
|
||||
uni.navigateTo({
|
||||
url: "/pkg_product/views/famousHot?id=" + item.id
|
||||
url: '/pkg_product/views/famousHot?id=' + item.id
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
:class="cIndex === 0 ? 'span12' : 'span8'"
|
||||
:src="item.image"
|
||||
mode="scaleToFill"
|
||||
@click="$global.navToGoods(item.id)"
|
||||
@click="goGoods(item.id)"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
@@ -46,13 +46,16 @@
|
||||
<script>
|
||||
// 节日专题
|
||||
import { getFestival } from '@/api/product'
|
||||
import { pageListenMixins } from '@/mixins/pageListenMixins'
|
||||
export default {
|
||||
name: 'Festival',
|
||||
name: 'FestivalPage',
|
||||
mixins: [pageListenMixins],
|
||||
data() {
|
||||
return {
|
||||
isLoad: false,
|
||||
topImage: '',
|
||||
contents: []
|
||||
contents: [],
|
||||
pageKeyId: Object.freeze('appContentFestival')
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
@@ -61,6 +64,13 @@ export default {
|
||||
this.topImage = data.topImage
|
||||
this.contents = data.contents
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
goGoods(id) {
|
||||
uni.navigateTo({
|
||||
url: `/pages/shop/GoodsCon/index?id=${id}&from=festival`
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -43,8 +43,10 @@
|
||||
import {
|
||||
customizedGiftContent
|
||||
} from '@/api/product'
|
||||
import { pageListenMixins } from '@/mixins/pageListenMixins'
|
||||
export default {
|
||||
name: 'GiftContent',
|
||||
mixins: [pageListenMixins],
|
||||
data() {
|
||||
return {
|
||||
data: {
|
||||
@@ -55,6 +57,7 @@ export default {
|
||||
mainImage: '',
|
||||
productList1: [],
|
||||
productList2: [],
|
||||
pageKeyId: ''
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -62,7 +65,9 @@ export default {
|
||||
uni.setNavigationBarTitle({
|
||||
title: options.name + '-' + '特色礼品'
|
||||
})
|
||||
this.getPageDataReq(options.id)
|
||||
const id = options.id
|
||||
this.pageKeyId = `customizedGiftContent_id_${id}`
|
||||
this.getPageDataReq(id)
|
||||
},
|
||||
methods: {
|
||||
getPageDataReq(id) {
|
||||
@@ -90,7 +95,7 @@ export default {
|
||||
return
|
||||
}
|
||||
uni.navigateTo({
|
||||
url: `/pages/shop/GoodsCon/index?id=${productId}`
|
||||
url: `/pages/shop/GoodsCon/index?id=${productId}&from=gift`
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
@@ -90,14 +90,17 @@
|
||||
import {
|
||||
customizedGift
|
||||
} from '@/api/product'
|
||||
import { pageListenMixins } from '@/mixins/pageListenMixins'
|
||||
export default {
|
||||
name: 'GiftList',
|
||||
mixins: [pageListenMixins],
|
||||
data() {
|
||||
return {
|
||||
provinceList: [],
|
||||
topBannerHtml: '',
|
||||
topBannerUrl: '',
|
||||
toggleStatus: false
|
||||
toggleStatus: false,
|
||||
pageKeyId: Object.freeze('customizedGiftIndex')
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
@@ -148,7 +151,7 @@ export default {
|
||||
return
|
||||
}
|
||||
uni.navigateTo({
|
||||
url: `/pages/shop/GoodsCon/index?id=${productId}`
|
||||
url: `/pages/shop/GoodsCon/index?id=${productId}&from=gift`
|
||||
})
|
||||
},
|
||||
toggleHandle(value) {
|
||||
|
||||
@@ -1,23 +1,26 @@
|
||||
<script>
|
||||
import {getICH} from "@/api/product";
|
||||
import {getICH} from '@/api/product'
|
||||
import { pageListenMixins } from '@/mixins/pageListenMixins'
|
||||
|
||||
export default {
|
||||
name: "heritage",
|
||||
name: 'HeritagePage',
|
||||
mixins: [pageListenMixins],
|
||||
data() {
|
||||
return {
|
||||
contents: [],
|
||||
topImage: '',
|
||||
backgroundImage: '',
|
||||
bgImgWidth: 0,
|
||||
pageKeyId: Object.freeze('ichIndex')
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
scale() {
|
||||
return 750 / this.bgImgWidth;
|
||||
return 750 / this.bgImgWidth
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
this.init();
|
||||
this.init()
|
||||
},
|
||||
methods: {
|
||||
init() {
|
||||
@@ -29,17 +32,15 @@ export default {
|
||||
this.calcPosition();
|
||||
})
|
||||
},
|
||||
|
||||
// 计算位置
|
||||
calcPosition() {
|
||||
this.contents?.forEach(item => {
|
||||
item.gx = item.x * this.scale;
|
||||
item.gy = item.y * this.scale;
|
||||
item.gx = item.x * this.scale
|
||||
item.gy = item.y * this.scale
|
||||
})
|
||||
},
|
||||
|
||||
goDetails(item) {
|
||||
if (!item.isLink) return;
|
||||
if (!item.isLink) return
|
||||
if (item.type === 1) {
|
||||
uni.navigateTo({
|
||||
url: '/pkg_product/views/heritageVideo?id=' + item.id
|
||||
@@ -57,16 +58,13 @@ export default {
|
||||
<template>
|
||||
<view class="pkg-product-heritage">
|
||||
<image style="width: 100%" :src="topImage" mode="widthFix"/>
|
||||
|
||||
<view class="main-box">
|
||||
<image style="width: 100%" :src="backgroundImage" mode="widthFix"/>
|
||||
|
||||
<view class="item" :style="{'left':item.gx+'rpx','top':item.gy+'rpx'}" v-for="(item,index) in contents"
|
||||
:key="index" @click="goDetails(item)">
|
||||
<image class="img-item" :src="item.image"/>
|
||||
<view class="title flex jc-center">{{ item.title }}</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -1,28 +1,32 @@
|
||||
<script>
|
||||
import {getICHDetails} from "@/api/product";
|
||||
import {getICHDetails} from '@/api/product'
|
||||
import { pageListenMixins } from '@/mixins/pageListenMixins'
|
||||
|
||||
export default {
|
||||
name: "heritageGoods",
|
||||
name: 'HeritageGoods',
|
||||
mixins: [pageListenMixins],
|
||||
data() {
|
||||
return {
|
||||
id: null,
|
||||
info: null,
|
||||
pageKeyId: ''
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
this.id = options.id;
|
||||
const id = options.id
|
||||
this.id = id
|
||||
this.pageKeyId = `ichContent_id_${id}`
|
||||
this.getDetails();
|
||||
},
|
||||
methods: {
|
||||
getDetails() {
|
||||
getICHDetails(this.id).then(({data}) => this.info = data);
|
||||
},
|
||||
|
||||
goGoods(id) {
|
||||
uni.navigateTo({
|
||||
url: "/pages/shop/GoodsCon/index?id=" + id
|
||||
url: '/pages/shop/GoodsCon/index?id=' + id + '&from=ich'
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -30,7 +34,6 @@ export default {
|
||||
<template>
|
||||
<view class="heritage-goods" v-if="info">
|
||||
<image class="page-bg" :src="info.backgroundImage" mode="widthFix"/>
|
||||
|
||||
<view class="list-box flex flex-wrap">
|
||||
<view class="item flex flex-col jc-between" v-for="(item,index) in info.products" :key="index"
|
||||
@click="goGoods(item.productId)">
|
||||
|
||||
@@ -1,21 +1,25 @@
|
||||
<script>
|
||||
import {getICHDetails} from "@/api/product";
|
||||
|
||||
import {getICHDetails} from '@/api/product'
|
||||
import { pageListenMixins } from '@/mixins/pageListenMixins'
|
||||
export default {
|
||||
name: "heritageVideo",
|
||||
name: 'HeritageVideo',
|
||||
mixins: [pageListenMixins],
|
||||
data() {
|
||||
return {
|
||||
id: null,
|
||||
info: null,
|
||||
pageKeyId: ''
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
this.id = options.id;
|
||||
this.getDetails();
|
||||
const id = options.id
|
||||
this.id = id
|
||||
this.pageKeyId = `ichContent_id_${id}`
|
||||
this.getDetails()
|
||||
},
|
||||
methods: {
|
||||
getDetails() {
|
||||
getICHDetails(this.id).then(({data}) => this.info = data);
|
||||
getICHDetails(this.id).then(({data}) => this.info = data)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -25,9 +29,6 @@ export default {
|
||||
<view class="heritage-video" v-if="info">
|
||||
<image class="page-bg" :src="info.backgroundImage" mode="widthFix"/>
|
||||
<video :src="info.video" autoplay show-center-play-btn/>
|
||||
|
||||
<!-- <video id="myVideo" src="https://qiniu-web-assets.dcloud.net.cn/unidoc/zh/2minute-demo.mp4"-->
|
||||
<!-- autoplay controls></video>-->
|
||||
</view>
|
||||
</template>
|
||||
|
||||
|
||||
@@ -1,30 +1,34 @@
|
||||
<script>
|
||||
import {getHomestay} from "@/api/product";
|
||||
|
||||
// 民宿专题
|
||||
import {getHomestay} from '@/api/product'
|
||||
import { pageListenMixins } from '@/mixins/pageListenMixins'
|
||||
export default {
|
||||
name: "homestay", // 民宿专题
|
||||
name: 'HomestayPage',
|
||||
mixins: [pageListenMixins],
|
||||
data() {
|
||||
return {
|
||||
webUrl: this.$VUE_APP_RESOURCES_URL,
|
||||
topImage: '',
|
||||
contents: [],
|
||||
id: null
|
||||
id: null,
|
||||
pageKeyId: ''
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
this.id = options.id;
|
||||
|
||||
const id = options.id
|
||||
this.id = id
|
||||
this.pageKeyId = `appContentHomestay_id_${id}`
|
||||
getHomestay(this.id).then(({data}) => {
|
||||
this.topImage = data.topImage;
|
||||
this.contents = data.contents;
|
||||
this.topImage = data.topImage
|
||||
this.contents = data.contents
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
goInnDetail(item) {
|
||||
uni.navigateTo({
|
||||
url: `/pagesInn/inn/innHome?id=${item.id}`
|
||||
url: `/pagesInn/inn/innHome?id=${item.id}&from=homestay`
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
<script>
|
||||
import {getSeason, getSeasonPoster} from "@/api/product";
|
||||
import cookie from "@/utils/store/cookie";
|
||||
import {getUrlParam} from "@/utils/common.js";
|
||||
import {getSeason, getSeasonPoster} from '@/api/product'
|
||||
import cookie from '@/utils/store/cookie'
|
||||
import {getUrlParam} from '@/utils/common.js'
|
||||
import { pageListenMixins } from '@/mixins/pageListenMixins'
|
||||
|
||||
export default {
|
||||
mixins: [pageListenMixins],
|
||||
data() {
|
||||
return {
|
||||
webUrl: this.$VUE_APP_RESOURCES_URL,
|
||||
@@ -12,15 +14,18 @@ export default {
|
||||
info: null,
|
||||
current: 0,
|
||||
showShare: false,
|
||||
posterUrl: "", // 分享海报
|
||||
posterUrl: '', // 分享海报
|
||||
pageKeyId: ''
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
if (options.id) {
|
||||
this.id = options.id || null;
|
||||
this.partnerId = options.partnerId || null;
|
||||
const id = options.id
|
||||
if (id) {
|
||||
this.id = id || null
|
||||
this.pageKeyId = `seasonalFoodContent_id_${id}`
|
||||
this.partnerId = options.partnerId || null
|
||||
} else {
|
||||
let obj = uni.getEnterOptionsSync();
|
||||
const obj = uni.getEnterOptionsSync()
|
||||
if (options.scene || obj.query.scene) {
|
||||
let query = options ? decodeURIComponent(options.scene) : decodeURIComponent(obj.query.scene);
|
||||
this.id = getUrlParam(query, "id") || null;
|
||||
@@ -131,7 +136,12 @@ export default {
|
||||
}
|
||||
})
|
||||
},
|
||||
},
|
||||
goGoods(id) {
|
||||
uni.navigateTo({
|
||||
url: `/pages/shop/GoodsCon/index?id=${id}&from=season`
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -168,7 +178,7 @@ export default {
|
||||
<image class="bg-img" :src="info.productImage" mode="widthFix"/>
|
||||
<!-- <scroll-view scroll-y class="product-list" :style="{backgroundImage:'url(' + info.productImage + ')'}">-->
|
||||
<scroll-view scroll-y class="product-list">
|
||||
<image class="item" :src="item.image" mode="widthFix" @click="$global.navToGoods(item.id)"
|
||||
<image class="item" :src="item.image" mode="widthFix" @click="goGoods(item.id)"
|
||||
v-for="(item,index) in info.products" :key="index"/>
|
||||
</scroll-view>
|
||||
</view>
|
||||
|
||||
@@ -1,31 +1,34 @@
|
||||
<script>
|
||||
import {seasonHomeData} from "@/api/product";
|
||||
import {seasonHomeData} from '@/api/product'
|
||||
import { pageListenMixins } from '@/mixins/pageListenMixins'
|
||||
|
||||
export default {
|
||||
mixins: [pageListenMixins],
|
||||
data() {
|
||||
return {
|
||||
webUrl: this.$VUE_APP_RESOURCES_URL,
|
||||
typeList: ["时令果蔬", "水产海鲜", "肉禽蛋白", "全部分类"],
|
||||
typeList: ['时令果蔬', '水产海鲜', '肉禽蛋白', '全部分类'],
|
||||
list: [],
|
||||
typeIndex: 0
|
||||
typeIndex: 0,
|
||||
pageKeyId: Object.freeze('seasonalFoodIndex')
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
this.init();
|
||||
this.init()
|
||||
},
|
||||
methods: {
|
||||
changeType(index){
|
||||
this.typeIndex=index
|
||||
},
|
||||
init() {
|
||||
seasonHomeData().then(({data}) => this.list = data.seasonalFoodType || []);
|
||||
seasonHomeData().then(({data}) => this.list = data.seasonalFoodType || [])
|
||||
},
|
||||
goDetail() {
|
||||
uni.navigateTo({
|
||||
url: "/pkg_product/views/season?id=" + this.list[this.typeIndex].contents[0].id
|
||||
})
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@@ -156,26 +156,27 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import CountDownUnit from "@/pkg_product/components/CountDownUnit.vue";
|
||||
import {getSeckillRule, getSeckillTopList, getYxStoreSeckillIndex, getYxStoreSeckillPageList} from "@/api/goods";
|
||||
import {secKillShareImage} from "@/api/share";
|
||||
import {mapGetters} from "vuex";
|
||||
import cookie from "@/utils/store/cookie";
|
||||
import {userBindParent} from "@/api/user";
|
||||
import {getUrlParam} from "@/utils/common.js";
|
||||
import CountDownUnit from '@/pkg_product/components/CountDownUnit.vue'
|
||||
import {getSeckillRule, getSeckillTopList, getYxStoreSeckillIndex, getYxStoreSeckillPageList} from '@/api/goods'
|
||||
import {secKillShareImage} from '@/api/share'
|
||||
import {mapGetters} from 'vuex'
|
||||
import cookie from '@/utils/store/cookie'
|
||||
import {userBindParent} from '@/api/user'
|
||||
import {getUrlParam} from '@/utils/common.js'
|
||||
import NoGoodData from '@/components/good/NoData'
|
||||
import { pageListenMixins } from '@/mixins/pageListenMixins'
|
||||
|
||||
export default {
|
||||
name: "seckill",
|
||||
name: 'Seckill',
|
||||
components: {
|
||||
CountDownUnit,
|
||||
NoGoodData
|
||||
},
|
||||
mixins: [pageListenMixins],
|
||||
data() {
|
||||
return {
|
||||
webUrl: this.$VUE_APP_RESOURCES_URL,
|
||||
showRule: false,
|
||||
|
||||
seckillTime: [],
|
||||
seckillTimeIndex: 0,
|
||||
page: 1,
|
||||
@@ -185,13 +186,14 @@ export default {
|
||||
timeId: null,
|
||||
nextList: [],
|
||||
ruleContent: null,
|
||||
partnerId: null
|
||||
partnerId: null,
|
||||
pageKeyId: Object.freeze('seckillIndex')
|
||||
}
|
||||
},
|
||||
computed: mapGetters(["userInfo", "isLogin"]),
|
||||
computed: mapGetters(['userInfo', 'isLogin']),
|
||||
onShareAppMessage() {
|
||||
return new Promise(async (resolve, reject) => {
|
||||
const {status, data} = await secKillShareImage();
|
||||
const {status, data} = await secKillShareImage()
|
||||
if (status === 200) {
|
||||
resolve({
|
||||
title: '探寻有趣有味的生活方式',
|
||||
@@ -203,91 +205,78 @@ export default {
|
||||
},
|
||||
onLoad(options) {
|
||||
if (options.partnerId) {
|
||||
this.partnerId = options.partnerId || null;
|
||||
this.partnerId = options.partnerId || null
|
||||
} else {
|
||||
let obj = uni.getEnterOptionsSync();
|
||||
let obj = uni.getEnterOptionsSync()
|
||||
if (options.scene != null || obj.query.scene != null) {
|
||||
let query = options ? decodeURIComponent(options.scene) : decodeURIComponent(obj.query.scene);
|
||||
this.partnerId = getUrlParam(query, "partnerId") || null;
|
||||
let query = options ? decodeURIComponent(options.scene) : decodeURIComponent(obj.query.scene)
|
||||
this.partnerId = getUrlParam(query, 'partnerId') || null
|
||||
}
|
||||
}
|
||||
if (this.partnerId) {
|
||||
cookie.set("spread", this.partnerId);
|
||||
userBindParent({spread: parseInt(this.partnerId)});
|
||||
cookie.set('spread', this.partnerId)
|
||||
userBindParent({spread: parseInt(this.partnerId)})
|
||||
}
|
||||
|
||||
this.fetchSession();
|
||||
getSeckillRule().then(({data}) => this.ruleContent = data);
|
||||
getSeckillTopList(1, 10).then(({data}) => this.topList = data.records);
|
||||
this.fetchSession()
|
||||
getSeckillRule().then(({data}) => this.ruleContent = data)
|
||||
getSeckillTopList(1, 10).then(({data}) => this.topList = data.records)
|
||||
},
|
||||
onReachBottom() {
|
||||
if (this.endReach) return;
|
||||
this.page++;
|
||||
this.fetchList();
|
||||
if (this.endReach) return
|
||||
this.page++
|
||||
this.fetchList()
|
||||
},
|
||||
methods: {
|
||||
changeRule(){
|
||||
this.showRule=!this.showRule
|
||||
},
|
||||
navChange(index) {
|
||||
if (this.seckillTimeIndex === index) return;
|
||||
this.seckillTimeIndex = index;
|
||||
this.page = 1;
|
||||
this.list = [];
|
||||
this.timeId = this.seckillTime[this.seckillTimeIndex].id;
|
||||
this.endReach = false;
|
||||
if (this.seckillTimeIndex === index) return
|
||||
this.seckillTimeIndex = index
|
||||
this.page = 1
|
||||
this.list = []
|
||||
this.timeId = this.seckillTime[this.seckillTimeIndex].id
|
||||
this.endReach = false
|
||||
this.fetchList()
|
||||
},
|
||||
|
||||
fetchSession() {
|
||||
getYxStoreSeckillIndex().then(({
|
||||
data
|
||||
}) => {
|
||||
if (data.seckillTime.length === 0) return;
|
||||
|
||||
this.seckillTime = data.seckillTime.filter(item => item.status > 0);
|
||||
this.timeId = this.seckillTime[this.seckillTimeIndex].id;
|
||||
this.fetchList();
|
||||
|
||||
getYxStoreSeckillIndex().then(({ data }) => {
|
||||
if (data.seckillTime.length === 0) return
|
||||
this.seckillTime = data.seckillTime.filter(item => item.status > 0)
|
||||
this.timeId = this.seckillTime[this.seckillTimeIndex].id
|
||||
this.fetchList()
|
||||
if (this.seckillTime.length > this.seckillTimeIndex) {
|
||||
getYxStoreSeckillPageList(1, 10, this.seckillTime[this.seckillTimeIndex + 1].id).then(({
|
||||
data
|
||||
}) => {
|
||||
this.nextList = data;
|
||||
getYxStoreSeckillPageList(1, 10, this.seckillTime[this.seckillTimeIndex + 1].id).then(({ data }) => {
|
||||
this.nextList = data
|
||||
})
|
||||
}
|
||||
});
|
||||
})
|
||||
},
|
||||
|
||||
fetchList() {
|
||||
getYxStoreSeckillPageList(this.page, 10, this.timeId).then(({
|
||||
data
|
||||
}) => {
|
||||
getYxStoreSeckillPageList(this.page, 10, this.timeId).then(({ data }) => {
|
||||
if (data.length > 0) {
|
||||
data.map(item => this.list.push(item));
|
||||
} else {
|
||||
this.endReach = true;
|
||||
this.endReach = true
|
||||
}
|
||||
});
|
||||
})
|
||||
},
|
||||
|
||||
goGoodsConByProductID(item, status) {
|
||||
if (status > 1) {
|
||||
uni.showToast({
|
||||
title: "此商品秒杀活动还未开始哦",
|
||||
icon: "none"
|
||||
title: '此商品秒杀活动还未开始哦',
|
||||
icon: 'none'
|
||||
})
|
||||
return;
|
||||
return
|
||||
}
|
||||
|
||||
this.$yrouter.push({
|
||||
path: '/pages/shop/GoodsCon/index',
|
||||
query: {
|
||||
id: item.productId,
|
||||
activityId: item.id,
|
||||
from: "kill"
|
||||
from: 'kill'
|
||||
}
|
||||
});
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -47,9 +47,10 @@
|
||||
|
||||
<script>
|
||||
import {bankList, addBankCard} from "@/api/user";
|
||||
import { pageListenMixins } from '@/mixins/pageListenMixins'
|
||||
|
||||
export default {
|
||||
components: {},
|
||||
mixins: [pageListenMixins],
|
||||
data: function () {
|
||||
return {
|
||||
name: "",
|
||||
@@ -59,7 +60,8 @@ export default {
|
||||
bankList: [],
|
||||
banks: [],
|
||||
index: 0,
|
||||
showPicker: false
|
||||
showPicker: false,
|
||||
pageKeyId: Object.freeze('userBankCardEdit')
|
||||
};
|
||||
},
|
||||
watch: {},
|
||||
|
||||
@@ -56,8 +56,10 @@
|
||||
import MescrollMixins from "@/mixins/mescroll-mixins.js";
|
||||
import MescrollBody from "@/components/mescroll-uni/mescroll-body.vue";
|
||||
import {getBank, postCashInfo, bankCardList, deleteBankCard} from "@/api/user";
|
||||
import { pageListenMixins } from '@/mixins/pageListenMixins'
|
||||
|
||||
export default {
|
||||
mixins: [pageListenMixins],
|
||||
data() {
|
||||
return {
|
||||
list: [],
|
||||
@@ -77,7 +79,8 @@ export default {
|
||||
},
|
||||
isSelectMode: false,
|
||||
webUrl: this.$VUE_APP_RESOURCES_URL,
|
||||
bgColor: ["#FD574B", "#0DC5C5", "#3F57DA", "#FF4F48"]
|
||||
bgColor: ["#FD574B", "#0DC5C5", "#3F57DA", "#FF4F48"],
|
||||
pageKeyId: Object.freeze('userBankCardIndex')
|
||||
}
|
||||
},
|
||||
components: {
|
||||
|
||||
@@ -25,16 +25,17 @@ import sendVerifyCode from "@/mixins/SendVerifyCode";
|
||||
import {required, alpha_num, chs_phone} from "@/utils/validate";
|
||||
import {validatorDefaultCatch} from "@/utils/dialog";
|
||||
import {registerVerify, bindingPhoneByInput} from "@/api/user";
|
||||
import { pageListenMixins } from '@/mixins/pageListenMixins'
|
||||
|
||||
export default {
|
||||
name: "BindingPhone",
|
||||
components: {},
|
||||
props: {},
|
||||
mixins: [pageListenMixins],
|
||||
data: function () {
|
||||
return {
|
||||
webUrl: this.$VUE_APP_RESOURCES_URL,
|
||||
captcha: "",
|
||||
phone: "" //手机号
|
||||
phone: "",
|
||||
pageKeyId: Object.freeze('userConfigPhone')
|
||||
};
|
||||
},
|
||||
mixins: [sendVerifyCode],
|
||||
|
||||
@@ -12,17 +12,20 @@
|
||||
import SubSection from '@/components/SubSection.vue'
|
||||
import Coupons from '../components/Coupons.vue'
|
||||
import {getCouponsUser} from '@/api/user'
|
||||
import { pageListenMixins } from '@/mixins/pageListenMixins'
|
||||
|
||||
export default {
|
||||
name: "myCoupons",
|
||||
components: {SubSection, Coupons},
|
||||
mixins: [pageListenMixins],
|
||||
data() {
|
||||
return {
|
||||
webUrl: this.$VUE_APP_RESOURCES_URL,
|
||||
current: 0,
|
||||
canUse: 0,
|
||||
notUse: 0,
|
||||
list: []
|
||||
list: [],
|
||||
pageKeyId: Object.freeze('userCouponsIndex')
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
|
||||
@@ -126,9 +126,11 @@
|
||||
import {getProductList, getStoreList, getVideoList, removeFavorite} from "@/api/favorite";
|
||||
import {postCartAdd} from "@/api/store";
|
||||
import CheckboxIcon from "@/components/CheckboxIcon.vue";
|
||||
import { pageListenMixins } from '@/mixins/pageListenMixins'
|
||||
|
||||
export default {
|
||||
components: {CheckboxIcon},
|
||||
mixins: [pageListenMixins],
|
||||
data() {
|
||||
return {
|
||||
ready: false,
|
||||
@@ -145,6 +147,7 @@ export default {
|
||||
productList: [],
|
||||
storeList: [],
|
||||
videoList: [],
|
||||
pageKeyId: Object.freeze('userCollectionIndex')
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
|
||||
@@ -45,14 +45,17 @@ import sendVerifyCode from "@/mixins/SendVerifyCode";
|
||||
import { required, alpha_num, chs_phone } from "@/utils/validate";
|
||||
import { validatorDefaultCatch } from "@/utils/dialog";
|
||||
import { getUserInfo, registerVerify, bindingPhone,modifyUserPayPwd } from "@/api/user";
|
||||
import { pageListenMixins } from '@/mixins/pageListenMixins'
|
||||
|
||||
export default {
|
||||
mixins: [pageListenMixins],
|
||||
data() {
|
||||
return {
|
||||
webUrl: this.$VUE_APP_RESOURCES_URL,
|
||||
captcha: "",
|
||||
phone:'',
|
||||
payPwd:''
|
||||
payPwd:'',
|
||||
pageKeyId: Object.freeze('userConfigPasswordPay')
|
||||
}
|
||||
},
|
||||
mixins: [sendVerifyCode],
|
||||
|
||||
@@ -76,12 +76,14 @@ import {mapGetters} from "vuex";
|
||||
import {isWeixin, trim, uploadImage} from "@/utils";
|
||||
import {postUserEdit} from "@/api/user";
|
||||
import ImageCropper from "@/pkg_user/components/invinbg-image-cropper/invinbg-image-cropper.vue";
|
||||
import { pageListenMixins } from '@/mixins/pageListenMixins'
|
||||
|
||||
export default {
|
||||
name: "PersonalData",
|
||||
components: {
|
||||
ImageCropper
|
||||
},
|
||||
mixins: [pageListenMixins],
|
||||
data() {
|
||||
return {
|
||||
webUrl: this.$VUE_APP_RESOURCES_URL,
|
||||
@@ -92,6 +94,7 @@ export default {
|
||||
userIndex: 0,
|
||||
tempFilePath: '',
|
||||
cropFilePath: '',
|
||||
pageKeyId: Object.freeze('userConfig')
|
||||
};
|
||||
},
|
||||
computed: mapGetters(["userInfo"]),
|
||||
|
||||
@@ -79,8 +79,10 @@ import { getBank, bankCardList, postCashInfo } from "@/api/user";
|
||||
import NP from "number-precision";
|
||||
import uniPopup from '@/components/uni-popup/uni-popup.vue';
|
||||
import blPaymentPasswordInput from '@/components/blPaymentPasswordInput.vue';
|
||||
import { pageListenMixins } from '@/mixins/pageListenMixins'
|
||||
|
||||
export default {
|
||||
mixins: [pageListenMixins],
|
||||
data() {
|
||||
return {
|
||||
webUrl: this.$VUE_APP_RESOURCES_URL,
|
||||
@@ -94,7 +96,8 @@ export default {
|
||||
gdAmount: 0, //固定手续费
|
||||
gdLimit: 0, //最低固定费率额度
|
||||
feeRate: 0, //手续费费率
|
||||
remark: "" //提现说明
|
||||
remark: "", //提现说明
|
||||
pageKeyId: Object.freeze('userExtractIndex')
|
||||
}
|
||||
},
|
||||
components: {
|
||||
|
||||
@@ -33,14 +33,17 @@
|
||||
|
||||
<script>
|
||||
import {payoutLog} from "@/api/user";
|
||||
import { pageListenMixins } from '@/mixins/pageListenMixins'
|
||||
|
||||
export default {
|
||||
mixins: [pageListenMixins],
|
||||
data() {
|
||||
return {
|
||||
webUrl: this.$VUE_APP_RESOURCES_URL,
|
||||
ready: false,
|
||||
list: [],
|
||||
page: 1,
|
||||
pageKeyId: Object.freeze('userExtractRecords')
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
||||
@@ -57,11 +57,13 @@ import {getAttract, investment, saveAttract} from "@/api/shop.js";
|
||||
// import {
|
||||
// queryByType
|
||||
// } from "@/api/public";
|
||||
import { pageListenMixins } from '@/mixins/pageListenMixins'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
CitySelect
|
||||
},
|
||||
mixins: [pageListenMixins],
|
||||
data() {
|
||||
return {
|
||||
webUrl: this.$VUE_APP_RESOURCES_URL,
|
||||
@@ -80,7 +82,8 @@ export default {
|
||||
investmentTopImage: null,
|
||||
investmentMainImage: null,
|
||||
investmentBottomImage: null,
|
||||
investmentTitle: ""
|
||||
investmentTitle: "",
|
||||
pageKeyId: Object.freeze('investmentIndex')
|
||||
}
|
||||
},
|
||||
onLoad: function () {
|
||||
|
||||
@@ -22,32 +22,35 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {investmentInfo} from "@/api/shop";
|
||||
|
||||
import {investmentInfo} from '@/api/shop'
|
||||
import { pageListenMixins } from '@/mixins/pageListenMixins'
|
||||
export default {
|
||||
name: "project",
|
||||
name: 'ProjectDetail',
|
||||
mixins: [pageListenMixins],
|
||||
data() {
|
||||
return {
|
||||
webUrl: this.$VUE_APP_RESOURCES_URL,
|
||||
id: null,
|
||||
info: null
|
||||
info: null,
|
||||
pageKeyId: ''
|
||||
}
|
||||
},
|
||||
onLoad(option) {
|
||||
this.id = option.id;
|
||||
this.init();
|
||||
const id = option.id
|
||||
this.id = id
|
||||
this.pageKeyId = `investmentInfo_id_${id}`
|
||||
this.init()
|
||||
},
|
||||
methods: {
|
||||
init() {
|
||||
investmentInfo(this.id).then(({data}) => this.info = data);
|
||||
investmentInfo(this.id).then(({data}) => this.info = data)
|
||||
},
|
||||
|
||||
viewFile(item) {
|
||||
if (item.suffix === "pdf") {
|
||||
if (item.suffix === 'pdf') {
|
||||
uni.downloadFile({
|
||||
url: item.attachment,
|
||||
success: res => {
|
||||
let filePath = res.tempFilePath;
|
||||
const filePath = res.tempFilePath
|
||||
uni.openDocument({
|
||||
filePath
|
||||
})
|
||||
|
||||
@@ -20,26 +20,29 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {investmentInfo, investmentList} from "@/api/shop";
|
||||
import {investmentInfo, investmentList} from '@/api/shop'
|
||||
import { pageListenMixins } from '@/mixins/pageListenMixins'
|
||||
|
||||
export default {
|
||||
name: "projectList",
|
||||
name: 'ProjectList',
|
||||
mixins: [pageListenMixins],
|
||||
data() {
|
||||
return {
|
||||
webUrl: this.$VUE_APP_RESOURCES_URL,
|
||||
page: 1, // 当前页
|
||||
keyword: "", // 搜索词
|
||||
keyword: '', // 搜索词
|
||||
pages: 0, // 总页数
|
||||
list: [],
|
||||
os: ""
|
||||
os: '',
|
||||
pageKeyId: Object.freeze('investmentList')
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getOS();
|
||||
this.getData();
|
||||
this.getOS()
|
||||
this.getData()
|
||||
},
|
||||
onReachBottom() {
|
||||
if (this.pages >= this.page) this.getData();
|
||||
if (this.pages >= this.page) this.getData()
|
||||
},
|
||||
methods: {
|
||||
getOS() {
|
||||
@@ -47,39 +50,35 @@ export default {
|
||||
success: result => this.os = result.osName
|
||||
})
|
||||
},
|
||||
|
||||
search() {
|
||||
this.list = [];
|
||||
this.page = 1;
|
||||
this.getData();
|
||||
this.list = []
|
||||
this.page = 1
|
||||
this.getData()
|
||||
},
|
||||
|
||||
getData() {
|
||||
investmentList(this.page, this.keyword).then(({data}) => {
|
||||
this.pages = data.pages;
|
||||
this.page++;
|
||||
this.pages = data.pages
|
||||
this.page++
|
||||
if (data.records.length > 0) {
|
||||
data.records.map(item => {
|
||||
this.list.push(item);
|
||||
this.list.push(item)
|
||||
})
|
||||
}
|
||||
});
|
||||
})
|
||||
},
|
||||
|
||||
getDetail(id) {
|
||||
investmentInfo(id).then(({data}) => {
|
||||
const file = data.contents[0];
|
||||
if (file.suffix === "pdf" && this.os === "android") {
|
||||
if (file.suffix === 'pdf' && this.os === 'android') {
|
||||
this.viewPdf(file.attachmentFiles[0])
|
||||
} else {
|
||||
let path = file.attachmentFiles[0];
|
||||
uni.navigateTo({
|
||||
url: "/pkg_common/views/pdf?path=" + encodeURI(path)
|
||||
url: '/pkg_common/views/pdf?path=' + encodeURI(path) + '&id=' + id
|
||||
})
|
||||
}
|
||||
});
|
||||
})
|
||||
},
|
||||
|
||||
viewPdf(url) {
|
||||
uni.downloadFile({
|
||||
url,//可以是后台传过来的路径
|
||||
@@ -87,13 +86,13 @@ export default {
|
||||
const filePath = res.tempFilePath
|
||||
uni.openDocument({
|
||||
filePath,
|
||||
fileType: "pdf",
|
||||
fileType: 'pdf',
|
||||
success: result => {
|
||||
//成功
|
||||
},
|
||||
fail: err => {
|
||||
uni.showModal({
|
||||
title: "openDocument fail",
|
||||
title: 'openDocument fail',
|
||||
content: JSON.stringify(err)
|
||||
})
|
||||
}
|
||||
@@ -101,7 +100,7 @@ export default {
|
||||
},
|
||||
fail: err => {
|
||||
uni.showModal({
|
||||
title: "downloadFile fail",
|
||||
title: 'downloadFile fail',
|
||||
content: JSON.stringify(err)
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user