Commit 9b99027a by MYzhangweihao

ad

parent 4ed0db44
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
<view class="tikcos_logo_box"> <view class="tikcos_logo_box">
<view class="d-flex just-content-center align-items-center"> <view class="d-flex just-content-center align-items-center">
<view class="tikcos_name">Weiit提供技术支持</view> <view class="tikcos_name">Weiit提供技术支持</view>
<!-- <view class="tikcos_name">sky企得力提供技术支持</view> -->
</view> </view>
</view> </view>
</template> </template>
......
<template> <template>
<view v-if="show" class="uni-noticebar" :style="{ backgroundColor: backgroundColor }" @click="onClick"> <view v-if="show" class="uni-noticebar" :style="{ backgroundColor: backgroundColor }" @click="onClick">
<!-- #ifdef MP-ALIPAY --> <!-- #ifdef MP-ALIPAY -->
<view v-if="showClose === true || showClose === 'true'" class="uni-noticebar-close uni-cursor-point" @click="close"> <view v-if="showClose === true || showClose === 'true'" class="uni-noticebar-close uni-cursor-point"
@click="close">
<uni-icons type="closeempty" :color="color" size="12" /> <uni-icons type="closeempty" :color="color" size="12" />
</view> </view>
<view v-if="showIcon === true || showIcon === 'true'" class="uni-noticebar-icon"><uni-icons type="sound" :color="color" size="14" /></view> <view v-if="showIcon === true || showIcon === 'true'" class="uni-noticebar-icon"><uni-icons type="sound"
<!-- #endif --> :color="color" size="14" /></view>
<!-- #endif -->
<!-- #ifndef MP-ALIPAY --> <!-- #ifndef MP-ALIPAY -->
<uni-icons v-if="showClose === true || showClose === 'true'" class="uni-noticebar-close uni-cursor-point" type="closeempty" :color="color" size="12" @click="close" /> <uni-icons v-if="showClose === true || showClose === 'true'" class="uni-noticebar-close uni-cursor-point"
<uni-icons v-if="showIcon === true || showIcon === 'true'" class="uni-noticebar-icon" type="sound" :color="color" size="14" /> type="closeempty" :color="color" size="12" @click="close" />
<uni-icons v-if="showIcon === true || showIcon === 'true'" class="uni-noticebar-icon" type="sound"
:color="color" size="14" />
<!-- #endif --> <!-- #endif -->
<view <view ref="textBox" class="uni-noticebar__content-wrapper" :style="{backgroundColor: backgroundColor,}"
ref="textBox" :class="{ 'uni-noticebar__content-wrapper--scrollable': scrollable, 'uni-noticebar__content-wrapper--single': !scrollable && (single || moreText) }">
class="uni-noticebar__content-wrapper" <view :id="elIdBox" class="uni-noticebar__content"
:class="{ 'uni-noticebar__content-wrapper--scrollable': scrollable, 'uni-noticebar__content-wrapper--single': !scrollable && (single || moreText) }" :class="{ 'uni-noticebar__content--scrollable': scrollable, 'uni-noticebar__content--single': !scrollable && (single || moreText) }">
> <text :id="elId" ref="animationEle" class="uni-noticebar__content-text"
<view
:id="elIdBox"
class="uni-noticebar__content"
:class="{ 'uni-noticebar__content--scrollable': scrollable, 'uni-noticebar__content--single': !scrollable && (single || moreText) }"
>
<text
:id="elId"
ref="animationEle"
class="uni-noticebar__content-text"
:class="{ 'uni-noticebar__content-text--scrollable': scrollable, 'uni-noticebar__content-text--single': !scrollable && (single || moreText) }" :class="{ 'uni-noticebar__content-text--scrollable': scrollable, 'uni-noticebar__content-text--single': !scrollable && (single || moreText) }"
:style="{ :style="{
color: color, color: color,
width: wrapWidth + 'px', width: wrapWidth + 'px',
backgroundColor: backgroundColor,
animationDuration: animationDuration, animationDuration: animationDuration,
'-webkit-animationDuration': animationDuration, '-webkit-animationDuration': animationDuration,
animationPlayState: webviewHide ? 'paused' : animationPlayState, animationPlayState: webviewHide ? 'paused' : animationPlayState,
'-webkit-animationPlayState': webviewHide ? 'paused' : animationPlayState, '-webkit-animationPlayState': webviewHide ? 'paused' : animationPlayState,
animationDelay: animationDelay, animationDelay: animationDelay,
'-webkit-animationDelay': animationDelay '-webkit-animationDelay': animationDelay
}" }">
>
{{ text }} {{ text }}
</text> </text>
</view> </view>
</view> </view>
<view v-if="showGetMore === true || showGetMore === 'true'" class="uni-noticebar__more uni-cursor-point" @click="clickMore"> <view v-if="showGetMore === true || showGetMore === 'true'" class="uni-noticebar__more uni-cursor-point"
@click="clickMore">
<text v-if="moreText" :style="{ color: moreColor }" class="uni-noticebar__more-text">{{ moreText }}</text> <text v-if="moreText" :style="{ color: moreColor }" class="uni-noticebar__more-text">{{ moreText }}</text>
<uni-icons type="arrowright" :color="moreColor" size="14" /> <uni-icons type="arrowright" :color="moreColor" size="14" />
</view> </view>
...@@ -48,386 +44,382 @@ ...@@ -48,386 +44,382 @@
</template> </template>
<script> <script>
// #ifdef APP-NVUE // #ifdef APP-NVUE
const dom = weex.requireModule('dom'); const dom = weex.requireModule('dom');
const animation = weex.requireModule('animation'); const animation = weex.requireModule('animation');
// #endif // #endif
/** /**
* NoticeBar 自定义导航栏 * NoticeBar 自定义导航栏
* @description 通告栏组件 * @description 通告栏组件
* @tutorial https://ext.dcloud.net.cn/plugin?id=30 * @tutorial https://ext.dcloud.net.cn/plugin?id=30
* @property {Number} speed 文字滚动的速度,默认100px/秒 * @property {Number} speed 文字滚动的速度,默认100px/秒
* @property {String} text 显示文字 * @property {String} text 显示文字
* @property {String} backgroundColor 背景颜色 * @property {String} backgroundColor 背景颜色
* @property {String} color 文字颜色 * @property {String} color 文字颜色
* @property {String} moreColor 查看更多文字的颜色 * @property {String} moreColor 查看更多文字的颜色
* @property {String} moreText 设置“查看更多”的文本 * @property {String} moreText 设置“查看更多”的文本
* @property {Boolean} single = [true|false] 是否单行 * @property {Boolean} single = [true|false] 是否单行
* @property {Boolean} scrollable = [true|false] 是否滚动,为true时,NoticeBar为单行 * @property {Boolean} scrollable = [true|false] 是否滚动,为true时,NoticeBar为单行
* @property {Boolean} showIcon = [true|false] 是否显示左侧喇叭图标 * @property {Boolean} showIcon = [true|false] 是否显示左侧喇叭图标
* @property {Boolean} showClose = [true|false] 是否显示左侧关闭按钮 * @property {Boolean} showClose = [true|false] 是否显示左侧关闭按钮
* @property {Boolean} showGetMore = [true|false] 是否显示右侧查看更多图标,为true时,NoticeBar为单行 * @property {Boolean} showGetMore = [true|false] 是否显示右侧查看更多图标,为true时,NoticeBar为单行
* @event {Function} click 点击 NoticeBar 触发事件 * @event {Function} click 点击 NoticeBar 触发事件
* @event {Function} close 关闭 NoticeBar 触发事件 * @event {Function} close 关闭 NoticeBar 触发事件
* @event {Function} getmore 点击”查看更多“时触发事件 * @event {Function} getmore 点击”查看更多“时触发事件
*/ */
export default { export default {
name: 'UniNoticeBar', name: 'UniNoticeBar',
props: { props: {
text: { text: {
type: String, type: String,
default: '' default: ''
}, },
moreText: { moreText: {
type: String, type: String,
default: '' default: ''
}, },
backgroundColor: { backgroundColor: {
type: String, type: String,
default: '#fffbe8' default: '#fffbe8'
}, },
speed: { speed: {
// 默认1s滚动100px // 默认1s滚动100px
type: Number, type: Number,
default: 100 default: 100
}, },
color: { color: {
type: String, type: String,
default: '#de8c17' default: '#de8c17'
}, },
moreColor: { moreColor: {
type: String, type: String,
default: '#999999' default: '#999999'
}, },
single: { single: {
// 是否单行 // 是否单行
type: [Boolean, String], type: [Boolean, String],
default: false default: false
}, },
scrollable: { scrollable: {
// 是否滚动,添加后控制单行效果取消 // 是否滚动,添加后控制单行效果取消
type: [Boolean, String], type: [Boolean, String],
default: false default: false
}, },
showIcon: { showIcon: {
// 是否显示左侧icon // 是否显示左侧icon
type: [Boolean, String], type: [Boolean, String],
default: false default: false
}, },
showGetMore: { showGetMore: {
// 是否显示右侧查看更多 // 是否显示右侧查看更多
type: [Boolean, String], type: [Boolean, String],
default: false default: false
},
showClose: {
// 是否显示左侧关闭按钮
type: [Boolean, String],
default: false
}
}, },
showClose: { data() {
// 是否显示左侧关闭按钮 const elId = `Uni_${Math.ceil(Math.random() * 10e5).toString(36)}`;
type: [Boolean, String], const elIdBox = `Uni_${Math.ceil(Math.random() * 10e5).toString(36)}`;
default: false return {
} textWidth: 0,
}, boxWidth: 0,
data() { wrapWidth: '',
const elId = `Uni_${Math.ceil(Math.random() * 10e5).toString(36)}`; webviewHide: false,
const elIdBox = `Uni_${Math.ceil(Math.random() * 10e5).toString(36)}`;
return {
textWidth: 0,
boxWidth: 0,
wrapWidth: '',
webviewHide: false,
// #ifdef APP-NVUE
stopAnimation: false,
// #endif
elId: elId,
elIdBox: elIdBox,
show: true,
animationDuration: 'none',
animationPlayState: 'paused',
animationDelay: '0s'
};
},
mounted() {
// #ifdef APP-PLUS
var pages = getCurrentPages();
var page = pages[pages.length - 1];
var currentWebview = page.$getAppWebview();
currentWebview.addEventListener('hide', () => {
this.webviewHide = true;
});
currentWebview.addEventListener('show', () => {
this.webviewHide = false;
});
// #endif
this.$nextTick(() => {
this.initSize();
});
},
// #ifdef APP-NVUE
beforeDestroy() {
this.stopAnimation = true;
},
// #endif
methods: {
initSize() {
if (this.scrollable) {
// #ifndef APP-NVUE
let query = [],
boxWidth = 0,
textWidth = 0;
let textQuery = new Promise((resolve, reject) => {
uni.createSelectorQuery()
// #ifndef MP-ALIPAY
.in(this)
// #endif
.select(`#${this.elId}`)
.boundingClientRect()
.exec(ret => {
this.textWidth = ret[0].width;
resolve();
});
});
let boxQuery = new Promise((resolve, reject) => {
uni.createSelectorQuery()
// #ifndef MP-ALIPAY
.in(this)
// #endif
.select(`#${this.elIdBox}`)
.boundingClientRect()
.exec(ret => {
this.boxWidth = ret[0].width;
resolve();
});
});
query.push(textQuery);
query.push(boxQuery);
Promise.all(query).then(() => {
this.animationDuration = `${this.textWidth / this.speed}s`;
this.animationDelay = `-${this.boxWidth / this.speed}s`;
setTimeout(() => {
this.animationPlayState = 'running';
}, 1000);
});
// #endif
// #ifdef APP-NVUE // #ifdef APP-NVUE
dom.getComponentRect(this.$refs['animationEle'], res => { stopAnimation: false,
let winWidth = uni.getSystemInfoSync().windowWidth;
this.textWidth = res.size.width;
animation.transition(
this.$refs['animationEle'],
{
styles: {
transform: `translateX(-${winWidth}px)`
},
duration: 0,
timingFunction: 'linear',
delay: 0
},
() => {
if (!this.stopAnimation) {
animation.transition(
this.$refs['animationEle'],
{
styles: {
transform: `translateX(-${this.textWidth}px)`
},
timingFunction: 'linear',
duration: ((this.textWidth - winWidth) / this.speed) * 1000,
delay: 1000
},
() => {
if (!this.stopAnimation) {
this.loopAnimation();
}
}
);
}
}
);
});
// #endif // #endif
} elId: elId,
// #ifdef APP-NVUE elIdBox: elIdBox,
if (!this.scrollable && (this.single || this.moreText)) { show: true,
dom.getComponentRect(this.$refs['textBox'], res => { animationDuration: 'none',
this.wrapWidth = res.size.width; animationPlayState: 'paused',
}); animationDelay: '0s'
} };
},
mounted() {
// #ifdef APP-PLUS
var pages = getCurrentPages();
var page = pages[pages.length - 1];
var currentWebview = page.$getAppWebview();
currentWebview.addEventListener('hide', () => {
this.webviewHide = true;
});
currentWebview.addEventListener('show', () => {
this.webviewHide = false;
});
// #endif // #endif
this.$nextTick(() => {
this.initSize();
});
}, },
loopAnimation() { // #ifdef APP-NVUE
// #ifdef APP-NVUE beforeDestroy() {
animation.transition( this.stopAnimation = true;
this.$refs['animationEle'], },
{ // #endif
styles: { methods: {
transform: `translateX(0px)` initSize() {
}, if (this.scrollable) {
duration: 0 // #ifndef APP-NVUE
}, let query = [],
() => { boxWidth = 0,
if (!this.stopAnimation) { textWidth = 0;
let textQuery = new Promise((resolve, reject) => {
uni.createSelectorQuery()
// #ifndef MP-ALIPAY
.in(this)
// #endif
.select(`#${this.elId}`)
.boundingClientRect()
.exec(ret => {
this.textWidth = ret[0].width;
resolve();
});
});
let boxQuery = new Promise((resolve, reject) => {
uni.createSelectorQuery()
// #ifndef MP-ALIPAY
.in(this)
// #endif
.select(`#${this.elIdBox}`)
.boundingClientRect()
.exec(ret => {
this.boxWidth = ret[0].width;
resolve();
});
});
query.push(textQuery);
query.push(boxQuery);
Promise.all(query).then(() => {
this.animationDuration = `${this.textWidth / this.speed}s`;
this.animationDelay = `-${this.boxWidth / this.speed}s`;
setTimeout(() => {
this.animationPlayState = 'running';
}, 1000);
});
// #endif
// #ifdef APP-NVUE
dom.getComponentRect(this.$refs['animationEle'], res => {
let winWidth = uni.getSystemInfoSync().windowWidth;
this.textWidth = res.size.width;
animation.transition( animation.transition(
this.$refs['animationEle'], this.$refs['animationEle'], {
{
styles: { styles: {
transform: `translateX(-${this.textWidth}px)` transform: `translateX(-${winWidth}px)`
}, },
duration: (this.textWidth / this.speed) * 1000, duration: 0,
timingFunction: 'linear', timingFunction: 'linear',
delay: 0 delay: 0
}, },
() => { () => {
if (!this.stopAnimation) { if (!this.stopAnimation) {
this.loopAnimation(); animation.transition(
this.$refs['animationEle'], {
styles: {
transform: `translateX(-${this.textWidth}px)`
},
timingFunction: 'linear',
duration: ((this.textWidth - winWidth) / this.speed) * 1000,
delay: 1000
},
() => {
if (!this.stopAnimation) {
this.loopAnimation();
}
}
);
} }
} }
); );
} });
// #endif
} }
); // #ifdef APP-NVUE
// #endif if (!this.scrollable && (this.single || this.moreText)) {
}, dom.getComponentRect(this.$refs['textBox'], res => {
clickMore() { this.wrapWidth = res.size.width;
this.$emit('getmore'); });
}, }
close() { // #endif
this.show = false; },
this.$emit('close'); loopAnimation() {
}, // #ifdef APP-NVUE
onClick() { animation.transition(
this.$emit('click'); this.$refs['animationEle'], {
styles: {
transform: `translateX(0px)`
},
duration: 0
},
() => {
if (!this.stopAnimation) {
animation.transition(
this.$refs['animationEle'], {
styles: {
transform: `translateX(-${this.textWidth}px)`
},
duration: (this.textWidth / this.speed) * 1000,
timingFunction: 'linear',
delay: 0
},
() => {
if (!this.stopAnimation) {
this.loopAnimation();
}
}
);
}
}
);
// #endif
},
clickMore() {
this.$emit('getmore');
},
close() {
this.show = false;
this.$emit('close');
},
onClick() {
this.$emit('click');
}
} }
} };
};
</script> </script>
<style scoped> <style scoped>
.uni-noticebar { .uni-noticebar {
/* #ifndef APP-NVUE */ /* #ifndef APP-NVUE */
display: flex; display: flex;
width: 100%; width: 100%;
box-sizing: border-box; box-sizing: border-box;
/* #endif */ /* #endif */
flex-direction: row; flex-direction: row;
align-items: center; align-items: center;
padding: 6rpx 12rpx; padding: 6rpx 12rpx;
margin-bottom: 10px; margin-bottom: 10px;
} }
.uni-cursor-point {
/* #ifdef H5 */
cursor: pointer;
/* #endif */
}
.uni-noticebar-close { .uni-cursor-point {
margin-right: 5px; /* #ifdef H5 */
} cursor: pointer;
/* #endif */
}
.uni-noticebar-icon { .uni-noticebar-close {
margin-right: 5px; margin-right: 5px;
} }
.uni-noticebar__content-wrapper { .uni-noticebar-icon {
flex: 1; margin-right: 5px;
flex-direction: column; }
overflow: hidden;
}
.uni-noticebar__content-wrapper--single { .uni-noticebar__content-wrapper {
/* #ifndef APP-NVUE */ flex: 1;
line-height: 18px; flex-direction: column;
/* #endif */ overflow: hidden;
} }
.uni-noticebar__content-wrapper--single, .uni-noticebar__content-wrapper--single {
.uni-noticebar__content-wrapper--scrollable { /* #ifndef APP-NVUE */
flex-direction: row; line-height: 18px;
} /* #endif */
}
/* #ifndef APP-NVUE */ .uni-noticebar__content-wrapper--single,
.uni-noticebar__content-wrapper--scrollable { .uni-noticebar__content-wrapper--scrollable {
position: relative; flex-direction: row;
height: 36rpx; }
line-height: 36rpx;
}
/* #endif */
.uni-noticebar__content--scrollable {
/* #ifdef APP-NVUE */
flex: 0;
/* #endif */
/* #ifndef APP-NVUE */ /* #ifndef APP-NVUE */
flex: 1; .uni-noticebar__content-wrapper--scrollable {
display: block; position: relative;
overflow: hidden; height: 36rpx;
/* #endif */ line-height: 36rpx;
} }
.uni-noticebar__content--single {
/* #ifndef APP-NVUE */
display: flex;
flex: none;
width: 100%;
justify-content: center;
/* #endif */ /* #endif */
} .uni-noticebar__content--scrollable {
/* #ifdef APP-NVUE */
flex: 0;
/* #endif */
/* #ifndef APP-NVUE */
flex: 1;
display: block;
overflow: hidden;
/* #endif */
}
.uni-noticebar__content-text { .uni-noticebar__content--single {
font-size: 24rpx; /* #ifndef APP-NVUE */
line-height: 36rpx; display: flex;
/* #ifndef APP-NVUE */ flex: none;
word-break: break-all; width: 100%;
/* #endif */ justify-content: center;
} /* #endif */
}
.uni-noticebar__content-text--single { .uni-noticebar__content-text {
/* #ifdef APP-NVUE */ font-size: 24rpx;
lines: 1; line-height: 36rpx;
/* #endif */ /* #ifndef APP-NVUE */
/* #ifndef APP-NVUE */ word-break: break-all;
display: block; /* #endif */
width: 100%; }
white-space: nowrap;
/* #endif */
overflow: hidden;
text-overflow: ellipsis;
}
.uni-noticebar__content-text--scrollable { .uni-noticebar__content-text--single {
/* #ifdef APP-NVUE */ /* #ifdef APP-NVUE */
lines: 1; lines: 1;
padding-left: 750rpx; /* #endif */
/* #endif */ /* #ifndef APP-NVUE */
/* #ifndef APP-NVUE */ display: block;
position: absolute; width: 100%;
display: block; white-space: nowrap;
height: 36rpx; /* #endif */
line-height: 36rpx; overflow: hidden;
white-space: nowrap; text-overflow: ellipsis;
padding-left: 100%; }
animation: notice 10s 0s linear infinite both;
animation-play-state: paused;
/* #endif */
}
.uni-noticebar__more { .uni-noticebar__content-text--scrollable {
/* #ifndef APP-NVUE */ /* #ifdef APP-NVUE */
display: inline-flex; lines: 1;
/* #endif */ padding-left: 750rpx;
flex-direction: row; /* #endif */
flex-wrap: nowrap; /* #ifndef APP-NVUE */
align-items: center; position: absolute;
padding-left: 5px; display: block;
} height: 36rpx;
line-height: 36rpx;
white-space: nowrap;
padding-left: 100%;
animation: notice 10s 0s linear infinite both;
animation-play-state: paused;
/* #endif */
}
.uni-noticebar__more-text { .uni-noticebar__more {
font-size: 14px; /* #ifndef APP-NVUE */
} display: inline-flex;
/* #endif */
flex-direction: row;
flex-wrap: nowrap;
align-items: center;
padding-left: 5px;
}
@keyframes notice { .uni-noticebar__more-text {
100% { font-size: 14px;
transform: translate3d(-100%, 0, 0); }
@keyframes notice {
100% {
transform: translate3d(-100%, 0, 0);
}
} }
} </style>
</style> \ No newline at end of file
...@@ -11,16 +11,16 @@ const envConfigs = { ...@@ -11,16 +11,16 @@ const envConfigs = {
imgUrl: "https://cdn.tikcos.cn/saas/mall/img/", imgUrl: "https://cdn.tikcos.cn/saas/mall/img/",
}, },
}; };
const appConfigs = { const appConfigs = {
wx727893371335676b: { wx727893371335676b: {
appCode: "TC20", appCode: "TC20",
tenantId: 'weiit6402646395122f993b96db77e42b0e3a29ea1e3e527d1', tenantId: 'weiit6402646395122f993b96db77e42b0e3a29ea1e3e527d1',
shopId: "0000", shopId: "0000",
appId: "wx727893371335676b", appId: "wx727893371335676b",
appName: "51春水阁", appName: "51悦享阁",
baseUrl: "https://api.wei-it.com", baseUrl: "https://api.wei-it.com",
contactInfo: { contactInfo: {
//QYKF企业客服,WXKF微信客服
contactType: 'WXKF', contactType: 'WXKF',
contactExtUrl: 'https://work.weixin.qq.com/kfid/kfc3fdcb835c0f701bc', contactExtUrl: 'https://work.weixin.qq.com/kfid/kfc3fdcb835c0f701bc',
contactCorpId: 'ww6aaa281b3cd5de13' contactCorpId: 'ww6aaa281b3cd5de13'
...@@ -291,4 +291,5 @@ const appConfigs = { ...@@ -291,4 +291,5 @@ const appConfigs = {
}, },
}; };
let config = Object.assign({}, envConfigs[env], appConfigs[appId]); let config = Object.assign({}, envConfigs[env], appConfigs[appId]);
console.log(config)
export default config; export default config;
\ No newline at end of file
...@@ -24,11 +24,11 @@ const uploadMixin = { ...@@ -24,11 +24,11 @@ const uploadMixin = {
uploadObj[i] = message; uploadObj[i] = message;
if (!success) { if (!success) {
uploadObj[i] = ''; uploadObj[i] = '';
uni.showToast({ // uni.showToast({
title: `[${i+1}]上传失败,请重新上传!`, // title: `[${i+1}]上传失败,请重新上传!`,
icon: 'none', // icon: 'none',
duration: 2000 // duration: 2000
}); // });
} }
if (uploadNum == 0) { if (uploadNum == 0) {
const arr = Array.from(uploadObj); const arr = Array.from(uploadObj);
......
...@@ -21,8 +21,6 @@ const shareMixin = { ...@@ -21,8 +21,6 @@ const shareMixin = {
? this.shareTitle ? this.shareTitle
: `欢迎进入${this.$config.appName}`; : `欢迎进入${this.$config.appName}`;
if (typeof this.onShare == "function") this.onShare(); if (typeof this.onShare == "function") this.onShare();
;
console.log(pathUrl)
return { return {
title: title, // 转发后 所显示的title title: title, // 转发后 所显示的title
path: pathUrl, // 相对的路径 path: pathUrl, // 相对的路径
...@@ -31,7 +29,7 @@ const shareMixin = { ...@@ -31,7 +29,7 @@ const shareMixin = {
}, },
methods: { methods: {
...mapActions(["getSceneInfo"]), ...mapActions(["getSceneInfo"]),
...mapMutations(["SET_SALES_MANNID"]), ...mapMutations(["SET_SALES_MANNID","SET_PARENTID"]),
async getQuery(callback) { async getQuery(callback) {
console.log(this.$mp) console.log(this.$mp)
let query = {}; let query = {};
...@@ -47,8 +45,10 @@ const shareMixin = { ...@@ -47,8 +45,10 @@ const shareMixin = {
console.log(query,'query') console.log(query,'query')
let { salesManId } = query; let { salesManId } = query;
if (!!salesManId) { if (!!salesManId) {
this.SET_PARENTID(salesManId)
this.SET_SALES_MANNID(salesManId); this.SET_SALES_MANNID(salesManId);
this.clickDMSUrl(salesManId); this.clickDMSUrl(salesManId);
} }
} }
......
<template> <template>
<view class="container" :style="globelColor.primaryColor"> <view class="container" :style="globelColor.primaryColor">
<!-- Mini-program info display -->
<view class="mini-program-info">
<view class="logo-box">
<image class="logo" :src="miniProgramLogo"></image>
</view>
<view class="app-name">{{miniProgramName}}</view>
</view>
<!-- <view class="title">基本信息</view> --> <!-- <view class="title">基本信息</view> -->
<view class="info-box"> <view class="info-box">
<view class="info-name-box"> <view class="info-name-box">
...@@ -26,11 +34,6 @@ ...@@ -26,11 +34,6 @@
</view> </view>
</view> </view>
</view> </view>
<view>
<button class="save" lang="zh_CN" open-type="getPhoneNumber" @getphonenumber="handlergetPhoneNumber">
手机号授权并登陆
</button>
</view>
<view class="infor"> <view class="infor">
<checkbox-group @change="changeChecked"> <checkbox-group @change="changeChecked">
<checkbox :checked="checked" value="1" style="transform:scale(0.7)" /> <checkbox :checked="checked" value="1" style="transform:scale(0.7)" />
...@@ -42,6 +45,13 @@ ...@@ -42,6 +45,13 @@
<a href="javascript:;" @click="goStoreAgreement('YFFW')">《会员协议》</a> <a href="javascript:;" @click="goStoreAgreement('YFFW')">《会员协议》</a>
<a href="javascript:;" @click="goStoreAgreement('YSXY')">《隐私协议》</a> <a href="javascript:;" @click="goStoreAgreement('YSXY')">《隐私协议》</a>
</view> </view>
<view>
<button class="save" lang="zh_CN" open-type="getPhoneNumber" @click="handleClick"
@getphonenumber="handlergetPhoneNumber">
手机号授权并登陆
</button>
</view>
</view> </view>
</template> </template>
<script> <script>
...@@ -59,6 +69,8 @@ ...@@ -59,6 +69,8 @@
import { import {
uploadMixin uploadMixin
} from '@/mixin/UploadMixin.js' } from '@/mixin/UploadMixin.js'
import config from '@/config/index.js'
export default { export default {
mixins: [uploadMixin], mixins: [uploadMixin],
data() { data() {
...@@ -80,6 +92,13 @@ ...@@ -80,6 +92,13 @@
computed: { computed: {
...mapGetters(["isLogin", "memberId"]), ...mapGetters(["isLogin", "memberId"]),
...mapState(["userinfo", "member", "globelColor", "salesManId"]), ...mapState(["userinfo", "member", "globelColor", "salesManId"]),
miniProgramName() {
return __wxConfig.accountInfo.nickname ;
},
miniProgramLogo() {
// Using a default logo image, can be replaced with actual logo path
return __wxConfig.accountInfo.icon;
}
}, },
methods: { methods: {
...mapMutations(["SET_MEMBER", "SET_USER_INFO", "SET_PHONE_NUMBER", ]), ...mapMutations(["SET_MEMBER", "SET_USER_INFO", "SET_PHONE_NUMBER", ]),
...@@ -89,13 +108,23 @@ ...@@ -89,13 +108,23 @@
"getSessionKeyByCode", "getSessionKeyByCode",
"getWxLogin" "getWxLogin"
]), ]),
handleClick() {
if (!this.checkedList.includes('1')) {
return uni.showToast({
title: '请勾选并阅读隐私协议!',
duration: 2000,
icon: 'none'
})
}
},
async clickDMSUrl(salesManId) { async clickDMSUrl(salesManId) {
// if (!this.memberId) return; // if (!this.memberId) return;
let data = { let data = {
salesManId: salesManId, salesManId: salesManId,
userId: this.memberId, userId: this.memberId,
}; };
console.log(data, 'data')
let { let {
success, success,
result result
...@@ -105,7 +134,7 @@ ...@@ -105,7 +134,7 @@
this.checkedList = e.detail.value; this.checkedList = e.detail.value;
}, },
goStoreAgreement(sence) { goStoreAgreement(sence) {
console.log(sence,'sence')
uni.navigateTo({ uni.navigateTo({
url: `/subPackages/StoreAgreement/StoreAgreement?sence=${sence}` url: `/subPackages/StoreAgreement/StoreAgreement?sence=${sence}`
}); });
...@@ -223,7 +252,7 @@ ...@@ -223,7 +252,7 @@
<style lang="scss" scoped> <style lang="scss" scoped>
.container { .container {
background: #f1f1f1; background: #fff;
.title { .title {
height: 79rpx; height: 79rpx;
...@@ -237,9 +266,9 @@ ...@@ -237,9 +266,9 @@
justify-content: center; justify-content: center;
font-size: 28rpx; font-size: 28rpx;
color: #999; color: #999;
display: flex;
margin-top: 20rpx;
align-items: center; align-items: center;
display: inline-flex;
margin: 28rpx 0 28rpx 28rpx;
} }
.infor a { .infor a {
...@@ -296,6 +325,7 @@ ...@@ -296,6 +325,7 @@
.label { .label {
width: 100rpx; width: 100rpx;
color: #000; color: #000;
font-size: 28rpx;
text-align: center; text-align: center;
margin-right: 100rpx; margin-right: 100rpx;
} }
...@@ -337,5 +367,37 @@ ...@@ -337,5 +367,37 @@
border-radius: 10rpx; border-radius: 10rpx;
background-color: var(--primaryColor); background-color: var(--primaryColor);
} }
/* Mini-program info styles */
.mini-program-info {
display: flex;
flex-direction: column;
align-items: center;
padding: 30rpx 0;
margin-bottom: 20rpx;
.logo-box {
width: 130rpx;
height: 130rpx;
border-radius: 50%;
border: 1rpx solid #eee;
display: flex;
align-items: center;
justify-content: center;
margin-bottom: 40rpx;
.logo {
width: 120rpx;
height: 120rpx;
border-radius: 50%;
}
}
.app-name {
font-size: 36rpx;
color: #333;
font-weight: 500;
}
}
} }
</style> </style>
...@@ -184,7 +184,7 @@ ...@@ -184,7 +184,7 @@
查看物流 查看物流
</button> </button>
<button plain v-if="['待收货', '拼团成功,待收货'].includes(orderState(order))" <button plain v-if="['待收货', '拼团成功,待收货'].includes(orderState(order))"
@tap="confirm(order.orderNum) && order.deliveryNum"> @tap="handleConfirm(order.orderNum) && order.deliveryNum">
确认收货 确认收货
</button> </button>
<button type="primary" @tap="review(order.orderNum)" v-if="['待评价'].includes(orderState(order))"> <button type="primary" @tap="review(order.orderNum)" v-if="['待评价'].includes(orderState(order))">
...@@ -525,28 +525,57 @@ ...@@ -525,28 +525,57 @@
}, },
}) })
}, },
confirm(orderNum) { // confirm(orderNum) {
let self = this; // let self = this;
uni.showModal({ // uni.showModal({
title: "提示", // title: "提示",
content: "确定确认收货么?", // content: "确定确认收货么?",
success: async ({ // success: async ({
confirm // confirm
}) => { // }) => {
if (confirm) { // if (confirm) {
let param = { // let param = {
merchant_id: self.order.merchantId, // merchant_id: self.order.merchantId,
merchant_trade_no: self.order.merchantTradeNo, // merchant_trade_no: self.order.merchantTradeNo,
transaction_id: self.order.transactionId // transaction_id: self.order.transactionId
} // }
self.$util.openBusinessView(param, () => { // self.$util.openBusinessView(param, () => {
self.orderConfirm(orderNum) // self.orderConfirm(orderNum)
}) // })
// }
// },
// });
// },
handleConfirm(orderNum) {
let self = this;
uni.showModal({
title: "提示",
content: "确定确认收货么?",
success: async ({
confirm
}) => {
if (confirm) {
if (self.order.merchantId && self.order.merchantTradeNo && self.order
.transactionId) {
let param = {
merchant_id: self.order.merchantId,
merchant_trade_no: self.order.merchantTradeNo,
transaction_id: self.order.transactionId
}
self.$util.openBusinessView(param, () => {
self.orderConfirm(orderNum)
})
} else {
self.orderConfirm(orderNum)
}
}
},
});
},
}
},
});
},
orderConfirm(orderNum) { orderConfirm(orderNum) {
let self = this; let self = this;
let data = { let data = {
......
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