Commit d7f88160 by 李嘉林

Merge branch 'nativehome_tst' of http://code.mayi888.com/chengmo/mayi-mp-shop into nativehome_tst

parents 59ce73b8 5c717289
import { requestPOST } from "@/utils/request.js";
export default {
// 获取文章详情
getArticleInfo(params) {
return requestPOST(`${process.env.OLSHOP_URL}/article/getArticleInfo/${params}`, {});
},
//POST /article/saveReview 文章评论
saveReview(data) {
return requestPOST(`${process.env.OLSHOP_URL}/article/saveReview`, { data });
},
//POST 文章点赞/取消点赞
addLike(data) {
return requestPOST(`${process.env.OLSHOP_URL}/article/fabulous`, { data });
},
//POST 查询评论列表分页
getReviews(data) {
return requestPOST(`${process.env.OLSHOP_URL}/article/getReviews`, { data });
},
}
\ No newline at end of file
......@@ -14,17 +14,6 @@
"pages/tabBar4/main",
"pages/changeAdr/main",
"pages/downFile/main",
"pages/wo/writeInformation/main",
"pages/wo/improveInformation/main",
"pages/wo/editPicture/main",
"pages/wo/showPassCheck/main",
"pages/wo/workRegion/main",
"pages/wo/checkHistory/main",
"pages/wo/diningPlace/main",
"pages/wo/reportTheLoss/main",
"pages/wo/verification/main",
"pages/wo/vehicleApplication/main",
"pages/wo/fillInformation/main",
"pages/wxArticle/main"
],
"usingComponents": {},
......
......@@ -31,6 +31,8 @@
<script>
import { getUserLocation } from "../../utils/wxIndex.js";
import { getWxContact } from "@/api/wxContact.js";
const app = getApp();
const { log } = app;
export default {
data() {
......@@ -45,7 +47,7 @@ export default {
options.longitude = res.longitude;
options.latitude = res.latitude;
this.sessionFrom = JSON.stringify(options);
console.log('sessionFrom', this.sessionFrom)
log.info('sessionFrom', this.sessionFrom)
});
},
onShow() {
......@@ -63,7 +65,7 @@ export default {
},
methods: {
myOpeChat() {
console.log('okokok', this.result.whetherOpenCustomerUrl, this.result.whetherOpenCustomerSuiteId);
log.info('okokok', this.result.whetherOpenCustomerUrl, this.result.whetherOpenCustomerSuiteId);
if (this.result.whetherOpenCustomerService == 0) {
wx.showModal({
title: '提示',
......@@ -73,19 +75,28 @@ export default {
if (wx.openCustomerServiceChat) {
wx.openCustomerServiceChat({
extInfo: {
// url: this.result.whetherOpenCustomerUrl.replace(/\s*/g,"").toString()
url: this.result.whetherOpenCustomerUrl
},
// corpId: this.result.whetherOpenCustomerSuiteId.replace(/\s*/g,"").toString(),
corpId: this.result.whetherOpenCustomerSuiteId,
success(res) {
console.log(res);
log.info(res);
},
fail(res) {
console.log(res);
log.info(res);
if (res.errCode == 6 && res.errMsg == 'openCustomerServiceChat:fail not bind') {
wx.showModal({
title: '提示',
content: '您未在小程序管理后台的「功能-客服-微信客服」处,绑定对应的企业ID'
})
} else {
wx.showModal({
title: '提示',
content: '系统繁忙,请稍后重试'
})
}
}
})
} else {
wx.showModal({
......
import Vue from 'vue'
import App from './index'
const app = new Vue(App)
app.$mount()
\ No newline at end of file
{
"backgroundTextStyle": "light",
"navigationBarBackgroundColor": "#fff",
"navigationBarTitleText": "文章详情",
"navigationBarTextStyle": "black",
"usingComponents": {
}
}
\ No newline at end of file
// 遮罩层提示
// 用于微信右上角分享提示
<template>
<div>
<div class="showGuide" v-show="showGuide" @click="showGuide=false">
<div class="info">{{message}}</div>
</div>
<div class="newShowGuide" v-show="newShowGuide" @click="newShowGuide=false">
<div class="showImg">
<img src="https://mayi-newshop.oss-cn-shanghai.aliyuncs.com/product/Eijyd34FmA.png?x-oss-process=image/resize,m_pad,limit_0,w_400,h_400" alt="">
</div>
</div>
</div>
</template>
<script>
export default {
data() {
return {
showGuide: false,
message: "请点击右上角【···】分享给好友",
newShowGuide:false,
};
},
methods: {
open(message) {
if(message){
this.message = message;
this.showGuide = true;
}else{
this.newShowGuide = true
}
}
}
};
</script>
<style lang="scss" scoped>
.showGuide,.newShowGuide {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.8);
z-index: 9999;
.info {
font-size: 20px;
color: #fff;
font-weight: bold;
width: 50%;
text-align: center;
line-height: 30px;
margin: 0 auto;
margin-top: 30px;
}
.showImg{
margin: 11px 0 0 26px;
img{
width: 281px;
height: 188px;
}
}
}
</style>
\ No newline at end of file
......@@ -33,13 +33,35 @@ Component({
getListFinish : false
},
ready(){
this.queryBuyingShowList(0);
// this.queryBuyingShowList(0);
console.log(this.data.datas,'dtdt');
this.onceTabHandle()
},
/**
* 组件的方法列表
*/
methods: {
onceTabHandle(){
let active = 0
let obj = {}
let list = this.data.datas.componentData.list
for (let index = 0; index < list.length; index++) {
if(list[index].show == true){
active = index
obj = list[index]
break
}
}
if (Object.prototype.toString.call(obj) === '[object Object]' && JSON.stringify(obj) !== '{}') {
this.setData({
tabIndex: active,
tabId: obj.id,
getListFinish :false
})
}
this.queryBuyingShowList(0)
},
tabHandle(e){
let index = e.currentTarget.dataset.index
let item = e.currentTarget.dataset.item
......
<!--static/nativeComponents/SharePicture/index.wxml-->
<wxs src="./index.wxs" module="computed" />
<view class="waterfall-content" style="background-color:{{datas.componentData['backgroundColor']}};padding-top:{{datas.componentData.paddingList[0]['value'] * 2}}rpx;padding-bottom:{{datas.componentData.paddingList[1]['value'] * 2}}rpx;padding-left:{{datas.componentData.paddingList[2]['value'] * 2}}rpx;padding-right:{{datas.componentData.paddingList[3]['value'] * 2}}rpx">
<view class="tab-wrap">
<view class="tab-wrap" wx:if="{{computed.showFlag(datas.componentData['list'])}}">
<view class="tab-item {{tabIndex == index && 'checked'}}" wx:for="{{datas.componentData['list']}}" :key="index" wx:if="{{item.show}}" bindtap="tabHandle" data-index="{{index}}" data-item="{{item}}" z>
<text>{{item.name}}</text>
</view>
......
function showFlag(data) {
if(data != undefined){
var flagcount = 0
for(var i = 0;i<data.length;i++){
if(data[i].show == true){
flagcount ++
}
}
if(flagcount <= 1){
return false
}else{
return true
}
}else{
return false
}
}
module.exports.showFlag = showFlag;
\ No newline at end of file
......@@ -60,8 +60,8 @@ function trackStyle(data) {
function lineStyle(data) {
return style({
width: utils.addUnit(data.lineWidth - 16),
transform: 'translateX(' + data.lineOffsetLeft + 'px)',
'-webkit-transform': 'translateX(' + data.lineOffsetLeft + 'px)',
transform: 'translateX(' + (data.lineOffsetLeft +16) + 'px)',
'-webkit-transform': 'translateX(' + (data.lineOffsetLeft + 8) + 'px)',
'background-color': data.color,
height: data.lineHeight !== -1 ? utils.addUnit(data.lineHeight) : null,
'border-radius':
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment